1. 20 May, 2008 17 commits
    • alice.liu@apple.com's avatar
      2008-05-20 Alice Liu <alice.liu@apple.com> · d8560b94
      alice.liu@apple.com authored
              Reviewed by Brady.
              fix <rdar://problem/5908580> 10A58: Dictionary Panel hangs in WebCore::Cache::pruneDeadResources()
              * loader/Cache.cpp:
              Add a call to resourceAccessed() to more closely mirror what is done in requestResource()
              Assert that any resource in the LRU list has been accessed.  This is early detection of a
              potential hang later when pruning resources, and also agrees with the early return in 
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mitz@apple.com's avatar
      WebCore: · 78ceb1f5
      mitz@apple.com authored
              Reviewed by Darin Adler.
              - fix https://bugs.webkit.org/show_bug.cgi?id=17655
                <rdar://problem/5778077> REGRESSION (3.1.1-TOT): Reproducible crash calling querySelector on viewless Document
              Test: fast/dom/SelectorAPI/viewless-document.html
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::CSSStyleSelector): Updated to initialize the
              selector checker.
              (WebCore::CSSStyleSelector::init): Removed initialization of
              m_collectRulesOnly, which is now part of the selector checker.
              (WebCore::CSSStyleSelector::matchRules): Updated for renames and data
              moved into the selector checker.
              (WebCore::CSSStyleSelector::matchRulesForList): Ditto.
              (WebCore::CSSStyleSelector::initForStyleResolve): Added a PseudoId
              argument, which is used to initialize a data member of the selector
              checker. Updated for renames. Removed initialization of m_isXMLDoc
              because this bit is now initialized only once in the selector checker's
              (WebCore::CSSStyleSelector::SelectorChecker::SelectorChecker): Added.
              (WebCore::CSSStyleSelector::SelectorChecker::checkPseudoState): Changed
              into a SelectorChecker method.
              (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): Added. Used
              by querySelector() and querySelectorAll().
              (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for data
              moved into the selector checker.
              (WebCore::CSSStyleSelector::matchUARules): Ditto.
              (WebCore::CSSStyleSelector::pseudoStyleForElement): Ditto. Also removed
              code that set the parentStyle variable after the last place it is
              accessed, and changed to ensure that m_style is set early in this
              (WebCore::CSSStyleSelector::adjustRenderStyle): Updated for data moved
              into the selector checker.
              (WebCore::CSSStyleSelector::styleRulesForElement): Ditto.
              (WebCore::CSSStyleSelector::checkSelector): Ditto. Also changed to pass
              the element's style and the parent style to the selector checker, as
              well as the dynamic pseudo variable and the selector attributes vector.
              (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Added
              arguments for the style of the base element and its parent. When the
              elementStyle argument is 0, the style is fetched from the element
              and its parent as needed. Also changed to take a reference to the
              dynamic pseudo ID and a pointer to the vector of attributes affecting
              the match.
              (WebCore::CSSStyleSelector::applyProperty): Updated for data moved
              into the selector checker.
              (WebCore::CSSStyleSelector::checkForGenericFamilyChange): Ditto.
              (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): Ditto.
              (WebCore::CSSStyleSelector::fontSizeForKeyword): Ditto.
              (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto.
              Changed into a SelectorChecker method.
              * css/CSSStyleSelector.h:
              Added a SelectorChecker class and moved data and methods used in
              checking selectors into it.
              (WebCore::CSSStyleSelector::allVisitedStateChanged): Changed to call the
              SelectorChecker method.
              (WebCore::CSSStyleSelector::visitedStateChanged): Ditto.
              * dom/Node.cpp:
              (WebCore::Node::querySelector): Changed to use a SelectorChecker instead
              of the document's style selector.
              * dom/SelectorNodeList.cpp:
              (WebCore::SelectorNodeList::SelectorNodeList): Ditto.
              Reviewed by Darin Adler.
              - test for https://bugs.webkit.org/show_bug.cgi?id=17655
                <rdar://problem/5778077> REGRESSION (3.1.1-TOT): Reproducible crash calling querySelector on viewless Document
              * fast/dom/SelectorAPI/resources/viewless-document.js: Added.
              * fast/dom/SelectorAPI/viewless-document-expected.txt: Added.
              * fast/dom/SelectorAPI/viewless-document.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • timothy@apple.com's avatar
      Implements the Profiles panel and Profile view. · 23cf67bb
      timothy@apple.com authored
      Reviewed by Kevin McCullough.
      * English.lproj/localizedStrings.js: Added new strings.
      * page/inspector/Images/profileIcon.png: Added.
      * page/inspector/Images/profilesIcon.png: Changed. New icon design
      that fits in with the other toolbar icons.
      * page/inspector/ProfileView.js:
      (WebInspector.ProfileView): Remove custom table elements
      and create a DataGrid. Sorts the profile by descending total time,
      since the profiles aren't sorted by default.
      (WebInspector.ProfileView.prototype.refresh): Clears the DataGrid
      and recreates all the nodes. The selection is preserved.
      (WebInspector.ProfileView.prototype.refreshShowAsPercents): Traverse
      all the children and change showTotalTimeAsPercent and showSelfTimeAsPercent
      to match the ProfileView values. Then call refresh on the child.
      (WebInspector.ProfileView.prototype._sortData): Determine the sort
      function to call on the head profile node. Call it and then call
      refresh to rebuild the DataGrid.
      (WebInspector.ProfileView.prototype._mouseDownInDataGrid): Return early
      if the event is not a double-click. When it is a double-click, determine
      the column that was targeted and if it was total or self toggle the
      show as percent property. Call refreshShowAsPercents.
      (WebInspector.ProfileDataGridNode.prototype.get data):
      * page/inspector/ProfilesPanel.js:
      (WebInspector.ProfilesPanel.prototype.show): Populate the sidebar
      with all profiles. This is a workaround until the Inspector
      is told about new profiles.
      (WebInspector.ProfilesPanel.prototype.reset): Clear the sidebar and
      profile views.
      (WebInspector.ProfilesPanel.prototype.handleKeyEvent): Pass the key
      event to the sidebar.
      (WebInspector.ProfilesPanel.prototype.addProfile): Create a
      ProfileSidebarTreeElement object and add it to the sidebar.
      (WebInspector.ProfilesPanel.prototype.showProfile): Create a ProfileView
      and show it.
      (WebInspector.ProfilesPanel.prototype.closeVisibleView): Hide the
      visible view.
      (WebInspector.ProfilesPanel.prototype._startSidebarDragging): Call
      (WebInspector.ProfilesPanel.prototype._sidebarDragging): Call _updateSidebarWidth.
      Call WebInspector.elementDragEnd.
      (WebInspector.ProfilesPanel.prototype._updateSidebarWidth): Update the
      sidebar width based on the passed in value.
      (WebInspector.ProfileSidebarTreeElement): Subclass WebInspector.SidebarTreeElement.
      (WebInspector.ProfileSidebarTreeElement.prototype.onselect): Call ProfilesPanel.showProfile.
      (WebInspector.ProfileSidebarTreeElement.prototype.get mainTitle): Return profile.title.
      (WebInspector.ProfileSidebarTreeElement.prototype.set mainTitle): Do nothing.
      (WebInspector.ProfileSidebarTreeElement.prototype.get subtitle): Ditto.
      (WebInspector.ProfileSidebarTreeElement.prototype.set subtitle): Ditto.
      * page/inspector/inspector.css: New styles for the profile sidebar
      item and profile data grid columns.
      * page/inspector/inspector.js:
      * page/inspector/utilities.js:
      (Number.secondsToString): Added a higherResolution argument
      that returns fractional milliseconds.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • cfleizach@apple.com's avatar
      <rdar://problem/5060458> Elements without AXActions should not return kAXErrorFailure · 7783493e
      cfleizach@apple.com authored
      <rdar://problem/3438014> Might need accessibility solution for context menus in web pages
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • timothy@apple.com's avatar
      Expose the ProfileNode functionName sorting functions on · cf48a173
      timothy@apple.com authored
      Reviewed by Kevin McCullough.
      * page/JavaScriptProfileNode.cpp:
      (WebCore::sortFunctionNameDescending): Call ProfileNode.
      (WebCore::sortFunctionNameAscending): Ditto.
      (WebCore::ProfileNodeClass): Add static functions.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • timothy@apple.com's avatar
      Rename sortFileName{Ascending,Descending} to · 21176464
      timothy@apple.com authored
      Reviewed by Kevin McCullough.
      * JavaScriptCore.exp:
      * kjs/config.h:
      * profiler/Profile.h:
      * profiler/ProfileNode.cpp:
      * profiler/ProfileNode.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin@apple.com's avatar
      2008-05-20 Darin Adler <darin@apple.com> · f3933de7
      darin@apple.com authored
              Reviewed by Mitz.
              - a first small step of CSS DOM refactoring -- the eventual goal is to
                reduce StyleBase and possibly eliminate it, since it has multiple
                purposes and unneccessarily ties many classes together
              * css/CSSCursorImageValue.cpp:
              (WebCore::isSVGCursorIdentifier): Mark static so it has internal linkage.
              (WebCore::resourceReferencedByCursorElement): Ditto.
              (WebCore::CSSCursorImageValue::CSSCursorImageValue): Removed unused style
              (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Removed code to
              check if X and Y changed before changing them -- there's no reason to do
              that. Removed code that depended on the internals of CSSImageValue. The
              new code uses only protected functions rather than going right at the
              fields and uing internal knowledge of the base class.
              * css/CSSCursorImageValue.h: Added a create function, made constructor
              private, removed unused style argument.
              * css/CSSImageValue.cpp:
              (WebCore::CSSImageValue::CSSImageValue): Removed unused style argument.
              (WebCore::CSSImageValue::cachedImageURL): Added. A protected function for
              use by CSSCursorImageValue that gives the URL.
              (WebCore::CSSImageValue::clearCachedImage): Added. A protected function for
              use by CSSCursorImageValue that clears the CachedImage.
              * css/CSSImageValue.h: Added create functions, made constructors protected
              and private, removed unused style argument, made data members private, added
              some protected functions for use by CSSCursorImageValue.
              * css/CSSImportRule.cpp:
              (WebCore::CSSImportRule::setCSSStyleSheet): Changed to call checkLoaded on
              the parent. This is part of preparation to move the checkLoaded function from
              StyleBase to StyleSheet.
              (WebCore::CSSImportRule::insertedIntoParent): Changed code to check the URL
              of the style sheet to use the href function of the style sheet rather than
              the baseURL function. This eliminates an O(n^2) algorithm here and reduces
              the use of baseURL, part of preparation to move it from StyleBase
              to CSSStyleSheet.
              * css/CSSMutableStyleDeclaration.cpp:
              (WebCore::CSSMutableStyleDeclaration::setImageProperty): Changed to use create
              function instead of a direct call to new for the CSSImageValue classes.
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseValue): Ditto.
              (WebCore::CSSParser::parseContent): Ditto.
              (WebCore::CSSParser::parseFillImage): Ditto.
              (WebCore::CSSParser::parseBorderImage): Ditto.
              * css/CSSStyleSelector.cpp: Removed unneeded include of CSSImageValue.h.
              * rendering/style/RenderStyle.h: Removed unneeded include of
              CSSCursorImageValue.h, which was causing us to rebuild the world way too often.
              * xml/XSLImportRule.cpp:
              (WebCore::XSLImportRule::setXSLStyleSheet): See change to CSSImportRule above.
              (WebCore::XSLImportRule::loadSheet): Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • kmccullough@apple.com's avatar
      2008-05-20 Kevin McCullough <kmccullough@apple.com> · fe9d0e7b
      kmccullough@apple.com authored
              Rubber stamped by Adam.
              -Minor fix. Should not use a reference since the original may disappear.
              * page/Console.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • kevino@webkit.org's avatar
      wx build fixes for PluginViewWx.cpp and WebKit/wx/WebView.cpp · 82340bb3
      kevino@webkit.org authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • timothy@apple.com's avatar
      Expose the ProfileNode sorting functions on JavaScriptProfileNode. · 5a0204ec
      timothy@apple.com authored
      Reviewed by Kevin McCullough.
      * page/JavaScriptProfileNode.cpp:
      (WebCore::sortTotalTimeDescending): Call ProfileNode.
      (WebCore::sortTotalTimeAscending): Ditto.
      (WebCore::sortSelfTimeDescending): Ditto.
      (WebCore::sortSelfTimeAscending): Ditto.
      (WebCore::sortCallsDescending): Ditto.
      (WebCore::sortCallsAscending): Ditto.
      (WebCore::ProfileNodeClass): Add static static functions.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • timothy@apple.com's avatar
      Make the profiler use higher than millisecond resolution time-stamps. · 7de48b2e
      timothy@apple.com authored
      Reviewed by Kevin McCullough.
      * kjs/DateMath.cpp:
      (KJS::getCurrentUTCTime): Call getCurrentUTCTimeWithMicroseconds and
      floor the result.
      (KJS::getCurrentUTCTimeWithMicroseconds): Copied from the previous
      implementation of getCurrentUTCTime without the floor call.
      * kjs/DateMath.h: Addded getCurrentUTCTimeWithMicroseconds.
      * profiler/ProfileNode.cpp:
      (KJS::ProfileNode::ProfileNode): Use getCurrentUTCTimeWithMicroseconds.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • timothy@apple.com's avatar
      * page/InspectorController.cpp: Change the include for · c3f9d123
      timothy@apple.com authored
      JavaScriptProfile.h to sue double quotes instead of backets.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • timothy@apple.com's avatar
      Fixes a bug in the profiler where call and apply would show up · e4f53f8a
      timothy@apple.com authored
      and double the time spent in a function. We don't want to show call
      and apply at all in the profiles. This change excludes them.
      Reviewed by Kevin McCullough.
      * profiler/ProfileNode.cpp:
      (KJS::ProfileNode::stopProfiling): Remove a second for loop and
      calculate self time in the existing loop.
      * profiler/Profiler.cpp:
      (KJS::shouldExcludeFunction): Helper inline function that returns
      true in the current function in an InternalFunctionImp and it is
      has the functionName call or apply.
      (KJS::Profiler::willExecute): Call shouldExcludeFunction and return
      early if if returns true.
      (KJS::Profiler::didExecute): Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • timothy@apple.com's avatar
      Adds a DataGrid object that is used for multi-column data · 96ad88ab
      timothy@apple.com authored
      and can contain hierarchical content with disclosure arrows.
      A lot of DataGrid was copied from treeoutline.js. This change
      makes the database views use the DataGrid. It will later be
      used by the ProfileView.
      Reviewed by Adam Roben.
      * page/inspector/DataGrid.js: Added. Most copied from treeoutline.js
      and modified to work with table elements.
      * page/inspector/DatabaseQueryView.js:
      Call DatabasesPanel.dataGridForResult and adds the inline style to
      the DataGrid element.
      * page/inspector/DatabaseTableView.js:
      Call DatabasesPanel.dataGridForResult.
      * page/inspector/DatabasesPanel.js:
      (WebInspector.DatabasesPanel.prototype._tableForResult): Removed.
      (WebInspector.DatabasesPanel.prototype.dataGridForResult): Added.
      Similar to the previous _tableForResult function, but makes a DataGrid.
      * page/inspector/inspector.css: Changes to the data-grid
      style rules.
      * WebCore.vcproj/WebCore.vcproj: Add DataGrid.js.
      * page/inspector/WebKit.qrc: Ditto.
      * page/inspector/inspector.html: Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • jmalonzo@webkit.org's avatar
      2008-05-20 Jan Michael Alonzo <jmalonzo@webkit.org> · 4c3907ae
      jmalonzo@webkit.org authored
              Reviewed by Alp.
              [Gtk] Autotools should match build-webkit default flags
              * configure.ac:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • slewis@apple.com's avatar
      fix changelog · 79ddf1b1
      slewis@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33921 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • slewis@apple.com's avatar
      2008-05-19 Stephanie Lewis <slewis@apple.com> · 71de81e7
      slewis@apple.com authored
              Explicitly set run mode to 32bit unless overridden to avoid
              confusion when running tests
              * Scripts/build-dumprendertree:
              * Scripts/gdb-safari:
              * Scripts/run-webkit-tests:
              * Scripts/webkitdirs.pm:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  2. 19 May, 2008 23 commits