Browse Source

Top and bottom z-index values not supported

Michael Ragazzon 6 years ago
parent
commit
0242f6366b

+ 1 - 1
Source/Core/ElementStyle.cpp

@@ -745,7 +745,7 @@ void ElementStyle::DirtyInheritedProperties(const PropertyNameList& properties)
 
 
 
-// Must be called in correct order, from document root to children elements.
+
 void ElementStyle::ComputeValues(Style::ComputedValues& values, const Style::ComputedValues* parent_values, const Style::ComputedValues* document_values, bool values_are_default_initialized, float dp_ratio)
 {
 	// Generally, this is how it works (for now, we can probably be smarter about this):

+ 3 - 1
Source/Core/ElementStyle.h

@@ -111,7 +111,7 @@ public:
 	/// @return The resolved value in 'px' unit.
 	float ResolveLengthPercentage(const Property *property, float base_value);
 	/// Resolves a property with units of number, length or percentage. Lengths are resolved to 'px'. 
-	/// Number and percentages are resolved by scaling by the size of the specified target.
+	/// Number and percentages are resolved by scaling the size of the specified target.
 	float ResolveNumberLengthPercentage(const Property* property, RelativeTarget relative_target);
 
 	/// Iterates over the properties defined on the element.
@@ -141,6 +141,8 @@ public:
 	// Dirties dp properties.
 	void DirtyDpProperties();
 
+	/// Turns the local and inherited properties into computed values for this element. These values can in turn be used during the layout procedure.
+	/// Must be called in correct order, from document root to children elements.
 	void ComputeValues(Style::ComputedValues& values, const Style::ComputedValues* parent_values, const Style::ComputedValues* document_values, bool values_are_default_initialized, float dp_ratio);
 
 private:

+ 1 - 1
Source/Debugger/BeaconSource.h

@@ -31,7 +31,7 @@ static const char* beacon_rcss =
 "	position: absolute;\n"
 "	top: 5px;\n"
 "	right: 33px;\n"
-"	z-index: top;\n"
+"	z-index: 1000000;\n"
 "	width: 20px;\n"
 "	font-family: Lacuna;\n"
 "	font-size: 12px;\n"

+ 1 - 1
Source/Debugger/CommonSource.h

@@ -29,7 +29,7 @@ static const char* common_rcss =
 "body\n"
 "{\n"
 "	font-family: Lacuna;\n"
-"	z-index: top;\n"
+"	z-index: 1000000;\n"
 "	font-size: 13px;\n"
 "   line-height: 1.4;\n"
 "	color: black;\n"

+ 1 - 1
Source/Debugger/MenuSource.h

@@ -31,7 +31,7 @@ static const char* menu_rcss =
 "	width: 100%;\n"
 "	height: 32px;\n"
 "	position: absolute;\n"
-"	z-index: top;\n"
+"	z-index: 1000000;\n"
 "	background: #888;\n"
 "	font-family: Lacuna;\n"
 "	font-size: 14px;\n"

+ 1 - 0
readme.md

@@ -18,6 +18,7 @@ If upgrading from the original libRocket branch, some breaking changes should be
 - Querying the property of an element for size, position and similar may not work as expected right after changes to the document or style. This change is made for performance reasons, see the note below for reasoning and a workaround.
 - The Controls::DataGrid "min-rows" property has been replaced by an attribute of the same name.
 - Removed RenderInterface::GetPixelsPerInch, instead the pixels per inch value has been fixed to 96 PPI, as per CSS specs. To achieve a scalable user interface, instead use the 'dp' unit.
+- Removed 'top' and 'bottom' from z-index property.
 
 ## Performance