mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 13:58:49 +00:00
[DOM] Update some DOM canvas checks.
This commit is contained in:
@@ -4356,6 +4356,9 @@ CanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText,
|
||||
textToDraw.Truncate();
|
||||
}
|
||||
|
||||
// This is only needed to know if we can know the drawing bounding box easily.
|
||||
const bool doCalculateBounds = NeedToCalculateBounds();
|
||||
|
||||
// for now, default to ltr if not in doc
|
||||
bool isRTL = false;
|
||||
|
||||
@@ -4376,8 +4379,6 @@ CanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText,
|
||||
isRTL = GET_BIDI_OPTION_DIRECTION(document->GetBidiOptions()) == IBMBIDI_TEXTDIRECTION_RTL;
|
||||
}
|
||||
|
||||
// This is only needed to know if we can know the drawing bounding box easily.
|
||||
const bool doCalculateBounds = NeedToCalculateBounds();
|
||||
if (presShell->IsDestroying()) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
@@ -890,7 +890,9 @@ protected:
|
||||
* last call to UpdateFilter and now.
|
||||
*/
|
||||
const gfx::FilterDescription& EnsureUpdatedFilter() {
|
||||
bool isWriteOnly = mCanvasElement && mCanvasElement->IsWriteOnly();
|
||||
bool isWriteOnly = IsWriteOnly() ||
|
||||
(mCanvasElement && mCanvasElement->IsWriteOnly()) ||
|
||||
(mOffscreenCanvas && mOffscreenCanvas->IsWriteOnly());
|
||||
if (CurrentState().filterSourceGraphicTainted != isWriteOnly) {
|
||||
UpdateFilter();
|
||||
EnsureTarget();
|
||||
|
||||
Reference in New Issue
Block a user