Commit d5ceaf86 authored by darin@apple.com's avatar darin@apple.com

JavaScriptCore:

2008-06-14  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - more of https://bugs.webkit.org/show_bug.cgi?id=17257
          start ref counts at 1 instead of 0 for speed

        * kjs/nodes.cpp:
        (KJS::ParserRefCounted::hasOneRef): Added. Replaces refcount.
        * kjs/nodes.h: Replaced refcount with hasOneRef.

        * wtf/ListRefPtr.h:
        (WTF::ListRefPtr::~ListRefPtr): Changed to use hasOneRef instead of
        refcount, so this class can be used with the RefCounted template.

        * wtf/RefCounted.h:
        (WTF::RefCounted::hasOneRef): Made const, since there's no reason for
        it to be non-const.

WebCore:

2008-06-14  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - more work on https://bugs.webkit.org/show_bug.cgi?id=17257
          start ref counts at 1 instead of 0 for speed

        * WebCore.base.exp: Added some new exports needed for functions that are now
        non-virtual.

        * WebCore.xcodeproj/project.pbxproj: Moved the "icon" group to the correct
        location in the project. Before it was inside "appcache"!

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * dom/Clipboard.cpp:
        (WebCore::Clipboard::Clipboard):
        * editing/mac/EditorMac.mm:
        (WebCore::Editor::newGeneralClipboard):
        * editing/qt/EditorQt.cpp:
        (WebCore::Editor::newGeneralClipboard):
        * editing/wx/EditorWx.cpp:
        (WebCore::Editor::newGeneralClipboard):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::DocumentLoader):
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::create):
        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::defaultIcon):
        (WebCore::IconDatabase::setIconDataForIconURL):
        (WebCore::IconDatabase::setIconURLForPageURL):
        (WebCore::IconDatabase::getOrCreateIconRecord):
        (WebCore::IconDatabase::performURLImport):
        * loader/icon/IconDatabase.h:
        * loader/icon/IconRecord.cpp:
        (WebCore::IconRecord::IconRecord):
        * loader/icon/IconRecord.h:
        (WebCore::IconRecord::create):
        * page/EventHandler.h:
        * page/Frame.cpp:
        (WebCore::Frame::Frame):
        * page/Frame.h:
        (WebCore::Frame::create):
        * page/gtk/EventHandlerGtk.cpp:
        (WebCore::EventHandler::createDraggingClipboard):
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::createDraggingClipboard):
        * page/qt/EventHandlerQt.cpp:
        (WebCore::EventHandler::createDraggingClipboard):
        * page/win/EventHandlerWin.cpp:
        (WebCore::EventHandler::createDraggingClipboard):
        * page/wx/EventHandlerWx.cpp:
        (WebCore::EventHandler::createDraggingClipboard):
        * platform/Cursor.h:
        (WebCore::SharedCursor::create):
        (WebCore::SharedCursor::~SharedCursor):
        (WebCore::SharedCursor::SharedCursor):
        * platform/DragData.h:
        * platform/PopupMenu.h:
        (WebCore::PopupMenu::create):
        (WebCore::PopupMenu::isActive):
        * platform/ScrollBar.cpp:
        (WebCore::Scrollbar::Scrollbar):
        * platform/SearchPopupMenu.h:
        (WebCore::SearchPopupMenu::create):
        * platform/graphics/FontFamily.cpp:
        (WebCore::FontFamily::FontFamily):
        (WebCore::operator==):
        * platform/graphics/FontFamily.h:
        (WebCore::FontFamily::FontFamily):
        (WebCore::SharedFontFamily::create):
        (WebCore::SharedFontFamily::SharedFontFamily):
        (WebCore::operator!=):
        (WebCore::FontFamily::next):
        (WebCore::FontFamily::appendFamily):
        (WebCore::FontFamily::releaseNext):
        * platform/graphics/Icon.h:
        * platform/graphics/gtk/IconGtk.cpp:
        (WebCore::Icon::Icon):
        (WebCore::Icon::~Icon):
        (WebCore::Icon::newIconForFile):
        * platform/graphics/mac/IconMac.mm:
        (WebCore::Icon::Icon):
        (WebCore::Icon::newIconForFile):
        * platform/graphics/qt/IconQt.cpp:
        (WebCore::Icon::Icon):
        (WebCore::Icon::newIconForFile):
        * platform/graphics/win/IconWin.cpp:
        (WebCore::Icon::Icon):
        (WebCore::Icon::~Icon):
        (WebCore::Icon::newIconForFile):
        * platform/gtk/ClipboardGtk.cpp:
        (WebCore::Editor::newGeneralClipboard):
        * platform/gtk/ClipboardGtk.h:
        (WebCore::ClipboardGtk::create):
        * platform/gtk/PlatformScrollBar.h:
        (WebCore::PlatformScrollbar::create):
        * platform/gtk/PopupMenuGtk.cpp:
        (WebCore::PopupMenu::PopupMenu):
        * platform/gtk/ScrollViewGtk.cpp:
        (WebCore::ScrollViewScrollbar::create):
        (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
        (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
        * platform/mac/ClipboardMac.h:
        (WebCore::ClipboardMac::create):
        * platform/mac/DragDataMac.mm:
        (WebCore::DragData::createClipboard):
        (WebCore::DragData::containsCompatibleContent):
        * platform/mac/PlatformScrollBar.h:
        (WebCore::PlatformScrollbar::create):
        (WebCore::PlatformScrollbar::horizontalScrollbarHeight):
        (WebCore::PlatformScrollbar::verticalScrollbarWidth):
        * platform/mac/PopupMenuMac.mm:
        (WebCore::PopupMenu::PopupMenu):
        * platform/qt/ClipboardQt.h:
        (WebCore::ClipboardQt::create):
        * platform/qt/DragDataQt.cpp:
        (WebCore::DragData::createClipboard):
        * platform/qt/PlatformScrollBar.h:
        (WebCore::PlatformScrollbar::create):
        * platform/qt/PopupMenuQt.cpp:
        (WebCore::PopupMenu::PopupMenu):
        * platform/qt/ScrollViewQt.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
        (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
        * platform/win/ClipboardWin.h:
        (WebCore::ClipboardWin::create):
        * platform/win/CursorWin.cpp:
        (WebCore::Cursor::Cursor):
        (WebCore::loadSharedCursor):
        * platform/win/DragDataWin.cpp:
        (WebCore::DragData::createClipboard):
        * platform/win/EditorWin.cpp:
        (WebCore::Editor::newGeneralClipboard):
        * platform/win/PlatformScrollBar.h:
        (WebCore::PlatformScrollbar::create):
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::PopupMenu):
        (WebCore::PopupMenu::show):
        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
        (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
        * platform/wx/ClipboardWx.h:
        (WebCore::ClipboardWx::create):
        * platform/wx/PlatformScrollBar.h:
        (WebCore::PlatformScrollbar::create):
        * platform/wx/PopupMenuWx.cpp:
        (WebCore::PopupMenu::PopupMenu):
        * platform/wx/TemporaryLinkStubs.cpp:
        (Icon::Icon):
        (Icon::newIconForFile):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::createScrollbar):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::updateFromElement):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::dataChanged):
        * svg/graphics/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::createDocumentLoader):

WebKit/gtk:

2008-06-14  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - more https://bugs.webkit.org/show_bug.cgi?id=17257
          start ref counts at 1 instead of 0 for speed

        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::FrameLoaderClient::createDocumentLoader): Use create instead of new.
        * webkit/webkitwebframe.cpp:
        (webkit_web_frame_new): Ditto.
        (webkit_web_frame_init_with_web_view): Ditto.

WebKit/mac:

2008-06-14  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - more of https://bugs.webkit.org/show_bug.cgi?id=17257
          start ref counts at 1 instead of 0 for speed

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::createDocumentLoader): Use create instead of new.
        (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by
        a ref call inside the Frame constructor. The lifetime rules for Frame are now the
        conventional ones without a special case.

        * WebView/WebDataSource.mm:
        (-[WebDataSource _initWithDocumentLoader:]): Changed argument to be a PassRefPtr, since
        this function takes ownership of the DocumentLoader.
        (-[WebDataSource initWithRequest:]): Use create instead of new.
        * WebView/WebDataSourceInternal.h: Changed _initWithDocumentLoader argument to be a
        PassRefPtr and also cleaned up the header a bit.

        * WebView/WebDocumentLoaderMac.h:
        (WebDocumentLoaderMac::create): Added. Also made the constructor and a couple of virtual
        functions private.

        * WebView/WebFrame.mm:
        (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Use create instead
        of new.

WebKit/qt:

2008-06-14  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - more https://bugs.webkit.org/show_bug.cgi?id=17257
          start ref counts at 1 instead of 0 for speed

        * Api/qwebframe.cpp:
        (QWebFramePrivate::init): Use create instead of new.
        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::createDocumentLoader): Ditto.

WebKit/win:

2008-06-14  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - more of https://bugs.webkit.org/show_bug.cgi?id=17257
          start ref counts at 1 instead of 0 for speed

        * WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by
        a ref call inside the Frame constructor. The lifetime rules for Frame are now the
        conventional ones without a special case.

        * WebFrame.cpp:
        (WebFrame::init): Renamed function from initWithWebFrameView and removed the unused
        IWebFrameView argument (every caller was passing 0). Also changed this to return the
        WebCore Frame object, which is needed to straighten out the lifetime and ownership
        issues.
        * WebFrame.h: Ditto.

        * WebView.cpp:
        (WebView::initWithFrame): Changed to call new init function and use the return value.

WebKit/wx:

2008-06-14  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - more https://bugs.webkit.org/show_bug.cgi?id=17257
          start ref counts at 1 instead of 0 for speed

        * WebKitSupport/FrameLoaderClientWx.cpp:
        (WebCore::FrameLoaderClientWx::createDocumentLoader): Use create function
        instead of new.

LayoutTests:

2008-06-14  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - test for https://bugs.webkit.org/show_bug.cgi?id=19538
          <rdar://problem/5957595> Reading transition property from the style JS gives the wrong value

        * fast/dom/CSSStyleDeclaration/resources/transition-property-names.js: Added.
        * fast/dom/CSSStyleDeclaration/transition-property-names-expected.txt: Added.
        * fast/dom/CSSStyleDeclaration/transition-property-names.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fa4b1a10
2008-06-14 Darin Adler <darin@apple.com>
Reviewed by Sam.
- more of https://bugs.webkit.org/show_bug.cgi?id=17257
start ref counts at 1 instead of 0 for speed
* kjs/nodes.cpp:
(KJS::ParserRefCounted::hasOneRef): Added. Replaces refcount.
* kjs/nodes.h: Replaced refcount with hasOneRef.
* wtf/ListRefPtr.h:
(WTF::ListRefPtr::~ListRefPtr): Changed to use hasOneRef instead of
refcount, so this class can be used with the RefCounted template.
* wtf/RefCounted.h:
(WTF::RefCounted::hasOneRef): Made const, since there's no reason for
it to be non-const.
2008-06-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Oliver.
......@@ -2347,16 +2366,12 @@
2008-05-21 Oliver Hunt <oliver@apple.com>
Reviewed by NOBODY (Build fix).
Yet more windows build fixes
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2008-05-21 Oliver Hunt <oliver@apple.com>
Reviewed by NOBODY (Build fix).
Yet more windows build fixes
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
......@@ -2370,8 +2385,6 @@
2008-05-21 Oliver Hunt <oliver@apple.com>
Reviewed by NOBODY (Build fix).
Add DebuggerCallFrame.{h,cpp} to the project file
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
......@@ -2531,8 +2544,6 @@
2008-05-20 Oliver Hunt <oliver@apple.com>
Reviewed by NOBODY (Build fix).
Fixerate the windows build.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
......@@ -3200,8 +3211,6 @@
2008-05-09 Oliver Hunt <oliver@apple.com>
Reviewed by Nobody (build fix).
Debug build fix
* kjs/JSGlobalObject.cpp:
......@@ -5319,8 +5328,6 @@
2008-04-21 Oliver Hunt <oliver@apple.com>
Reviewed by NOBODY(Build fix)
Fix debug build
* kjs/nodes.cpp:
......@@ -8171,8 +8178,6 @@
2008-03-24 Geoffrey Garen <ggaren@apple.com>
Reviewed by NOBODY.
SquirrelFish lives.
Initial check-in of the code I've been carrying around. Lots of stuff
......@@ -17393,8 +17398,6 @@
2007-12-04 Oliver Hunt <oliver@apple.com>
Reviewed by NOBODY (Build fix).
Fix gtk build.
* wtf/TCSystemAlloc.cpp:
......
......@@ -160,19 +160,19 @@ void ParserRefCounted::deref()
trackedObjectExtraRefCounts->remove(it);
}
unsigned ParserRefCounted::refcount()
bool ParserRefCounted::hasOneRef()
{
if (newTrackedObjects && newTrackedObjects->contains(this)) {
ASSERT(!trackedObjectExtraRefCounts || !trackedObjectExtraRefCounts->contains(this));
return 0;
return false;
}
ASSERT(!newTrackedObjects || !newTrackedObjects->contains(this));
if (!trackedObjectExtraRefCounts)
return 1;
return true;
return 1 + trackedObjectExtraRefCounts->count(this);
return !trackedObjectExtraRefCounts->contains(this);
}
void ParserRefCounted::deleteNewObjects()
......
......@@ -125,7 +125,7 @@ namespace KJS {
public:
void ref() KJS_FAST_CALL;
void deref() KJS_FAST_CALL;
unsigned refcount() KJS_FAST_CALL;
bool hasOneRef() KJS_FAST_CALL;
static void deleteNewObjects() KJS_FAST_CALL;
......
// -*- mode: c++; c-basic-offset: 4 -*-
/*
* Copyright (C) 2005, 2006 Apple Computer, Inc.
* Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -36,9 +36,10 @@ namespace WTF {
// see comment in PassRefPtr.h for why this takes const reference
template <typename U> ListRefPtr(const PassRefPtr<U>& o) : RefPtr<T>(o) {}
~ListRefPtr() {
~ListRefPtr()
{
RefPtr<T> reaper = this->release();
while (reaper && reaper->refcount() == 1)
while (reaper && reaper->hasOneRef())
reaper = reaper->releaseNext(); // implicitly protects reaper->next, then derefs reaper
}
......
......@@ -55,7 +55,7 @@ public:
--m_refCount;
}
bool hasOneRef()
bool hasOneRef() const
{
ASSERT(!m_deletionHasBegun);
return m_refCount == 1;
......
2008-06-14 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- test for https://bugs.webkit.org/show_bug.cgi?id=19538
<rdar://problem/5957595> Reading transition property from the style JS gives the wrong value
* fast/dom/CSSStyleDeclaration/resources/transition-property-names.js: Added.
* fast/dom/CSSStyleDeclaration/transition-property-names-expected.txt: Added.
* fast/dom/CSSStyleDeclaration/transition-property-names.html: Added.
2008-06-14 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
......@@ -15,17 +26,6 @@
* fast/dynamic/insertAdjacentText.html: Copied from fast/dynamic/insertAdjacentElement.html.
* platform/mac/fast/dynamic/insertAdjacentElement-expected.txt:
2008-06-14 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- test for https://bugs.webkit.org/show_bug.cgi?id=19538
<rdar://problem/5957595> Reading transition property from the style JS gives the wrong value
* fast/dom/CSSStyleDeclaration/resources/transition-property-names.js: Added.
* fast/dom/CSSStyleDeclaration/transition-property-names-expected.txt: Added.
* fast/dom/CSSStyleDeclaration/transition-property-names.html: Added.
2008-06-14 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver.
......@@ -5293,8 +5293,6 @@ r2008-04-23 Dan Bernstein <mitz@apple.com>
2008-04-03 Oliver Hunt <oliver@apple.com>
Reviewed by NOBODY (Rollout).
Rollout layout test changes for r31566
2008-04-03 Brady Eidson <beidson@apple.com>
2008-06-14 Darin Adler <darin@apple.com>
Reviewed by Sam.
- more work on https://bugs.webkit.org/show_bug.cgi?id=17257
start ref counts at 1 instead of 0 for speed
* WebCore.base.exp: Added some new exports needed for functions that are now
non-virtual.
* WebCore.xcodeproj/project.pbxproj: Moved the "icon" group to the correct
location in the project. Before it was inside "appcache"!
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard):
* editing/mac/EditorMac.mm:
(WebCore::Editor::newGeneralClipboard):
* editing/qt/EditorQt.cpp:
(WebCore::Editor::newGeneralClipboard):
* editing/wx/EditorWx.cpp:
(WebCore::Editor::newGeneralClipboard):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::create):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::defaultIcon):
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::setIconURLForPageURL):
(WebCore::IconDatabase::getOrCreateIconRecord):
(WebCore::IconDatabase::performURLImport):
* loader/icon/IconDatabase.h:
* loader/icon/IconRecord.cpp:
(WebCore::IconRecord::IconRecord):
* loader/icon/IconRecord.h:
(WebCore::IconRecord::create):
* page/EventHandler.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
* page/Frame.h:
(WebCore::Frame::create):
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::createDraggingClipboard):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::createDraggingClipboard):
* page/qt/EventHandlerQt.cpp:
(WebCore::EventHandler::createDraggingClipboard):
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::createDraggingClipboard):
* page/wx/EventHandlerWx.cpp:
(WebCore::EventHandler::createDraggingClipboard):
* platform/Cursor.h:
(WebCore::SharedCursor::create):
(WebCore::SharedCursor::~SharedCursor):
(WebCore::SharedCursor::SharedCursor):
* platform/DragData.h:
* platform/PopupMenu.h:
(WebCore::PopupMenu::create):
(WebCore::PopupMenu::isActive):
* platform/ScrollBar.cpp:
(WebCore::Scrollbar::Scrollbar):
* platform/SearchPopupMenu.h:
(WebCore::SearchPopupMenu::create):
* platform/graphics/FontFamily.cpp:
(WebCore::FontFamily::FontFamily):
(WebCore::operator==):
* platform/graphics/FontFamily.h:
(WebCore::FontFamily::FontFamily):
(WebCore::SharedFontFamily::create):
(WebCore::SharedFontFamily::SharedFontFamily):
(WebCore::operator!=):
(WebCore::FontFamily::next):
(WebCore::FontFamily::appendFamily):
(WebCore::FontFamily::releaseNext):
* platform/graphics/Icon.h:
* platform/graphics/gtk/IconGtk.cpp:
(WebCore::Icon::Icon):
(WebCore::Icon::~Icon):
(WebCore::Icon::newIconForFile):
* platform/graphics/mac/IconMac.mm:
(WebCore::Icon::Icon):
(WebCore::Icon::newIconForFile):
* platform/graphics/qt/IconQt.cpp:
(WebCore::Icon::Icon):
(WebCore::Icon::newIconForFile):
* platform/graphics/win/IconWin.cpp:
(WebCore::Icon::Icon):
(WebCore::Icon::~Icon):
(WebCore::Icon::newIconForFile):
* platform/gtk/ClipboardGtk.cpp:
(WebCore::Editor::newGeneralClipboard):
* platform/gtk/ClipboardGtk.h:
(WebCore::ClipboardGtk::create):
* platform/gtk/PlatformScrollBar.h:
(WebCore::PlatformScrollbar::create):
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenu::PopupMenu):
* platform/gtk/ScrollViewGtk.cpp:
(WebCore::ScrollViewScrollbar::create):
(WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
(WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
* platform/mac/ClipboardMac.h:
(WebCore::ClipboardMac::create):
* platform/mac/DragDataMac.mm:
(WebCore::DragData::createClipboard):
(WebCore::DragData::containsCompatibleContent):
* platform/mac/PlatformScrollBar.h:
(WebCore::PlatformScrollbar::create):
(WebCore::PlatformScrollbar::horizontalScrollbarHeight):
(WebCore::PlatformScrollbar::verticalScrollbarWidth):
* platform/mac/PopupMenuMac.mm:
(WebCore::PopupMenu::PopupMenu):
* platform/qt/ClipboardQt.h:
(WebCore::ClipboardQt::create):
* platform/qt/DragDataQt.cpp:
(WebCore::DragData::createClipboard):
* platform/qt/PlatformScrollBar.h:
(WebCore::PlatformScrollbar::create):
* platform/qt/PopupMenuQt.cpp:
(WebCore::PopupMenu::PopupMenu):
* platform/qt/ScrollViewQt.cpp:
(WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
(WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
* platform/win/ClipboardWin.h:
(WebCore::ClipboardWin::create):
* platform/win/CursorWin.cpp:
(WebCore::Cursor::Cursor):
(WebCore::loadSharedCursor):
* platform/win/DragDataWin.cpp:
(WebCore::DragData::createClipboard):
* platform/win/EditorWin.cpp:
(WebCore::Editor::newGeneralClipboard):
* platform/win/PlatformScrollBar.h:
(WebCore::PlatformScrollbar::create):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenu::PopupMenu):
(WebCore::PopupMenu::show):
* platform/win/ScrollViewWin.cpp:
(WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
(WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
* platform/wx/ClipboardWx.h:
(WebCore::ClipboardWx::create):
* platform/wx/PlatformScrollBar.h:
(WebCore::PlatformScrollbar::create):
* platform/wx/PopupMenuWx.cpp:
(WebCore::PopupMenu::PopupMenu):
* platform/wx/TemporaryLinkStubs.cpp:
(Icon::Icon):
(Icon::newIconForFile):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::createScrollbar):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
* svg/graphics/SVGImageEmptyClients.h:
(WebCore::SVGEmptyFrameLoaderClient::createDocumentLoader):
2008-06-14 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
......@@ -21950,8 +22110,6 @@ element is when the element reports itself to the screen reader. So all of these
2008-04-03 Oliver Hunt <oliver@apple.com>
Reviewed by NOBODY (Rollout).
Rollout r31566 as there were a few issues i missed during review (thanks to antti for pointing them out)
* dom/Element.h:
......@@ -469,7 +469,9 @@ __ZN7WebCore5Frame29forceLayoutWithPageWidthRangeEffb
__ZN7WebCore5Frame34setMarkedTextMatchesAreHighlightedEb
__ZN7WebCore5Frame4initEv
__ZN7WebCore5Frame5paintEPNS_15GraphicsContextERKNS_7IntRectE
__ZN7WebCore5Frame7setViewEPNS_9FrameViewE
__ZN7WebCore5FrameC1EPNS_4PageEPNS_21HTMLFrameOwnerElementEPNS_17FrameLoaderClientE
__ZN7WebCore5FrameD1Ev
__ZN7WebCore5Image12supportsTypeERKNS_6StringE
__ZN7WebCore5Image20loadPlatformResourceEPKc
__ZN7WebCore5Range6createEN3WTF10PassRefPtrINS_8DocumentEEENS2_INS_4NodeEEEiS6_i
......
......@@ -8639,7 +8639,6 @@
1A8F6BB00DB55CDC001DB794 /* appcache */ = {
isa = PBXGroup;
children = (
5126E6B60A2E3AEF005C29FA /* icon */,
1A8F6BB10DB55CDC001DB794 /* ApplicationCache.cpp */,
1A8F6BB20DB55CDC001DB794 /* ApplicationCache.h */,
1A8F6BB30DB55CDC001DB794 /* ApplicationCacheGroup.cpp */,
......@@ -8787,8 +8786,7 @@
51E1ECBC0C91C90400DC255B /* PageURLRecord.cpp */,
51E1ECBD0C91C90400DC255B /* PageURLRecord.h */,
);
name = icon;
path = ../icon;
path = icon;
sourceTree = "<group>";
};
512DD8E80D91E691000F89EE /* archive */ = {
......@@ -12383,6 +12381,7 @@
children = (
1A8F6BB00DB55CDC001DB794 /* appcache */,
512DD8E80D91E691000F89EE /* archive */,
5126E6B60A2E3AEF005C29FA /* icon */,
93A1EAA20A5634D8006960A0 /* mac */,
BCB16BFE0979C3BD00467741 /* Cache.cpp */,
BCB16BFF0979C3BD00467741 /* Cache.h */,
......@@ -3633,10 +3633,10 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
currFamily = &firstFamily;
}
else {
FontFamily *newFamily = new FontFamily;
RefPtr<SharedFontFamily> newFamily = SharedFontFamily::create();
newFamily->setFamily(face);
currFamily->appendFamily(newFamily);
currFamily = newFamily;
currFamily = newFamily.get();
}
if (fontDescription.keywordSize() && (fontDescription.genericFamily() == FontDescription::MonospaceFamily) != oldFamilyIsMonospace)
......
/*
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -34,8 +34,7 @@
namespace WebCore {
Clipboard::Clipboard(ClipboardAccessPolicy policy, bool isForDragging)
: RefCounted<Clipboard>(0)
, m_policy(policy)
: m_policy(policy)
, m_dragStarted(false)
, m_forDragging(isForDragging)
, m_dragImage(0)
......
......@@ -48,7 +48,7 @@ void _NSSetKillRingToYankedState();
PassRefPtr<Clipboard> Editor::newGeneralClipboard(ClipboardAccessPolicy policy)
{
return new ClipboardMac(false, [NSPasteboard generalPasteboard], policy);
return ClipboardMac::create(false, [NSPasteboard generalPasteboard], policy, 0);
}
static void initializeKillRingIfNeeded()
......
/*
* Copyright (C) 2006 Zack Rusin <zack@kde.org>
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -41,7 +41,7 @@ namespace WebCore {
PassRefPtr<Clipboard> Editor::newGeneralClipboard(ClipboardAccessPolicy policy)
{
return new ClipboardQt(policy);
return ClipboardQt::create(policy);
}
} // namespace WebCore
......@@ -24,17 +24,15 @@
*/
#include "config.h"
#include "Editor.h"
#include "ClipboardWx.h"
namespace WebCore {
PassRefPtr<Clipboard> Editor::newGeneralClipboard(ClipboardAccessPolicy policy)
{
return new ClipboardWx(policy, true);
return ClipboardWx::create(policy, true);
}
}
......@@ -135,8 +135,7 @@ static void setAllDefersLoading(const ResourceLoaderSet& loaders, bool defers)
}
DocumentLoader::DocumentLoader(const ResourceRequest& req, const SubstituteData& substituteData)
: RefCounted<DocumentLoader>(0)
, m_deferMainResourceDataLoad(true)
: m_deferMainResourceDataLoad(true)
, m_frame(0)
, m_originalRequest(req)
, m_substituteData(substituteData)
......
......@@ -68,7 +68,10 @@ namespace WebCore {
class DocumentLoader : public RefCounted<DocumentLoader> {
public:
DocumentLoader(const ResourceRequest&, const SubstituteData&);
static PassRefPtr<DocumentLoader> create(const ResourceRequest& request, const SubstituteData& data)
{
return adoptRef(new DocumentLoader(request, data));
}
virtual ~DocumentLoader();
void setFrame(Frame*);
......@@ -203,7 +206,10 @@ namespace WebCore {
ApplicationCache* mainResourceApplicationCache() const;
#endif
protected:
DocumentLoader(const ResourceRequest&, const SubstituteData&);
bool m_deferMainResourceDataLoad;
private:
......
......@@ -375,7 +375,7 @@ Image* IconDatabase::defaultIcon(const IntSize& size)
static RefPtr<SharedBuffer> defaultIconBuffer(SharedBuffer::create(defaultIconData, sizeof(defaultIconData)));
if (!m_defaultIconRecord) {
m_defaultIconRecord = new IconRecord("urlIcon");
m_defaultIconRecord = IconRecord::create("urlIcon");
m_defaultIconRecord->setImageData(defaultIconBuffer);
}
......@@ -513,10 +513,10 @@ void IconDatabase::setIconDataForIconURL(PassRefPtr<SharedBuffer> dataOriginal,
MutexLocker locker(m_urlAndIconLock);
// If this icon was pending a read, remove it from that set because this new data should override what is on disk
IconRecord* icon = m_iconURLToRecordMap.get(iconURL);
RefPtr<IconRecord> icon = m_iconURLToRecordMap.get(iconURL);
if (icon) {
MutexLocker locker(m_pendingReadingLock);
m_iconsPendingReading.remove(icon);
m_iconsPendingReading.remove(icon.get());
} else
icon = getOrCreateIconRecord(iconURL);
......@@ -588,8 +588,7 @@ void IconDatabase::setIconURLForPageURL(const String& iconURLOriginal, const Str
RefPtr<IconRecord> iconRecord = pageRecord->iconRecord();
// Otherwise, set the new icon record for this page
IconRecord* newIconRecord = getOrCreateIconRecord(iconURL);
pageRecord->setIconRecord(newIconRecord);
pageRecord->setIconRecord(getOrCreateIconRecord(iconURL));
// If the current icon has only a single ref left, it is about to get wiped out.
// Remove it from the in-memory records and don't bother reading it in from disk anymore
......@@ -834,18 +833,18 @@ String IconDatabase::defaultDatabaseFilename()
}
// Unlike getOrCreatePageURLRecord(), getOrCreateIconRecord() does not mark the icon as "interested in import"
IconRecord* IconDatabase::getOrCreateIconRecord(const String& iconURL)
PassRefPtr<IconRecord> IconDatabase::getOrCreateIconRecord(const String& iconURL)
{
// Clients of getOrCreateIconRecord() are required to acquire the m_urlAndIconLock before calling this method
ASSERT(!m_urlAndIconLock.tryLock());
if (IconRecord* icon = m_iconURLToRecordMap.get(iconURL))
return icon;
IconRecord* newIcon = new IconRecord(iconURL);
m_iconURLToRecordMap.set(iconURL, newIcon);
return newIcon;
RefPtr<IconRecord> newIcon = IconRecord::create(iconURL);
m_iconURLToRecordMap.set(iconURL, newIcon.get());
return newIcon.release();
}
// This method retrieves the existing PageURLRecord, or creates a new one and marks it as "interested in the import" for later notification
......@@ -1200,8 +1199,8 @@ void IconDatabase::performURLImport()
IconRecord* currentIcon = pageRecord->iconRecord();
if (!currentIcon || currentIcon->iconURL() != iconURL) {
currentIcon = getOrCreateIconRecord(iconURL);
pageRecord->setIconRecord(currentIcon);
pageRecord->setIconRecord(getOrCreateIconRecord(iconURL));
currentIcon = pageRecord->iconRecord();
}
// Regardless, the time stamp from disk still takes precedence. Until we read this icon from disk, we didn't think we'd seen it before
......
......@@ -123,7 +123,7 @@ private:
HashSet<RefPtr<DocumentLoader> > m_loadersPendingDecision;
IconRecord* m_defaultIconRecord;
RefPtr<IconRecord> m_defaultIconRecord;
#endif // ENABLE(ICONDATABASE)
// *** Any Thread ***
......@@ -134,7 +134,7 @@ public:
#if ENABLE(ICONDATABASE)
private:
IconRecord* getOrCreateIconRecord(const String& iconURL);
PassRefPtr<IconRecord> getOrCreateIconRecord(const String& iconURL);
PageURLRecord* getOrCreatePageURLRecord(const String& pageURL);
bool m_isEnabled;
......
......@@ -41,8 +41,7 @@
namespace WebCore {
IconRecord::IconRecord(const String& url)
: RefCounted<IconRecord>(0)
, m_iconURL(url)
: m_iconURL(url)
, m_stamp(0)
, m_dataSet(false)
{
......
......@@ -67,7 +67,10 @@ public:
class IconRecord : public RefCounted<IconRecord> {
friend class PageURLRecord;
public:
IconRecord(const String& url);
static PassRefPtr<IconRecord> create(const String& url)