Browse Source

Make element ids case sensitive.

Frank Becker 14 years ago
parent
commit
b20cf3dc01
3 changed files with 3 additions and 3 deletions
  1. 1 1
      Source/Core/Context.cpp
  2. 1 1
      Source/Core/Element.cpp
  3. 1 1
      Source/Core/ElementUtilities.cpp

+ 1 - 1
Source/Core/Context.cpp

@@ -425,7 +425,7 @@ void Context::ShowMouseCursor(bool show)
 // Returns the first document found in the root with the given id.
 ElementDocument* Context::GetDocument(const String& id)
 {
-	const String lower_id = id.ToLower();
+	const String lower_id = id;
 
 	for (int i = 0; i < root->GetNumChildren(); i++)
 	{

+ 1 - 1
Source/Core/Element.cpp

@@ -1306,7 +1306,7 @@ void Element::OnAttributeChange(const AttributeNameList& changed_attributes)
 {
 	if (changed_attributes.find("id") != changed_attributes.end())
 	{
-		id = GetAttribute< String >("id", "").ToLower();
+		id = GetAttribute< String >("id", "");
 		style->DirtyDefinition();
 	}
 

+ 1 - 1
Source/Core/ElementUtilities.cpp

@@ -48,7 +48,7 @@ Element* ElementUtilities::GetElementById(Element* root_element, const String& i
 	search_queue.push(root_element);
 
 	// Lowercase the id for searching
-	String lower_id = id.ToLower();
+	String lower_id = id;
 	
 	while (!search_queue.empty())
 	{