]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmltag.cpp
add aglUpdateContext() call (doesn't seem to change anything but should be there...
[wxWidgets.git] / src / html / htmltag.cpp
index bcf337bc3b7b1e32b43afd0e8f39ebd41d87e8cb..dcb097a6d73f353945717d6176a71a28c3a34c66 100644 (file)
@@ -68,11 +68,18 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
     m_CacheSize = 0;
     m_CachePos = 0;
 
-    int pos = 0;
-    while (pos < lng)
+    for ( int pos = 0; pos < lng; pos++ )
     {
         if (src[pos] == wxT('<'))   // tag found:
         {
+            // don't cache comment tags
+            wxString::const_iterator iter = source.begin() + pos;
+            if ( wxHtmlParser::SkipCommentTag(iter, source.end()) )
+            {
+                pos = iter - source.begin();
+                continue;
+            }
+
             if (m_CacheSize % CACHE_INCREMENT == 0)
                 m_Cache = (wxHtmlCacheItem*) realloc(m_Cache, (m_CacheSize + CACHE_INCREMENT) * sizeof(wxHtmlCacheItem));
             int tg = m_CacheSize++;
@@ -169,8 +176,6 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
                 }
             }
         }
-
-        pos++;
     }
 
     // ok, we're done, now we'll free .Name members of cache - we don't need it anymore: