1. 03 Dec, 2007 18 commits
  2. 02 Dec, 2007 14 commits
    • darin@apple.com's avatar
      WebCore: · 6b16660d
      darin@apple.com authored
              Reviewed by Mitz.
              - fix <rdar://problem/5601995> Hang/crash on http://ebay-uk.custhelp.com/
              There were two problems here:
                  1) Incorrect HTMLCollection behavior led to us trying to insert a
                     new row inside an existing row instead of next to it. The fix for
                     this is to make HTMLCollection work better for table-related
                  2) HTMLTableRowElement::insertCell would return a bad pointer if
                     the insertion failed. The code should have failed, but not crashed,
                     so it's worth fixing that too.
              While fixing the HTMLCollection issues, I did some clean-up of that
              class and its derived classes.
              Test: fast/dom/HTMLTableElement/rows.html
              Test: fast/dom/HTMLTableElement/tBodies.html
              Test: fast/dom/HTMLTableRowElement/cells.html
              Test: fast/dom/HTMLTableRowElement/insertCell.html
              Test: fast/dom/HTMLTableSectionElement/rows.html
              * bindings/js/JSHTMLCollectionCustom.cpp:
              (WebCore::toJS): Updated because collectionType() was renamed to type().
              * html/HTMLCollection.cpp:
              (WebCore::HTMLCollection::HTMLCollection): Updated for data member name
              changes. Also added a protected constructor for use by derived classes
              that pass in a CollectionInfo.
              (WebCore::HTMLCollection::CollectionInfo::copyCacheMap): Moved out of
              the header.
              (WebCore::isTableSection): Added.
              (WebCore::HTMLCollection::itemAfter): Renamed from traverseNextItem,
              because the old name was grammatically incorrect and thus a bit confusing.
              Changed to operate on Element* instead of Node*, and use 0 to start
              rather than passing in the base node (required since the base node can be
              a document, which is not an element). Generalized the code that made
              NodeChildren not descend into deeper descendants so it can be used for
              TRCells, TSectionRows, TableTBodies, and TableRows. Reformatted the
              switch statement and got rid of the "found" boolean since we can just
              return when we find something. Got rid of the default case, and instead
              listed all the enum values. Also changed to use a for loop for clarity.
              (WebCore::HTMLCollection::calcLength): Updated for itemAfter changes.
              (WebCore::HTMLCollection::item): Ditto.
              (WebCore::HTMLCollection::nextItem): Ditto.
              (WebCore::HTMLCollection::checkForNameMatch): Updated to take an Element
              instead of a Node pointer.
              (WebCore::HTMLCollection::namedItem): More of the same.
              (WebCore::HTMLCollection::updateNameCache): Ditto.
              (WebCore::HTMLCollection::namedItems): Ditto.
              (WebCore::HTMLCollection::nextNamedItem): Ditto.
              (WebCore::HTMLCollection::tags): Ditto.
              * html/HTMLCollection.h: Added a type FormElements, so that the
              HTMLFormCollection would not have a type of DocImages, which is what
              it previously did. Changed the base parameter to be a PassRefPtr to
              make it clear we take ownership of it. Added a comment explaining
              why we should change the name CollectionInfo. Made a lot more members
              private instead of protected. Renamed traverseNextItem to itemAfter.
              Changed most functions to take Element* instead of Node*.
              * html/HTMLFormCollection.cpp:
              (WebCore::HTMLFormCollection::formCollectionInfo): Added.
              (WebCore::HTMLFormCollection::HTMLFormCollection): Updated to pass
              collection info into the base class.
              (WebCore::HTMLFormCollection::calcLength): Updated to use base() so we
              don't need to get at m_base directly.
              (WebCore::HTMLFormCollection::item): Same, but for info().
              (WebCore::HTMLFormCollection::getNamedItem): Removed unused first
              (WebCore::HTMLFormCollection::getNamedFormItem): Got rid of unneeded
              checks that the base is still an element and still a form, since that's
              (WebCore::HTMLFormCollection::nextItem): Use info().
              (WebCore::HTMLFormCollection::nextNamedItemInternal): Node instead of
              Element, some name changes.
              (WebCore::HTMLFormCollection::namedItem): Update for changes elsewhere.
              (WebCore::HTMLFormCollection::nextNamedItem): Ditto, also rewrote loop
              to be much simpler.
              (WebCore::HTMLFormCollection::updateNameCache): More of the same.
              * html/HTMLFormCollection.h: Changed constructor to take an
              HTMLFormElement, using a PassRefPtr to communicate transfer of
              ownership. Made everything private instead of protected. Removed
              unneeded override of firstItem. Made getNamedItem and
              nextNamedItemInternal non-virtual. Removed unused first argument of
              getNamedItem. Added declaration of formCollectionInfo.
              * html/HTMLNameCollection.cpp:
              (WebCore::HTMLNameCollection::HTMLNameCollection): Updated to pass
              collection info into the base class.
              (WebCore::HTMLNameCollection::itemAfter): Reformatted a bit and
              changed into a for loop.
              * html/HTMLNameCollection.h: Updated for name changes. Made function
              private instead of public. Used PassRefPtr in constructor.
              * html/HTMLOptionsCollection.cpp:
              (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): Updated to
              pass collection info into the base class.
              (WebCore::HTMLOptionsCollection::add): Updated for public/private
              changes in the base class.
              (WebCore::HTMLOptionsCollection::selectedIndex): Ditto.
              (WebCore::HTMLOptionsCollection::setSelectedIndex): Ditto.
              (WebCore::HTMLOptionsCollection::setLength): Ditto.
              * html/HTMLOptionsCollection.h: Changed constructor parameter to be a
              * html/HTMLTableRowElement.cpp:
              (WebCore::HTMLTableRowElement::insertCell): Changed code to use RefPtr
              and PassRefPtr since this creates a new object. This alone fixed the
              crash. Also cleaned up logic a bit to be more readable.
              * html/HTMLTableRowElement.h: Changed insertCell to return a PassRefPtr.
              Also reordered functions a bit to make things a little more logical and
              removed the unused ncols data member.
              * html/HTMLTableSectionElement.cpp:
              (WebCore::HTMLTableSectionElement::rows): Pass TSectionRows, not
              TableRows. This mistake was harmless before because TableRows and
              TSectionRows were handled identically inside HTMLCollection, but that is
              no longer the case with this fix.
              * bindings/scripts/CodeGeneratorJS.pm: Add an include to cope with the
              fact that HTMLOptionsCollection no longer includes HTMLOptionElement.
              I don't think this really should be a special case -- might be worth
              returning later to see if this can be optimized.
              Reviewed by Mitz.
              - tests for table-related HTMLCollection classes for misnested
                tables and for <rdar://problem/5601995> Hang/crash on http://ebay-uk.custhelp.com/
              * fast/dom/HTMLTableElement/resources: Added.
              * fast/dom/HTMLTableElement/resources/TEMPLATE.html: Added.
              * fast/dom/HTMLTableElement/resources/rows.js: Added.
              * fast/dom/HTMLTableElement/resources/tBodies.js: Added.
              * fast/dom/HTMLTableElement/rows-expected.txt: Added.
              * fast/dom/HTMLTableElement/rows.html: Added.
              * fast/dom/HTMLTableElement/tBodies-expected.txt: Added.
              * fast/dom/HTMLTableElement/tBodies.html: Added.
              * fast/dom/HTMLTableRowElement: Added.
              * fast/dom/HTMLTableRowElement/cells-expected.txt: Added.
              * fast/dom/HTMLTableRowElement/cells.html: Added.
              * fast/dom/HTMLTableRowElement/insertCell-expected.txt: Added.
              * fast/dom/HTMLTableRowElement/insertCell.html: Added.
              * fast/dom/HTMLTableRowElement/resources: Added.
              * fast/dom/HTMLTableRowElement/resources/TEMPLATE.html: Added.
              * fast/dom/HTMLTableRowElement/resources/cells.js: Added.
              * fast/dom/HTMLTableSectionElement: Added.
              * fast/dom/HTMLTableSectionElement/resources: Added.
              * fast/dom/HTMLTableSectionElement/resources/TEMPLATE.html: Added.
              * fast/dom/HTMLTableSectionElement/resources/rows.js: Added.
              * fast/dom/HTMLTableSectionElement/rows-expected.txt: Added.
              * fast/dom/HTMLTableSectionElement/rows.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin@apple.com's avatar
      * Scripts/do-webcore-rename: More planned renaming. · f6bce051
      darin@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zimmermann@webkit.org's avatar
      Reviewed by Adam. · bcfb2f43
      zimmermann@webkit.org authored
      RenderSVGViewportContainer sets wrong width/height.
      Share code with RenderSVGContainer in a central calcBounds() function.
      - svg/custom/use-css-events.svg (http://bugs.webkit.org/show_bug.cgi?id=15403)
      - svg/custom/deep-dynamic-updates.svg
      - svg/custom/use-clipped-hit.svg
      - svg/custom/image-clipped-hit.svg
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • weinig@apple.com's avatar
      Rubber stamped by Anders. · b452233f
      weinig@apple.com authored
              Use [NSURL absoluteString] instead of [NSURL description] in order to get
              more uniform results cross platform.
              * DumpRenderTree/mac/ResourceLoadDelegate.mm:
              (-[NSURL _drt_descriptionSuitableForTestResult]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • weinig@apple.com's avatar
      Rubber stamped by Niko. · 188ce252
      weinig@apple.com authored
              Rename FrameLoaderDelegate.h/cpp to FrameLoadDelegate.h/cpp.
              * DumpRenderTree/win/DumpRenderTree.cpp:
              * DumpRenderTree/win/DumpRenderTree.vcproj:
              * DumpRenderTree/win/FrameLoadDelegate.cpp: Copied from DumpRenderTree/win/FrameLoaderDelegate.cpp.
              * DumpRenderTree/win/FrameLoadDelegate.h: Copied from DumpRenderTree/win/FrameLoaderDelegate.h.
              * DumpRenderTree/win/FrameLoaderDelegate.cpp: Removed.
              * DumpRenderTree/win/FrameLoaderDelegate.h: Removed.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • beidson@apple.com's avatar
      Reviewed by Darin · 3af427d1
      beidson@apple.com authored
              databaseChanged notifications were being sent out on the database thread - they need to be on the main thread
              like all other notifications we send out!
              * platform/SecurityOriginData.cpp:
              (WebCore::SecurityOriginData::copy): Add a deep copy method, for when an object thread hops
              * platform/SecurityOriginData.h:
              * storage/DatabaseTracker.cpp:
              (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged): Add the origin/name pair to a queue
              (WebCore::DatabaseTracker::scheduleForNotification): Schedule to deliver this queue of notifications
                on the main thread
              (WebCore::DatabaseTracker::notifyDatabasesChanged): Deliver all notifications in the queue
              * storage/DatabaseTracker.h:
              * storage/SQLTransaction.cpp:
              (WebCore::SQLTransaction::postflightAndCommit): scheduleNotifyDatabaseChanged() instead of "notify now!"
              (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): Ditto
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • rwlbuis@webkit.org's avatar
      Reviewed by Darin. · 1b4adb71
      rwlbuis@webkit.org authored
              Load SVG (and other) UA StyleSheets dynamically when needed
              Load svg sheet when needed.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mrowe@apple.com's avatar
      Speculative Windows build fix. · bfb50d93
      mrowe@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zimmermann@webkit.org's avatar
      Rubber stamped by Eric. · 3e7d4a80
      zimmermann@webkit.org authored
      Move platform/graphics/svg to graphics/svg as discussed on webkit-dev.
      Updated all project files.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zimmermann@webkit.org's avatar
      Reviewed by Maciej. · 96202e55
      zimmermann@webkit.org authored
      Fix IDL lookup in subdirectories. Missing 'my' prefix for the 'thisDir' variable.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • aroben@apple.com's avatar
      Add another screenshot · 0638fdc6
      aroben@apple.com authored
              * blog-files/InspectElementMenu.png: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • alp@webkit.org's avatar
      2007-12-01 Alp Toker <alp@atoker.com> · e18530bc
      alp@webkit.org authored
              Reviewed by Adam Roben.
              Wrap type definitions in webkitdefines.h with G_BEGIN_DECLS, which
              takes care of extern "C".
              Introduce a webkit.h convenience header.
              Remove another left-over from the old API.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • aroben@apple.com's avatar
      Add some Inspector screenshots for an upcoming blog post · ae4ce645
      aroben@apple.com authored
              Rubberstamped by Mark Rowe.
              * blog-files/InspectorCSSEditing.png: Added.
              * blog-files/InspectorFonts.png: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • beidson@apple.com's avatar
      Reviewed by Tim · b85c851d
      beidson@apple.com authored
              Added a default database quota of 5mb to the default WebPreferences
              * WebView/WebPreferences.m:
              (+[WebPreferences initialize]):
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  3. 01 Dec, 2007 8 commits
    • alp@webkit.org's avatar
      2007-12-01 Alp Toker <alp@atoker.com> · 7abdd1e7
      alp@webkit.org authored
              Reviewed by Adam Roben.
              [Gtk] Allow API clients to interact with JavaScript in web pages
              Include the necessary JavaScriptCore headers directly in the public
              API headers.
              This is the last of a series of changes needed to allow GTK+
              applications to access the JS API.
              Until http://bugs.webkit.org/show_bug.cgi?id=16029 is resolved,
              developers will still have to include the individual JS API headers
              individually if they want to use it in their applications.
              Patch also removes some old legacy use of GDK that was in
              WebKitWebFrame. No ABI change.
              * WebView/webkitdefines.h:
              * WebView/webkitwebframe.h:
              * WebView/webkitwebview.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • antti@apple.com's avatar
      WebCore: · e5c6b352
      antti@apple.com authored
              Reviewed by Adam.
              - Fix a crash when removing a loading media element from the tree.
              - Follow the spec by invoking pause() when element is removed from the tree instead of unloading.
              Tests: http/tests/media/remove-while-loading.html
              * html/HTMLMediaElement.cpp:
              Reviewed by Adam.
              Test that removing a media element when it is loading does not crash.
              Test that media is paused when it is removed from the tree.
              * http/tests/media/remove-while-loading-expected.txt: Added.
              * http/tests/media/remove-while-loading.html: Added.
              * media/remove-from-document-expected.txt: Added.
              * media/remove-from-document.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • alp@webkit.org's avatar
      2007-12-01 Alp Toker <alp@atoker.com> · 3fdd155c
      alp@webkit.org authored
              Reviewed by Adam Roben.
              kJSClassDefinitionEmpty is not exported with JS_EXPORT
              Add JS_EXPORT to kJSClassDefinitionEmpty.
              Make the gcc compiler check take precedence over the WIN32||_WIN32
              check to ensure that symbols are exported on Windows when using gcc.
              Add a TODO referencing the bug about JS_EXPORT in the Win build
              Don't define JS_EXPORT as 'extern' when the compiler is unknown since
              it would result in the incorrect expansion:
                extern extern const JSClassDefinition kJSClassDefinitionEmpty;
              (This was something we inherited from CFBase.h that doesn't make sense
              for JSBase.h)
              * API/JSBase.h:
              * API/JSObjectRef.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ggaren@apple.com's avatar
      Reviewed by Beth Dakin. · 427fd26f
      ggaren@apple.com authored
              Restored the test string in this test.
              * manual-tests/window-open-features-parsing.html:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ggaren@apple.com's avatar
      JavaScriptCore: · 41893215
      ggaren@apple.com authored
              Reviewed by Beth Dakin.
              Reversed the ownership relationship between Interpreter and JSGlobalObject.
              Now, the JSGlobalObject owns the Interpreter, and top-level objects
              that need the two to persist just protect the JSGlobalObject from GC.
              Global object bootstrapping looks a little odd right now, but it will
              make much more sense soon, after further rounds of refactoring.
              * bindings/runtime_root.h: Made this class inherit from RefCounted,
              to avoid code duplication.
              * kjs/collector.cpp:
              (KJS::Collector::collect): No need to give special GC treatment to 
              Interpreters, since we mark their global objects, which mark them.
              * kjs/interpreter.cpp:
              (KJS::Interpreter::mark): No need to mark our global object, since it
              marks us.
              * kjs/interpreter.h: Don't inherit from RefCounted -- JSGlobalObject 
              owns us directly.
              * kjs/testkjs.cpp: Modified to follow the new rules.
              Reviewed by Beth Dakin.
              Modified to follow new JSGlobalObject/Interpreter ownership rules 
              in JavaScriptCore.
              * JSRun.cpp:
              * JSRun.h:
              * JSValueWrapper.cpp:
              Reviewed by Beth Dakin.
              Modified WebCore to follow the new JSGlobalObject/Interpreter ownership
              rules in JavaScriptCore.
              * bindings/js/kjs_binding.cpp:
              * bindings/js/kjs_binding.h: Removed stale, unused 
              * bindings/js/kjs_proxy.cpp: Changed to store a global object, rather
              than an interpreter.
              (WebCore::KJSProxy::finishedWithEvent): Need to NULL check 
              m_globalObject here because we no longer unnecessarily instantiate it.
              * bindings/js/kjs_window.cpp:
              * bindings/js/kjs_window.h: Removed redundant and less efficient 
              interpreter() function -- global objects have direct access to their
              interpreters now.
              Changed these functions to pass around JSGlobalObjects instead of 
              * page/Frame.cpp:
              * page/Frame.h:
              * page/mac/WebCoreFrameBridge.mm:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • treat@webkit.org's avatar
      * Check to see if the directory exists and exit if not. · b8eda862
      treat@webkit.org authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • weinig@apple.com's avatar
      Rename IWebViewPrivate::selectionImageRect to IWebViewPrivate::selectionRect. · 7f8cf2de
      weinig@apple.com authored
              Rubber stamped by Adam Roben.
              * Interfaces/IWebViewPrivate.idl:
              * WebView.cpp:
              * WebView.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mitz@apple.com's avatar
      Reviewed by Mark Rowe. · e3bf0f6f
      mitz@apple.com authored
              * config.ini: Correct blog name.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28306 268f45cc-cd09-0410-ab3c-d52691b4dbfc