Răsfoiți Sursa

Make image color and opacity not inherited. Should increase performance and fix some layout bugs (no font face defined error).

Michael 7 ani în urmă
părinte
comite
86cbcb319b

+ 1 - 1
Source/Core/LayoutInlineBoxText.cpp

@@ -156,7 +156,7 @@ void LayoutInlineBoxText::BuildWordBox()
 		baseline = 0;
 
 		// For unknown reasons, this gets triggered during document load. Seems to cause no trouble, remove warning.
-		//Log::Message(Log::LT_WARNING, "No font face defined on element %s. Please specify a font-family in your RCSS.", text_element->GetAddress().CString());
+		Log::Message(Log::LT_WARNING, "No font face defined on element %s. Please specify a font-family in your RCSS.", text_element->GetAddress().CString());
 		return;
 	}
 

+ 2 - 2
Source/Core/StyleSheetSpecification.cpp

@@ -243,7 +243,7 @@ void StyleSheetSpecification::RegisterDefaultProperties()
 
 	RegisterProperty(COLOR, "white", true, false).AddParser(COLOR);
 
-	RegisterProperty(IMAGE_COLOR, "white", true, false).AddParser(COLOR);
+	RegisterProperty(IMAGE_COLOR, "white", false, false).AddParser(COLOR);
 
 	RegisterProperty(FONT_FAMILY, "", true, true).AddParser("string");
 	RegisterProperty(FONT_CHARSET, "U+0020-007E", true, false).AddParser("string");
@@ -267,7 +267,7 @@ void StyleSheetSpecification::RegisterDefaultProperties()
 	RegisterProperty(FOCUS, "auto", true, false).AddParser("keyword", "none, auto");
 
 	RegisterProperty(SCROLLBAR_MARGIN, "0", false, false).AddParser("number");
-	RegisterProperty(OPACITY, "1", true, false).AddParser("number");
+	RegisterProperty(OPACITY, "1", false, false).AddParser("number");
 
 	RegisterProperty(POINTER_EVENTS, "auto", true, false).AddParser("keyword", "auto, none");
 }