[tor-commits] [tor-browser/tor-browser-17.0.9esr-1] fixup! Do not expose system colors to CSS or canvas.

mikeperry at torproject.org mikeperry at torproject.org
Fri Oct 18 00:40:54 UTC 2013


commit 282e8971589f6bfe222b86983d6dc8acb538a72e
Author: Mike Perry <mikeperry-git at torproject.org>
Date:   Thu Oct 17 17:34:48 2013 -0700

    fixup! Do not expose system colors to CSS or canvas.
    
    Check to make sure we have a theme pointer before accessing it.
---
 layout/base/nsLayoutUtils.cpp |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
index 65515d9..00a4994 100644
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -3171,8 +3171,9 @@ nsLayoutUtils::GetNativeTextColor(nsIFrame* aFrame, nscolor& aColor)
       const nsStyleDisplay* displayData = bgFrame->GetStyleDisplay();
       uint8_t widgetType = displayData->mAppearance;
       nsITheme *theme = presContext->GetTheme();
-      if (widgetType && theme->ThemeSupportsWidget(presContext, bgFrame,
-                                                   widgetType)) {
+      if (theme && widgetType && theme->ThemeSupportsWidget(presContext,
+                                                            bgFrame,
+                                                            widgetType)) {
         bool isDisabled = false;
         nsIContent* frameContent = bgFrame->GetContent();
         if (frameContent && frameContent->IsElement()) {





More information about the tor-commits mailing list