1. 12 Sep, 2009 2 commits
    • weinig@apple.com's avatar
      WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=29219 · d2427961
      weinig@apple.com authored
      Document.elementFromPoint() should take page scroll into consideration
      
      Reviewed by Anders Carlsson.
      
      Test: fast/dom/elementFromPoint-relative-to-viewport.html
      
      * dom/Document.cpp:
      (WebCore::Document::elementFromPoint):
      (WebCore::Document::caretRangeFromPoint):
      
      LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=29219
      Document.elementFromPoint() should take page scroll into consideration
      
      Reviewed by Anders Carlsson.
      
      * fast/dom/elementFromPoint-relative-to-viewport-expected.txt: Added.
      * fast/dom/elementFromPoint-relative-to-viewport.html: Added.
      * fast/events/offsetX-offsetY.html: Change to use clientX/Y instead of pageX/Y.
      * fast/forms/slider-transformed.html: Ditto.
      * fast/forms/slider-zoomed.html: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d2427961
    • weinig@apple.com's avatar
      WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=29217 · 4ff6c71c
      weinig@apple.com authored
      Document.caretRangeFromPoint should take the scroll offset into account before hit testing
      
      Reviewed by Maciej Stachowiak.
      
      In accordance with the CSSOM View Module spec, Document.caretRangeFromPoint should interpret
      the point passed to it as relative to the viewport, not the document.
      
      Test: fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html
      
      * dom/Document.cpp:
      (WebCore::Document::caretRangeFromPoint):
      
      LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=29217
      Document.caretRangeFromPoint should take the scroll offset into account before hit testing
      
      Reviewed by Maciej Stachowiak.
      
      * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt: Added.
      * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4ff6c71c
  2. 10 Sep, 2009 1 commit
    • cfleizach@apple.com's avatar
      AX notifications should be an ENUM type instead of strings · b54cc00f
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28963
      
      Reviewed by Darin Adler.
      
      Moves AX notifications over to an ENUM type instead of
      using the actual string values that are used on OS X.
      
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::postNotification):
      (WebCore::AXObjectCache::selectedChildrenChanged):
      * accessibility/AXObjectCache.h:
      (WebCore::AXObjectCache::):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
      * accessibility/chromium/AXObjectCacheChromium.cpp:
      (WebCore::AXObjectCache::postPlatformNotification):
      * accessibility/gtk/AXObjectCacheAtk.cpp:
      (WebCore::AXObjectCache::postPlatformNotification):
      * accessibility/mac/AXObjectCacheMac.mm:
      (WebCore::AXObjectCache::postPlatformNotification):
      * accessibility/win/AXObjectCacheWin.cpp:
      (WebCore::AXObjectCache::postPlatformNotification):
      * dom/Document.cpp:
      (WebCore::Document::implicitClose):
      * dom/Element.cpp:
      (WebCore::Element::updateAfterAttributeChanged):
      * editing/Editor.cpp:
      (WebCore::Editor::respondToChangedContents):
      * editing/mac/SelectionControllerMac.mm:
      (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::setChecked):
      * page/FrameView.cpp:
      (WebCore::FrameView::layout):
      * rendering/RenderTextControl.cpp:
      (WebCore::RenderTextControl::setInnerTextValue):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b54cc00f
  3. 09 Sep, 2009 1 commit
    • hyatt@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user... · 63e0ac2f
      hyatt@apple.com authored
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
      to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
      to all Frames in the PageGroup.
      
      Reviewed by Adam Roben.
      
      Added userscripts/simple-stylesheet.html test case.
      
      * WebCore.base.exp:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::CSSStyleSelector):
      * css/CSSStyleSelector.h:
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::attach):
      (WebCore::Document::pageGroupUserSheets):
      (WebCore::Document::clearPageGroupUserSheets):
      (WebCore::Document::recalcStyleSelector):
      * dom/Document.h:
      * loader/PlaceholderDocument.cpp:
      (WebCore::PlaceholderDocument::attach):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserStyleSheet):
      (WebCore::PageGroup::removeUserContentForWorld):
      (WebCore::PageGroup::removeAllUserContent):
      * page/PageGroup.h:
      (WebCore::PageGroup::userStyleSheets):
      * page/UserStyleSheet.h: Added.
      (WebCore::UserStyleSheet::UserStyleSheet):
      (WebCore::UserStyleSheet::source):
      (WebCore::UserStyleSheet::url):
      (WebCore::UserStyleSheet::patterns):
      (WebCore::UserStyleSheet::worldID):
      * page/UserStyleSheetTypes.h: Added.
      
      WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
      to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
      to all Frames in the PageGroup.
      
      Reviewed by Adam Roben.
      
      Added userscripts/simple-stylesheet.html test case.
      
      * WebView/WebView.mm:
      (+[WebView _addUserStyleSheetToGroup:source:url:worldID:patterns:]):
      * WebView/WebViewPrivate.h:
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
      to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
      to all Frames in the PageGroup.
      
      Reviewed by Adam Roben.
      
      Added userscripts/simple-stylesheet.html test case.
      
      * platform/mac/userscripts/simple-stylesheet-expected.checksum: Added.
      * platform/mac/userscripts/simple-stylesheet-expected.png: Added.
      * platform/mac/userscripts/simple-stylesheet-expected.txt: Added.
      * userscripts/simple-stylesheet.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      63e0ac2f
  4. 08 Sep, 2009 3 commits
    • weinig@apple.com's avatar
      WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=27046 · 628cb2cd
      weinig@apple.com authored
      Implement CSSOM DocumentView.caretRangeFromPoint
      
      Reviewed by Timothy Hatcher.
      
      Tests: fast/dom/Document/CaretRangeFromPoint/basic.html
             fast/dom/Document/CaretRangeFromPoint/replace-element.html
      
      * dom/Document.cpp:
      (WebCore::Document::caretRangeFromPoint):
      * dom/Document.h:
      * dom/Document.idl:
      
      LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=27046
      Implement CSSOM DocumentView.caretRangeFromPoint
      
      Reviewed by Timothy Hatcher.
      
      * fast/dom/Document/CaretRangeFromPoint: Added.
      * fast/dom/Document/CaretRangeFromPoint/basic-expected.txt: Added.
      * fast/dom/Document/CaretRangeFromPoint/basic.html: Added.
      * fast/dom/Document/CaretRangeFromPoint/replace-element-expected.txt: Added.
      * fast/dom/Document/CaretRangeFromPoint/replace-element.html: Added.
      * fast/dom/Window/window-properties-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      628cb2cd
    • hyatt@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=28987, make the Document cache the... · 959a3c5a
      hyatt@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28987, make the Document cache the page's user stylesheet in
      parsed form.  Allows the sheet to survive across destruction/re-creation of the CSSStyleSelector.
      
      Reviewed by Eric Seidel.
      
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::CSSStyleSelector):
      * css/CSSStyleSelector.h:
      * dom/Document.cpp:
      (WebCore::Document::attach):
      (WebCore::Document::pageUserSheet):
      (WebCore::Document::clearPageUserSheet):
      (WebCore::Document::recalcStyleSelector):
      * dom/Document.h:
      * loader/PlaceholderDocument.cpp:
      (WebCore::PlaceholderDocument::attach):
      * page/Page.cpp:
      (WebCore::Page::userStyleSheetLocationChanged):
      * page/Settings.cpp:
      (WebCore::Settings::setUserStyleSheetLocation):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      959a3c5a
    • eric@webkit.org's avatar
      2009-09-08 Kelly Norton <knorton@google.com> · 80bd7d6d
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              WebInspector: Adds a timeline agent to InspectorController that collects
              high-level timing data about event dispatch, layout, painting and HTML
              parsing and makes it available to Inspector.
              https://bugs.webkit.org/show_bug.cgi?id=25503
      
              * WebCore.gypi:
              * WebCore.xcodeproj/project.pbxproj:
              * dom/Document.cpp:
              (WebCore::Document::recalcStyle):
              * dom/Document.h:
              (WebCore::Document::inspectorTimelineAgent):
              * dom/Node.cpp:
              (WebCore::Node::dispatchGenericEvent):
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::write):
              * inspector/DOMDispatchTimelineItem.cpp: Added.
              (WebCore::DOMDispatchTimelineItem::DOMDispatchTimelineItem):
              (WebCore::DOMDispatchTimelineItem::convertToScriptObject):
              * inspector/DOMDispatchTimelineItem.h: Added.
              (WebCore::DOMDispatchTimelineItem::~DOMDispatchTimelineItem):
              * inspector/InspectorBackend.cpp:
              (WebCore::InspectorBackend::enableTimeline):
              (WebCore::InspectorBackend::disableTimeline):
              (WebCore::InspectorBackend::timelineEnabled):
              * inspector/InspectorBackend.h:
              * inspector/InspectorBackend.idl:
              * inspector/InspectorController.cpp:
              (WebCore::InspectorController::setFrontendProxyObject):
              (WebCore::InspectorController::close):
              (WebCore::InspectorController::resetScriptObjects):
              (WebCore::InspectorController::enableTimeline):
              (WebCore::InspectorController::disableTimeline):
              (WebCore::InspectorController::timelineEnabled):
              * inspector/InspectorController.h:
              (WebCore::InspectorController::timelineAgent):
              * inspector/InspectorFrontend.cpp:
              (WebCore::InspectorFrontend::timelineWasEnabled):
              (WebCore::InspectorFrontend::timelineWasDisabled):
              (WebCore::InspectorFrontend::addItemToTimeline):
              * inspector/InspectorFrontend.h:
              * inspector/InspectorTimelineAgent.cpp: Added.
              (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
              (WebCore::InspectorTimelineAgent::~InspectorTimelineAgent):
              (WebCore::InspectorTimelineAgent::willDispatchDOMEvent):
              (WebCore::InspectorTimelineAgent::didDispatchDOMEvent):
              (WebCore::InspectorTimelineAgent::willLayout):
              (WebCore::InspectorTimelineAgent::didLayout):
              (WebCore::InspectorTimelineAgent::willRecalculateStyle):
              (WebCore::InspectorTimelineAgent::didRecalculateStyle):
              (WebCore::InspectorTimelineAgent::willPaint):
              (WebCore::InspectorTimelineAgent::didPaint):
              (WebCore::InspectorTimelineAgent::willWriteHTML):
              (WebCore::InspectorTimelineAgent::didWriteHTML):
              (WebCore::InspectorTimelineAgent::reset):
              (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
              (WebCore::InspectorTimelineAgent::currentTimeInMilliseconds):
              (WebCore::InspectorTimelineAgent::sessionTimeInMilliseconds):
              * inspector/InspectorTimelineAgent.h: Added.
              * inspector/TimelineItem.cpp: Added.
              (WebCore::TimelineItem::TimelineItem):
              (WebCore::TimelineItem::addToTimeline):
              (WebCore::TimelineItem::convertToScriptObject):
              (WebCore::TimelineItem::convertChildrenToScriptArray):
              (WebCore::TimelineItem::addChildItem):
              * inspector/TimelineItem.h: Added.
              (WebCore::):
              (WebCore::TimelineItem::~TimelineItem):
              (WebCore::TimelineItem::previous):
              (WebCore::TimelineItem::releasePrevious):
              (WebCore::TimelineItem::setEndTime):
              (WebCore::TimelineItem::type):
              * inspector/front-end/TimelineAgent.js: Added.
              (WebInspector.TimelineAgent):
              (WebInspector.addItemToTimeline):
              (WebInspector.timelineWasEnabled):
              (WebInspector.timelineWasDisabled):
              * inspector/front-end/inspector.html:
              * page/FrameView.cpp:
              (WebCore::FrameView::layout):
              (WebCore::FrameView::paintContents):
              * page/FrameView.h:
              (WebCore::FrameView::inspectorTimelineAgent):
              * page/Page.cpp:
              (WebCore::Page::inspectorTimelineAgent):
              * page/Page.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      80bd7d6d
  5. 04 Sep, 2009 2 commits
    • hyatt@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=28984, remove the remote stylesheet loader on Mac/Qt. · dd7e173a
      hyatt@apple.com authored
      Make sure the other code path (now used by everybody) can handle data URLs.
      
      Reviewed by Adam Roben.
      
      As per the post on webkit-dev, the ability to work remotely isn't working properly anyway (it doesn't
      hold up the pending sheet count, so you'd just FOUC on every Web page), and it's extremely unlikely
      that anybody is relying on this support.
              
      Tor Arne agreed it was ok to disable (he enabled it on the Qt side), and only Mac/Qt were using this
      code.
      
      * WebCore.pro:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/Document.cpp:
      (WebCore::Document::userStyleSheet):
      * dom/Document.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::begin):
      * loader/UserStyleSheetLoader.cpp: Removed.
      * loader/UserStyleSheetLoader.h: Removed.
      * page/Frame.cpp:
      (WebCore::Frame::reapplyStyles):
      * page/Frame.h:
      * page/Page.cpp:
      (WebCore::Page::userStyleSheetLocationChanged):
      (WebCore::Page::userStyleSheet):
      * page/mac/FrameMac.mm:
      * page/qt/FrameQt.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dd7e173a
    • hyatt@apple.com's avatar
      Remove unused m_sheet variable and setCSSStyleSheet methods. · 632f2238
      hyatt@apple.com authored
      Reviewed by Anders Carlsson.
      
      * dom/Document.cpp:
      * dom/Document.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      632f2238
  6. 01 Sep, 2009 1 commit
    • jhoneycutt@apple.com's avatar
      Remove the workaround added in r47316. · 39e56eff
      jhoneycutt@apple.com authored
      Reviewed by Sam Weinig.
      
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::AXObjectCache):
      
      * accessibility/AXObjectCache.h:
      Remove the Document argument to the AXObjectCache constructor and the
      m_document member variable, and replace the no-parameter
      handleFocusedUIElementChanged() with the two-parameter GTK function.
      (WebCore::AXObjectCache::handleFocusedUIElementChanged):
      
      * accessibility/chromium/AXObjectCacheChromium.cpp:
      (WebCore::AXObjectCache::handleFocusedUIElementChanged):
      
      * accessibility/gtk/AXObjectCacheAtk.cpp:
      (WebCore::AXObjectCache::handleFocusedUIElementChanged):
      
      * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
      (fallbackObject):
      Don't pass a null Document when constructing the AXObjectCache.
      
      * accessibility/mac/AXObjectCacheMac.mm:
      (WebCore::AXObjectCache::handleFocusedUIElementChanged):
      
      * accessibility/win/AXObjectCacheWin.cpp:
      (WebCore::AXObjectCache::handleFocusedUIElementChanged):
      Get the document from the RenderObject; m_document was removed.
      
      * dom/Document.cpp:
      (WebCore::Document::axObjectCache):
      Don't pass the Document when constructing the AXObjectCache.
      (WebCore::Document::setFocusedNode):
      Pass the old and new focused RenderObjects when calling
      handleFocusedUIElementChanged().
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39e56eff
  7. 31 Aug, 2009 1 commit
  8. 27 Aug, 2009 1 commit
    • ap@apple.com's avatar
      Reviewed by Adele Peterson. · 383dde58
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=28758
              <rdar://problem/6440869> Implement pageshow and pagehide events for b/f cache (28758)
      
              Tests: fast/events/pageshow-pagehide-on-back-cached.html
                     fast/events/pageshow-pagehide-on-back-uncached.html
                     fast/events/pageshow-pagehide.html
      
              * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Dispatch pagehide event
              (this function is called both when a document goes away, and when it goes to b/f cache).
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Dispatch pagehide right before unload.
              (WebCore::DOMWindow::dispatchPageTransitionEvent): Do what it takes to add a new event handler
              that can be installed on Window object.
              (WebCore::DOMWindow::onpagehide): Ditto.
              (WebCore::DOMWindow::setOnpagehide): Ditto.
              (WebCore::DOMWindow::onpageshow): Ditto.
              (WebCore::DOMWindow::setOnpageshow): Ditto.
      
              * history/CachedFrame.cpp: (WebCore::CachedFrame::restore): Dispatch pageshow for a page
              that isn't being restored from cache.
      
              * dom/PageTransitionEvent.cpp: Added.
              (WebCore::PageTransitionEvent::PageTransitionEvent):
              (WebCore::PageTransitionEvent::~PageTransitionEvent):
              (WebCore::PageTransitionEvent::initPageTransitionEvent):
              * dom/PageTransitionEvent.h: Added.
              (WebCore::PageTransitionEvent::create):
              (WebCore::PageTransitionEvent::isPageTransitionEvent):
              (WebCore::PageTransitionEvent::persisted):
              * dom/PageTransitionEvent.idl: Added.
              Add event class implementation.
      
              * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): Support
              inline listener definition (note that adding listeners to document.body programmatically
              is not supported, matching Firefox).
      
              * dom/Document.cpp:
              (WebCore::Document::implicitClose): Dispatch pageshow event right before load event.
              (WebCore::Document::dispatchPageTransitionEvent): Do what it takes to add a new event for
              Docuemnt.
              (WebCore::Document::createEvent): Ditto.
      
              * dom/Document.h: Added dispatchPageTransitionEvent.
      
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSEventCustom.cpp: (WebCore::toJS):
              * dom/Event.cpp: (WebCore::Event::isPageTransitionEvent):
              * dom/Event.h:
              * dom/EventNames.h:
              * html/HTMLAttributeNames.in:
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
              Do what it takes to add a new event type.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      383dde58
  9. 25 Aug, 2009 1 commit
  10. 24 Aug, 2009 1 commit
    • krit@webkit.org's avatar
      2009-08-23 Dirk Schulze <krit@webkit.org> · 5e3479c8
      krit@webkit.org authored
              Reviewed by Mark Rowe.
      
              Code clean-up and build fix for filters enabled builds. Moved SVGNames.h
              into #if ENABLE(SVG) for Document.cpp and added SVGNames.h to the other
              files. They are needed there after r47688.
      
              * dom/Document.cpp:
              * svg/SVGComponentTransferFunctionElement.h:
              * svg/SVGFELightElement.h:
              * svg/SVGFEMergeNodeElement.h:
              * svg/SVGFilterPrimitiveStandardAttributes.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5e3479c8
  11. 23 Aug, 2009 2 commits
    • kov@webkit.org's avatar
      WebCore: · 3cfd379f
      kov@webkit.org authored
      2009-08-23  Gustavo Noronha Silva  <gns@gnome.org>
      
              Unreviewed, build fix for make distcheck on GTK+.
      
              * GNUmakefile.am: Added files needed for the build.
              * bindings/js/JSDOMWindowCustom.cpp: Protect SharedWorker include
              with #if clause.
              * bindings/js/JSEventTarget.cpp: Dito.
              * dom/Document.cpp: Dito.
              * loader/FrameLoader.cpp: Dito.
      
      JavaScriptCore:
      
      2009-08-23  Gustavo Noronha Silva  <gns@gnome.org>
      
              Unreviewed build fix for make distcheck.
      
              * GNUmakefile.am: Added files required for the build.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3cfd379f
    • darin@apple.com's avatar
      Make DOM classes start with a reference count of 1, like all other RefCounted · cf9dd0fa
      darin@apple.com authored
              
      Patch by Darin Adler <darin@apple.com> on 2009-08-22
      Reviewed by Oliver Hunt.
      
      Next step: Element, HTMLElement, HTMLAnchorElement, HTMLAppletElement,
      HTMLAreaElement, HTMLEmbedElement, HTMLFrameElement, HTMLIFrameElement,
      HTMLObjectElement, HTMLPlugInElement, HTMLPlugInImageElement.
      
      * DerivedSources.make: Fix error seen every time we build by escaping the $
      in the build rule, since you have to use $$ for that in make.
      
      * WebCore.base.exp: Updated.
      
      * bindings/objc/DOM.mm:
      Added now-needed include of SVGNames.h.
      
      * dom/Document.cpp: Added now-needed include of SVGNames.h.
      (WebCore::Document::createElement): Use create instead of new.
      
      * dom/Element.cpp:
      (WebCore::Element::Element): Added ConstructionType argument so the caller
      can determine whether this starts with a reference count of either 0 or 1.
      Later we will remove this again once they are all 1.
      (WebCore::Element::create): Added.
      
      * dom/Element.h: Added create and made constructor protected.
      
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::StyledElement): Added ConstructionType argument.
      * dom/StyledElement.h: Made many functions protected or private, including
      the constructor.
      
      * dom/make_names.pl: Use create to create the base elements HTMLElement,
      SVGElement, and WMLElement.
      
      * editing/CreateLinkCommand.cpp:
      (WebCore::CreateLinkCommand::doApply): Use create instead of new.
      * editing/UnlinkCommand.cpp:
      (WebCore::UnlinkCommand::doApply): Ditto.
      
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::create): Added.
      * html/HTMLAnchorElement.h: Made constructor protected and added create.
      Also made m_rootEditableElementForSelectionOnMouseDown a RefPtr.
      
      * html/HTMLAppletElement.cpp:
      (WebCore::HTMLAppletElement::create): Added.
      * html/HTMLAppletElement.h: Made constructor private and added create.
      
      * html/HTMLAreaElement.cpp:
      (WebCore::HTMLAreaElement::create): Added.
      * html/HTMLAreaElement.h: Made constructor private and added create.
      
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::create): Added.
      * html/HTMLElement.h: Made constructor protected and added create.
      Made other functions protected and private. Also added inline
      definition of constructor.
      
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::create): Added.
      * html/HTMLEmbedElement.h: Made constructor private and added create.
      Made other functions private.
      
      * html/HTMLFrameElement.cpp:
      (WebCore::HTMLFrameElement::create): Added.
      (WebCore::HTMLFrameElement::parseMappedAttribute):
      * html/HTMLFrameElement.h: Made constructor private and added create.
      Made other functions private.
      
      * html/HTMLFrameElementBase.h: Made functions protected and private.
      
      * html/HTMLFrameOwnerElement.cpp:
      (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): Pass
      CreateElement so reference count starts at 1.
      
      * html/HTMLFrameOwnerElement.h: Made functions protected and private.
      
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::create): Added.
      * html/HTMLIFrameElement.h: Made constructor private and added create.
      Made other functions private.
      
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::create): Added.
      (WebCore::HTMLObjectElement::containsJavaApplet): Changed while loop
      into a for loop and tweaked formatting.
      
      * html/HTMLObjectElement.h: Made constructor private and added create.
      Made other functions private.
      
      * html/HTMLPlugInElement.h: Made constructor protected.
      Made other functions protected and private.
      
      * html/HTMLPlugInImageElement.h: Made constructor and another function
      protected.
      
      * html/HTMLTagNames.in: Removed createWithNew from all classes that
      now have create functions. Moved conditional noscript to a separate
      paragraph.
      
      * html/HTMLViewSourceDocument.cpp:
      (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Use create.
      (WebCore::HTMLViewSourceDocument::addLink): Ditto.
      * page/DragController.cpp:
      (WebCore::documentFragmentFromDragData): Ditto.
      
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::SVGElement): Pass CreateElementZeroRefCount
      so reference count still starts at 0. Will change this class later.
      (WebCore::SVGElement::create): Added.
      * svg/SVGElement.h: Added create, made constructor protected, and
      made other functions protected and private. Removed unneeded
      SVGNames.h include.
      
      * svg/SVGExternalResourcesRequired.h: Added now-needed SVGNames.h
      include.
      
      * svg/SVGStopElement.h: Added now-needed SVGNames.h include.
      Made functions private.
      
      * wml/WMLElement.cpp:
      (WebCore::WMLElement::WMLElement): Pass CreateElementZeroRefCount
      so reference count still starts at 0. Will change this class later.
      (WebCore::WMLElement::create): Added.
      * wml/WMLElement.h: Added create and made constructor protected.
      
      * wml/WMLTagNames.in: Removed createWithNew from WMLElement.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf9dd0fa
  12. 18 Aug, 2009 1 commit
    • darin@apple.com's avatar
      More work on making DOM classes start with reference count of 1 · 3a3edd48
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28068
      
      Patch by Darin Adler <darin@apple.com> on 2009-08-18
      Reviewed by Sam Weinig.
      
      Some related clean-up and preparation steps so the subsequent
      patches will be as small as possible.
      
      * WebCore.base.exp: Sorted this file.
      
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::accessibilityDescription):
      Use nameAttr instead of the name function.
      
      * bindings/js/JSHTMLFrameElementCustom.cpp:
      (WebCore::JSHTMLFrameElement::setSrc):
      Use srcAttr instead of the src function.
      
      * bindings/js/JSHTMLIFrameElementCustom.cpp:
      (WebCore::JSHTMLIFrameElement::setSrc):
      Use srcAttr instead of the src function.
      
      * bindings/objc/DOM.mm: Sorted includes.
      * dom/Document.cpp: Ditto.
      
      * dom/StyledElement.cpp: Made invalidateStyleAttribute inline.
      * dom/StyledElement.h: Ditto.
      
      * dom/make_names.pl: Changed default of createWithNew to 0.
      Eventually all elements will be created with create instead of new.
      
      * html/HTMLTagNames.in:
      * svg/svgtags.in:
      * wml/WMLTagNames.in:
      Added createWithNew for every tag. We'll remove it as we convert
      element classes to use create.
      
      * html/HTMLAppletElement.h: Removed unneeded forward declarations.
      * html/HTMLFrameElement.h: Ditto.
      
      * html/HTMLEmbedElement.cpp: Removed many attribute get and
      set functions.
      * html/HTMLEmbedElement.h: Ditto.
      * html/HTMLIFrameElement.cpp: Ditto.
      * html/HTMLIFrameElement.h: Ditto.
      * html/HTMLObjectElement.cpp: Ditto.
      * html/HTMLObjectElement.h: Ditto.
      * html/HTMLPlugInElement.cpp: Ditto.
      * html/HTMLPlugInElement.h: Ditto.
      
      * html/HTMLFrameElementBase.cpp: Removed many attribute get and
      set functions.
      (WebCore::HTMLFrameElementBase::location): Changed to use
      srcAttr instead of src.
      * html/HTMLFrameElementBase.h: Removed many attribute get and set
      functions.
      
      * loader/MediaDocument.cpp:
      (WebCore::MediaDocument::replaceMediaElementTimerFired):
      Use srcAttr and typeAttr instead of setSrc and setType.
      * loader/PluginDocument.cpp:
      (WebCore::PluginTokenizer::createDocumentStructure): Ditto.
      
      * rendering/RenderPartObject.cpp:
      (WebCore::RenderPartObject::updateWidget): Use nameAttr instead
      of name -- this avoids an extra AtomicString round trip and a little
      ref count churn too.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a3edd48
  13. 17 Aug, 2009 1 commit
  14. 15 Aug, 2009 2 commits
    • darin@apple.com's avatar
      Make DOM classes start with a reference count of 1, like all other RefCounted · 7e131b6d
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28068
      
      Patch by Darin Adler <darin@apple.com> on 2009-08-14
      Reviewed by Sam Weinig.
      
      First half, everything except for element classes.
      
      * GNUmakefile.am: Removed DocPtr.h.
      * WebCore.gypi: Ditto.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      
      * dom/Attr.cpp:
      (WebCore::Attr::Attr): Added a call to createTextChild here so callers don't
      have to call it explicitly.
      (WebCore::Attr::create): Added.
      (WebCore::Attr::setValue): Changed to take AtomicString.
      (WebCore::Attr::cloneNode): Use create.
      
      * dom/Attr.h: Added a create function. Made the constructor private,
      and a lot of other functions private as well.
      
      * dom/Attribute.cpp:
      (WebCore::Attribute::createAttrIfNeeded): Use Attr::create.
      
      * dom/CDATASection.cpp:
      (WebCore::CDATASection::create): Added.
      (WebCore::CDATASection::cloneNode): Use create.
      (WebCore::CDATASection::virtualCreate): Ditto.
      
      * dom/CDATASection.h: Added a create function. Made everything private.
      Removed unneeded destructor declaration.
      
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::CharacterData): Replaced the multiple constructors
      with a single one that takes ConstructionType.
      
      * dom/CharacterData.h: Made more functions be protected and private.
      Made m_data be private.
      
      * dom/Comment.cpp:
      (WebCore::Comment::Comment): Got rid of an extra constructor.
      (WebCore::Comment::create): Added.
      (WebCore::Comment::cloneNode): Call create.
      
      * dom/Comment.h: Added a create function. Made everything private.
      
      * dom/ContainerNode.cpp:
      (WebCore::dispatchChildInsertionEvents): Use RefPtr instead of DocPtr.
      (WebCore::dispatchChildRemovalEvents): Ditto.
      
      * dom/ContainerNode.h: Made the constructor protected and passed
      ConstructionType instead of an isElement boolean.
      
      * dom/DocPtr.h: Removed.
      
      * dom/Document.cpp:
      (WebCore::Document::Document): Simplified the code that sets m_document
      since it's no longer a smart pointer.
      (WebCore::Document::removedLastRef): Use explicit calls to selfOnlyRef
      and selfOnlyDeref instead of a DocPtr in here.
      (WebCore::Document::~Document): Simplified the code that sets m_document
      since it's no longer a smart pointer.
      (WebCore::Document::createDocumentFragment): Call create.
      (WebCore::Document::createTextNode): Ditto.
      (WebCore::Document::createComment): Ditto.
      (WebCore::Document::createCDATASection): Ditto.
      (WebCore::Document::createProcessingInstruction): Ditto.
      (WebCore::Document::createEntityReference): Ditto.
      (WebCore::Document::createEditingTextNode): Ditto.
      (WebCore::Document::importNode): Call Attr::create.
      (WebCore::Document::createAttributeNS): Ditto.
      
      * dom/Document.h: Call adoptRef. Made a lot of functions private and
      protected and sorted them so public functions come first.
      
      * dom/DocumentFragment.cpp:
      (WebCore::DocumentFragment::create): Added.
      (WebCore::DocumentFragment::cloneNode): Call create.
      * dom/DocumentFragment.h: Added create.
      
      * dom/DocumentType.cpp:
      (WebCore::DocumentType::DocumentType): Pass type to Node constructor.
      (WebCore::DocumentType::cloneNode): Use create.
      * dom/DocumentType.h:
      (WebCore::DocumentType::create): Call adoptRef.
      
      * dom/EditingText.cpp:
      (WebCore::EditingText::create): Added.
      * dom/EditingText.h: Added a create function. Made everything private.
      
      * dom/Element.cpp:
      (WebCore::Element::Element): Pass CreateElementZeroRefCount to preserve
      the zero reference count behavior for classes derived from Element.
      
      * dom/EntityReference.cpp:
      (WebCore::EntityReference::create): Added.
      (WebCore::EntityReference::cloneNode): Call create.
      * dom/EntityReference.h: Added create. Made everything private.
      
      * dom/Node.cpp:
      (WebCore::Node::initialRefCount): Added. Inline helper function for
      the constructor.
      (WebCore::Node::isContainer): Ditto.
      (WebCore::Node::isElement): Ditto.
      (WebCore::Node::isText): Ditto.
      (WebCore::Node::Node): Changed to take a construction type argument.
      Since m_document is now a normal pointer, added a call to selfOnlyRef.
      (WebCore::Node::~Node): Ditto, but selfOnlyDeref.
      (WebCore::Node::setDocument): Added selfOnlyRef/Deref calls.
      (WebCore::Node::appendTextContent): Use the data function instead of
      calling nodeValue functions, which do the same thing in a roundabout way.
      
      * dom/Node.h: Made the constructor protected and replaced the multiple
      arguments iwth a single ConstructionType argument. Sorted the public
      things first.
      
      * dom/Notation.h: Made most things private.
      * dom/Notation.cpp: Removed extra constructor.
      
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::create): Added.
      (WebCore::ProcessingInstruction::cloneNode): Call create.
      * dom/ProcessingInstruction.h: Added create function. Made many other
      members private.
      
      * dom/Range.cpp:
      (WebCore::Range::processContents): Use DocumentFragment::create.
      
      * dom/Text.cpp:
      (WebCore::Text::Text): Updated for base class change.
      (WebCore::Text::create): Added.
      (WebCore::Text::splitText): Changed to not require access to m_data.
      (WebCore::Text::cloneNode): Call create.
      (WebCore::Text::createRenderer): Call dataImpl.
      (WebCore::Text::attach): Call data.
      (WebCore::Text::recalcStyle): Call dataImpl.
      (WebCore::Text::virtualCreate): Call create.
      (WebCore::Text::createWithLengthLimit): Call create.
      (WebCore::Text::formatForDebugger): Call data.
      
      * dom/Text.h: Added a create function. Made many other members private.
      Renamed createNew to virtualCreate.
      
      * dom/XMLTokenizer.cpp:
      (WebCore::XMLTokenizer::enterText): Call Text::create.
      
      * dom/XMLTokenizerLibxml2.cpp:
      (WebCore::XMLTokenizer::cdataBlock): Call CDATASection::create.
      (WebCore::XMLTokenizer::comment): Call Comment::create.
      
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::deleteInsignificantText):
      Call data instead of string.
      
      * editing/CreateLinkCommand.cpp:
      (WebCore::CreateLinkCommand::doApply): Call Text::create.
      
      * editing/EditorCommand.cpp:
      (WebCore::executeInsertNode): Call DocumentFragment::create.
      
      * editing/SplitTextNodeCommand.cpp:
      (WebCore::SplitTextNodeCommand::doApply): Call Text::create.
      
      * editing/markup.cpp:
      (WebCore::appendStartMarkup): Call data instead of nodeValue.
      
      * html/HTMLDocument.h:
      (WebCore::HTMLDocument::create): Call adoptRef.
      
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::createContextualFragment): Call DocumentFragment::create.
      (WebCore::replaceChildrenWithFragment): Call data instead of string.
      (WebCore::replaceChildrenWithText): Call Text::create.
      (WebCore::HTMLElement::setInnerText): Call DocumentFragment::create and
      Text::create.
      (WebCore::HTMLElement::setOuterText): Call Text::create.
      
      * html/HTMLKeygenElement.cpp:
      (WebCore::HTMLKeygenElement::HTMLKeygenElement): Call Text::create.
      
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::setText): Call Text::create.
      
      * html/HTMLParser.cpp:
      (WebCore::HTMLParser::textCreateErrorCheck): Call Text::create.
      (WebCore::HTMLParser::commentCreateErrorCheck): Call Comment::create.
      (WebCore::HTMLParser::handleIsindex): Call Text::create.
      
      * html/HTMLViewSourceDocument.cpp:
      (WebCore::HTMLViewSourceDocument::addText): Call Text::create.
      
      * html/HTMLViewSourceDocument.h:
      (WebCore::HTMLViewSourceDocument::create): Call adoptRef.
      
      * loader/FTPDirectoryDocument.cpp:
      (WebCore::FTPDirectoryTokenizer::appendEntry): Call Text::create.
      (WebCore::FTPDirectoryTokenizer::createTDForFilename): Call Text::create.
      
      * loader/FTPDirectoryDocument.h:
      (WebCore::FTPDirectoryDocument::create): Call adoptRef.
      * loader/ImageDocument.h:
      (WebCore::ImageDocument::create): Ditto.
      * loader/MediaDocument.h:
      (WebCore::MediaDocument::create): Ditto.
      * loader/PlaceholderDocument.h:
      (WebCore::PlaceholderDocument::create): Ditto.
      * loader/PluginDocument.h:
      (WebCore::PluginDocument::create): Ditto.
      * loader/TextDocument.h:
      (WebCore::TextDocument::create): Ditto.
      
      * loader/loader.cpp:
      (WebCore::Loader::Host::didFinishLoading): Use RefPtr instead of DocPtr.
      (WebCore::Loader::Host::didFail): Ditto.
      
      * platform/TreeShared.h:
      (WebCore::TreeShared::TreeShared): Added an initialRefCount argument,
      defaulting to 1. Node still sometimes initializes it to 0 instead for now.
      
      * rendering/RenderText.cpp:
      (WebCore::RenderText::originalText): Use dataImpl instead of string.
      
      * rendering/RenderTextFragment.cpp:
      (WebCore::RenderTextFragment::originalText): Use dataImpl instead of string.
      (WebCore::RenderTextFragment::previousCharacter): Ditto.
      
      * svg/SVGDocument.h:
      (WebCore::SVGDocument::create): Use adoptRef.
      
      * svg/SVGElementInstance.cpp:
      (WebCore::SVGElementInstance::SVGElementInstance): Updated to take a
      PassRefPtr.
      
      * svg/SVGElementInstance.h: Made everything private.
      
      * wml/WMLDocument.h:
      (WebCore::WMLDocument::create): Called adoptRef.
      
      * xml/XPathNamespace.cpp:
      (WebCore::XPathNamespace::XPathNamespace): Take AtomicString arguments.
      * xml/XPathNamespace.h: Made everything private.
      
      * xml/XSLTProcessor.cpp:
      (WebCore::createFragmentFromSource): Use DocumentFragment::create and
      Text::create.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e131b6d
    • jhoneycutt@apple.com's avatar
      WebCore: · 784612d0
      jhoneycutt@apple.com authored
      2009-08-13  Jon Honeycutt  <jhoneycutt@apple.com>
      
              Part of <rdar://problem/6218721> No MSAA focus events fired for Webkit
              nightly (20866)
      
              https://bugs.webkit.org/show_bug.cgi?id=20866
      
              Reviewed by Oliver Hunt.
      
              * accessibility/AXObjectCache.cpp:
              (WebCore::AXObjectCache::AXObjectCache):
              Changed to take a pointer to its owner document. This is used by
              AXObjectCache::handleFocusedUIElementChanged().
              (WebCore::AXObjectCache::focusedUIElementForPage):
              Code moved from AccessibilityRenderObject::focusedUIElement(). Modified
              to be a static function and to take a pointer to a Page.
              (WebCore::AXObjectCache::platformGenerateAXID):
              Moved the code to generate the next AXID from getAXID() to here. Added
              a #if to make this non-WIN only, because Windows has its own
              implementation.
              (WebCore::AXObjectCache::getAXID):
              Ensure that we generate a positive AXID, ranging from 1 to LONG_MAX.
      
              * accessibility/AXObjectCache.h:
              Add a declaration for Document and Page. Removed the declaration of
              AccessibilityObject, because we include the header. Reordered the
              declaration of Node alphabetically. Moved the typedef for AXID to
              AccessibilityObject. Removed some trailing whitespace. Added a member
              variable to hold a pointer to the owner Document.
              (WebCore::AXObjectCache::AXObjectCache):
              Changed to take a pointer to its owner Document.
              (WebCore::AXObjectCache::focusedUIElementForPage):
              Added; code moved from AccessiblityRenderObject::focusedUIElement().
              Returns the focused element with respect to accessibility.
              (WebCore::AXObjectCache::platformGenerateAXID):
              Declare a function to generate an AXID.
              (WebCore::AXObjectCache::objectFromAXID):
              Return the AccessibilityObject with the given AXID.
      
              * accessibility/AccessibilityObject.h:
              Moved the typedef for AXID from AXObjectCache to here. Made the m_id
              member use the typedef.
              (WebCore::AccessibilityObject::axObjectID):
              Changed the return type to use the typedef.
              (WebCore::AccessibilityObject::setAXObjectID):
              Changed the argument type to use the typedef.
      
              * accessibility/AccessibilityRenderObject.cpp:
              Removed some unneeded #includes.
              (WebCore::AccessibilityRenderObject::focusedUIElement):
              Moved the code to AXObjectCache::focusedUIElementForPage(), which we now
              call.
      
              * accessibility/win/AXObjectCacheWin.cpp:
              (WebCore::AXObjectCache::platformGenerateAXID):
              Ensure that we generate an AXID that is in the range 1 to LONG_MAX.
              (WebCore::AXObjectCache::handleFocusedUIElementChanged):
              If the Document has no Page, return. If the Page has not focused
              element (respecting accessibility), return. Assert that the
              accessibility of the focused element is not ignored, and that the
              object's AXID will be negative and fit into a LONG when negated.
              Broadcast a focus event for the object.
      
              * dom/Document.cpp:
              (WebCore::Document::axObjectCache):
              Pass this when creating the AXObjectCache.
              (WebCore::Document::setFocusedNode):
              Call AXObjectCache::handleFocusedUIElementChanged() on Windows.
      
      WebKit/win:
      
      2009-08-13  Jon Honeycutt  <jhoneycutt@apple.com>
      
              Part of <rdar://problem/6218721> No MSAA focus events fired for Webkit
              nightly (20866)
      
              https://bugs.webkit.org/show_bug.cgi?id=20866
      
              Reviewed by Oliver Hunt.
      
              * AccessibleBase.cpp:
              (AccessibleBase::getAccessibilityObjectForChild):
              If the child ID is negative, negate it and treat it as an AXID.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      784612d0
  15. 11 Aug, 2009 1 commit
    • atwilson@chromium.org's avatar
      WebCore: SharedWorkers do not exit when the last parent document exits · e57cf263
      atwilson@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=28170
      
      Reviewed by David Levin.
      
      Prevents Documents from being suspended/placed in the page cache if they are associated with shared workers.
      
      Added vector cache instead of nested hash tables for SharedWorker repository.
      
      Added SharedWorkerRepository::documentDetached API.
      
      * dom/Document.cpp:
      (WebCore::Document::detach):
      Notifies SharedWorkerRepository when the document is closing.
      * loader/FrameLoader.cpp:
      Updated FrameLoader to not cache the Document if it is associated with a SharedWorker (since we can't suspend workers yet, we need to shut them down).
      (WebCore::FrameLoader::canCachePageContainingThisFrame):
      (WebCore::FrameLoader::logCanCacheFrameDecision):
      * workers/DefaultSharedWorkerRepository.cpp:
      (WebCore::SharedWorkerProxy::create):
      (WebCore::SharedWorkerProxy::isClosing):
      Renamed from closing().
      (WebCore::SharedWorkerProxy::matches):
      Added manual equality function to replace old hash lookup.
      (WebCore::SharedWorkerProxy::isDocumentInWorkerDocuments):
      Checks to see if a document is in the worker's list of documents. Used to determine if page is suspendable.
      (WebCore::SharedWorkerProxy::SharedWorkerProxy):
      (WebCore::SharedWorkerProxy::addToWorkerDocuments):
      Added tracking of the worker's list of documents for lifecycle purposes.
      (WebCore::SharedWorkerProxy::documentDetached):
      Shuts down the proxy when the last associated document is detached.
      (WebCore::SharedWorkerProxy::close):
      Marks the proxy as closed so it is no longer shared with new instances.
      (WebCore::SharedWorkerProxy::workerContextDestroyed):
      Removes the proxy from the repository/frees the proxy when the associated SharedWorkerContext is destroyed.
      (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
      closing()->isClosing()
      (WebCore::SharedWorkerRepository::documentDetached):
      (WebCore::SharedWorkerRepository::hasSharedWorkers):
      Used by FrameLoader to determine if a page has shared workers and so cannot be suspended/cached.
      (WebCore::DefaultSharedWorkerRepository::hasSharedWorkers):
      (WebCore::DefaultSharedWorkerRepository::removeProxy):
      Invoked by workerContextDestroyed() to remove a SharedWorkerProxy from the repository.
      (WebCore::DefaultSharedWorkerRepository::documentDetached):
      (WebCore::DefaultSharedWorkerRepository::connectToWorker):
      (WebCore::DefaultSharedWorkerRepository::getProxy):
      * workers/DefaultSharedWorkerRepository.h:
      * workers/SharedWorkerRepository.h:
      
      LayoutTests: SharedWorkers do not exit when the last parent document exits.
      https://bugs.webkit.org/show_bug.cgi?id=28170
      
      Reviewed by David Levin.
      
      Added more tests to check that previous incarnations of the SharedWorker "name" are shut down.
      
      * fast/workers/shared-worker-replace-global-constructor.html-disabled:
      Fixed incorrect path to common script.
      * fast/workers/shared-worker-shared-expected.txt:
      * fast/workers/shared-worker-shared.html-disabled:
      Added more tests for sharing, including initial test to make sure previous incarnations of shared worker were closed.
      * fast/workers/worker-replace-global-constructor.html:
      Removed extraneous closing HTML tag.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e57cf263
  16. 30 Jul, 2009 1 commit
    • darin@apple.com's avatar
      2009-07-30 Darin Adler <darin@apple.com> · 9c962752
      darin@apple.com authored
              Reviewed by David Levin.
      
              Use checked casts for render tree
              https://bugs.webkit.org/show_bug.cgi?id=23522
      
              Next step: Add new toRenderWidget cast and use it everywhere.
      
              Use checked casts in all the places that were using static_cast
              but there is a checked cast available.
      
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::stringValue):
              (WebCore::AccessibilityRenderObject::widget):
              (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
              (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
              * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
              (getPangoLayoutForAtk):
              * dom/Document.cpp:
              (WebCore::widgetForNode):
              (WebCore::Document::setFocusedNode):
              * html/HTMLEmbedElement.cpp:
              (WebCore::findWidgetRenderer):
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::defaultEventHandler):
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
              * html/HTMLPlugInElement.cpp:
              (WebCore::HTMLPlugInElement::defaultEventHandler):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::loadSubframe):
              * loader/PluginDocument.cpp:
              (WebCore::PluginTokenizer::writeRawData):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::hitTestResultAtPoint):
              (WebCore::subframeForTargetNode):
              (WebCore::EventHandler::handleWheelEvent):
              * page/Frame.cpp:
              (WebCore::isFrameElement):
              * page/PrintContext.cpp:
              (WebCore::PrintContext::computePageRects):
              * page/android/EventHandlerAndroid.cpp:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              * page/chromium/EventHandlerChromium.cpp:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              * page/chromium/FrameChromium.cpp:
              (WebCore::computePageRectsForFrame):
              * page/gtk/EventHandlerGtk.cpp:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              * page/haiku/EventHandlerHaiku.cpp:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              (WebCore::EventHandler::passSubframeEventToSubframe):
              * page/win/FrameWin.cpp:
              (WebCore::computePageRectsForFrame):
              * page/wx/EventHandlerWx.cpp:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              * platform/chromium/ClipboardChromium.cpp:
              (WebCore::getCachedImage):
              * platform/chromium/PasteboardChromium.cpp:
              (WebCore::Pasteboard::writeImage):
              * platform/gtk/PasteboardGtk.cpp:
              (WebCore::Pasteboard::writeImage):
              * platform/mac/PasteboardMac.mm:
              (WebCore::Pasteboard::writeImage):
              * platform/qt/ClipboardQt.cpp:
              (WebCore::getCachedImage):
              * platform/qt/PasteboardQt.cpp:
              (WebCore::Pasteboard::writeImage):
              * platform/win/ClipboardWin.cpp:
              (WebCore::getCachedImage):
              * platform/win/PasteboardWin.cpp:
              (WebCore::Pasteboard::writeImage):
              * rendering/InlineBox.h:
              (WebCore::InlineBox::boxModelObject):
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::splitInlines):
              (WebCore::RenderInline::addChildToContinuation):
              * rendering/RenderLayerBacking.cpp:
              (WebCore::RenderLayerBacking::updateImageContents):
              * rendering/TextControlInnerElements.cpp:
              (WebCore::RenderTextControlInnerBlock::positionForPoint):
              Use checked cast instead of static_cast.
              
              * rendering/RenderWidget.h: Added toRenderWidget.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c962752
  17. 27 Jul, 2009 2 commits
    • ojan@chromium.org's avatar
      2009-07-27 Ojan Vafai <ojan@chromium.org> · e4d44e16
      ojan@chromium.org authored
              Reviewed by Darin Adler.
      
              https://bugs.webkit.org/show_bug.cgi?id=27474
              Tests crashes when calling select, setSelectionRange or setting
              selectionStart/selectionEnd on a textarea/input immediately after
              setting display:none.
      
              * fast/dom/text-control-crash-on-select-expected.txt: Added.
              * fast/dom/text-control-crash-on-select.html: Added.
      
      2009-07-27  Ojan Vafai  <ojan@chromium.org>
      
              Reviewed by Darin Adler.
      
              https://bugs.webkit.org/show_bug.cgi?id=27474
              Fixes crashes due to renderer getting destroyed in updateLayout.
              We need to call updateLayout before we call into the renderer.
              Removed the updateLayout call from RenderTextControl and moved it
              into the calling sites.
      
              Also changes updateLayout to updateLayoutIgnorePendingStylesheets so
              this works with pending stylesheets. Unfortunately, this seems to be
              untestable. Loading an external stylesheet and then having an inline
              script hit this code did not result in an pending stylesheets.
      
              The are other cases of this bug in the rendering code. I'll file a
              followup bug to audit the calls to updateLayout.
      
              Test: fast/dom/text-control-crash-on-select.html
      
              * dom/Document.h:
              (WebCore::Document::inStyleRecalc): Added so the ASSERTs in updateFocusAppearance
                  and setSelectionRange could deal with cases of reentrancy into updateLayout
                  calls. This happens in a couple layout tests.
              * dom/InputElement.cpp:
              (WebCore::InputElement::updateSelectionRange):
              * html/HTMLInputElement.cpp:
              (WebCore::isTextFieldWithRendererAfterUpdateLayout):
              (WebCore::HTMLInputElement::setSelectionStart):
              (WebCore::HTMLInputElement::setSelectionEnd):
              (WebCore::HTMLInputElement::select):
              * html/HTMLTextAreaElement.cpp:
              (WebCore::rendererAfterUpdateLayout):
              (WebCore::HTMLTextAreaElement::setSelectionStart):
              (WebCore::HTMLTextAreaElement::setSelectionEnd):
              (WebCore::HTMLTextAreaElement::select):
              (WebCore::HTMLTextAreaElement::setSelectionRange):
              (WebCore::HTMLTextAreaElement::updateFocusAppearance):
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::setSelectionRange):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e4d44e16
    • zimmermann@webkit.org's avatar
      [WML] History handling / page cache / loading is buggy and depends on several hacks · 1ef223dc
      zimmermann@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=27707
      
      Redesign WML history/loading handling. See ChangeLog for details.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1ef223dc
  18. 23 Jul, 2009 1 commit
  19. 15 Jul, 2009 1 commit
    • hyatt@apple.com's avatar
      WebCore: · a67f96a0
      hyatt@apple.com authored
      2009-07-14  David Hyatt  <hyatt@apple.com>
      
              Reviewed by Simon Fraser.
      
              https://bugs.webkit.org/show_bug.cgi?id=27283
      
              Implement the new 'rem' unit from CSS3.
      
              Added some rem-* tests in fast/css.
      
              * css/CSSGrammar.y:
              * css/CSSParser.cpp:
              (WebCore::CSSParser::validUnit):
              (WebCore::unitFromString):
              (WebCore::CSSParser::parseValue):
              (WebCore::CSSParser::lex):
              * css/CSSParserValues.cpp:
              (WebCore::CSSParserValue::createCSSValue):
              * css/CSSPrimitiveValue.cpp:
              (WebCore::CSSPrimitiveValue::computeLengthInt):
              (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
              (WebCore::CSSPrimitiveValue::computeLengthShort):
              (WebCore::CSSPrimitiveValue::computeLengthFloat):
              (WebCore::CSSPrimitiveValue::computeLengthDouble):
              (WebCore::CSSPrimitiveValue::cssText):
              (WebCore::CSSPrimitiveValue::parserValue):
              * css/CSSPrimitiveValue.h:
              (WebCore::CSSPrimitiveValue::):
              (WebCore::CSSPrimitiveValue::isUnitTypeLength):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::initForStyleResolve):
              (WebCore::convertToLength):
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::mapFillSize):
              (WebCore::CSSStyleSelector::mapFillXPosition):
              (WebCore::CSSStyleSelector::mapFillYPosition):
              (WebCore::CSSStyleSelector::createTransformOperations):
              * css/CSSStyleSelector.h:
              * css/MediaQueryEvaluator.cpp:
              (WebCore::device_heightMediaFeatureEval):
              (WebCore::device_widthMediaFeatureEval):
              (WebCore::heightMediaFeatureEval):
              (WebCore::widthMediaFeatureEval):
              * css/WebKitCSSMatrix.cpp:
              (WebCore::WebKitCSSMatrix::setMatrixValue):
              * css/tokenizer.flex:
              * dom/Document.cpp:
              (WebCore::Document::Document):
              * dom/Document.h:
              (WebCore::Document::usesRemUnits):
              (WebCore::Document::setUsesRemUnits):
              * dom/Element.cpp:
              (WebCore::Element::recalcStyle):
              * rendering/SVGRenderTreeAsText.cpp:
              (WebCore::writeStyle):
              * rendering/style/SVGRenderStyle.cpp:
              (WebCore::SVGRenderStyle::cssPrimitiveToLength):
              * svg/graphics/SVGPaintServer.cpp:
              (WebCore::applyStrokeStyleToContext):
              (WebCore::dashArrayFromRenderingStyle):
              * svg/graphics/SVGPaintServer.h:
      
      LayoutTests:
      
      2009-07-14  David Hyatt  <hyatt@apple.com>
      
              Reviewed by Simon Fraser.
      
              Add layout tests for the new CSS3 'rem' unit type.
      
              * fast/css/rem-dynamic-scaling.html: Added.
              * fast/css/rem-units-on-root.html: Added.
              * fast/css/remove-shorthand-expected.checksum: Added.
              * fast/css/remove-shorthand-expected.png: Added.
              * platform/mac/fast/css/rem-dynamic-scaling-expected.checksum: Added.
              * platform/mac/fast/css/rem-dynamic-scaling-expected.png: Added.
              * platform/mac/fast/css/rem-dynamic-scaling-expected.txt: Added.
              * platform/mac/fast/css/rem-units-on-root-expected.checksum: Added.
              * platform/mac/fast/css/rem-units-on-root-expected.png: Added.
              * platform/mac/fast/css/rem-units-on-root-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a67f96a0
  20. 12 Jul, 2009 1 commit
    • bfulgham@webkit.org's avatar
      WebCore: · 0b68bb9d
      bfulgham@webkit.org authored
      2009-07-12  Keishi Hattori  <casey.hattori@gmail.com>
      
              Reviewed by Timothy Hatcher.
      
              Refactor ConsoleMessage to add MessageType attribute.
              https://bugs.webkit.org/show_bug.cgi?id=20625
      
              * bindings/js/JSCustomXPathNSResolver.cpp:
              (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::printErrorMessage):
              * dom/Document.cpp:
              (WebCore::Document::reportException):
              (WebCore::Document::addMessage):
              * dom/Document.h:
              * dom/ScriptExecutionContext.h:
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::reportErrorToConsole):
              * inspector/ConsoleMessage.cpp:
              (WebCore::ConsoleMessage::ConsoleMessage):
              (WebCore::ConsoleMessage::addToConsole):
              (WebCore::ConsoleMessage::isEqual):
              * inspector/ConsoleMessage.h:
              * inspector/InspectorController.cpp:
              (WebCore::InspectorController::addMessageToConsole):
              (WebCore::InspectorController::startGroup):
              (WebCore::InspectorController::endGroup):
              (WebCore::InspectorController::addProfileFinishedMessageToConsole):
              (WebCore::InspectorController::addStartProfilingMessageToConsole):
              (WebCore::InspectorController::count):
              * inspector/InspectorController.h:
              * inspector/front-end/Console.js:
              (WebInspector.Console.prototype.addMessage):
              (WebInspector.ConsoleMessage): Added type property.
              (WebInspector.ConsoleMessage.prototype.toMessageElement):
              (WebInspector.ConsoleMessage.prototype.toString):
              (WebInspector.ConsoleMessage.prototype.isEqual):
              (WebInspector.ConsoleCommandResult):
              (WebInspector.ConsoleGroup.prototype.addMessage):
              (WebInspector.ConsoleGroup.prototype._titleClicked):
              * inspector/front-end/Resource.js:
              (WebInspector.Resource.prototype._addTip):
              (WebInspector.Resource.prototype._checkWarning):
              * inspector/front-end/inspector.css: Changed ".console-group-title-level" to ".console-group-title"
              * inspector/front-end/inspector.js:
              (WebInspector.addMessageToConsole):
              * loader/DocLoader.cpp:
              (WebCore::DocLoader::printAccessDeniedMessage):
              * loader/EmptyClients.h:
              (WebCore::EmptyChromeClient::addMessageToConsole):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::reportLocalLoadFailed):
              (WebCore::FrameLoader::shouldAllowNavigation):
              * page/ChromeClient.h:
              * page/Console.cpp:
              (WebCore::printMessageSourceAndLevelPrefix):
              (WebCore::Console::addMessage):
              (WebCore::Console::error):
              (WebCore::Console::log):
              (WebCore::Console::dir):
              (WebCore::Console::trace):
              (WebCore::Console::assertCondition):
              (WebCore::Console::timeEnd):
              (WebCore::Console::warn):
              * page/Console.h: Added MessageType enum.
              (WebCore::):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::postMessageTimerFired):
              * page/XSSAuditor.cpp:
              (WebCore::XSSAuditor::canEvaluate):
              (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
              (WebCore::XSSAuditor::canLoadObject):
              * svg/SVGDocumentExtensions.cpp:
              (WebCore::SVGDocumentExtensions::reportWarning):
              (WebCore::SVGDocumentExtensions::reportError):
              * wml/WMLErrorHandling.cpp:
              (WebCore::reportWMLError):
              * workers/GenericWorkerTask.h: Added GenericWorkerTask8 for the extra argument.
              (WebCore::GenericWorkerTask8::create):
              (WebCore::GenericWorkerTask8::GenericWorkerTask8):
              (WebCore::GenericWorkerTask8::performTask):
              (WebCore::createCallbackTask):
              * workers/WorkerContext.cpp:
              (WebCore::WorkerContext::addMessage):
              (WebCore::WorkerContext::importScripts):
              * workers/WorkerContext.h:
              * workers/WorkerMessagingProxy.cpp:
              (WebCore::postConsoleMessageTask):
              (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
              * workers/WorkerMessagingProxy.h:
              * workers/WorkerObjectProxy.h:
              * xml/XMLHttpRequest.cpp:
              (WebCore::reportUnsafeUsage):
              (WebCore::XMLHttpRequest::didFinishLoading):
              * xml/XSLTProcessor.cpp:
              (WebCore::XSLTProcessor::parseErrorFunc):
      
      WebKit/mac:
      
      2009-07-12  Keishi Hattori  <casey.hattori@gmail.com>
      
              Reviewed by Timothy Hatcher.
      
              Refactor ConsoleMessage to add MessageType attribute.
              https://bugs.webkit.org/show_bug.cgi?id=20625
      
              * WebCoreSupport/WebChromeClient.h:
              * WebCoreSupport/WebChromeClient.mm:
              (WebChromeClient::addMessageToConsole):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b68bb9d
  21. 10 Jul, 2009 1 commit
    • ddkilzer@apple.com's avatar
      2009-07-10 Shinichiro Hamaji <hamaji@chromium.org> · 9c4dacca
      ddkilzer@apple.com authored
              Reviewed by David Kilzer.
      
              WebKit needs a style linting tool
              https://bugs.webkit.org/show_bug.cgi?id=25884
      
              Fix bunch of style issues by autofix of cpplint.
              This patch is created to demonstrate the autofix of cpplint.py.
      
              No new testcases because it's a style fix
      
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseMediaQuery):
              (WebCore::CSSParser::validUnit):
              (WebCore::CSSParser::parseValue):
              (WebCore::skipCommaInDashboardRegion):
              (WebCore::CSSParser::parseDashboardRegions):
              (WebCore::ShadowParseContext::commitValue):
              (WebCore::ShadowParseContext::commitLength):
              (WebCore::ShadowParseContext::commitColor):
              (WebCore::BorderImageParseContext::commitNumber):
              (WebCore::BorderImageParseContext::commitWidth):
              (WebCore::BorderImageParseContext::commitRule):
              (WebCore::BorderImageParseContext::commitBorderImage):
              (WebCore::CSSParser::lex):
              (WebCore::CSSParser::text):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              * css/MediaList.cpp:
              (WebCore::MediaList::deleteMedium):
              * css/MediaQuery.h:
              * css/MediaQueryEvaluator.cpp:
              (WebCore::parseAspectRatio):
              * css/MediaQueryEvaluator.h:
              * css/MediaQueryExp.h:
              (WebCore::MediaQueryExp::operator==):
              * css/WebKitCSSMatrix.h:
              * dom/Comment.h:
              * dom/Document.cpp:
              (WebCore::Document::setFocusedNode):
              * dom/Document.h:
              (WebCore::Document::setHasDashboardRegions):
              * dom/DocumentFragment.cpp:
              (WebCore::DocumentFragment::nodeName):
              * dom/DocumentFragment.h:
              * dom/DynamicNodeList.h:
              * dom/EditingText.h:
              * dom/Element.cpp:
              (WebCore::Element::dispatchAttrAdditionEvent):
              * dom/NamedAttrMap.cpp:
              (WebCore::NamedNodeMap::item):
              * dom/Node.cpp:
              (WebCore::Node::nodeValue):
              (WebCore::Node::nodeIndex):
              * dom/NodeRareData.h:
              (WebCore::NodeListsNodeData::create):
              * dom/Notation.h:
              * dom/ProcessingInstruction.h:
              * dom/Range.cpp:
              (WebCore::Range::processContents):
              * dom/StyledElement.cpp:
              (WebCore::toHex):
              * dom/XMLTokenizerLibxml2.cpp:
              (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
              (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
              (WebCore::PendingCallbacks::):
              (WebCore::OffsetBuffer::readOutBytes):
              (WebCore::handleElementNamespaces):
              (WebCore::handleElementAttributes):
              (WebCore::attributesStartElementNsHandler):
              * dom/XMLTokenizerQt.cpp:
              (WebCore::attributesStartElementNsHandler):
              (WebCore::XMLTokenizer::parseStartElement):
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::applyInlineStyle):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::removeNode):
              * editing/Editor.cpp:
              (WebCore::Editor::pasteAsPlainText):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::directionOfEnclosingBlock):
              * editing/SmartReplaceICU.cpp:
              (WebCore::addAllCodePoints):
              * history/HistoryItem.cpp:
              (WebCore::HistoryItem::icon):
              (WebCore::HistoryItem::adoptVisitCounts):
              * html/CanvasStyle.cpp:
              (WebCore::CanvasStyle::applyFillColor):
              * html/HTMLAnchorElement.cpp:
              (WebCore::HTMLAnchorElement::setActive):
              (WebCore::HTMLAnchorElement::isLiveLink):
              * html/HTMLAppletElement.h:
              * html/HTMLAudioElement.h:
              * html/HTMLBRElement.h:
              * html/HTMLBaseElement.h:
              * html/HTMLBaseFontElement.h:
              * html/HTMLDListElement.h:
              * html/HTMLDirectoryElement.h:
              * html/HTMLFieldSetElement.cpp:
              (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
              * html/HTMLFormElement.cpp:
              (WebCore::HTMLFormElement::reset):
              * html/HTMLHRElement.cpp:
              (WebCore::HTMLHRElement::parseMappedAttribute):
              * html/HTMLHeadElement.h:
              * html/HTMLHtmlElement.h:
              * html/HTMLImageElement.h:
              (WebCore::HTMLImageElement::setLoadManually):
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::selection):
              * html/HTMLIsIndexElement.h:
              * html/HTMLMarqueeElement.cpp:
              * html/HTMLMediaElement.h:
              (WebCore::HTMLMediaElement::):
              * html/HTMLMenuElement.h:
              * html/HTMLMetaElement.h:
              * html/HTMLModElement.h:
              * html/HTMLOListElement.h:
              * html/HTMLOptionElement.cpp:
              (WebCore::HTMLOptionElement::childrenChanged):
              * html/HTMLParamElement.h:
              * html/HTMLQuoteElement.h:
              * html/HTMLStyleElement.h:
              * html/HTMLTableCaptionElement.h:
              * html/HTMLTableCellElement.h:
              * html/HTMLTableColElement.h:
              * html/HTMLTableSectionElement.cpp:
              (WebCore::HTMLTableSectionElement::deleteRow):
              * html/HTMLTitleElement.h:
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::parseNonHTMLText):
              (WebCore::HTMLTokenizer::parseEntity):
              (WebCore::HTMLTokenizer::parseTag):
              (WebCore::HTMLTokenizer::write):
              * html/HTMLUListElement.h:
              * html/HTMLVideoElement.h:
              * html/TimeRanges.h:
              (WebCore::TimeRanges::Range::Range):
              * inspector/InspectorController.cpp:
              (WebCore::InspectorController::enableResourceTracking):
              (WebCore::InspectorController::disableResourceTracking):
              * inspector/InspectorFrontend.cpp:
              (WebCore::InspectorFrontend::newInspectorJSONObject):
              * page/Console.cpp:
              (WebCore::Console::addMessage):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::EventHandler::selectCursor):
              (WebCore::EventHandler::defaultKeyboardEventHandler):
              * page/Frame.cpp:
              (WebCore::Frame::jsDefaultStatusBarText):
              * page/android/DragControllerAndroid.cpp:
              (WebCore::DragController::dragOperation):
              * page/android/EventHandlerAndroid.cpp:
              (WebCore::EventHandler::tabsToAllControls):
              (WebCore::EventHandler::eventActivatedView):
              * page/animation/AnimationController.cpp:
              (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
              * page/gtk/DragControllerGtk.cpp:
              (WebCore::DragController::dragOperation):
              * page/qt/DragControllerQt.cpp:
              * page/win/DragControllerWin.cpp:
              (WebCore::DragController::isCopyKeyDown):
              * page/win/FrameWin.h:
              * rendering/RenderSlider.cpp:
              (WebCore::RenderSlider::mouseEventOffsetToThumb):
              * rendering/style/RenderStyle.h:
              (WebCore::InheritedFlags::setVerticalAlignLength):
              (WebCore::InheritedFlags::setUnicodeBidi):
              (WebCore::InheritedFlags::setCursor):
              * rendering/style/RenderStyleConstants.h:
              (WebCore::):
              * rendering/style/SVGRenderStyleDefs.h:
              * rendering/style/StyleInheritedData.h:
              (WebCore::StyleInheritedData::operator!=):
              * storage/DatabaseTask.h:
              * svg/GradientAttributes.h:
              * svg/LinearGradientAttributes.h:
              * svg/PatternAttributes.h:
              * svg/RadialGradientAttributes.h:
              * svg/SVGAnimatedPathData.h:
              * svg/SVGAnimatedPoints.h:
              * svg/SVGAnimationElement.h:
              * svg/SVGClipPathElement.h:
              * svg/SVGElementInstance.h:
              * svg/SVGFEBlendElement.cpp:
              (WebCore::SVGFEBlendElement::build):
              * svg/SVGFEBlendElement.h:
              * svg/SVGFEColorMatrixElement.cpp:
              (WebCore::SVGFEColorMatrixElement::build):
              * svg/SVGFEComponentTransferElement.cpp:
              (WebCore::SVGFEComponentTransferElement::build):
              * svg/SVGFECompositeElement.cpp:
              (WebCore::SVGFECompositeElement::build):
              * svg/SVGFEDiffuseLightingElement.cpp:
              (WebCore::SVGFEDiffuseLightingElement::build):
              * svg/SVGFEDisplacementMapElement.cpp:
              (WebCore::SVGFEDisplacementMapElement::build):
              * svg/SVGFEDistantLightElement.h:
              * svg/SVGFEFloodElement.cpp:
              (WebCore::SVGFEFloodElement::build):
              * svg/SVGFEFloodElement.h:
              * svg/SVGFEFuncAElement.h:
              * svg/SVGFEFuncBElement.h:
              * svg/SVGFEFuncGElement.h:
              * svg/SVGFEFuncRElement.h:
              * svg/SVGFEGaussianBlurElement.cpp:
              (WebCore::SVGFEGaussianBlurElement::build):
              * svg/SVGFEImageElement.cpp:
              (WebCore::SVGFEImageElement::build):
              * svg/SVGFEMergeElement.cpp:
              (WebCore::SVGFEMergeElement::build):
              * svg/SVGFEOffsetElement.cpp:
              (WebCore::SVGFEOffsetElement::build):
              * svg/SVGFEPointLightElement.h:
              * svg/SVGFESpecularLightingElement.cpp:
              (WebCore::SVGFESpecularLightingElement::build):
              * svg/SVGFESpotLightElement.h:
              * svg/SVGFETileElement.cpp:
              (WebCore::SVGFETileElement::build):
              * svg/SVGLineElement.cpp:
              (WebCore::SVGLineElement::parseMappedAttribute):
              * svg/SVGList.h:
              * svg/SVGListTraits.h:
              (WebCore::):
              * svg/SVGMPathElement.h:
              * svg/SVGMetadataElement.h:
              * svg/SVGParserUtilities.cpp:
              (WebCore::SVGPathParser::parseSVG):
              (WebCore::SVGPathParser::calculateArc):
              * svg/SVGPathElement.h:
              * svg/SVGPathSegClosePath.h:
              * svg/SVGSVGElement.h:
              * svg/SVGSetElement.h:
              * svg/SVGSwitchElement.h:
              * svg/SVGTextPathElement.cpp:
              (WebCore::SVGTextPathElement::parseMappedAttribute):
              * svg/SVGTextPathElement.h:
              * svg/SVGTitleElement.h:
              * svg/SVGTransformable.cpp:
              (WebCore::):
              * svg/SVGViewSpec.cpp:
              (WebCore::):
              * svg/animation/SMILTime.cpp:
              (WebCore::operator+):
              (WebCore::operator-):
              (WebCore::operator*):
              * svg/animation/SVGSMILElement.h:
              * svg/graphics/SVGResource.cpp:
              (WebCore::clientMap):
              * wml/WMLPostfieldElement.cpp:
              (WebCore::WMLPostfieldElement::value):
              * wml/WMLSetvarElement.cpp:
              (WebCore::WMLSetvarElement::value):
              * workers/WorkerRunLoop.cpp:
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::dropProtection):
              * xml/XPathPath.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c4dacca
  22. 07 Jul, 2009 1 commit
  23. 26 Jun, 2009 1 commit
  24. 22 Jun, 2009 2 commits
    • weinig@apple.com's avatar
      WebCore: · 0ce8f4e3
      weinig@apple.com authored
      2009-06-22  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Mark Rowe.
      
              Add event handler attribute getter/setters to HTMLBodyElement
              as specified in HTML 5.
      
              - Removes erroneous inclusion of the onresize and onunload event
              handler attributes in Element and Document.
      
              * dom/Document.cpp:
              (WebCore::Document::getWindowAttributeEventListener):
              * dom/Document.h:
              * dom/Document.idl:
              * dom/Element.idl:
              * dom/Node.cpp:
              * dom/Node.h: onblur, onerror, onfocus, and onload all need to be declared
              virtual, since their behavior for HTMLBodyElement differs from the base
              implementation.
              * html/HTMLBodyElement.cpp:
              (WebCore::HTMLBodyElement::onblur):
              (WebCore::HTMLBodyElement::setOnblur):
              (WebCore::HTMLBodyElement::onerror):
              (WebCore::HTMLBodyElement::setOnerror):
              (WebCore::HTMLBodyElement::onfocus):
              (WebCore::HTMLBodyElement::setOnfocus):
              (WebCore::HTMLBodyElement::onload):
              (WebCore::HTMLBodyElement::setOnload):
              (WebCore::HTMLBodyElement::onbeforeunload):
              (WebCore::HTMLBodyElement::setOnbeforeunload):
              (WebCore::HTMLBodyElement::onmessage):
              (WebCore::HTMLBodyElement::setOnmessage):
              (WebCore::HTMLBodyElement::onoffline):
              (WebCore::HTMLBodyElement::setOnoffline):
              (WebCore::HTMLBodyElement::ononline):
              (WebCore::HTMLBodyElement::setOnonline):
              (WebCore::HTMLBodyElement::onresize):
              (WebCore::HTMLBodyElement::setOnresize):
              (WebCore::HTMLBodyElement::onstorage):
              (WebCore::HTMLBodyElement::setOnstorage):
              (WebCore::HTMLBodyElement::onunload):
              (WebCore::HTMLBodyElement::setOnunload):
              * html/HTMLBodyElement.h:
              * html/HTMLBodyElement.idl:
      
      LayoutTests:
      
      2009-06-22  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Mark Rowe.
      
              Add event handler attribute getter/setters to HTMLBodyElement
              as specified in HTML 5.
      
              * fast/dom/event-attribute-availability-expected.txt:
              * fast/dom/resources/event-attribute-availability.js:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0ce8f4e3
    • levin@chromium.org's avatar
      WebCore: · b742833e
      levin@chromium.org authored
      2009-06-22  David Levin  <levin@chromium.org>
      
              Reviewed by David Hyatt and Eric Seidel.
      
              REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
              https://bugs.webkit.org/show_bug.cgi?id=26326
      
              Test: scrollbars/scrollbar-crash-on-refresh.html
      
              * dom/Document.cpp:
              (WebCore::Document::detach):
              Gives the FrameView a change to do any necessary cleanup on
              Document::detach() which is where the renderArena gets detroyed.
              * page/FrameView.cpp:
              (WebCore::FrameView::detachCustomScrollbars):
              Gets rid of any custom scrollbars (if the docment supplied them).
              * page/FrameView.h:
              * platform/Scrollbar.h:
              (WebCore::Scrollbar::isCustomScrollbar):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::destroy):
              Removed the check for document()->frame().  If frame() is 0 in this code,
              then the call to animation() is also incorrect (since it does document()->frame()->animation()).
              * rendering/RenderScrollbar.h:
              (WebCore::RenderScrollbar::isCustomScrollbar):
      
      LayoutTests:
      
      2009-06-22  David Levin  <levin@chromium.org>
      
              Reviewed by David Hyatt and Eric Seidel.
      
              REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
              https://bugs.webkit.org/show_bug.cgi?id=26326
      
              Test that refreshing an iframe with custom scrollbars works without crashing.
      
              * scrollbars/resources/page-with-custom-scrollbars.html: Added.
              * scrollbars/scrollbar-crash-on-refresh-expected.txt: Added.
              * scrollbars/scrollbar-crash-on-refresh.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b742833e
  25. 19 Jun, 2009 1 commit
  26. 17 Jun, 2009 1 commit
    • levin@chromium.org's avatar
      WebCore: · afb42f96
      levin@chromium.org authored
      2009-06-17  David Levin  <levin@chromium.org>
      
              Reviewed by NOBODY, layout tests fix.
      
              https://bugs.webkit.org/show_bug.cgi?id=26326
              This reverts commit r44751.
      
              Once that change was checked scrollbars/scrollbar-orientation.html started
              crashing on Windows.
      
              * dom/Document.cpp:
              (WebCore::Document::detach):
              * page/FrameView.cpp:
              * page/FrameView.h:
              * platform/Scrollbar.h:
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::destroy):
              * rendering/RenderScrollbar.h:
      
      LayoutTests:
      
      2009-06-17  David Levin  <levin@chromium.org>
      
              Reviewed by NOBODY, layout tests fix.
      
              https://bugs.webkit.org/show_bug.cgi?id=26326
              This reverts commit r44751.
      
              Once that change was checked scrollbars/scrollbar-orientation.html started
              crashing on Windows.
      
              * scrollbars/resources/page-with-custom-scrollbars.html: Removed.
              * scrollbars/scrollbar-crash-on-refresh-expected.txt: Removed.
              * scrollbars/scrollbar-crash-on-refresh.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      afb42f96
  27. 16 Jun, 2009 1 commit
    • levin@chromium.org's avatar
      WebCore: · 4a0090f7
      levin@chromium.org authored
      2009-06-16  David Levin  <levin@chromium.org>
      
              Reviewed by David Hyatt.
      
              REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
              https://bugs.webkit.org/show_bug.cgi?id=26326
      
              Test: scrollbars/scrollbar-crash-on-refresh.html
      
              * dom/Document.cpp:
              (WebCore::Document::detach):
              Gives the FrameView a change to do any necessary cleanup on
              Document::detach() which is where the renderArena gets detroyed.
              * page/FrameView.cpp:
              (WebCore::FrameView::detachCustomScrollbars):
              Gets rid of any custom scrollbars (if the docment supplied them).
              * page/FrameView.h:
              * platform/Scrollbar.h:
              (WebCore::Scrollbar::isCustomScrollbar):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::destroy):
              Removed the check for document()->frame().  If frame() is 0 in this code,
              then the call to animation() is also incorrect (since it does document()->frame()->animation()).
              * rendering/RenderScrollbar.h:
              (WebCore::RenderScrollbar::isCustomScrollbar):
      
      LayoutTests:
      
      2009-06-16  David Levin  <levin@chromium.org>
      
              Reviewed by David Hyatt.
      
              REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
              https://bugs.webkit.org/show_bug.cgi?id=26326
      
              Test that refreshing an iframe with custom scrollbars works without crashing.
      
              * scrollbars/resources/page-with-custom-scrollbars.html: Added.
              * scrollbars/scrollbar-crash-on-refresh-expected.txt: Added.
              * scrollbars/scrollbar-crash-on-refresh.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a0090f7
  28. 11 Jun, 2009 1 commit
  29. 06 Jun, 2009 1 commit
  30. 30 May, 2009 1 commit
    • weinig@apple.com's avatar
      WebCore: · 6dfb60ca
      weinig@apple.com authored
      2009-05-29  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Anders Carlsson.
      
              Fix for https://bugs.webkit.org/show_bug.cgi?id=26091
              Make storage events match the current spec.
              - Storage event listeners are added to the window.
              - Storage events are dispatched to the window.
      
              Updated existing tests.
      
              * dom/Document.cpp:
              (WebCore::Document::dispatchWindowEvent):
              * dom/Document.h:
              * dom/Node.cpp:
              * dom/Node.h:
              * html/HTMLBodyElement.cpp:
              (WebCore::HTMLBodyElement::parseMappedAttribute):
              * storage/LocalStorageArea.cpp:
              (WebCore::LocalStorageArea::dispatchStorageEvent):
              * storage/SessionStorageArea.cpp:
              (WebCore::SessionStorageArea::dispatchStorageEvent):
      
      LayoutTests:
      
      2009-05-29  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Anders Carlsson.
      
              Fix for https://bugs.webkit.org/show_bug.cgi?id=26091
              Make storage events match the current spec.
              - Storage event listeners are added to the window.
              - Storage events are dispatched to the window.
      
              * storage/domstorage/localstorage/iframe-events.html:
              * storage/domstorage/localstorage/index-get-and-set.html:
              * storage/domstorage/localstorage/resources/iframe-events-second.html:
              * storage/domstorage/localstorage/simple-events.html:
              * storage/domstorage/sessionstorage/iframe-events.html:
              * storage/domstorage/sessionstorage/index-get-and-set.html:
              * storage/domstorage/sessionstorage/resources/iframe-events-second.html:
              * storage/domstorage/sessionstorage/simple-events.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6dfb60ca
  31. 29 May, 2009 1 commit
  32. 26 May, 2009 1 commit