Changeset 28536 in webkit
- Timestamp:
- Dec 7, 2007 2:58:09 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r28535 r28536 1 2007-12-07 Darin Adler <darin@apple.com> 2 3 Reviewed by Mitz. 4 5 - http://bugs.webkit.org/show_bug.cgi?id=15981 6 speed up visited-link code a bit 7 8 * bridge/GlobalHistory.h: Change historyContains to take a character pointer plus length 9 instead of requiring a DeprecatedString. 10 11 * bridge/mac/GlobalHistoryMac.mm: (WebCore::historyContains): Updated for above change. 12 Also removes pointless "fast Latin-1" case that was never used. 13 * bridge/win/GlobalHistoryWin.cpp: (WebCore::historyContains): Ditto. 14 * platform/gtk/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto. 15 * platform/wx/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto. 16 17 * css/CSSStyleSelector.cpp: 18 (WebCore::findHash): Added. Helper for cleanpath. 19 (WebCore::findSlashDotDotSlash): Ditto. 20 (WebCore::findSlashSlash): Ditto. 21 (WebCore::findSlashDotSlash): Ditto. 22 (WebCore::cleanpath): Changed to use fast helper functions instead of slower general-purpose 23 DeprecatedString find function. 24 (WebCore::containsColonSlashSlash): Added. Helper for checkPseudoState. 25 (WebCore::checkPseudoState): Got rid of reference count churn by using an AtomicString* 26 instead of an AtomicString for the attribute value. Changed to use fast helper function 27 instead of slower DeprecatedString::contains function, and also made the fast case not 28 bother allocating a DeprecatedConstString. 29 30 - unrelated tiny cleanup 31 32 * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp: 33 (WebCore::releaseCachedStops): Use static_cast instead of reinterpret_cast. 34 (WebCore::cgGradientCallback): Ditto. 35 1 36 2007-12-07 Darin Adler <darin@apple.com> 2 37 -
trunk/WebCore/bridge/GlobalHistory.h
r23584 r28536 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.All rights reserved.2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 #define GlobalHistory_h 28 28 29 #include <wtf/unicode/Unicode.h> 30 29 31 namespace WebCore { 30 32 31 class DeprecatedString; 32 33 bool historyContains(const DeprecatedString&); 33 bool historyContains(const UChar* characters, unsigned length); 34 34 35 35 } // namespace WebCore -
trunk/WebCore/bridge/mac/GlobalHistoryMac.mm
r23584 r28536 27 27 #import "GlobalHistory.h" 28 28 29 #import "DeprecatedString.h"30 29 #import "WebCoreHistory.h" 31 30 32 31 namespace WebCore { 33 32 34 bool historyContains(const DeprecatedString& s)33 bool historyContains(const UChar* characters, unsigned length) 35 34 { 36 35 // the other side of the bridge is careful not to throw exceptions here 37 if (s.hasFastLatin1()) 38 return [[WebCoreHistory historyProvider] containsItemForURLLatin1:s.latin1() length:s.length()]; 39 return [[WebCoreHistory historyProvider] containsItemForURLUnicode:(UniChar *)s.unicode() length:s.length()]; 36 return [[WebCoreHistory historyProvider] containsURL:characters length:length]; 40 37 } 41 38 -
trunk/WebCore/bridge/win/GlobalHistoryWin.cpp
r23584 r28536 27 27 #include "GlobalHistory.h" 28 28 29 #include "DeprecatedString.h"30 29 #include "WebCoreHistory.h" 31 30 32 31 namespace WebCore { 33 32 34 bool historyContains(const DeprecatedString& s)33 bool historyContains(const UChar* characters, unsigned length) 35 34 { 36 if (!WebCoreHistory::historyProvider()) 37 return false; 38 39 // the other side of the bridge is careful not to throw exceptions here 40 if (s.hasFastLatin1()) 41 return WebCoreHistory::historyProvider()->containsItemForURLLatin1(s.latin1(), s.length()); 42 return WebCoreHistory::historyProvider()->containsItemForURLUnicode((UChar*)s.unicode(), s.length()); 35 WebCoreHistoryProvider* provider = WebCoreHistory::historyProvider(); 36 return provider && provider->containsItemForURLUnicode(characters, length); 43 37 } 44 38 -
trunk/WebCore/css/CSSStyleSelector.cpp
r28357 r28536 1 /** 2 * This file is part of the CSS implementation for KDE. 3 * 1 /* 4 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 5 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) … … 570 568 } 571 569 572 // modified version of the one in kurl.cpp 573 static void cleanpath(DeprecatedString &path) 570 static int findHash(const DeprecatedString& string) 571 { 572 const ::UChar* ptr = reinterpret_cast<const ::UChar*>(string.unicode()); 573 unsigned length = string.length(); 574 for (unsigned i = 0; i < length; ++i) { 575 if (ptr[i] == '#') 576 return i; 577 } 578 return -1; 579 } 580 581 static inline int findSlashDotDotSlash(const DeprecatedString& string) 582 { 583 const ::UChar* ptr = reinterpret_cast<const ::UChar*>(string.unicode()); 584 unsigned length = string.length(); 585 unsigned loopLimit = length < 4 ? 0 : length - 3; 586 for (unsigned i = 0; i < loopLimit; ++i) { 587 if (ptr[i] == '/' && ptr[i + 1] == '.' && ptr[i + 2] == '.' && ptr[i + 3] == '/') 588 return i; 589 } 590 return -1; 591 } 592 593 static inline int findSlashSlash(const DeprecatedString& string, int position) 594 { 595 const ::UChar* ptr = reinterpret_cast<const ::UChar*>(string.unicode()); 596 unsigned length = string.length(); 597 unsigned loopLimit = length < 2 ? 0 : length - 1; 598 for (unsigned i = position; i < loopLimit; ++i) { 599 if (ptr[i] == '/' && ptr[i + 1] == '/') 600 return i; 601 } 602 return -1; 603 } 604 605 static inline int findSlashDotSlash(const DeprecatedString& string) 606 { 607 const ::UChar* ptr = reinterpret_cast<const ::UChar*>(string.unicode()); 608 unsigned length = string.length(); 609 unsigned loopLimit = length < 3 ? 0 : length - 2; 610 for (unsigned i = 0; i < loopLimit; ++i) { 611 if (ptr[i] == '/' && ptr[i + 1] == '.' && ptr[i + 2] == '/') 612 return i; 613 } 614 return -1; 615 } 616 617 static void cleanpath(DeprecatedString& path) 574 618 { 575 619 int pos; 576 while ((pos = path.find("/../")) != -1) { 620 621 while ((pos = findSlashDotDotSlash(path)) != -1) { 577 622 int prev = 0; 578 623 if (pos > 0) 579 prev = path.findRev("/", pos - 1);624 prev = path.findRev("/", pos - 1); 580 625 // don't remove the host, i.e. http://foo.org/../foo.html 581 if (prev < 0 || (prev > 3 && path.findRev("://", prev -1) == prev-2))626 if (prev < 0 || (prev > 3 && path.findRev("://", prev - 1) == prev - 2)) 582 627 path.remove(pos, 3); 583 628 else 584 629 // matching directory found ? 585 path.remove(prev, pos- prev + 3); 586 } 587 pos = 0; 588 630 path.remove(prev, pos - prev + 3); 631 } 632 589 633 // Don't remove "//" from an anchor identifier. -rjw 590 634 // Set refPos to -2 to mean "I haven't looked for the anchor yet". 591 635 // We don't want to waste a function call on the search for the the anchor 592 636 // in the vast majority of cases where there is no "//" in the path. 637 pos = 0; 593 638 int refPos = -2; 594 while ((pos = path.find("//", pos)) != -1) {639 while ((pos = findSlashSlash(path, pos)) != -1) { 595 640 if (refPos == -2) 596 refPos = path.find("#");641 refPos = findHash(path); 597 642 if (refPos > 0 && pos >= refPos) 598 643 break; 599 644 600 if (pos == 0 || path[pos -1] != ':')645 if (pos == 0 || path[pos - 1] != ':') 601 646 path.remove(pos, 1); 602 647 else 603 648 pos += 2; 604 649 } 605 while ((pos = path.find("/./")) != -1) 650 651 // FIXME: We don't want to remove "/./" from an anchor identifier either. 652 while ((pos = findSlashDotSlash(path)) != -1) 606 653 path.remove(pos, 2); 654 } 655 656 static inline bool containsColonSlashSlash(const UChar* characters, unsigned length) 657 { 658 unsigned loopLimit = length < 3 ? 0 : length - 2; 659 for (unsigned i = 0; i < loopLimit; ++i) 660 if (characters[i] == ':' && characters[i + 1] == '/' && characters[i + 2] == '/') 661 return true; 662 return false; 607 663 } 608 664 … … 613 669 return; 614 670 } 615 616 AtomicStringattr;671 672 const AtomicString* attr; 617 673 if (e->isHTMLElement()) 618 attr = e->getAttribute(hrefAttr);674 attr = &e->getAttribute(hrefAttr); 619 675 #if ENABLE(SVG) 620 676 else if (e->isSVGElement()) 621 attr = e->getAttribute(XLinkNames::hrefAttr);677 attr = &e->getAttribute(XLinkNames::hrefAttr); 622 678 #endif 623 if (attr.isNull()){679 else { 624 680 pseudoState = PseudoNone; 625 681 return; 626 682 } 627 683 684 if (attr->isNull()) { 685 pseudoState = PseudoNone; 686 return; 687 } 688 628 689 if (!checkVisited) { 629 690 pseudoState = PseudoAnyLink; 630 691 return; 631 692 } 632 633 DeprecatedConstString cu(reinterpret_cast<const DeprecatedChar*>(attr.characters()), attr.length()); 693 694 const UChar* characters = attr->characters(); 695 unsigned length = attr->length(); 696 697 if (containsColonSlashSlash(characters, length)) { 698 // FIXME: Strange to not clean the path just beacause it has "://" in it. 699 pseudoState = historyContains(characters, length) ? PseudoVisited : PseudoLink; 700 return; 701 } 702 703 DeprecatedConstString cu(reinterpret_cast<const DeprecatedChar*>(characters), length); 634 704 DeprecatedString u = cu.string(); 635 if (!u.contains("://")) { 636 if (u[0] == '/') 637 u.prepend(currentEncodedURL->host); 638 else if (u[0] == '#') 639 u.prepend(currentEncodedURL->file); 640 else 641 u.prepend(currentEncodedURL->path); 642 cleanpath(u); 643 } 644 pseudoState = historyContains(u) ? PseudoVisited : PseudoLink; 705 if (length && characters[0] == '/') 706 u.prepend(currentEncodedURL->host); 707 else if (length && characters[0] == '#') 708 u.prepend(currentEncodedURL->file); 709 else 710 u.prepend(currentEncodedURL->path); 711 cleanpath(u); 712 pseudoState = historyContains(reinterpret_cast<const UChar*>(u.unicode()), u.length()) 713 ? PseudoVisited : PseudoLink; 645 714 } 646 715 -
trunk/WebCore/platform/graphics/win/FontWin.cpp
r28298 r28536 50 50 51 51 const FontPlatformData& platformData = font->platformData(); 52 //NSFont* drawFont;53 //if ([gContext isDrawingToScreen]) {54 // drawFont = [platformData.font screenFont];55 // if (drawFont != platformData.font)56 // // We are getting this in too many places (3406411); use ERROR so it only prints on debug versions for now. (We should debug this also, eventually).57 // LOG_ERROR("Attempting to set non-screen font (%@) when drawing to screen. Using screen font anyway, may result in incorrect metrics.",58 // [[[platformData.font fontDescriptor] fontAttributes] objectForKey:NSFontNameAttribute]);59 //} else {60 // drawFont = [platformData.font printerFont];61 // if (drawFont != platformData.font)62 // NSLog(@"Attempting to set non-printer font (%@) when printing. Using printer font anyway, may result in incorrect metrics.",63 // [[[platformData.font fontDescriptor] fontAttributes] objectForKey:NSFontNameAttribute]);64 //}65 52 66 53 CGContextSetFont(cgContext, platformData.cgFont()); … … 83 70 CGContextSetTextMatrix(cgContext, matrix); 84 71 85 //wkSetCGFontRenderingMode(cgContext, drawFont);86 72 CGContextSetFontSize(cgContext, platformData.size()); 87 73 CGContextSetTextPosition(cgContext, point.x(), point.y()); -
trunk/WebCore/platform/gtk/TemporaryLinkStubs.cpp
r28426 r28536 57 57 /********************************************************/ 58 58 59 bool WebCore::historyContains( DeprecatedString const&) { return false; }59 bool WebCore::historyContains(const UChar*, unsigned) { return false; } 60 60 61 61 PluginInfo* PlugInInfoStore::createPluginInfoForPluginAtIndex(unsigned) { notImplemented(); return 0;} -
trunk/WebCore/platform/mac/WebCoreHistory.h
r15438 r28536 1 1 /* 2 * Copyright (C) 2003 Apple Computer, Inc.All rights reserved.2 * Copyright (C) 2003, 2007 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 25 25 26 26 @protocol WebCoreHistoryProvider <NSObject> 27 - (BOOL)containsItemForURLLatin1:(const char *)latin1 length:(unsigned)length; 28 - (BOOL)containsItemForURLUnicode:(const UniChar *)unicode length:(unsigned)length; 27 - (BOOL)containsURL:(const UniChar*)unicode length:(unsigned)length; 29 28 @end 30 29 31 30 @interface WebCoreHistory : NSObject 32 {33 }34 31 35 32 + (void)setHistoryProvider:(id<WebCoreHistoryProvider>)h; -
trunk/WebCore/platform/win/WebCoreHistory.h
r23462 r28536 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 class WebCoreHistoryProvider { 34 34 public: 35 virtual bool containsItemForURLLatin1(const char* latin1, unsigned int length) = 0; 36 virtual bool containsItemForURLUnicode(const UChar* unicode, unsigned int length) = 0; 35 virtual bool containsURL(const UChar* unicode, unsigned length) = 0; 37 36 }; 38 37 39 38 class WebCoreHistory { 40 39 public: 41 static void setHistoryProvider(WebCoreHistoryProvider* h);40 static void setHistoryProvider(WebCoreHistoryProvider*); 42 41 static WebCoreHistoryProvider* historyProvider(); 43 42 }; -
trunk/WebCore/platform/wx/TemporaryLinkStubs.cpp
r28480 r28536 113 113 114 114 namespace WebCore { 115 bool historyContains( DeprecatedString const&) { return false; }115 bool historyContains(const UChar*, unsigned) { return false; } 116 116 } 117 117 -
trunk/WebCore/svg/graphics/cg/SVGPaintServerGradientCg.cpp
r27781 r28536 43 43 static void releaseCachedStops(void* info) 44 44 { 45 reinterpret_cast<SVGPaintServerGradient::SharedStopCache*>(info)->deref();45 static_cast<SVGPaintServerGradient::SharedStopCache*>(info)->deref(); 46 46 } 47 47 48 48 static void cgGradientCallback(void* info, const CGFloat* inValues, CGFloat* outColor) 49 49 { 50 SVGPaintServerGradient::SharedStopCache* stopsCache = reinterpret_cast<SVGPaintServerGradient::SharedStopCache*>(info);50 SVGPaintServerGradient::SharedStopCache* stopsCache = static_cast<SVGPaintServerGradient::SharedStopCache*>(info); 51 51 52 52 SVGPaintServerGradient::QuartzGradientStop* stops = stopsCache->m_stops.data(); -
trunk/WebKit/mac/ChangeLog
r28527 r28536 1 2007-12-07 Darin Adler <darin@apple.com> 2 3 Reviewed by Mitz. 4 5 - http://bugs.webkit.org/show_bug.cgi?id=15981 6 speed up visited-link code a bit 7 8 * History/WebHistory.mm: Removed unused Latin-1 code path. 9 (-[_WebCoreHistoryProvider containsURL:length:]): Updated for method name change. 10 1 11 2007-12-07 Geoffrey Garen <ggaren@apple.com> 2 12 -
trunk/WebKit/mac/History/WebHistory.mm
r26776 r28536 40 40 #import <wtf/Vector.h> 41 41 42 43 42 NSString *WebHistoryItemsAddedNotification = @"WebHistoryItemsAddedNotification"; 44 43 NSString *WebHistoryItemsRemovedNotification = @"WebHistoryItemsRemovedNotification"; … … 50 49 51 50 static WebHistory *_sharedHistory = nil; 52 53 54 51 55 52 NSString *FileVersionKey = @"WebHistoryFileVersion"; … … 617 614 } 618 615 619 #define BUFFER_SIZE 2048620 621 - (BOOL)containsItemForURLLatin1:(const char *)latin1 length:(unsigned)length622 {623 const char *latin1Str = latin1;624 char staticStrBuffer[BUFFER_SIZE];625 char *strBuffer = NULL;626 BOOL needToAddSlash = FALSE;627 628 if (length >= 6 &&629 matchLetter(latin1[0], 'h') &&630 matchLetter(latin1[1], 't') &&631 matchLetter(latin1[2], 't') &&632 matchLetter(latin1[3], 'p') &&633 (latin1[4] == ':'634 || (matchLetter(latin1[4], 's') && latin1[5] == ':'))) {635 int pos = latin1[4] == ':' ? 5 : 6;636 // skip possible initial two slashes637 if (latin1[pos] == '/' && latin1[pos + 1] == '/') {638 pos += 2;639 }640 641 char *nextSlash = strchr(latin1 + pos, '/');642 if (nextSlash == NULL) {643 needToAddSlash = TRUE;644 }645 }646 647 if (needToAddSlash) {648 if (length + 1 <= BUFFER_SIZE) {649 strBuffer = staticStrBuffer;650 } else {651 strBuffer = (char*)malloc(length + 2);652 }653 memcpy(strBuffer, latin1, length + 1);654 strBuffer[length] = '/';655 strBuffer[length+1] = '\0';656 length++;657 658 latin1Str = strBuffer;659 }660 661 CFStringRef str = CFStringCreateWithCStringNoCopy(NULL, latin1Str, kCFStringEncodingWindowsLatin1, kCFAllocatorNull);662 BOOL result = [history containsItemForURLString:(id)str];663 CFRelease(str);664 665 if (strBuffer != staticStrBuffer) {666 free(strBuffer);667 }668 669 return result;670 }671 672 616 #define UNICODE_BUFFER_SIZE 1024 673 617 674 - (BOOL)contains ItemForURLUnicode:(const UniChar *)unicode length:(unsigned)length618 - (BOOL)containsURL:(const UniChar *)unicode length:(unsigned)length 675 619 { 676 620 const UniChar *unicodeStr = unicode; -
trunk/WebKit/win/ChangeLog
r28531 r28536 1 2007-12-07 Darin Adler <darin@apple.com> 2 3 Reviewed by Mitz. 4 5 - http://bugs.webkit.org/show_bug.cgi?id=15981 6 speed up visited-link code a bit 7 8 * WebHistory.cpp: Removed unused Latin-1 code path. 9 (_WebCoreHistoryProvider::containsItem): Updated for function name change. 10 1 11 2007-12-07 Steve Falkenburg <sfalken@apple.com> 2 12 -
trunk/WebKit/win/WebHistory.cpp
r25139 r28536 53 53 ~_WebCoreHistoryProvider(); 54 54 55 virtual bool containsItemForURLLatin1(const char* latin1, unsigned int length); 56 virtual bool containsItemForURLUnicode(const UChar* unicode, unsigned int length); 55 virtual bool containsItem(const UChar* unicode, unsigned int length); 57 56 58 57 private: … … 893 892 } 894 893 895 bool _WebCoreHistoryProvider::containsItem ForURLLatin1(const char* latin1, unsigned int length)896 { 897 const int bufferSize = 2048;898 const char *latin1Str = latin1;899 char staticStrBuffer[bufferSize];900 char *strBuffer = 0;894 bool _WebCoreHistoryProvider::containsItem(const UChar* unicode, unsigned int length) 895 { 896 const int bufferSize = 1024; 897 const UChar *unicodeStr = unicode; 898 UChar staticStrBuffer[bufferSize]; 899 UChar *strBuffer = 0; 901 900 bool needToAddSlash = false; 902 901 903 902 if (length >= 6 && 904 matchLetter(latin1[0], 'h') && 905 matchLetter(latin1[1], 't') && 906 matchLetter(latin1[2], 't') && 907 matchLetter(latin1[3], 'p') && 908 (latin1[4] == ':' 909 || (matchLetter(latin1[4], 's') && latin1[5] == ':'))) { 910 int pos = latin1[4] == ':' ? 5 : 6; 903 matchUnicodeLetter(unicode[0], 'h') && 904 matchUnicodeLetter(unicode[1], 't') && 905 matchUnicodeLetter(unicode[2], 't') && 906 matchUnicodeLetter(unicode[3], 'p') && 907 (unicode[4] == ':' 908 || (matchUnicodeLetter(unicode[4], 's') && unicode[5] == ':'))) { 909 910 unsigned pos = unicode[4] == ':' ? 5 : 6; 911 911 912 // skip possible initial two slashes 912 if ( latin1[pos] == '/' && latin1[pos + 1] == '/') {913 if (pos + 1 < length && unicode[pos] == '/' && unicode[pos + 1] == '/') 913 914 pos += 2; 914 } 915 916 const char* nextSlash = strchr(latin1 + pos, '/'); 917 if (!nextSlash) 915 916 while (pos < length && unicode[pos] != '/') 917 pos++; 918 919 if (pos == length) 918 920 needToAddSlash = true; 919 921 } … … 923 925 strBuffer = staticStrBuffer; 924 926 else 925 strBuffer = ( char*)malloc(length + 2);926 memcpy(strBuffer, latin1, length + 1);927 strBuffer = (UChar*)malloc(sizeof(UChar) * (length + 1)); 928 memcpy(strBuffer, unicode, 2 * length); 927 929 strBuffer[length] = '/'; 928 strBuffer[length+1] = '\0';929 930 length++; 930 931 931 latin1Str = strBuffer;932 unicodeStr = strBuffer; 932 933 } 933 934 … … 943 944 } 944 945 } 945 946 CFStringRef str = CFStringCreateWithCStringNoCopy(NULL, latin1Str, kCFStringEncodingWindowsLatin1, kCFAllocatorNull);947 BOOL result = FALSE;948 m_historyPrivate->containsItemForURLString((void*)str, &result);949 CFRelease(str);950 951 if (strBuffer != staticStrBuffer)952 free(strBuffer);953 954 return !!result;955 }956 957 bool _WebCoreHistoryProvider::containsItemForURLUnicode(const UChar* unicode, unsigned int length)958 {959 const int bufferSize = 1024;960 const UChar *unicodeStr = unicode;961 UChar staticStrBuffer[bufferSize];962 UChar *strBuffer = 0;963 bool needToAddSlash = false;964 965 if (length >= 6 &&966 matchUnicodeLetter(unicode[0], 'h') &&967 matchUnicodeLetter(unicode[1], 't') &&968 matchUnicodeLetter(unicode[2], 't') &&969 matchUnicodeLetter(unicode[3], 'p') &&970 (unicode[4] == ':'971 || (matchUnicodeLetter(unicode[4], 's') && unicode[5] == ':'))) {972 973 unsigned pos = unicode[4] == ':' ? 5 : 6;974 975 // skip possible initial two slashes976 if (pos + 1 < length && unicode[pos] == '/' && unicode[pos + 1] == '/')977 pos += 2;978 979 while (pos < length && unicode[pos] != '/')980 pos++;981 982 if (pos == length)983 needToAddSlash = true;984 }985 986 if (needToAddSlash) {987 if (length + 1 <= bufferSize)988 strBuffer = staticStrBuffer;989 else990 strBuffer = (UChar*)malloc(sizeof(UChar) * (length + 1));991 memcpy(strBuffer, unicode, 2 * length);992 strBuffer[length] = '/';993 length++;994 995 unicodeStr = strBuffer;996 }997 998 if (!m_historyPrivate) {999 if (SUCCEEDED(m_history->QueryInterface(IID_IWebHistoryPrivate, (void**)&m_historyPrivate))) {1000 // don't hold a ref - we're owned by IWebHistory/IWebHistoryPrivate1001 m_historyPrivate->Release();1002 } else {1003 if (strBuffer != staticStrBuffer)1004 free(strBuffer);1005 m_historyPrivate = 0;1006 return false;1007 }1008 }1009 946 1010 947 CFStringRef str = CFStringCreateWithCharactersNoCopy(NULL, (const UniChar*)unicodeStr, length, kCFAllocatorNull);
Note: See TracChangeset
for help on using the changeset viewer.