~ubuntu-branches/ubuntu/jaunty/kde4libs/jaunty-updates

« back to all changes in this revision

Viewing changes to khtml/css/css_base.h

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2008-12-11 18:26:08 UTC
  • mfrom: (1.1.24 upstream)
  • Revision ID: james.westby@ubuntu.com-20081211182608-tsu6p8ncbw1gnqxt
Tags: 4:4.1.85-0ubuntu1
* New upstream release
* Patches:
  + Removed 15_kfreebsd_support.diff from patches/series (doesn't apply and
    has no use for Ubuntu)
  + Redid 20_use_dejavu_as_default_font.diff
  + Completely removed kubuntu_09_fix_application_menu.diff (applied upstream)
  + Refreshed kubuntu_54_use_xdg_menu_prefix.diff
  + Dropped plasma/widgets/toolbutton.cpp from kubuntu_qt_ftbfs.diff (applied
    upstream)
  + Global quilt refresh

Show diffs side-by-side

added added

removed removed

Lines of Context:
273
273
 
274
274
    KDE_NO_EXPORT int getPropertyID(const char *tagStr, int len);
275
275
    KDE_NO_EXPORT int getValueID(const char *tagStr, int len);
 
276
 
 
277
    struct SelectorHash
 
278
    {
 
279
        static unsigned hash(CSSSelector* selector)
 
280
        {
 
281
            unsigned result = 0;
 
282
            while (selector) {
 
283
                result ^= (unsigned long)selector->value.impl();
 
284
                result ^= (selector->attrLocalName.id() << 3);
 
285
                result ^= (selector->attrNamespace.id() << 7);
 
286
                result ^= (selector->tagLocalName.id() << 10);
 
287
                result ^= (selector->tagNamespace.id() << 13);
 
288
                result ^= (selector->relation << 17);
 
289
                result ^= (selector->match << 20);
 
290
                result ^= result << 5;
 
291
                selector = selector->tagHistory;
 
292
            }
 
293
            return result;
 
294
        }
 
295
        static bool equal(CSSSelector* a, CSSSelector* b) { return a == b || *a == *b; }
 
296
        static const bool safeToCompareToEmptyOrDeleted = false;
 
297
    };
 
298
 
 
299
}
 
300
 
 
301
namespace WTF
 
302
{
 
303
    template<typename T> struct DefaultHash;
 
304
    template<> struct DefaultHash<DOM::CSSSelector*> {
 
305
        typedef DOM::SelectorHash Hash;
 
306
    };
276
307
}
277
308
 
278
309
#endif