cwzwarich@webkit.org [Wed, 3 Sep 2008 02:46:47 +0000 (02:46 +0000)]
2008-09-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Not reviewed.
Remove a local change that was accidentally committed in r36034.
* resources/sunspider-standalone-driver.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36035
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Wed, 3 Sep 2008 02:42:22 +0000 (02:42 +0000)]
2008-09-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver Hunt.
Tests for bug 17936: "ASSERTION FAILED: false" (GetterSetterImp::toObject is called)
<https://bugs.webkit.org/show_bug.cgi?id=17936>
This bug was fixed by the rewrite of much of the code handling getters
and setters in r36016, the revision that introduced the polymorphic
inline cache.
* fast/js/delete-getters-setters-expected.txt: Added.
* fast/js/delete-getters-setters.html: Added.
* fast/js/resources/delete-getters-setters.js: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36034
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren@apple.com [Wed, 3 Sep 2008 02:39:09 +0000 (02:39 +0000)]
2008-09-02 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Changed jsDriver.pl to dump the exact text you would need in order to
reproduce a test result. This enables a fast workflow where you copy
and paste a test failure in the terminal.
* tests/mozilla/jsDriver.pl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36033
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren@apple.com [Wed, 3 Sep 2008 02:31:45 +0000 (02:31 +0000)]
JavaScriptCore:
2008-09-02 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Implemented the rest of Darin's review comments for the 09-01 inline
caching patch.
SunSpider says 0.5% faster, but that seems like noise.
* JavaScriptCore.xcodeproj/project.pbxproj: Put PutPropertySlot into
its own file, and added BatchedTransitionOptimizer.
* VM/CodeBlock.cpp:
(KJS::CodeBlock::~CodeBlock): Use array indexing instead of a pointer
iterator.
* VM/CodeGenerator.cpp:
(KJS::CodeGenerator::CodeGenerator): Used BatchedTransitionOptimizer to
make batched put and remove for declared variables fast, without forever
pessimizing the global object. Removed the old getDirect/removeDirect hack
that tried to do the same in a more limited way.
* VM/CodeGenerator.h: Moved IdentifierRepHash to the KJS namespace since
it doesn't specialize anything in WTF.
* VM/Machine.cpp:
(KJS::Machine::Machine): Nixed the DummyConstruct tag because it was
confusingly named.
(KJS::Machine::execute): Used BatchedTransitionOptimizer, as above. Fixed
up some comments.
(KJS::cachePrototypeChain): Cast to JSObject*, since it's more specific.
(KJS::Machine::tryCachePutByID): Use isNull() instead of comparing to
jsNull(), since isNull() leaves more options open for the future.
(KJS::Machine::tryCacheGetByID): ditto
(KJS::Machine::privateExecute): ditto
* VM/SamplingTool.cpp:
(KJS::SamplingTool::dump): Use C++-style cast, to match our style
guidelines.
* kjs/BatchedTransitionOptimizer.h: Added. New class that allows host
code to add a batch of properties to an object in an efficient way.
* kjs/JSActivation.cpp: Use isNull(), as above.
* kjs/JSArray.cpp: Get rid of DummyConstruct tag, as above.
* kjs/JSArray.h:
* kjs/JSGlobalData.cpp: Nixed two unused StructureIDs.
* kjs/JSGlobalData.h:
* kjs/JSImmediate.cpp: Use isNull(), as above.
* kjs/JSObject.cpp:
(KJS::JSObject::mark): Moved mark tracing code elsewhere, to make this
function more readable.
(KJS::JSObject::put): Use isNull(), as above.
(KJS::JSObject::createInheritorID): Return a raw pointer, since the
object is owned by a data member, not necessarily the caller.
* kjs/JSObject.h:
* kjs/JSString.cpp: Use isNull(), as above.
* kjs/PropertyMap.h: Updated to use PropertySlot::invalidOffset.
* kjs/PropertySlot.h: Changed KJS_INVALID_OFFSET to WTF::notFound
because C macros are so 80's.
* kjs/PutPropertySlot.h: Added. Split out of PropertySlot.h. Also renamed
PutPropertySlot::SlotType to PutPropertySlot::Type, and slotBase to base,
since "slot" was redundant.
* kjs/StructureID.cpp: Added a new transition *away* from dictionary
status, to support BatchedTransitionOptimizer.
(KJS::StructureIDChain::StructureIDChain): No need to store m_size as
a data member, so keep it in a local, which might be faster.
* kjs/StructureID.h:
* kjs/SymbolTable.h: Moved IdentifierRepHash to KJS namespace, as above.
* kjs/ustring.h:
JavaScriptGlue:
2008-09-02 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Implemented the rest of Darin's review comments for the 09-01 inline
caching patch.
* ForwardingHeaders/kjs/PutPropertySlot.h: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36032
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Wed, 3 Sep 2008 01:32:14 +0000 (01:32 +0000)]
2008-09-02 Chris Marrin <cmarrin@apple.com>
Reviewed by Dave Hyatt.
AnimationController.cpp should be split into separate files
https://bugs.webkit.org/show_bug.cgi?id=20604
Note: All makefiles, except WebCore.xcodeproj have been changed without testing, upon
recommendation of Dave Hyatt.
* GNUmakefile.am:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* WebCoreSources.bkl:
Build files.
* page/AnimationController.cpp: Removed.
* page/AnimationController.h: Removed.
* page/animation: Added.
* page/animation/AnimationBase.cpp: Added.
* page/animation/AnimationBase.h: Added.
* page/animation/AnimationController.cpp: Copied from WebCore/page/AnimationController.cpp.
* page/animation/AnimationController.h: Copied from WebCore/page/AnimationController.h.
* page/animation/CompositeAnimation.cpp: Added.
* page/animation/CompositeAnimation.h: Added.
* page/animation/ImplicitAnimation.cpp: Added.
* page/animation/ImplicitAnimation.h: Added.
* page/animation/KeyframeAnimation.cpp: Added.
* page/animation/KeyframeAnimation.h: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36031
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Wed, 3 Sep 2008 00:57:37 +0000 (00:57 +0000)]
- release build fix
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::calculateDrawingMode):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36030
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Tue, 2 Sep 2008 21:35:02 +0000 (21:35 +0000)]
Make console functions log the correct resource URL and
line number for where the call originated.
https://bugs.webkit.org/show_bug.cgi?id=17234
<rdar://problem/5732837>
Reviewed by Kevin McCullough.
Test: manual-tests/inspector/console-call-line-numbers.html
* bindings/js/JSConsoleCustom.cpp:
(WebCore::JSConsole::count): Call the impl.
(WebCore::JSConsole::timeEnd): Ditto.
* manual-tests/inspector/console-call-line-numbers.html: Added.
* manual-tests/inspector/resources/script-console-calls.js: Added.
* page/Console.cpp:
(WebCore::retrieveLastCaller): Helper to get the URL and line.
(WebCore::Console::error): Call retrieveLastCaller to get the URL and
line number to pass to addMessageToConsole.
(WebCore::Console::info): Ditto.
(WebCore::Console::log): Ditto.
(WebCore::Console::assertCondition): Ditto.
(WebCore::Console::count): Ditto.
(WebCore::Console::timeEnd): Ditto.
(WebCore::Console::warn): Ditto.
* page/Console.h:
* page/Console.idl: Make count and timeEnd custom.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36029
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Tue, 2 Sep 2008 21:30:26 +0000 (21:30 +0000)]
Removed IDL files from WebCore's framework resources.
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36028
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Tue, 2 Sep 2008 21:11:32 +0000 (21:11 +0000)]
2008-09-02 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Rubber-stamped by Oliver Hunt.
Make SunSpider work with JavaScript shells that don't take filenames
after a '-f' argument.
* sunspider:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36027
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Tue, 2 Sep 2008 20:39:29 +0000 (20:39 +0000)]
Reviewed by Dave Hyatt.
- <rdar://problem/5681647> pages at http://www.stendmarsofa.com/ are so slow to calculate style it seems like a hang
* html/HTMLParser.cpp:
(WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Added a
cap on the number of consecutive identical residual style tags to
reopen.
(WebCore::HTMLParser::popBlock): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36026
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Tue, 2 Sep 2008 16:16:06 +0000 (16:16 +0000)]
Reviewed by Adam Roben.
A little database quota management cleanup.
* storage/OriginQuotaManager.cpp:
(WebCore::OriginQuotaManager::OriginQuotaManager):
(WebCore::OriginQuotaManager::lock):
(WebCore::OriginQuotaManager::unlock):
(WebCore::OriginQuotaManager::trackOrigin):
(WebCore::OriginQuotaManager::tracksOrigin):
(WebCore::OriginQuotaManager::addDatabase):
(WebCore::OriginQuotaManager::removeDatabase):
(WebCore::OriginQuotaManager::removeOrigin):
(WebCore::OriginQuotaManager::markDatabase):
(WebCore::OriginQuotaManager::diskUsage):
* storage/OriginQuotaManager.h:
Changed to assert that a lock is taken more directly and reliably. Removed comments about
main/background threads, as this is likely to stop being true with synchronous Database calls
being made on worker threads.
* storage/OriginUsageRecord.cpp:
(WebCore::OriginUsageRecord::OriginUsageRecord):
(WebCore::OriginUsageRecord::addDatabase):
(WebCore::OriginUsageRecord::removeDatabase):
(WebCore::OriginUsageRecord::markDatabase):
(WebCore::OriginUsageRecord::diskUsage):
* storage/OriginUsageRecord.h:
(WebCore::OriginUsageRecord::DatabaseEntry::DatabaseEntry):
Don't use a magic value for unknown. It is totally unnecessary for DatabaseEntry, and
can be replaced with a single boolean for OriginUsageRecord.
Added assertions for string parameters being unshared.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36025
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aroben@apple.com [Tue, 2 Sep 2008 15:15:21 +0000 (15:15 +0000)]
Windows build fixes
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add
StructureID.{cpp,h} to the project. Also let VS reorder this file.
* VM/CodeBlock.cpp: Include StringExtras so that snprintf will be
defined on Windows.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36024
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
abarth@webkit.org [Tue, 2 Sep 2008 04:26:15 +0000 (04:26 +0000)]
WebCore:
2008-09-01 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=19760
Make granting LoadLocalResources conditional on a policy.
* WebCore.base.exp:
* dom/Document.cpp:
(WebCore::Document::initSecurityContext):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::setLocalLoadPolicy):
(WebCore::FrameLoader::restrictAccessToLocal):
* loader/FrameLoader.h:
(WebCore::FrameLoader::):
* platform/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::grantLoadLocalResources):
* platform/SecurityOrigin.h:
WebKit/mac:
2008-09-01 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=19760
Add a linked-on-or-after check to prevent substitute data from loading
local resources on newer users of WebKit.
* Misc/WebKitVersionChecks.h:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36022
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Mon, 1 Sep 2008 23:34:13 +0000 (23:34 +0000)]
2008-09-01 Dean Jackson <dino@apple.com>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=20571
Make sure Window object can assign Animation/Transition event
listeners via attributes.
Also added a bunch of transition event tests, although
only transition-end-event-window is directly relevant to this patch.
(WebCore::JSDOMWindowBase::put):
Tests: transitions/transition-end-event-all-properties.html
transitions/transition-end-event-attributes.html
transitions/transition-end-event-container.html
transitions/transition-end-event-left.html
transitions/transition-end-event-multiple-01.html
transitions/transition-end-event-multiple-02.html
transitions/transition-end-event-multiple-03.html
transitions/transition-end-event-multiple-04.html
transitions/transition-end-event-nested.html
transitions/transition-end-event-transform.html
transitions/transition-end-event-window.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36021
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Mon, 1 Sep 2008 23:05:28 +0000 (23:05 +0000)]
2008-09-01 Dean Jackson <dino@apple.com>
Reviewed by Sam Weinig
Code styling cleanup.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::getValueProperty):
(WebCore::JSDOMWindowBase::put):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36020
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Mon, 1 Sep 2008 22:55:24 +0000 (22:55 +0000)]
2008-09-01 Sam Weinig <sam@webkit.org>
Fix release build.
* JavaScriptCore.exp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36019
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jmalonzo@webkit.org [Mon, 1 Sep 2008 22:49:26 +0000 (22:49 +0000)]
2008-09-01 Jan Michael Alonzo <jmalonzo@webkit.org>
Reviewed by Oliver Hunt.
Gtk buildfix
* GNUmakefile.am:
* kjs/PropertyMap.cpp: rename Identifier.h to identifier.h
* kjs/StructureID.cpp: include JSObject.h
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36018
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Mon, 1 Sep 2008 22:40:17 +0000 (22:40 +0000)]
2008-09-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
First cut at inline caching for access to vanilla JavaScript properties.
Updated for JavaScriptCore changes. Mostly mechanical addition of StructureIDs
to JavaScriptGlue classes, and PutPropertySlot& arguments to put functions.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36017
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Mon, 1 Sep 2008 21:22:54 +0000 (21:22 +0000)]
JavaScriptCore:
2008-09-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
First cut at inline caching for access to vanilla JavaScript properties.
SunSpider says 4% faster. Tests heavy on dictionary-like access have
regressed a bit -- we have a lot of room to improve in this area,
but this patch is over-ripe as-is.
JSCells now have a StructureID that uniquely identifies their layout,
and holds their prototype.
JSValue::put takes a PropertySlot& argument, so it can fill in details
about where it put a value, for the sake of caching.
* VM/CodeGenerator.cpp:
(KJS::CodeGenerator::CodeGenerator): Avoid calling removeDirect if we
can, since it disables inline caching in the global object. This can
probably improve in the future.
* kjs/JSGlobalObject.cpp: Nixed reset(), since it complicates caching, and
wasn't really necessary.
* kjs/JSObject.cpp: Tweaked getter / setter behavior not to rely on the
IsGetterSetter flag, since the flag was buggy. This is necessary in order
to avoid accidentally accessing a getter / setter as a normal property.
Also changed getter / setter creation to honor ReadOnly, matching Mozilla.
* kjs/PropertyMap.cpp: Nixed clear(), since it complicates caching and
isn't necessary.
* kjs/Shell.cpp: Moved SamplingTool dumping outside the loop. This allows
you to aggregate sampling of multiple files (or the same file repeatedly),
which helped me track down regressions.
* kjs/ustring.h: Moved IdentifierRepHash here to share it.
WebCore:
2008-09-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
First cut at inline caching for access to vanilla JavaScript properties.
Updated for JavaScriptCore changes. Mostly mechanical addition of StructureIDs
to WebCore classes, and PutPropertySlot& arguments to put functions.
(WebCore::JSCSSStyleDeclaration::customPut): Be sure to play nice with
inline caching for global properties, so global assignment can be optimized.
* ForwardingHeaders/kjs/StructureID.h: Added.
* bindings/js/JSDOMBinding.h:
(WebCore::DOMObject::DOMObject):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::put):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSDOMWindowCustom.h:
(WebCore::JSDOMWindow::customPut):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::JSDOMWindowShell):
(WebCore::JSDOMWindowShell::put):
* bindings/js/JSDOMWindowShell.h:
* bindings/js/JSEventTargetBase.h:
(WebCore::JSEventTargetBase::put):
* bindings/js/JSEventTargetNode.h:
(WebCore::JSEventTargetNode::put):
* bindings/js/JSHTMLAppletElementCustom.cpp:
(WebCore::JSHTMLAppletElement::customPut):
* bindings/js/JSHTMLEmbedElementCustom.cpp:
(WebCore::JSHTMLEmbedElement::customPut):
* bindings/js/JSHTMLInputElementBase.cpp:
(WebCore::JSHTMLInputElementBase::put):
* bindings/js/JSHTMLInputElementBase.h:
* bindings/js/JSHTMLObjectElementCustom.cpp:
(WebCore::JSHTMLObjectElement::customPut):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::customPut):
* bindings/js/JSInspectedObjectWrapper.cpp:
(WebCore::JSInspectedObjectWrapper::wrap):
(WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
* bindings/js/JSInspectedObjectWrapper.h:
* bindings/js/JSInspectorCallbackWrapper.cpp:
(WebCore::JSInspectorCallbackWrapper::wrap):
(WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
* bindings/js/JSInspectorCallbackWrapper.h:
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::customPut):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::runtimeObjectCustomPut):
* bindings/js/JSPluginElementFunctions.h:
* bindings/js/JSQuarantinedObjectWrapper.cpp:
(WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
(WebCore::JSQuarantinedObjectWrapper::put):
* bindings/js/JSQuarantinedObjectWrapper.h:
* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::customPut):
* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject setValue:forKey:]):
* bindings/scripts/CodeGeneratorJS.pm:
* bridge/NP_jsobject.cpp:
(_NPN_SetProperty):
* bridge/jni/jni_jsobject.mm:
(JavaJSObject::setMember):
* bridge/objc/objc_class.mm:
(KJS::Bindings::ObjcClass::fallbackObject):
* bridge/objc/objc_runtime.h:
* bridge/objc/objc_runtime.mm:
(ObjcFallbackObjectImp::ObjcFallbackObjectImp):
(ObjcFallbackObjectImp::put):
* bridge/runtime.cpp:
(KJS::Bindings::Instance::createRuntimeObject):
* bridge/runtime_array.cpp:
(RuntimeArray::put):
* bridge/runtime_array.h:
* bridge/runtime_object.cpp:
(RuntimeObjectImp::RuntimeObjectImp):
(RuntimeObjectImp::put):
* bridge/runtime_object.h:
LayoutTests:
2008-09-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
First cut at inline caching for access to vanilla JavaScript properties.
Tests for things I broke along the way.
* fast/dom/getter-on-window-object2-expected.txt:
* fast/js/pic: Added.
* fast/js/pic/cached-deleted-properties-expected.txt: Added.
* fast/js/pic/cached-deleted-properties.html: Added.
* fast/js/pic/cached-getter-dictionary-and-proto-expected.txt: Added.
* fast/js/pic/cached-getter-dictionary-and-proto.html: Added.
* fast/js/pic/cached-getter-setter-expected.txt: Added.
* fast/js/pic/cached-getter-setter.html: Added.
* fast/js/pic/cached-prototype-setter-expected.txt: Added.
* fast/js/pic/cached-prototype-setter.html: Added.
* fast/js/pic/cached-single-entry-transition-expected.txt: Added.
* fast/js/pic/cached-single-entry-transition.html: Added.
* fast/js/pic/get-empty-string-expected.txt: Added.
* fast/js/pic/get-empty-string.html: Added.
* fast/js/pic/get-set-proxy-object-expected.txt: Added.
* fast/js/pic/get-set-proxy-object.html: Added.
* fast/js/pic/rehash-poisons-structure-expected.txt: Added.
* fast/js/pic/rehash-poisons-structure.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36016
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Mon, 1 Sep 2008 19:51:33 +0000 (19:51 +0000)]
2008-09-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Eagerly allocate the Math object's numeric constants. This avoids
constantly reallocating them in loops, and also ensures that the Math
object will not use the single property optimization, which makes
properties ineligible for caching.
SunSpider reports a small speedup, in combination with inline caching.
* kjs/MathObject.cpp:
(KJS::MathObject::MathObject):
(KJS::MathObject::getOwnPropertySlot):
* kjs/MathObject.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36015
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jmalonzo@webkit.org [Mon, 1 Sep 2008 19:46:05 +0000 (19:46 +0000)]
2008-09-01 Jan Michael Alonzo <jmalonzo@webkit.org>
Gtk build fix, not reviewed.
* GNUmakefile.am: Add SmallStrings.cpp in both release and debug builds
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36014
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Mon, 1 Sep 2008 17:18:58 +0000 (17:18 +0000)]
2008-09-01 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Not reviewed.
Fix a typo in the ChangeLog for r36009.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36013
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jmalonzo@webkit.org [Mon, 1 Sep 2008 12:44:01 +0000 (12:44 +0000)]
2008-09-01 Alp Toker <alp@nuanti.com>
Reviewed by Eric Seidel.
https://bugs.webkit.org/show_bug.cgi?id=19939
[GTK] webkit_web_history_item_get_title() fails with assertion
Make sure newly constructed WebHistoryItem objects wrap a WebCore
history item when necessary. Avoid G_PARAM_CONSTRUCT since it destroys
history data -- use WEBKIT_PARAM flags instead as they do the right
thing. This restores history functionality.
Also use CString to simplify UTF-8 string management.
* webkit/webkitwebbackforwardlist.cpp:
(_WebKitWebBackForwardListPrivate::webkit_web_back_forward_list_get_forward_list_with_limit):
(_WebKitWebBackForwardListPrivate::webkit_web_back_forward_list_get_back_list_with_limit):
No need to initialize the vector with a size since it's cleared by the
callee.
* webkit/webkitwebhistoryitem.cpp:
(_WebKitWebHistoryItemPrivate::webkit_web_history_item_finalize):
(_WebKitWebHistoryItemPrivate::webkit_web_history_item_class_init):
(_WebKitWebHistoryItemPrivate::webkit_web_history_item_new_with_core_item):
(_WebKitWebHistoryItemPrivate::webkit_web_history_item_new):
(_WebKitWebHistoryItemPrivate::webkit_web_history_item_new_with_data):
(_WebKitWebHistoryItemPrivate::webkit_web_history_item_get_title):
(_WebKitWebHistoryItemPrivate::webkit_web_history_item_get_alternate_title):
(_WebKitWebHistoryItemPrivate::webkit_web_history_item_set_alternate_title):
(_WebKitWebHistoryItemPrivate::webkit_web_history_item_get_uri):
(_WebKitWebHistoryItemPrivate::webkit_web_history_item_get_original_uri):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36012
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jmalonzo@webkit.org [Mon, 1 Sep 2008 12:43:48 +0000 (12:43 +0000)]
2008-09-01 Dirk Schulze <vbs85@gmx.de>
Reviewed by Eric Seidel.
Fixed border-radius for Cairo.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::strokeArc):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36011
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jmalonzo@webkit.org [Mon, 1 Sep 2008 12:43:34 +0000 (12:43 +0000)]
2008-09-01 Dirk Schulze <vbs85@gmx.de>
Reviewed by Eric Seidel.
Added canvas's globalAlpha to cairo.
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::setAlpha):
(WebCore::GraphicsContext::getAlpha):
* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
* platform/graphics/cairo/ImageCairo.cpp:
(WebCore::BitmapImage::draw):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36010
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Sun, 31 Aug 2008 21:57:32 +0000 (21:57 +0000)]
2008-08-31 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Maciej Stachowiak.
Bug 20577: REGRESSION (r35006): Gmail is broken
<https://bugs.webkit.org/show_bug.cgi?id=20577>
r35006 changed stringProtoFuncSubstr() so that it is uses the more
efficient jsSubstring(), rather than using UString::substr() and then
calling jsString(). However, the change did not account for the case
where the start and the length of the substring extend beyond the length
of the original string. This patch corrects that.
JavaScriptCore:
* kjs/StringPrototype.cpp:
(KJS::stringProtoFuncSubstr):
LayoutTests:
* fast/js/resources/string-substr.js: Added.
* fast/js/string-substr-expected.txt: Added.
* fast/js/string-substr.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36009
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hausmann@webkit.org [Sun, 31 Aug 2008 13:13:28 +0000 (13:13 +0000)]
2008-08-31 Simon Hausmann <hausmann@webkit.org>
Unreviewed Qt build fix.
* WebCore.pro: Add TextControlInnerElements.cpp to SOURCES instead of
the .h file
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36008
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hausmann@webkit.org [Sun, 31 Aug 2008 13:13:17 +0000 (13:13 +0000)]
2008-08-31 Simon Hausmann <hausmann@wekit.org>
Unreviewed build fix (with gcc 4.3)
* kjs/ustring.h: Properly forward declare operator== for UString and
the the concatenate functions inside the KJS namespace.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36007
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 31 Aug 2008 06:58:07 +0000 (06:58 +0000)]
JavaScriptCore:
2008-08-30 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- https://bugs.webkit.org/show_bug.cgi?id=20333
improve JavaScript speed when handling single-character strings
1.035x as fast on SunSpider overall.
1.127x as fast on SunSpider string tests.
1.910x as fast on SunSpider string-base64 test.
* API/JSObjectRef.cpp:
(JSObjectMakeFunction): Removed unneeded explicit construction of UString.
* GNUmakefile.am: Added SmallStrings.h and SmallStrings.cpp.
* JavaScriptCore.pri: Ditto.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
* JavaScriptCoreSources.bkl: Ditto.
* JavaScriptCore.exp: Updated.
* VM/Machine.cpp:
(KJS::jsAddSlowCase): Changed to use a code path that doesn't involve
a UString constructor. This avoids an extra jump caused by the "in charge"
vs. "not in charge" constructors.
(KJS::jsAdd): Ditto.
(KJS::jsTypeStringForValue): Adopted jsNontrivialString.
* kjs/ArrayPrototype.cpp:
(KJS::arrayProtoFuncToString): Adopted jsEmptyString.
(KJS::arrayProtoFuncToLocaleString): Ditto.
(KJS::arrayProtoFuncJoin): Ditto.
* kjs/BooleanPrototype.cpp:
(KJS::booleanProtoFuncToString): Adopted jsNontrivialString.
* kjs/DateConstructor.cpp:
(KJS::callDate): Ditto.
* kjs/DatePrototype.cpp:
(KJS::formatLocaleDate): Adopted jsEmptyString and jsNontrivialString.
(KJS::dateProtoFuncToString): Ditto.
(KJS::dateProtoFuncToUTCString): Ditto.
(KJS::dateProtoFuncToDateString): Ditto.
(KJS::dateProtoFuncToTimeString): Ditto.
(KJS::dateProtoFuncToLocaleString): Ditto.
(KJS::dateProtoFuncToLocaleDateString): Ditto.
(KJS::dateProtoFuncToLocaleTimeString): Ditto.
(KJS::dateProtoFuncToGMTString): Ditto.
* kjs/ErrorPrototype.cpp:
(KJS::ErrorPrototype::ErrorPrototype): Ditto.
(KJS::errorProtoFuncToString): Ditto.
* kjs/JSGlobalData.h: Added SmallStrings.
* kjs/JSString.cpp:
(KJS::jsString): Eliminated the overload that takes a const char*.
Added code to use SmallStrings to get strings of small sizes rather
than creating a new JSString every time.
(KJS::jsSubstring): Added. Used when creating a string from a substring
to avoid creating a JSString in cases where the substring will end up
empty or as one character.
(KJS::jsOwnedString): Added the same code as in jsString.
* kjs/JSString.h: Added new functions jsEmptyString, jsSingleCharacterString,
jsSingleCharacterSubstring, jsSubstring, and jsNontrivialString for various
cases where we want to create JSString, and want special handling for small
strings.
(KJS::JSString::JSString): Added an overload that takes a PassRefPtr of
a UString::Rep so you don't have to construct a UString; PassRefPtr can be
more efficient.
(KJS::jsEmptyString): Added.
(KJS::jsSingleCharacterString): Added.
(KJS::jsSingleCharacterSubstring): Added.
(KJS::jsNontrivialString): Added.
(KJS::JSString::getIndex): Adopted jsSingleCharacterSubstring.
(KJS::JSString::getStringPropertySlot): Ditto.
* kjs/NumberPrototype.cpp:
(KJS::numberProtoFuncToFixed): Adopted jsNontrivialString.
(KJS::numberProtoFuncToExponential): Ditto.
(KJS::numberProtoFuncToPrecision): Ditto.
* kjs/ObjectPrototype.cpp:
(KJS::objectProtoFuncToLocaleString): Adopted toThisJSString.
(KJS::objectProtoFuncToString): Adopted jsNontrivialString.
* kjs/RegExpConstructor.cpp: Separated the lastInput value that's used
with the lastOvector to return matches from the input value that can be
changed via JavaScript. They will be equal in many cases, but not all.
(KJS::RegExpConstructor::performMatch): Set input.
(KJS::RegExpMatchesArray::RegExpMatchesArray): Ditto.
(KJS::RegExpMatchesArray::fillArrayInstance): Adopted jsSubstring. Also,
use input rather than lastInput in the appropriate place.
(KJS::RegExpConstructor::getBackref): Adopted jsSubstring and jsEmptyString.
Added code to handle the case where there is no backref -- before this
depended on range checking in UString::substr which is not present in
jsSubstring.
(KJS::RegExpConstructor::getLastParen): Ditto.
(KJS::RegExpConstructor::getLeftContext): Ditto.
(KJS::RegExpConstructor::getRightContext): Ditto.
(KJS::RegExpConstructor::getValueProperty): Use input rather than lastInput.
Also adopt jsEmptyString.
(KJS::RegExpConstructor::putValueProperty): Ditto.
(KJS::RegExpConstructor::input): Ditto.
* kjs/RegExpPrototype.cpp:
(KJS::regExpProtoFuncToString): Adopt jsNonTrivialString. Also changed to
use UString::append to append single characters rather than using += and
a C-style string.
* kjs/SmallStrings.cpp: Added.
(KJS::SmallStringsStorage::SmallStringsStorage): Construct the
buffer and UString::Rep for all 256 single-character strings for
the U+0000 through U+00FF. This covers all the values used in
the base64 test as well as most values seen elsewhere on the web
as well. It's possible that later we might fix this to only work
for U+0000 through U+007F but the others are used quite a bit in
the current version of the base64 test.
(KJS::SmallStringsStorage::~SmallStringsStorage): Free memory.
(KJS::SmallStrings::SmallStrings): Create a set of small strings,
initially not created; created later when they are used.
(KJS::SmallStrings::~SmallStrings): Deallocate. Not left compiler
generated because the SmallStringsStorage class's destructor needs
to be visible.
(KJS::SmallStrings::mark): Mark all the strings.
(KJS::SmallStrings::createEmptyString): Create a cell for the
empty string. Called only the first time.
(KJS::SmallStrings::createSingleCharacterString): Create a cell
for one of the single-character strings. Called only the first time.
* kjs/SmallStrings.h: Added.
* kjs/StringConstructor.cpp:
(KJS::stringFromCharCodeSlowCase): Factored out of strinFromCharCode.
Only used for cases where the caller does not pass exactly one argument.
(KJS::stringFromCharCode): Adopted jsSingleCharacterString.
(KJS::callStringConstructor): Adopted jsEmptyString.
* kjs/StringObject.cpp:
(KJS::StringObject::StringObject): Adopted jsEmptyString.
* kjs/StringPrototype.cpp:
(KJS::stringProtoFuncReplace): Adopted jsSubstring.
(KJS::stringProtoFuncCharAt): Adopted jsEmptyString and
jsSingleCharacterSubstring and also added a special case when the
index is an immediate number to avoid conversion to and from floating
point, since that's the common case.
(KJS::stringProtoFuncCharCodeAt): Ditto.
(KJS::stringProtoFuncMatch): Adopted jsSubstring and jsEmptyString.
(KJS::stringProtoFuncSlice): Adopted jsSubstring and
jsSingleCharacterSubstring. Also got rid of some unneeded locals and
removed unneeded code to set the length property of the array, since it
is automatically updated as values are added to the array.
(KJS::stringProtoFuncSplit): Adopted jsEmptyString.
(KJS::stringProtoFuncSubstr): Adopted jsSubstring.
(KJS::stringProtoFuncSubstring): Ditto.
* kjs/collector.cpp:
(KJS::Heap::collect): Added a call to mark SmallStrings.
* kjs/ustring.cpp:
(KJS::UString::expandedSize): Made this a static member function since
it doesn't need to look at any data members.
(KJS::UString::expandCapacity): Use a non-inline function, makeNull, to
set the rep to null in failure cases. This avoids adding a PIC branch for
the normal case when there is no failure.
(KJS::UString::expandPreCapacity): Ditto.
(KJS::UString::UString): Ditto.
(KJS::concatenate): Refactored the concatenation constructor into this
separate function. Calling the concatenation constructor was leading to
an extra branch because of the in-charge vs. not-in-charge versions not
both being inlined, and this was showing up as nearly 1% on Shark. Also
added a special case for when the second string is a single character,
since it's a common idiom to build up a string that way and we can do
things much more quickly, without involving memcpy for example. Also
adopted the non-inline function, nullRep, for the same reason given for
makeNull above.
(KJS::UString::append): Adopted makeNull for failure cases.
(KJS::UString::operator=): Ditto.
(KJS::UString::toDouble): Added a special case for converting single
character strings to numbers. We're doing this a ton of times while
running the base64 test.
(KJS::operator==): Added special cases so we can compare single-character
strings without calling memcmp. Later we might want to special case other
short lengths similarly.
(KJS::UString::makeNull): Added.
(KJS::UString::nullRep): Added.
* kjs/ustring.h: Added declarations for the nullRep and makeNull. Changed
expandedSize to be a static member function. Added a declaration of the
concatenate function. Removed the concatenation constructor. Rewrote
operator+ to use the concatenate function.
WebCore:
2008-08-30 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- adopt some new JavaScriptCore functions where appropriate
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::windowProtoFuncAToB): Adopted jsEmptyString.
(WebCore::windowProtoFuncBToA): Ditto.
* bindings/js/JSEventListener.cpp:
(WebCore::JSLazyEventListener::eventParameterName): Adopted
jsNontrivialString.
* bindings/js/JSSVGLazyEventListener.cpp:
(WebCore::JSSVGLazyEventListener::eventParameterName): Ditto.
LayoutTests:
2008-08-30 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- updated incorrect results that reflected a bug in the RegExp object
* fast/js/regexp-caching-expected.txt: Updated results to
correctly show that $1 through $9, lastMatch, lastParen,
leftContext, and rightContext are left alone both when
a program changes the value of RegExp.input and when it
performs an unsuccessful match. The new results match
Gecko behavior (I tested both Firefox 2 and 3).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36006
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Sat, 30 Aug 2008 20:39:41 +0000 (20:39 +0000)]
2008-08-30 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
Add WebView SPI to defer loading callbacks.
* Interfaces/IWebViewPrivate.idl:
* WebView.cpp:
(WebView::setDefersCallbacks):
(WebView::defersCallbacks):
* WebView.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36005
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 30 Aug 2008 00:42:02 +0000 (00:42 +0000)]
2008-08-29 Anders Carlsson <andersca@apple.com>
Build fix.
* VM/Machine.cpp:
(KJS::getCPUTime):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36004
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 30 Aug 2008 00:40:34 +0000 (00:40 +0000)]
2008-08-29 Anders Carlsson <andersca@apple.com>
Reviewed by Darin.
<rdar://problem/6174667>
When a machine is under heavy load, the Slow Script dialog often comes up many times and just gets in the way
Instead of using clock time, use the CPU time spent executing the current thread when
determining if the script has been running for too long.
* VM/Machine.cpp:
(KJS::getCPUTime):
(KJS::Machine::checkTimeout):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36003
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Sat, 30 Aug 2008 00:30:11 +0000 (00:30 +0000)]
2008-08-29 Brady Eidson <beidson@apple.com>
Reviewed by Anders' rubberstamp
Style cleanup to match MediaTokenizer::writeRawData()
* loader/PluginDocument.cpp:
(WebCore::PluginTokenizer::writeRawData):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36002
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Sat, 30 Aug 2008 00:26:01 +0000 (00:26 +0000)]
WebCore:
2008-08-29 Brady Eidson <beidson@apple.com>
Reviewed by Anders
Fix regression I introducted in 35946
Already covered by media/video-click-dlbclick-standalone.html
* loader/MediaDocument.cpp:
(WebCore::MediaTokenizer::createDocumentStructure): Don't cancel the load here - too early!
(WebCore::MediaTokenizer::writeRawData): Call finish() here so onload() can be called. Also add
an ASSERT signifying that this method should only be called once, to more closely follow the
PluginDocument case.
WebKit/mac:
2008-08-29 Brady Eidson <beidson@apple.com>
Reviewed by Anders
Fix regression I introducted in 35946
Already covered by media/video-click-dlbclick-standalone.html
* WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation receivedData:withDataSource:]): Cancel the load here after
calling [WebFrame _receivedData:] which more closely follows the path taken by PluginDocuments
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36001
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bdakin@apple.com [Sat, 30 Aug 2008 00:00:30 +0000 (00:00 +0000)]
2008-08-29 Beth Dakin <bdakin@apple.com>
Reviewed by Sam Weinig.
Fix for <rdar://problem/6181588>
This patch makes hit testing take into account the new concept of a
disconnected frame, in which some of the content may not be
visible. The current hit testing mechanism starts at a target frame
and drills down for a HitTestResult. In some cases, drilling down
will find a non-visible result. When this happens, we need to try
again, starting at a higher level -- namely, starting at the main
frame.
* editing/Editor.cpp:
(WebCore::Editor::insideVisibleArea): New function that tests if a
point is inside the visible area for a disconnected frame.
* editing/Editor.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::hitTestResultAtPoint):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36000
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele@apple.com [Fri, 29 Aug 2008 22:30:18 +0000 (22:30 +0000)]
2008-08-29 Adele Peterson <adele@apple.com>
Reviewed by Adam Roben.
Rename HTMLTextFieldInnerElement.h/.cpp to TextControlInnerElements.h/.cpp
* GNUmakefile.am:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* WebCoreSources.bkl:
* html/HTMLTextFieldInnerElement.cpp: Removed.
* html/HTMLTextFieldInnerElement.h: Removed.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::createSubtreeIfNeeded):
* rendering/RenderTextControl.h:
* rendering/TextControlInnerElements.cpp: Copied from html/HTMLTextFieldInnerElement.cpp.
(WebCore::TextControlInnerElement::TextControlInnerElement):
(WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
(WebCore::TextControlInnerTextElement::defaultEventHandler):
(WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
(WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
(WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
* rendering/TextControlInnerElements.h: Copied from html/HTMLTextFieldInnerElement.h.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35999
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric@webkit.org [Fri, 29 Aug 2008 21:40:07 +0000 (21:40 +0000)]
Rubber-stamped by aroben.
Add GraphicsContext.h include to GraphcisContextPrivate.h
GraphicsContextPrivate uses StrokeStyle which is defined
in GraphicsContext.h but it doesn't include that header.
CoreGraphics build doesn't fail here due to the order
it happens to include files.
* platform/graphics/GraphicsContextPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35998
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric@webkit.org [Fri, 29 Aug 2008 21:39:32 +0000 (21:39 +0000)]
Reviewed by hyatt.
Fix GeneratedImage to respect Image's refcounting
Fixing potential crashers (future if not current)
https://bugs.webkit.org/show_bug.cgi?id=20567
I don't know if it's possible to make the current code
crash, thus I've not made a test.
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::removeClient):
(WebCore::CSSImageGeneratorValue::getImage):
* css/CSSImageGeneratorValue.h:
* platform/graphics/GeneratedImage.h:
(WebCore::GeneratedImage::GeneratedImage):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setContent):
* rendering/style/RenderStyle.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35997
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric@webkit.org [Fri, 29 Aug 2008 21:38:56 +0000 (21:38 +0000)]
Fix GeneratedImage to respect Image's refcounting
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35996
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Fri, 29 Aug 2008 20:24:50 +0000 (20:24 +0000)]
2008-08-29 Eric Carlson <eric.carlson@apple.com>
Reviewed by Adele.
Fix for <rdar://problem/6093767>
https://bugs.webkit.org/show_bug.cgi?id=20526
Don't allow video to render until unsupported track types have been disabled.
* platform/graphics/win/QTMovieWin.cpp:
(QTMovieWinPrivate::task):
(QTMovieWinPrivate::drawingComplete):
(QTMovieWinPrivate::clearGWorld):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35995
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Fri, 29 Aug 2008 20:07:19 +0000 (20:07 +0000)]
Reviewed by Adele.
Fix for https://bugs.webkit.org/show_bug.cgi?id=20525
<rdar://problem/6169301>
Return the size of the movie data instead of 1000. The value is used for the progress
event "total" attribute.
* media/progress-event-total-expected.txt: Added.
* media/progress-event-total.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35994
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hausmann@webkit.org [Fri, 29 Aug 2008 15:57:44 +0000 (15:57 +0000)]
2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Eric Seidel.
[janitor/qt] Start replacing port specific getters with the generic native getter
To get the native presentation of an image we currently have platform
specific #ifdef's and a generic getter using NativeImagePtr. This patch
extends this to the ImageBuffer and updates the Qt platform to get rid
of the special #ifdefs.
https://bugs.webkit.org/attachment.cgi?id=22861
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35993
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hausmann@webkit.org [Fri, 29 Aug 2008 15:56:59 +0000 (15:56 +0000)]
2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon.
[svg/qt] Stop crashing... when no RenderPath/RenderObject is given...
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35992
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hausmann@webkit.org [Fri, 29 Aug 2008 15:56:43 +0000 (15:56 +0000)]
2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon.
Catch up with the introduction of PageGroup in r30840. Enable tracking of
visited links, enable this in QWebPage next to the other WebCore init call.
Calling this more than once is no issue and a cheap operation, we also do not
reset the state. When clearing the history of a page, clear the link state.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35991
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hausmann@webkit.org [Fri, 29 Aug 2008 15:56:18 +0000 (15:56 +0000)]
2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon.
Revert revision 34348 which removed the global historyContains() function.
This function was needed to implement the public API of QWebHistoryInterface
and will be used again in the near future.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35990
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hausmann@webkit.org [Fri, 29 Aug 2008 15:56:02 +0000 (15:56 +0000)]
2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon.
[network/qt] Implement defering of loading ResourceHandle's
This is needed otherwise we end in an ASSERT in the MainResourceLoader. The
implementation is simply not forwarding anything to the
ResourceHandleClient until we are allowed to. This might lead to a deadlock
in Qt as we do not empty the QNetworkReply input buffer and wait until we
are allowed to read. If that happens we are forced to buffer the data
within QNetworkReplyHandler, for now this is not done.
Manual test:
- Open http://acid3.acidtests.org
- Wait for the test to complete
- Click on the Reference Rendering link
- Be fast and see the results of acid3
=> assert
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35989
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hausmann@webkit.org [Fri, 29 Aug 2008 12:35:59 +0000 (12:35 +0000)]
2008-08-29 Simon Hausmann <hausmann@webkit.org>
Reviewed by Holger.
Don't crash when drawing patterns with the HTML canvas. Patterns
remain unimplemented but at least they don't crash anymore. This is
done by changing the PlatformPatternPtr to be a brush for the Qt
platform.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35988
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hausmann@webkit.org [Fri, 29 Aug 2008 10:21:38 +0000 (10:21 +0000)]
2008-08-29 Simon Hausmann <hausmann@webkit.org>
Fix the Qt build, fontSelector() is not used by the Qt port yet
and we just return 0 in Font::fontSelector().
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35987
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Fri, 29 Aug 2008 05:20:58 +0000 (05:20 +0000)]
2008-08-28 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Rubber-stamped by Sam Weinig.
Change 'term' to 'expr' in variable names to standardize terminology.
* kjs/nodes.cpp:
(KJS::BinaryOpNode::emitCode):
(KJS::ReverseBinaryOpNode::emitCode):
(KJS::ThrowableBinaryOpNode::emitCode):
* kjs/nodes.h:
(KJS::BinaryOpNode::BinaryOpNode):
(KJS::ReverseBinaryOpNode::ReverseBinaryOpNode):
(KJS::MultNode::):
(KJS::DivNode::):
(KJS::ModNode::):
(KJS::AddNode::):
(KJS::SubNode::):
(KJS::LeftShiftNode::):
(KJS::RightShiftNode::):
(KJS::UnsignedRightShiftNode::):
(KJS::LessNode::):
(KJS::GreaterNode::):
(KJS::LessEqNode::):
(KJS::GreaterEqNode::):
(KJS::ThrowableBinaryOpNode::):
(KJS::InstanceOfNode::):
(KJS::InNode::):
(KJS::EqualNode::):
(KJS::NotEqualNode::):
(KJS::StrictEqualNode::):
(KJS::NotStrictEqualNode::):
(KJS::BitAndNode::):
(KJS::BitOrNode::):
(KJS::BitXOrNode::):
* kjs/nodes2string.cpp:
(KJS::MultNode::streamTo):
(KJS::DivNode::streamTo):
(KJS::ModNode::streamTo):
(KJS::AddNode::streamTo):
(KJS::SubNode::streamTo):
(KJS::LeftShiftNode::streamTo):
(KJS::RightShiftNode::streamTo):
(KJS::UnsignedRightShiftNode::streamTo):
(KJS::LessNode::streamTo):
(KJS::GreaterNode::streamTo):
(KJS::LessEqNode::streamTo):
(KJS::GreaterEqNode::streamTo):
(KJS::InstanceOfNode::streamTo):
(KJS::InNode::streamTo):
(KJS::EqualNode::streamTo):
(KJS::NotEqualNode::streamTo):
(KJS::StrictEqualNode::streamTo):
(KJS::NotStrictEqualNode::streamTo):
(KJS::BitAndNode::streamTo):
(KJS::BitXOrNode::streamTo):
(KJS::BitOrNode::streamTo):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35986
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
alp@webkit.org [Fri, 29 Aug 2008 05:09:39 +0000 (05:09 +0000)]
2008-08-28 Alp Toker <alp@nuanti.com>
GTK+ dist/build fix. List newly added header files.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35985
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Fri, 29 Aug 2008 01:13:01 +0000 (01:13 +0000)]
JavaScriptCore:
2008-08-28 Sam Weinig <sam@webkit.org>
Reviewed by Oliver Hunt.
Change to throw a ReferenceError at runtime instead of a ParseError
at parse time, when the left hand side expression of a for-in statement
is not an lvalue.
* kjs/grammar.y:
* kjs/nodes.cpp:
(KJS::ForInNode::emitCode):
LayoutTests:
2008-08-28 Sam Weinig <sam@webkit.org>
Reviewed by Oliver Hunt.
Update test results now that test actually works.
* fast/js/kde/exception_propagation-expected.txt:
* fast/js/kde/resources/exception_propagation.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35984
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Thu, 28 Aug 2008 23:04:18 +0000 (23:04 +0000)]
2008-08-28 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dave Hyatt
Various WebKitCSSTransformValue-related fixes
https://bugs.webkit.org/show_bug.cgi?id=20562
Test: css3/transform-value-types.html
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJS):
* css/CSSValue.h:
* css/WebKitCSSTransformValue.cpp:
(WebCore::WebKitCSSTransformValue::cssText):
* css/WebKitCSSTransformValue.h:
(WebCore::WebKitCSSTransformValue::):
* css/WebKitCSSTransformValue.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35983
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Thu, 28 Aug 2008 22:53:31 +0000 (22:53 +0000)]
Reviewed by Steve Falkenburg.
- do not let the "last chance" WM_TIMER trigger WebCore timers when they should be deferred
* platform/win/SharedTimerWin.cpp:
(WebCore::TimerWindowWndProc):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35982
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 28 Aug 2008 21:45:23 +0000 (21:45 +0000)]
Make sure new header files are put in private headers.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35981
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Thu, 28 Aug 2008 21:40:47 +0000 (21:40 +0000)]
2008-08-28 Simon Fraser <simon.fraser@apple.com>
Fix window properties now that CSSRule includes
keyframe-related constants.
Also add window.console.count [function]
https://bugs.webkit.org/show_bug.cgi?id=20552
* fast/dom/Window/window-properties-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35980
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 28 Aug 2008 21:38:45 +0000 (21:38 +0000)]
2008-08-28 David Hyatt <hyatt@apple.com>
RenderStyle cleanup.
Break out StyleImage, StyleGeneratedImage, StyleCachedImage and NinePieceImage into separate files.
Reviewed by Adam
* css/CSSImageGeneratorValue.cpp:
* css/CSSImageValue.cpp:
* css/CSSStyleSelector.cpp:
* rendering/RenderImageGeneratedContent.cpp:
* rendering/style/NinePieceImage.cpp: Added.
* rendering/style/NinePieceImage.h: Added.
* rendering/style/RenderStyle.cpp:
(WebCore::FillLayer::operator==):
(WebCore::FillLayer::containsImage):
(WebCore::StyleInheritedData::operator==):
(WebCore::RenderStyle::contentDataEquivalent):
* rendering/style/RenderStyle.h:
* rendering/style/StyleCachedImage.cpp: Added.
* rendering/style/StyleCachedImage.h: Added.
* rendering/style/StyleGeneratedImage.cpp: Added.
* rendering/style/StyleGeneratedImage.h: Added.
* rendering/style/StyleImage.h: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35979
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Thu, 28 Aug 2008 21:29:21 +0000 (21:29 +0000)]
2008-08-28 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dave Hyatt
Make all the 'isFoo()' methods on CSSValue const,
and fix the subclasses.
https://bugs.webkit.org/show_bug.cgi?id=20561
* css/CSSTimingFunctionValue.h:
* css/CSSValue.h:
(WebCore::CSSValue::isFontValue):
(WebCore::CSSValue::isImageGeneratorValue):
(WebCore::CSSValue::isImageValue):
(WebCore::CSSValue::isImplicitInitialValue):
* css/CSSValueList.h:
* css/FontValue.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35978
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kmccullough@apple.com [Thu, 28 Aug 2008 20:48:22 +0000 (20:48 +0000)]
2008-08-28 Kevin McCullough <kmccullough@apple.com>
Reviewed by Geoff.
<rdar://problem/6095949> REGRESSION (5525.8-6527.1?): "this" is null
when you first hit a breakpoint in Dashcode
- We wanted to reset the callframe whenever eval() was called but
dashcode uses eval() when broken to evaluate the state of the current
call frame.
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::willExecuteProgram):
(WebScriptDebugger::didExecuteProgram):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35977
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 28 Aug 2008 20:08:03 +0000 (20:08 +0000)]
2008-08-28 David Hyatt <hyatt@apple.com>
The great RenderStyle cleanup begins!
Move LengthBox and LengthSize out of RenderStyle and into Length.
Reviewed by Adam
* rendering/Length.h:
(WebCore::):
(WebCore::Length::Length):
(WebCore::Length::operator==):
(WebCore::Length::operator!=):
(WebCore::Length::value):
(WebCore::Length::rawValue):
(WebCore::Length::percent):
(WebCore::Length::type):
(WebCore::Length::quirk):
(WebCore::Length::setValue):
(WebCore::Length::setRawValue):
(WebCore::Length::calcValue):
(WebCore::Length::calcMinValue):
(WebCore::Length::calcFloatValue):
(WebCore::Length::isUndefined):
(WebCore::Length::isZero):
(WebCore::Length::isPositive):
(WebCore::Length::isNegative):
(WebCore::Length::isAuto):
(WebCore::Length::isRelative):
(WebCore::Length::isPercent):
(WebCore::Length::isFixed):
(WebCore::Length::isStatic):
(WebCore::Length::isIntrinsicOrAuto):
(WebCore::Length::blend):
(WebCore::LengthBox::LengthBox):
(WebCore::LengthBox::operator=):
(WebCore::LengthBox::operator==):
(WebCore::LengthBox::operator!=):
(WebCore::LengthBox::nonZero):
(WebCore::LengthSize::LengthSize):
* rendering/style/RenderStyle.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35976
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Thu, 28 Aug 2008 19:53:56 +0000 (19:53 +0000)]
2008-08-28 David Hyatt <hyatt@apple.com>
Reviewed by Darin
https://bugs.webkit.org/show_bug.cgi?id=18091
font-size should be animatable using -webkit-transition.
* page/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensurePropertyMap):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setFontSize):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35975
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele@apple.com [Thu, 28 Aug 2008 18:08:09 +0000 (18:08 +0000)]
2008-08-28 Adele Peterson <adele@apple.com>
Build fix.
* WebIconDatabase.cpp: (WebIconDatabase::getOrCreateDefaultIconBitmap):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35974
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Thu, 28 Aug 2008 17:45:47 +0000 (17:45 +0000)]
2008-08-28 Brad Garcia <bgarcia@google.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=20549
Correctly determine when cursor is over a resizable border within
a nested frameset.
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::canResizeRow):
(WebCore::RenderFrameSet::canResizeColumn):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35973
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Thu, 28 Aug 2008 17:30:07 +0000 (17:30 +0000)]
2008-08-28 Simon Fraser <simon.fraser@apple.com>
Reviewed by Eric Seidel
Add RuleTypes to CSSRule.idl for keyframes and keyframe rules.
https://bugs.webkit.org/show_bug.cgi?id=20552
Test: animations/animation-css-rule-types.html
* css/CSSRule.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35972
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Thu, 28 Aug 2008 17:26:46 +0000 (17:26 +0000)]
2008-08-28 Anders Carlsson <andersca@apple.com>
Reviewed by Kevin and Darin.
<rdar://problem/6182541>
https://bugs.webkit.org/show_bug.cgi?id=20202
Missing http status line from the http headers.
Add a status line to the header string.
* plugins/PluginStream.cpp:
(WebCore::PluginStream::startStream):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35971
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zecke@webkit.org [Thu, 28 Aug 2008 15:56:01 +0000 (15:56 +0000)]
WebCore:
2008-08-28 Holger Hans Peter Freyther <zecke@selfish.org>
Rubber-stamped by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=17261
Make it possible to theme the default Url icon and enable this for
the Qt port. To have a minimal usage of #ifdef in the code the setting
of the icon was moved to a new method which comes in two flavors.
* loader/icon/IconDatabase.cpp:
(WebCore::loadDefaultIconRecord): Load or set the default icon
(WebCore::IconDatabase::defaultIcon):
WebKit/win:
2008-08-28 Holger Hans Peter Freyther <zecke@selfish.org>
Rubber-stamped by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=17261
Remove the urlIcon.png from the project and the resource file. Remove
the usage of this icon from WebKitDLL.cpp and change WebIconDatabase
to get the icon from the IconDatabase code which is using a version of
the icon that is compiled into the code.
* WebIconDatabase.cpp:
(WebIconDatabase::getOrCreateDefaultIconBitmap): Use the icon from the
IconDatabase.cpp
* WebKit.vcproj/WebKit.rc: Remove urlIcon.cpp
* WebKit.vcproj/urlIcon.png: Removed.
* WebKitDLL.cpp:
(loadResourceIntoBuffer): Remove "urlIcon"
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35970
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zecke@webkit.org [Thu, 28 Aug 2008 15:03:21 +0000 (15:03 +0000)]
2008-08-28 Holger Hans Peter Freyther <zecke@selfish.org>
Unreviewed compile fix
* platform/graphics/qt/GraphicsContextQt.cpp: Remove redefinitions
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35969
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aroben@apple.com [Thu, 28 Aug 2008 13:34:01 +0000 (13:34 +0000)]
Windows (and others?) build fix
* page/Chrome.cpp: Added a missing #include.
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Fixed typo.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35968
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric@webkit.org [Thu, 28 Aug 2008 12:04:55 +0000 (12:04 +0000)]
Reviewed by Oliver Hunt.
Qt and Cairo support from krit (and blind stab @ wx compile support)
https://bugs.webkit.org/show_bug.cgi?id=20373
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::drawPath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::setPlatformFillColor):
(WebCore::GraphicsContext::setPlatformStrokeColor):
(WebCore::GraphicsContext::setPlatformStrokeStyle):
(WebCore::GraphicsContext::strokeRect):
(WebCore::GraphicsContext::setImageInterpolationQuality):
(WebCore::GraphicsContext::imageInterpolationQuality):
(WebCore::GraphicsContext::setPlatformFillPattern):
(WebCore::GraphicsContext::setPlatformStrokePattern):
(WebCore::GraphicsContext::setPlatformFillGradient):
(WebCore::GraphicsContext::setPlatformStrokeGradient):
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::strokeRect):
(WebCore::GraphicsContext::clipToImageBuffer):
(WebCore::GraphicsContext::setPlatformFillPattern):
(WebCore::GraphicsContext::setPlatformStrokePattern):
(WebCore::GraphicsContext::setPlatformFillGradient):
(WebCore::GraphicsContext::setPlatformStrokeGradient):
(WebCore::GraphicsContext::setImageInterpolationQuality):
(WebCore::GraphicsContext::imageInterpolationQuality):
* platform/graphics/wx/GraphicsContextWx.cpp:
(WebCore::GraphicsContext::clipToImageBuffer):
(WebCore::GraphicsContext::setImageInterpolationQuality):
(WebCore::GraphicsContext::imageInterpolationQuality):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::drawPath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::setPlatformFillPattern):
(WebCore::GraphicsContext::setPlatformStrokePattern):
(WebCore::GraphicsContext::setPlatformFillGradient):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35967
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric@webkit.org [Thu, 28 Aug 2008 12:04:40 +0000 (12:04 +0000)]
Reviewed by Oliver Hunt.
Add stroke/fill Gradient and Pattern support to GraphicsContext and update <canvas> to use it.
https://bugs.webkit.org/show_bug.cgi?id=20373
Changed pattern() to canvasPattern() on CanvasStyle to match canvasGradient()
Made Generator (aka Gradient) RefCounted so that GraphicsContext didn't
have to store large Gradient objects in the GraphicsContextState
Made Pattern RefCounted for the same reason.
Many updates to GraphicsContext to support easier drawing with
Patterns and Gradients.
* WebCore.xcodeproj/project.pbxproj: Add pre-existing GraphicsContextPrivate.h
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
(WebCore::toJS):
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::createGradient):
* css/CSSGradientValue.h:
* html/CanvasGradient.cpp:
(WebCore::CanvasGradient::CanvasGradient):
* html/CanvasGradient.h:
(WebCore::CanvasGradient::gradient):
(WebCore::CanvasGradient::addColorStop):
(WebCore::CanvasGradient::getColor):
* html/CanvasPattern.cpp:
* html/CanvasPattern.h:
(WebCore::CanvasPattern::pattern):
(WebCore::CanvasPattern::originClean):
* html/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::State::State):
(WebCore::CanvasRenderingContext2D::setStrokeStyle):
(WebCore::CanvasRenderingContext2D::setFillStyle):
(WebCore::CanvasRenderingContext2D::fill):
(WebCore::CanvasRenderingContext2D::stroke):
(WebCore::CanvasRenderingContext2D::fillRect):
(WebCore::CanvasRenderingContext2D::strokeRect):
* html/CanvasRenderingContext2D.h:
* html/CanvasStyle.cpp:
(WebCore::CanvasStyle::applyStrokeColor):
(WebCore::CanvasStyle::applyFillColor):
* html/CanvasStyle.h:
* platform/graphics/GeneratedImage.h:
(WebCore::GeneratedImage::GeneratedImage):
* platform/graphics/Generator.h:
* platform/graphics/Gradient.h:
(WebCore::Gradient::create):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::fillRule):
(WebCore::GraphicsContext::setFillRule):
(WebCore::GraphicsContext::setStrokePattern):
(WebCore::GraphicsContext::setFillPattern):
(WebCore::GraphicsContext::setStrokeGradient):
(WebCore::GraphicsContext::setFillGradient):
* platform/graphics/GraphicsContext.h:
* platform/graphics/GraphicsContextPrivate.h:
(WebCore::):
(WebCore::GraphicsContextState::GraphicsContextState):
* platform/graphics/GraphicsTypes.h:
* platform/graphics/Path.h:
* platform/graphics/Pattern.h:
(WebCore::Pattern::create):
(WebCore::Pattern::tileImage):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawEllipse):
(WebCore::GraphicsContext::drawConvexPolygon):
(WebCore::calculateDrawingMode):
(WebCore::GraphicsContext::drawPath):
(WebCore::fillPathWithFillRule):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::setPlatformStrokePattern):
(WebCore::GraphicsContext::setPlatformFillPattern):
(WebCore::GraphicsContext::setPlatformStrokeGradient):
(WebCore::GraphicsContext::setPlatformFillGradient):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35966
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Thu, 28 Aug 2008 11:44:16 +0000 (11:44 +0000)]
Not reviewed, build fix (at least for OpenBSD, posssibly more).
https://bugs.webkit.org/show_bug.cgi?id=20545
missing #include <unistd.h> in JavaScriptCore/VM/SamplingTool.cpp
* VM/SamplingTool.cpp: add the missing include.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35965
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric@webkit.org [Thu, 28 Aug 2008 11:42:26 +0000 (11:42 +0000)]
Reviewed by Darin and Alexey.
Close a leak of PausedTimeouts if the JavaScriptDebugServer was destroyed
with timeouts paused.
https://bugs.webkit.org/show_bug.cgi?id=20469
I attempted to clean up the memory management of PausedTimeouts, I'm not
sure the solution I came up with is "cleaner", but it's in some ways
"safer", since it no longer uses raw pointers and manual new/delete.
This also now prevents CachedPage from needlessly creating Window
objects when caching pages which didn't already have one. :)
I also made Chrome.cpp no longer depend on the JavaScript bindings
(aka JSDOMWindowBase.h), since there was no real reason for it to.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::pauseTimeouts):
(WebCore::JSDOMWindowBase::resumeTimeouts):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::pauseTimeouts):
(WebCore::ScriptController::resumeTimeouts):
* bindings/js/ScriptController.h:
* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::restore):
* page/Chrome.cpp:
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
* page/JavaScriptDebugServer.cpp:
(WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
(WebCore::JavaScriptDebugServer::setJavaScriptPaused):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35964
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zecke@webkit.org [Thu, 28 Aug 2008 03:36:31 +0000 (03:36 +0000)]
2008-08-27 Holger Hans Peter Freyther <zecke@selfish.org>
Unreviewed compile fix
Add the stub for the Qt port.
* WebCore.pro:
* page/qt/AccessibilityObjectQt.cpp: Added.
(WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35963
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zecke@webkit.org [Thu, 28 Aug 2008 03:25:37 +0000 (03:25 +0000)]
2008-08-27 Erik Bunce <elbunce@thehive.com>
Reviewed by Eric Seidel.
https://bugs.webkit.org/show_bug.cgi?id=20223
Add QWebPage::contentsChanged() signal to notify of content changes.
* Api/qwebpage.cpp:
* Api/qwebpage.h:
* WebCoreSupport/EditorClientQt.cpp:
(WebCore::EditorClientQt::respondToChangedContents):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35962
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zecke@webkit.org [Thu, 28 Aug 2008 02:18:20 +0000 (02:18 +0000)]
2008-08-27 Alp Toker <alp@nuanti.com>
Reviewed by Eric.
https://bugs.webkit.org/show_bug.cgi?id=20551
[GTK] search popup crash
* platform/gtk/SearchPopupMenuGtk.cpp:
(WebCore::SearchPopupMenu::enabled):
Fix a search popup crasher by disabling the history popup since we
don't support this feature yet in the GTK+ port.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35961
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zecke@webkit.org [Thu, 28 Aug 2008 02:15:20 +0000 (02:15 +0000)]
2008-08-27 Alp Toker <alp@nuanti.com>
Reviewed by Eric.
https://bugs.webkit.org/show_bug.cgi?id=20551
[GTK] curl crashers
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::startScheduledJobs):
Remove the resource handle from the pending list before starting the
job, not afterwards. Fixes crashers in the test suite.
Test: fast/dom/clientWidthAfterDocumentIsRemoved.html
Test: fast/encoding/char-encoding.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35960
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
alice.liu@apple.com [Thu, 28 Aug 2008 02:11:01 +0000 (02:11 +0000)]
2008-08-27 Alice Liu <alice.liu@apple.com>
Add interface for obtaining JS object counts broken down by type
Reviewed by Steve Falkenburg.
* Interfaces/IWebCoreStatistics.idl:
* WebCoreStatistics.cpp:
(WebCoreStatistics::javaScriptProtectedObjectTypeCounts):
* WebCoreStatistics.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35959
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zecke@webkit.org [Thu, 28 Aug 2008 01:42:14 +0000 (01:42 +0000)]
2008-08-27 Adrien Nader <camaradetux@gmail.com>
Reviewed by Eric Seidel.
https://bugs.webkit.org/show_bug.cgi?id=20099
[GTK] SHIFT+PAGE_UP/DOWN doesn't extend selection
* WebCoreSupport/EditorClientGtk.cpp:
(WebKit::EditorClient::handleKeyboardEvent):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35958
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zecke@webkit.org [Thu, 28 Aug 2008 01:20:19 +0000 (01:20 +0000)]
2008-08-27 Mike Hommey <glandium@debian.org>
Reviewed by Holger.
* GNUmakefile.am:
* symbols.filter: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35957
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Thu, 28 Aug 2008 00:50:13 +0000 (00:50 +0000)]
WebKit/mac:
2008-08-27 Robert Kroeger <rjkroege@liqui.org>
Tweaked by Sam Weinig.
Reviewed by Eric Seidel.
Fix https://bugs.webkit.org/show_bug.cgi?id=6595
<rdar://problem/4432150>
Right-click does not fire mouseup event
Adds a rightMouseUp handler to the WebHTMLView.
The added method generates mouseup events for button 2. The result
is that webkit will deliver mousedown and mouseup events for button
2 in a fashion identical to FireFox and will retain event ordering
identical to Internet Explorer.
Test: fast/events/mouseup-from-button2.html
* WebView/WebHTMLView.mm:
(-[WebHTMLView rightMouseUp:]):
LayoutTests:
2008-08-27 Robert Kroeger <rjkroege@liqui.org>
Reviewed by Eric Seidel.
Test for https://bugs.webkit.org/show_bug.cgi?id=6595
* fast/events/mouseup-from-button2-expected.txt: Added.
* fast/events/mouseup-from-button2.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35956
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric@webkit.org [Thu, 28 Aug 2008 00:26:15 +0000 (00:26 +0000)]
Reviewed by eseidel.
Fix canvas drawImage to support composite operations.
Composite had no effect on canvas elements like these:
http://philip.html5.org/tests/canvas/suite/tests/index.2d.composite.canvas.html
[CAIRO] Canvas composite don't work on canvas-elements.
https://bugs.webkit.org/show_bug.cgi?id=20548
* html/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage): pass the current composite operator to the drawImage call
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35955
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric@webkit.org [Thu, 28 Aug 2008 00:04:59 +0000 (00:04 +0000)]
Reviewed by Eric Seidel.
Fix the data content of an image with a base64.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::parseDataUrl): Remove the String and use only the data
Vector because the data.latin1().data() convert the data content and
the image test ( https://bugs.webkit.org/attachment.cgi?id=21726 ) is
not drawn correctly.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35954
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Wed, 27 Aug 2008 23:59:50 +0000 (23:59 +0000)]
2008-08-27 Antti Koivisto <antti@apple.com>
Reviewed by Eric Seidel.
Crash after OK in dialog box and reloading page in secure mode
https://bugs.webkit.org/show_bug.cgi?id=20493
The new run loop spawned by a modal dialog causes a timer in the loader to run
synchronously inside didFinishLoading() deleting "this" object.
Defer all WebCore timers when a modal dialog is up. They are not
safe to execute.
* page/Chrome.cpp:
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35953
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 27 Aug 2008 23:16:36 +0000 (23:16 +0000)]
2008-08-27 Chris Marrin <cmarrin@apple.com>
Reviewed by Dave Hyatt
Memory leaks when animating transforms
https://bugs.webkit.org/show_bug.cgi?id=20532
* rendering/style/RenderStyle.cpp:
(WebCore::ScaleTransformOperation::blend):
(WebCore::RotateTransformOperation::blend):
(WebCore::SkewTransformOperation::blend):
(WebCore::TranslateTransformOperation::blend):
(WebCore::MatrixTransformOperation::blend):
* rendering/style/RenderStyle.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35952
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adachan@apple.com [Wed, 27 Aug 2008 22:54:04 +0000 (22:54 +0000)]
Fixed build.
* WebFrame.cpp:
(WebFrame::pluginWillHandleLoadError):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35951
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Wed, 27 Aug 2008 22:03:24 +0000 (22:03 +0000)]
Add support for support for -webkit-appearance: default-button on the Mac platform.
WebCore:
2008-08-27 Timothy Hatcher <timothy@apple.com>
Add support for support for -webkit-appearance: default-button on the Mac platform.
<rdar://problem/6173530>
Reviewed by Dave Hyatt.
* WebCore.base.exp: Export new symbols.
* platform/mac/WebCoreSystemInterface.h: Add wkAdvanceDefaultButtonPulseAnimation.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
* rendering/RenderButton.cpp:
(WebCore::RenderButton::RenderButton): Remove #if PLATFORM(WIN).
(WebCore::RenderButton::setStyle): Ditto.
* rendering/RenderButton.h: Ditto.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustRepaintRect): Add a case for DefaultButtonAppearance.
(WebCore::RenderThemeMac::setButtonCellState): Set the key equivalent to the return
key if the button is default, otherwise reset the key equivalent.
(WebCore::RenderThemeMac::paintButton): If the button is default call setDefaultButtonCell:
on the window, then wkAdvanceDefaultButtonPulseAnimation before painting. Restore
the window's previous default button cell when finished.
WebKit/mac:
2008-08-27 Timothy Hatcher <timothy@apple.com>
Add support for support for -webkit-appearance: default-button on the Mac platform.
<rdar://problem/6173530>
Reviewed by Dave Hyatt.
* WebCoreSupport/WebSystemInterface.m:
(InitWebCoreSystemInterface): Init AdvanceDefaultButtonPulseAnimation.
* WebView/WebPreferenceKeysPrivate.h: Added WebKitApplicationChromeModeEnabledPreferenceKey.
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Set WebKitApplicationChromeModeEnabledPreferenceKey to NO.
(-[WebPreferences applicationChromeModeEnabled]): Added.
(-[WebPreferences setApplicationChromeModeEnabledEnabled:]): Added.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChangedNotification:]): Call Settings::setApplicationChromeMode
with the value of -[WebPreferences applicationChromeModeEnabled].
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35950
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt@apple.com [Wed, 27 Aug 2008 21:18:15 +0000 (21:18 +0000)]
2008-08-26 David Hyatt <hyatt@apple.com>
First cut at making form controls on OS X respect full page zoom. There are lots of bugs.
Reviewed by weinig
Added fast/forms/zoomed-controls.html
* css/CSSStyleSelector.cpp:
(WebCore::addIntrinsicMargins):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::calcPrefWidths):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustRepaintRect):
(WebCore::RenderThemeMac::inflateRect):
(WebCore::RenderThemeMac::baselinePosition):
(WebCore::RenderThemeMac::setControlSize):
(WebCore::RenderThemeMac::sizeForFont):
(WebCore::RenderThemeMac::sizeForSystemFont):
(WebCore::RenderThemeMac::setFontFromControlSize):
(WebCore::RenderThemeMac::paintCheckbox):
(WebCore::RenderThemeMac::setCheckboxCellState):
(WebCore::RenderThemeMac::paintRadio):
(WebCore::RenderThemeMac::setRadioCellState):
(WebCore::RenderThemeMac::setButtonPaddingFromControlSize):
(WebCore::RenderThemeMac::adjustButtonStyle):
(WebCore::RenderThemeMac::setButtonCellState):
(WebCore::RenderThemeMac::paintButton):
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::paintMenuListButton):
(WebCore::RenderThemeMac::popupInternalPaddingLeft):
(WebCore::RenderThemeMac::popupInternalPaddingRight):
(WebCore::RenderThemeMac::popupInternalPaddingTop):
(WebCore::RenderThemeMac::popupInternalPaddingBottom):
(WebCore::RenderThemeMac::setPopupButtonCellState):
(WebCore::RenderThemeMac::paintSliderTrack):
(WebCore::RenderThemeMac::paintSliderThumb):
(WebCore::RenderThemeMac::adjustSliderThumbSize):
(WebCore::RenderThemeMac::paintSearchField):
(WebCore::RenderThemeMac::adjustSearchFieldStyle):
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::paintSearchFieldResultsButton):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35949
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Wed, 27 Aug 2008 20:29:45 +0000 (20:29 +0000)]
Adds the WKAdvanceDefaultButtonPulseAnimation function.
<rdar://problem/6173530> Add Mac support for -webkit-appearance: default-button
Reviewed by Adele Peterson.
* WebKitSystemInterface.h: Added WKAdvanceDefaultButtonPulseAnimation.
* libWebKitSystemInterfaceLeopard.a: Updated.
* libWebKitSystemInterfaceTiger.a: Updated.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35948
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Wed, 27 Aug 2008 19:59:55 +0000 (19:59 +0000)]
WebCore:
2008-08-27 Brady Eidson <beidson@apple.com>
Reviewed by Anders
<rdar://problem/6134133> - Crash when loading large movie as a standalone document
We hand off these loads to Quicktime which manages and spools the data itself, but we also continued
to load and buffer the data for the movie in WebCore. With large media files, this results in blowing
away the virtual address space and a crash.
* loader/EmptyClients.h:
(WebCore::EmptyFrameLoaderClient::pluginWillHandleLoadError):
* loader/FrameLoaderClient.h: Added client method to get platform specific error for
"plugin will handle load"
* loader/MediaDocument.cpp:
(WebCore::MediaTokenizer::createDocumentStructure): Tell the MainResourceLoader to not buffer data,
and cancel the WebCore-managed load
(WebCore::MediaTokenizer::writeRawData):
(WebCore::MediaTokenizer::finish):
WebKit/gtk:
2008-08-27 Brady Eidson <beidson@apple.com>
Reviewed by Anders
<rdar://problem/6134133> - Crash when loading large movie as a standalone document
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::pluginWillHandleLoadError): Stubbed for now
* WebCoreSupport/FrameLoaderClientGtk.h:
WebKit/mac:
2008-08-27 Brady Eidson <beidson@apple.com>
Reviewed by Anders
<rdar://problem/6134133> - Crash when loading large movie as a standalone document
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::pluginWillHandleLoadError):
WebKit/qt:
2008-08-27 Brady Eidson <beidson@apple.com>
Reviewed by Anders
<rdar://problem/6134133> - Crash when loading large movie as a standalone document
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::pluginWillHandleLoadError): Stubbed for now
* WebCoreSupport/FrameLoaderClientQt.h:
WebKit/win:
2008-08-27 Brady Eidson <beidson@apple.com>
Reviewed by Anders
<rdar://problem/6134133> - Crash when loading large movie as a standalone document
* WebFrame.cpp:
(WebFrame::pluginWillHandleLoadError):
* WebFrame.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35946
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
alice.liu@apple.com [Wed, 27 Aug 2008 19:47:43 +0000 (19:47 +0000)]
2008-08-26 Alice Liu <alice.liu@apple.com>
Implement COMPropertyBag::GetPropertyInfo
and a variant setter for type int
Reviewed by Anders Carlsson.
* COMPropertyBag.h:
(::GetPropertyInfo):
* COMVariantSetter.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35944
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 27 Aug 2008 18:19:55 +0000 (18:19 +0000)]
2008-08-26 Simon Fraser <simon.fraser@apple.com>
Reviewed by Eric Seidel
Linear timing functions should have control points 0, 0, 1, 1.
https://bugs.webkit.org/show_bug.cgi?id=20535
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::mapAnimationTimingFunction):
* rendering/style/RenderStyle.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35943
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aroben@apple.com [Wed, 27 Aug 2008 14:52:17 +0000 (14:52 +0000)]
Windows build fix
* WebCore.vcproj/WebCore.vcproj: Fix file extension.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35942
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
abarth@webkit.org [Wed, 27 Aug 2008 00:14:51 +0000 (00:14 +0000)]
2008-08-26 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
Test for https://bugs.webkit.org/show_bug.cgi?id=20456
* http/tests/security/object-literals-expected.txt: Added.
* http/tests/security/object-literals.html: Added.
* http/tests/security/resources/object-literals-cross-origin.html: Added.
* http/tests/security/resources/object-literals-same-origin.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35941
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kmccullough@apple.com [Tue, 26 Aug 2008 23:47:17 +0000 (23:47 +0000)]
JavaScriptCore:
2008-08-26 Kevin McCullough <kmccullough@apple.com>
Reviewed by Geoff and Cameron.
<rdar://problem/6174603> Hitting assertion in Register::codeBlock when
loading facebook (20516).
- This was a result of my line numbers change. After a host function is
called the stack does not get reset correctly.
- Oddly this also appears to be a slight speedup on SunSpider.
* VM/Machine.cpp:
(KJS::Machine::privateExecute):
LayoutTests:
2008-08-26 Kevin McCullough <kmccullough@apple.com>
Reviewed by Geoff and Cameron.
<rdar://problem/6174603> Hitting assertion in Register::codeBlock when
loading facebook (20516).
- This was a result of my line numbers change. After a host function is
called the stack does not get reset correctly.
- Oddly this also appears to be a slight speedup on SunSpider.
* fast/js/resources/stack-unwinding.js: Added.
* fast/js/stack-unwinding-expected.txt: Added.
* fast/js/stack-unwinding.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35940
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cfleizach@apple.com [Tue, 26 Aug 2008 22:56:03 +0000 (22:56 +0000)]
<rdar://problem/6069462> REGRESSION: webkit is returning flash objects as AXUnknown
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35939
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cfleizach@apple.com [Tue, 26 Aug 2008 22:43:22 +0000 (22:43 +0000)]
<rdar://problem/5817770> can't bring up contextual menu for embedded objects
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35938
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cfleizach@apple.com [Tue, 26 Aug 2008 22:29:14 +0000 (22:29 +0000)]
<rdar://problem/6176924> CrashTracer: [USER] 4 crashes in Safari at com.apple.WebCore: WebCore::RenderTableSection::numColumns
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35937
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Tue, 26 Aug 2008 21:21:26 +0000 (21:21 +0000)]
2008-08-26 Sam Weinig <sam@webkit.org>
Reviewed by Beth Dakin.
Fix typo.
* dom/DOMCoreException.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35936
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Tue, 26 Aug 2008 19:56:54 +0000 (19:56 +0000)]
WebCore:
2008-08-26 Sam Weinig <sam@webkit.org>
Reviewed by Oliver Hunt.
Fix https://bugs.webkit.org/show_bug.cgi?id=20479
<rdar://problem/6167660>
Take image redirects into account when tainting the canvas.
Test: http/tests/security/canvas-remote-read-redirect-to-remote-image.html
* html/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::CanvasRenderingContext2D::drawImageFromRect):
LayoutTests:
2008-08-26 Sam Weinig <sam@webkit.org>
Reviewed by Oliver Hunt.
Test for https://bugs.webkit.org/show_bug.cgi?id=20479
* http/tests/security/canvas-remote-read-redirect-to-remote-image-expected.txt: Added.
* http/tests/security/canvas-remote-read-redirect-to-remote-image.html: Added.
* http/tests/security/canvas-remote-read-svg-image-expected.txt:
* http/tests/security/canvas-remote-read-svg-image.html: Fix incorrect log message.
* http/tests/security/resources/redir.php: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35935
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Tue, 26 Aug 2008 19:51:28 +0000 (19:51 +0000)]
2008-08-26 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Change canvas tainting logic to ask the image if it contains
any resources outside of its own origin. Since there is no
way to determine if SVG images contain any resources outside its
origin, we always assume it does.
* html/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::CanvasRenderingContext2D::drawImageFromRect):
* platform/graphics/BitmapImage.h:
(WebCore::BitmapImage::hasSingleSecurityOrigin):
* platform/graphics/GeneratedImage.h:
(WebCore::GeneratedImage::hasSingleSecurityOrigin):
* platform/graphics/Image.h:
(WebCore::Image::hasSingleSecurityOrigin):
* platform/graphics/cg/PDFDocumentImage.h:
(WebCore::PDFDocumentImage::hasSingleSecurityOrigin):
* svg/graphics/SVGImage.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35934
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
britto@apple.com [Tue, 26 Aug 2008 17:51:03 +0000 (17:51 +0000)]
2008-08-26 Maxime Britto <britto@apple.com>
Reviewed by Adele.
<rdar://6159244> Pan-scrolling does not work on particular sites (starmagazine.com, nytimes.com)
This patch fixes the issues and modify the behavior of the panscroll by allowing it to jump to a parent layer when it reaches the end of its scrollable area.
This is matching the behavior of the mouse wheel when trying to scroll in a smaller layer of the page (div, textarea, ...) and when we reach the edge and keep scrolling then the whole page scrolls.
* page/EventHandler.cpp:
(WebCore::EventHandler::updateAutoscrollRenderer): if we switch to the parent layer to do the scroll we want to change the renderer for the panning
* page/EventHandler.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::panScrollFromPoint): now calls the scrollByRecursively method when it has computed the xDelta and yDelta
(WebCore::RenderLayer::scrollByRecursively): try to scroll the current layer by the xDelta and yDelta provided, if it can't it ask its parent layer to do so.
* rendering/RenderLayer.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::canBeProgramaticallyScrolled): a RenderObject must have a RenderLayer to be programatically scrolled
(WebCore::RenderObject::autoscroll): No need to check for the layer anymore since we verify it's present in the upmentionned method
(WebCore::RenderObject::panScroll): No need to check for the layer anymore too.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35933
268f45cc-cd09-0410-ab3c-
d52691b4dbfc