1. 11 Nov, 2007 3 commits
    • darin@apple.com's avatar
      JavaScriptCore: · ee752e7d
      darin@apple.com authored
              Reviewed by Sam.
      
              - http://bugs.webkit.org/show_bug.cgi?id=15924
                next round of changes to JSRegExp (formerly PCRE)
      
              This is a combination of converting to C++, tweaking the API, and adding
              some additional optimizations.
      
              Future steps will involve getting rid of the use of UTF-8 completely
              (we'll use UTF-16 exclusively instead), eliminating more source files,
              and some more speed-ups.
      
              SunSpider says the current round is an 0.9% speed-up overall, and a
              5.3% speed-up for regexp.
      
              * JavaScriptCore.exp: Updated for new entry points.
      
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.vcproj/dftables/dftables.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * jscore.bkl:
              Updated for new source file names and ForwardingHeaders.
      
              * kjs/regexp.cpp:
              (KJS::RegExp::RegExp): Changed to use the error message without calling
              strdup on it and to pass the new types and options.
              (KJS::RegExp::~RegExp): Removed the now-unneeded free of the error message.
              (KJS::RegExp::match): Pass the new types and options.
              * kjs/regexp.h: Update type of m_constructionError.
      
              * pcre/AUTHORS: Update to reflect the status of the project -- we don't include
              the Google parts, and this isn't the PCRE library, per se.
              * pcre/COPYING: Ditto.
      
              * pcre/dftables.cpp: Copied from JavaScriptCore/pcre/dftables.c.
              (main): Removed unneeded ctype_digit.
      
              * pcre/pcre.h: Convert to C++, tweak API a bit. Use UChar instead of JSRegExpChar.
      
              * pcre/pcre_compile.cpp: Copied from JavaScriptCore/pcre/pcre_compile.c.
              Moved a lot of private stuff used only within this file here from pcre_internal.h.
              Renumbered the error codes.
              (error_text): Use a single string with embedded nulls for the error text (I got
              this idea from newer versions of PCRE).
              (check_escape): Changed return type to be enum instead of int. Replaced ctype_digit
              uses with isASCIIDigit.
              (is_counted_repeat): Ditto.
              (read_repeat_counts): Ditto.
              (first_significant_code): Ditto.
              (find_fixedlength): Ditto.
              (could_be_empty_branch): Ditto.
              (compile_branch): Ditto. Also removed some code that handles changing options.
              JavaScript doesn't have any of the features that allow options to change.
              (compile_regex): Updated for change to options parameter.
              (is_anchored): Ditto.
              (find_firstassertedchar): Ditto.
              (jsRegExpCompile): Changed to take separate flags instead of an options int.
              Also changed to call new/delete instead of pcre_malloc/free.
              (jsRegExpFree): Ditto.
      
              * pcre/pcre_exec.cpp: Copied from JavaScriptCore/pcre/pcre_exec.c.
              Added a case that uses computed goto for the opcode loop, but did not turn it on.
              Changed the RMATCH macro to handle returns more efficiently by putting the where
              pointer in the new frame instead of the old one, allowing us to branch to the
              return with a single statement. Switched to new/delete from pcre_malloc/free.
              Changed many RRETURN callers to not set the return value since it's already
              set correctly. Replaced the rrc variable with an is_match variable. Values other
              than "match" and "no match" are now handled differently. This allows us to remove
              the code to check for those cases in various rules.
              (match): All the case statements use a macro BEGIN_OPCODE instead. And all the
              continue statements, or break statements that break out of the outer case use
              a macro NEXT_OPCODE instead. Replaced a few if statements with assertions.
              (jsRegExpExecute): Use new/delete instead of pcre_malloc/free. Removed unused
              start_match field from the match block.
      
              * pcre/pcre_internal.h: Moved the last few configuration macros from pcre-config.h
              in here. Removed various unused types. Converted from JSRegExpChar to UChar.
              Eliminated pcre_malloc/free. Replaced the opcode enum with a macro that can be
              used in multiple places. Unfortunately we lose the comments for each opcode; we
              should find a place to put those back. Removed ctype_digit.
      
              * pcre/pcre_maketables.cpp: Copied from JavaScriptCore/pcre/pcre_maketables.c.
              (pcre_maketables): Got rid of the conditional code that allows this to be compiled
              in -- it's only used for dftables now (and soon may be obsolete entirely).
              Changed code for cbit_digit to not use isdigit, and took the "_" case out of the
              loop. Removed ctype_digit.
      
              * pcre/pcre_ord2utf8.cpp: Copied from JavaScriptCore/pcre/pcre_ord2utf8.c.
      
              * pcre/pcre_tables.cpp: Copied from JavaScriptCore/pcre/pcre_tables.c.
              Moved _pcre_OP_lengths out of here into pcre_exec.cpp.
      
              * pcre/pcre_ucp_searchfuncs.cpp: Copied from JavaScriptCore/pcre/pcre_ucp_searchfuncs.c.
              Updated for other file name changes.
      
              * pcre/pcre_xclass.cpp: Copied from JavaScriptCore/pcre/pcre_xclass.c.
      
              * pcre/ucpinternal.h: Updated header.
      
              * pcre/ucptable.cpp: Copied from JavaScriptCore/pcre/ucptable.c.
      
              * wtf/ASCIICType.h: (WTF::isASCIIDigit): Removed a branch by changing from && to
              & for this operation. Also added an overload that takes an int because that's
              useful for PCRE. Later we could optimize for int and overload other functions in
              this file; stuck to this simple one for now.
      
              * wtf/unicode/icu/UnicodeIcu.h: Removed unused isUpper.
              * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
      
              * pcre/LICENCE: Removed.
              * pcre/pcre-config.h: Removed.
              * wtf/FastMallocPCRE.cpp: Removed.
      
              * pcre/dftables.c: Renamed to cpp.
              * pcre/pcre_compile.c: Ditto.
              * pcre/pcre_exec.c: Ditto.
              * pcre/pcre_maketables.c: Ditto.
              * pcre/pcre_ord2utf8.c: Ditto.
              * pcre/pcre_tables.c: Ditto.
              * pcre/pcre_ucp_searchfuncs.c: Ditto.
              * pcre/pcre_xclass.c: Ditto.
              * pcre/ucptable.c: Ditto.
      
      WebCore:
      
              Reviewed by Sam.
      
              - updated for JSRegExp function changes
      
              * platform/RegularExpression.cpp:
              (WebCore::RegularExpression::Private::compile):
              (WebCore::RegularExpression::match):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee752e7d
    • alp@webkit.org's avatar
      2007-11-11 Alp Toker <alp@atoker.com> · 059734cf
      alp@webkit.org authored
              Reviewed by Mark Rowe.
      
              Mention Safari in the UserAgent string to improve site compatibility.
      
              Also bump the hard-coded AppleWebKit version number.
      
              * WebCoreSupport/FrameLoaderClientGtk.cpp:
              (WebKit::composeUserAgent):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      059734cf
    • eseidel's avatar
      2007-11-11 Eric Seidel <eric@webkit.org> · 06d70621
      eseidel authored
              Reviewed by Oliver.
      
              Add KJS_CHECKEXCEPTIONBOOLEAN to match rest of nodes.cpp
      
              * kjs/nodes.cpp:
              (KJS::ExpressionNode::evaluateToBoolean):
              (KJS::LessNode::evaluateToBoolean):
              (KJS::GreaterNode::evaluateToBoolean):
              (KJS::LessEqNode::evaluateToBoolean):
              (KJS::GreaterEqNode::evaluateToBoolean):
              (KJS::InstanceOfNode::evaluateToBoolean):
              (KJS::InNode::evaluateToBoolean):
              (KJS::EqualNode::evaluateToBoolean):
              (KJS::NotEqualNode::evaluateToBoolean):
              (KJS::StrictEqualNode::evaluateToBoolean):
              (KJS::NotStrictEqualNode::evaluateToBoolean):
              (KJS::LogicalAndNode::evaluateToBoolean):
              (KJS::LogicalOrNode::evaluateToBoolean):
              (KJS::ConditionalNode::evaluateToBoolean):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      06d70621
  2. 10 Nov, 2007 22 commits
  3. 09 Nov, 2007 15 commits
    • honeycutt's avatar
      2007-11-09 Jon Honeycutt <jhoneycutt@apple.com> · 6ef9d628
      honeycutt authored
              Reviewed by Sam.
      
              <rdar://5585900>: Safari crashes when selected in context menu to open
              audio format files (au, aif) with QT 7.3
      
              The crash occurred on a machine where QT 7.3 was failing to initialize.
              The fix is to avoid sending streams to full-page plugins that've failed 
              to load
      
              * WebFrame.cpp:
              (WebFrame::finishedLoading): Check plugin status before calling manual
              stream methods
              (WebFrame::setMainDocumentError): Same
              (WebFrame::committedLoad): Same
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6ef9d628
    • antti's avatar
      Rubber stamped by bdash. · bee98fe2
      antti authored
              
              Add directory for blog resources (and one image).
      
              * blog-files: Added.
              * blog-files/touch-poster.png: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bee98fe2
    • antti's avatar
      Reviewed by Adele. · 8eecdc68
      antti authored
              Fix occasional blank video with poster attribute.
      
              * ChangeLog:
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::load):
              (WebCore::HTMLMediaElement::didRestoreFromCache):
              Just calling updateFromElement() does the right thing for both poster image and video.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8eecdc68
    • alp@webkit.org's avatar
      2007-11-09 Xan Lopez <xan@gnome.org> · 657aafdb
      alp@webkit.org authored
              Reviewed by Alp.
      
              Fix http://bugs.webkit.org/show_bug.cgi?id=15926
              [GTK] WebKitPage map handler is redundant.
      
              * Api/webkitgtkpage.cpp:
              The map handler for WebKitPage is redundant, GtkContainer does
              the same (and more correctly).
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      657aafdb
    • tristan's avatar
      Reviewed by Sam Weinig. · 5decd396
      tristan authored
              * fast/dom/Window/window-resize-nan.html: Removed.
              * fast/dom/Window/window-resize-nan.html-disabled: Copied from fast/dom/Window/window-resize-nan.html.
              
              Disabled nan test until window resize issues can be resolved.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5decd396
    • weinig's avatar
      Rubber stamped by Oliver. · 957c105f
      weinig authored
              Make WebCore a dependency of Interfaces.
      
              * WebKit.vcproj/WebKit.sln:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      957c105f
    • weinig's avatar
      WebCore: · 38baa376
      weinig authored
              Reviewed by Adam Roben.
      
              <rdar://problem/5435940>
              The COM bindings for the DOM should be autogenerated like the other DOM bindings
      
              Initial commit of the autogeneration of the COM DOM Bindings.  No behavior change
              is being introduced in this patch and to insure that no conflicts arise, a temporary
              prefix of "GEN_" has been used for all the new classes.
      
              The build architecture for these bindings differs slightly from the other autogenerated
              bindings.  Instead of building in WebCore and migrating the resuting code to WebKit (as
              is done for the Objective-C bindigs currently), the IDLs and generation scripts are
              migrated to WebKit and built there.  This is done with a series of scripts and Makefiles.
      
              This commit includes:
                  - Hand rolled root class/Interface GEN_DOMObject used to facilated object creation
                    and ref-counting.
                  - Generating all of the Core DOM and most of HTML and CSS
                  - Generating Event, EventTarget, and EventListener
      
              * WebCore.vcproj/MigrateIDLAndScripts.make: Added.
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.vcproj/migrate-idls.sh: Added.
              * bindings/scripts/CodeGenerator.pm:
              * bindings/scripts/CodeGeneratorCOM.pm: Added.
              * dom/EventListener.h: Make the isWindowEvent parameter default to false
              to allow autogeneration based on the IDL.
      
      WebKit/win:
      
              Reviewed by Adam Roben.
      
              <rdar://problem/5435940>
              The COM bindings for the DOM should be autogenerated like the other DOM bindings
      
              Initial commit of the autogeneration of the COM DOM Bindings.  No behavior change
              is being introduced in this patch and to insure that no conflicts arise, a temporary
              prefix of "GEN_" has been used for all the new classes.
      
              The build architecture for these bindings differs slightly from the other autogenerated
              bindings.  Instead of building in WebCore and migrating the resuting code to WebKit (as
              is done for the Objective-C bindigs currently), the IDLs and generation scripts are
              migrated to WebKit and built there.  This is done with a series of scripts and Makefiles.
      
              This commit includes:
                  - Hand rolled root class/Interface GEN_DOMObject used to facilated object creation
                    and ref-counting.
                  - Generating all of the Core DOM and most of HTML and CSS
                  - Generating Event, EventTarget, and EventListener
      
              * DOMCreateInstance.cpp: Added.
              (domWrapperCache):
              (getDOMWrapper):
              (setDOMWrapper):
              (removeDOMWrapper):
              (GEN_DOMNode::createInstance):
              (GEN_DOMImplementation::createInstance):
              (GEN_DOMCSSRule::createInstance):
              (GEN_DOMStyleSheet::createInstance):
              (GEN_DOMCSSValue::createInstance):
              * DOMCreateInstance.h: Added.
              Temporary location for createInstance/object caching methods.  This will be broken up
              into seperate files in the near future.
      
              * GEN_DOMObject.cpp: Added.
              (GEN_DOMObject::GEN_DOMObject):
              (GEN_DOMObject::~GEN_DOMObject):
              (GEN_DOMObject::QueryInterface):
              (GEN_DOMObject::AddRef):
              (GEN_DOMObject::Release):
              * GEN_DOMObject.h: Added.
              Hand rolled base class.
      
              * Interfaces/IGEN_DOMObject.idl: Added. 
              Hand rolled base interface.
      
              * WebKit.vcproj/DerivedSources.make: Added.
              * WebKit.vcproj/FixMIDLHeaders.pl: Added.
              This script is required because MIDL is producing un-buildable code due to
              circular dependencies.
      
              * WebKit.vcproj/Interfaces.vcproj:
              * WebKit.vcproj/WebKit.vcproj:
              * WebKit.vcproj/WebKitGUID.vcproj:
              * WebKit.vcproj/build-generated-files.sh: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38baa376
    • tristan's avatar
      mac: · 7489b5a6
      tristan authored
              Reviewed by Timothy Hatcher.
              
              This patch is for the WebKit side of <rdar://problem/5591115>.
              We need a way to tell context menu navigations, such as "Open in New Window"
              to override any sort of browser preference for tab based navigation.
      
              * WebCoreSupport/WebChromeClient.mm:
              (WebChromeClient::createWindow):
              Pass up the new preferredType parameter as a string.
      
      WebCore:
      
              Reviewed by Timothy Hatcher.
              
              This patch is for the WebKit side of <rdar://problem/5591115>.
              We need a way to tell context menu navigations, such as "Open in New Window"
              to override any sort of browser preference for tab based navigation.
      
              * bridge/WindowFeatures.h:
              (WebCore::WindowFeatures::WindowFeatures):
              Added a new struct member var, preferredType
              and an accompanying enum type PreferredType
              to send a window type recommendation up to the Chrome. 
              
              * page/ContextMenuController.cpp:
              (WebCore::openNewWindow):
              Set the window features to recommend a new Window for
              "Open in New Window" context menu action.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7489b5a6
    • timothy@apple.com's avatar
      Reviewed by John. · 016eed14
      timothy@apple.com authored
              <rdar://problem/5103720> REGRESSION: [WebView stringByEvaluatingJavaScriptFromString:] fails if "return" is used
      
              Extend the linked on or after check to every application when a script passed to
              stringByEvaluatingJavaScriptFromString: has a return statement. Before the check
              was limited to VitalSource Bookshelf, but other developers are running into this.
      
              * Misc/WebKitVersionChecks.h: Add the WEBKIT_FIRST_VERSION_WITHOUT_JAVASCRIPT_RETURN_QUIRK define.
              * WebView/WebDocumentLoaderMac.mm:
              (needsDataLoadWorkaround): Use WEBKIT_FIRST_VERSION_WITHOUT_ADOBE_INSTALLER_QUIRK sicne the
                WebKitLinkedOnOrAfter check here was about the Adobe installer, not VitalSource.
              * WebView/WebView.mm:
              (-[WebView stringByEvaluatingJavaScriptFromString:]): Remove the bundle ID check and use
                WEBKIT_FIRST_VERSION_WITHOUT_JAVASCRIPT_RETURN_QUIRK for the WebKitLinkedOnOrAfter call.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      016eed14
    • aroben@apple.com's avatar
      Fix <rdar://5483519> Pressing Enter on selected buttons should fire onclick · 745cedc5
      aroben@apple.com authored
       LayoutTests:
      
               Add a test for <rdar://5483519> Pressing Enter on selected buttons should fire onclick
      
               Reviewed by Adele.
      
               * fast/forms/enter-clicks-buttons-expected.txt: Added.
               * fast/forms/enter-clicks-buttons.html: Added.
      
       WebCore:
      
               Fix <rdar://5483519> Pressing Enter on selected buttons should fire onclick
      
               We now match the behavior of Firefox and IE, which is to always just
               send a click event to the focused button when the Enter key is pressed
               (previously we were submitting forms directly in some cases).
      
               Reviewed by Adele.
      
               Test: fast/forms/enter-clicks-buttons.html
      
               * html/HTMLButtonElement.cpp:
               (WebCore::HTMLButtonElement::defaultEventHandler): Don't do anything
               fancy when Enter is pressed on a <button type=button> -- just send a
               click event like we do for other button types.
               * html/HTMLInputElement.cpp:
               (WebCore::HTMLInputElement::defaultEventHandler): Treat type=button
               the same way we treat type=submit and type=reset: just send a click
               event when Enter is pressed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      745cedc5
    • mitz@apple.com's avatar
      WebCore: · 5a4bdf3e
      mitz@apple.com authored
              Reviewed by Antti Koivisto.
      
              - fix a bug in invisible layer culling: dynamically changing a 
                descendant of an invisible layer to be visible did not work
      
              Test: fast/layers/layer-content-visibility-change.html
      
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::setHasVisibleContent): If we got visible content,
              make sure that our stacking context rebuilds its z-order lists to
              include us.
      
      LayoutTests:
      
              Reviewed by Antti Koivisto.
      
              - test that dynamically changing a descendant of an invisible layer to
                be visible works
      
              * fast/layers/layer-content-visibility-change.html: Added.
              * platform/mac/fast/layers/layer-content-visibility-change-expected.checksum: Added.
              * platform/mac/fast/layers/layer-content-visibility-change-expected.png: Added.
              * platform/mac/fast/layers/layer-content-visibility-change-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5a4bdf3e
    • hyatt's avatar
      Clean up matrix() parsing. Make sure the first four arguments can be... · 356b4e99
      hyatt authored
              Clean up matrix() parsing.  Make sure the first four arguments can be lengths or numbers.  The last two
              args can be lengths or numbers or percents.
      
              Reviewed by Beth
      
              * WebCore.xcodeproj/project.pbxproj:
              * css/CSSParser.cpp:
              (WebCore::TransformOperationInfo::TransformOperationInfo):
              (WebCore::CSSParser::parseTransform):
              * rendering/RenderStyle.h:
              (WebCore::MatrixTransformOperation::apply):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      356b4e99
    • bdakin@apple.com's avatar
      WebCore: · 58730d7c
      bdakin@apple.com authored
              Reviewed by Oliver.
      
              Fix for <rdar://problem/5586370> CSS Transform - incorrect matrix 
              math leads to crazy problems
      
              Transform matrices accept the first four parameters as CSS lengths. 
              CSS lengths get mapped into WebCore::Lengths as percents by 
              WebCore::convertToLength(). Percent lengths cannot call value(). It 
              does not yield a correct result and it asserts on Debug builds. 
      
              * rendering/RenderStyle.h:
              (WebCore::MatrixTransformOperation::apply): Instead of calling 
              value() on the lengths, call calcValue. This fixes the assert and 
              the bad rendering. 
      
      LayoutTests:
      
              Reviewed by Oliver.
      
              Test for <rdar://problem/5586370> CSS Transform - incorrect matrix 
              math leads to crazy problems
      
              * fast/transforms/identity-matrix.html: Added.
              * platform/mac/fast/transforms/identity-matrix-expected.checksum: Added.
              * platform/mac/fast/transforms/identity-matrix-expected.png: Added.
              * platform/mac/fast/transforms/identity-matrix-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58730d7c
    • aroben@apple.com's avatar
      Windows build fix · 1e4fcfd2
      aroben@apple.com authored
              Reviewed by Darin.
      
              * kjs/value.h:
              (KJS::jsNumber): Add some explicit casts.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1e4fcfd2
    • sfalken's avatar
      Roll out r27641 since the same bug was already fixed by r27568. · bd242c87
      sfalken authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd242c87