WebKit-https.git
13 years agoWebCore:
adele@apple.com [Thu, 17 Apr 2008 17:26:23 +0000 (17:26 +0000)]
WebCore:

2008-04-17  Dean Jackson  <dino@apple.com>

        Reviewed by Hyatt.

        Fix for <rdar://problem/5849968> translate method should have Y=0 when only X is present

        Test: fast/css/transform-default-parameter.html

        * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty):
        translate function with only X parameter now leaves the Y parameter as zero.

LayoutTests:

2008-04-17  Dean Jackson  <dino@apple.com>

        Reviewed by Hyatt.

        Test for <rdar://problem/5849968> translate method should have Y=0 when only X is present

        * fast/css/transform-default-parameter.html: Added.
        * platform/mac/fast/css/transform-default-parameter-expected.checksum: Added.
        * platform/mac/fast/css/transform-default-parameter-expected.png: Added.
        * platform/mac/fast/css/transform-default-parameter-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32002 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-17 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Thu, 17 Apr 2008 17:09:36 +0000 (17:09 +0000)]
2008-04-17  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam.

        Add plumbing for associating document loaders with application caches.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::DocumentLoader):
        (WebCore::DocumentLoader::~DocumentLoader):
        (WebCore::DocumentLoader::originalURL):
        (WebCore::DocumentLoader::requestURL):
        (WebCore::DocumentLoader::responseURL):
        (WebCore::DocumentLoader::responseMIMEType):
        (WebCore::DocumentLoader::setCandidateApplicationCacheGroup):
        (WebCore::DocumentLoader::setApplicationCache):
        (WebCore::DocumentLoader::toplevelApplicationCache):
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::candidateApplicationCacheGroup):
        (WebCore::DocumentLoader::applicationCache):
        * loader/appcache/ApplicationCacheGroup.h:
        (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32001 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Maciej.
ap@webkit.org [Thu, 17 Apr 2008 16:04:48 +0000 (16:04 +0000)]
    Reviewed by Maciej.

        Thread static data destructors are not guaranteed to be called in any particular order;
        turn ThreadSpecific into a phoenix-style singleton to avoid accessing freed memory when
        deleted objects are interdependent (e.g. CommonIdentifiers and internal identifier tables).

        No change on SunSpider.

        * wtf/ThreadSpecific.h:
        (WTF::ThreadSpecific::Data::Data):
        (WTF::::get):
        (WTF::::set):
        (WTF::::destroy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32000 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Fix Bug 18544: REGRESSION (r31951): Two fast/xsl tests crash
aroben@apple.com [Thu, 17 Apr 2008 15:31:50 +0000 (15:31 +0000)]
    Fix Bug 18544: REGRESSION (r31951): Two fast/xsl tests crash

        <https://bugs.webkit.org/show_bug.cgi?id=18544>

        r31951 changed XSLTProcessor::parseErrorFunc to expect a Console* as
        the context parameter. The caller in XSLTProcessor was changed, but
        the one in XSLStyleSheet was missed.

        Reviewed by Alexey Proskuryakov.

        * xml/XSLStyleSheet.cpp:
        (WebCore::XSLStyleSheet::parseString): Pass the Console as the context
        to parseErrorFunc.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31999 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Windows build fix after r31981
aroben@apple.com [Thu, 17 Apr 2008 15:11:54 +0000 (15:11 +0000)]
    Windows build fix after r31981

        * dom/Document.idl: Omit getCSSCanvasContext from the COM bindings.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31998 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoAriya Hidayat <ariya.hidayat@trolltech.com>
hausmann@webkit.org [Thu, 17 Apr 2008 11:56:10 +0000 (11:56 +0000)]
Ariya Hidayat <ariya.hidayat@trolltech.com>

Implemented getFileModificationTime and pathGetFileName for the Qt port.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31997 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-17 Mark Rowe <mrowe@apple.com>
mrowe@apple.com [Thu, 17 Apr 2008 07:44:12 +0000 (07:44 +0000)]
2008-04-17  Mark Rowe  <mrowe@apple.com>

        Fix the non-Mac builds that I broke with my Mac build fix.

        * css/CSSMutableStyleDeclaration.cpp:
        (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Explicitly use the size_t version of max
        to avoid making assumptions about sizeof(size_t).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31993 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-17 Mark Rowe <mrowe@apple.com>
mrowe@apple.com [Thu, 17 Apr 2008 07:22:51 +0000 (07:22 +0000)]
2008-04-17  Mark Rowe  <mrowe@apple.com>

        Rubber-stamped by Dan Bernstein.

        Fix the Mac build.

        * css/CSSMutableStyleDeclaration.cpp:
        (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Update to use size_t in place of unsigned.
        * dom/NamedNodeMap.h: Ditto.
        * page/AccessibilityObject.h: Forward-declare AccessibilityObjectWrapper in the non-Objective-C case too.

2008-04-17  Mark Rowe  <mrowe@apple.com>

        Rubber-stamped by Dan Bernstein.

        Fix the Mac build.

        * WebView/WebFrame.mm: Define HAVE_ACCESSIBILITY before including AccessibilityObject.h and AXObjectCache.h to get things building
        for now.  This comes from config.h in WebCore but we don't have an equivalent in WebKit so we'll need to work out the correct place
        for this to live going forward.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31992 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 Srinivas Rao. M Hamse <msrinirao@gmail.com>
mitz@apple.com [Thu, 17 Apr 2008 05:56:36 +0000 (05:56 +0000)]
2008-04-15  Srinivas Rao. M Hamse  <msrinirao@gmail.com>

        Reviewed by Maciej Stachowiak.

        - gcc 3.x build fix

        * kjs/nodes.h: CallerType definition made public for gcc 3.x compilation

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31991 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoAdd AccessibilityObject wrapper class to WebKit.
jhoneycutt@apple.com [Thu, 17 Apr 2008 04:57:07 +0000 (04:57 +0000)]
Add AccessibilityObject wrapper class to WebKit.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31990 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoFix size_t -> unsigned conversion warnings.
jhoneycutt@apple.com [Thu, 17 Apr 2008 04:56:39 +0000 (04:56 +0000)]
Fix size_t -> unsigned conversion warnings.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31989 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoAdd some methods to determine the AccessibilityObject state.
jhoneycutt@apple.com [Thu, 17 Apr 2008 04:56:06 +0000 (04:56 +0000)]
Add some methods to determine the AccessibilityObject state.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31988 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoAdd AccessibilityObjectWrapper on Windows.
jhoneycutt@apple.com [Thu, 17 Apr 2008 04:55:30 +0000 (04:55 +0000)]
Add AccessibilityObjectWrapper on Windows.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31987 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoAdd AXObjectCache to Windows.
jhoneycutt@apple.com [Thu, 17 Apr 2008 04:54:49 +0000 (04:54 +0000)]
Add AXObjectCache to Windows.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31986 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoFix path to AXObjectCache.h on Windows.
jhoneycutt@apple.com [Thu, 17 Apr 2008 04:54:06 +0000 (04:54 +0000)]
Fix path to AXObjectCache.h on Windows.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31985 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Brady Eidson <beidson@apple.com>
beidson@apple.com [Thu, 17 Apr 2008 04:41:40 +0000 (04:41 +0000)]
2008-04-16  Brady Eidson  <beidson@apple.com>

Fix ChangeLog typo

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31984 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Brady Eidson <beidson@apple.com>
beidson@apple.com [Thu, 17 Apr 2008 04:40:39 +0000 (04:40 +0000)]
2008-04-16  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin Adler

        Merge the StorageAreaClient into the StorageArea class itself as pure virtual methods.
        Add "LocalStorageArea" add "SessionStorageArea" implementations, and have SessionStorage
        and LocalStorage instantiate the appropriate type of StorageArea object.

        This purpose of this change is because while adding the persistent store to LocalStorage,
        it became obvious that the client approach wasn't scaling well.  Additionally, a StorageArea
        backing a local storage area required vastly different data members compared to one backing
        a session storage area.

        This will be much cleaner going forward.

        * GNUmakefile.am:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:

        * storage/LocalStorage.cpp:
        (WebCore::LocalStorage::storageArea):
        * storage/LocalStorage.h:

        * storage/LocalStorageArea.cpp: Added.
        (WebCore::LocalStorageArea::LocalStorageArea):
        (WebCore::LocalStorageArea::itemChanged):
        (WebCore::LocalStorageArea::itemRemoved):
        (WebCore::LocalStorageArea::dispatchStorageEvent):
        * storage/LocalStorageArea.h: Added.
        (WebCore::LocalStorageArea::create):

        * storage/SessionStorage.cpp:
        (WebCore::SessionStorage::copy):
        (WebCore::SessionStorage::storageArea):
        * storage/SessionStorage.h:

        * storage/SessionStorageArea.cpp: Added.
        (WebCore::SessionStorageArea::copy):
        (WebCore::SessionStorageArea::SessionStorageArea):
        (WebCore::SessionStorageArea::itemChanged):
        (WebCore::SessionStorageArea::itemRemoved):
        (WebCore::SessionStorageArea::dispatchStorageEvent):
        * storage/SessionStorageArea.h: Added.
        (WebCore::SessionStorageArea::create):
        (WebCore::SessionStorageArea::page):

        * storage/StorageArea.cpp:
        (WebCore::StorageArea::StorageArea):
        (WebCore::StorageArea::setItem):
        (WebCore::StorageArea::removeItem):
        (WebCore::StorageArea::storageMap):
        * storage/StorageArea.h:

        * storage/StorageAreaClient.h: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31983 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoUpdate window properties test for the new DOM document method.
hyatt@apple.com [Thu, 17 Apr 2008 04:15:27 +0000 (04:15 +0000)]
Update window properties test for the new DOM document method.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31982 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Thu, 17 Apr 2008 04:13:36 +0000 (04:13 +0000)]
2008-04-16  David Hyatt  <hyatt@apple.com>

        Add support for the ability to draw directly into CSS images using CanvasRenderingContext2D.

        Reviewed by olliej

        Added fast/canvas/canvas-bg.html

        * GNUmakefile.am:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * css/CSSCanvasValue.cpp: Added.
        (WebCore::CSSCanvasValue::~CSSCanvasValue):
        (WebCore::CSSCanvasValue::cssText):
        (WebCore::CSSCanvasValue::canvasChanged):
        (WebCore::CSSCanvasValue::canvasResized):
        (WebCore::CSSCanvasValue::fixedSize):
        (WebCore::CSSCanvasValue::element):
        (WebCore::CSSCanvasValue::image):
        * css/CSSCanvasValue.h: Added.
        (WebCore::CSSCanvasValue::CSSCanvasValue):
        (WebCore::CSSCanvasValue::isFixedSize):
        (WebCore::CSSCanvasValue::setName):
        * css/CSSGradientValue.cpp:
        * css/CSSGradientValue.h:
        * css/CSSImageGeneratorValue.cpp:
        (WebCore::CSSImageGeneratorValue::generatedImage):
        * css/CSSImageGeneratorValue.h:
        (WebCore::CSSImageGeneratorValue::isFixedSize):
        (WebCore::CSSImageGeneratorValue::fixedSize):
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseContent):
        (WebCore::CSSParser::parseBackgroundImage):
        (WebCore::CSSParser::parseBorderImage):
        (WebCore::CSSParser::parseCanvas):
        * css/CSSParser.h:
        * dom/Document.cpp:
        (WebCore::Document::getCSSCanvasContext):
        (WebCore::Document::getCSSCanvasElement):
        * dom/Document.h:
        * dom/Document.idl:
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::HTMLCanvasElement):
        (WebCore::HTMLCanvasElement::reset):
        * html/HTMLCanvasElement.h:
        (WebCore::HTMLCanvasElement::setSize):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::calculateBackgroundSize):
        (WebCore::RenderBox::imageChanged):
        * rendering/RenderBox.h:
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::imageChanged):
        * rendering/RenderImage.h:
        (WebCore::RenderImage::imagePtr):
        (WebCore::RenderImage::intrinsicSizeChanged):
        * rendering/RenderImageGeneratedContent.h:
        (WebCore::RenderImageGeneratedContent::imageSize):
        (WebCore::RenderImageGeneratedContent::imagePtr):
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::layout):
        (WebCore::RenderListMarker::imageChanged):
        (WebCore::RenderListMarker::calcPrefWidths):
        (WebCore::RenderListMarker::getRelativeMarkerRect):
        * rendering/RenderListMarker.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::paintBorderImage):
        (WebCore::RenderObject::imageChanged):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::imageChanged):
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::imageChanged):
        * rendering/RenderSVGImage.h:
        * rendering/RenderStyle.cpp:
        (WebCore::StyleCachedImage::imageSize):
        (WebCore::StyleGeneratedImage::imageSize):
        * rendering/RenderStyle.h:
        (WebCore::StyleCachedImage::data):
        (WebCore::StyleGeneratedImage::StyleGeneratedImage):
        (WebCore::StyleGeneratedImage::data):
        (WebCore::StyleGeneratedImage::imageHasRelativeWidth):
        (WebCore::StyleGeneratedImage::imageHasRelativeHeight):
        (WebCore::StyleGeneratedImage::usesImageContainerSize):
        * rendering/RenderTableCol.cpp:
        (WebCore::RenderTableCol::imageChanged):
        * rendering/RenderTableCol.h:
        * rendering/RenderTableRow.cpp:
        (WebCore::RenderTableRow::imageChanged):
        * rendering/RenderTableRow.h:
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::imageChanged):
        * rendering/RenderTableSection.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31981 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Thu, 17 Apr 2008 01:27:41 +0000 (01:27 +0000)]
2008-04-16  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        Add manifest parser.

        * loader/appcache/ManifestParser.cpp:
        (WebCore::):
        (WebCore::parseManifest):
        * loader/appcache/ManifestParser.h:
        * platform/text/CharacterNames.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31978 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebCore:
darin@apple.com [Thu, 17 Apr 2008 01:23:12 +0000 (01:23 +0000)]
WebCore:

2008-04-16  Darin Adler  <darin@apple.com>

        Reviewed by Mitz.

        - fix <rdar://problem/5858617> REGRESSION (r21452-Safari 3.1):
          Safari does not find words containing ß (German letter sharp-s)

        Test: fast/text/find-case-folding.html

        * platform/text/StringImpl.cpp:
        (WebCore::StringImpl::foldCase):
        Pass the folded length to foldCase rather than the original string length.
        Without this, we get an error code every time.

LayoutTests:

2008-04-16  Darin Adler  <darin@apple.com>

        Earlier version reviewed by Mitz.

        - test for <rdar://problem/5858617> REGRESSION (r21452-Safari 3.1):
          Safari does not find words containing ß (German letter sharp-s)

        * fast/text/find-case-folding-expected.txt: Added.
        * fast/text/find-case-folding.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31977 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Thu, 17 Apr 2008 00:51:07 +0000 (00:51 +0000)]
2008-04-16  Anders Carlsson  <andersca@apple.com>

        Fix build.

        * loader/appcache/ApplicationCache.cpp:
        (WebCore::ApplicationCache::ApplicationCache):
        (WebCore::ApplicationCache::setManifestResource):
        (WebCore::ApplicationCache::addResource):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31976 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Thu, 17 Apr 2008 00:50:34 +0000 (00:50 +0000)]
2008-04-16  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        Add new protocolHostAndPortAreEqual function.

        * platform/KURL.cpp:
        (WebCore::KURL::host):
        (WebCore::KURL::setHost):
        (WebCore::KURL::setHostAndPort):
        (WebCore::protocolHostAndPortAreEqual):
        * platform/KURL.h:
        (WebCore::KURL::hostStart):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31975 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Thu, 17 Apr 2008 00:22:03 +0000 (00:22 +0000)]
2008-04-16  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam.

        Fix some style nits.

        * loader/appcache/ApplicationCache.cpp:
        (WebCore::ApplicationCache::ApplicationCache):
        (WebCore::ApplicationCache::setManifestResource):
        (WebCore::ApplicationCache::addResource):
        (WebCore::ApplicationCache::removeResource):
        (WebCore::ApplicationCache::dump):
        * loader/appcache/ApplicationCacheGroup.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31974 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Thu, 17 Apr 2008 00:17:16 +0000 (00:17 +0000)]
2008-04-16  Anders Carlsson  <andersca@apple.com>

        Reviewed by Brady and Sam.

        Add ApplicationCache implementation. Stub out ApplicationCacheGroup methods
        needed by ApplicationCache.

        * loader/appcache/ApplicationCache.cpp:
        (WebCore::ApplicationCache::ApplicationCache):
        (WebCore::ApplicationCache::~ApplicationCache):
        (WebCore::ApplicationCache::setManifestResource):
        (WebCore::ApplicationCache::addResource):
        (WebCore::ApplicationCache::removeResource):
        (WebCore::ApplicationCache::resourceForURL):
        (WebCore::ApplicationCache::resourceForRequest):
        (WebCore::ApplicationCache::numDynamicEntries):
        (WebCore::ApplicationCache::dynamicEntry):
        (WebCore::ApplicationCache::addDynamicEntry):
        (WebCore::ApplicationCache::removeDynamicEntry):
        (WebCore::ApplicationCache::setOnlineWhitelist):
        (WebCore::ApplicationCache::isURLInOnlineWhitelist):
        (WebCore::ApplicationCache::dump):
        * loader/appcache/ApplicationCache.h:
        (WebCore::ApplicationCache::create):
        (WebCore::ApplicationCache::manifestResource):
        (WebCore::ApplicationCache::group):
        (WebCore::ApplicationCache::begin):
        (WebCore::ApplicationCache::end):
        * loader/appcache/ApplicationCacheGroup.h:
        (WebCore::ApplicationCacheGroup::manifestURL):
        (WebCore::ApplicationCacheGroup::cacheDestroyed):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31973 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Fix Bug 18505: REGRESSION: Search is disabled and not functional
aroben@apple.com [Wed, 16 Apr 2008 23:34:02 +0000 (23:34 +0000)]
    Fix Bug 18505: REGRESSION: Search is disabled and not functional

        <https://bugs.webkit.org/show_bug.cgi?id=18505>

        Reviewed by Tim Hatcher.

        * page/inspector/ResourcesPanel.js:
        (WebInspector.ResourcesPanel.sourceFrameForResource): Added.
        * page/inspector/inspector.css: Added back rules for the search field
        that were removed in r31736.
        * page/inspector/inspector.html:
          - Removed the disabled attribute from the search field
          - Added back the #searchResults and #searchResultsResizer divs which
            were removed in r31736
        * page/inspector/inspector.js:
        (WebInspector.set showingSearchResults): Updated for class rename
        panels -> main-panels.
        (WebInspector.loaded): Added back the mousedown event listener for the
        search results resizer that was removed in r31736.
        (WebInspector.searchResultsResizerDrag): Updated for class rename
        panels -> main-panels.
        (WebInspector.performSearch):
          - Changed to use sourceFrameForResource
          - Changed to use showResource
          - Changed to save/restore the focused element around the setting of
            the current panel
          - Changed to get the source document from the match range instead of
            by crawling back up to the source view
          - Changed to bind the onselect handlers to this so that we can
            access the Elements/Resources panels

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31972 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoJavaScriptCore:
beidson@apple.com [Wed, 16 Apr 2008 23:25:13 +0000 (23:25 +0000)]
JavaScriptCore:

2008-04-16  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam Weinig

        Change ThreadSafeShared to act like RefCounted by starting out with a single ref by default

        * wtf/Threading.h:
        (WTF::ThreadSafeShared::ThreadSafeShared):

WebCore:

2008-04-16  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam Weinig

        Changing ThreadSafeShared to start with a ref count of 1, so updating all users to
        adoptRef() that initial reference.

        * bindings/js/JSCustomSQLStatementCallback.h:
        (WebCore::JSCustomSQLStatementCallback::create):
        * bindings/js/JSCustomSQLStatementErrorCallback.h:
        (WebCore::JSCustomSQLStatementErrorCallback::create):
        * bindings/js/JSCustomSQLTransactionCallback.h:
        (WebCore::JSCustomSQLTransactionCallback::create):
        * bindings/js/JSCustomSQLTransactionErrorCallback.h:
        (WebCore::JSCustomSQLTransactionErrorCallback::create):

        * bindings/js/JSDatabaseCustom.cpp:
        (WebCore::JSDatabase::changeVersion):
        (WebCore::JSDatabase::transaction):

        * bindings/js/JSSQLTransactionCustom.cpp:
        (WebCore::JSSQLTransaction::executeSql):

        * dom/Document.cpp:
        (WebCore::Document::databaseThread):

        * platform/SecurityOrigin.cpp:
        (WebCore::SecurityOrigin::create):

        * platform/sql/SQLiteAuthorizer.h:
        (WebCore::SQLiteAuthorizer::create):
        (WebCore::SQLiteAuthorizer::SQLiteAuthorizer):

        * storage/ChangeVersionWrapper.cpp:
        (WebCore::ChangeVersionWrapper::performPreflight):
        (WebCore::ChangeVersionWrapper::performPostflight):
        * storage/ChangeVersionWrapper.h:
        (WebCore::ChangeVersionWrapper::create):

        * storage/Database.cpp:
        (WebCore::Database::openAndVerifyVersion):
        (WebCore::Database::markAsDeletedAndClose):
        (WebCore::Database::changeVersion):
        (WebCore::Database::transaction):
        (WebCore::Database::scheduleTransaction):
        (WebCore::Database::scheduleTransactionStep):
        (WebCore::Database::tableNames):

        * storage/DatabaseAuthorizer.h:
        (WebCore::DatabaseAuthorizer::create):

        * storage/DatabaseTask.h:
        (WebCore::DatabaseOpenTask::create):
        (WebCore::DatabaseCloseTask::create):
        (WebCore::DatabaseTransactionTask::create):
        (WebCore::DatabaseTableNamesTask::create):

        * storage/DatabaseThread.cpp:
        (WebCore::DatabaseThread::scheduleTask): Change to take a PassRefPtr instead of raw
        (WebCore::DatabaseThread::scheduleImmediateTask): Ditto
        * storage/DatabaseThread.h:
        (WebCore::DatabaseThread::create):

        * storage/SQLError.h:
        (WebCore::SQLError::create):
        (WebCore::SQLError::SQLError):

        * storage/SQLResultSet.h:
        (WebCore::SQLResultSet::create):

        * storage/SQLStatement.cpp:
        (WebCore::SQLStatement::create):
        (WebCore::SQLStatement::execute):
        (WebCore::SQLStatement::setDatabaseDeletedError):
        (WebCore::SQLStatement::setVersionMismatchedError):
        (WebCore::SQLStatement::setFailureDueToQuota):
        * storage/SQLStatement.h:

        * storage/SQLTransaction.cpp:
        (WebCore::SQLTransaction::create):
        (WebCore::SQLTransaction::executeSQL):
        (WebCore::SQLTransaction::openTransactionAndPreflight):
        (WebCore::SQLTransaction::deliverTransactionCallback):
        (WebCore::SQLTransaction::handleCurrentStatementError):
        (WebCore::SQLTransaction::deliverStatementCallback):
        (WebCore::SQLTransaction::postflightAndCommit):
        * storage/SQLTransaction.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31971 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Wed, 16 Apr 2008 23:23:39 +0000 (23:23 +0000)]
2008-04-16  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam and Brady.

        Add implementation of ApplicationCacheResource.

        * loader/appcache/ApplicationCacheResource.cpp:
        (WebCore::ApplicationCacheResource::ApplicationCacheResource):
        (WebCore::ApplicationCacheResource::dumpType):
        * loader/appcache/ApplicationCacheResource.h:
        (WebCore::ApplicationCacheResource::):
        (WebCore::ApplicationCacheResource::create):
        (WebCore::ApplicationCacheResource::type):
        (WebCore::ApplicationCacheResource::addType):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoFixes an issue where the source for a resource that had errors would
timothy@apple.com [Wed, 16 Apr 2008 21:47:07 +0000 (21:47 +0000)]
Fixes an issue where the source for a resource that had errors would
not be shown because the view was created before the resource load
finished. The right view is now created, even if the resource isn't
finished. The SourceView just makes sure to not load the source until
the resource is finished. Only if the category changes, does the view
need to be recreated.

Reviewed by Adam Roben.

* page/inspector/Resource.js:
(WebInspector.Resource.prototype.set category): Call recreateViewForResourceIfNeeded.
* page/inspector/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded):
Added. Tries to make a new view, if the view is the same prototype of the
previous view, return early. If they differ, close and detach the old view
and associate the resource with the new view. Calling updateErrorsAndWarnings
is needed, because the errors and warnings that might have been added to the
previous view will be lost, so make the tree element match.
(WebInspector.Resource.prototype._createResourceView): Always create a view
that matches the resource category. Ignore the loading and failed status.
* page/inspector/SourceView.js:
(WebInspector.SourceView.prototype.setupSourceFrameIfNeeded): Don't setup the
frame if the resource hasn't finished or if the load failed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31967 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoAdds a console formatter for Error objects. So typing a expression in the
timothy@apple.com [Wed, 16 Apr 2008 21:46:48 +0000 (21:46 +0000)]
Adds a console formatter for Error objects. So typing a expression in the
console that ends in an exception will print meaningful info. Also calling
console.{log,error,warn,info} with an error object will output nicely.

Reviewed by Adam Roben.

* page/inspector/Console.js:
(WebInspector.Console.prototype._formaterror): Added. Formats an error
object by showing it like other exceptions, with a clickable file URL.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoRefactors code that updates the errors and warnings count in the
timothy@apple.com [Wed, 16 Apr 2008 21:46:32 +0000 (21:46 +0000)]
Refactors code that updates the errors and warnings count in the
resources sidebar so other functions can easily trigger updates.

Reviewed by Adam Roben.

* page/inspector/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.addMessageToResource): Call updateErrorsAndWarnings.
Removes code that updates the bubbleText and class names.
(WebInspector.ResourcesPanel.prototype.clearMessages): Ditto.
(WebInspector.ResourceSidebarTreeElement.prototype.updateErrorsAndWarnings):
Added. Updates the bubbleText and adds or removes the class names
depending on if the values are zero.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31965 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebCore:
antti@apple.com [Wed, 16 Apr 2008 21:41:12 +0000 (21:41 +0000)]
WebCore:

2008-04-16  Antti Koivisto  <antti@apple.com>

        Reviewed by Alexey.

        Fix <rdar://problem/5863728>
        REGRESSION: Garbage character shown in temperatures in the Weather widget (encoding issue with degree symbol)

        Parse the encoding attribute in PreloadScanner.

        Test: fast/encoding/script-preload-encoding.html

        * html/PreloadScanner.cpp:
        (WebCore::PreloadScanner::processAttribute):
        (WebCore::PreloadScanner::emitTag):
        (WebCore::PreloadScanner::emitCSSRule):
        * html/PreloadScanner.h:
        * loader/DocLoader.cpp:
        (WebCore::DocLoader::preload):
        * loader/DocLoader.h:

LayoutTests:

2008-04-16  Antti Koivisto  <antti@apple.com>

        Reviewed by Alexey.

        Test for <rdar://problem/5863728>
        REGRESSION: Garbage character shown in temperatures in the Weather widget (encoding issue with degree symbol)

        * fast/encoding/resources/utf-8.css: Added.
        * fast/encoding/resources/utf-8.js: Added.
        * fast/encoding/preload-encoding-expected.txt: Added.
        * fast/encoding/preload-encoding.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31964 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Wed, 16 Apr 2008 21:03:19 +0000 (21:03 +0000)]
2008-04-16  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Generate the DOMApplicationCache JS wrapper, add JSDOMApplicationCacheCustom.cpp and
        fix typos in the #if line.

        * DerivedSources.make:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDOMApplicationCacheCustom.cpp: Added.
        * loader/appcache/ApplicationCache.cpp:
        * loader/appcache/ApplicationCache.h:
        * loader/appcache/ApplicationCacheGroup.cpp:
        * loader/appcache/ApplicationCacheGroup.h:
        * loader/appcache/ApplicationCacheResource.cpp:
        * loader/appcache/ApplicationCacheResource.h:
        * loader/appcache/DOMApplicationCache.cpp:
        * loader/appcache/DOMApplicationCache.h:
        * loader/appcache/DOMApplicationCache.idl:
        * loader/appcache/ManifestParser.cpp:
        * loader/appcache/ManifestParser.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31963 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoJavaScriptCore:
weinig@apple.com [Wed, 16 Apr 2008 20:58:46 +0000 (20:58 +0000)]
JavaScriptCore:

2008-04-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoffrey Garen.

        - To keep the behavior of the WebKit and JavaScriptCore API's the same,
          we need to hide the fact that the global object and the window object
          are no longer the same thing, and the the global object now changes on
          navigations.  To do this, only the wrapper should ever be exposed.  This
          fixes the two remaining spots where the internal global object is exposed,
          the windowScriptObject returned from [WebFrame windowObject] and the object
          return by calling JSContextGetGlobalObject on [WebFrame globalContext].

        * API/JSContextRef.cpp:
        (JSContextGetGlobalObject):
        This is a bit of a hack, this returns the "this" representation of the globalObject
        which will be the WrapperWindow for WebCore and the globalObject for non-WebCore.

        * API/JSObjectRef.cpp:
        (JSObjectSetProperty):
        Call the new putWithAttributes method instead of relying on lower-level calls.
        This is needed so that the window wrapper can forward the calls.

        * JavaScriptCore.exp:
        * kjs/Activation.h:
        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::putWithAttributes):
        * kjs/JSGlobalObject.h:
        * kjs/JSVariableObject.h:
        (KJS::JSVariableObject::symbolTablePutWithAttributes):
        * kjs/function.cpp:
        (KJS::ActivationImp::putWithAttributes):
        * kjs/nodes.cpp:
        (KJS::ConstDeclNode::handleSlowCase):
        (KJS::ConstDeclNode::evaluateSingle):
        (KJS::EvalNode::processDeclarations):
        * kjs/object.cpp:
        (KJS::JSObject::putWithAttributes):
        * kjs/object.h:
        Rename initializeVariable to putWithAttributes and move it down to JSObject so it
        can be used for JSObjectSetProperty.

WebCore:

2008-04-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoffrey Garen.

        - To keep the behavior of the WebKit and JavaScriptCore API's the same,
          we need to hide the fact that the global object and the window object
          are no longer the same thing, and the the global object now changes on
          navigations.  To do this, only the wrapper should ever be exposed.  This
          fixes the two remaining spots where the internal global object is exposed,
          the windowScriptObject returned from [WebFrame windowObject] and the object
          return by calling JSContextGetGlobalObject on [WebFrame globalContext]

        * bindings/js/JSDOMWindowWrapper.cpp:
        (WebCore::JSDOMWindowWrapper::putWithAttributes):
        * bindings/js/JSDOMWindowWrapper.h:
        Forward this new method so that JSObjectSetProperty doesn't set properties on the
        wrapper.

        * page/mac/FrameMac.mm:
        (WebCore::Frame::windowScriptObject):
        Return the wrapper instead of the global object.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31962 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Wed, 16 Apr 2008 20:53:02 +0000 (20:53 +0000)]
2008-04-16  David Hyatt  <hyatt@apple.com>

        Eliminate the paintBuffer and drawImage(ImageBuffer*) methods from GraphicsContext* in favor of just
        snagging an Image* from the ImageBuffer and drawing that instead.

        Enhance canvas with a CanvasObserver so that notifications of dirtying or resizing can be tracked by
        a consumer.

        Reviewed by olliej

        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::drawImage):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::HTMLCanvasElement):
        (WebCore::HTMLCanvasElement::willDraw):
        (WebCore::HTMLCanvasElement::reset):
        (WebCore::HTMLCanvasElement::paint):
        * html/HTMLCanvasElement.h:
        (WebCore::CanvasObserver::~CanvasObserver):
        (WebCore::HTMLCanvasElement::setSize):
        (WebCore::HTMLCanvasElement::setObserver):
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::drawImage):
        (WebCore::GraphicsContext::drawTiledImage):
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/ImageBuffer.h:
        (WebCore::ImageBuffer::clearImage):
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        * platform/graphics/cg/GraphicsContextCG.cpp:
        * platform/graphics/cg/ImageCG.cpp:
        (WebCore::BitmapImage::draw):
        (WebCore::Image::drawPattern):
        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::createFrameAtIndex):
        * platform/graphics/qt/GraphicsContextQt.cpp:
        * platform/graphics/wx/GraphicsContextWx.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31961 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Steve Falkenburg <sfalken@apple.com>
sfalken@apple.com [Wed, 16 Apr 2008 20:32:31 +0000 (20:32 +0000)]
2008-04-16  Steve Falkenburg  <sfalken@apple.com>

        Improve timer latency/resolution.

        The primary timing mechanism is now CreateTimerQueueTimer, with a PostMessage from
        the callback proc.  This event will be delivered sooner than if we used SetTimer(),
        since it is higher priority than other messages.

        If there is an input message pending, we'll use we SetTimer() based timers to avoid
        starving user input.

        Don't call PostMessage immediately on all timers < 10ms.  Only call immediately if
        timer is already expired.  This avoids the case where no timers would be processed,
        causing the timer to be re-posted via the slower SetTimer method.

        Don't call PostMessage immediately if there's a pending WM_PAINT, since
        we don't want to starve all paints when bombarded with a continuous stream of low
        duration timers.

        Removed reentrancy check, since we're now looking for specific starvation cases,
        and will typically defer non-expired timers through reateTimerQueueTimer.

        The reason Windows wouldn't starve paints in favor of timers with the old code:
        When we went to reset the timer when it fired, the timer reset code treated this as a
        reentrant timer, causing us to hit the slow SetTimer code rather than calling PostMessage,
        even for timers expiring in < 10ms. I corrected that, exposing the paint starvation problem.

        Use timeBeginPeriod/timeEndPeriod to improve resolution of system timers.
        Limit this resolution change to within 20ms of the last high resolution timer request.

        Corrected GetQueueStatus to check for specific input (and paint) messages rather than
        checking QS_ALLINPUT.  Contrary to its name, QS_ALLINPUT actually indicates interest
        in ALL queued messages, not just input messages.

        Fix SetTimer/KillTimer calls to pass our window handle.

        Reviewed by Brady.

        * platform/win/SharedTimerWin.cpp:
        (WebCore::):
        (WebCore::TimerWindowWndProc):
        (WebCore::queueTimerProc):
        (WebCore::setSharedTimerFireTime):
        (WebCore::stopSharedTimer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31960 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Fix console-log-formatting to truly test formatting an undefined value
aroben@apple.com [Wed, 16 Apr 2008 20:22:53 +0000 (20:22 +0000)]
    Fix console-log-formatting to truly test formatting an undefined value

        Exceptions thrown by the test will also now be shown as errors.

        Reviewed by Tim Hatcher.

        * manual-tests/inspector/console-log-formatting.html:
        (test): Use console.error to report exceptions.
        (runTests): Use window.noSuchVariable instead of just noSuchVariable
        to avoid an exception.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31959 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Anatoli Papirovski <apapirovski@mac.com>
jchaffraix@webkit.org [Wed, 16 Apr 2008 19:47:55 +0000 (19:47 +0000)]
2008-04-16  Anatoli Papirovski  <apapirovski@mac.com>

        Reviewed by David.

        Optimized the calculation of background-size.

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::calculateBackgroundSize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31958 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Fix Bug 17228: console.{log,warn,info,error} should support format strings...
aroben@apple.com [Wed, 16 Apr 2008 19:34:53 +0000 (19:34 +0000)]
    Fix Bug 17228: console.{log,warn,info,error} should support format strings, variable arguments

        <https://bugs.webkit.org/show_bug.cgi?id=17228>
        <rdar://problem/5732828>

        Reviewed by Tim Hatcher.

        Test: manual-tests/inspector/console-log-formatting.html

        * page/inspector/Console.js:
        (WebInspector.ConsoleMessage): Pass any extra arguments down to
        _format.
        (WebInspector.ConsoleMessage._format): This method constructs
        this.formattedMessage. We treat the first parameter as a format
        string. Any parameters that have not been used after substituting into
        the format string are concatenated together, separated by spaces.
        (WebInspector.ConsoleMessage.toMessageElement): Updated to use
        this.formattedMessage.
        (WebInspector.ConsoleMessage.toString): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31957 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Make String.format return an array of unused substitutions
aroben@apple.com [Wed, 16 Apr 2008 19:34:29 +0000 (19:34 +0000)]
    Make String.format return an array of unused substitutions

        String.format now returns an object with two properties:
        formattedResult and unusedSubstitutions.

        Reviewed by Tim Hatcher.

        * page/inspector/utilities.js:
        (String.vsprintf): Updated for changes to String.format. We throw away
        the array of unused substitutions.
        (String.format): Changed to keep track of which substitutions are used
        when formatting. We then return both the formatted result and the
        array of unused substitutions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31956 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Generalize String.format some more
aroben@apple.com [Wed, 16 Apr 2008 19:34:07 +0000 (19:34 +0000)]
    Generalize String.format some more

        String.format now takes an initial value and an append function which
        it uses to build the result. Each time a token is processed,
        append(valueSoFar, newValue) is called.

        Reviewed by Tim Hatcher.

        * page/inspector/utilities.js:
        (String.vsprintf): Pass the empty string for the initial value, and
        a function that concatenates two strings as the append function.
        (String.format): Use initialValue and append to build the result
        instead of only working with strings.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Add String.format
aroben@apple.com [Wed, 16 Apr 2008 19:20:21 +0000 (19:20 +0000)]
    Add String.format

        String.format is a more generic form of String.vsprintf that takes a
        set of formatter functions, one for each supported format specifier.
        Each formatter function is passed the relevant token and substitution
        value, and returns the formatted result.

        Reviewed by Tim Hatcher.

        * page/inspector/utilities.js:
        (String.standardFormatters): Added.
        (String.vsprintf): Changed to call through to String.format.
        (String.format): Added. Most of the code came from String.vsprintf,
        except that we use the passed-in formatters to format the
        substitutions rather than hard-coding how to handle each format
        specifier.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Refactor String.vsprintf to separate tokenizing and substituting
aroben@apple.com [Wed, 16 Apr 2008 19:19:57 +0000 (19:19 +0000)]
    Refactor String.vsprintf to separate tokenizing and substituting

        This will eventually be useful for the various console methods that
        take a format string.

        Reviewed by Tim Hatcher.

        * page/inspector/utilities.js:
        (String.tokenizeFormatString): Added. This uses the format parsing
        code from String.vsprintf but just returns an array of "string" and
        "specifier" tokens.
        (String.vsprintf): Now calls String.tokenizeFormatString and processes
        the tokens one at a time.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31953 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Pass all arguments to console.{log,warn,info,error} into the Inspector's JS
aroben@apple.com [Wed, 16 Apr 2008 19:19:29 +0000 (19:19 +0000)]
    Pass all arguments to console.{log,warn,info,error} into the Inspector's JS

        Part of Bug 17228: console.{log,warn,info,error} should support format
        strings, variable arguments
        <http://bugs.webkit.org/show_bug.cgi?id=17228>
        <rdar://problem/5732828>

        We don't use the extra arguments yet.

        Reviewed by Tim Hatcher.

        * page/Console.cpp:
        (WebCore::Console::error): Pass the arguments list to
        InspectorController.
        (WebCore::Console::info): Ditto.
        (WebCore::Console::log): Ditto.
        (WebCore::Console::warn): Ditto.
        * page/InspectorController.cpp:
        (WebCore::ConsoleMessage::ConsoleMessage): Added a new constructor
        that takes an ExecState and a List instead of a String. We wrap and
        store the JSValues from the List in a Vector<ProtectedPtr<JSValue> >.
        (WebCore::InspectorController::addMessageToConsole): Added an overload
        that takes an ExecState and a List.
        (WebCore::InspectorController::addConsoleMessage): Moved code here
        from addMessageToConsole. Both overloads of addMessageToConsole now
        call this helper method.
        (WebCore::InspectorController::addScriptConsoleMessage): Updated for
        the new parameter order of WebInspector.ConsoleMessage. If the
        ConsoleMessage has a non-empty wrappedArguments Vector, we use that
        instead of the ConsoleMessage's message String.
        * page/InspectorController.h:
        * page/inspector/Console.js:
        (WebInspector.ConsoleMessage): Removed the explicit message parameter.
        We now get the message from the unnamed 5th parameter.
        * page/inspector/Resource.js: Updated for the change to
        WebInspector.ConsoleMessage's parameter order.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31952 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Change calls to Chrome::addMessageToConsole to use Console::addMessage
aroben@apple.com [Wed, 16 Apr 2008 19:19:00 +0000 (19:19 +0000)]
    Change calls to Chrome::addMessageToConsole to use Console::addMessage

        Part of Bug 17228: console.{log,warn,info,error} should support format
        strings, variable arguments
        <http://bugs.webkit.org/show_bug.cgi?id=17228>
        <rdar://problem/5732828>

        Console now takes care of calling ChromeClient::addMessageToConsole
        for the appropriate messages (i.e., just messages from JavaScript). If
        you ever want to add a message to the console, Console is the place to
        do it.

        Reviewed by Darin Adler.

        * WebCore.xcodeproj/project.pbxproj: Mark Console.h Private.
        * page/Chrome.cpp: Removed addMessageToConsole
        * page/Chrome.h: Moved MessageSource/MessageLevel to Console.h.
        * page/Console.cpp:
        (WebCore::Console::addMessage): Added. Calls
        ChromeClient::addMessageToConsole for JS messages, and calls
        InspectorController::addMessageToConsole for all messages.
        (WebCore::Console::error): Changed to call directly to
        InspectorController in addition to ChromeClient.
        (WebCore::Console::info): Ditto.
        (WebCore::Console::log): Ditto.
        (WebCore::Console::warn): Ditto.
        * page/Console.h: Added MessageSource/MessageLevel enums from Chrome.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31951 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Pass JSConsole's arguments unmodified to Console
aroben@apple.com [Wed, 16 Apr 2008 19:18:11 +0000 (19:18 +0000)]
    Pass JSConsole's arguments unmodified to Console

        Part of Bug 17228: console.{log,warn,info,error} should support format
        strings, variable arguments
        <http://bugs.webkit.org/show_bug.cgi?id=17228>
        <rdar://problem/5732828>

        All of JSConsole's methods are now custom, so that we can pass the
        arguments unmodified to Console. Console now handles calling
        toString() on the first argument. Later it will pass the arguments off
        to InspectorController.

        There should be no behavioral changes caused by this patch.

        Reviewed by Darin Adler.

        * ForwardingHeaders/kjs/list.h: Added.
        * GNUmakefile.am: Added JSConsoleCustom.cpp to the project.
        * WebCore.pro: Ditto.
        * WebCore.vcproj/WebCore.vcproj: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * WebCoreSources.bkl: Ditto.
        * bindings/js/JSConsoleCustom.cpp: Added.
        (WebCore::JSConsole::error):
        (WebCore::JSConsole::info):
        (WebCore::JSConsole::log):
        (WebCore::JSConsole::warn):
        * page/Console.cpp: Changed all methods to take an ExecState* and a
        const List&. The first item in the List is toString()ed and passed to
        Chrome.
        (WebCore::Console::error):
        (WebCore::Console::info):
        (WebCore::Console::log):
        (WebCore::Console::warn):
        * page/Console.h:
        * page/Console.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31950 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Wed, 16 Apr 2008 19:08:03 +0000 (19:08 +0000)]
2008-04-16  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Sam and Geoff.

        -<rdar://problem/5770054> JavaScript profiler (10928)
        Inital profiler prototype

        * GNUmakefile.am: Added new files to project
        * JavaScriptCore.pri: Ditto
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto
        * JavaScriptCore.xcodeproj/project.pbxproj: Ditto
        * JavaScriptCoreSources.bkl: Ditto
        * kjs/config.h: Put compiling flag in here.
        * kjs/function.cpp: Instrument calling the function eval().
        (KJS::eval):
        * kjs/interpreter.cpp: Instrument evaluating global scopes.
        (KJS::Interpreter::evaluate):
        * kjs/object.cpp: Instrument JS function calls.
        (KJS::JSObject::call):
        * profiler: Added.
        * profiler/FunctionCallProfile.cpp: Added.
        (KJS::FunctionCallProfile::FunctionCallProfile):
        (KJS::FunctionCallProfile::~FunctionCallProfile):
        (KJS::FunctionCallProfile::willExecute): Call right before the JS function or executing context is executed to start the profiler's timer.
        (KJS::FunctionCallProfile::didExecute): Call right after the JS function or executing context is executed to stop the profiler's timer.
        (KJS::FunctionCallProfile::addChild): Add a child to the current FunctionCallProfile if it isn't already a child of the current FunctionalCallProfile.
        (KJS::FunctionCallProfile::findChild): Return the child that matches the given name if there is one.
        (KJS::FunctionCallProfile::printDataSampleStyle): Print the current profiled information in a format that matches sample's output.
        * profiler/FunctionCallProfile.h: Added.
        (KJS::FunctionCallProfile::FunctionCallProfile):
        (KJS::FunctionCallProfile::~FunctionCallProfile):
        (KJS::FunctionCallProfile::functionName):
        (KJS::FunctionCallProfile::microSecs):
        * profiler/Profiler.cpp: Added.
        (KJS::Profiler::profiler):
        (KJS::Profiler::sharedProfiler): Return global singleton (may change due to multi-threading concerns)
        (KJS::Profiler::startProfiling): Don't start collecting profiling information until the user starts the profiler. Also don't clear old prfiled data until the profiler is restarted.
        (KJS::Profiler::stopProfiling): Stop collecting profile information.
        (KJS::Profiler::willExecute): Same as above.
        (KJS::Profiler::didExecute): Same as above.
        (KJS::Profiler::insertStackNamesInTree): Follow the stack of the given names and if a sub-stack is not in the current tree, add it.
        (KJS::Profiler::getStackNames): Get the names from the different passed in parameters and order them as a stack.
        (KJS::Profiler::getFunctionName): Get the function name from the given parameter.
        (KJS::Profiler::printDataSampleStyle): Print the current profiled information in a format that matches sample's output.
        (KJS::Profiler::debugLog):
        * profiler/Profiler.h: Added.
        (KJS::Profiler::Profiler):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31949 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoJavaScriptCore:
weinig@apple.com [Wed, 16 Apr 2008 18:41:54 +0000 (18:41 +0000)]
JavaScriptCore:

2008-04-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin Adler.

        - Remove kjs_ prefix from strtod, dtoa, and freedtoa and put it
          in the KJS namespace.
        - Make strtod, dtoa, and freedtoa c++ functions instead of extern "C".
        - Remove mode switching from dtoa.  ~2% improvement on test 26.
        - Removes all unnecessary #defines from dtoa code.

        * JavaScriptCore.exp:
        * kjs/dtoa.cpp:
        (KJS::ulp):
        (KJS::b2d):
        (KJS::d2b):
        (KJS::ratio):
        (KJS::):
        (KJS::strtod):
        (KJS::freedtoa):
        (KJS::dtoa):
        * kjs/dtoa.h:
        * kjs/function.cpp:
        (KJS::parseInt):
        * kjs/lexer.cpp:
        (KJS::Lexer::lex):
        * kjs/number_object.cpp:
        (KJS::integer_part_noexp):
        (KJS::numberProtoFuncToExponential):
        * kjs/ustring.cpp:
        (KJS::UString::from):
        (KJS::UString::toDouble):

WebCore:

2008-04-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin Adler.

        Rename kjs_strtod to KJS::strtod.

        * platform/text/String.cpp:
        (WebCore::charactersToDouble):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31948 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam.
ap@webkit.org [Wed, 16 Apr 2008 17:30:13 +0000 (17:30 +0000)]
    Reviewed by Adam.

        http://bugs.webkit.org/show_bug.cgi?id=18259
        XML+XSLT pages in iframe contains document.location of a parent window

        Test: fast/xsl/subframe-location.html

        * xml/XSLTProcessor.cpp:
        (WebCore::XSLTProcessor::createDocumentFromSource): Set resulting document URL before opening
        it, so that the document loader picks a correct URL, too.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31947 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin.
ap@webkit.org [Wed, 16 Apr 2008 17:23:24 +0000 (17:23 +0000)]
    Reviewed by Darin.

        Get rid of static execForCompareByStringForQSort in array_instance.cpp.

        No change on SunSpider, CelticKane or iBench JavaScript.

        * kjs/array_instance.cpp:
        (KJS::ArraySortComparator::ArraySortComparator):
        (KJS::ArraySortComparator::operator()):
        (KJS::ArrayInstance::sort):
        Switch slow case to std::sort, so that ExecState can be passed in a comparator.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31946 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Rubber-stamped by John Sullivan.
mitz@apple.com [Wed, 16 Apr 2008 15:30:56 +0000 (15:30 +0000)]
    Rubber-stamped by John Sullivan.

        - remove unreachable code which was added in r8802

        * rendering/RenderText.cpp:
        (WebCore::RenderText::caretRect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31945 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam Roben.
ap@webkit.org [Wed, 16 Apr 2008 15:26:37 +0000 (15:26 +0000)]
    Reviewed by Adam Roben.

        MSVC build fix.

        * kjs/CommonIdentifiers.cpp:
        * kjs/CommonIdentifiers.h:
        * kjs/Parser.cpp:
        * kjs/Parser.h:
        * kjs/identifier.cpp:
        * kjs/lexer.h:
        * wtf/ThreadSpecific.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31944 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Build fix.
ap@webkit.org [Wed, 16 Apr 2008 14:31:40 +0000 (14:31 +0000)]
    Build fix.

        * kjs/date_object.cpp:
        * kjs/date_object.h:
        Don't include DateMath.h from date_object.h, as the latter is used from WebCore, while
        where the former is not available.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31943 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoAdds a script resource icon. Update the CSS icon to better match the script icon.
timothy@apple.com [Wed, 16 Apr 2008 13:49:37 +0000 (13:49 +0000)]
Adds a script resource icon. Update the CSS icon to better match the script icon.

https://bugs.webkit.org/show_bug.cgi?id=18499

Rubber-stamped by Adele Peterson.

* page/inspector/Images/resourceCSSIcon.png: Updated.
* page/inspector/Images/resourceJSIcon.png: Added.
* page/inspector/inspector.css: Changed the script icon rule to reference the new image.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31942 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Holger Hans Peter Freyther <zecke@selfish.org>
zecke@webkit.org [Wed, 16 Apr 2008 12:51:07 +0000 (12:51 +0000)]
2008-04-16  Holger Hans Peter Freyther  <zecke@selfish.org>

        Unreviewed build fix for MSVC. It does not want to have
        WTF in the KJS namespace.

        * kjs/CommonIdentifiers.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31941 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-16 Holger Hans Peter Freyther <zecke@selfish.org>
zecke@webkit.org [Wed, 16 Apr 2008 12:26:29 +0000 (12:26 +0000)]
2008-04-16  Holger Hans Peter Freyther  <zecke@selfish.org>

        Unreviewed build fix for gcc.

        ::msToGregorianDateTime  is not known to it.

        * kjs/date_object.cpp:
        (KJS::DateInstance::msToGregorianDateTime):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31940 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Oliver Hunt.
ap@webkit.org [Wed, 16 Apr 2008 09:58:04 +0000 (09:58 +0000)]
    Reviewed by Oliver Hunt.

        Initialize threadMapMutex safely (as already done in ThreadingWin).

        * wtf/ThreadingGtk.cpp:
        (WTF::threadMapMutex):
        (WTF::initializeThreading):
        * wtf/ThreadingPthreads.cpp:
        (WTF::threadMapMutex):
        (WTF::initializeThreading):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31939 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoFix ChangeLog spelling.
ap@webkit.org [Wed, 16 Apr 2008 09:44:13 +0000 (09:44 +0000)]
Fix ChangeLog spelling.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31938 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam Roben.
ap@webkit.org [Wed, 16 Apr 2008 09:41:23 +0000 (09:41 +0000)]
    Reviewed by Adam Roben.

        Cache Gregorian date/time structure on DateInstance objects for 1.027x SunSpider speedup
        (1.65x on date-format-xparb, 1.13x on date-format-tofte).

        * kjs/DateMath.h:
        (KJS::GregorianDateTime::copyFrom): Added. It presumably makes sense to keep GregorianDateTime
        Noncopiable, so it's not just operator=.

        * kjs/date_object.h: Added a per-object cache.

        * kjs/date_object.cpp:
        (KJS::DateInstance::DateInstance):
        (KJS::DateInstance::msToGregorianDateTime):
        (KJS::dateProtoFuncToString):
        (KJS::dateProtoFuncToUTCString):
        (KJS::dateProtoFuncToDateString):
        (KJS::dateProtoFuncToTimeString):
        (KJS::dateProtoFuncToLocaleString):
        (KJS::dateProtoFuncToLocaleDateString):
        (KJS::dateProtoFuncToLocaleTimeString):
        (KJS::dateProtoFuncGetFullYear):
        (KJS::dateProtoFuncGetUTCFullYear):
        (KJS::dateProtoFuncToGMTString):
        (KJS::dateProtoFuncGetMonth):
        (KJS::dateProtoFuncGetUTCMonth):
        (KJS::dateProtoFuncGetDate):
        (KJS::dateProtoFuncGetUTCDate):
        (KJS::dateProtoFuncGetDay):
        (KJS::dateProtoFuncGetUTCDay):
        (KJS::dateProtoFuncGetHours):
        (KJS::dateProtoFuncGetUTCHours):
        (KJS::dateProtoFuncGetMinutes):
        (KJS::dateProtoFuncGetUTCMinutes):
        (KJS::dateProtoFuncGetSeconds):
        (KJS::dateProtoFuncGetUTCSeconds):
        (KJS::dateProtoFuncGetTimezoneOffset):
        (KJS::setNewValueFromTimeArgs):
        (KJS::setNewValueFromDateArgs):
        (KJS::dateProtoFuncSetYear):
        (KJS::dateProtoFuncGetYear):
        Use the cache when converting.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin.
ap@webkit.org [Wed, 16 Apr 2008 09:30:01 +0000 (09:30 +0000)]
    Reviewed by Darin.

        Implement an abstraction for thread-specific storage, use it to get rid of some static objects.

        SunSpider results were not conclusive, possibly up to 0.2% slowdown.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        Added ThreadSpecific.h

        * wtf/ThreadSpecific.h: Added.
        (WTF::::ThreadSpecific):
        (WTF::::~ThreadSpecific):
        (WTF::::get):
        (WTF::::set):
        (WTF::::destroy):
        (WTF::T):
        (WTF::::operator):
        Only implemented for platforms that use pthreads.

        * kjs/CommonIdentifiers.cpp:
        (KJS::CommonIdentifiers::shared):
        * kjs/CommonIdentifiers.h:
        * kjs/InitializeThreading.cpp:
        (KJS::initializeThreading):
        * kjs/Parser.cpp:
        (KJS::parser):
        * kjs/Parser.h:
        * kjs/identifier.cpp:
        (KJS::identifierTable):
        (KJS::literalIdentifierTable):
        (KJS::Identifier::initializeIdentifierThreading):
        * kjs/identifier.h:
        * kjs/lexer.cpp:
        (KJS::lexer):
        * kjs/lexer.h:
        Make static instances per-thread.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31936 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by hyatt.
eric@webkit.org [Wed, 16 Apr 2008 07:53:21 +0000 (07:53 +0000)]
    Reviewed by hyatt.

        Fix leaky ImageBuffer code.

        * platform/graphics/GeneratedImage.cpp:
        (WebCore::GeneratedImage::drawPattern):
        * platform/graphics/ImageBuffer.h:
        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::ImageBuffer::image):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31935 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebCore:
justin.garcia@apple.com [Wed, 16 Apr 2008 05:30:13 +0000 (05:30 +0000)]
WebCore:

2008-04-15  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5665299> REGRESSION (r27369): Paste text into a contenteditable div creates a contenteditable div for each line (16661)

        * editing/markup.cpp:
        (WebCore::createFragmentFromText): Don't use clones of the enclosing block to hold
        paragraphs if the enclosing block is the root editable element.

LayoutTests:

2008-04-15  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5665299> REGRESSION (r27369): Paste text into a contenteditable div creates a contenteditable div for each line (16661)

        * editing/pasteboard/5665299-expected.txt: Added.
        * editing/pasteboard/5665299.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31932 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoDon't treat the misnamed NSAccessibilitySortButtonRole as an accessibility role.
mrowe@apple.com [Wed, 16 Apr 2008 03:36:56 +0000 (03:36 +0000)]
Don't treat the misnamed NSAccessibilitySortButtonRole as an accessibility role.
It is really a subrole of NSAccessibilityButtonRole.  As it is not used inside WebCore
there is no change in behaviour as a result of doing this. This fixes <rdar://problem/5866444>.

Reviewed by Jon Honeycutt.

* page/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::canSetFocusAttribute): Remove SortButtonRole as it is unused.
* page/AccessibilityObject.h: Ditto.
(WebCore::):
* page/mac/AccessibilityObjectWrapper.mm:
(RoleEntry::):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31931 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Wed, 16 Apr 2008 01:56:03 +0000 (01:56 +0000)]
2008-04-15  Anders Carlsson  <andersca@apple.com>

        Fix leaks seen on bot.

        * loader/SubstituteResource.h:
        (WebCore::SubstituteResource::~SubstituteResource):
        Add a virtual destructor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31927 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 Brady Eidson <beidson@apple.com>
beidson@apple.com [Wed, 16 Apr 2008 01:10:59 +0000 (01:10 +0000)]
2008-04-15  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders Carlsson

        Fix for <rdar://problem/5820819> - Crash sometime occurs when interrupting a load.

        Each SubresourceLoader has a client.  That client is often a Loader::Host object.
        The Loader/Host/CachedResource system predates our ref-counting and ownership models, and therefore manages
        object lifetime manually.

        The cause of this crash was that we would sometimes call "didFail()" on a Host object twice - Once when
        beginning the new navigation, and once when the new navigation is committed.

        The problem is after the first time Host::didFail() gets called, the Host is almost always deleted shortly
        thereafter.  But the SubresourceLoader had a dangling pointer to the Host which is now invalid.

        I explored a few options to fix this bug.  The one that was most obviously "clean" was to call cancel() on
        the SubresourceLoader itself, which would end up calling Host::didFail() and doing the appropriate cache
        cleanup.

        This problem with that approach was that it had other side effects - when you cut off a load that had already
        partially displayed in the WebView, images that hadn't finished loading would be invalidated and immediately
        turn into broken image icons.  This was visually jarring and pretty unacceptable.

        So I decided to follow a much simpler approach, which was to have the Host clear the client pointer from each
        SubresourceLoader before it forgets about it.  This leaves things the same visually and fixes the crash.

        Note that the layout test for this - if possible - will require other enhancements to DRT including possibly
        adding support for window.stop(). That task is non-trivial, and is documented in <rdar://problem/5061826>

        * loader/SubresourceLoader.h:
        (WebCore::SubresourceLoader::clearClient): Add a method to clear the SubresourceLoaderClient.  This is
          perfectly safe to do on an in-flight SubresourceLoader as they are already designed to be client-less,
          and already null-check the client before calling it.

        * loader/loader.cpp:
        (WebCore::Loader::Host::didFail): The SubresourceLoader itself might not be finished loading and might decide
          to call into its client later.  Since the client has no guaranteed lifetime and is liable to be deleted
          after didFail() is called, call clearClient() on the SubresourceLoader so such an invalid call can't happen.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31926 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Anders.
kdecker@apple.com [Tue, 15 Apr 2008 23:48:14 +0000 (23:48 +0000)]
    Reviewed by Anders.

        <rdar://problem/5412759> CrashTracer: [USER] 22 crashes in Safari at com.apple.quicktime.webplugin: NPN_SetValue + 15403

        In certain situations, code in WebBasePluginPackage would load a plug-in only for the explicit reason of asking it to create a
        preference file, but wouldn't actually unload the bundle. This created problems for the QuickTime WebKit plug-in by unloading
        a bundle out from underneath itself.

        * Plugins/WebBasePluginPackage.h: Added unload method.
        * Plugins/WebBasePluginPackage.m:
        (-[WebBasePluginPackage unload]): Added new method. Currently, only Netscape plug-ins support unload.
        (-[WebBasePluginPackage pListForPath:createFile:]): Added a call to unload.
        * Plugins/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage unload]): Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31925 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Tue, 15 Apr 2008 23:24:57 +0000 (23:24 +0000)]
2008-04-15  Anders Carlsson  <andersca@apple.com>

        Add missing ;

        * Scripts/build-webkit:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31924 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoJavaScriptCore:
andersca@apple.com [Tue, 15 Apr 2008 23:16:43 +0000 (23:16 +0000)]
JavaScriptCore:

2008-04-15  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.

        * Configurations/JavaScriptCore.xcconfig:

WebCore:

2008-04-15  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Add empty files for the application cache.

        * Configurations/WebCore.xcconfig:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.vcproj/build-generated-files.sh:
        Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/appcache: Added.
        * loader/appcache/ApplicationCache.cpp: Added.
        * loader/appcache/ApplicationCache.h: Added.
        * loader/appcache/ApplicationCacheGroup.cpp: Added.
        * loader/appcache/ApplicationCacheGroup.h: Added.
        * loader/appcache/ApplicationCacheResource.cpp: Added.
        * loader/appcache/ApplicationCacheResource.h: Added.
        * loader/appcache/DOMApplicationCache.cpp: Added.
        * loader/appcache/DOMApplicationCache.h: Added.
        * loader/appcache/DOMApplicationCache.idl: Added.
        * loader/appcache/ManifestParser.cpp: Added.
        * loader/appcache/ManifestParser.h: Added.

WebKit/mac:

2008-04-15  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.

        * Configurations/WebKit.xcconfig:

WebKit/win:

2008-04-15  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.

        * WebKit.vcproj/WebKit.vcproj:

WebKitTools:

2008-04-15  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.

        * Scripts/build-webkit:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31923 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 Kevin McCullough <kmccullough@apple.com>
kmccullough@apple.com [Tue, 15 Apr 2008 22:27:59 +0000 (22:27 +0000)]
2008-04-15  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Tim.

        - <rdar://problem/5792587> AJAX (XMLHttpRequest) support for the Inspector (17776)
        - Add XMLHttpRequest support to the inspector.

        * English.lproj/InspectorLocalizedStrings.js: Specify capitalization
        instead of using text-transform because XHR must capitalize all the letters.
        * page/inspector/Resource.js: Assume XHRs are textType even though this
        may not always be true.
        Also add the XHR category and let all mime types be consistent with it.
        * page/inspector/ResourcesPanel.js: Set the XHR category color.
        * page/inspector/inspector.css: Make XHRs yellow and fonts red because
        XHRs are more common than fonts and yellow next to orange (scripts) is
        not as harsh on the eyes as red next to orange.
        * page/inspector/inspector.js: Specify capitalization again.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31922 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Tue, 15 Apr 2008 21:31:11 +0000 (21:31 +0000)]
2008-04-15  David Hyatt  <hyatt@apple.com>

        Fix the zoom property so that it works properly with font-size.

        Reviewed by John Sullivan

        Added fast/css/zoom-font-size.html

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::updateFont):
        (WebCore::CSSStyleSelector::applyProperty):
        (WebCore::CSSStyleSelector::checkForZoomChange):
        * css/CSSStyleSelector.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31920 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoFixes the bug where a resource view could still be shown after the inspected
timothy@apple.com [Tue, 15 Apr 2008 20:56:43 +0000 (20:56 +0000)]
Fixes the bug where a resource view could still be shown after the inspected
page navigates to another page.

https://bugs.webkit.org/show_bug.cgi?id=18517

Reviewed by Adam Roben.

* page/inspector/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.reset): Close the visible resource.
Iterate over all the resources and zero errors and warnings and delete the
resource view and tree element. Removes all children of resourceViews. Passes
true to _updateGraphDividersIfNeeded to force an immediate update.
(WebInspector.ResourcesPanel.prototype.removeResource): Added. Closes
the resource view if it is visible. Removes the resource from the _resources
array. Removes the tree element from the outline tree. Zeros out the errors
and warnings properties. Deletes the tree element and resource view properties.
(WebInspector.ResourcesPanel.prototype.closeVisibleResource): Null check
this._calculator for times when reset is called before the calculator is set.
* page/inspector/inspector.js:
(WebInspector.removeResource): Call ResourcesPanel.removeResource.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31918 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Tue, 15 Apr 2008 20:55:37 +0000 (20:55 +0000)]
2008-04-15  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Rename "archive" to "substitute" in a couple of places.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::DocumentLoader):
        (WebCore::DocumentLoader::clearArchiveResources):
        (WebCore::DocumentLoader::deliverSubstituteResourcesAfterDelay):
        (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
        (WebCore::DocumentLoader::isSubstituteLoadPending):
        (WebCore::DocumentLoader::cancelPendingSubstituteLoad):
        (WebCore::DocumentLoader::scheduleArchiveLoad):
        (WebCore::DocumentLoader::setDefersLoading):
        * loader/DocumentLoader.h:
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::load):
        (WebCore::ResourceLoader::didCancel):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31917 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Tue, 15 Apr 2008 19:44:40 +0000 (19:44 +0000)]
2008-04-15  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Move the URL, response and data to SubstituteResource.

        * loader/SubstituteResource.h:
        (WebCore::SubstituteResource::url):
        (WebCore::SubstituteResource::response):
        (WebCore::SubstituteResource::data):
        (WebCore::SubstituteResource::SubstituteResource):
        * loader/archive/ArchiveResource.cpp:
        (WebCore::ArchiveResource::ArchiveResource):
        * loader/archive/ArchiveResource.h:
        (WebCore::ArchiveResource::frameName):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31916 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Tue, 15 Apr 2008 19:21:38 +0000 (19:21 +0000)]
2008-04-15  David Hyatt  <hyatt@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=18467

        Make sure to ignore zoom:0.  That is not supposed to actually do anything.  It's a hack in IE
        to cause an element to set "hasLayout."

        Reviewed by Anders

        Added fast/css/zoom-property-parsing.html

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue):
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31915 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Tue, 15 Apr 2008 19:03:19 +0000 (19:03 +0000)]
2008-04-15  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Add a (currently empty) SubstituteResource class and make ArchiveResource inherit from it.

        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/SubstituteResource.h: Added.
        * loader/archive/ArchiveResource.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31914 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 Antti Koivisto <antti@apple.com>
antti@apple.com [Tue, 15 Apr 2008 18:49:54 +0000 (18:49 +0000)]
2008-04-15  Antti Koivisto  <antti@apple.com>

        Reviewed by Geoff.

        Fix <rdar://problem/5862921>
        REGRESSION: Leak in SVGSVGElement::SVGSVGElement

        In these strange days RefCounted starts with count of one.

        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::SVGSVGElement):
        * svg/animation/SMILTimeContainer.h:
        (WebCore::SMILTimeContainer::create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31913 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebCore:
hyatt@apple.com [Tue, 15 Apr 2008 18:15:06 +0000 (18:15 +0000)]
WebCore:

2008-04-15  Anatoli Papirovski  <apapirovski@mac.com>

        Reviewed by hyatt

        [CSS1, CSS3] Fixed the background-origin calculation for root elements
        (background-size and background-position are affected), r10794
        [CSS3] Fixed the background-size transformation where width is specified in percentage and height is left to auto

        Test: fast/backgrounds/background-origin-root-element.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::calculateBackgroundSize):
        (WebCore::RenderBox::calculateBackgroundImageGeometry):

LayoutTests:

2008-04-15  Anatoli Papirovski  <apapirovski@mac.com>

        Reviewed by hyatt

        Added test case for background-origin calculation on root elements
        (background-repeat and background-size), r10794 [CSS1 + CSS3]

        * fast/backgrounds/background-origin-root-element.html: Added.
        * platform/mac/fast/backgrounds/background-origin-root-element-expected.checksum: Added.
        * platform/mac/fast/backgrounds/background-origin-root-element-expected.png: Added.
        * platform/mac/fast/backgrounds/background-origin-root-element-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31912 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-15 Brady Eidson <beidson@apple.com>
beidson@apple.com [Tue, 15 Apr 2008 17:54:18 +0000 (17:54 +0000)]
2008-04-15  Brady Eidson  <beidson@apple.com>

        Reviewed by John Sullivan

        Do a more complete job adding the "WebArchiveDebugMode" pref

        * WebView/WebPreferences.m: Add both getter *and* setter
        (-[WebPreferences webArchiveDebugModeEnabled]):
        (-[WebPreferences setWebArchiveDebugModeEnabled:]):
        * WebView/WebPreferencesPrivate.h:

        * WebView/WebView.mm:
        (-[WebView _preferencesChangedNotification:]): Call the renamed getter

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31911 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoFixes the regression where the error and warning counts did not show up in the Resources
timothy@apple.com [Tue, 15 Apr 2008 17:24:22 +0000 (17:24 +0000)]
Fixes the regression where the error and warning counts did not show up in the Resources
sidebar next to resources.

https://bugs.webkit.org/show_bug.cgi?id=18494

Reviewed by Adam Roben.

* page/inspector/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.addMessageToResource): Increment errors or warnings
on the resource. Set the bubbleText to the total of the errors and warnings. Add a error
or warning class to the bubble.
(WebInspector.ResourcesPanel.prototype.clearMessages): Zero out the errors and warnings
properties on each resource. Set the bubbleText back to an empty string.
* page/inspector/SidebarTreeElement.js:
(WebInspector.SidebarTreeElement): Create a statusElement.
(WebInspector.SidebarTreeElement.prototype.get bubbleText): Return _bubbleText.
(WebInspector.SidebarTreeElement.prototype.set bubbleText): Create bubbleElement if needed.
Assign the value to _bubbleText and bubbleElement.textContent.
(WebInspector.SidebarTreeElement.prototype.onattach): Append statusElement to _listItemNode.
* page/inspector/inspector.css: Style rules for bubbles and status elements.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31910 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoFixes the regression where error and warning bubbles would not be added
timothy@apple.com [Tue, 15 Apr 2008 17:24:09 +0000 (17:24 +0000)]
Fixes the regression where error and warning bubbles would not be added
to the source view of a resource.

https://bugs.webkit.org/show_bug.cgi?id=18495

Reviewed by Adam Roben.

* css/view-source.css:
(.webkit-html-message-bubble): Add a min-height to make sure the border-radius
has enough room to apply.
* page/inspector/Console.js:
(WebInspector.Console.prototype.addMessage): Removed code that added messages
to resource panels and incremented error and warning counts on resources.
Now just call ResourcesPanel.addMessageToResource after assigning the resource
to the console message.
(WebInspector.Console.prototype.clearMessages): Removed code that cleared error
and warning counts from resources an call ResourcesPanel.clearMessages.
* page/inspector/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.addMessageToResource): Call addMessage
on the resource's view, if it is implemented.
(WebInspector.ResourcesPanel.prototype.clearMessages): Call clearMessages
on all the resource views for the ones that implement it.
(WebInspector.ResourcesPanel.prototype.refreshResource): Call _resourceView
to make the resource's view if needed. Use a local view variable.
(WebInspector.ResourcesPanel.prototype._resourceView): Added helper function
to create a resource view if needed.
* page/inspector/SourceView.js:
(WebInspector.SourceView.prototype.setupSourceFrameIfNeeded): Delete the
_frameNeedsSetup property at the beginning to prevent recursion. Get the
length of the messages array when assigning the local length variable.
(WebInspector.SourceView.prototype.addMessage): Renamed from addMessageToSource.
(WebInspector.SourceView.prototype.clearMessages): Added. Clear all the message
bubbles that might be sprinkled in the source. Also clears the messages array.
(WebInspector.SourceView.prototype._addMessageToSource): Create the image
element in the Inspector's document so we can use relative image URLs. Then
adopt the image element into the frame's document.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31909 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebCore:
beidson@apple.com [Tue, 15 Apr 2008 17:07:58 +0000 (17:07 +0000)]
WebCore:

2008-04-15  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders

        Hook up event dispatching for window.localStorage changes.

        Tests: storage/domstorage/localstorage/enumerate-storage.html
               storage/domstorage/localstorage/iframe-events.html
               storage/domstorage/localstorage/index-get-and-set.html
               storage/domstorage/localstorage/onstorage-attribute-markup.html
               storage/domstorage/localstorage/onstorage-attribute-setattribute.html
               storage/domstorage/localstorage/simple-events.html
               storage/domstorage/localstorage/simple-usage.html
               storage/domstorage/localstorage/window-open.html

        * storage/LocalStorage.cpp:
        (WebCore::LocalStorage::dispatchStorageEvent): Walk every Page in the PageGroup, adding
          each Frame that matches the storage area's security origin to a Vector.  Then dispatch
          the StorageEvent to each Frame in the Vector

        * storage/SessionStorage.cpp:
        (WebCore::SessionStorage::dispatchStorageEvent): Adopt the technique used in LocalStorage,
          which is to only add the Frames to the Vector if their security origin matches

LayoutTests:

2008-04-15  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders

        Hook up event dispatching for window.localStorage changes.
        Now a meaningful LayoutTest suite can be landed for window.localStorage.

        * storage/domstorage/localstorage/enumerate-storage-expected.txt: Added.
        * storage/domstorage/localstorage/enumerate-storage.html: Added.
        * storage/domstorage/localstorage/iframe-events-expected.txt: Added.
        * storage/domstorage/localstorage/iframe-events.html: Added.
        * storage/domstorage/localstorage/index-get-and-set-expected.txt: Added.
        * storage/domstorage/localstorage/index-get-and-set.html: Added.
        * storage/domstorage/localstorage/onstorage-attribute-markup-expected.txt: Added.
        * storage/domstorage/localstorage/onstorage-attribute-markup.html: Added.
        * storage/domstorage/localstorage/onstorage-attribute-setattribute-expected.txt: Added.
        * storage/domstorage/localstorage/onstorage-attribute-setattribute.html: Added.
        * storage/domstorage/localstorage/resources: Added.
        * storage/domstorage/localstorage/resources/clearLocalStorage.js: Added.
        * storage/domstorage/localstorage/resources/iframe-events-second.html: Added.
        * storage/domstorage/localstorage/resources/window-open-second.html: Added.
        * storage/domstorage/localstorage/simple-events-expected.txt: Added.
        * storage/domstorage/localstorage/simple-events.html: Added.
        * storage/domstorage/localstorage/simple-usage-expected.txt: Added.
        * storage/domstorage/localstorage/simple-usage.html: Added.
        * storage/domstorage/localstorage/window-open-expected.txt: Added.
        * storage/domstorage/localstorage/window-open.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31908 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoAriya Hidayat <ariya.hidayat@trolltech.com>
hausmann@webkit.org [Tue, 15 Apr 2008 11:51:38 +0000 (11:51 +0000)]
Ariya Hidayat  <ariya.hidayat@trolltech.com>

fix potential crash when loading image(s)

Crash may occur. If compiled with 4.3, the variable is not initialized.
This fix solves https://bugs.webkit.org/show_bug.cgi?id=17174

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31907 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoSimon Hausmann <hausmann@webkit.org>
hausmann@webkit.org [Tue, 15 Apr 2008 10:51:24 +0000 (10:51 +0000)]
Simon Hausmann <hausmann@webkit.org>

Update the micro focus for input methods as soon as the composition mode changes
or the caret/selection changes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31906 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoSimon Hausmann <hausmann@webkit.org>
hausmann@webkit.org [Tue, 15 Apr 2008 10:51:08 +0000 (10:51 +0000)]
Simon Hausmann <hausmann@webkit.org>

Don't use QDir, QString or any locale sensitive function before constructing Q(Core)Application,
it yields undefined behaviour or wrong default codec initialization.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31905 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoOlivier Goffart <ogoffart@trolltech.com>
hausmann@webkit.org [Tue, 15 Apr 2008 10:50:54 +0000 (10:50 +0000)]
Olivier Goffart <ogoffart@trolltech.com>

Fixes: copy to clipboard when selecting, and paste when clicking with the middle button

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31904 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoMichael Brasser <michael.brasser@trolltech.com>
hausmann@webkit.org [Tue, 15 Apr 2008 10:29:15 +0000 (10:29 +0000)]
Michael Brasser <michael.brasser@trolltech.com>

Add basic input method support.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31903 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoSimon Hausmann <hausmann@webkit.org>
hausmann@webkit.org [Tue, 15 Apr 2008 10:28:55 +0000 (10:28 +0000)]
Simon Hausmann <hausmann@webkit.org>

Added (QWebFrame|QWebView)::textZoomFactor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31902 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoMichael Brasser <michael.brasser@trolltech.com>
hausmann@webkit.org [Tue, 15 Apr 2008 10:28:37 +0000 (10:28 +0000)]
Michael Brasser <michael.brasser@trolltech.com>

Added simple scrolling API to QWebFrame.

The intent is that it works similar to QAbstractScrollArea.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31901 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoOlivier Goffart <ogoffart@trolltech.com>
hausmann@webkit.org [Tue, 15 Apr 2008 10:12:57 +0000 (10:12 +0000)]
Olivier Goffart <ogoffart@trolltech.com>

Fixes: implement the OpenFrameInNewWindow action.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31900 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoFix compilation with Qt namespaces
hausmann@webkit.org [Tue, 15 Apr 2008 09:40:59 +0000 (09:40 +0000)]
Fix compilation with Qt namespaces

Qt can be configured to have all of its classes inside a specified namespaces.
This is for example used in plugin/component environments like Eclipse.

This change makes it possible to let the Qt port compile against a namespaced
Qt by the use of macros Qt provides to properly forward declare Qt classes in
the namespace.

Signed-off-by: Simon
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31899 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-14 Brady Eidson <beidson@apple.com>
beidson@apple.com [Tue, 15 Apr 2008 00:47:39 +0000 (00:47 +0000)]
2008-04-14  Brady Eidson  <beidson@apple.com>

        Fix up a recent Changelog comment that I never updated

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31894 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebCore:
beidson@apple.com [Tue, 15 Apr 2008 00:45:03 +0000 (00:45 +0000)]
WebCore:

2008-04-14  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders

        Lay the underpinnings for LocalStorage.

        For now, this just exposes window.localStorage to the dom which returns an in-memory Storage object, much
        like SessionStorage.  The primary difference at this point is that the object returned is shared globally,
        and isn't copied for new top-level browsing contexts like SessionStorage.

        Later, I'll add proper event dispatch and a persistent storage backing.

        * GNUmakefile.am:
        * WebCore.base.exp:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::mark): Mark the optionalLocalStorage

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::clear):
        (WebCore::DOMWindow::localStorage):
        * page/DOMWindow.h:
        (WebCore::DOMWindow::optionalLocalStorage):

        * storage/LocalStorage.cpp: Added.
        (WebCore::LocalStorage::sharedLocalStorage):
        (WebCore::LocalStorage::LocalStorage):
        (WebCore::LocalStorage::storageArea):
        (WebCore::LocalStorage::itemChanged):
        (WebCore::LocalStorage::itemRemoved):
        (WebCore::LocalStorage::dispatchStorageEvent):
        * storage/LocalStorage.h: Added.

        * storage/SessionStorage.cpp: Refactor to use the client interface for event dispatching for sessionStorage objects
        (WebCore::SessionStorage::SessionStorage):
        (WebCore::SessionStorage::copy):
        (WebCore::SessionStorage::storageArea):
        (WebCore::SessionStorage::itemChanged):
        (WebCore::SessionStorage::itemRemoved):
        (WebCore::SessionStorage::dispatchStorageEvent):
        * storage/SessionStorage.h:

        * storage/StorageArea.cpp: Add a client parameter, and call to the client when an item is changed or removed.
        (WebCore::StorageArea::create):
        (WebCore::StorageArea::StorageArea):
        (WebCore::StorageArea::copy):
        (WebCore::StorageArea::setItem):
        (WebCore::StorageArea::removeItem):
        (WebCore::StorageArea::setClient):
        * storage/StorageArea.h:
        (WebCore::StorageArea::page):
        (WebCore::StorageArea::securityOrigin):

        * storage/StorageAreaClient.h: Added.  Break out "itemChanged" and "itemRemoved" to a StorageAreaClient
          This way, both SessionStorage and LocalStorage areas can have different behavior on changes with
          that behavior managed from a central location.
        (WebCore::StorageAreaClient::~StorageAreaClient):
        (WebCore::StorageAreaClient::StorageAreaClient):
        (WebCore::StorageAreaClient::itemChanged):
        (WebCore::StorageAreaClient::itemRemoved):

LayoutTests:

2008-04-14  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders

        As underpinnings for LocalStorage are laid, it is exposed to the dom - update the relevant layout tests.

        * fast/dom/Window/window-properties-expected.txt:
        * storage/domstorage/window-attributes-exist-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31893 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebCore:
beidson@apple.com [Tue, 15 Apr 2008 00:40:33 +0000 (00:40 +0000)]
WebCore:

2008-04-14  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders

        Add a hidden pref to debug WebArchive loading.  With this pref on, when loading a WebArchive,
        if the resource isn't in the ArchiveResourceCollection, the loader will not fall back to the
        network and will instead fail the load as "cancelled."

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::load): Do the check here.

        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        (WebCore::Settings::setWebArchiveDebugModeEnabled):
        * page/Settings.h:
        (WebCore::Settings::webArchiveDebugModeEnabled):

WebKit/mac:

2008-04-14  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders

        Add a hidden pref to debug WebArchive loading.  With this pref on, when loading a WebArchive,
        if the resource isn't in the ArchiveResourceCollection, the loader will not fall back to the
        network and will instead fail the load as "cancelled."

        * WebView/WebPreferenceKeysPrivate.h:

        * WebView/WebPreferences.m:
        (+[WebPreferences initialize]):
        (-[WebPreferences _webArchiveDebugModeEnabled]):
        * WebView/WebPreferencesPrivate.h:

        * WebView/WebView.mm:
        (-[WebView _preferencesChangedNotification:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31892 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-14 Antti Koivisto <antti@apple.com>
antti@apple.com [Mon, 14 Apr 2008 23:55:19 +0000 (23:55 +0000)]
2008-04-14  Antti Koivisto  <antti@apple.com>

        Reviewed by Eric.

        Some preparations for additive animations and animations in <use>.
        - Disallow animation elements in instance trees.
        - Fix buggy SVGUseElement::removeDisallowedElementsFromSubtree(), make it
          public and static
        - Invoke it from SVGElementInstance::updateInstance() to clean up the instance tree
          there as well.
        - Add mechanism for blocking instance updates when an animation changes
          the referenced tree.

        The added assert in SVGSMILElement::insertedIntoDocument() verifies the fixes
        with the existing test cases.

        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler):
        * svg/SVGElementInstance.cpp:
        (WebCore::SVGElementInstance::updateInstance):
        * svg/SVGStyledElement.cpp:
        (WebCore::SVGStyledElement::updateElementInstance):
        (WebCore::SVGStyledElement::setInstanceUpdatesBlocked):
        * svg/SVGStyledElement.h:
        * svg/SVGUseElement.cpp:
        (WebCore::isDisallowedElement):
        (WebCore::SVGUseElement::removeDisallowedElementsFromSubtree):
        * svg/SVGUseElement.h:
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::insertedIntoDocument):
        (WebCore::SVGSMILElement::isSMILElement):
        (WebCore::SVGSMILElement::connectConditions):
        (WebCore::SVGSMILElement::disconnectConditions):
        * svg/animation/SVGSMILElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31891 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Don't let the inspected page overwrite properties of JS objects in the Inspector
aroben@apple.com [Mon, 14 Apr 2008 23:46:40 +0000 (23:46 +0000)]
    Don't let the inspected page overwrite properties of JS objects in the Inspector

        <https://bugs.webkit.org/show_bug.cgi?id=16011>
        <rdar://problem/5604409>

        <https://bugs.webkit.org/show_bug.cgi?id=16837>
        <rdar://problem/5813850>

        Reviewed by Sam Weinig and Geoff Garen.

        Tests (contributed by Adam Barth and Collin Jackson):
        manual-tests/inspector-wrappers

        * GNUmakefile.am:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        Added new files to the projects.

        * bindings/js/JSQuarantinedObjectWrapper.cpp: Added.
        (WebCore::):
        (WebCore::JSQuarantinedObjectWrapper::asWrapper): Converts a JSValue
        into a JSQuarantinedObjectWrapper, if the JSValue is in fact a
        JSQuarantinedObjectWrapper.
        (WebCore::JSQuarantinedObjectWrapper::cachedValueGetter): Callback to
        be used with PropertySlot.
        (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
        Hold onto the object we're wrapping and its global object. Pass the
        wrapped prototype up to the JSObject constructor.
        (WebCore::JSQuarantinedObjectWrapper::~JSQuarantinedObjectWrapper):
        (WebCore::JSQuarantinedObjectWrapper::unwrappedExecStateMatches):
        Returns true if our underlying object originated from the same global
        object as the passed-in ExecState.
        (WebCore::JSQuarantinedObjectWrapper::unwrappedExecState):
        (WebCore::JSQuarantinedObjectWrapper::transferExceptionToExecState):
        Wraps and moves an exception from our underlying ExecState to the
        passed-in one.
        (WebCore::JSQuarantinedObjectWrapper::mark): Marks ourselves and the
        objects we're holding references to.

        (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot):
        (WebCore::JSQuarantinedObjectWrapper::put):
        (WebCore::JSQuarantinedObjectWrapper::deleteProperty):
        (WebCore::JSQuarantinedObjectWrapper::implementsConstruct):
        (WebCore::JSQuarantinedObjectWrapper::construct):
        (WebCore::JSQuarantinedObjectWrapper::implementsHasInstance):
        (WebCore::JSQuarantinedObjectWrapper::hasInstance):
        (WebCore::JSQuarantinedObjectWrapper::implementsCall):
        (WebCore::JSQuarantinedObjectWrapper::callAsFunction):
        (WebCore::JSQuarantinedObjectWrapper::getPropertyNames):
        JSObject overrides. These each check the appropriate permission before
        allowing the call to proceed. We wrap all outgoing values using
        m_wrapOutgoingValue, and we prepare all incoming values with the
        virtual prepareIncomingValue function. If an exception is raised when
        calling the underlying object, we transfer the exception in wrapped
        form to the passed-in ExecState.

        * bindings/js/JSQuarantinedObjectWrapper.h: Added.
        (WebCore::JSQuarantinedObjectWrapper::unwrappedObject):
        (WebCore::JSQuarantinedObjectWrapper::className): We return the
        underlying object's class name so that we can successfully masquerade
        as that underlying object when, e.g., Object.prototype.toString is
        called on us.
        (WebCore::JSQuarantinedObjectWrapper::classInfo):

        (WebCore::JSQuarantinedObjectWrapper::allowsGetProperty):
        (WebCore::JSQuarantinedObjectWrapper::allowsSetProperty):
        (WebCore::JSQuarantinedObjectWrapper::allowsDeleteProperty):
        (WebCore::JSQuarantinedObjectWrapper::allowsConstruct):
        (WebCore::JSQuarantinedObjectWrapper::allowsHasInstance):
        (WebCore::JSQuarantinedObjectWrapper::allowsCallAsFunction):
        (WebCore::JSQuarantinedObjectWrapper::allowsGetPropertyNames):
        These virtual methods let subclasses define the allowed operations on
        the wrapped object. By default all operations are disabled.

        * bindings/js/JSInspectedObjectWrapper.cpp: Added. This subclass of
        JSQuarantinedObjectWrapper is used to wrap objects from the inspected
        page being passed to the Inspector.
        (WebCore::wrappers):
        (WebCore::):
        (WebCore::JSInspectedObjectWrapper::wrap): Wraps the passed-in object
        if needed and returns the wrapper. If this object has been wrapped
        previously we'll return the old wrapper rather than make a new one.
        (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper): Add
        ourselves to the wrapper map.
        (WebCore::JSInspectedObjectWrapper::~JSInspectedObjectWrapper): Remove
        ourselves from the wrapper map.
        (WebCore::JSInspectedObjectWrapper::prepareIncomingValue): Ensure that
        any objects passed to the inspected object are either wrappers around
        objects from the inspected page (in which case we unwrap them so that
        the inspected page never sees the wrapper), or wrapped callbacks from
        the Inspector.
        * bindings/js/JSInspectedObjectWrapper.h: Added.
        (WebCore::JSInspectedObjectWrapper::classInfo):
        (WebCore::JSInspectedObjectWrapper::allowsGetProperty):
        (WebCore::JSInspectedObjectWrapper::allowsSetProperty):
        (WebCore::JSInspectedObjectWrapper::allowsDeleteProperty):
        (WebCore::JSInspectedObjectWrapper::allowsConstruct):
        (WebCore::JSInspectedObjectWrapper::allowsHasInstance):
        (WebCore::JSInspectedObjectWrapper::allowsCallAsFunction):
        (WebCore::JSInspectedObjectWrapper::allowsGetPropertyNames):
        These all return true so that the Inspector can use objects from the
        inspected page however it needs.
        (WebCore::JSInspectedObjectWrapper::wrapOutgoingValue): Wrap all
        outgoing values as JSInspectedObjectWrappers.

        * bindings/js/JSInspectorCallbackWrapper.cpp: Added. This subclass of
        JSQuarantinedObjectWrapper is used to wrap callbacks that the
        Inspector passes to the inspected page (e.g., for event listeners or
        client-side storage callbacks).
        (WebCore::wrappers):
        (WebCore::):
        (WebCore::JSInspectorCallbackWrapper::wrap): Wraps the passed-in
        object if needed and returns the wrapper. If this object has been
        wrapped previously we'll return the old wrapper rather than make a new
        one.
        (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper): Add
        ourselves to the wrapper map.
        (WebCore::JSInspectorCallbackWrapper::~JSInspectorCallbackWrapper):
        Remove ourselves from the wrapper map.
        (WebCore::JSInspectorCallbackWrapper::prepareIncomingValue): Ensure
        that values passed from the inspected page to an Inspector callback
        are wrapped in JSInspectedObjectWrappers. We also allow the inspected
        page to pass ourselves in (which will happen in the case of a
        client-side storage callback, where the callback itself is passed as
        the `this` object). In this case we unwrap ourselves so that the
        Inspector doesn't have to deal with the wrapper.
        * bindings/js/JSInspectorCallbackWrapper.h: Added.
        (WebCore::JSInspectorCallbackWrapper::classInfo):
        (WebCore::JSInspectorCallbackWrapper::allowsCallAsFunction):
        This is the only allowed operation on a JSInspectorCallbackWrapper.
        (WebCore::JSInspectorCallbackWrapper::wrapOutgoingValue): Wrap all
        outgoing values as JSInspectorCallbackWrappers.

        * page/InspectorController.cpp:
        (WebCore::getResourceDocumentNode): Wrap the Document before passing
        it to the Inspector.
        (WebCore::highlightDOMNode): Unwrap the Node that the Inspector passed
        to us.
        (WebCore::databaseTableNames): Unwrap the Database that the Inspector
        passed to us.
        (WebCore::inspectedWindow): Wrap the Window before passing it to the
        Inspector.
        (WebCore::InspectorController::focusNode): Wrap the Node before
        passing it to the Inspector.
        (WebCore::wrapCallback): Wraps the passed-in callback in a
        JSInspectorCallbackWrapper.
        (WebCore::InspectorController::addDatabaseScriptResource): Wrap the
        Database beore pasing it to the Inspector.
        (WebCore::InspectorController::windowScriptObjectAvailable): Add the
        new wrapCallback function to the InspectorController JS object.

        * page/inspector/ElementsPanel.js:
        (WebInspector.ElementsPanel.reset): Wrap the contentLoaded callback.

        * page/inspector/DatabaseQueryView.js:
        (WebInspector.DatabaseQueryView._enterKeyPressed):
        * page/inspector/DatabaseTableView.js:
        (WebInspector.DatabaseTableView.update):
        Pass null instead of an empty array to executeSql since we're no
        longer allowed to pass any unwrapped objects to the inspected page.
        We now wrap all callbacks being passed to the inspected page using
        InspectorController.wrapCallback.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31890 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Use prototypes/constructors from the inspected page when operating on objects...
aroben@apple.com [Mon, 14 Apr 2008 23:45:37 +0000 (23:45 +0000)]
    Use prototypes/constructors from the inspected page when operating on objects from the inspected page

        Reviewed by Tim Hatcher.

        * page/inspector/Console.js:
        (WebInspector.ConsolePanel._format): Use the Node constructor from the
        inspected Window with the instanceof operator.
        * page/inspector/ElementsPanel.js:
        (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Use the
        Element prototype from the inspected Window instead of the Element
        prototype from this Window.
        * page/inspector/inspector.js:
        (WebInspector.performSearch): Ditto for Document prototype.
        * page/inspector/utilities.js:
        (Object.type): Now takes an optional Window parameter that is used to
        find the built-in constructors.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31889 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Don't store objects from the Inspector on CSSStyleRules from the inspected...
aroben@apple.com [Mon, 14 Apr 2008 23:45:00 +0000 (23:45 +0000)]
    Don't store objects from the Inspector on CSSStyleRules from the inspected page

        Reviewed by Tim Hatcher.

        * page/inspector/StylesSidebarPane.js:
        (WebInspector.StylesSidebarPane.update): Don't store raw CSSStyleRules
        from the inspected page in the styleRules array. Instead, always use a
        wrapper object. This will keep us from setting Inspector objects as
        properties of inspected objects.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31888 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoFixes a regression where clicking a resource URL in the Console would not
timothy@apple.com [Mon, 14 Apr 2008 22:47:03 +0000 (22:47 +0000)]
Fixes a regression where clicking a resource URL in the Console would not
show the resource in the Resources panel.

https://bugs.webkit.org/show_bug.cgi?id=18493

Reviewed by Adam Roben.

* page/inspector/Console.js:
(WebInspector.Console.prototype._messagesClicked): Removed console-message-url
handling to show resources. This is now handled by WebInspector.showResourceForURL.
(WebInspector.ConsoleMessage.prototype.toMessageElement): Add the webkit-html-resource-link
class name to the URL anchor. Also add the line number as a property to the anchor.
* page/inspector/ResourcesPanel.js:
(WebInspector.ResourcesPanel): Add a reference to the tree element to each calculator.
(WebInspector.ResourcesPanel.prototype.showResource): Select and reveal the resource in
the sidebar. Call showLine on the resource view if it is implemented.
(WebInspector.ResourcesPanel.prototype.closeVisibleResource): Select the current calculator's
tree element in the sidebar.
(WebInspector.ResourcesPanel.prototype._graphSelected): Call closeVisibleResource after
the calculator changes since closeVisibleResource uses the calculator.
* page/inspector/SourceView.js:
(WebInspector.SourceView.prototype.sourceRow): Early return if the line is null/zero.
(WebInspector.SourceView.prototype.showLine):  Renamed from showSourceLine.
* page/inspector/inspector.css:
(body.console-visible #main-panels): Made the bottom 24px to match
the height of #main-status-bar.
(.console-message-url): Make the color important so it wins over
the .webkit-html-resource-link rule.
(.resource-view .resource-view-content): Made more generic from .image
so all resource views get sized correctly.
(.resource-view.image .resource-view-content): Removed.
* page/inspector/inspector.js:
(WebInspector.documentClick): Pass the line number from the anchor to
WebInspector.showResourceForURL.
(WebInspector.showResourceForURL): Add line number support. Pass the line
to ResourcesPanel.showResource.
(WebInspector.addMainEventListeners): Use bind for the event listeners.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31885 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-14 Xan Lopez <xan@gnome.org>
alp@webkit.org [Mon, 14 Apr 2008 20:18:18 +0000 (20:18 +0000)]
2008-04-14  Xan Lopez  <xan@gnome.org>

        Reviewed by Alp Toker.

        http://bugs.webkit.org/show_bug.cgi?id=17917
        Bug 17917: Cookie support for HTTP soup backend

        Initial implementation of cookies for the http soup backend.

        Moved CookieJarGtk to CookieJarSoup in network/soup and left the original
        one as CookieJarCurl in network/curl.

        Bumped the libsoup required version to 2.23 for cookie support.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31878 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2008-04-14 Holger Freyther <zecke@selfish.org>
alp@webkit.org [Mon, 14 Apr 2008 20:06:02 +0000 (20:06 +0000)]
2008-04-14  Holger Freyther  <zecke@selfish.org>

        Reviewed by Alp Toker.

        https://bugs.webkit.org/show_bug.cgi?id=18411
        Enable Page caching and create FrameViews on the fly

        Create the FrameView on the fly and cache pages

        - Keep a copy of the GtkAdjustment to be able to reuse it for the
          FrameViews
        - Do not initially create a FrameView and update the WebKit code to
          cope with not having a view.
        - Cache seven pages by default.

        * platform/gtk/ScrollViewGtk.cpp:
        (WebCore::ScrollView::setGtkAdjustments):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31877 268f45cc-cd09-0410-ab3c-d52691b4dbfc