1. 19 Feb, 2011 26 commits
    • barraclough@apple.com's avatar
      Bug 54786 - Devirtualize JSCell::classInfo() · a5540da1
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      Instead of making a virtual function call, add a pointer to the ClassInfo
      onto Structure.
      
      This removes a virtual function call, and paves the way towards removing all
      the createStructure methods, and StructureFlags/AnonymousSlotCount properties
      (these should be able to move onto ClassInfo).
      
      Calls to Structure::create must now pass a pointer to the ClassInfo for the
      structure. All objects now have a ClassInfo pointer, non-object cell types
      still do not.
      
      Changes are most mechanical, involving three steps:
          * Remove virtual classInfo() methods.
          * Add &s_info parameter to calls to Structure::create.
          * Rename ClassInfo static members on classes from 'info' to 's_info',
            for consistency.
      
      Source/JavaScriptCore: 
      
      * API/JSCallbackConstructor.cpp:
      * API/JSCallbackConstructor.h:
      * API/JSCallbackFunction.cpp:
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.cpp:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      * API/JSObjectRef.cpp:
      * API/JSValueRef.cpp:
      * API/JSWeakObjectMapRefPrivate.cpp:
      * JavaScriptCore.exp:
      * debugger/Debugger.cpp:
      * debugger/DebuggerActivation.h:
      * debugger/DebuggerCallFrame.cpp:
      * interpreter/Interpreter.cpp:
      * jit/JITCall32_64.cpp:
      * jit/JITOpcodes.cpp:
      * jit/JITStubs.cpp:
      * profiler/Profiler.cpp:
      * runtime/Arguments.cpp:
      * runtime/Arguments.h:
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayPrototype.cpp:
      * runtime/ArrayPrototype.h:
      * runtime/BooleanObject.cpp:
      * runtime/BooleanObject.h:
      * runtime/BooleanPrototype.cpp:
      * runtime/DateConstructor.cpp:
      * runtime/DateInstance.cpp:
      * runtime/DateInstance.h:
      * runtime/DatePrototype.cpp:
      * runtime/DatePrototype.h:
      * runtime/ErrorInstance.cpp:
      * runtime/ErrorInstance.h:
      * runtime/ErrorPrototype.cpp:
      * runtime/FunctionPrototype.cpp:
      * runtime/FunctionPrototype.h:
      * runtime/GetterSetter.h:
      * runtime/GlobalEvalFunction.h:
      * runtime/InternalFunction.cpp:
      * runtime/InternalFunction.h:
      * runtime/JSAPIValueWrapper.h:
      * runtime/JSActivation.cpp:
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      * runtime/JSFunction.h:
      * runtime/JSGlobalData.cpp:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      * runtime/JSONObject.h:
      * runtime/JSObject.cpp:
      * runtime/JSObject.h:
      * runtime/JSObjectWithGlobalObject.h:
      * runtime/JSPropertyNameIterator.h:
      * runtime/JSStaticScopeObject.h:
      * runtime/JSString.h:
      * runtime/JSVariableObject.h:
      * runtime/JSWrapperObject.h:
      * runtime/JSZombie.cpp:
      * runtime/JSZombie.h:
      * runtime/Lookup.cpp:
      * runtime/MathObject.cpp:
      * runtime/MathObject.h:
      * runtime/NativeErrorConstructor.cpp:
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      * runtime/NumberObject.h:
      * runtime/NumberPrototype.cpp:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectPrototype.cpp:
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpConstructor.h:
      * runtime/RegExpObject.cpp:
      * runtime/RegExpObject.h:
      * runtime/RegExpPrototype.cpp:
      * runtime/ScopeChain.cpp:
      * runtime/StringConstructor.cpp:
      * runtime/StringObject.cpp:
      * runtime/StringObject.h:
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      * runtime/StringPrototype.cpp:
      * runtime/StringPrototype.h:
      * runtime/Structure.cpp:
      * runtime/Structure.h:
      
      Source/JavaScriptGlue: 
      
      * JSUtils.cpp:
      (KJSValueToJSObject):
      (KJSValueToCFTypeInternal):
      * UserObjectImp.cpp:
      * UserObjectImp.h:
      (UserObjectImp::createStructure):
      
      Source/WebCore: 
      
      * WebCore.exp.in:
      * bindings/js/JSAudioConstructor.cpp:
      * bindings/js/JSAudioConstructor.h:
      * bindings/js/JSDOMBinding.cpp:
      * bindings/js/JSDOMBinding.h:
      * bindings/js/JSDOMGlobalObject.cpp:
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowBase.cpp:
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSGeolocationCustom.cpp:
      * bindings/js/JSImageConstructor.cpp:
      * bindings/js/JSImageConstructor.h:
      * bindings/js/JSImageDataCustom.cpp:
      * bindings/js/JSOptionConstructor.cpp:
      * bindings/js/JSOptionConstructor.h:
      * bindings/js/JSWorkerContextBase.cpp:
      * bindings/js/JSWorkerContextBase.h:
      * bindings/js/SerializedScriptValue.cpp:
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/c/CRuntimeObject.cpp:
      * bridge/c/CRuntimeObject.h:
      * bridge/c/c_instance.cpp:
      * bridge/jni/jsc/JNIUtilityPrivate.cpp:
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/jsc/BridgeJSC.cpp:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      * bridge/objc/objc_instance.mm:
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      * bridge/runtime_array.cpp:
      * bridge/runtime_array.h:
      * bridge/runtime_method.cpp:
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      * bridge/runtime_object.h:
      
      Source/WebKit/mac: 
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
      (WebKit::ProxyRuntimeMethod::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.h:
      (WebKit::ProxyRuntimeObject::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      * WebView/WebView.mm:
      (aeDescFromJSValue):
      
      Source/WebKit2: 
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::createStructure):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::createStructure):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5540da1
    • ddkilzer@apple.com's avatar
      <http://webkit.org/b/54808> Change jsc target to build directly into... · 442e0470
      ddkilzer@apple.com authored
      <http://webkit.org/b/54808> Change jsc target to build directly into JavaScriptCore.framework/Resources/jsc
      
      Reviewed by Dan Bernstein.
      
      * Configurations/Base.xcconfig: Added
      JAVASCRIPTCORE_FRAMEWORKS_DIR variable.
      * Configurations/JavaScriptCore.xcconfig: Used
      JAVASCRIPTCORE_FRAMEWORKS_DIR to define INSTALL_PATH.
      * JavaScriptCore.xcodeproj/project.pbxproj: Set the INSTALL_PATH
      for Production configuration of jsc target.
      (Copy Into Framework): Removed old build phase.
      (Fix Framework Reference): Renamed build phase to "Copy Into
      Framework".  Added "set -x" call to make the script print the
      commands it is running.  Added code to exit early for Production
      builds since this was never intended for them.  Added code to
      copy jsc into the JavaScriptCore.framework/Resources directory.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      442e0470
    • commit-queue@webkit.org's avatar
      2011-02-19 Ryuan Choi <ryuan.choi@samsung.com> · 84533426
      commit-queue@webkit.org authored
              Reviewed by Martin Robinson.
      
              [GTK] Remove mandatory Enchant dependency
              https://bugs.webkit.org/show_bug.cgi?id=51587
      
              Add enable-spellcheck option which decides whether to use enchant.
              If disabled, WebKitGTK+ will not use enchant library.
      
              * configure.ac:
      2011-02-19  Ryuan Choi  <ryuan.choi@samsung.com>
      
              Reviewed by Martin Robinson.
      
              [GTK] Remove mandatory Enchant dependency
              https://bugs.webkit.org/show_bug.cgi?id=51587
      
              Extract TextCheckerClientEnchant From EditorClientGtk and remove
              enchant dependency from other files.
      
              * GNUmakefile.am:
              * WebCoreSupport/EditorClientGtk.cpp:
              (WebKit::EditorClient::EditorClient):
              * WebCoreSupport/EditorClientGtk.h:
              (WebKit::EditorClient::textChecker):
              * WebCoreSupport/TextCheckerClientEnchant.cpp: Added.
              (WebKit::TextCheckerClientEnchant::TextCheckerClientEnchant):
              (WebKit::TextCheckerClientEnchant::~TextCheckerClientEnchant):
              (WebKit::TextCheckerClientEnchant::ignoreWordInSpellDocument):
              (WebKit::TextCheckerClientEnchant::learnWord):
              (WebKit::TextCheckerClientEnchant::checkSpellingOfString):
              (WebKit::TextCheckerClientEnchant::getAutoCorrectSuggestionForMisspelledWord):
              (WebKit::TextCheckerClientEnchant::checkGrammarOfString):
              (WebKit::TextCheckerClientEnchant::getGuessesForWord):
              (WebKit::getAvailableDictionariesCallback):
              (WebKit::TextCheckerClientEnchant::updateSpellCheckingLanguage):
              (WebKit::TextCheckerClientEnchant::freeSpellCheckingLanguage):
              * WebCoreSupport/TextCheckerClientEnchant.h: Added.
              (WebKit::TextCheckerClientEnchant::requestCheckingOfString):
              * webkit/webkitwebsettings.cpp:
              (webkit_web_settings_finalize):
              (webkit_web_settings_set_property):
              * webkit/webkitwebview.cpp:
              (webkit_web_view_settings_notify):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84533426
    • commit-queue@webkit.org's avatar
      2011-02-19 Zan Dobersek <zandobersek@gmail.com> · 957e1a23
      commit-queue@webkit.org authored
              Reviewed by Martin Robinson.
      
              [cairo][canvas] Drawing from/into float rectangles with width or height in range 0 to 1 fails
              https://bugs.webkit.org/show_bug.cgi?id=54491
      
              Enable another passing test after fixing float values rounding.
      
              * platform/gtk/Skipped:
      2011-02-19  Zan Dobersek  <zandobersek@gmail.com>
      
              Reviewed by Martin Robinson.
      
              [cairo][canvas] Drawing from/into float rectangles with width or height in range 0 to 1 fails
              https://bugs.webkit.org/show_bug.cgi?id=54491
      
              When width or height in float rectangle are in range (0, 0.5) or (-0.5, 0)
              and would round to 0, alter the behaviour to ensure that width or height are
              at least 1 pixel in size in these cases.
      
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::roundToDevicePixels):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      957e1a23
    • mitz@apple.com's avatar
      LLVM Compiler build fix. · 14fcc6d8
      mitz@apple.com authored
      * platform/graphics/ShadowBlur.cpp:
      (WebCore::ShadowBlur::blurLayerImage): Eliminated a file static that generated
      a global initializer since the compiler does not evaluate sqrtf at compile time.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      14fcc6d8
    • weinig@apple.com's avatar
      Rename performLookupAtCurrentMouseLocation to performDictionaryLookupAtCurrentMouseLocation · 14b7f57b
      weinig@apple.com authored
      Reviewed by Anders Carlsson.
      
      * UIProcess/API/mac/WKView.mm:
      (-[WKView performDictionaryLookupAtCurrentMouseLocation]):
      * UIProcess/API/mac/WKViewPrivate.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      14b7f57b
    • commit-queue@webkit.org's avatar
      2011-02-19 Siddharth Mathur <siddharth.mathur@nokia.com> · 19ae64d2
      commit-queue@webkit.org authored
              Reviewed by Laszlo Gombos.
      
              [Symbian] OSAllocator implementation for Symbian OS.
              Manages both data and code region requests. V8 and Sunspider tested
              OK with interpreter. Not tested with JSC JIT yet as it has unrelated
              failures. Also no thread safety yet.
              https://bugs.webkit.org/show_bug.cgi?id=51128
      
              * JavaScriptCore.pri: removed HAL linkage
              * wtf/Bitmap.h:
              (WTF::::findRunOfZeros): find run of zeros in a bitmap. quick n dirty
              * wtf/OSAllocator.h:
              (WTF::OSAllocator::decommitAndRelease): decommit explicitly
              * wtf/OSAllocatorSymbian.cpp: Impl. of OSAllocator interface
              (WTF::allocateCodeChunk): utility for code chunks
              (WTF::deallocateCodeChunk): utility for code chunks
              (WTF::dataAllocatorInstance): getter for data allocator instance
              (WTF::OSAllocator::reserveUncommitted):
              (WTF::OSAllocator::releaseDecommitted):
              (WTF::OSAllocator::commit):
              (WTF::OSAllocator::decommit):
              (WTF::OSAllocator::reserveAndCommit):
              (WTF::PageAllocatorSymbian::PageAllocatorSymbian): maps requests
              to one underlying Symbian chunk
              (WTF::PageAllocatorSymbian::~PageAllocatorSymbian):
              (WTF::PageAllocatorSymbian::reserve):
              (WTF::PageAllocatorSymbian::release):
              (WTF::PageAllocatorSymbian::commit):
              (WTF::PageAllocatorSymbian::decommit):
              (WTF::PageAllocatorSymbian::contains):
              * wtf/PageAllocatorSymbian.h: Added.
              (WTF::SymbianChunk::SymbianChunk): wrapper around RChunk
              (WTF::SymbianChunk::~SymbianChunk):
              (WTF::SymbianChunk::contains):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19ae64d2
    • alex@webkit.org's avatar
      2011-02-19 Alejandro G. Castro <alex@igalia.com> · f7bc4bd8
      alex@webkit.org authored
              Unreviewed, fixed typo in the GTK+ skipped file.
      
              * platform/gtk/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f7bc4bd8
    • commit-queue@webkit.org's avatar
      2011-02-19 Yong Li <yoli@rim.com> · 648ebdc0
      commit-queue@webkit.org authored
              Reviewed by Eric Seidel.
      
              https://bugs.webkit.org/show_bug.cgi?id=54687
              When being built with armcc, "int" bit fields are treated as
              unsigned integers, which will fail the comparisons like "m_offset == -1".
              Using "signed" fixes the problem.
      
              * assembler/ARMAssembler.h:
              * assembler/ARMv7Assembler.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      648ebdc0
    • commit-queue@webkit.org's avatar
      2011-02-19 Brian Ryner <bryner@chromium.org> · b5c73370
      commit-queue@webkit.org authored
              Reviewed by Adam Barth.
      
              Replace the #include of DocumentLoader.h in Document.h with a
              forward declaration, and add a missing #include now that this
              transitive include is gone.
              https://bugs.webkit.org/show_bug.cgi?id=50489
      
              No new tests required.
      
              * bindings/ScriptControllerBase.cpp:
              * dom/Document.h:
      2011-02-19  Brian Ryner  <bryner@chromium.org>
      
              Reviewed by Adam Barth.
      
              Add missing #includes of DocumentLoader.h, needed since the transitive
              include through Document.h is removed.
              https://bugs.webkit.org/show_bug.cgi?id=50489
      
              * src/WebPageSerializerImpl.cpp:
              * src/WebSearchableFormData.cpp:
      2011-02-19  Brian Ryner  <bryner@chromium.org>
      
              Reviewed by Adam Barth.
      
              Add missing #include of DocumentLoader.h, needed since the transitive
              include through Document.h is removed.
              https://bugs.webkit.org/show_bug.cgi?id=50489
      
              * WebView/WebFrame.mm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5c73370
    • paroga@webkit.org's avatar
      2011-02-19 Patrick Gansterer <paroga@webkit.org> · b4266651
      paroga@webkit.org authored
              Reviewed by Antonio Gomes.
      
              [EFL] Remove WebCore::currentTime()
              https://bugs.webkit.org/show_bug.cgi?id=53886
      
              There is no declaration for it and we use WTF::currentTime() everywhere.
      
              * platform/efl/SystemTimeEfl.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b4266651
    • paroga@webkit.org's avatar
      2011-02-19 Patrick Gansterer <paroga@webkit.org> · 9b16ef7f
      paroga@webkit.org authored
              Reviewed by Andreas Kling.
      
              Move KeygenWinCE from wince into win directory
              https://bugs.webkit.org/show_bug.cgi?id=54804
      
              Move this file into the win directory, since it can be used on all windows platforms.
      
              * CMakeListsWinCE.txt:
              * platform/win/SSLKeyGeneratorWin.cpp: Renamed from platform/wince/KeygenWinCE.cpp.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b16ef7f
    • paroga@webkit.org's avatar
      2011-02-19 Patrick Gansterer <paroga@webkit.org> · 72021567
      paroga@webkit.org authored
              Reviewed by Andreas Kling.
      
              Make WinCE a core builder
              https://bugs.webkit.org/show_bug.cgi?id=54801
      
              * Scripts/webkitpy/common/net/buildbot/buildbot.py:
              * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      72021567
    • paroga@webkit.org's avatar
      2011-02-19 Patrick Gansterer <paroga@webkit.org> · 072cf4a4
      paroga@webkit.org authored
              Reviewed by Andreas Kling.
      
              Make FileChooserWin.cpp more portable and use it on WinCE
              https://bugs.webkit.org/show_bug.cgi?id=54803
      
              * CMakeListsWinCE.txt:
              * platform/win/FileChooserWin.cpp:
              (WebCore::FileChooser::basenameForWidth):
              * platform/wince/FileChooserWinCE.cpp: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      072cf4a4
    • commit-queue@webkit.org's avatar
      2011-02-19 Benjamin Poulain <ikipou@gmail.com> · 47c5e990
      commit-queue@webkit.org authored
              Reviewed by Andreas Kling.
      
              [Qt] Enable the skipped tests combining workers and database
              https://bugs.webkit.org/show_bug.cgi?id=54802
      
              Enable the tests that do not seem to be flaky anymore.
      
              * platform/qt/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      47c5e990
    • simonjam@chromium.org's avatar
      2011-02-19 James Simonsen <simonjam@chromium.org> · 4879ffa3
      simonjam@chromium.org authored
              Reviewed by Adam Barth.
      
              Make ScriptElement match the HTML5 spec
              https://bugs.webkit.org/show_bug.cgi?id=54676
      
              This implements the "prepare a script" section of the HTML5 spec in ScriptElement::prepareScript().
              http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#prepare-a-script
      
              There are a couple of things missing from the spec that would be new functionality. These will be added later.
              - Support for async=false
              - Empty src attribute should dispatch an error.
      
              There are a couple of slight behavioral changes to match the spec.
              - An XHTML script that is loaded then copied will not fire load on the copy.
              - If onbeforeload moves the script to a different document, then it will not try to execute again because wasAlreadyStarted is true.
      
              The parsers were updated to use the new API, but not rewritten to look like the spec. That will be done separately.
      
              * fast/dom/HTMLScriptElement/move-in-beforeload.html: Original author says test was only meant to check for crashes. Beforeload is not specified by HTML5. Test was modified to assume moved script wouldn't execute because wasAlreadyStarted is set.
              * fast/dom/script-clone-rerun-src.xhtml: According to HTML5 spec, load should only fire after a script executes. Test was modified to match that. The old broken behavior was that load fired on the cloned element, even though it didn't execute.
      2011-02-19  James Simonsen  <simonjam@chromium.org>
      
              Reviewed by Adam Barth.
      
              Make ScriptElement match the HTML5 spec
              https://bugs.webkit.org/show_bug.cgi?id=54676
      
              This implements the "prepare a script" section of the HTML5 spec in ScriptElement::prepareScript().
              http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#prepare-a-script
      
              There are a couple of things missing from the spec that would be new functionality. These will be added later.
              - Support for async=false
              - Empty src attribute should dispatch an error.
      
              There are a couple of slight behavioral changes to match the spec.
              - An XHTML script that is loaded then copied will not fire load on the copy.
              - If onbeforeload moves the script to a different document, then it will not try to execute again because wasAlreadyStarted is true.
      
              The parsers were updated to use the new API, but not rewritten to look like the spec. That will be done separately.
      
              Test: All existing tests.
      
              * dom/ScriptElement.cpp: Rewritten to match HTML5 spec.
              (WebCore::ScriptElement::ScriptElement):
              (WebCore::ScriptElement::insertedIntoDocument): Logic moved to prepareScript.
              (WebCore::ScriptElement::childrenChanged): Logic moved to prepareScript.
              (WebCore::ScriptElement::handleSourceAttribute): Logic moved to prepareScript.
              (WebCore::isLegacySupportedJavaScriptLanguage): Added to support old script types in layout tests.
              (WebCore::ScriptElement::isScriptTypeSupported): Derived from old shouldExecuteAsJavaScript().
              (WebCore::ScriptElement::prepareScript): START HERE. Main change. Should read exactly like HTML5's "prepare a script." Legacy type support needed for layout tests using XML parser.
              (WebCore::ScriptElement::requestScript): Most logic moved to prepareScript. Check security settings here.
              (WebCore::ScriptElement::executeScript): Combined evaluateScript() and executeScript() from old code. Logic moved to prepareScript.
              (WebCore::ScriptElement::stopLoadRequest): Ignore parser executed scripts.
              (WebCore::ScriptElement::execute): Renamed executeScript.
              (WebCore::ScriptElement::notifyFinished): We should only listen for non-parser executed scripts.
              (WebCore::ScriptElement::ignoresLoadRequest): New variable names.
              (WebCore::ScriptElement::childrenAreCommentsOrEmptyText): Added for HTML5 compliance.
              (WebCore::ScriptElement::scriptCharset): Use HTML5 variables.
              * dom/ScriptElement.h:
              (WebCore::ScriptElement::willBeParserExecuted): Added.
              (WebCore::ScriptElement::readyToBeParserExecuted): Added.
              (WebCore::ScriptElement::willExecuteWhenDocumentFinishedParsing): Added.
              (WebCore::ScriptElement::cachedScript): prepareScript() is the only place that should load scripts. This accessor lets the parsers listen for when loads finish.
              (WebCore::ScriptElement::isParserInserted): Added.
              * dom/XMLDocumentParserLibxml2.cpp:
              (WebCore::XMLDocumentParser::endElementNs): Should behave the same. Offloads much of its work to prepareScript().
              * dom/XMLDocumentParserQt.cpp:
              (WebCore::XMLDocumentParser::parseEndElement): Identical to libxml2 changes.
              * html/HTMLScriptElement.cpp:
              (WebCore::HTMLScriptElement::insertedIntoDocument): No longer needs url.
              (WebCore::HTMLScriptElement::hasSourceAttribute): Added.
              * html/HTMLScriptElement.h:
              * html/parser/HTMLScriptRunner.cpp:
              (WebCore::HTMLScriptRunner::requestPendingScript): Requesting scripts offloaded to ScriptElement.
              (WebCore::HTMLScriptRunner::runScript): Should behave the same. Offloads much of its work to prepareScript().
              * svg/SVGScriptElement.cpp:
              (WebCore::SVGScriptElement::svgAttributeChanged): New ScriptElement function names.
              (WebCore::SVGScriptElement::insertedIntoDocument): No longer needs url.
              (WebCore::SVGScriptElement::finishParsingChildren): ScriptElement::finishParsingChildren is gone.
              (WebCore::SVGScriptElement::hasSourceAttribute): Added.
              (WebCore::SVGScriptElement::dispatchLoadEvent): New ScriptElement function names.
              * svg/SVGScriptElement.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4879ffa3
    • commit-queue@webkit.org's avatar
      2011-02-19 Lukasz Slachciak <l.slachciak@samsung.com> · 0c1625f5
      commit-queue@webkit.org authored
              Unreviewed build fix.
      
              SoupSession build break fix
              https://bugs.webkit.org/show_bug.cgi?id=54796
      
              * ewk/ewk_settings.cpp:
              (ewk_settings_proxy_uri_set):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c1625f5
    • commit-queue@webkit.org's avatar
      2011-02-19 Marc-Antoine Ruel <maruel@chromium.org> · fd5c1c74
      commit-queue@webkit.org authored
              Reviewed by James Robinson.
      
              Split webcore_rendering off webcore_remaining to reduce its size for WPO builds
              https://bugs.webkit.org/show_bug.cgi?id=54789
      
              * WebCore.gyp/WebCore.gyp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd5c1c74
    • atwilson@chromium.org's avatar
      Updated test expectations (more fallout from r78846). · d444b8f6
      atwilson@chromium.org authored
      * platform/chromium/test_expectations.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d444b8f6
    • commit-queue@webkit.org's avatar
      2011-02-19 Bill Budge <bbudge@chromium.org> · 9651de5e
      commit-queue@webkit.org authored
              Reviewed by David Levin.
      
              ThreadableLoaderClient needs willSendRequest method
              https://bugs.webkit.org/show_bug.cgi?id=54688
      
              No new tests. Exposes no new functionality
      
              * WebCore.gypi:
              * loader/DocumentThreadableLoader.cpp:
              (WebCore::DocumentThreadableLoader::willSendRequest):
              (WebCore::DocumentThreadableLoader::didReceiveData):
              (WebCore::DocumentThreadableLoader::didReceiveCachedMetadata):
              * loader/DocumentThreadableLoaderClient.h: Added.
              (WebCore::DocumentThreadableLoaderClient::isDocumentThreadableLoaderClient):
              (WebCore::DocumentThreadableLoaderClient::willSendRequest):
              * loader/ThreadableLoaderClient.h:
              (WebCore::ThreadableLoaderClient::isDocumentThreadableLoaderClient):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9651de5e
    • commit-queue@webkit.org's avatar
      2011-02-19 Lukasz Slachciak <l.slachciak@samsung.com> · 437ae416
      commit-queue@webkit.org authored
              Reviewed by Andreas Kling.
      
              [EFL] Use standard WebCore::homeDirectoryPath method instead of reimplementing it
              https://webkit.org/b/54781
      
              * ewk/ewk_main.cpp:
              (_ewk_init_body):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      437ae416
    • commit-queue@webkit.org's avatar
      2011-02-19 Charlie Reis <creis@chromium.org> · bdaa062c
      commit-queue@webkit.org authored
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Tests that going forward within the same document does not stop loading.
      
              * http/tests/navigation/forward-to-fragment-fires-onload.html: Added.
              * http/tests/navigation/forward-to-fragment-fires-onload-expected.txt: Added.
              * http/tests/navigation/resources/forward-to-fragment-fires-onload-2.html: Added.
      2011-02-19  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Avoid stopping all loaders in goToItem for same document navigations
              or pseudo-back-forward URLs.  Make HistoryController::goToItem private
              to force callers to go through Page::goToItem.  Also add a callback to
              FrameLoaderClient to let clients decide whether to stop loading first.
      
              Test: http/tests/navigation/forward-to-fragment-fires-onload.html
      
              * loader/EmptyClients.h:
              * loader/FrameLoader.h:
              * loader/FrameLoaderClient.h:
              * loader/HistoryController.cpp:
              * loader/HistoryController.h:
              * page/Page.cpp:
      2011-02-19  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Call Page::goToItem instead of HistoryController::goToItem, so that
              FrameLoader::stopAllLoaders is called first.  Also adds a callback in
              FrameLoaderClient for checking for pseudo-back-forward URLs.
      
              Test: http/tests/navigation/forward-to-fragment-fires-onload.html
      
              * src/FrameLoaderClientImpl.cpp:
              (WebKit::FrameLoaderClientImpl::shouldStopLoadingForHistoryItem): Added.
              * src/FrameLoaderClientImpl.h:
              * src/WebFrameImpl.cpp:
      2011-02-19  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Add a FrameLoaderClient callback for whether to stop loading before goToItem.
      
              Test: http/tests/navigation/forward-to-fragment-fires-onload.html
      
              * WebCoreSupport/FrameLoaderClientEfl.cpp:
              (WebCore::FrameLoaderClientEfl::shouldStopLoadingForHistoryItem): Added.
              * WebCoreSupport/FrameLoaderClientEfl.h:
      2011-02-19  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Add a FrameLoaderClient callback for whether to stop loading before goToItem.
      
              Test: http/tests/navigation/forward-to-fragment-fires-onload.html
      
              * WebCoreSupport/FrameLoaderClientGtk.cpp:
              (WebKit::FrameLoaderClientGtk::shouldStopLoadingForHistoryItem): Added.
              * WebCoreSupport/FrameLoaderClientGtk.h:
      2011-02-19  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Add a FrameLoaderClient callback for whether to stop loading before goToItem.
      
              Test: http/tests/navigation/forward-to-fragment-fires-onload.html
      
              * WebCoreSupport/FrameLoaderClientHaiku.cpp:
              (WebCore::FrameLoaderClientHaiku::shouldStopLoadingForHistoryItem): Added.
              * WebCoreSupport/FrameLoaderClientHaiku.h:
      2011-02-19  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Add a FrameLoaderClient callback for whether to stop loading before goToItem.
      
              Test: http/tests/navigation/forward-to-fragment-fires-onload.html
      
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::shouldStopLoadingForHistoryItem): Added.
              * WebCoreSupport/WebFrameLoaderClient.h:
      2011-02-19  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Add a FrameLoaderClient callback for whether to stop loading before goToItem.
      
              Test: http/tests/navigation/forward-to-fragment-fires-onload.html
      
              * WebCoreSupport/FrameLoaderClientQt.cpp:
              (WebCore::FrameLoaderClientQt::shouldStopLoadingForHistoryItem): Added.
              * WebCoreSupport/FrameLoaderClientQt.h:
      2011-02-19  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Add a FrameLoaderClient callback for whether to stop loading before goToItem.
      
              Test: http/tests/navigation/forward-to-fragment-fires-onload.html
      
              * WebCoreSupport/WebFrameLoaderClient.cpp:
              (WebFrameLoaderClient::shouldStopLoadingForHistoryItem): Added.
              * WebCoreSupport/WebFrameLoaderClient.h:
      2011-02-19  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Add a FrameLoaderClient callback for whether to stop loading before goToItem.
      
              Test: http/tests/navigation/forward-to-fragment-fires-onload.html
      
              * WebCoreSupport/FrameLoaderClientWinCE.cpp:
              (WebKit::FrameLoaderClientWinCE::shouldStopLoadingForHistoryItem): Added.
              * WebCoreSupport/FrameLoaderClientWinCE.h:
      2011-02-19  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Add a FrameLoaderClient callback for whether to stop loading before goToItem.
      
              Test: http/tests/navigation/forward-to-fragment-fires-onload.html
      
              * WebKitSupport/FrameLoaderClientWx.cpp:
              (WebCore::FrameLoaderClientWx::shouldStopLoadingForHistoryItem): Added.
              * WebKitSupport/FrameLoaderClientWx.h:
      2011-02-19  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Mihai Parparita.
      
              Ensure loading has stopped in HistoryController::goToItem
              https://bugs.webkit.org/show_bug.cgi?id=54517
      
              Add a FrameLoaderClient callback for whether to stop loading before goToItem.
      
              Test: http/tests/navigation/forward-to-fragment-fires-onload.html
      
              * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
              (WebFrameLoaderClient::shouldStopLoadingForHistoryItem): Added.
              * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bdaa062c
    • abarth@webkit.org's avatar
      2011-02-19 Adam Barth <abarth@webkit.org> · cc988496
      abarth@webkit.org authored
              Reviewed by Daniel Bates.
      
              Fix xssAuditor/iframe-injection.html
              https://bugs.webkit.org/show_bug.cgi?id=54591
      
              Update expected results to show that we pass.
      
              * http/tests/security/xssAuditor/iframe-injection-expected.txt:
      2011-02-19  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Daniel Bates.
      
              Fix xssAuditor/iframe-injection.html
              https://bugs.webkit.org/show_bug.cgi?id=54591
      
              We should block the iframe src attribute.  Although this technically
              can't be used to run script, it's a pretty easy vector for stealing
              passwords.
      
              * html/parser/XSSFilter.cpp:
              (WebCore::XSSFilter::filterTokenInitial):
              (WebCore::XSSFilter::filterIframeToken):
              * html/parser/XSSFilter.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc988496
    • commit-queue@webkit.org's avatar
      2011-02-19 Lukasz Slachciak <l.slachciak@samsung.com> · c2d86fcc
      commit-queue@webkit.org authored
              Reviewed by Andreas Kling.
      
              Fixed problem with launching EWebLauncher with "run-launcher --efl". Incorrect path referring to non-existing .libs directory ws set.
              https://webkit.org/b/54778
      
              * Scripts/webkitdirs.pm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c2d86fcc
    • tonyg@chromium.org's avatar
      2011-02-18 Tony Gentilcore <tonyg@chromium.org> · 835dd901
      tonyg@chromium.org authored
              Reviewed by Eric Seidel.
      
              Let the parser yield for layout before running scripts
              https://bugs.webkit.org/show_bug.cgi?id=54355
      
              Prior to this patch, the parser would yield to perform a layout/paint before running a
              script only if the script or a stylesheet blocking the script is not loaded yet. Since we
              don't preload scan into the body while parsing the head, typically we'll block on a script
              early in the body that causes us to yield to do the first paint within a reasonable time.
      
              However, I'm planning to change the PreloadScanner to scan into the body from the head.
              That significantly improves overall load time, but would hurt first paint time because
              fewer scripts would be blocked during parsing and thus wouldn't yield.
      
              This change causes us to yield before running scripts if we haven't painted yet (regardless
              of whether or not the script is loaded). In addition to allowing the above mentioned
              PreloadScanner change to be implemented without regressing first paint time, this also
              improves first paint time by itself.
      
              I tested Alexa's top 45 websites using Web Page Replay to control the content and simulate
              bandwidth. This patch improved average first paint time by 1% over an unlimited connection,
              6% over a 1Mbps connection and 11% over a 5Mbps connection. There was no statistically
              signifcant change in page load time.
      
              Within the pages tested, 33 had no statistically significant change in time to first paint,
              12 improved, and none regressed. Of the improved, some of the standouts from the 1Mbps set
              are: 20% on youtube, 37% on wiki, 27% on ebay, 13% on cnn, 16% on espn, 74% on sohu.
      
              * html/parser/HTMLDocumentParser.cpp:
              (WebCore::HTMLDocumentParser::canTakeNextToken): This is the new yield point.
              (WebCore::HTMLDocumentParser::pumpTokenizer): Remove ASSERT that we are not paused. isPaused
              means that we are waiting for a script. Bug 54574 changed pumpTokenizer() so that it does
              the right thing whether we are just before a token or waiting for a script. Now that we may
              yield before a token or before a script, this may be called while paused.
              * html/parser/HTMLParserScheduler.cpp:
              (WebCore::isLayoutTimerActive): Added a FIXME because r52919 changed minimumLayoutDelay()
              to return m_extraLayoutDelay instead of 0 as a minimum. So checking !minimumLayoutDelay()
              no longer works. The fix is to change it to check minimumLayoutDelay() ==
              m_extraLayoutDelay. But this is all the more reason to move this method onto Document. I'll
              do this in a follow up.
              (WebCore::HTMLParserScheduler::checkForYieldBeforeScript): Added.
              * page/FrameView.h:
              (WebCore::FrameView::hasEverPainted): Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      835dd901
    • commit-queue@webkit.org's avatar
      2011-02-18 Dawit Alemayehu <adawit@kde.org> · 2f3a352e
      commit-queue@webkit.org authored
              Reviewed by Andreas Kling.
      
              [Qt]  Button Element is rendered w/ text off-center.
              https://bugs.webkit.org/show_bug.cgi?id=53373
      
              Test: LayoutTests/fast/forms/button-white-space.html
      
              * platform/qt/RenderThemeQt.cpp:
              (WebCore::RenderThemeQt::adjustButtonStyle):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f3a352e
  2. 18 Feb, 2011 14 commits