michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* derived class of nsBlockFrame used for xul:label elements */ michael@0: michael@0: #include "mozilla/EventStateManager.h" michael@0: #include "nsXULLabelFrame.h" michael@0: #include "nsHTMLParts.h" michael@0: #include "nsNameSpaceManager.h" michael@0: michael@0: using namespace mozilla; michael@0: michael@0: nsIFrame* michael@0: NS_NewXULLabelFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) michael@0: { michael@0: nsXULLabelFrame* it = new (aPresShell) nsXULLabelFrame(aContext); michael@0: michael@0: it->SetFlags(NS_BLOCK_FLOAT_MGR | NS_BLOCK_MARGIN_ROOT); michael@0: michael@0: return it; michael@0: } michael@0: michael@0: NS_IMPL_FRAMEARENA_HELPERS(nsXULLabelFrame) michael@0: michael@0: // If you make changes to this function, check its counterparts michael@0: // in nsBoxFrame and nsTextBoxFrame michael@0: nsresult michael@0: nsXULLabelFrame::RegUnregAccessKey(bool aDoReg) michael@0: { michael@0: // if we have no content, we can't do anything michael@0: if (!mContent) michael@0: return NS_ERROR_FAILURE; michael@0: michael@0: // To filter out