-r saari
This commit is contained in:
evaughan%netscape.com 2000-02-14 01:42:09 +00:00
Родитель c81120fb92
Коммит 5ce4b52cef
46 изменённых файлов: 2219 добавлений и 832 удалений

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

@ -3011,7 +3011,7 @@ HTMLContentSink::StartLayout()
if (mWebShell) {
// initially show the scrollbars. We need to do this because another
// document like a XUL document, could have have hidden the scrollbars. -EDV
mWebShell->SetScrolling(-1, PR_FALSE);
//mWebShell->SetScrolling(-1, PR_FALSE);
if (mFrameset) {
mWebShell->SetScrolling(NS_STYLE_OVERFLOW_HIDDEN, PR_FALSE);
}

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

@ -99,6 +99,11 @@ XUL_ATOM(box, "box")
XUL_ATOM(flex, "flex")
XUL_ATOM(spring, "spring")
XUL_ATOM(orient, "orient")
XUL_ATOM(autostretch, "autostretch")
XUL_ATOM(titledbox, "titledbox")
XUL_ATOM(title, "title")
XUL_ATOM(titledboxContentPseudo, ":titledbox-content")
XUL_ATOM(deck, "deck")
XUL_ATOM(tabcontrol, "tabcontrol")

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

@ -74,9 +74,15 @@
#include "nsIAttributeContent.h"
#include "nsIPref.h"
#include "nsLegendFrame.h"
#include "nsTitleFrame.h"
#include "nsIDOMWindow.h"
#include "nsPIDOMWindow.h"
#ifdef INCLUDE_XUL
#include "nsIDOMXULCommandDispatcher.h"
#include "nsIDOMXULDocument.h"
#endif
#include "nsInlineFrame.h"
#include "nsBlockFrame.h"
@ -144,6 +150,15 @@ NS_NewProgressMeterFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewTitledButtonFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewTitledBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewTitledBoxInnerFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewTitleFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame);
@ -2036,7 +2051,7 @@ nsCSSFrameConstructor::TableIsValidCellContent(nsIPresContext* aPresContext,
#ifdef INCLUDE_XUL
if ( (nsXULAtoms::button == tag.get()) ||
(nsXULAtoms::titledbutton == tag.get()) ||
(nsXULAtoms::image == tag.get()) ||
(nsXULAtoms::image == tag.get()) ||
(nsXULAtoms::grippy == tag.get()) ||
(nsXULAtoms::splitter == tag.get()) ||
(nsXULAtoms::slider == tag.get()) ||
@ -3316,6 +3331,99 @@ nsCSSFrameConstructor::InitializeSelectFrame(nsIPresShell* aPresShell,
return NS_OK;
}
/**
* Used to be InitializeScrollFrame but now its only used for the select tag
* But the select tag should really be fixed to use GFX scrollbars that can
* be create with BuildScrollFrame.
*/
nsresult
nsCSSFrameConstructor::ConstructTitledBoxFrame(nsIPresShell* aPresShell,
nsIPresContext* aPresContext,
nsFrameConstructorState& aState,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsIAtom* aTag,
nsIStyleContext* aStyleContext,
nsIFrame*& aNewFrame)
{
nsIFrame * newFrame;
nsresult rv = NS_NewTitledBoxFrame(aPresShell, &newFrame);
if (!NS_SUCCEEDED(rv)) {
return rv;
}
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));
// Initialize it
nsIFrame* geometricParent = aParentFrame;
InitAndRestoreFrame(aPresContext, aState, aContent,
geometricParent, aStyleContext, nsnull, newFrame);
// cache our display type
const nsStyleDisplay* styleDisplay;
newFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) styleDisplay);
nsIFrame * boxFrame;
NS_NewTitledBoxInnerFrame(shell, &boxFrame);
// Resolve style and initialize the frame
nsIStyleContext* styleContext;
aPresContext->ResolvePseudoStyleContextFor(aContent, nsXULAtoms::titledboxContentPseudo,
aStyleContext, PR_FALSE, &styleContext);
InitAndRestoreFrame(aPresContext, aState, nsnull,
newFrame, styleContext, nsnull, boxFrame);
NS_RELEASE(styleContext);
nsFrameItems childItems;
ProcessChildren(aPresShell, aPresContext, aState, aContent, boxFrame, PR_FALSE,
childItems, PR_TRUE);
static NS_DEFINE_IID(kTitleFrameCID, NS_TITLE_FRAME_CID);
nsIFrame * child = childItems.childList;
nsIFrame * previous = nsnull;
nsIFrame* titleFrame = nsnull;
while (nsnull != child) {
nsresult result = child->QueryInterface(kTitleFrameCID, (void**)&titleFrame);
if (NS_SUCCEEDED(result) && titleFrame) {
if (nsnull != previous) {
nsIFrame * nxt;
titleFrame->GetNextSibling(&nxt);
previous->SetNextSibling(nxt);
titleFrame->SetNextSibling(boxFrame);
break;
} else {
nsIFrame * nxt;
titleFrame->GetNextSibling(&nxt);
childItems.childList = nxt;
titleFrame->SetNextSibling(boxFrame);
break;
}
}
previous = child;
child->GetNextSibling(&child);
}
// Set the scrolled frame's initial child lists
boxFrame->SetInitialChildList(aPresContext, nsnull, childItems.childList);
if (titleFrame)
newFrame->SetInitialChildList(aPresContext, nsnull, titleFrame);
else
newFrame->SetInitialChildList(aPresContext, nsnull, boxFrame);
// our new frame retured is the top frame which is the list frame.
aNewFrame = newFrame;
return NS_OK;
}
/**
* Used to be InitializeScrollFrame but now its only used for the select tag
* But the select tag should really be fixed to use GFX scrollbars that can
@ -4292,14 +4400,65 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
frameHasBeenInitialized = PR_TRUE;
}
}
} // End of BOX CONSTRUCTION logic
else if (aTag == nsXULAtoms::title) {
processChildren = PR_TRUE;
isReplaced = PR_TRUE;
rv = NS_NewTitleFrame(aPresShell, &newFrame);
const nsStyleDisplay* display = (const nsStyleDisplay*)
aStyleContext->GetStyleData(eStyleStruct_Display);
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {
// set the top to be the newly created scrollframe
BuildScrollFrame(aPresShell, aPresContext, aState, aContent, aStyleContext, newFrame, aParentFrame,
topFrame, aStyleContext);
// we have a scrollframe so the parent becomes the scroll frame.
newFrame->GetParent(&aParentFrame);
primaryFrameSet = PR_TRUE;
frameHasBeenInitialized = PR_TRUE;
}
} // End of BOX CONSTRUCTION logic
else if (aTag == nsXULAtoms::titledbox) {
ConstructTitledBoxFrame(aPresShell, aPresContext, aState, aContent, aParentFrame, aTag, aStyleContext, newFrame);
processChildren = PR_FALSE;
isReplaced = PR_TRUE;
const nsStyleDisplay* display = (const nsStyleDisplay*)
aStyleContext->GetStyleData(eStyleStruct_Display);
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {
// set the top to be the newly created scrollframe
BuildScrollFrame(aPresShell, aPresContext, aState, aContent, aStyleContext, newFrame, aParentFrame,
topFrame, aStyleContext);
// we have a scrollframe so the parent becomes the scroll frame.
newFrame->GetParent(&aParentFrame);
primaryFrameSet = PR_TRUE;
frameHasBeenInitialized = PR_TRUE;
}
}
// TITLED BUTTON CONSTRUCTION
else if (aTag == nsXULAtoms::titledbutton ||
aTag == nsXULAtoms::image ||
aTag == nsXULAtoms::text) {
processChildren = PR_TRUE;
processChildren = PR_TRUE;
isReplaced = PR_TRUE;
rv = NS_NewTitledButtonFrame(aPresShell, &newFrame);
}

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

@ -511,6 +511,15 @@ protected:
PRBool& aFrameHasBeenInitialized,
PRBool aIsFixedPositioned);
nsresult ConstructTitledBoxFrame(nsIPresShell* aPresShell,
nsIPresContext* aPresContext,
nsFrameConstructorState& aState,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsIAtom* aTag,
nsIStyleContext* aStyleContext,
nsIFrame*& aNewFrame);
nsresult ConstructFrameByTag(nsIPresShell* aPresShell,
nsIPresContext* aPresContext,
nsFrameConstructorState& aState,

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

@ -3011,7 +3011,7 @@ HTMLContentSink::StartLayout()
if (mWebShell) {
// initially show the scrollbars. We need to do this because another
// document like a XUL document, could have have hidden the scrollbars. -EDV
mWebShell->SetScrolling(-1, PR_FALSE);
//mWebShell->SetScrolling(-1, PR_FALSE);
if (mFrameset) {
mWebShell->SetScrolling(NS_STYLE_OVERFLOW_HIDDEN, PR_FALSE);
}

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

@ -74,9 +74,15 @@
#include "nsIAttributeContent.h"
#include "nsIPref.h"
#include "nsLegendFrame.h"
#include "nsTitleFrame.h"
#include "nsIDOMWindow.h"
#include "nsPIDOMWindow.h"
#ifdef INCLUDE_XUL
#include "nsIDOMXULCommandDispatcher.h"
#include "nsIDOMXULDocument.h"
#endif
#include "nsInlineFrame.h"
#include "nsBlockFrame.h"
@ -144,6 +150,15 @@ NS_NewProgressMeterFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewTitledButtonFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewTitledBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewTitledBoxInnerFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewTitleFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame );
nsresult
NS_NewBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame);
@ -2036,7 +2051,7 @@ nsCSSFrameConstructor::TableIsValidCellContent(nsIPresContext* aPresContext,
#ifdef INCLUDE_XUL
if ( (nsXULAtoms::button == tag.get()) ||
(nsXULAtoms::titledbutton == tag.get()) ||
(nsXULAtoms::image == tag.get()) ||
(nsXULAtoms::image == tag.get()) ||
(nsXULAtoms::grippy == tag.get()) ||
(nsXULAtoms::splitter == tag.get()) ||
(nsXULAtoms::slider == tag.get()) ||
@ -3316,6 +3331,99 @@ nsCSSFrameConstructor::InitializeSelectFrame(nsIPresShell* aPresShell,
return NS_OK;
}
/**
* Used to be InitializeScrollFrame but now its only used for the select tag
* But the select tag should really be fixed to use GFX scrollbars that can
* be create with BuildScrollFrame.
*/
nsresult
nsCSSFrameConstructor::ConstructTitledBoxFrame(nsIPresShell* aPresShell,
nsIPresContext* aPresContext,
nsFrameConstructorState& aState,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsIAtom* aTag,
nsIStyleContext* aStyleContext,
nsIFrame*& aNewFrame)
{
nsIFrame * newFrame;
nsresult rv = NS_NewTitledBoxFrame(aPresShell, &newFrame);
if (!NS_SUCCEEDED(rv)) {
return rv;
}
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));
// Initialize it
nsIFrame* geometricParent = aParentFrame;
InitAndRestoreFrame(aPresContext, aState, aContent,
geometricParent, aStyleContext, nsnull, newFrame);
// cache our display type
const nsStyleDisplay* styleDisplay;
newFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) styleDisplay);
nsIFrame * boxFrame;
NS_NewTitledBoxInnerFrame(shell, &boxFrame);
// Resolve style and initialize the frame
nsIStyleContext* styleContext;
aPresContext->ResolvePseudoStyleContextFor(aContent, nsXULAtoms::titledboxContentPseudo,
aStyleContext, PR_FALSE, &styleContext);
InitAndRestoreFrame(aPresContext, aState, nsnull,
newFrame, styleContext, nsnull, boxFrame);
NS_RELEASE(styleContext);
nsFrameItems childItems;
ProcessChildren(aPresShell, aPresContext, aState, aContent, boxFrame, PR_FALSE,
childItems, PR_TRUE);
static NS_DEFINE_IID(kTitleFrameCID, NS_TITLE_FRAME_CID);
nsIFrame * child = childItems.childList;
nsIFrame * previous = nsnull;
nsIFrame* titleFrame = nsnull;
while (nsnull != child) {
nsresult result = child->QueryInterface(kTitleFrameCID, (void**)&titleFrame);
if (NS_SUCCEEDED(result) && titleFrame) {
if (nsnull != previous) {
nsIFrame * nxt;
titleFrame->GetNextSibling(&nxt);
previous->SetNextSibling(nxt);
titleFrame->SetNextSibling(boxFrame);
break;
} else {
nsIFrame * nxt;
titleFrame->GetNextSibling(&nxt);
childItems.childList = nxt;
titleFrame->SetNextSibling(boxFrame);
break;
}
}
previous = child;
child->GetNextSibling(&child);
}
// Set the scrolled frame's initial child lists
boxFrame->SetInitialChildList(aPresContext, nsnull, childItems.childList);
if (titleFrame)
newFrame->SetInitialChildList(aPresContext, nsnull, titleFrame);
else
newFrame->SetInitialChildList(aPresContext, nsnull, boxFrame);
// our new frame retured is the top frame which is the list frame.
aNewFrame = newFrame;
return NS_OK;
}
/**
* Used to be InitializeScrollFrame but now its only used for the select tag
* But the select tag should really be fixed to use GFX scrollbars that can
@ -4292,14 +4400,65 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
frameHasBeenInitialized = PR_TRUE;
}
}
} // End of BOX CONSTRUCTION logic
else if (aTag == nsXULAtoms::title) {
processChildren = PR_TRUE;
isReplaced = PR_TRUE;
rv = NS_NewTitleFrame(aPresShell, &newFrame);
const nsStyleDisplay* display = (const nsStyleDisplay*)
aStyleContext->GetStyleData(eStyleStruct_Display);
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {
// set the top to be the newly created scrollframe
BuildScrollFrame(aPresShell, aPresContext, aState, aContent, aStyleContext, newFrame, aParentFrame,
topFrame, aStyleContext);
// we have a scrollframe so the parent becomes the scroll frame.
newFrame->GetParent(&aParentFrame);
primaryFrameSet = PR_TRUE;
frameHasBeenInitialized = PR_TRUE;
}
} // End of BOX CONSTRUCTION logic
else if (aTag == nsXULAtoms::titledbox) {
ConstructTitledBoxFrame(aPresShell, aPresContext, aState, aContent, aParentFrame, aTag, aStyleContext, newFrame);
processChildren = PR_FALSE;
isReplaced = PR_TRUE;
const nsStyleDisplay* display = (const nsStyleDisplay*)
aStyleContext->GetStyleData(eStyleStruct_Display);
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {
// set the top to be the newly created scrollframe
BuildScrollFrame(aPresShell, aPresContext, aState, aContent, aStyleContext, newFrame, aParentFrame,
topFrame, aStyleContext);
// we have a scrollframe so the parent becomes the scroll frame.
newFrame->GetParent(&aParentFrame);
primaryFrameSet = PR_TRUE;
frameHasBeenInitialized = PR_TRUE;
}
}
// TITLED BUTTON CONSTRUCTION
else if (aTag == nsXULAtoms::titledbutton ||
aTag == nsXULAtoms::image ||
aTag == nsXULAtoms::text) {
processChildren = PR_TRUE;
processChildren = PR_TRUE;
isReplaced = PR_TRUE;
rv = NS_NewTitledButtonFrame(aPresShell, &newFrame);
}

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

@ -511,6 +511,15 @@ protected:
PRBool& aFrameHasBeenInitialized,
PRBool aIsFixedPositioned);
nsresult ConstructTitledBoxFrame(nsIPresShell* aPresShell,
nsIPresContext* aPresContext,
nsFrameConstructorState& aState,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsIAtom* aTag,
nsIStyleContext* aStyleContext,
nsIFrame*& aNewFrame);
nsresult ConstructFrameByTag(nsIPresShell* aPresShell,
nsIPresContext* aPresContext,
nsFrameConstructorState& aState,

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

@ -30,6 +30,8 @@ MODULE = layout
LIBRARY_NAME = raptorxulbase_s
CPPSRCS = \
nsTitledBoxFrame.cpp \
nsTitleFrame.cpp \
nsFrameNavigator.cpp \
nsSplitterFrame.cpp \
nsGrippyFrame.cpp \

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

@ -28,6 +28,8 @@ REQUIRES=xpcom raptor pref
DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
CPPSRCS= \
nsTitleFrame.cpp \
nsTitledBoxFrame.cpp \
nsFrameNavigator.cpp \
nsRepeatService.cpp \
nsToolbarDragListener.cpp \
@ -66,6 +68,8 @@ CPPSRCS= \
$(NULL)
CPP_OBJS= \
.\$(OBJDIR)\nsTitleFrame.obj \
.\$(OBJDIR)\nsTitledBoxFrame.obj \
.\$(OBJDIR)\nsFrameNavigator.obj \
.\$(OBJDIR)\nsRepeatService.obj \
.\$(OBJDIR)\nsToolbarDragListener.obj \

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -41,17 +41,21 @@ class nsBoxDebugInner;
class nsHTMLReflowCommand;
class nsHTMLInfo;
#define NS_FRAME_BOX_SIZE_VALID 0x0001
#define NS_FRAME_BOX_IS_COLLAPSED 0x0002
#define NS_FRAME_BOX_NEEDS_RECALC 0x0004
class nsCalculatedBoxInfo : public nsBoxInfo {
public:
nsSize calculatedSize;
/*
PRBool sizeValid;
PRBool collapsed;
PRBool needsRecalc;
*/
PRInt16 mFlags;
nsCalculatedBoxInfo* next;
nsIFrame* frame;
PRBool prefWidthIntrinsic;
PRBool prefHeightIntrinsic;
PRBool neverReflowed;
};
class nsInfoList
@ -154,17 +158,28 @@ public:
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
NS_IMETHOD InvalidateCache(nsIFrame* aChild);
enum Halignment {
hAlign_Left,
hAlign_Right,
hAlign_Center,
};
enum Valignment {
vAlign_Top,
vAlign_Middle,
vAlign_BaseLine,
vAlign_Bottom,
};
protected:
nsBoxFrame();
virtual void GetRedefinedMinPrefMax(nsIPresContext* aPresContext, nsIFrame* aFrame, nsCalculatedBoxInfo& aSize);
virtual nsresult GetChildBoxInfo(nsIPresContext* aPresContext, const nsHTMLReflowState& aReflowState, nsIFrame* aFrame, nsCalculatedBoxInfo& aSize);
virtual void ComputeChildsNextPosition( nsIFrame* aChild, nscoord& aCurX, nscoord& aCurY, nscoord& aNextX, nscoord& aNextY, const nsSize& aCurrentChildSize, const nsRect& aBoxRect);
virtual void ComputeChildsNextPosition( nsCalculatedBoxInfo* aInfo, nscoord& aCurX, nscoord& aCurY, nscoord& aNextX, nscoord& aNextY, const nsSize& aCurrentChildSize, const nsRect& aBoxRect, nscoord aMaxAscent);
virtual nsresult PlaceChildren(nsIPresContext* aPresContext, nsRect& boxRect);
virtual void ChildResized(nsIFrame* aFrame, nsHTMLReflowMetrics& aDesiredSize, nsRect& aRect, nsCalculatedBoxInfo& aInfo, PRBool* aResized, nscoord& aChangedIndex, PRBool& aFinished, nscoord aIndex, nsString& aReason);
virtual void LayoutChildrenInRect(nsRect& size);
virtual void ChildResized(nsIFrame* aFrame, nsHTMLReflowMetrics& aDesiredSize, nsRect& aRect, nscoord& aMaxAscent, nsCalculatedBoxInfo& aInfo, PRBool* aResized, nscoord& aChangedIndex, PRBool& aFinished, nscoord aIndex, nsString& aReason);
virtual void LayoutChildrenInRect(nsRect& aSize, nscoord& aMaxAscent);
virtual void AddChildSize(nsBoxInfo& aInfo, nsBoxInfo& aChildInfo);
virtual void BoundsCheck(const nsBoxInfo& aBoxInfo, nsRect& aRect);
virtual void InvalidateChildren();
@ -178,10 +193,16 @@ protected:
nsresult GenerateDirtyReflowCommand(nsIPresContext* aPresContext,
nsIPresShell& aPresShell);
// return true if the alignment is horizontal false if vertical
virtual PRBool GetInitialAlignment();
virtual PRBool GetInitialOrientation(PRBool& aIsHorizontal);
virtual PRBool GetInitialHAlignment(Halignment& aHalign);
virtual PRBool GetInitialVAlignment(Valignment& aValign);
virtual PRBool GetInitialAutoStretch(PRBool& aStretch);
virtual PRBool GetDefaultFlex(PRInt32& aFlex);
virtual nsInfoList* GetInfoList();
private:
friend class nsBoxFrameInner;

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

@ -269,7 +269,7 @@ nsDeckFrame::AddChildSize(nsBoxInfo& aInfo, nsBoxInfo& aChildInfo)
void
nsDeckFrame::ComputeChildsNextPosition( nsIFrame* aChild, nscoord& aCurX, nscoord& aCurY, nscoord& aNextX, nscoord& aNextY, const nsSize& aCurrentChildSize, const nsRect& aBoxRect)
nsDeckFrame::ComputeChildsNextPosition(nsCalculatedBoxInfo* aInfo, nscoord& aCurX, nscoord& aCurY, nscoord& aNextX, nscoord& aNextY, const nsSize& aCurrentChildSize, const nsRect& aBoxRect, nscoord aMaxAscent)
{
// let everything layout on top of each other.
aCurX = aNextX = aBoxRect.x;
@ -350,19 +350,19 @@ nsDeckFrame::DidReflow(nsIPresContext* aPresContext,
void
nsDeckFrame::ChildResized(nsIFrame* aFrame, nsHTMLReflowMetrics& aDesiredSize, nsRect& aRect, nsCalculatedBoxInfo& aInfo, PRBool* aResized, nscoord& aChangedIndex, PRBool& aFinished, nscoord aIndex, nsString& aReason)
nsDeckFrame::ChildResized(nsIFrame* aFrame, nsHTMLReflowMetrics& aDesiredSize, nsRect& aRect, nscoord& aMaxAscent, nsCalculatedBoxInfo& aInfo, PRBool* aResized, nscoord& aChangedIndex, PRBool& aFinished, nscoord aIndex, nsString& aReason)
{
if (aDesiredSize.width > aRect.width) {
aRect.width = aDesiredSize.width;
InvalidateChildren();
LayoutChildrenInRect(aRect);
LayoutChildrenInRect(aRect, aMaxAscent);
aReason = "child's width got bigger";
aChangedIndex = aIndex;
aFinished = PR_FALSE;
} else if (aDesiredSize.height > aRect.height) {
aRect.height = aDesiredSize.height;
InvalidateChildren();
LayoutChildrenInRect(aRect);
LayoutChildrenInRect(aRect, aMaxAscent);
aReason = "child's height got bigger";
aChangedIndex = aIndex;
aFinished = PR_FALSE;
@ -370,16 +370,18 @@ nsDeckFrame::ChildResized(nsIFrame* aFrame, nsHTMLReflowMetrics& aDesiredSize, n
}
void
nsDeckFrame::LayoutChildrenInRect(nsRect& size)
nsDeckFrame::LayoutChildrenInRect(nsRect& aGivenSize, nscoord& aMaxAscent)
{
nsInfoList* list = GetInfoList();
nsCalculatedBoxInfo* info = list->GetFirst();
while(info) {
info->calculatedSize.width = size.width;
info->calculatedSize.height = size.height;
info->sizeValid = PR_TRUE;
info->calculatedSize.width = aGivenSize.width;
info->calculatedSize.height = aGivenSize.height;
info->mFlags |= NS_FRAME_BOX_SIZE_VALID;
info = info->next;
}
aMaxAscent = 0;
}

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

@ -83,9 +83,9 @@ public:
protected:
virtual nsIFrame* GetSelectedFrame();
virtual void ComputeChildsNextPosition( nsIFrame* aChild, nscoord& aCurX, nscoord& aCurY, nscoord& aNextX, nscoord& aNextY, const nsSize& aCurrentChildSize, const nsRect& aBoxRect);
virtual void ChildResized(nsIFrame* aFrame, nsHTMLReflowMetrics& aDesiredSize, nsRect& aRect, nsCalculatedBoxInfo& aInfo, PRBool* aResized, nscoord& aChangedIndex, PRBool& aFinished, nscoord aIndex, nsString& aReason);
virtual void LayoutChildrenInRect(nsRect& size);
virtual void ComputeChildsNextPosition( nsCalculatedBoxInfo* aInfo, nscoord& aCurX, nscoord& aCurY, nscoord& aNextX, nscoord& aNextY, const nsSize& aCurrentChildSize, const nsRect& aBoxRect, nscoord aMaxAscent);
virtual void ChildResized(nsIFrame* aFrame, nsHTMLReflowMetrics& aDesiredSize, nsRect& aRect, nscoord& aMaxAscent, nsCalculatedBoxInfo& aInfo, PRBool* aResized, nscoord& aChangedIndex, PRBool& aFinished, nscoord aIndex, nsString& aReason);
virtual void LayoutChildrenInRect(nsRect& aSize, nscoord& aMaxAscent);
virtual void AddChildSize(nsBoxInfo& aInfo, nsBoxInfo& aChildInfo);

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

@ -0,0 +1,320 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
// YY need to pass isMultiple before create called
/*
//#include "nsFormControlFrame.h"
#include "nsHTMLContainerFrame.h"
#include "nsLegendFrame.h"
#include "nsIDOMNode.h"
#include "nsIDOMHTMLFieldSetElement.h"
#include "nsIDOMHTMLLegendElement.h"
//#include "nsIDOMHTMLCollection.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsISupports.h"
#include "nsIAtom.h"
#include "nsIPresContext.h"
#include "nsIHTMLContent.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLParts.h"
#include "nsHTMLAtoms.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsStyleUtil.h"
#include "nsFont.h"
#include "nsCOMPtr.h"
*/
#include "nsCSSRendering.h"
#include "nsIStyleContext.h"
#include "nsBoxFrame.h"
class nsTitledBoxFrame : public nsBoxFrame {
public:
nsTitledBoxFrame();
NS_IMETHOD SetInitialChildList(nsIPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList);
NS_METHOD Paint(nsIPresContext* aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer);
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsString& aResult) const {
return MakeFrameName("GroupBoxFrame", aResult);
}
#endif
NS_IMETHOD Reflow(nsIPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
virtual PRBool GetInitialOrientation(PRBool& aHorizontal) { aHorizontal = PR_FALSE; return PR_TRUE; }
nsIFrame* GetGroupTitle(nsIPresContext* aPresContext, nsRect& aRect);
};
class nsTitledBoxInnerFrame : public nsBoxFrame {
public:
nsTitledBoxInnerFrame() {}
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsString& aResult) const {
return MakeFrameName("TitledBoxFrameInner", aResult);
}
#endif
// we are always flexible
virtual PRBool GetDefaultFlex(PRInt32& aFlex) { aFlex = 1; return PR_TRUE; }
};
nsresult
NS_NewTitledBoxInnerFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
{
NS_PRECONDITION(aNewFrame, "null OUT ptr");
if (nsnull == aNewFrame) {
return NS_ERROR_NULL_POINTER;
}
nsTitledBoxInnerFrame* it = new (aPresShell) nsTitledBoxInnerFrame;
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
*aNewFrame = it;
return NS_OK;
}
nsresult
NS_NewTitledBoxFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
{
NS_PRECONDITION(aNewFrame, "null OUT ptr");
if (nsnull == aNewFrame) {
return NS_ERROR_NULL_POINTER;
}
nsTitledBoxFrame* it = new (aPresShell) nsTitledBoxFrame;
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
*aNewFrame = it;
return NS_OK;
}
nsTitledBoxFrame::nsTitledBoxFrame()
{
}
NS_IMETHODIMP
nsTitledBoxFrame::SetInitialChildList(nsIPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList)
{
// Queue up the frames for the content frame
return nsBoxFrame::SetInitialChildList(aPresContext, nsnull, aChildList);
}
// this is identical to nsHTMLContainerFrame::Paint except for the background and border.
NS_IMETHODIMP
nsTitledBoxFrame::Paint(nsIPresContext* aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer)
{
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
// Paint our background and border
const nsStyleDisplay* disp =
(const nsStyleDisplay*)mStyleContext->GetStyleData(eStyleStruct_Display);
if (disp->mVisible == NS_STYLE_VISIBILITY_VISIBLE && mRect.width && mRect.height) {
PRIntn skipSides = GetSkipSides();
const nsStyleColor* color =
(const nsStyleColor*)mStyleContext->GetStyleData(eStyleStruct_Color);
const nsStyleSpacing* spacing =
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
nsMargin border;
if (!spacing->GetBorder(border)) {
NS_NOTYETIMPLEMENTED("percentage border");
}
nscoord yoff = 0;
nsRect titleRect;
nsIFrame* titleFrame = GetGroupTitle(aPresContext, titleRect);
if (titleFrame) {
// if the border is smaller than the legend. Move the border down
// to be centered on the legend.
const nsStyleSpacing* titleSpacing;
titleFrame->GetStyleData(eStyleStruct_Spacing,
(const nsStyleStruct*&) titleSpacing);
nsMargin titleMargin;
titleSpacing->GetMargin(titleMargin);
titleRect.Inflate(titleMargin);
if (border.top < titleRect.height)
yoff = (titleRect.height - border.top)/2 + titleRect.y;
}
nsRect rect(0, yoff, mRect.width, mRect.height - yoff);
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *color, *spacing, 0, 0);
if (titleFrame) {
// we should probably use PaintBorderEdges to do this but for now just use clipping
// to achieve the same effect.
PRBool clipState;
// draw left side
nsRect clipRect(rect);
clipRect.width = titleRect.x - rect.x;
clipRect.height = border.top;
aRenderingContext.PushState();
aRenderingContext.SetClipRect(clipRect, nsClipCombine_kIntersect, clipState);
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *spacing, mStyleContext, skipSides);
aRenderingContext.PopState(clipState);
// draw right side
clipRect = rect;
clipRect.x = titleRect.x + titleRect.width;
clipRect.width -= (titleRect.x + titleRect.width);
clipRect.height = border.top;
aRenderingContext.PushState();
aRenderingContext.SetClipRect(clipRect, nsClipCombine_kIntersect, clipState);
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *spacing, mStyleContext, skipSides);
aRenderingContext.PopState(clipState);
// draw bottom
clipRect = rect;
clipRect.y += border.top;
clipRect.height = mRect.height - (yoff + border.top);
aRenderingContext.PushState();
aRenderingContext.SetClipRect(clipRect, nsClipCombine_kIntersect, clipState);
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *spacing, mStyleContext, skipSides);
aRenderingContext.PopState(clipState);
} else {
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
aDirtyRect, nsRect(0,0,mRect.width, mRect.height), *spacing, mStyleContext, skipSides);
}
}
}
PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
#ifdef DEBUG
if ((NS_FRAME_PAINT_LAYER_DEBUG == aWhichLayer) && GetShowFrameBorders()) {
nsIView* view;
GetView(aPresContext, &view);
if (nsnull != view) {
aRenderingContext.SetColor(NS_RGB(0,0,255));
}
else {
aRenderingContext.SetColor(NS_RGB(255,0,0));
}
aRenderingContext.DrawRect(0, 0, mRect.width, mRect.height);
}
#endif
return NS_OK;
}
nsIFrame*
nsTitledBoxFrame::GetGroupTitle(nsIPresContext* aPresContext, nsRect& aTitleRect)
{
// if we only have one child fail
nsIFrame* frame = mFrames.FirstChild();
nsIFrame* next = nsnull;
frame->GetNextSibling(&next);
if (!next)
return nsnull;
// if we have more than one child. The first is our baby.
// then get the first child inside.
nsIFrame* child;
frame->FirstChild(aPresContext, nsnull, &child);
if (child) {
// convert to our coordinates.
nsRect parentRect;
frame->GetRect(parentRect);
child->GetRect(aTitleRect);
aTitleRect.x += parentRect.x;
aTitleRect.y += parentRect.y;
}
return child;
}
NS_IMETHODIMP
nsTitledBoxFrame::Reflow(nsIPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
if (aReflowState.mComputedBorderPadding.top != 0)
{
nsHTMLReflowState newState(aReflowState);
if (newState.mComputedHeight != NS_INTRINSICSIZE)
newState.mComputedHeight += aReflowState.mComputedBorderPadding.top;
// remove the border from border padding
((nsMargin&)newState.mComputedBorderPadding).top = 0;
((nsMargin&)newState.mComputedPadding).top = 0;
// reflow us again with the correct values.
return Reflow(aPresContext, aDesiredSize, newState, aStatus);
}
return nsBoxFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
}

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

@ -45,6 +45,7 @@ public:
nsSize minSize;
nsSize maxSize;
PRInt32 flex;
nscoord ascent;
nsBoxInfo();
virtual void Clear();

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

@ -171,16 +171,11 @@ nsMenuPopupFrame::Init(nsIPresContext* aPresContext,
}
PRBool
nsMenuPopupFrame::GetInitialAlignment()
nsMenuPopupFrame::GetInitialOrientation(PRBool& aIsHorizontal)
{
// by default we are vertical unless horizontal is specifically specified
nsString value;
mContent->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::align, value);
if (value.EqualsIgnoreCase("horizontal"))
return PR_TRUE;
else
return PR_FALSE;
// by default we are vertical
aIsHorizontal = PR_FALSE;
return nsBoxFrame::GetInitialOrientation(aIsHorizontal);
}
void

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

@ -130,7 +130,7 @@ public:
protected:
// return true if the alignment is horizontal false if vertical
virtual PRBool GetInitialAlignment();
virtual PRBool GetInitialOrientation(PRBool& aIsHorizontal);
// given x,y in client coordinates, compensate for nested documents like framesets.
void AdjustClientXYForNestedDocuments ( nsIDOMXULDocument* inPopupDoc, nsIPresShell* inPopupShell,

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

@ -1016,7 +1016,7 @@ NS_IMETHODIMP_(void) nsSliderFrame::Notify(nsITimer *timer)
if (thumbRect.y < mClickPoint.y)
stop = PR_TRUE;
} else {
if (thumbRect.y + thumbRect.width > mClickPoint.y)
if (thumbRect.y + thumbRect.height > mClickPoint.y)
stop = PR_TRUE;
}
}

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

@ -343,7 +343,9 @@ nsSplitterFrame::Init(nsIPresContext* aPresContext,
nsHTMLContainerFrame::CreateViewForFrame(aPresContext,this,aContext,PR_TRUE);
nsIView* view;
GetView(aPresContext, &view);
#if 1
// currently this only works on win32
#ifndef WIN32
view->SetContentTransparency(PR_TRUE);
view->SetZIndex(kMaxZ);
/*
@ -375,7 +377,7 @@ nsSplitterFrame::Init(nsIPresContext* aPresContext,
}
PRBool
nsSplitterFrame::GetInitialAlignment()
nsSplitterFrame::GetInitialOrientation(PRBool& aIsHorizontal)
{
// find the box we are in
nsIFrame* box = nsnull;
@ -385,15 +387,10 @@ nsSplitterFrame::GetInitialAlignment()
if (box == nsnull)
nsScrollbarButtonFrame::GetParentWithTag(nsXULAtoms::window, this, box);
// see if the box is horizontal or vertical
// see if the box is horizontal or vertical we are the opposite
if (box) {
nsCOMPtr<nsIContent> content;
box->GetContent(getter_AddRefs(content));
nsString value;
content->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::align, value);
if (value.EqualsIgnoreCase("vertical"))
return PR_TRUE;
aIsHorizontal = !((nsBoxFrame*)box)->IsHorizontal();
return PR_TRUE;
}
return PR_FALSE;

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

@ -95,8 +95,7 @@ public:
NS_IMETHOD GetFrameForPoint(nsIPresContext* aPresContext, const nsPoint& aPoint, nsIFrame** aFrame);
// return true if the alignment is horizontal false if vertical
virtual PRBool GetInitialAlignment();
virtual PRBool GetInitialOrientation(PRBool& aIsHorizontal);
private:

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

@ -0,0 +1,92 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
// YY need to pass isMultiple before create called
#include "nsTitleFrame.h"
/*
#include "nsTitleFrame.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsISupports.h"
#include "nsIAtom.h"
#include "nsIHTMLContent.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLParts.h"
#include "nsHTMLAtoms.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsStyleUtil.h"
#include "nsFont.h"
#include "nsFormControlFrame.h"
*/
static NS_DEFINE_IID(kTitleFrameCID, NS_TITLE_FRAME_CID);
nsresult
NS_NewTitleFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
{
NS_PRECONDITION(aNewFrame, "null OUT ptr");
if (nsnull == aNewFrame) {
return NS_ERROR_NULL_POINTER;
}
nsTitleFrame* it = new (aPresShell) nsTitleFrame;
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
*aNewFrame = it;
return NS_OK;
}
nsTitleFrame::nsTitleFrame()
{
}
nsTitleFrame::~nsTitleFrame()
{
}
// Frames are not refcounted, no need to AddRef
NS_IMETHODIMP
nsTitleFrame::QueryInterface(REFNSIID aIID, void** aInstancePtrResult)
{
NS_PRECONDITION(nsnull != aInstancePtrResult, "null pointer");
if (nsnull == aInstancePtrResult) {
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(kTitleFrameCID)) {
*aInstancePtrResult = (void*) ((nsTitleFrame*)this);
return NS_OK;
}
return nsBoxFrame::QueryInterface(aIID, aInstancePtrResult);
}
#ifdef NS_DEBUG
NS_IMETHODIMP
nsTitleFrame::GetFrameName(nsString& aResult) const
{
return MakeFrameName("Title", aResult);
}
#endif

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

@ -0,0 +1,320 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
// YY need to pass isMultiple before create called
/*
//#include "nsFormControlFrame.h"
#include "nsHTMLContainerFrame.h"
#include "nsLegendFrame.h"
#include "nsIDOMNode.h"
#include "nsIDOMHTMLFieldSetElement.h"
#include "nsIDOMHTMLLegendElement.h"
//#include "nsIDOMHTMLCollection.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsISupports.h"
#include "nsIAtom.h"
#include "nsIPresContext.h"
#include "nsIHTMLContent.h"
#include "nsHTMLIIDs.h"
#include "nsHTMLParts.h"
#include "nsHTMLAtoms.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsStyleUtil.h"
#include "nsFont.h"
#include "nsCOMPtr.h"
*/
#include "nsCSSRendering.h"
#include "nsIStyleContext.h"
#include "nsBoxFrame.h"
class nsTitledBoxFrame : public nsBoxFrame {
public:
nsTitledBoxFrame();
NS_IMETHOD SetInitialChildList(nsIPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList);
NS_METHOD Paint(nsIPresContext* aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer);
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsString& aResult) const {
return MakeFrameName("GroupBoxFrame", aResult);
}
#endif
NS_IMETHOD Reflow(nsIPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
virtual PRBool GetInitialOrientation(PRBool& aHorizontal) { aHorizontal = PR_FALSE; return PR_TRUE; }
nsIFrame* GetGroupTitle(nsIPresContext* aPresContext, nsRect& aRect);
};
class nsTitledBoxInnerFrame : public nsBoxFrame {
public:
nsTitledBoxInnerFrame() {}
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsString& aResult) const {
return MakeFrameName("TitledBoxFrameInner", aResult);
}
#endif
// we are always flexible
virtual PRBool GetDefaultFlex(PRInt32& aFlex) { aFlex = 1; return PR_TRUE; }
};
nsresult
NS_NewTitledBoxInnerFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
{
NS_PRECONDITION(aNewFrame, "null OUT ptr");
if (nsnull == aNewFrame) {
return NS_ERROR_NULL_POINTER;
}
nsTitledBoxInnerFrame* it = new (aPresShell) nsTitledBoxInnerFrame;
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
*aNewFrame = it;
return NS_OK;
}
nsresult
NS_NewTitledBoxFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame)
{
NS_PRECONDITION(aNewFrame, "null OUT ptr");
if (nsnull == aNewFrame) {
return NS_ERROR_NULL_POINTER;
}
nsTitledBoxFrame* it = new (aPresShell) nsTitledBoxFrame;
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
*aNewFrame = it;
return NS_OK;
}
nsTitledBoxFrame::nsTitledBoxFrame()
{
}
NS_IMETHODIMP
nsTitledBoxFrame::SetInitialChildList(nsIPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList)
{
// Queue up the frames for the content frame
return nsBoxFrame::SetInitialChildList(aPresContext, nsnull, aChildList);
}
// this is identical to nsHTMLContainerFrame::Paint except for the background and border.
NS_IMETHODIMP
nsTitledBoxFrame::Paint(nsIPresContext* aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer)
{
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
// Paint our background and border
const nsStyleDisplay* disp =
(const nsStyleDisplay*)mStyleContext->GetStyleData(eStyleStruct_Display);
if (disp->mVisible == NS_STYLE_VISIBILITY_VISIBLE && mRect.width && mRect.height) {
PRIntn skipSides = GetSkipSides();
const nsStyleColor* color =
(const nsStyleColor*)mStyleContext->GetStyleData(eStyleStruct_Color);
const nsStyleSpacing* spacing =
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
nsMargin border;
if (!spacing->GetBorder(border)) {
NS_NOTYETIMPLEMENTED("percentage border");
}
nscoord yoff = 0;
nsRect titleRect;
nsIFrame* titleFrame = GetGroupTitle(aPresContext, titleRect);
if (titleFrame) {
// if the border is smaller than the legend. Move the border down
// to be centered on the legend.
const nsStyleSpacing* titleSpacing;
titleFrame->GetStyleData(eStyleStruct_Spacing,
(const nsStyleStruct*&) titleSpacing);
nsMargin titleMargin;
titleSpacing->GetMargin(titleMargin);
titleRect.Inflate(titleMargin);
if (border.top < titleRect.height)
yoff = (titleRect.height - border.top)/2 + titleRect.y;
}
nsRect rect(0, yoff, mRect.width, mRect.height - yoff);
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *color, *spacing, 0, 0);
if (titleFrame) {
// we should probably use PaintBorderEdges to do this but for now just use clipping
// to achieve the same effect.
PRBool clipState;
// draw left side
nsRect clipRect(rect);
clipRect.width = titleRect.x - rect.x;
clipRect.height = border.top;
aRenderingContext.PushState();
aRenderingContext.SetClipRect(clipRect, nsClipCombine_kIntersect, clipState);
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *spacing, mStyleContext, skipSides);
aRenderingContext.PopState(clipState);
// draw right side
clipRect = rect;
clipRect.x = titleRect.x + titleRect.width;
clipRect.width -= (titleRect.x + titleRect.width);
clipRect.height = border.top;
aRenderingContext.PushState();
aRenderingContext.SetClipRect(clipRect, nsClipCombine_kIntersect, clipState);
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *spacing, mStyleContext, skipSides);
aRenderingContext.PopState(clipState);
// draw bottom
clipRect = rect;
clipRect.y += border.top;
clipRect.height = mRect.height - (yoff + border.top);
aRenderingContext.PushState();
aRenderingContext.SetClipRect(clipRect, nsClipCombine_kIntersect, clipState);
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *spacing, mStyleContext, skipSides);
aRenderingContext.PopState(clipState);
} else {
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
aDirtyRect, nsRect(0,0,mRect.width, mRect.height), *spacing, mStyleContext, skipSides);
}
}
}
PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
#ifdef DEBUG
if ((NS_FRAME_PAINT_LAYER_DEBUG == aWhichLayer) && GetShowFrameBorders()) {
nsIView* view;
GetView(aPresContext, &view);
if (nsnull != view) {
aRenderingContext.SetColor(NS_RGB(0,0,255));
}
else {
aRenderingContext.SetColor(NS_RGB(255,0,0));
}
aRenderingContext.DrawRect(0, 0, mRect.width, mRect.height);
}
#endif
return NS_OK;
}
nsIFrame*
nsTitledBoxFrame::GetGroupTitle(nsIPresContext* aPresContext, nsRect& aTitleRect)
{
// if we only have one child fail
nsIFrame* frame = mFrames.FirstChild();
nsIFrame* next = nsnull;
frame->GetNextSibling(&next);
if (!next)
return nsnull;
// if we have more than one child. The first is our baby.
// then get the first child inside.
nsIFrame* child;
frame->FirstChild(aPresContext, nsnull, &child);
if (child) {
// convert to our coordinates.
nsRect parentRect;
frame->GetRect(parentRect);
child->GetRect(aTitleRect);
aTitleRect.x += parentRect.x;
aTitleRect.y += parentRect.y;
}
return child;
}
NS_IMETHODIMP
nsTitledBoxFrame::Reflow(nsIPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
if (aReflowState.mComputedBorderPadding.top != 0)
{
nsHTMLReflowState newState(aReflowState);
if (newState.mComputedHeight != NS_INTRINSICSIZE)
newState.mComputedHeight += aReflowState.mComputedBorderPadding.top;
// remove the border from border padding
((nsMargin&)newState.mComputedBorderPadding).top = 0;
((nsMargin&)newState.mComputedPadding).top = 0;
// reflow us again with the correct values.
return Reflow(aPresContext, aDesiredSize, newState, aStatus);
}
return nsBoxFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
}

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

@ -626,7 +626,7 @@ nsTitledButtonFrame::LayoutTitleAndImage(nsIPresContext* aPresContext,
void
nsTitledButtonFrame::GetTextSize(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext,
const nsString& aString, nsSize& aSize)
const nsString& aString, nsSize& aSize, nscoord& aAscent)
{
const nsStyleFont* fontStyle = (const nsStyleFont*)mStyleContext->GetStyleData(eStyleStruct_Font);
@ -638,6 +638,7 @@ nsTitledButtonFrame::GetTextSize(nsIPresContext* aPresContext, nsIRenderingConte
fontMet->GetHeight(aSize.height);
aRenderingContext.SetFont(fontMet);
aRenderingContext.GetWidth(aString, aSize.width);
fontMet->GetMaxAscent(aAscent);
}
void
@ -987,16 +988,19 @@ nsTitledButtonFrame::GetDesiredSize(nsIPresContext* aPresContext,
// if either the width or the height was not computed use our intrinsic size
if (aReflowState.mComputedWidth != NS_INTRINSICSIZE)
//if (aReflowState.mComputedWidth > info.minSize.width)
aDesiredSize.width = aReflowState.mComputedWidth;
//else
// aDesiredSize.width = info.minSize.width;
if (aReflowState.mComputedHeight != NS_INTRINSICSIZE)
//if (aReflowState.mComputedHeight > info.minSize.height)
if (aReflowState.mComputedHeight != NS_INTRINSICSIZE) {
aDesiredSize.height = aReflowState.mComputedHeight;
//else
// aDesiredSize.height = info.minSize.height;
nscoord descent = info.prefSize.height - info.ascent;
aDesiredSize.ascent = aDesiredSize.height - descent;
if (aDesiredSize.ascent < 0)
aDesiredSize.ascent = 0;
} else {
aDesiredSize.ascent = info.ascent;
}
}
@ -1451,8 +1455,11 @@ nsTitledButtonFrame::GetBoxInfo(nsIPresContext* aPresContext, const nsHTMLReflow
// depending on the type of alignment add in the space for the text
nsSize size;
nscoord ascent = 0;
GetTextSize(aPresContext, *aReflowState.rendContext,
mTitle, size);
mTitle, size, ascent);
aSize.ascent = ascent;
switch (mAlign) {
case NS_SIDE_TOP:
@ -1510,6 +1517,8 @@ nsTitledButtonFrame::GetBoxInfo(nsIPresContext* aPresContext, const nsHTMLReflow
aSize.minSize.width += focusBorder.left + focusBorder.right;
aSize.minSize.height += focusBorder.top + focusBorder.bottom;
ascent += focusBorder.top;
return NS_OK;
}

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

@ -133,7 +133,7 @@ protected:
virtual void CalculateTitleForWidth(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, nscoord aWidth);
virtual void GetTextSize(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, const nsString& aString, nsSize& aSize);
virtual void GetTextSize(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, const nsString& aString, nsSize& aSize, nscoord& aAscent);
virtual void SetDisabled(nsAutoString aDisabled);

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

@ -109,16 +109,11 @@ nsToolboxFrame :: nsToolboxFrame ( )
PRBool
nsToolboxFrame::GetInitialAlignment()
nsToolboxFrame::GetInitialOrientation(PRBool& aIsHorizontal)
{
// by default we are vertical unless horizontal is specifically specified
nsString value;
mContent->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::align, value);
if (value.EqualsIgnoreCase("horizontal"))
return PR_TRUE;
else
return PR_FALSE;
// by default we are vertical.
aIsHorizontal = PR_FALSE;
return nsBoxFrame::GetInitialOrientation(aIsHorizontal);
}
//
// nsToolboxFrame dstr

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

@ -128,7 +128,7 @@ protected:
nsToolboxFrame();
virtual ~nsToolboxFrame();
virtual PRBool GetInitialAlignment();
virtual PRBool GetInitialOrientation(PRBool& aIsHorizontal);
virtual void UpdateStyles(nsIPresContext* aPresContext);
virtual void CalculateGrippies(nsIPresContext* aPresContext);

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

@ -99,6 +99,11 @@ XUL_ATOM(box, "box")
XUL_ATOM(flex, "flex")
XUL_ATOM(spring, "spring")
XUL_ATOM(orient, "orient")
XUL_ATOM(autostretch, "autostretch")
XUL_ATOM(titledbox, "titledbox")
XUL_ATOM(title, "title")
XUL_ATOM(titledboxContentPseudo, ":titledbox-content")
XUL_ATOM(deck, "deck")
XUL_ATOM(tabcontrol, "tabcontrol")

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

@ -35,8 +35,8 @@
<titledbutton class="right-header-text" value="&rHeader;"/>
</box>
<html:fieldset style="width: 100%;">
<html:div class="hspace-both">
<titledbox orient="vertical">
<html:div>
<html:input type="checkbox" id="advancedAlwaysLoadImages"
prefdefval="true"
pref="true" preftype="bool" prefstring="advanced.always_load_images"/>
@ -44,7 +44,7 @@
&autoLoadImgCheck.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input type="checkbox" id="advancedJavaAllow"
prefdefval="true"
pref="true" preftype="bool" prefstring="advanced.java.allow"/>
@ -52,7 +52,7 @@
&enbJavaCheck.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input type="checkbox" id="javascriptEnabled"
prefdefval="true"
pref="true" preftype="bool" prefstring="javascript.enabled"/>
@ -60,7 +60,7 @@
&enbJsCheck.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input type="checkbox" id="javascriptAllowMailNews"
prefdefval="true"
pref="true" preftype="bool" prefstring="javascript.allow.mailnews" />
@ -68,7 +68,7 @@
&enbJsCheck.labelforMailNNews;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input type="checkbox" id="CSSAllow"
prefdefval="true"
pref="true" preftype="bool" prefstring="css.allow" />
@ -76,7 +76,7 @@
&enbCssCheck.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input type="checkbox" id="advancedMailFTP"
prefdefval="true"
pref="true" preftype="bool" prefstring="advanced.mailftp"/>
@ -84,7 +84,7 @@
&sendAddFtpCheck.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input type="checkbox" id="signonRememberSignons"
prefdefval="true"
pref="true" preftype="bool" prefstring="signon.rememberSignons" />
@ -92,7 +92,7 @@
&remSignCheck.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input type="checkbox" id="walletCaptureForms"
prefdefval="true"
pref="true" preftype="bool" prefstring="wallet.captureForms" />
@ -100,6 +100,6 @@
&remWalletCheck.label;
</html:label>
</html:div>
</html:fieldset>
</titledbox>
</window>

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

@ -37,8 +37,8 @@
<titledbutton class="right-header-text" value="&rHeader;"/>
</box>
<html:fieldset style="width: 100%;">
<html:legend align="left">&onStartLegend.label;</html:legend>
<titledbox orient="vertical">
<title><text value="&onStartLegend.label;"/></title>
<html:div>
<html:input type="checkbox" pref="true" preftype="bool"
prefstring="general.startup.browser" id="generalStartupBrowser"/>
@ -60,10 +60,10 @@
&compCheck.label;
</html:label>
</html:div>
</html:fieldset>
</titledbox>
<html:fieldset style="width: 100%;">
<html:legend align="left">&showToolsLegend.label;</html:legend>
<titledbox orient="vertical">
<title><text value="&showToolsLegend.label;"/></title>
<html:div>
<html:input name="showtoolbar" type="radio" pref="true" preftype="int"
prefindex="2" prefstring="browser.chrome.toolbar_style"
@ -88,6 +88,6 @@
&textonlyRadio.label;
</html:label>
</html:div>
</html:fieldset>
<spring flex="100%"/>
</titledbox>
<spring flex="1"/>
</window>

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

@ -23,7 +23,7 @@
<?xml-stylesheet href="chrome://pref/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-cache.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&title.label;"
@ -39,27 +39,67 @@
<titledbutton class="right-header-text" value="&rHeader;"/>
</box>
<html:fieldset style="width: 100%">
<box align="vertical" style="width: 93%;" flex="100%" class="hspace-both">
<titledbox orient="vertical">
<box orient="vertical" flex="1" >
<html:div>&cachePara;</html:div>
<box orient="horizontal" flex="1" autostretch="never" valign="middle" class="vertical-gap">
<text value="&memCache;" style="width: 120px" align="right"/>
<box orient="vertical">
<html:input style="margin-left: 5px; margin-right: 5px" name="disk" type="text" size="5" id="browserCacheMemoryCacheSize"
pref="true" preftype="int" prefstring="browser.cache.memory_cache_size"/>
</box>
<text value="&kbyes;"/>
<box orient="horizontal" align="right" flex="1" autostretch="never">
<titledbutton class="dialog push" name="clearm" value="&clearMemcacheButton.label;" />
</box>
</box>
<box orient="horizontal" flex="1" autostretch="never" valign="middle">
<text value="&diskCache;" style="width: 120px" align="right"/>
<box orient="vertical">
<html:input style="margin-left: 5px; margin-right: 5px" name="disk" type="text" size="5" id="browserCacheDiskCacheSize"
pref="true" preftype="int" prefstring="browser.cache.disk_cache_size" />
</box>
<text value="&kbyes;"/>
<box orient="horizontal" align="right" flex="1" autostretch="never">
<titledbutton class="dialog push" name="clearm" value="&clearDiskcacheButton.label;" />
</box>
</box>
<box orient="horizontal" flex="1" autostretch="never" valign="middle">
<text value="&diskCacheFolder;" style="width: 120px" align="right"/>
<box orient="vertical" flex="1">
<html:input style="margin-left: 5px; margin-right: 5px" name="disk" type="text" id="browserCacheDirectory"
pref="true" preftype="string" prefstring="browser.cache.directory"/>
</box>
</box>
<box orient="horizontal">
<spring flex="1"/>
<titledbutton class="dialog push" value="&chooseFolder;" align="left" onclick="prefCacheSelectFolder()"/>
</box>
<!-- old version
<spring style="height: 15px;"/>
<box align="horizontal" flex="100%">
<box align="vertical">
<box align="horizontal">
<box orient="horizontal" flex="100%">
<box orient="vertical">
<box orient="horizontal">
<spring flex="100%"/>
<html:div class="spreadlabel" style="padding-top: 2px; padding-bottom: 9px;">&memCache;</html:div>
</box>
<box align="horizontal">
<box orient="horizontal">
<spring flex="100%"/>
<html:div class="spreadlabel" style="padding-top: 2px; padding-bottom: 9px;">&diskCache;</html:div>
</box>
<box align="horizontal">
<box orient="horizontal">
<spring flex="100%"/>
<html:div class="spreadlabel" style="padding-top: 2px; padding-bottom: 9px;">&diskCacheFolder;</html:div>
</box>
</box>
<box align="vertical" flex="100%">
<box align="horizontal">
<box orient="vertical" flex="100%">
<box orient="horizontal">
<html:div>
<html:input name="disk" type="text" size="5" id="browserCacheMemoryCacheSize"
pref="true" preftype="int" prefstring="browser.cache.memory_cache_size"/>
@ -68,7 +108,7 @@
<spring flex="100%"/>
<titledbutton class="dialog push" name="clearm" value="&clearMemcacheButton.label;" />
</box>
<box align="horizontal">
<box orient="horizontal">
<html:div>
<html:input name="disk" type="text" size="5" id="browserCacheDiskCacheSize"
pref="true" preftype="int" prefstring="browser.cache.disk_cache_size" />
@ -77,40 +117,40 @@
<spring flex="100%"/>
<titledbutton class="dialog push" name="clearm" value="&clearDiskcacheButton.label;" />
</box>
<box align="vertical" flex="100%">
<box align="horizontal" style="padding-right: 3px;">
<box orient="vertical" flex="100%">
<box orient="horizontal" style="padding-right: 3px;">
<html:input name="disk" type="text" id="browserCacheDirectory"
pref="true" preftype="string" prefstring="browser.cache.directory" flex="100%"/>
</box>
</box>
<box align="horizontal">
<spring flex="100%"/>
<box orient="horizontal">
<spring flex="1"/>
<titledbutton class="dialog push" value="&chooseFolder;" align="left" onclick="prefCacheSelectFolder()"/>
</box>
</box>
</box>
</box-->
</box>
<spring style="height: 45px;"/>
</html:fieldset>
</titledbox>
<html:fieldset>
<html:div class="hspace-both">&docCache;</html:div>
<box align="vertical" style="width: 100%;">
<html:div class="hspace-both vspace">
<titledbox orient="vertical">
<text value="&docCache;" align="left"/>
<box orient="vertical">
<html:div class="vertical-gap">
<html:input name="cacheDocFreq" type="radio" id="browserCacheCheckDocFrequency0"
pref="true" preftype="int" prefindex="0" prefstring="browser.cache.check_doc_frequency"/>
<html:label for="browserCacheCheckDocFrequency0" accesskey="&oncePsessionRadio.accesskey;" tabindex="0">
&oncePsessionRadio.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input name="cacheDocFreq" type="radio" id="browserCacheCheckDocFrequency1"
pref="true" preftype="int" prefindex="1" prefstring="browser.cache.check_doc_frequency"/>
<html:label for="browserCacheCheckDocFrequency1" accesskey="&everyTimeRadio.accesskey;" tabindex="0">
&everyTimeRadio.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input name="cacheDocFreq" type="radio" id="browserCacheCheckDocFrequency2"
pref="true" preftype="int" prefindex="2" prefstring="browser.cache.check_doc_frequency"/>
<html:label for="browserCacheCheckDocFrequency2" accesskey="&neverRadio.accesskey;" tabindex="0">
@ -118,7 +158,7 @@
</html:label>
</html:div>
</box>
</html:fieldset>
</titledbox>
</window>

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

@ -24,7 +24,7 @@
<?xml-stylesheet href="chrome://pref/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-colors.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
title="&window.title;" align="vertical"
@ -41,11 +41,11 @@
<box align="horizontal">
<!-- back and foreground colors -->
<html:fieldset flex="10%" style="width: 100%">
<html:legend align="left"> &color;</html:legend>
<box style="width: 85%" class="hspace-both">
<titledbox orient="vertical" flex="1">
<title><html:div> &color;</html:div></title>
<box>
<html:label>&text;</html:label>
<spring flex="100%"/>
<spring flex="1"/>
<menu id="foregroundtextmenu" allowevents="true" class="colorpicker">
<html:div id="browserForegroundColorDiv" style="width:30px; background-color:white"/>
<titledbutton class="popup" align="right"/>
@ -56,12 +56,12 @@
<html:input type="hidden" id="foregroundText"
pref="true" preftype="color" prefstring="browser.foreground_color"/>
</box>
<box style="width: 85%" class="hspace-both">
<box>
<html:label>&background;</html:label>
<spring flex="100%"/>
<spring flex="1"/>
<menu id="backgroundmenu" allowevents="true" class="colorpicker">
<html:div id="browserBackgroundColorDiv" style="width:30px; background-color:white"/>
<spring flex="100%"/>
<spring flex="1"/>
<titledbutton class="popup" align="right"/>
<menupopup id="backgroundMenuPopup">
<colorpicker allowevents="true" id="backgroundColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'background', false);"/>
@ -77,18 +77,18 @@
&useWinColorsCheck.label;
</html:label>
</html:div>
</html:fieldset>
</titledbox>
<!-- links -->
<html:fieldset flex="100%" style="width: 100%">
<html:legend align="left">&links;</html:legend>
<box style="width: 85%" class="hspace-both">
<titledbox flex="1" orient="vertical">
<title><text value="&links;"/></title>
<box class="hspace-both">
<html:label>&unvisit;</html:label>
<spring flex="100%"/>
<spring flex="1"/>
<menu id="unvisitedlinkmenu" allowevents="true" class="colorpicker">
<html:div id="browserUnvisitedLinksColorDiv" style="width:30px; background-color:white"/>
<spring flex="100%"/>
<titledbutton class="popup" align="right" flex="100%"/>
<spring flex="1"/>
<titledbutton class="popup" align="right" flex="1"/>
<menupopup id="unvisitedLinksMenuPopup">
<colorpicker allowevents="true" id="unvisitedLinksColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'background', false);"/>
</menupopup>
@ -96,12 +96,12 @@
<html:input type="hidden" id="unvisitedLinks"
pref="true" preftype="string" prefstring="browser.anchor_color"/>
</box>
<box style="width: 85%" class="hspace-both">
<box class="hspace-both">
<html:label>&visit;</html:label>
<spring flex="100%"/>
<spring flex="1"/>
<menu id="visitedlinkmenu" allowevents="true" class="colorpicker">
<html:div id="browserVisitedLinksColorDiv" style="width:30px; background-color:white"/>
<spring flex="100%"/>
<spring flex="1"/>
<titledbutton class="popup" align="right"/>
<menupopup id="visitedLinksMenuPopup">
<colorpicker allowevents="true" id="visitedLinksColorpicker" palettename="standard" onclick="setColorWell(this.parentNode.parentNode, 'background', false);"/>
@ -117,24 +117,25 @@
&underLinksCheck.label;
</html:label>
</html:div>
</html:fieldset>
</titledbox>
</box>
<html:fieldset>
<html:legend>&someProvColors;</html:legend>
<html:div class="hspace-both">
<titledbox orient="vertical">
<title><text value="&someProvColors;"/></title>
<html:div>
<html:input type="radio" id="browserUseDocumentColors0" name="browserUseDocumentColors"
pref="true" preftype="bool" prefindex="true" prefstring="browser.use_document_colors"/>
<html:label for="browserUseDocumentColors0" accesskey="&alwaysUseDocColors.accesskey;" tabindex="0">
&alwaysUseDocColors.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div>
<html:input type="radio" id="browserUseDocumentColors1" name="browserUseDocumentColors"
pref="true" preftype="bool" prefindex="false" prefstring="browser.use_document_colors"/>
<html:label for="browserUseDocumentColors1" accesskey="&ignoreDocColors.label;" tabindex="0">
&ignoreDocColors.label;
</html:label>
</html:div>
</html:fieldset>
</titledbox>
</window>

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

@ -25,7 +25,7 @@
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-composer.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&title.label;"
@ -40,19 +40,18 @@
<titledbutton class="right-header-text" value="&rHeader;"/>
</box>
<html:fieldset>
<html:div class="hspace-both">
&authorName;
<html:input name="author" type="text" id="editorAuthor"
pref="true" preftype="string" prefstring="editor.author"/>
</html:div>
</html:fieldset>
<titledbox orient="vertical">
<box autostretch="never" valign="middle">
<text value="&authorName;"/>
<html:input class="indent" name="author" type="text" id="editorAuthor"
pref="true" preftype="string" prefstring="editor.author" flex="1"/>
</box>
</titledbox>
<html:fieldset>
<html:legend align="left">&pageColorHeader;</html:legend>
<box class="hspace-both" align="horizontal">
<!-- need to do something BETTER here to accomodate indentation -->
<box align="vertical" flex="100%">
<titledbox orient="vertical">
<title><text value="&pageColorHeader;"/></title>
<box align="horizontal">
<box align="vertical" flex="0">
<box flex="100%">
<html:label>
&NormalText.label;
@ -134,7 +133,7 @@
</box>
</box>
<spring style="width: 7px;"/>
<spring style="width: 7px;"/>
<box align="vertical" flex="100%" id="colorpreview" basestyle="min-height:50px; width: 100%; border: 1px inset #CCCCCC; padding: 5px; " style="min-height:50px; width: 100%; border: 1px inset #CCCCCC; padding: 5px; ">
<html:div id="normaltext"> &NormalText.label; </html:div>
<spring style="height: 7px;"/>
@ -146,14 +145,15 @@
</box>
</box>
<spring style="height: 7px;"/>
<spring/>
<html:div class="hspace-both">
<box>
<spring/>
<!-- clicking this button should reset the colors below to be same as navigator colors -->
<titledbutton class="dialog push" name="" value="&UseNavigatorColor.label;" />
</html:div>
</box>
<spring style="height: 10px;"/>
</html:fieldset>
<spring/>
</titledbox>
</window>

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

@ -23,7 +23,7 @@
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-cookies.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&window.title;"
@ -42,67 +42,53 @@
<titledbutton class="right-header-text" value="&rHeader;"/>
</box>
<html:fieldset>
<html:legend align="left">&cookies;</html:legend>
<html:table width="100%" cellpadding="0" cellspacing="0" class="hspace-both">
<html:tr>
<html:td colspan="2">
<html:div>
&cookieDetails;
</html:div>
<html:br/>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:input name="cookies" type="radio" id="networkCookieBehaviour0"
pref="true" preftype="int" prefindex="0" prefstring="network.cookie.cookieBehavior"/>
</html:td>
<html:td>
<html:label for="networkCookieBehaviour0" accesskey="&accAllCookiesRadio.accesskey;" tabindex="0">
<html:div>&accAllCookiesRadio.label;</html:div>
</html:label>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:input type="radio" name="cookies" id="networkCookieBehaviour1"
pref="true" preftype="int" prefindex="1" prefstring="network.cookie.cookieBehavior"/>
</html:td>
<html:td>
<html:label for="networkCookieBehaviour1" accesskey="&accpOrgCookiesRadio.accesskey;" tabindex="0">
<html:div>&accpOrgCookiesRadio.label;</html:div>
</html:label>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:input type="radio" name="cookies" id="networkCookieBehaviour2"
pref="true" preftype="int" prefindex="2" prefstring="network.cookie.cookieBehavior"/>
</html:td>
<html:td>
<html:label for="networkCookieBehaviour2" accesskey="&disCookRadio.accesskey;" tabindex="0">
<html:div>&disCookRadio.label;</html:div>
</html:label>
</html:td>
</html:tr>
<html:tr>
<html:td/>
<html:td>
<html:input type="checkbox" id="networkCookieWarnAboutCookies"
pref="true" preftype="bool" prefstring="network.cookie.warnAboutCookies"/>
<html:label for="networkCookieWarnAboutCookies" accesskey="&warnCookCheck.accesskey;" tabindex="0">
<html:div>&warnCookCheck.label;</html:div>
</html:label>
</html:td>
</html:tr>
</html:table>
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<spring flex="100%"/>
<titledbox orient="vertical">
<title><text value="&cookies;"/></title>
<html:div>&cookieDetails;</html:div>
<spring class="vgap"/>
<html:div>
<html:input name="cookies" type="radio" id="networkCookieBehaviour0"
pref="true" preftype="int" prefindex="0" prefstring="network.cookie.cookieBehavior"/>
<html:label for="networkCookieBehaviour0" accesskey="&accAllCookiesRadio.accesskey;" tabindex="0">
<html:div>&accAllCookiesRadio.label;</html:div>
</html:label>
</html:div>
<html:div>
<html:input type="radio" name="cookies" id="networkCookieBehaviour1"
pref="true" preftype="int" prefindex="1" prefstring="network.cookie.cookieBehavior"/>
<html:label for="networkCookieBehaviour1" accesskey="&accpOrgCookiesRadio.accesskey;" tabindex="0">
<html:div>&accpOrgCookiesRadio.label;</html:div>
</html:label>
</html:div>
<html:div>
<html:input type="radio" name="cookies" id="networkCookieBehaviour2"
pref="true" preftype="int" prefindex="2" prefstring="network.cookie.cookieBehavior"/>
<html:label for="networkCookieBehaviour2" accesskey="&disCookRadio.accesskey;" tabindex="0">
<html:div>&disCookRadio.label;</html:div>
</html:label>
</html:div>
<html:div class="indent-second-label">
<html:input type="checkbox" id="networkCookieWarnAboutCookies"
pref="true" preftype="bool" prefstring="network.cookie.warnAboutCookies"/>
<html:label for="networkCookieWarnAboutCookies" accesskey="&warnCookCheck.accesskey;" tabindex="0">
<html:div>&warnCookCheck.label;</html:div>
</html:label>
</html:div>
<box align="horizontal" flex="1">
<spring flex="1"/>
<titledbutton value="&viewCookies.label;" class="dialog push" onclick="viewCookies();"/>
</box>
<spring style="height: 40px;"/>
</html:fieldset>
</titledbox>
</window>

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

@ -37,9 +37,8 @@
</box>
<!-- Temporary hack to turn on gfx-rendered widgets -->
<box align="vertical" style="width: 100%;">
<html:fieldset style="width: 100%;">
<html:legend align="left">&widgetRendering.label;</html:legend>
<titledbox orient="vertical">
<title><text value="&widgetRendering.label;"/></title>
<html:div>
<html:input type="checkbox" id="nglayoutWidgetGFXScrollbars"
@ -65,13 +64,19 @@
</html:label>
</html:div>
</html:fieldset>
</box>
<html:div>
<html:input type="checkbox" id="debugXULBoxes"
pref="true" preftype="bool" prefstring="xul.debug.box"/>
<html:label for="debugXULBoxes" accesskey="n" tabindex="0">
&debugXULBox.label;
</html:label>
</html:div>
</titledbox>
<!-- Event Debugging -->
<box align="vertical" style="width: 100%;">
<html:fieldset style="width: 100%;">
<html:legend align="left">&debugEventDebugging.label;</html:legend>
<titledbox orient="vertical">
<title><text value="&debugEventDebugging.label;"/></title>
<html:div>
<html:input type="checkbox" id="nglayoutDebugPaintFlashing"
pref="true" preftype="bool" prefstring="nglayout.debug.paint_flashing"/>
@ -120,12 +125,10 @@
</html:label>
</html:div>
</html:fieldset>
</box>
</titledbox>
<box align="vertical" style="width: 100%;">
<html:fieldset style="width: 100%;">
<html:legend align="left">&debugMiscellaneous.label;</html:legend>
<titledbox orient="vertical">
<title><text value="&debugMiscellaneous.label;"/></title>
<html:div>
<html:input type="checkbox" id="nglayoutDebugDisableXULCache"
pref="true" preftype="bool" prefstring="nglayout.debug.disable_xul_cache"/>
@ -156,8 +159,7 @@
&debugShowAboutAsStupidModalWindow.label;
</html:label>
</html:div>
</html:fieldset>
</box>
</titledbox>
</window>

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

@ -25,7 +25,7 @@
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-composer.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&title2.label;"
@ -42,7 +42,7 @@
</box>
<!-- Take out Auto-Save; not supported at this time
<html:fieldset>
<titledbox orient="vertical">
<html:div>
<html:input name="autosave" type="checkbox" id="pref:0:int:editor.auto_save" />
<html:label for="pref:0:int:editor.auto_save" accesskey="a" tabindex="0">
@ -53,14 +53,12 @@
&minText;
</html:label>
</html:div>
</html:fieldset>
</titledbox>
-->
<!-- External Editors are not supported at this time
<html:fieldset>
<html:legend align="left">
<html:div>&exterLegend.label;</html:div>
</html:legend>
<titledbox orient="vertical">
<title><text value="&exterLegend.label;"/></title>
<html:input name="htmlSourceEditorCheckbox" type="checkbox" id="pref:0:int:editor.use_html_editor" />
<html:div>
&htmlSource;
@ -78,40 +76,42 @@
<titledbutton class="dialog push" name="" value="&chooseButton.label;" />
</html:div>
</html:fieldset>
</titledbox>
-->
<html:label>
<html:input name="maintainTable" type="checkbox" id="pref:0:int:editor.maintain_table_structure" />
&maintainTableStructure.label;
</html:label>
<html:fieldset>
<html:legend align="left">Key Mappings</html:legend>
<html:div class="hspace-both">
<html:div class="vspace-both">
<html:label>
<html:input name="maintainTable" type="checkbox" id="pref:0:int:editor.maintain_table_structure" />
&maintainTableStructure.label;
</html:label>
</html:div>
<titledbox orient="vertical">
<title><text value="Key Mappings"/></title>
<html:div >
&returnkey.label;
</html:div>
<html:div class="hspace-both">
<html:div class="vertical-gap">
<html:input name="returnkey" type="radio" id="returnkey0"
pref="true" preftype="int" prefindex="0" prefstring="editor.returnkey_mapping"/>
<html:label for="returnkey0" accesskey="" tabindex="0">
&returnkeyradio0.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input name="returnkey" type="radio" id="returnkey1"
pref="true" preftype="int" prefindex="1" prefstring="editor.returnkey_mapping"/>
<html:label for="returnkey1" accesskey="" tabindex="0">
&returnkeyradio1.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input name="returnkey" type="radio" id="returnkey2"
pref="true" preftype="int" prefindex="2" prefstring="editor.returnkey_mapping"/>
<html:label for="returnkey2" accesskey="" tabindex="0">
&returnkeyradio2.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input name="returnkey" type="radio" id="returnkey3"
pref="true" preftype="int" prefindex="3" prefstring="editor.returnkey_mapping"/>
<html:label for="returnkey3" accesskey="" tabindex="0">
@ -121,38 +121,38 @@
<spring style="height: 10px;"/>
<html:div class="hspace-both">
<html:div >
&enterkey.label;
</html:div>
<html:div class="hspace-both">
<html:div class="vertical-gap">
<html:input name="enterkey" type="radio" id="enterkey0"
pref="true" preftype="int" prefindex="0" prefstring="editor.enterkey_mapping"/>
<html:label for="enterkey0" accesskey="" tabindex="0">
&returnkeyradio0.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input name="enterkey" type="radio" id="enterkey1"
pref="true" preftype="int" prefindex="1" prefstring="editor.enterkey_mapping"/>
<html:label for="enterkey1" accesskey="" tabindex="0">
&returnkeyradio1.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input name="enterkey" type="radio" id="enterkey2"
pref="true" preftype="int" prefindex="2" prefstring="editor.enterkey_mapping"/>
<html:label for="enterkey2" accesskey="" tabindex="0">
&returnkeyradio2.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div >
<html:input name="enterkey" type="radio" id="enterkey3"
pref="true" preftype="int" prefindex="3" prefstring="editor.enterkey_mapping"/>
<html:label for="enterkey3" accesskey="" tabindex="0">
&returnkeyradio3.label;
</html:label>
</html:div>
</html:fieldset>
</titledbox>
</window>

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

@ -25,11 +25,11 @@
<?xul-overlay href="chrome://pref/content/fontScalingOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-fonts.dtd" >
<window id="fontPanel"
<window debug="false" id="fontPanel"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
title="&window.title;" align="vertical"
title="&window.title;" orient="vertical"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-fonts' ); else parent.queuedTag = 'pref-fonts';startUp()">
@ -40,10 +40,11 @@
<spring class="header-spring" flex="1"/>
<titledbutton class="right-header-text" value="&rHeader;"/>
</box>
<html:fieldset>
<html:legend>&displayFonts;</html:legend>
<html:table width="100%">
<html:tr>
<titledbox orient="vertical">
<title><html:div>&displayFonts;</html:div></title>
<html:div style="width: 50px; height: 50px">
<html:table>
<html:tr valign="baseline">
<html:td>&fontsFor.select;</html:td>
<html:td>
<html:select class="Font" id="selectLangs" onchange = "selectLang();" width = "10">
@ -136,10 +137,19 @@
</html:td>
</html:tr>
</html:table>
</html:fieldset>
</html:div>
</titledbox>
<!-- fonts with webpages -->
<html:fieldset>
<html:legend>&header2;</html:legend>
<titledbox orient="vertical">
<title><text value="&header2;"/></title>
<html:div>
<html:input name="fonts" type="radio" id="browserUseDocumentFonts2"
pref="true" preftype="int" prefindex="2" prefstring="browser.use_document_fonts"/>
<html:label for="browserUseDocumentFonts2" accesskey="t" tabindex="0">
&useDocFontDynamic;
</html:label>
</html:div>
<html:div>
<html:input name="fonts" type="radio" id="browserUseDocumentFonts1"
pref="true" preftype="int" prefindex="1" prefstring="browser.use_document_fonts"/>
@ -154,7 +164,7 @@
&useDefaultFont;
</html:label>
</html:div>
</html:fieldset>
</titledbox>
</window>

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

@ -25,6 +25,7 @@
<?xml-stylesheet href="chrome://pref/skin/" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % platformDTD SYSTEM "chrome://global/locale/platformDialogOverlay.dtd" >
%platformDTD;
@ -37,7 +38,7 @@
class="dialog"
onload="if (parent.handle) parent.handle.onpageload('pref-mousewheel'); else parent.queuedTag='pref-mousewheel';"
align="vertical" title="&title.label;"
debug="false">
>
<html:script language="JavaScript" src="chrome://pref/content/pref-mousewheel.js"/>
@ -47,79 +48,72 @@
<titledbutton class="right-header-text" value=""/>
</box>
<html:fieldset>
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<html:label>&mouseWheelPanel.label;</html:label>
<html:select id="mouseWheelMode" onchange="switchPage( this );" style="width: 80%">
<titledbox orient="vertical">
<box orient="horizontal">
<text value="&mouseWheelPanel.label;"/>
<html:select class="indent" id="mouseWheelMode" onchange="switchPage( this );">
<html:option value="0">&usingJustTheWheel.label;</html:option>
<html:option value="1">&usingWheelAndAlt.label;</html:option>
<html:option value="2">&usingWheelAndCtrl.label;</html:option>
<html:option value="3">&usingWheelAndShft.label;</html:option>
</html:select>
<spring flex="100%"/>
<spring flex="1"/>
</box>
<html:div class="separator" align="horizontal"/>
<deck id="modifierDeck">
<!-- no key modifiers -->
<deck id="modifierDeck" flex="1">
<!-- no key modifiers -->
<box id="nokey" align="vertical">
<!-- scroll -->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<box orient="horizontal" flex="1" >
<html:div>
<html:input type="radio" name="actionRadioNoKey" id="mousewheelWithNoKeyAction0" pref="true" preftype="int" prefindex="0" prefstring="mousewheel.withnokey.action"/>
<html:label for="mousewheelWithNoKeyAction0">&scroll.label;</html:label>
</html:div>
<html:label for="mousewheelWithNoKeyAction0">&scroll.label;</html:label>
<spring flex="2%"/>
<box align="vertical">
<box align="horizontal">
<spring flex="1"/>
<box orient="vertical">
<box orient="horizontal">
<html:input type="text" id="mousewheelWithNoKeyNumlines" size="3" pref="true" preftype="int" prefstring="mousewheel.withnokey.numlines"/>
<html:label>&scrollLines.label;</html:label>
</box>
<box align="horizontal">
<html:div>
<html:input type="checkbox" id="mousewheelWithNoKeySysNumlines" pref="true" preftype="bool" prefstring="mousewheel.withnokey.sysnumlines"
onclick="doEnableElement( this, 'mousewheelWithNoKeyNumlines' );"/>
</html:div>
<html:label for="systemDefault">&useSystemDefault.label;</html:label>
</box>
</html:div>
</box>
<spring flex="100%"/>
<spring flex="1"/>
</box>
<!-- page up/page dn-->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<html:div>
<html:input type="radio" name="actionRadioNoKey" id="mousewheelWithNoKeyAction1" pref="true" preftype="int" prefindex="1" prefstring="mousewheel.withnokey.action"/>
</html:div>
<html:div>
<html:input type="radio" name="actionRadioNoKey" id="mousewheelWithNoKeyAction1" pref="true" preftype="int" prefindex="1" prefstring="mousewheel.withnokey.action"/>
<html:label for="mousewheelWithNoKeyAction1">&scrollPgUpPgDn.label;</html:label>
<spring flex="100%"/>
</box>
</html:div>
<spring flex="1"/>
<!-- history back/fwd-->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<html:div>
<html:input type="radio" name="actionRadioNoKey" id="mousewheelWithNoKeyAction2" pref="true" preftype="int" prefindex="2" prefstring="mousewheel.withnokey.action"/>
<html:label for="mousewheelWithNoKeyAction2">&history.label;</html:label>
</html:div>
<html:label for="mousewheelWithNoKeyAction2">&history.label;</html:label>
<spring flex="100%"/>
</box>
</box>
<!-- alt modifiers -->
<box id="alt" align="vertical">
<!-- scroll -->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<box orient="horizontal" flex="1" >
<html:div>
<html:input type="radio" name="actionRadioAltKey" id="mousewheelWithAltKeyAction0" pref="true" preftype="int" prefindex="0" prefstring="mousewheel.withaltkey.action"/>
<html:label for="mousewheelWithAltKeyAction0">&scroll.label;</html:label>
</html:div>
<html:label for="mousewheelWithAltKeyAction0">&scroll.label;</html:label>
<spring flex="2%"/>
<box align="vertical">
<box align="horizontal">
<spring flex="1"/>
<box orient="vertical">
<box orient="horizontal">
<html:input type="text" id="mousewheelWithAltKeyNumlines" size="3" pref="true" preftype="int" prefstring="mousewheel.withaltkey.numlines"/>
<html:label>&scrollLines.label;</html:label>
</box>
<box align="horizontal">
<box orient="horizontal">
<html:div>
<html:input type="checkbox" id="mousewheelWithAltKeySysNumlines" pref="true" preftype="bool" prefstring="mousewheel.withaltkey.sysnumlines"
onclick="doEnableElement( this, 'mousewheelWithAltKeyNumlines' );"/>
@ -127,113 +121,93 @@
<html:label for="systemDefault">&useSystemDefault.label;</html:label>
</box>
</box>
<spring flex="100%"/>
<spring flex="1"/>
</box>
<!-- page up/page dn-->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<html:div>
<html:input type="radio" name="actionRadioAltKey" id="mousewheelWithAltKeyAction1" pref="true" preftype="int" prefindex="1" prefstring="mousewheel.withaltkey.action"/>
<html:label for="mousewheelWithAltKeyAction1">&scrollPgUpPgDn.label;</html:label>
</html:div>
<html:label for="mousewheelWithAltKeyAction1">&scrollPgUpPgDn.label;</html:label>
<spring flex="100%"/>
</box>
<!-- history back/fwd-->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<html:div>
<html:input type="radio" name="actionRadioAltKey" id="mousewheelWithAltKeyAction2" pref="true" preftype="int" prefindex="2" prefstring="mousewheel.withaltkey.action"/>
</html:div>
<html:label for="mousewheelWithAltKeyAction2">&history.label;</html:label>
<spring flex="100%"/>
</box>
</html:div>
</box>
<!-- ctrl modifiers -->
<box id="ctrl" align="vertical">
<!-- scroll -->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<box orient="horizontal" flex="1" >
<html:div>
<html:input type="radio" name="actionRadioCtrlKey" id="mousewheelWithCtrlKeyAction0" pref="true" preftype="int" prefindex="0" prefstring="mousewheel.withcontrolkey.action"/>
<html:label for="mousewheelWithCtrlKeyAction0">&scroll.label;</html:label>
</html:div>
<html:label for="mousewheelWithCtrlKeyAction0">&scroll.label;</html:label>
<spring flex="2%"/>
<box align="vertical">
<box align="horizontal">
<spring flex="1"/>
<box orient="vertical">
<box orient="horizontal">
<html:input type="text" id="mousewheelWithCtrlKeyNumlines" size="3" pref="true" preftype="int" prefstring="mousewheel.withcontrolkey.numlines"/>
<html:label>&scrollLines.label;</html:label>
</box>
<box align="horizontal">
<html:div>
<html:input type="checkbox" id="mousewheelWithCtrlKeySysNumlines" pref="true" preftype="bool" prefstring="mousewheel.withcontrolkey.sysnumlines"
onclick="doEnableElement( this, 'mousewheelWithCtrlKeyNumlines' );"/>
<html:label for="systemDefault">&useSystemDefault.label;</html:label>
</html:div>
<html:label for="systemDefault">&useSystemDefault.label;</html:label>
</box>
</box>
<spring flex="100%"/>
<spring flex="1"/>
</box>
<!-- page up/page dn-->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<html:div>
<html:input type="radio" name="actionRadioCtrlKey" id="mousewheelWithCtrlKeyAction1" pref="true" preftype="int" prefindex="1" prefstring="mousewheel.withcontrolkey.action"/>
<html:label for="mousewheelWithCtrlKeyAction1">&scrollPgUpPgDn.label;</html:label>
</html:div>
<html:label for="mousewheelWithCtrlKeyAction1">&scrollPgUpPgDn.label;</html:label>
<spring flex="100%"/>
</box>
<!-- history back/fwd-->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<html:div>
<html:input type="radio" name="actionRadioCtrlKey" id="mousewheelWithCtrlKeyAction2" pref="true" preftype="int" prefindex="2" prefstring="mousewheel.withcontrolkey.action"/>
<html:label for="mousewheelWithCtrlKeyAction2">&history.label;</html:label>
</html:div>
<html:label for="mousewheelWithCtrlKeyAction2">&history.label;</html:label>
<spring flex="100%"/>
</box>
</box>
<!-- shift modifiers -->
<box id="shift" align="vertical">
<!-- scroll -->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<box orient="horizontal" flex="1" >
<html:div>
<html:input type="radio" name="actionRadioShiftKey" id="mousewheelWithShiftKeyAction0" pref="true" preftype="int" prefindex="0" prefstring="mousewheel.withshiftkey.action"/>
</html:div>
<html:label for="mousewheelWithShiftKeyAction0">&scroll.label;</html:label>
<spring flex="2%"/>
<box align="vertical">
<box align="horizontal">
<html:label for="mousewheelWithShiftKeyAction0">&scroll.label;</html:label>
</html:div>
<spring flex="1"/>
<box orient="vertical">
<box orient="horizontal">
<html:input type="text" id="mousewheelWithShiftKeyNumlines" size="3" pref="true" preftype="int" prefstring="mousewheel.withshiftkey.numlines"/>
<html:label>&scrollLines.label;</html:label>
</box>
<box align="horizontal">
<html:div>
<html:input type="checkbox" id="mousewheelWithShiftKeySysNumlines" pref="true" preftype="bool" prefstring="mousewheel.withshiftkey.sysnumlines"
onclick="doEnableElement( this, 'mousewheelWithShiftKeyNumlines' );"/>
</html:div>
<html:label for="systemDefault">&useSystemDefault.label;</html:label>
</box>
<html:label for="systemDefault">&useSystemDefault.label;</html:label>
</html:div>
</box>
<spring flex="100%"/>
<spring flex="1"/>
</box>
<!-- page up/page dn-->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<html:div>
<html:input type="radio" name="actionRadioShiftKey" id="mousewheelWithShiftKeyAction1" pref="true" preftype="int" prefindex="1" prefstring="mousewheel.withshiftkey.action"/>
</html:div>
<html:label for="mousewheelWithShiftKeyAction1">&scrollPgUpPgDn.label;</html:label>
<spring flex="100%"/>
</box>
<html:label for="mousewheelWithShiftKeyAction1">&scrollPgUpPgDn.label;</html:label>
</html:div>
<spring flex="1"/>
<!-- history back/fwd-->
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<html:div>
<html:input type="radio" name="actionRadioShiftKey" id="mousewheelWithShiftKeyAction2" pref="true" preftype="int" prefindex="2" prefstring="mousewheel.withshiftkey.action"/>
</html:div>
<html:label for="mousewheelWithShiftKeyAction2">&history.label;</html:label>
<spring flex="100%"/>
</box>
<html:label for="mousewheelWithShiftKeyAction2">&history.label;</html:label>
</html:div>
</box>
</deck>
</html:fieldset>
</deck>
</titledbox>
</window>

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

@ -25,88 +25,88 @@
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-navigator.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&title.label;"
orient="vertical" title="&title.label;"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-navigator' ); else parent.queuedTag = 'pref-navigator';">
<html:script language="javascript" src="chrome://global/content/strres.js" />
<html:script language="javascript" src="chrome://pref/content/prefutilities.js"/>
<html:script language="javascript" src="chrome://pref/content/pref-navigator.js"/>
<box class="header" align="horizontal">
<box class="header" orient="horizontal">
<titledbutton class="left-header-text" value="&lHeader;"/>
<spring class="header-spring" flex="1"/>
<titledbutton class="right-header-text" value="&rHeader;"/>
</box>
<!-- navigator starts with -->
<html:fieldset>
<html:legend align="left">&navRadio;</html:legend>
<html:div class="hspace-both">
<titledbox orient="vertical">
<title><text value="&navRadio;"/></title>
<html:div>
<html:input name="starts" type="radio" id="browserStartupPage0"
pref="true" preftype="int" prefindex="0" prefstring="browser.startup.page"/>
<html:label for="browserStartupPage0" accesskey="" tabindex="0">
&blankRadio;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div>
<html:input name="starts" type="radio" id="browserStartupPage1"
pref="true" preftype="int" prefindex="1" prefstring="browser.startup.page"/>
<html:label for="browserStartupPage1" accesskey="" tabindex="0">
&header2.label;
</html:label>
</html:div>
<html:div class="hspace-both">
<html:div>
<html:input name="starts" type="radio" id="browserStartupPage2"
pref="true" preftype="int" prefindex="2" prefstring="browser.startup.page"/>
<html:label for="browserStartupPage2" accesskey="" tabindex="0">
&lastPageRadio;
</html:label>
</html:div>
</html:fieldset>
</titledbox>
<!-- homepage specification -->
<html:fieldset style="width: 100%">
<html:legend align="left">&header2.label;</html:legend>
<box align="vertical" flex="100%" style="width: 100%">
<html:div class="hspace-both">&clickRadio;</html:div>
<box class="hspace-both vspace" flex="100%" style="width: 100%;">
<titledbox orient="vertical">
<title><text value="&header2.label;"/></title>
<box orient="vertical" flex="1">
<html:div>&clickRadio;</html:div>
<html:div>
<html:label for="browserStartupHomepage" style="padding-left: 1px;">&location;</html:label>
<html:input name="homepage" type="text" id="browserStartupHomepage" flex="100%"
<html:input size="50" name="homepage" type="text" id="browserStartupHomepage"
pref="true" preftype="string" prefstring="browser.startup.homepage" />
</box>
<box class="hspace-both" align="horizontal" style="width: 100%">
<spring flex="100%"/>
</html:div>
<box orient="horizontal">
<spring flex="1"/>
<titledbutton class="dialog push" name="starts" type="button" value="&useCurrent;" onclick="setHomePageToCurrentPage();" />
<titledbutton class="dialog push" name="browse" type="button" value="&browseFile;" onclick="prefNavSelectFile()"/>
</box>
</box>
</html:fieldset>
</titledbox>
<html:fieldset>
<html:legend align="left">&header3.label;</html:legend>
<box align="vertical" class="hspace-both" flex="100%" style="width: 92%;">
<titledbox orient="vertical">
<title><text value="&header3.label;"/></title>
<box orient="vertical" flex="1">
<html:div>&historyPages;</html:div>
<box class="vspace" align="horizontal">
<box orient="horizontal" autostretch="never" style="vertical-align: middle">
<html:label for="histDay" style="padding: 0px;">&pagesHis;</html:label>
<html:input type="text" value="&histDay;" id="histDay" style="margin-left: 2px; margin-right: 5px;"
pref="true" preftype="string" prefstring="browser.history_expire_days" size="3"/>
<html:div>&daysRadio;</html:div>
<spring flex="100%"/>
<spring flex="1"/>
<titledbutton class="dialog push" name="Clearit" value="&clearHis;" />
</box>
</box>
</html:fieldset>
</titledbox>
<html:fieldset>
<html:legend align="left">&header4.label;</html:legend>
<box align="horizontal" class="hspace-both" flex="100%" style="width: 92%;">
<titledbox orient="vertical">
<title><html:div>&header4.label;</html:div></title>
<box orient="horizontal" flex="1" autostretch="never" style="vertical-align: middle">
<html:label style="padding: 0px;">&clearBar;</html:label>
<spring flex="100%"/>
<titledbutton class="dialog push" name="starts" type="button" value="&clearLoc;" />
<spring flex="1"/>
<titledbutton class="dialog push" name="starts" type="button" value="&clearLoc;" />
</box>
</html:fieldset>
</titledbox>
</window>

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

@ -40,32 +40,35 @@
</box>
<box align="vertical" style="width: 100%;">
<html:fieldset style="width: 100%;">
<!-- &networkHeader.label; Bug in boxes-->
<titledbox orient="vertical">
<html:div>&networkHeader.label;</html:div>
<spring class="vgap"/>
<box>
<html:div>
<html:input name="directManualOrAuto" type="radio" id="networkProxyType0"
onclick="DoEnabling();"
pref="true" preftype="int" prefindex="0" prefstring="network.proxy.type"/>
</html:div>
<html:label for="networkProxyType0" accesskey="d" tabindex="0">
&directTypeRadio.label;
</html:label>
</html:div>
</box>
<box align="horizontal" flex="100%" style="width: 100%">
<box align="horizontal" flex="1">
<html:div>
<html:input name="directManualOrAuto" type="radio" id="networkProxyType1"
onclick="DoEnabling();"
pref="true" preftype="int" prefindex="1" prefstring="network.proxy.type"/>
</html:div>
<html:label for="networkProxyType1" accesskey="m" tabindex="0">
&manualTypeRadio.label;
</html:label>
<spring flex="100%"/>
</html:div>
<spring flex="1"/>
<!--<titledbutton id="viewhideManual" class="dialog push" value="&view.label;" onclick="showManualProxyConfig();"/>-->
</box>
<html:div align="horizontal" id="manual-proxy" style="display: block; padding-left: 21px">
<html:table width="100%">
<html:div align="horizontal" id="manual-proxy" style="width: 100px; height: 100px; padding-left: 21px">
<html:table>
<html:tr>
<html:td>&ftp.label;</html:td>
<html:td>
@ -133,14 +136,13 @@
<html:input name="socksport" type="text" id="pref:string:network.socks.port" size="5" />
</box>
-->
<box align="horizontal">
<html:div>
<html:input name="directManualOrAuto" type="radio" id="networkProxyType2"
onclick="DoEnabling();"
pref="true" preftype="int" prefindex="2" prefstring="network.proxy.type"/>
</html:div>
<html:label for="networkProxyType2" accesskey="a" tabindex="0">&autoTypeRadio.label;</html:label>
</box>
</html:div>
<box align="horizontal">
&configAutoconfigText.label;
</box>
@ -150,7 +152,7 @@
pref="true" preftype="string" prefstring="network.proxy.autoconfig_url"/>
<titledbutton class="dialog push" id="autoReload" value="&reload.label;"/>
</box>
</html:fieldset>
</titledbox>
</box>
</window>

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

@ -24,26 +24,26 @@
<?xml-stylesheet href="chrome://pref/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-search.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
class="dialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-search' ); else parent.queuedTag = 'pref-search'; InitSingleEngineList(); " title="&title.label;"
align="vertical">
orient="vertical">
<html:script language="javascript" src="chrome://pref/content/pref-search.js"/>
<box class="header" align="horizontal">
<box class="header" orient="horizontal">
<titledbutton class="left-header-text" value="&lHeader;"/>
<spring class="header-spring" flex="1"/>
<titledbutton class="right-header-text" value="&rHeader;"/>
</box>
<box align="vertical">
<html:fieldset flex="1">
<html:legend align="left">&legendHeader;</html:legend>
<box orient="vertical">
<titledbox orient="vertical" flex="1">
<title><text value="&legendHeader;"/></title>
<html:div class="hspace-both">
<html:div>
<html:input name="powermode" type="radio" id="browserSearchPowermode0"
pref="true" preftype="int" prefindex="0" prefstring="browser.search.powermode"/>
<html:label for="browserSearchPowermode0" accesskey="t" tabindex="0">
@ -67,27 +67,27 @@
</html:select>
</html:div>
</html:div>
<!-- <html:div class="hspace-both">
<!-- <html:div>
<html:input name="powermode" type="radio" id="browserSearchPowermode1"
pref="true" preftype="int" prefindex="1" prefstring="browser.search.powermode"/>
<html:label for="browserSearchPowermode1" accesskey="t" tabindex="1">
&enablePowerSearch.label;
</html:label>
</html:div> -->
</html:fieldset>
</html:div -->
</titledbox>
<html:fieldset>
<html:legend>&searchResults.label;</html:legend>
<html:div class="hspace-both" style="padding-right: 0px;">
<titledbox orient="vertical">
<title><text value="&searchResults.label;"/></title>
<html:div>
<html:input name="opensearchpanel" type="checkbox" id="browserSearchOpenSidebarSearchPanel"
pref="true" preftype="bool" prefstring="browser.search.opensidebarsearchpanel"/>
<html:label for="browserSearchOpenSidebarSearchPanel" accesskey="t" tabindex="2">
&openSidebarSearchPanel.label;
</html:label>
</html:div>
</html:fieldset>
</titledbox>
</box>
</window>

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

@ -24,10 +24,10 @@
<?xml-stylesheet href="chrome://pref/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-smart_browsing.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
class="dialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&title.label;" align="vertical"
title="&title.label;" orient="vertical"
onload="if( parent.handle ) parent.handle.onpageload( 'pref-smart_browsing' ); else parent.queuedTag = 'pref-smart_browsing';">
<box class="header" align="horizontal">
@ -37,10 +37,9 @@
</box>
<box align="vertical">
<html:fieldset flex="100%">
<html:legend align="left">&lHeader;</html:legend>
<html:div class="hspace-both">
<titledbox orient="vertical">
<title><text value="&lHeader;"/></title>
<html:div>
<html:input name="related" type="checkbox" id="browserRelatedEnabled"
pref="true" preftype="bool" prefstring="browser.related.enabled"/>
<html:label for="browserRelatedEnabled" accesskey="n" tabindex="0">
@ -70,26 +69,24 @@
</html:label>
</html:div>
-->
<html:div class="hspace-both vspace">
<html:div>
&doNotDecp.label;
</html:div>
<box class="hspace-both vspace" align="vertical" flex="100%" style="width: 100%;">
<html:input type="text" name="textstyle" id="browserRelatedDisabledForDomains" flex="100%"
<box align="vertical">
<html:input type="text" name="textstyle" id="browserRelatedDisabledForDomains"
pref="true" preftype="string" prefstring="browser.related.disabledForDomains"/>
</box>
</html:fieldset>
</box>
</titledbox>
<box align="vertical">
<html:fieldset flex="1">
<html:legend align="left">&internetKeywordsHeader.label;</html:legend>
<html:div class="hspace-both">
<titledbox orient="vertical">
<title><text value="&internetKeywordsHeader.label;"/></title>
<html:div>
<html:input name="keyword" type="checkbox" id="browserGoBrowsingEnabled"
pref="true" preftype="bool" prefstring="keyword.enabled"/>
<html:label for="browserGoBrowsingEnabled" accesskey="n" tabindex="0">
&enableKeyCheck.label;
</html:label>
</html:div>
</html:fieldset>
</box>
</titledbox>
</window>

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

@ -23,7 +23,7 @@
<!DOCTYPE window SYSTEM "chrome://pref/locale/pref-wallet.dtd" >
<window xmlns:html="http://www.w3.org/TR/REC-html40"
<window debug="false" xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
align="vertical" title="&window.title;"
@ -47,31 +47,33 @@
<titledbutton class="right-header-text" value="&rHeader;"/>
</box>
<html:fieldset id="walletArea">
<html:legend>&walletHeader;</html:legend>
<html:div class="hspace-both">&walletDetails;</html:div>
<spring style="height: 10px;"/>
<box align="horizontal" style="width: 93%;" flex="100%" class="hspace-both">
<titledbox orient="vertical" id="walletArea">
<title><text value="&walletHeader;"/></title>
<html:div >&walletDetails;</html:div>
<spring class="vgap"/>
<box>
<html:div>
<html:label for="walletServer" accesskey="c" tabindex="0">
&server.label;
</html:label>
<html:input name="Wallet Server:" type="text" id="walletServer"
pref="true" preftype="string" prefstring="wallet.Server" flex="100%"/>
</box>
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<spring flex="100%"/>
</html:div>
<html:input name="Wallet Server:" type="text" id="walletServer"
pref="true" preftype="string" prefstring="wallet.Server" flex="1"/>
</box>
<box align="horizontal">
<spring flex="1"/>
<titledbutton value="&viewWallet.label;" class="dialog push" onclick="viewWallet();"/>
</box>
</html:fieldset>
</titledbox>
<html:fieldset>
<html:legend>&signonHeader;</html:legend>
<html:div class="hspace-both">&signonDetails;</html:div>
<box align="horizontal" flex="100%" style="width: 93%" class="hspace-both">
<spring flex="100%"/>
<titledbox orient="vertical">
<title><text value="&signonHeader;"/></title>
<html:div >&signonDetails;</html:div>
<box align="horizontal">
<spring flex="1"/>
<titledbutton value="&viewSignons.label;" class="dialog push" onclick="viewSignons();"/>
</box>
<spring style="height: 14px;"/>
</html:fieldset>
<spring class="vgap"/>
</titledbox>
</window>

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

@ -10,6 +10,7 @@
<!ENTITY widgetRendering.label "Debug: Rendering">
<!ENTITY gfxScrollbars.label "gfx scrollbars">
<!ENTITY debugWindow.label "debug window">
<!ENTITY debugXULBox.label "debug XUL boxes">
<!ENTITY useViewManager2.label "use ViewManager2">
<!-- Event Debugging -->

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

@ -80,6 +80,18 @@ select.font {
padding-right: 15px;
}
.vspace-both {
padding-top: 7px;
padding-bottom: 7px;
}
spring.vgap {
height: 12px;
}
spring.hgap {
width: 12px;
}
/* obsolete styles - will be removed soon */
@ -109,4 +121,4 @@ titledbutton.up {
}
titledbutton.down {
list-style-image: url("chrome://global/skin/scroll-down.gif");
}
}

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

@ -43,7 +43,7 @@ window.dialog {
/******** Box *********/
/* Conditional debug */
/* Conditional debug
*[debug="true"]:-moz-horizontal-box-debug {
border: 2px solid blue;
@ -77,24 +77,30 @@ window.dialog {
margin: 2px;
}
*/
/* comment this in to make all boxes show their
debug info automatically. Otherwise use debug="true"
to show it and use the rules above.
to show it and use the rules above. */
*:-moz-horizontal-box-debug {
:-moz-horizontal-box-debug {
border: 2px solid blue;
border-top-width: 10px;
padding: 2px;
margin: 2px;
color: white;
}
*:-moz-vertical-box-debug {
:-moz-vertical-box-debug {
border: 2px solid red;
border-left-width: 10px;
padding: 2px;
margin: 2px;
color: white;
}
*/
/******* Scrollbar *******/
@ -607,6 +613,39 @@ progressmeter[mode="undetermined"]
background-image: url(chrome://global/skin/progressmeter-busy.gif);
}
/********* TitledBox **********/
titledbox
{
display: block;
border: 2px groove white;
padding: 5px;
margin: 2px;
}
title
{
display: block;
font-weight: bold;
}
title > *
{
margin-left: 5px;
margin-right: 5px;
}
title > html|*
{
margin-left: 5px;
margin-right: 5px;
}
:titledbox-content {
display: block;
padding: inherit;
}
/********* XP Menus ***********/
menubar {

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

@ -92,6 +92,18 @@ progressmeter {
display: inline;
}
/****** TitledBox ******/
titledbox
{
display: block;
}
title
{
display: block;
}
/********* XP Menus ***********/
menubar[collapsed="true"] {