#375: M1342719 M1342720

This commit is contained in:
Cameron Kaiser 2017-05-08 21:31:13 -07:00
parent bea84e5072
commit f4015e0c10
3 changed files with 6 additions and 5 deletions

View File

@ -3859,7 +3859,6 @@ CanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText,
// calls bidi algo twice since it needs the full text width and the
// bounding boxes before rendering anything
nsBidi bidiEngine;
rv = nsBidiPresUtils::ProcessText(textToDraw.get(),
textToDraw.Length(),
isRTL ? NSBIDI_RTL : NSBIDI_LTR,
@ -3869,7 +3868,7 @@ CanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText,
nullptr,
0,
&totalWidthCoord,
&bidiEngine);
&mBidiEngine);
if (NS_FAILED(rv)) {
return rv;
}
@ -3984,7 +3983,7 @@ CanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText,
nullptr,
0,
nullptr,
&bidiEngine);
&mBidiEngine);
mTarget->SetTransform(oldTransform);

View File

@ -28,6 +28,7 @@
#include "FilterSupport.h"
#include "nsSVGEffects.h"
#include "Layers.h"
#include "nsBidi.h"
class nsGlobalWindow;
class nsXULElement;
@ -821,6 +822,8 @@ protected:
nsTArray<RegionInfo> mHitRegionsOptions;
nsBidi mBidiEngine;
/**
* Returns true if a shadow should be drawn along with a
* drawing operation.

View File

@ -75,9 +75,8 @@ AccessCheck::wrapperSubsumes(JSObject* wrapper)
bool
AccessCheck::isChrome(JSCompartment* compartment)
{
bool privileged;
nsIPrincipal* principal = GetCompartmentPrincipal(compartment);
return NS_SUCCEEDED(nsXPConnect::SecurityManager()->IsSystemPrincipal(principal, &privileged)) && privileged;
return nsXPConnect::SystemPrincipal() == principal;
}
bool