1. 12 Nov, 2007 24 commits
    • weinig@apple.com's avatar
      WebKitTools: · 3962570f
      weinig@apple.com authored
              Reviewed by Adam Roben.
      
              Implement LayoutTestController.setPrivateBrowsingEnabled(bool) for windows.
      
              * DumpRenderTree/win/DumpRenderTree.cpp:
              (runTest):
              * DumpRenderTree/win/LayoutTestControllerWin.cpp:
              (LayoutTestController::setPrivateBrowsingEnabled):
      
      LayoutTests:
      
              Reviewed by Adam Roben.
      
              * platform/win/Skipped: Remove http/tests/security/cross-frame-acdcess-private-browsing.html 
              from the windows skipped list now that LayoutTestController.setPrivateBrowsingEnabled has 
              been implmented.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3962570f
    • darin@apple.com's avatar
      JavaScriptCore: · 0856b869
      darin@apple.com authored
              Reviewed by Sam.
      
              - http://bugs.webkit.org/show_bug.cgi?id=15951
                REGRESSION: assertion failure in regexp match() when running JS tests
      
              Test: fast/js/regexp-many-brackets.html
      
              * pcre/pcre_exec.cpp: (match): Added back accidentally-removed case for
              the BRANUMBER opcode.
      
      LayoutTests:
      
              Reviewed by Sam.
      
              - test for http://bugs.webkit.org/show_bug.cgi?id=15951
                REGRESSION: assertion failure in regexp match() when running JS tests
      
              * fast/js/regexp-many-brackets-expected.txt: Added.
              * fast/js/regexp-many-brackets.html: Added.
              * fast/js/resources/regexp-many-brackets.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0856b869
    • oliver@apple.com's avatar
      Return behaviour for 0 sized pattern back to what it was prior to r27704 · 9c61d803
      oliver@apple.com authored
      Reviewed by Darin and Antti.
      
      This change in behaviour broke two layout tests in DRT, so correcting it
      corrects existing tests.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c61d803
    • timothy@apple.com's avatar
      Reviewed by John. · 8af3894b
      timothy@apple.com authored
              <rdar://problem/5268311> REGRESSION (Safari 2-3): Exception thrown when calling -[WebDataSource subresources]
      
              * page/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
              If the SharedBuffer is null insert an empty NSData instead of nil.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8af3894b
    • darin@apple.com's avatar
      Reviewed by Geoff. · 7f984871
      darin@apple.com authored
              - fix use of prefix and config.h, got rid of a few unneeded things in
                the PCRE code; no behavior changes
      
              * API/JSBase.cpp: Added include of config.h.
              * API/JSCallbackConstructor.cpp: Ditto.
              * API/JSCallbackFunction.cpp: Ditto.
              * API/JSCallbackObject.cpp: Ditto.
              * API/JSClassRef.cpp: Ditto.
              * API/JSContextRef.cpp: Ditto.
              * API/JSObjectRef.cpp: Ditto.
              * API/JSStringRef.cpp: Ditto.
              * API/JSValueRef.cpp: Ditto.
      
              * JavaScriptCorePrefix.h: Removed obsolete <ctype.h> workaround.
              Moved new/delete macros after includes, as they are in WebCore's prefix.
              Removed "config.h".
      
              * pcre/dftables.cpp: (main): Changed back to not use a separate maketables
              function. This is needed for PCRE, but not helpful for our use. Also changed
              the tables to all be 128 entries long instead of 256, since only the first
              128 are ever used.
      
              * pcre/pcre_compile.cpp: Added include of config.h. Eliminated digitab,
              which was only being used to check hex digits. Changed all uses of TRUE and
              FALSE to use the C++ true and false instead.
              (check_escape): Just the TRUE/FALSE thing.
              (is_counted_repeat): Ditto.
              (could_be_empty_branch): Ditto.
              (get_othercase_range): Ditto.
              (compile_branch): Ditto.
              (compile_regex): Ditto.
              (is_anchored): Ditto.
              (is_startline): Ditto.
              (find_firstassertedchar): Ditto.
              (jsRegExpCompile): Ditto.
      
              * pcre/pcre_exec.cpp: Added include of config.h. Changed all uses of TRUE and
              FALSE to use the C++ true and false instead.
              (match_ref): Just the TRUE/FALSE thing.
              (match): Ditto. Removed some unneeded braces.
              (jsRegExpExecute): Just the TRUE/FALSE thing.
      
              * pcre/pcre_internal.h: Moved the constants needed by dftables.cpp to the top
              of the file instead of the bottom, so they can be used. Also changed the table
              sizes to 128 instead of 256. Removed macro definitions of FALSE and TRUE.
              Set array sizes for all the const arrays. Changed _pcre_utf8_table1_size to
              be a macro instead of a extern int.
      
              * pcre/pcre_maketables.cpp: Removed. It's all in dftables.cpp now.
      
              * pcre/pcre_tables.cpp: Made table sizes explicit.
      
              * pcre/pcre_xclass.cpp: Just the TRUE/FALSE thing.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f984871
    • darin@apple.com's avatar
      Reviewed by Tim. · 34fea3a8
      darin@apple.com authored
              - http://bugs.webkit.org/show_bug.cgi?id=15947
                speed up page loading a bit by inlining
      
              * loader/FrameLoader.cpp: (WebCore::FrameLoader::isLocationChange):
              Factored out the slow case of isScheduledLocationChangePending into this.
      
              * loader/FrameLoader.h:
              (WebCore::FrameLoader::isScheduledLocationChangePending): Added an
              inline check of the far and away most common case, where m_scheduledRedirection
              is 0; the rest is in the isLocationChange function.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34fea3a8
    • oliver@apple.com's avatar
      Appease geoff :D · 91ffc099
      oliver@apple.com authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      91ffc099
    • ggaren@apple.com's avatar
      Rubber-stamped by Oliver Hunt. · 1a1474ef
      ggaren@apple.com authored
              
              Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
              Import variable lookup optimizations from KJS
      
              * fast/js/kde/completion-expected.txt:
              * fast/js/kde/resources/completion.js:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a1474ef
    • oliver@apple.com's avatar
      <rdar://problem/5522011> The content of the password field of Safari is displayed by reconversion. · 0c86647c
      oliver@apple.com authored
      Reviewed by Darin.
      
      Some input methods (notably Kotoeri) can incorrectly provide
      access to the raw text of a password field.  To work around
      this we forcefully override the inputContext whenever a password
      field is active.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c86647c
    • ggaren@apple.com's avatar
      Rubber-stamped by Oliver Hunt. · d9fffcca
      ggaren@apple.com authored
              
              Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
              Import variable lookup optimizations from KJS
      
              * fast/js/kde/lval-exceptions-expected.txt: Added.
              * fast/js/kde/lval-exceptions.html: Added.
              * fast/js/kde/operators-expected.txt:
              * fast/js/kde/resources/lval-exceptions.js: Added.
              * fast/js/kde/resources/operators.js:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9fffcca
    • ggaren@apple.com's avatar
      Rubber-stamped by Oliver Hunt. · c7c3a535
      ggaren@apple.com authored
              
              Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
              Import variable lookup optimizations from KJS
      
              * fast/js/kde/func-decl-expected.txt: Added.
              * fast/js/kde/func-decl.html: Added.
              * fast/js/kde/resources/func-decl.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c7c3a535
    • ggaren@apple.com's avatar
      Rubber-stamped by Oliver Hunt. · 575ca08a
      ggaren@apple.com authored
              
              Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
              Import variable lookup optimizations from KJS
      
              * fast/js/rehash-assign-expected.txt: Added.
              * fast/js/rehash-assign.html: Added.
              * fast/js/resize-array-assign-expected.txt: Added.
              * fast/js/resize-array-assign.html: Added.
              * fast/js/resources/rehash-assign.js: Added.
              * fast/js/resources/resize-array-assign.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      575ca08a
    • ggaren@apple.com's avatar
      Rubber-stamped by Oliver Hunt. · 8142691c
      ggaren@apple.com authored
              
              Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
              Import variable lookup optimizations from KJS
      
              * fast/js/kde/arguments-scope-expected.txt: Added.
              * fast/js/kde/arguments-scope.html: Added.
              * fast/js/kde/resources/arguments-scope.js: Added.
              * fast/js/kde/resources/scope.js:
              * fast/js/kde/scope-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8142691c
    • staikos@webkit.org's avatar
      2007-11-12 George Staikos <staikos@kde.org> · 5b4e8cab
      staikos@webkit.org authored
              Reviewed by Tim.
      
              Extract the text match marker highlight color into RenderTheme instead
              of the hardcoded yellow.
      
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paintTextMatchMarker):
              * rendering/RenderTheme.cpp:
              (WebCore::RenderTheme::platformTextSearchHighlightColor):
              * rendering/RenderTheme.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b4e8cab
    • mrowe@apple.com's avatar
      2007-11-12 Mark Rowe <mrowe@apple.com> · 821cc726
      mrowe@apple.com authored
              * building/tools.html: Remove extra >.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      821cc726
    • mrowe@apple.com's avatar
      2007-11-12 Mark Rowe <mrowe@apple.com> · 68608902
      mrowe@apple.com authored
              Fix deadlock on launch on the Mac.
      
              * loader/icon/IconDatabase.cpp:
              (WebCore::IconDatabase::open): Restore unlock that was mistakenly removed in r27717.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27719 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      68608902
    • sullivan@apple.com's avatar
      Reviewed by Tim Hatcher · 97ead476
      sullivan@apple.com authored
              
              - speculative fix for <rdar://problem/5509989> CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit: 
              -[WebPDFView(FileInternal) _updatePreferencesSoon] + 56
              
              The crash is probably due to messaging a dealloc'ed dataSource ivar. The dataSource ivar isn't retained
              by this class, but should be. (It is retained by WebHTMLView, e.g.).
      
              * WebView/WebPDFView.mm:
              (-[WebPDFView dealloc]):
              release dataSource ivar
              (-[WebPDFView setDataSource:]):
              retain dataSource ivar
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97ead476
    • mrowe@apple.com's avatar
      2007-11-12 Justin Haygood <jhaygood@reaktix.com> · 788c299c
      mrowe@apple.com authored
              Reviewed by Brady.
      
              http://bugs.webkit.org/show_bug.cgi?id=15955
              Reimplement threading functions in IconDatabase and SQLiteDatabase in terms of the threading abstractions
      
              * loader/icon/IconDatabase.cpp:
              (WebCore::IconDatabase::open):
              (WebCore::IconDatabase::close):
              * loader/icon/IconDatabase.h:
              * platform/sql/SQLiteDatabase.cpp:
              (WebCore::SQLiteDatabase::SQLiteDatabase):
              (WebCore::SQLiteDatabase::open):
              (WebCore::SQLiteDatabase::close):
              * platform/sql/SQLiteDatabase.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      788c299c
    • aroben@apple.com's avatar
      Windows build fix · 1840f962
      aroben@apple.com authored
              * config.h: Touch because VS apparently can't figure out which files
              depend on ResourceResponse.h.
              * WebCore.vcproj/WebCore.vcproj: Add ResourceResponseBase files to
              project and remove old ResourceResponse files.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1840f962
    • aroben@apple.com's avatar
      Change update-webkit-localizable-strings to only scan mac and win directories · 9c18d1b5
      aroben@apple.com authored
      WebKit:
      
              * StringsNotToBeLocalized.txt: Updated.
      
      WebKitTools:
      
              * Scripts/update-webkit-localizable-strings: Changed to only scan the
              mac and win subdirectories.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c18d1b5
    • mrowe@apple.com's avatar
      2007-11-12 Julien Chaffraix <julien.chaffraix@gmail.com> · dee0243d
      mrowe@apple.com authored
              Reviewed by Darin.
      
              http://bugs.webkit.org/show_bug.cgi?id=15334
              Split ResourceResponse into platform specific files
      
              * WebCore.base.exp:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * platform/network/ResourceResponse.cpp: Removed.
              * platform/network/ResourceResponse.h: Removed.
              * platform/network/ResourceResponseBase.cpp: Copied from platform/network/ResourceResponse.cpp.
              (WebCore::ResourceResponseBase::asResourceResponse):
              (WebCore::ResourceResponseBase::isHTTP):
              (WebCore::ResourceResponseBase::url):
              (WebCore::ResourceResponseBase::setUrl):
              (WebCore::ResourceResponseBase::mimeType):
              (WebCore::ResourceResponseBase::setMimeType):
              (WebCore::ResourceResponseBase::expectedContentLength):
              (WebCore::ResourceResponseBase::setExpectedContentLength):
              (WebCore::ResourceResponseBase::textEncodingName):
              (WebCore::ResourceResponseBase::setTextEncodingName):
              (WebCore::ResourceResponseBase::suggestedFilename):
              (WebCore::ResourceResponseBase::setSuggestedFilename):
              (WebCore::ResourceResponseBase::httpStatusCode):
              (WebCore::ResourceResponseBase::setHTTPStatusCode):
              (WebCore::ResourceResponseBase::httpStatusText):
              (WebCore::ResourceResponseBase::setHTTPStatusText):
              (WebCore::ResourceResponseBase::httpHeaderField):
              (WebCore::ResourceResponseBase::setHTTPHeaderField):
              (WebCore::ResourceResponseBase::httpHeaderFields):
              (WebCore::ResourceResponseBase::isAttachment):
              (WebCore::ResourceResponseBase::setExpirationDate):
              (WebCore::ResourceResponseBase::expirationDate):
              (WebCore::ResourceResponseBase::setLastModifiedDate):
              (WebCore::ResourceResponseBase::lastModifiedDate):
              (WebCore::ResourceResponseBase::updateResourceResponse):
              * platform/network/ResourceResponseBase.h: Copied from platform/network/ResourceResponse.h.
              (WebCore::ResourceResponseBase::ResourceResponseBase):
              * platform/network/cf/ResourceResponse.h: Added.
              (WebCore::ResourceResponse::ResourceResponse):
              * platform/network/curl/ResourceResponse.h: Added.
              (WebCore::ResourceResponse::ResourceResponse):
              (WebCore::ResourceResponse::doUpdateResourceResponse):
              * platform/network/mac/ResourceResponse.h: Added.
              (WebCore::ResourceResponse::ResourceResponse):
              * platform/network/qt/ResourceResponse.h: Added.
              (WebCore::ResourceResponse::ResourceResponse):
              (WebCore::ResourceResponse::doUpdateResourceResponse):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dee0243d
    • aroben@apple.com's avatar
      Windows build fix · f50ba2f5
      aroben@apple.com authored
              * WebKit.vcproj/WebKit.def: Export fastZeroedMalloc.
              * WebKit.vcproj/WebKit_debug.def: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f50ba2f5
    • aroben@apple.com's avatar
      Build fix · 11558081
      aroben@apple.com authored
              * wtf/FastMalloc.h: Add missing using statement.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      11558081
    • oliver's avatar
      Add special fastZeroedMalloc function to replace a · aed0ae6d
      oliver authored
      number of fastCalloc calls where one argument was 1.
      
      Reviewed by Darin.
      
      This results in a 0.4% progression in SunSpider, more
      than making up for the earlier regression caused by
      additional overflow checks.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aed0ae6d
  2. 11 Nov, 2007 16 commits
    • aroben@apple.com's avatar
      Fix <rdar://5578982> ASSERT in... · 390aaf4f
      aroben@apple.com authored
              Fix <rdar://5578982> ASSERT in HashTable::checkTableConsistencyExceptSize beneath WebNotificationCenter
      
              The bug was due to a mismatch between HashMap::remove and
              HashTable::checkTableConsistency. HashMap::remove can delete the value
              stored in the HashTable (by derefing it), which is not normally
              allowed by HashTable. It's OK in this case because the value is about
              to be removed from the table, but HashTable wasn't aware of this.
      
              HashMap::remove now performs the consistency check itself before
              derefing the value.
      
              Darin noticed that the same bug would occur in HashSet, so I've fixed
              it there as well.
      
              Reviewed by Darin.
      
              * wtf/HashMap.h:
              (WTF::HashMap::remove): Perform the HashTable consistency check
              manually before calling deref.
              * wtf/HashSet.h:
              (WTF::HashSet::remove): Ditto.
              * wtf/HashTable.h: Made checkTableConsistency public so that HashMap
              and HashSet can call it.
              (WTF::HashTable::removeAndInvalidateWithoutEntryConsistencyCheck):
              Added.
              (WTF::HashTable::removeAndInvalidate): Added.
              (WTF::HashTable::remove):
              (WTF::HashTable::removeWithoutEntryConsistencyCheck): Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      390aaf4f
    • mrowe@apple.com's avatar
      Roll out r27708 as it breaks the Mac PowerPC build. · c05214d7
      mrowe@apple.com authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c05214d7
    • mrowe@apple.com's avatar
      2007-11-11 Mike Hommey <mh+webkit@glandium.org> · 383057a9
      mrowe@apple.com authored
              Reviewed by Maciej.
      
              Fix http://bugs.webkit.org/show_bug.cgi?id=14521
              Bug 14521: JavaScriptCore fails to build on Linux/PPC gcc 4.1.2
      
              * wtf/TCSpinLock.h:
              (TCMalloc_SpinLock::Unlock): Change constraint from o to m.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27708 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      383057a9
    • mrowe@apple.com's avatar
      2007-11-11 Justin Haygood <jhaygood@reaktix.com> · 6f520711
      mrowe@apple.com authored
              Reviewed by Adam Roben.
      
              http://bugs.webkit.org/show_bug.cgi?id=15939
              Adds a currentThread API for use by SQLiteDatabase, etc.
      
              * platform/Threading.h:
              * platform/ThreadingNone.cpp:
              (WebCore::currentThread):
              * platform/gtk/ThreadingGtk.cpp:
              (WebCore::identifierByGthreadHandle):
              (WebCore::):
              * platform/pthreads/ThreadingPthreads.cpp:
              (WebCore::identifierByPthreadHandle):
              (WebCore::currentThread):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f520711
    • mitz@apple.com's avatar
      WebCore: · cb71b59e
      mitz@apple.com authored
              Reviewed by Adam Roben.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=15942
                REGRESSION: Selecting "Edit Html" tab in Blogger causes crash (Assertion failed: isRange())
      
              Test: editing/selection/cleared-by-relayout.html
      
              * editing/Selection.cpp:
              (WebCore::Selection::toRange): Check if the selection has been cleared
              by updating layout.
      
      LayoutTests:
      
              Reviewed by Adam Roben.
      
              - test for http://bugs.webkit.org/show_bug.cgi?id=15942
                REGRESSION: Selecting "Edit Html" tab in Blogger causes crash (Assertion failed: isRange())
      
              * editing/selection/cleared-by-relayout-expected.txt: Added.
              * editing/selection/cleared-by-relayout.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb71b59e
    • darin@apple.com's avatar
      Reviewed by Mark Rowe. · 4dfc68a2
      darin@apple.com authored
              - fix line numbers that were off since my recent patch
      
              * platform/SegmentedString.h:
              (WebCore::SegmentedSubstring::SegmentedSubstring): Reversed the sense of m_excludeLineNumbers
              and rename it to m_doNotExcludeLineNumbers.
              (WebCore::SegmentedSubstring::excludeLineNumbers): Updated.
              (WebCore::SegmentedSubstring::doNotExcludeLineNumbers): Added.
              (WebCore::SegmentedSubstring::setExcludeLineNumbers): Updated.
              (WebCore::SegmentedString::advance): Use doNotExcludeLineNumbers to reverse the sense and fix
              the regression, but keep the speediness. I accidentally had removed a ! here.
      
              * platform/SegmentedString.cpp:
              (WebCore::SegmentedString::advanceSlowCase): Use doNotExcludeLineNumbers.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4dfc68a2
    • oliver's avatar
      Fix for <rdar://problem/5585334> · b1bdd112
      oliver authored
      Reviewed by Darin.
      
      Fix for <rdar://problem/5585334> numfuzz: integer overflows opening
      malformed SVG file in WebCore::ImageBuffer::create. Add protection
      against a potential overflow.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b1bdd112
    • mrowe@apple.com's avatar
      2007-11-11 Mark Rowe <mrowe@apple.com> · 3f065f4a
      mrowe@apple.com authored
              Build fix.  Use the correct filename case.
      
              * kjs/nodes.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f065f4a
    • ggaren@apple.com's avatar
      Reviewed by Sam Weinig. · a862ba22
      ggaren@apple.com authored
              
              Fixed http://bugs.webkit.org/show_bug.cgi?id=15902
              15% of string-validate-input.js is spent compiling the same regular expression
              
              Store a compiled representation of the regular expression in the AST.
              
              Only a .2% SunSpider speedup overall, but a 10.6% speedup on 
              string-validate-input.js.
      
              * kjs/nodes.cpp:
              (KJS::RegExpNode::evaluate):
              * kjs/nodes.h:
              (KJS::RegExpNode::):
              * kjs/nodes2string.cpp:
              (KJS::RegExpNode::streamTo):
              * kjs/regexp.cpp:
              (KJS::RegExp::flags):
              * kjs/regexp.h:
              (KJS::RegExp::pattern):
              * kjs/regexp_object.cpp:
              (KJS::RegExpObjectImp::construct):
              (KJS::RegExpObjectImp::createRegExpImp):
              * kjs/regexp_object.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a862ba22
    • antti@apple.com's avatar
      Reviewed by Darin. · acca0adc
      antti@apple.com authored
              Fix a bunch of cases where the exception code is checked by the function but is not zeroed first.
      
              * bindings/js/kjs_binding.cpp:
              (KJS::setDOMException):
              * dom/Attr.cpp:
              (WebCore::Attr::setPrefix):
              * dom/Document.cpp:
              (WebCore::Document::createElement):
              * dom/Element.cpp:
              (WebCore::Element::setPrefix):
              * dom/Range.cpp:
              (WebCore::Range::setStart):
              (WebCore::Range::setEnd):
              (WebCore::Range::isPointInRange):
              (WebCore::Range::comparePoint):
              (WebCore::Range::compareBoundaryPoints):
              (WebCore::Range::deleteContents):
              (WebCore::Range::processContents):
              (WebCore::Range::extractContents):
              (WebCore::Range::insertNode):
              (WebCore::Range::setStartAfter):
              (WebCore::Range::setEndBefore):
              (WebCore::Range::setEndAfter):
              (WebCore::Range::selectNode):
              (WebCore::Range::surroundContents):
              (WebCore::Range::setStartBefore):
              * editing/TextIterator.cpp:
              (WebCore::TextIterator::TextIterator):
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::createPattern):
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::play):
              (WebCore::HTMLMediaElement::pause):
              * html/HTMLSelectElement.cpp:
              (WebCore::HTMLSelectElement::add):
              (WebCore::HTMLSelectElement::setOption):
              * xml/XPathEvaluator.cpp:
              (WebCore::XPathEvaluator::evaluate):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      acca0adc
    • darin@apple.com's avatar
      Reviewed by Mitz. · 268b841c
      darin@apple.com authored
              - http://bugs.webkit.org/show_bug.cgi?id=15945
                speed up GraphicsContextCG typical case by skipping roundToDevicePixels
      
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::restorePlatformState): Clear the flag since we no
              longer know if the transform is identity or not.
              (WebCore::GraphicsContext::strokeArc): Removed an extra set of redundant
              CGContextSave/RestoreGState.
              (WebCore::GraphicsContext::beginTransparencyLayer): Clear the flag since we no
              longer know if the transform is identity or not.
              (WebCore::GraphicsContext::endTransparencyLayer): Ditto.
              (WebCore::GraphicsContext::scale): Ditto.
              (WebCore::GraphicsContext::rotate): Ditto.
              (WebCore::GraphicsContext::translate): Ditto.
              (WebCore::GraphicsContext::concatCTM): Ditto.
              (WebCore::GraphicsContext::roundToDevicePixels): Return quickly if the transform
              is known to be identity, and record that fact when we discover it otherwise.
      
              * platform/graphics/cg/GraphicsContextPlatformPrivate.h:
              (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
              Added a m_userToDeviceTransformKnownToBeIdentity flag, initialized to false.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      268b841c
    • darin@apple.com's avatar
      Reviewed by Mitz. · 5c1c7586
      darin@apple.com authored
              - http://bugs.webkit.org/show_bug.cgi?id=15944
                streamline SegmentedString to speed up parsing
      
              I measured a speed-up of the page load test while developing this patch. I don't
              have a precise figure, though.
      
              * html/HTMLTokenizer.h: Removed unneeded lineNumberPtr() function. Also renamed
              lineno to m_lineNumber.
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::processListing): Don't pass 0 to the advance function
              since we don't want to update a line number.
              (WebCore::HTMLTokenizer::parseSpecial): Ditto.
              (WebCore::HTMLTokenizer::parseComment): Pass the line number data member directly
              instead of lineNumberPtr() since the advance function now takes a reference.
              (WebCore::HTMLTokenizer::parseServer): Ditto.
              (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
              (WebCore::HTMLTokenizer::parseText): Ditto.
              (WebCore::HTMLTokenizer::parseEntity): Ditto.
              (WebCore::HTMLTokenizer::parseTag): Ditto.
              (WebCore::HTMLTokenizer::write): Ditto.
      
              * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryTokenizer::write):
              * loader/TextDocument.cpp: (WebCore::TextTokenizer::write):
              Don't pass 0 to the advance function.
      
              * platform/SegmentedString.h: (WebCore::SegmentedString::advance): Streamlined
              the most common case, and pushed less common cases into a separate function
              that is not inlined. Also got rid of a branch by separating the case with a
              line number from the case without one.
      
              * platform/SegmentedString.cpp: (WebCore::SegmentedString::advanceSlowCase):
              Added. The aforementioned less common cases are here.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c1c7586
    • oliver's avatar
      Partial fix for <rdar://problem/5585334> numfuzz: integer overflows opening... · ef506fee
      oliver authored
      Partial fix for <rdar://problem/5585334> numfuzz: integer overflows opening malformed SVG file in WebCore::ImageBuffer::create
      
      Reviewed By Eric.
      
      Unfortunately this is a very slight regression, but is unavoidable.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ef506fee
    • antti@apple.com's avatar
      Forgot to do this review change (and test HTTP commit). · 2a958c78
      antti@apple.com authored
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::play):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2a958c78
    • antti's avatar
      WebCore: · 2e25dae5
      antti authored
              Reviewed by Darin.
              
              - Update play() and pause() to match current HTML5 draft
                  - send events asynchronously
                  - add timeupdate event to pause
                  - rethrow load() exception, not others
              - Use list for async events to get ordering right
      
              Tests: media/video-pause-empty-events.html
                     media/video-play-empty-events.html
                     media/video-play-pause-events.html
                     media/video-play-pause-exception.html
      
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::dispatchEventAsync): 
              (WebCore::HTMLMediaElement::asyncEventTimerFired):
              (WebCore::HTMLMediaElement::play):
              (WebCore::HTMLMediaElement::pause):
              * html/HTMLMediaElement.h:
      
      LayoutTests:
      
              Reviewed by Darin.
              
              Add tests for play() and pause() events. 
              Update one test to match new behavior.
      
              * media/video-currentTime-expected.txt:
              * media/video-currentTime.html:
              * media/video-pause-empty-events-expected.txt: Added.
              * media/video-pause-empty-events.html: Added.
              * media/video-play-empty-events-expected.txt: Added.
              * media/video-play-empty-events.html: Added.
              * media/video-play-pause-events-expected.txt: Added.
              * media/video-play-pause-events.html: Added.
              * media/video-play-pause-exception-expected.txt: Added
              * media/video-play-pause-exception.html: Added
              * media/video-test.js:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e25dae5
    • eseidel's avatar
      2007-11-10 Eric Seidel <eric@webkit.org> · dc7c497d
      eseidel authored
              Reviewed by darin.
      
              Add simple type inferencing to the parser, and create custom
              AddNode and LessNode subclasses based on inferred types.
              http://bugs.webkit.org/show_bug.cgi?id=15884
      
              SunSpider claims this is at least a 0.5% speedup.
      
              * JavaScriptCore.exp:
              * kjs/grammar.y:
              * kjs/internal.cpp:
              (KJS::NumberImp::getPrimitiveNumber):
              (KJS::GetterSetterImp::getPrimitiveNumber):
              * kjs/internal.h:
              * kjs/lexer.cpp:
              (KJS::Lexer::lex):
              * kjs/nodes.cpp:
              (KJS::Node::Node):
              (KJS::StringNode::evaluate):
              (KJS::StringNode::evaluateToNumber):
              (KJS::StringNode::evaluateToBoolean):
              (KJS::RegExpNode::evaluate):
              (KJS::UnaryPlusNode::optimizeVariableAccess):
              (KJS::AddNode::evaluate):
              (KJS::AddNode::evaluateToNumber):
              (KJS::AddNumbersNode::inlineEvaluateToNumber):
              (KJS::AddNumbersNode::evaluate):
              (KJS::AddNumbersNode::evaluateToNumber):
              (KJS::AddStringsNode::evaluate):
              (KJS::AddStringLeftNode::evaluate):
              (KJS::AddStringRightNode::evaluate):
              (KJS::lessThan):
              (KJS::lessThanEq):
              (KJS::LessNumbersNode::evaluate):
              (KJS::LessStringsNode::evaluate):
              * kjs/nodes.h:
              (KJS::ExpressionNode::):
              (KJS::RegExpNode::):
              (KJS::RegExpNode::precedence):
              (KJS::TypeOfResolveNode::):
              (KJS::LocalVarTypeOfNode::):
              (KJS::UnaryPlusNode::):
              (KJS::UnaryPlusNode::precedence):
              (KJS::AddNode::):
              (KJS::AddNode::precedence):
              (KJS::AddNumbersNode::):
              (KJS::AddStringLeftNode::):
              (KJS::AddStringRightNode::):
              (KJS::AddStringsNode::):
              (KJS::LessNode::):
              (KJS::LessNode::precedence):
              (KJS::LessNumbersNode::):
              (KJS::LessStringsNode::):
              * kjs/nodes2string.cpp:
              (KJS::StringNode::streamTo):
              * kjs/object.cpp:
              * kjs/object.h:
              * kjs/value.h:
              (KJS::JSValue::getPrimitiveNumber):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dc7c497d