Bug 946647 - Remove bidi options from nsIMarkupDocumentViewer as dead code. r=smontagu.
This commit is contained in:
@@ -23,7 +23,7 @@ interface nsIMarkupDocumentViewer;
|
|||||||
|
|
||||||
[ref] native nsIMarkupDocumentViewerTArray(nsTArray<nsCOMPtr<nsIMarkupDocumentViewer> >);
|
[ref] native nsIMarkupDocumentViewerTArray(nsTArray<nsCOMPtr<nsIMarkupDocumentViewer> >);
|
||||||
|
|
||||||
[scriptable, uuid(6acfadef-22ee-4924-be6c-776e8def6e1b)]
|
[scriptable, uuid(3528324f-f5d3-4724-bd8d-9233a7114112)]
|
||||||
interface nsIMarkupDocumentViewer : nsISupports
|
interface nsIMarkupDocumentViewer : nsISupports
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -64,51 +64,6 @@ interface nsIMarkupDocumentViewer : nsISupports
|
|||||||
*/
|
*/
|
||||||
void getContentSize(out long width, out long height);
|
void getContentSize(out long width, out long height);
|
||||||
|
|
||||||
/**
|
|
||||||
* Options for Bidi presentation.
|
|
||||||
*
|
|
||||||
* Use these attributes to access the individual Bidi options.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* bidiTextDirection: the default direction for the layout of bidirectional text.
|
|
||||||
* 1 - left to right
|
|
||||||
* 2 - right to left
|
|
||||||
*/
|
|
||||||
attribute octet bidiTextDirection;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* bidiTextType: the ordering of bidirectional text. This may be either "logical"
|
|
||||||
* or "visual". Logical text will be reordered for presentation using the Unicode
|
|
||||||
* Bidi Algorithm. Visual text will be displayed without reordering.
|
|
||||||
* 1 - the default order for the charset
|
|
||||||
* 2 - logical order
|
|
||||||
* 3 - visual order
|
|
||||||
*/
|
|
||||||
attribute octet bidiTextType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* bidiNumeral: the type of numerals to display.
|
|
||||||
* 1 - depending on context, default is Arabic numerals
|
|
||||||
* 2 - depending on context, default is Hindi numerals
|
|
||||||
* 3 - Arabic numerals
|
|
||||||
* 4 - Hindi numerals
|
|
||||||
*/
|
|
||||||
attribute octet bidiNumeral;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* bidiSupport: whether to use platform bidi support or Mozilla's bidi support
|
|
||||||
* 1 - Use Mozilla's bidi support
|
|
||||||
* 2 - Use the platform bidi support
|
|
||||||
* 3 - Disable bidi support
|
|
||||||
*/
|
|
||||||
attribute octet bidiSupport;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Use this attribute to access all the Bidi options in one operation
|
|
||||||
*/
|
|
||||||
attribute uint32_t bidiOptions;
|
|
||||||
|
|
||||||
/** The minimum font size */
|
/** The minimum font size */
|
||||||
attribute long minFontSize;
|
attribute long minFontSize;
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,6 @@ static const char sPrintOptionsContractID[] = "@mozilla.org/gfx/printset
|
|||||||
#include "nsIDOMEventListener.h"
|
#include "nsIDOMEventListener.h"
|
||||||
#include "nsISelectionController.h"
|
#include "nsISelectionController.h"
|
||||||
|
|
||||||
#include "nsBidiUtils.h"
|
|
||||||
#include "nsISHEntry.h"
|
#include "nsISHEntry.h"
|
||||||
#include "nsISHistory.h"
|
#include "nsISHistory.h"
|
||||||
#include "nsISHistoryInternal.h"
|
#include "nsISHistoryInternal.h"
|
||||||
@@ -3108,118 +3107,6 @@ nsDocumentViewer::SetHintCharacterSet(const nsACString& aHintCharacterSet)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
SetChildBidiOptions(nsIMarkupDocumentViewer* aChild, void* aClosure)
|
|
||||||
{
|
|
||||||
aChild->SetBidiOptions(NS_PTR_TO_INT32(aClosure));
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocumentViewer::SetBidiTextDirection(uint8_t aTextDirection)
|
|
||||||
{
|
|
||||||
uint32_t bidiOptions;
|
|
||||||
|
|
||||||
GetBidiOptions(&bidiOptions);
|
|
||||||
SET_BIDI_OPTION_DIRECTION(bidiOptions, aTextDirection);
|
|
||||||
SetBidiOptions(bidiOptions);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocumentViewer::GetBidiTextDirection(uint8_t* aTextDirection)
|
|
||||||
{
|
|
||||||
uint32_t bidiOptions;
|
|
||||||
|
|
||||||
if (aTextDirection) {
|
|
||||||
GetBidiOptions(&bidiOptions);
|
|
||||||
*aTextDirection = GET_BIDI_OPTION_DIRECTION(bidiOptions);
|
|
||||||
}
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocumentViewer::SetBidiTextType(uint8_t aTextType)
|
|
||||||
{
|
|
||||||
uint32_t bidiOptions;
|
|
||||||
|
|
||||||
GetBidiOptions(&bidiOptions);
|
|
||||||
SET_BIDI_OPTION_TEXTTYPE(bidiOptions, aTextType);
|
|
||||||
SetBidiOptions(bidiOptions);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocumentViewer::GetBidiTextType(uint8_t* aTextType)
|
|
||||||
{
|
|
||||||
uint32_t bidiOptions;
|
|
||||||
|
|
||||||
if (aTextType) {
|
|
||||||
GetBidiOptions(&bidiOptions);
|
|
||||||
*aTextType = GET_BIDI_OPTION_TEXTTYPE(bidiOptions);
|
|
||||||
}
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocumentViewer::SetBidiNumeral(uint8_t aNumeral)
|
|
||||||
{
|
|
||||||
uint32_t bidiOptions;
|
|
||||||
|
|
||||||
GetBidiOptions(&bidiOptions);
|
|
||||||
SET_BIDI_OPTION_NUMERAL(bidiOptions, aNumeral);
|
|
||||||
SetBidiOptions(bidiOptions);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocumentViewer::GetBidiNumeral(uint8_t* aNumeral)
|
|
||||||
{
|
|
||||||
uint32_t bidiOptions;
|
|
||||||
|
|
||||||
if (aNumeral) {
|
|
||||||
GetBidiOptions(&bidiOptions);
|
|
||||||
*aNumeral = GET_BIDI_OPTION_NUMERAL(bidiOptions);
|
|
||||||
}
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocumentViewer::SetBidiSupport(uint8_t aSupport)
|
|
||||||
{
|
|
||||||
uint32_t bidiOptions;
|
|
||||||
|
|
||||||
GetBidiOptions(&bidiOptions);
|
|
||||||
SET_BIDI_OPTION_SUPPORT(bidiOptions, aSupport);
|
|
||||||
SetBidiOptions(bidiOptions);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocumentViewer::GetBidiSupport(uint8_t* aSupport)
|
|
||||||
{
|
|
||||||
uint32_t bidiOptions;
|
|
||||||
|
|
||||||
if (aSupport) {
|
|
||||||
GetBidiOptions(&bidiOptions);
|
|
||||||
*aSupport = GET_BIDI_OPTION_SUPPORT(bidiOptions);
|
|
||||||
}
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocumentViewer::SetBidiOptions(uint32_t aBidiOptions)
|
|
||||||
{
|
|
||||||
if (mPresContext) {
|
|
||||||
mPresContext->SetBidi(aBidiOptions, true); // could cause reflow
|
|
||||||
}
|
|
||||||
// now set bidi on all children of mContainer
|
|
||||||
CallChildren(SetChildBidiOptions, NS_INT32_TO_PTR(aBidiOptions));
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDocumentViewer::GetBidiOptions(uint32_t* aBidiOptions)
|
|
||||||
{
|
|
||||||
if (aBidiOptions) {
|
|
||||||
if (mPresContext) {
|
|
||||||
*aBidiOptions = mPresContext->GetBidi();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
*aBidiOptions = IBMBIDI_DEFAULT_BIDI_OPTIONS;
|
|
||||||
}
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
AppendChildSubtree(nsIMarkupDocumentViewer* aChild, void* aClosure)
|
AppendChildSubtree(nsIMarkupDocumentViewer* aChild, void* aClosure)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user