oliver@apple.com [Wed, 31 Dec 2008 06:49:34 +0000 (06:49 +0000)]
<https://bugs.webkit.org/show_bug.cgi?id=23049> [jsfunfuzz] With blocks do not correctly protect their scope object
<rdar://problem/6469742> Crash in JSC::TypeInfo::hasStandardGetOwnPropertySlot() running jsfunfuzz
Reviewed by Darin Adler
The problem that caused this was that with nodes were not correctly protecting
the final object that was placed in the scope chain. We correct this by forcing
the use of a temporary register (which stops us relying on a local register
protecting the scope) and changing the behaviour of op_push_scope so that it
will store the final scope object.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39524
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 31 Dec 2008 05:16:27 +0000 (05:16 +0000)]
2008-12-30 Simon Fraser <simon.fraser@apple.com>
Fix spurious test failures by rounding floating point values to
mask math differences between machines.
* transitions/transform-op-list-match-expected.txt:
* transitions/transform-op-list-match.html:
* transitions/transform-op-list-no-match-expected.txt:
* transitions/transform-op-list-no-match.html:
* transitions/transition-test-helpers.js:
(roundNumber):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39523
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 31 Dec 2008 00:11:50 +0000 (00:11 +0000)]
2008-12-30 Simon Fraser <simon.fraser@apple.com>
Reviewed by Darin Adler
https://bugs.webkit.org/show_bug.cgi?id=23042
Rather than doing a repaint() inside of computeAbsoluteRepaintRect()
when there is a reflection, compute the location of the rect inside
the reflection and take the union of the unreflected and reflected rects.
Test: fast/repaint/reflection-redraw.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeAbsoluteRepaintRect):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::reflectedRect):
* rendering/RenderObject.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39522
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Wed, 31 Dec 2008 00:07:20 +0000 (00:07 +0000)]
2008-12-30 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Sam Weinig.
Bug 23037: Parsing and reparsing disagree on automatic semicolon insertion
<https://bugs.webkit.org/show_bug.cgi?id=23037>
<rdar://problem/6467124>
Parsing and reparsing disagree about automatic semicolon insertion, so that a
function like
function() { a = 1, }
is parsed as being syntactically valid but gets a syntax error upon reparsing.
This leads to an assertion failure in Parser::reparse(). It is not that big of
an issue in practice, because in a Release build such a function will return
'undefined' when called.
In this case, we are not following the spec and it should be a syntax error.
However, unless there is a newline separating the ',' and the '}', WebKit would
not treat it as a syntax error in the past either. It would be a bit of work to
make the automatic semicolon insertion match the spec exactly, so this patch
changes it to match our past behaviour.
The problem is that even during reparsing, the Lexer adds a semicolon at the
end of the input, which confuses allowAutomaticSemicolon(), because it is
expecting either a '}', the end of input, or a terminator like a newline.
JavaScriptCore:
* parser/Lexer.cpp:
(JSC::Lexer::Lexer): Initialize m_isReparsing to false.
(JSC::Lexer::lex): Do not perform automatic semicolon insertion in the Lexer if
we are in the middle of reparsing.
(JSC::Lexer::clear): Set m_isReparsing to false.
* parser/Lexer.h:
(JSC::Lexer::setIsReparsing): Added.
* parser/Parser.cpp:
(JSC::Parser::reparse): Call Lexer::setIsReparsing() to notify the Lexer of
reparsing.
LayoutTests:
* fast/js/reparsing-semicolon-insertion-expected.txt: Added.
* fast/js/reparsing-semicolon-insertion.html: Added.
* fast/js/resources/reparsing-semicolon-insertion.js: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39521
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Tue, 30 Dec 2008 22:30:25 +0000 (22:30 +0000)]
WebCore:
Reviewed by Adele Peterson.
- fix <rdar://problem/6469944> REGRESSION(3.2.1-ToT): Repro crash in WebCore::HTMLInputElement::updatePlaceholderVisibility opening http://billshrink.com
Test: fast/forms/placeholder-non-textfield.html
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseMappedAttribute): Only call
updatePlaceholderVisibility() when the placeholder attribute changes if
the element is a text field.
LayoutTests:
Reviewed by Adele Peterson.
- test for <rdar://problem/6469944> REGRESSION(3.2.1-ToT): Repro crash in WebCore::HTMLInputElement::updatePlaceholderVisibility opening http://billshrink.com
* fast/forms/placeholder-non-textfield-expected.txt: Added.
* fast/forms/placeholder-non-textfield.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39520
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
pam@chromium.org [Tue, 30 Dec 2008 19:24:19 +0000 (19:24 +0000)]
2008-12-30 Brent Fulgham <bfulgham@gmail.com>
Reviewed by Darin Adler.
Landed by Pamela Greene.
Fixes: https://bugs.webkit.org/show_bug.cgi?id=22908.
Update website so that newbies are told they must set the
WebKitOutputDir to get a valid build.
* building/build.html: Add language (and link) indicating the
importance of setting the WebKitOutputDir variable, as well
as a link to instructions on how to do so.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39519
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Tue, 30 Dec 2008 12:19:23 +0000 (12:19 +0000)]
First step of Bug 3781: Animation via canvas could be faster
Reviewed by Antti Koivisto.
Amortise the cost of calling repaint by coalescing repaint rects
while the canvas is drawn to. In a later step we'll stop calling
repaint() directly, and instead have all dirty canvases repaint
at the end of JS execution.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39518
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Tue, 30 Dec 2008 11:08:26 +0000 (11:08 +0000)]
2008-12-30 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Antti Koivisto.
Bug 22931: Using the inspector with purgeable resources leads to assertion failures
<https://bugs.webkit.org/show_bug.cgi?id=22931>
Change InspectorResource::sourceString() so that it doesn't attempt to
unsafely get the data of a purgeable CachedResource.
* inspector/InspectorController.cpp:
(WebCore::InspectorResource::sourceString): Attempt to make a purgeable
resource unpurgeable, and if this not possible, return an empty string.
* loader/CachedResource.h: Make InspectorResource a friend of CachedResource.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39517
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Tue, 30 Dec 2008 07:54:28 +0000 (07:54 +0000)]
Yet another attempt to fix Tiger.
Reviewed by NOBODY(Build fix)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39516
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Tue, 30 Dec 2008 07:46:13 +0000 (07:46 +0000)]
Tiger build fix (correct this time)
Reviewed by NOBODY(build fix)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39515
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Tue, 30 Dec 2008 07:46:02 +0000 (07:46 +0000)]
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=23023
Remove incomplete support for opportunistic appcache entries
No change in behavior, thus no test.
* loader/appcache/ApplicationCacheResource.h:
(WebCore::ApplicationCacheResource::Type): Removed Opportunistic bit, will re-use when schema
version changes.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::scheduleApplicationCacheLoad):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
* loader/appcache/ApplicationCacheResource.cpp:
(WebCore::ApplicationCacheResource::dumpType):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39514
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Tue, 30 Dec 2008 07:42:11 +0000 (07:42 +0000)]
2008-12-29 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Rubber-stamped by Alexey Proskuryakov.
Revert r39509, because kjsyydebug is used in the generated code if YYDEBUG is 1.
* parser/Grammar.y:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39513
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Tue, 30 Dec 2008 07:39:35 +0000 (07:39 +0000)]
Tiger build fix
Reviewed by NOBODY(build fix)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39512
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
krit@webkit.org [Tue, 30 Dec 2008 07:33:13 +0000 (07:33 +0000)]
2008-12-29 Dirk Schulze <krit@webkit.org>
Reviewed by Oliver Hunt.
Add arcTo support for Cairo. This is needed by Canvas.
Cairo has no native support for arcTo. We have to make our
own implementation.
[Canvas] Cairo needs arcTo
https://bugs.webkit.org/show_bug.cgi?id=23003
* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::addArcTo):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39511
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Tue, 30 Dec 2008 07:21:03 +0000 (07:21 +0000)]
<rdar://problem/6358108> Insecure randomness in Math.random() leads to user tracking
Reviewed by Mark Rowe
Switch to arc4random on PLATFORM(DARWIN), this is ~1.5x slower than random(), but the
it is still so fast that there is no fathomable way it could be a bottleneck for anything.
randomNumber is called in two places
* During form submission where it is called once per form
* Math.random in JSC. For this difference to show up you have to be looping on
a cached local copy of random, for a large (>10000) calls.
No change in SunSpider.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39510
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Tue, 30 Dec 2008 06:15:35 +0000 (06:15 +0000)]
2008-12-29 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Rubber-stamped by Sam Weinig.
Remove unused kjsyydebug #define.
* parser/Grammar.y:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39509
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Tue, 30 Dec 2008 06:15:31 +0000 (06:15 +0000)]
Bug 23030: Cannot setTransform with a non-invertible ctm
Reviewed by Cameron Zwarich.
Removed a series of unnecessary and incorrect checks for an invertible
transform.
Test: fast/canvas/canvas-set-properties-with-non-invertible-ctm.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39508
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Tue, 30 Dec 2008 05:37:00 +0000 (05:37 +0000)]
2008-12-29 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver Hunt and Sam Weinig.
Bug 23029: REGRESSION (r39337): jsfunfuzz generates identical test files
<https://bugs.webkit.org/show_bug.cgi?id=23029>
<rdar://problem/6469185>
The unification of random number generation in r39337 resulted in random()
being initialized on Darwin, but rand() actually being used. Fix this by
making randomNumber() use random() instead of rand() on Darwin.
* wtf/RandomNumber.cpp:
(WTF::randomNumber):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39507
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Tue, 30 Dec 2008 05:10:21 +0000 (05:10 +0000)]
2008-12-29 Josh Roesslein <jroesslein@gmail.com>
Reviewed by Oliver Hunt.
Fixes: https://bugs.webkit.org/show_bug.cgi?id=22968
Context menu rendering error when full page zoomed
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39506
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Tue, 30 Dec 2008 03:00:37 +0000 (03:00 +0000)]
2008-12-29 Sam Weinig <sam@webkit.org>
Fix buildbots.
* runtime/Structure.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39505
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Tue, 30 Dec 2008 02:05:05 +0000 (02:05 +0000)]
2008-12-29 Sam Weinig <sam@webkit.org>
Reviewed by Mark Rowe.
Add some basic memory statistic logging for Node.
* dom/Node.cpp:
(WebCore::Node::dumpStatistics):
(WebCore::Node::Node):
(WebCore::Node::~Node):
(WebCore::Node::setDocument):
* dom/Node.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39504
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Tue, 30 Dec 2008 02:03:58 +0000 (02:03 +0000)]
2008-12-29 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Remove one use of DeprecatedPtrList.
* css/CSSRuleList.cpp:
(WebCore::CSSRuleList::~CSSRuleList):
(WebCore::CSSRuleList::length):
(WebCore::CSSRuleList::item):
(WebCore::CSSRuleList::deleteRule):
(WebCore::CSSRuleList::append):
(WebCore::CSSRuleList::insertRule):
* css/CSSRuleList.h: Change m_lstCSSRules from using DeprecatedPtrList to a Vector.
I measured no performance change and was comforted by the fact that we use a Vector
for StyleList, which serves the exact same purpose.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39503
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Tue, 30 Dec 2008 00:28:40 +0000 (00:28 +0000)]
2008-12-29 Sam Weinig <sam@webkit.org>
Reviewed by Oliver Hunt.
Patch for https://bugs.webkit.org/show_bug.cgi?id=23026
Move the deleted offsets vector into the PropertyMap
Saves 3 words per Structure.
* runtime/PropertyMapHashTable.h:
* runtime/Structure.cpp:
(JSC::Structure::addPropertyTransition):
(JSC::Structure::changePrototypeTransition):
(JSC::Structure::getterSetterTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::fromDictionaryTransition):
(JSC::Structure::copyPropertyTable):
(JSC::Structure::put):
(JSC::Structure::remove):
(JSC::Structure::rehashPropertyMapHashTable):
* runtime/Structure.h:
(JSC::Structure::propertyStorageSize):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39502
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele@apple.com [Mon, 29 Dec 2008 21:42:33 +0000 (21:42 +0000)]
2008-12-29 Adele Peterson <adele@apple.com>
Reviewed by Brady Eidson.
Fix for https://bugs.webkit.org/show_bug.cgi?id=21797
<rdar://problem/6310682> REGRESSION: Crash in CFHTTPCookieStorageCopy beneath WebCore::cookies() when
running fast/dom/document-attribute-js-null.html and http/tests/security/cookies/create-document.html
Return early if the document is trying to get or set a cookie with an empty cookie url.
* dom/Document.cpp:
(WebCore::Document::cookie):
(WebCore::Document::setCookie):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39501
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Mon, 29 Dec 2008 20:30:07 +0000 (20:30 +0000)]
Index: LayoutTests/ChangeLog
===================================================================
--- LayoutTests/ChangeLog (revision 39499)
+++ LayoutTests/ChangeLog (working copy)
@@ -1,3 +1,12 @@
+2008-12-29 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by NOBODY (OOPS!).
+
+ Fix Windows svn update - replace a file with a semicolon in its name with an Apache rewrite.
+
+ * http/tests/appcache/resources/.htaccess: Added.
+ * http/tests/appcache/resources/UNKNOWN_SECTION:: Removed.
+
2008-12-29 Glenn Wilson <gwilson@chromium.org>
Reviewed by Darin Adler.
Index: LayoutTests/http/tests/appcache/resources/.htaccess
===================================================================
--- LayoutTests/http/tests/appcache/resources/.htaccess (revision 0)
+++ LayoutTests/http/tests/appcache/resources/.htaccess (revision 0)
@@ -0,0 +1,2 @@
+RewriteEngine on
+RewriteRule ^UNKNOWN_SECTION: simple.txt [L,NS]
Index: LayoutTests/http/tests/appcache/resources/UNKNOWN_SECTION:
===================================================================
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39500
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
pam@chromium.org [Mon, 29 Dec 2008 19:22:04 +0000 (19:22 +0000)]
2008-12-29 Glenn Wilson <gwilson@chromium.org>
Reviewed by Darin Adler.
Landed by Pamela Greene.
Added new layout tests verifying that using a locally-scoped
variable in an event handler of a form takes precedence over
names of items in that form.
See: https://bugs.webkit.org/show_bug.cgi?id=22977
* fast/forms/var-name-conflict-in-form-event-handler-expected.txt: Added.
* fast/forms/var-name-conflict-in-form-event-handler.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39499
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Mon, 29 Dec 2008 11:08:30 +0000 (11:08 +0000)]
2008-12-29 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver Hunt.
Change code using m_body.get() as a boolean to take advantage of the
implicit conversion of RefPtr to boolean.
* runtime/JSFunction.cpp:
(JSC::JSFunction::~JSFunction):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39498
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Mon, 29 Dec 2008 01:35:02 +0000 (01:35 +0000)]
2008-12-28 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Sam Weinig.
Bug 23016: JavaScriptDebugServer::recompileAllJSFunctions() should not execute JS while reparsing all functions
<https://bugs.webkit.org/show_bug.cgi?id=23016>
<rdar://problem/6425077>
JavaScriptDebugServer::recompileAllJSFunctions() calls sourceParsed() while
reparsing all JS functions, which will execute JS in the inspector. Depending
on the order in which functions are recompiled, a function could have a new
body but other functions that have not been recompiled could have an optimized
(in the sense of inline caching) call to it, bypassing the check of whether or
not there is generated bytecode. This leads to a crash caused by accessing
indices off of a null pointer.
To fix the problem, simply delay calling sourceParsed() until after all functions
have been reparsed. The crash isn't 100% reproducible, but on the one test case
I have, this makes it impossible to reproduce after a large number of attempts,
when it used to happen every few attempts.
* inspector/JavaScriptDebugServer.cpp:
(WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39497
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Mon, 29 Dec 2008 00:25:09 +0000 (00:25 +0000)]
Rubber-stamped by Antti Koivisto.
Oops, remove some last minute ASSERTS that are obviously wrong.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39496
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Mon, 29 Dec 2008 00:16:19 +0000 (00:16 +0000)]
Reviewed by Antti Koivisto.
Fixes: https://bugs.webkit.org/show_bug.cgi?id=23015
Don't rely on HTMLFormControlElement in RenderTextControl.
Introduce an abstract FormControlElement class, containing the
valueMatchesRenderer/setValueMatchesRenderer, the only HTMLFormControlElement
specific methods that RenderTextControl relies on.
This makes it possible for WML to reuse RenderTextControl.
RenderTextControlSingleLine still relies on HTMLInputElement,
this will change if WMLInputElement is introduced.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39495
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Sun, 28 Dec 2008 21:33:57 +0000 (21:33 +0000)]
2008-12-28 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Darin Adler.
Bug 23006: Many Loader::Host member functions are not safe to use reentrantly
<https://bugs.webkit.org/show_bug.cgi?id=23006>
<rdar://problem/6216106>
Many Loader::Host member functions set m_processingResource to true when they
begin processing a resource and set it to false when they are done. Thanks to
JavaScript and the web inspector, almost anything can happen during the
processing of a resource, including these functions being called reentrantly,
which is unsafe due to this way of using m_processingResource.
This can theoretically cause a Loader::Host to be used after it is freed,
because when Loader::servedPendingRequests() is called, it will free Hosts
that have m_processingResource set to false.
To fix this, we replace m_processingResource with m_numResourcesProcessing,
which is incremented and decremented using a helper object, ProcessingResource.
There are no occurrences of crashes caused by this bug that are reproducible
by multiple people, but this fixes the problem of m_processingResource being
set to false while a Host is still alive.
* loader/loader.cpp:
(WebCore::Loader::Host::Host):
(WebCore::Loader::Host::didFinishLoading): Change to use ProcessingResource
instead of manually setting m_processingResource.
(WebCore::Loader::Host::didFail): Ditto.
(WebCore::Loader::Host::didReceiveData): Ditto.
* loader/loader.h:
(WebCore::Loader::Host::ProcessingResource::ProcessingResource): Added.
(WebCore::Loader::Host::ProcessingResource::~ProcessingResource): Added.
(WebCore::Loader::Host::processingResource): Change to use m_numResourcesProcessing
instead of just getting m_processingResource.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39494
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Sun, 28 Dec 2008 19:40:05 +0000 (19:40 +0000)]
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=23007
REGRESSION: Timer-related crash when closing Web Inspector
Test: fast/dom/Window/remove-timeout-crash.html
* bindings/js/DOMTimer.cpp: (WebCore::DOMTimer::fired): Besides deleting the timer, make
sure to remove it from a Document map.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39493
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Sun, 28 Dec 2008 17:19:00 +0000 (17:19 +0000)]
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=23012
Bring application cache manifest parsing up to date
Test: http/tests/appcache/manifest-parsing.html
* loader/appcache/ManifestParser.cpp:
(WebCore::Mode): Added a constant for unknown sections, which are ignored when parsing. This
is necessary for future extensions.
(WebCore::parseManifest): Parse unknown sections correctly. Ignore trailing tokens in
supported sections.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39492
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Sun, 28 Dec 2008 17:12:20 +0000 (17:12 +0000)]
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=23009
Add a test for application cache offline operation
* http/tests/resources/network-simulator.php: A proxy script to simulate a network connection
that can go offline, using an infinite redirect loop in offline mode to generate an error.
* http/tests/appcache/offline-access-expected.txt: Added.
* http/tests/appcache/offline-access.html: Added.
* http/tests/appcache/resources/offline-access-frame.html: Added.
* http/tests/appcache/resources/offline-access.js: Added.
* http/tests/appcache/resources/offline-access.manifest: Added.
Test that an application loads successfully from cache.
* http/tests/resources: Added.
* http/tests/resources/portabilityLayer.php: Copied from LayoutTests/http/tests/xmlhttprequest/resources/portabilityLayer.php.
* http/tests/resources/reset-temp-file.php: Copied from LayoutTests/http/tests/xmlhttprequest/resources/reset-temp-file.php.
* http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-invalidation-by-header.html:
* http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-invalidation-by-method.html:
* http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-timeout.html:
* http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache.html:
* http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache-invalidation.php:
* http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache-timeout.php:
* http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache.php:
* http/tests/xmlhttprequest/resources/portabilityLayer.php: Removed.
* http/tests/xmlhttprequest/resources/reset-temp-file.php: Removed.
* http/tests/appcache/resources/fail-on-update.php:
Moved some common scripts from xmlhttprequest/resources/ to resources/
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39491
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Sun, 28 Dec 2008 13:54:17 +0000 (13:54 +0000)]
Reviewed by Darin Adler.
Fixes: https://bugs.webkit.org/show_bug.cgi?id=22996
RenderTextControl heavily depends on HTMLInputElement & HTMLTextAreaElement.
It handles multi & single line text control rendering in one class. Split up
in two new classes: RenderTextControlSingleLine & RenderTextControlMultiLine.
This has several benefits - code is more readable now, the memory usage
for RenderTextControlMultiLine is reduced, as all stuff related to search fields
lives in RenderTextControlSingleLine, and it's easier to introduce an
abstraction for input/textarea-like elements for other HTML flavours like WML.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39490
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Sun, 28 Dec 2008 10:05:59 +0000 (10:05 +0000)]
2008-12-28 Dmitry Titov <dimich@chromium.org>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=22755
Prepare to add create/remove timeout methods to JSWorkerContext by moving
timer-specific code from JSDOMWindowBase to DOMTimer.
Moved everything JS-related from DOMTimer to ScheduledAction.
Now ScheduledAction is what it wanted to be all the time: a JS engine-specific
container for timer callback that knows how to invoke it.
DOMTimer is not anymore JS-specific.
This is mostly moving the code around. No intended functional changes.
* bindings/js/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::~DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::removeById):
(WebCore::DOMTimer::fired):
(WebCore::DOMTimer::stop):
* bindings/js/DOMTimer.h:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::installTimeout):
(WebCore::JSDOMWindowBase::removeTimeout):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/js/ScheduledAction.h:
* dom/Document.cpp:
(WebCore::Document::addTimeout):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39489
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cwzwarich@webkit.org [Sun, 28 Dec 2008 08:52:06 +0000 (08:52 +0000)]
2008-12-28 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Oliver Hunt.
Bug 22840: REGRESSION (r38349): Gmail doesn't load with profiling enabled
<https://bugs.webkit.org/show_bug.cgi?id=22840>
<rdar://problem/6468077>
JavaScriptCore:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitNewArray): Add an assertion that the range
of registers passed to op_new_array is sequential.
(JSC::BytecodeGenerator::emitCall): Correct the relocation of registers
when emitting profiler hooks so that registers aren't leaked. Also, add
an assertion that the 'this' register is always ref'd (because it is),
remove the needless protection of the 'this' register when relocating,
and add an assertion that the range of registers passed to op_call for
function call arguments is sequential.
(JSC::BytecodeGenerator::emitConstruct): Correct the relocation of
registers when emitting profiler hooks so that registers aren't leaked.
Also, add an assertion that the range of registers passed to op_construct
for function call arguments is sequential.
LayoutTests:
* fast/profiler/call-register-leak-expected.txt: Added.
* fast/profiler/call-register-leak.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39488
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mrowe@apple.com [Sun, 28 Dec 2008 02:54:12 +0000 (02:54 +0000)]
<rdar://problem/6467376> Race condition in WTF::currentThread can lead to a thread using two different identifiers during its lifetime
If a newly-created thread calls WTF::currentThread() before WTF::createThread calls establishIdentifierForPthreadHandle
then more than one identifier will be used for the same thread. We can avoid this by adding some extra synchronization
during thread creation that delays the execution of the thread function until the thread identifier has been set up, and
an assertion to catch this problem should it reappear in the future.
Reviewed by Alexey Proskuryakov.
* wtf/Threading.cpp: Added.
(WTF::NewThreadContext::NewThreadContext):
(WTF::threadEntryPoint):
(WTF::createThread): Add cross-platform createThread function that delays the execution of the thread function until
after the thread identifier has been set up.
* wtf/Threading.h:
* wtf/ThreadingGtk.cpp:
(WTF::establishIdentifierForThread):
(WTF::createThreadInternal):
* wtf/ThreadingNone.cpp:
(WTF::createThreadInternal):
* wtf/ThreadingPthreads.cpp:
(WTF::establishIdentifierForPthreadHandle):
(WTF::createThreadInternal):
* wtf/ThreadingQt.cpp:
(WTF::identifierByQthreadHandle):
(WTF::establishIdentifierForThread):
(WTF::createThreadInternal):
* wtf/ThreadingWin.cpp:
(WTF::storeThreadHandleByIdentifier):
(WTF::createThreadInternal):
Add Threading.cpp to the build.
* GNUmakefile.am:
* JavaScriptCore.pri:
* JavaScriptCore.scons:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* JavaScriptCoreSources.bkl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39487
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Sat, 27 Dec 2008 08:30:00 +0000 (08:30 +0000)]
Suggested by Dave Levin.
https://bugs.webkit.org/show_bug.cgi?id=22950
Another attempt to fix the failing XHR tests on Tiger buildbot: make file_put_contents
portable implementation return a result.
* http/tests/xmlhttprequest/resources/portabilityLayer.php:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39486
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Fri, 26 Dec 2008 21:31:20 +0000 (21:31 +0000)]
2008-12-26 David Levin <levin@chromium.org>
Reviewed by Alexey Proskuryakov.
https://bugs.webkit.org/show_bug.cgi?id=22950
Remove ensureTrailingSlash from appcache test.
* http/tests/appcache/resources/fail-on-update.php:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39485
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Fri, 26 Dec 2008 21:19:11 +0000 (21:19 +0000)]
2008-12-26 Zalan Bujtas <zbujtas@gmail.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=22999
Check if database thread exists.
* storage/Database.cpp:
(WebCore::Database::openAndVerifyVersion):
(WebCore::Database::markAsDeletedAndClose):
(WebCore::Database::tableNames):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39484
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Fri, 26 Dec 2008 21:01:11 +0000 (21:01 +0000)]
2008-12-26 Sam Weinig <sam@webkit.org>
Reviewed by Alexey Proskuryakov.
Remove unused method.
* runtime/Structure.h: Remove mutableTypeInfo.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39483
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Fri, 26 Dec 2008 20:00:42 +0000 (20:00 +0000)]
2008-12-26 David Levin <levin@chromium.org>
Reviewed by Alexey Proskuryakov.
https://bugs.webkit.org/show_bug.cgi?id=22950
Attempt to fix the failiing XHR tests on tiger buildbot.
Remove the no longer needed ensureTrailingSlash function.
* http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache-invalidation.php:
* http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache-timeout.php:
* http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache.php:
* http/tests/xmlhttprequest/resources/portabilityLayer.php:
Make sys_get_temp_dir() return "/tmp" when it can't find the temp directory through other means.
* http/tests/xmlhttprequest/resources/reset-temp-file.php:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39482
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Fri, 26 Dec 2008 19:54:23 +0000 (19:54 +0000)]
Reviewed by Sam Weinig.
- fix <rdar://problem/6467608> lastVisitWasFailure flag persists in
global history after a successful visit
* History/WebHistory.mm:
(-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always
update the wasFailure flag on the HistoryItem.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39481
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Fri, 26 Dec 2008 19:05:30 +0000 (19:05 +0000)]
Reviewed by Anders Carlsson.
Fix a layout test that was broken by the previous appcache commit
(it only passed every other time as a result).
* http/tests/appcache/fail-on-update.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39480
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Fri, 26 Dec 2008 18:59:19 +0000 (18:59 +0000)]
2008-12-26 Simon Fraser <simon.fraser@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=22981
Update more svg-as-image test results affected by the fix
for SVGImage drawing.
* platform/mac/fast/borders/svg-as-border-image-2-expected.checksum:
* platform/mac/fast/borders/svg-as-border-image-2-expected.png:
* platform/mac/fast/borders/svg-as-border-image-expected.checksum:
* platform/mac/fast/borders/svg-as-border-image-expected.png:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39479
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Fri, 26 Dec 2008 18:52:06 +0000 (18:52 +0000)]
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=23001
A call to applicationCache.update() from a cached event listener should be ignored
Test: http/tests/appcache/idempotent-update.html
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Only reset m_status after
dispatching events.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39478
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Fri, 26 Dec 2008 17:40:09 +0000 (17:40 +0000)]
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=22997
ASSERTION FAILED: !m_resources.contains(url) in ApplicationCache::addResource()
Tests: http/tests/appcache/top-frame-1.html
http/tests/appcache/top-frame-2.html
http/tests/appcache/top-frame-3.html
http/tests/appcache/top-frame-4.html
* loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest):
Fixed one more instance of top level frame being used for caching purposes.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39477
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Fri, 26 Dec 2008 11:03:56 +0000 (11:03 +0000)]
2008-12-26 David Levin <levin@chromium.org>
Reviewed by Alexey Proskuryakov.
https://bugs.webkit.org/show_bug.cgi?id=22950
Added more logging to reset-temp-file to help expose potential issues that could cause test failures (on the tiger buildbot).
If there are issues in reset-temp-file, they are printed from the test access-control-basic-allow-preflight-cache.html
* http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache.html:
* http/tests/xmlhttprequest/resources/reset-temp-file.php:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39476
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Fri, 26 Dec 2008 08:46:56 +0000 (08:46 +0000)]
2008-12-26 Dmitry Titov <dimich@chromium.org>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=22987
Fix for broken test editing/execCommand/5763082.html
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::mergeIdenticalElements): Used local RefPtr to hold onto
function parameter across multiple calls.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39475
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Thu, 25 Dec 2008 21:12:07 +0000 (21:12 +0000)]
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=22993
Application cache shouldn't be inherited by subframes
<rdar://problem/6284708> AppCache crashes in ApplicationCacheResource::addType()
This crash happened because main resource for subframe was looked up in top frame's
appcache. If not for the spec change, it could have been fixed by preventing the load
altogether.
Test: http/tests/appcache/foreign-iframe-main.html
I intend to write additional tests for the behavior change.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::applicationCache):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::load):
* loader/appcache/DOMApplicationCache.cpp:
(WebCore::DOMApplicationCache::associatedCache):
Removed DocumentLoader::topLevelApplicationCache(), and changed callers accordingly.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
Removed checks for the frame being top-level one, now that subframes are cached independently.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39474
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Thu, 25 Dec 2008 14:18:34 +0000 (14:18 +0000)]
2008-12-25 Antti Koivisto <antti@apple.com>
Reviewed by Oliver Hunt.
<rdar://problem/6465669> Frequent !isPurgeable() assertion in WebCore::CachedResource::addClient
Disallow turning resources that are being revalidated to purgable state.
No test, the condition is difficult to produce in DRT.
* loader/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::allClientsRemoved):
* loader/CachedImage.cpp:
(WebCore::CachedImage::destroyDecodedData):
* loader/CachedResource.cpp:
(WebCore::CachedResource::isSafeToMakePurgeable):
(WebCore::CachedResource::makePurgeable):
* loader/CachedResource.h:
* loader/CachedScript.cpp:
(WebCore::CachedScript::destroyDecodedData):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39473
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Thu, 25 Dec 2008 10:55:13 +0000 (10:55 +0000)]
Qt build fix.
* WebCore.pro: Added ThreadGlobalData.cpp.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39472
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mrowe@apple.com [Thu, 25 Dec 2008 05:26:33 +0000 (05:26 +0000)]
Move the guts of determineCurrentSVNRevision to VCSUtils as svnRevisionForDirectory,
and make it work for git too.
Reviewed by Timothy Hatcher.
* Scripts/VCSUtils.pm:
* Scripts/webkitdirs.pm:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39471
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mrowe@apple.com [Thu, 25 Dec 2008 00:42:01 +0000 (00:42 +0000)]
Build fix.
* WebCore.base.exp: Remove a symbol from the export file now that it is no longer generated.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39470
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 24 Dec 2008 21:39:44 +0000 (21:39 +0000)]
2008-12-24 Simon Fraser <simon.fraser@apple.com>
Reviewed by Oliver Hunt
https://bugs.webkit.org/show_bug.cgi?id=21910
Update more svg-as-image test results affected by the fix
for SVGImage drawing.
* platform/mac/fast/images/svg-as-background-expected.checksum:
* platform/mac/fast/images/svg-as-background-expected.png:
* platform/mac/fast/images/svg-as-image-expected.checksum:
* platform/mac/fast/images/svg-as-image-expected.png:
* platform/mac/fast/images/svg-as-relative-image-expected.checksum:
* platform/mac/fast/images/svg-as-relative-image-expected.png:
* transforms/2d/compound-transforms-vs-containers.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39469
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Wed, 24 Dec 2008 18:08:05 +0000 (18:08 +0000)]
Fix a typo in ChangeLog.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39468
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Wed, 24 Dec 2008 18:06:45 +0000 (18:06 +0000)]
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=22982
http/tests/navigation/post-goback-repost-policy.html fails on Tiger
Change resources that are accessed with POST form .html to .php. I don't know why Apache 2.0
had no problem with this.
* http/tests/navigation/post-goback-repost-policy.html:
* http/tests/navigation/resources/goback-with-policydelegate.html: Removed.
* http/tests/navigation/resources/goback-with-policydelegate.php: Copied from LayoutTests/http/tests/navigation/resources/goback-with-policydelegate.html.
* http/tests/navigation/resources/post-target-policy-test.html: Removed.
* http/tests/navigation/resources/post-target-policy-test.php: Copied from LayoutTests/http/tests/navigation/resources/post-target-policy-test.html.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39467
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zecke@webkit.org [Wed, 24 Dec 2008 12:44:27 +0000 (12:44 +0000)]
Unreviewed build fix to find addSubresourceURL
This is needed to compile on WebKit/Gtk+
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39466
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Wed, 24 Dec 2008 07:46:04 +0000 (07:46 +0000)]
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=22980
WebCore uses more thread specific keys than it really needs
Consolidated ThreadSpecific data into a single ThreadGlobalData structure.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39465
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mrowe@apple.com [Wed, 24 Dec 2008 06:12:12 +0000 (06:12 +0000)]
Build fix.
* WebCore.xcodeproj/project.pbxproj: CSSPropertyNames.h is a generated file so it needs to be explicitly copied
into the PrivateHeaders directory, rather than relying on the automatic copying of headers which runs before the
derived sources are generated.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39464
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 24 Dec 2008 05:23:36 +0000 (05:23 +0000)]
2008-12-23 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein
https://bugs.webkit.org/show_bug.cgi?id=22941
If the document element has opacity, we need to erase the view background to
white before painting.
Test: fast/backgrounds/opacity-on-document-element.html
* rendering/RenderView.cpp:
(WebCore::rendererObscuresBackground):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39463
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Wed, 24 Dec 2008 05:19:54 +0000 (05:19 +0000)]
2008-12-23 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein
https://bugs.webkit.org/show_bug.cgi?id=21910
Fix SVGImage painting by ensuring that the SVGImage resizes its FrameView correctly.
Otherwise the FrameView is left at 0x0, and nothing paints.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39462
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mrowe@apple.com [Wed, 24 Dec 2008 03:51:57 +0000 (03:51 +0000)]
Versioning.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39458
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Tue, 23 Dec 2008 21:42:46 +0000 (21:42 +0000)]
2008-12-23 Darin Adler <darin@apple.com>
Reviewed by John Sullivan.
- improve robustness of undo/redo in HTML editing to fix the following bugs
<https://bugs.webkit.org/show_bug.cgi?id=19703> Crash in WebCore::InsertNodeBeforeCommand::doUnapply()
<rdar://problem/4059423> DOM operations performed on editable HTML can cause a crash later during Undo
Major categories of improvements:
1) Added null checks.
2) Eliminated type casts without corresponding type checks.
3) Avoided possible infinite loops by building up lists of nodes to operate on
before starting to make DOM changes.
4) Use more RefPtr.
No test at this time, but test cases should follow in separate patches.
* WebCore.xcodeproj/project.pbxproj: Set the role of CSSPropertyNames.h to Private so it
can be used in other Private headers, specifically editing ones.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::locateCousinList): Adopt parentElement.
(WebCore::CSSStyleSelector::locateSharedStyle): Ditto.
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
* dom/Element.cpp: (WebCore::Element::cloneElement): Added.
* dom/Element.h: Added cloneElement and an implementation of parentElement.
* dom/Node.h: Moved parentElement from here to Element.h and changed its
implementation so it will return 0 when the parent is not an element
(document, document fragment, etc.).
* editing/AppendNodeCommand.cpp:
(WebCore::AppendNodeCommand::AppendNodeCommand): Made parent be an Element.
Moved assertions from doApply in here.
(WebCore::AppendNodeCommand::doApply): Simplified to just a single unchecked
appendChild call.
(WebCore::AppendNodeCommand::doUnapply): Simplified to just a single remove call.
* editing/AppendNodeCommand.h: Updated.
* editing/ApplyStyleCommand.cpp:
(WebCore::createStyleSpanElement): Eliminate casting by creating an element in a more
direct way with new instead of createElementNS.
(WebCore::ApplyStyleCommand::ApplyStyleCommand): Use PassRefPtr.
(WebCore::ApplyStyleCommand::removeCSSStyle): Use CSSPropertyID.
(WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Use cloneElement.
* editing/ApplyStyleCommand.h:
* editing/BreakBlockquoteCommand.cpp:
(WebCore::BreakBlockquoteCommand::doApply): Use Element* and cloneElement.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::applyStyledElement): Use PassRefPtr and unsigned.
(WebCore::CompositeEditCommand::removeStyledElement): Ditto.
(WebCore::CompositeEditCommand::insertNodeBefore): Ditto.
(WebCore::CompositeEditCommand::insertNodeAfter): Ditto.
(WebCore::CompositeEditCommand::insertNodeAt): Ditto.
(WebCore::CompositeEditCommand::appendNode): Ditto.
(WebCore::CompositeEditCommand::removeChildrenInRange): Ditto. Also use a vector to
make the list of children in case removing them has side effects.
(WebCore::CompositeEditCommand::removeNode): Ditto.
(WebCore::CompositeEditCommand::removeNodePreservingChildren): Ditto.
(WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Ditto.
(WebCore::CompositeEditCommand::splitTextNode): Ditto.
(WebCore::CompositeEditCommand::splitElement): Ditto.
(WebCore::CompositeEditCommand::mergeIdenticalElements): Ditto.
(WebCore::CompositeEditCommand::wrapContentsInDummySpan): Ditto.
(WebCore::CompositeEditCommand::splitTextNodeContainingElement): Ditto.
(WebCore::CompositeEditCommand::joinTextNodes): Ditto.
(WebCore::CompositeEditCommand::inputText): Ditto.
(WebCore::CompositeEditCommand::insertTextIntoNode): Ditto.
(WebCore::CompositeEditCommand::deleteTextFromNode): Ditto.
(WebCore::CompositeEditCommand::replaceTextInNode): Ditto.
(WebCore::CompositeEditCommand::insertNodeAtTabSpanPosition): Ditto.
(WebCore::CompositeEditCommand::removeCSSProperty): Ditto.
(WebCore::CompositeEditCommand::removeNodeAttribute): Ditto. Implement by calling
setNodeAttribute instead of with its own SimpleEditCommand.
(WebCore::CompositeEditCommand::setNodeAttribute): Ditto.
(WebCore::CompositeEditCommand::deleteInsignificantText): Ditto.
(WebCore::CompositeEditCommand::appendBlockPlaceholder): Ditto.
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded): Ditto.
(WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt): Ditto. Don't
bother using an undoable operation to put the break element into the paragraph
element because there's no need to split them and redo this when doing undo/redo.
(WebCore::CompositeEditCommand::moveParagraphs): Ditto.
(WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
* editing/CompositeEditCommand.h: Ditto.
* editing/DeleteFromTextNodeCommand.cpp:
(WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand): Use unsigned.
(WebCore::DeleteFromTextNodeCommand::doApply): Eliminated inappropriate assertions.
(WebCore::DeleteFromTextNodeCommand::doUnapply): Ditto.
* editing/DeleteFromTextNodeCommand.h:
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeNode): Use PassRefPtr.
(WebCore::DeleteSelectionCommand::deleteTextFromNode): Ditto.
* editing/DeleteSelectionCommand.h:
* editing/FormatBlockCommand.cpp:
(WebCore::FormatBlockCommand::FormatBlockCommand): Use AtomicString.
(WebCore::FormatBlockCommand::doApply): Use Element.
* editing/FormatBlockCommand.h:
* editing/IndentOutdentCommand.cpp:
(WebCore::createIndentBlockquoteElement): Use new to create the element
instead of calling a function so we have a more specific type.
(WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
Use RefPtr and Element.
(WebCore::IndentOutdentCommand::indentRegion): Ditto.
(WebCore::IndentOutdentCommand::outdentParagraph): Ditto.
* editing/IndentOutdentCommand.h:
* editing/InsertIntoTextNodeCommand.cpp:
(WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
Use unsigned. Added an assertion.
(WebCore::InsertIntoTextNodeCommand::doApply): Eliminated inappropriate assertions.
(WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
* editing/InsertIntoTextNodeCommand.h:
* editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use Element.
(WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
* editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::doApply): Use Element.
* editing/InsertNodeBeforeCommand.cpp:
(WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): Moved assertions
here from doApply.
(WebCore::InsertNodeBeforeCommand::doApply): Eliminated inappropriate assertions.
Added a null check.
(WebCore::InsertNodeBeforeCommand::doUnapply): Simplified to just a single remove call.
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply): Use Element and cloneElement.
* editing/JoinTextNodesCommand.cpp:
(WebCore::JoinTextNodesCommand::doApply): Eliminated inappropriate assertions.
Added some runtime checks. Don't store anything in m_offset.
(WebCore::JoinTextNodesCommand::doUnapply): Ditto.
* editing/JoinTextNodesCommand.h:
* editing/MergeIdenticalElementsCommand.cpp:
(WebCore::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand): Moved
an assertion here from doApply.
(WebCore::MergeIdenticalElementsCommand::doApply): Eliminated inappropriate assertions.
Added a null check. Changed implementation to use remove to avoid null parent issue.
Use a vector of nodes to avoid possible infinite loop if mutation happens while iterating.
(WebCore::MergeIdenticalElementsCommand::doUnapply): Ditto.
* editing/ModifySelectionListLevel.cpp:
(WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange): Use Element*.
(WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
* editing/ModifySelectionListLevel.h:
* editing/RemoveCSSPropertyCommand.cpp:
(WebCore::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): Use PassRefPtr and
CSSPropertyID. Also renamed m_decl to m_style.
(WebCore::RemoveCSSPropertyCommand::doApply): Eliminated inappropriate assertions.
(WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto.
* editing/RemoveNodeAttributeCommand.cpp: Removed contents of this file. To be deleted.
Use SetNodeAttributeCommand instead.
* editing/RemoveNodeAttributeCommand.h: Ditto.
* editing/RemoveNodeCommand.cpp:
(WebCore::RemoveNodeCommand::RemoveNodeCommand): Moved assertions here from doApply.
Don't initialize m_refChild here; rather do it in doApply.
(WebCore::RemoveNodeCommand::doApply): Eliminated inappropriate assertions. Added
checks and streamlined implementation.
(WebCore::RemoveNodeCommand::doUnapply): Ditto.
* editing/RemoveNodeCommand.h:
* editing/RemoveNodePreservingChildrenCommand.cpp:
(WebCore::RemoveNodePreservingChildrenCommand::doApply): Use a vector.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::insertFragmentForTestRendering): Removed now-unneeded cast.
* editing/SetNodeAttributeCommand.cpp:
(WebCore::SetNodeAttributeCommand::SetNodeAttributeCommand): Use AtomicString.
Removed assertion that prevents us from using this to remove an attribute.
(WebCore::SetNodeAttributeCommand::doApply): Eliminated inappropriate assertions.
(WebCore::SetNodeAttributeCommand::doUnapply): Ditto.
* editing/SetNodeAttributeCommand.h:
* editing/SplitElementCommand.cpp:
(WebCore::SplitElementCommand::SplitElementCommand): Moved assertion here from doApply.
(WebCore::SplitElementCommand::doApply): Check some more invariants and use a vector
to avoid possible infinite loops.
(WebCore::SplitElementCommand::doUnapply): Ditto.
* editing/SplitTextNodeCommand.cpp:
(WebCore::SplitTextNodeCommand::SplitTextNodeCommand): Moved assertions and comment
here from doApply.
(WebCore::SplitTextNodeCommand::doApply): Check for null and failures when applying.
(WebCore::SplitTextNodeCommand::doUnapply): Ditto.
* editing/SplitTextNodeContainingElementCommand.cpp:
(WebCore::SplitTextNodeContainingElementCommand::doApply): Use Element.
* editing/WrapContentsInDummySpanCommand.cpp:
(WebCore::WrapContentsInDummySpanCommand::doApply): Check for null and ignore failures.
Don't reuse the dummy span. Simplified logic.
(WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto.
* editing/htmlediting.cpp:
(WebCore::isBlock): Make sure this returns true only for elements.
(WebCore::enclosingBlock): Return an Element*.
(WebCore::enclosingTableCell): Ditto.
(WebCore::enclosingList): Return an HTMLElement*.
(WebCore::outermostEnclosingList): Return an HTMLElement*.
(WebCore::createDefaultParagraphElement): Return an HTMLElement*.
(WebCore::createBreakElement): Return an HTMLElement*.
(WebCore::createOrderedListElement): Return an HTMLElement*.
(WebCore::createUnorderedListElement): Return an HTMLElement*.
(WebCore::createListItemElement): Return an HTMLElement*.
(WebCore::createHTMLElement): Return an HTMLElement*.
* editing/htmlediting.h:
* editing/markup.cpp:
(WebCore::createFragmentFromText): Use createBreakElement and use Element*.
* page/MouseEventWithHitTestResults.cpp:
(WebCore::MouseEventWithHitTestResults::targetNode): Use parentElement.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39456
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Tue, 23 Dec 2008 21:40:36 +0000 (21:40 +0000)]
WebKit:
2008-12-23 Darin Adler <darin@apple.com>
Reviewed by Alexey Proskuryakov.
- fix https://bugs.webkit.org/show_bug.cgi?id=22976
crash due to Mail's use of WebArchive and WebResource on non-main thread
* StringsNotToBeLocalized.txt: Updated.
* WebKit.xcodeproj/project.pbxproj: Added new file WebNSObjectExtras.mm and
existing file WebResourceInternal.h.
WebKit/mac:
2008-12-23 Darin Adler <darin@apple.com>
Reviewed by Alexey Proskuryakov (a slightly earlier version).
- fix https://bugs.webkit.org/show_bug.cgi?id=22976
crash due to Mail's use of WebArchive and WebResource on non-main thread
* Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of
WebKitRunningOnMainThread function, which was just a cover for pthread_main_np.
* Misc/WebKitLogging.m: Ditto.
* Misc/WebKitVersionChecks.h: Added a version after which we won't do the
main thread workaround.
* Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:,
which performs a selector on the main thread, waits for it to complete, and then
returns the value on the caller thread.
* Misc/WebNSObjectExtras.mm: Added.
* WebView/WebArchive.mm:
(-[WebArchive init]): Added WebCoreThreadViolationCheck.
(-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform
initialization on main thread if needMailThreadWorkaround is true.
Also added WebCoreThreadViolationCheck.
(-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck.
(-[WebArchive mainResource]): Get property on main thread if
needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
(-[WebArchive subresources]): Ditto.
(-[WebArchive subframeArchives]): Ditto.
(-[WebArchive data]): Ditto.
(-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck.
(-[WebArchive _coreLegacyWebArchive]): Ditto.
(-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread
version of initWithMainResource above.
* WebView/WebResource.mm:
(-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck.
(-[WebResource data]): Get property on main thread if
needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
(-[WebResource URL]): Ditto.
(-[WebResource MIMEType]): Ditto.
(-[WebResource textEncodingName]): Ditto.
(-[WebResource frameName]): Ditto.
(-[WebResource _ignoreWhenUnarchiving]): Ditto.
(-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
Perform initialization on main thread if needMailThreadWorkaround is true.
Also added WebCoreThreadViolationCheck.
(-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation.
(-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of
getting at coreResource directly.
(-[WebResource _response]): Get property on main thread if
needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
(-[WebResource _stringValue]): Ditto.
(+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added.
(-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread
version of _initWithData above.
* WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal
clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND
and the needMainThreadWorkaround helper function.
* Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h
file. This probably fixes clean builds.
* WebCoreSupport/WebIconDatabaseClient.mm: Ditto.
* WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h,
since it's not actually used.
* WebView/WebDataSource.mm: Ditto.
* WebView/WebHTMLRepresentation.mm: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39455
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Tue, 23 Dec 2008 20:28:37 +0000 (20:28 +0000)]
2008-12-23 Darin Adler <darin@apple.com>
Reviewed by Dan Bernstein.
* dom/Node.h: Tweak comments and order of bits that Sam moved
here last night.
* dom/Node.cpp: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39454
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jchaffraix@webkit.org [Tue, 23 Dec 2008 19:01:12 +0000 (19:01 +0000)]
WebCore:
2008-12-22 Julien Chaffraix <jchaffraix@webkit.org>
Reviewed by Darin Adler.
Bug 11106: Some XMLHttpRequest URI resolving tests fail
https://bugs.webkit.org/show_bug.cgi?id=11106
Use the ScriptExecutionContext to resolve the URI when calling open in JavaScript.
The previous code was using the containing DOMWindow to do so which would fail for
XMLHttpRequest object being passed between iframe.
Tests: http/tests/xmlhttprequest/uri-resolution-opera-open-004.html
http/tests/xmlhttprequest/uri-resolution-opera-open-005.html
http/tests/xmlhttprequest/uri-resolution-opera-open-006.html
http/tests/xmlhttprequest/uri-resolution-opera-open-007.html
http/tests/xmlhttprequest/uri-resolution-opera-open-008.html
http/tests/xmlhttprequest/uri-resolution-opera-open-009.html
http/tests/xmlhttprequest/uri-resolution-opera-open-010.html
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::open): Use the ScriptExecutionContext
to resolve the URL.
* dom/Document.cpp:
(WebCore::Document::virtualCompleteURL): Virtual method added to
avoid performance hit on completeURL call.
* dom/Document.h:
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::completeURL): Non-virtual method
that wrap the call to the virtual call.
* dom/WorkerContext.cpp:
(WebCore::WorkerContext::virtualCompleteURL): Pure virtual method.
* dom/WorkerContext.h:
LayoutTests:
2008-12-22 Julien Chaffraix <jchaffraix@webkit.org>
Reviewed by Darin Adler.
Test case for bug 11106: Some XMLHttpRequest URI resolving tests fail
https://bugs.webkit.org/show_bug.cgi?id=11106
These tests are borrowed from Opera's test case suite (http://tc.labs.opera.com/apis/XMLHttpRequest).
They correspond to open/004.html - open/010.html which were previously failing.
* http/tests/xmlhttprequest/resources/test-uri-resolution.txt: Added.
* http/tests/xmlhttprequest/resources/uri-resolution-opera-open-004-iframe.html: Added.
* http/tests/xmlhttprequest/resources/uri-resolution-opera-open-005-iframe.html: Added.
* http/tests/xmlhttprequest/resources/uri-resolution-opera-open-006-iframe.html: Added.
* http/tests/xmlhttprequest/resources/uri-resolution-opera-open-007-iframe.html: Added.
* http/tests/xmlhttprequest/resources/uri-resolution-opera-open-008-iframe.html: Added.
* http/tests/xmlhttprequest/resources/uri-resolution-opera-open-009-iframe.html: Added.
* http/tests/xmlhttprequest/resources/uri-resolution-opera-open-010-iframe.html: Added.
* http/tests/xmlhttprequest/test-uri-resolution.txt: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-004-expected.txt: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-004.html: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-005-expected.txt: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-005.html: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-006-expected.txt: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-006.html: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-007-expected.txt: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-007.html: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-008-expected.txt: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-008.html: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-009-expected.txt: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-009.html: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-010-expected.txt: Added.
* http/tests/xmlhttprequest/uri-resolution-opera-open-010.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39453
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Tue, 23 Dec 2008 17:25:30 +0000 (17:25 +0000)]
2008-12-23 Darin Adler <darin@apple.com>
Reviewed by Dan Bernstein.
- fix https://bugs.webkit.org/show_bug.cgi?id=22979
crash seen in -[WebView drawsBackground] when quitting
<rdar://problem/6464601>
* WebView/WebView.mm:
(-[WebView drawsBackground]): Added comment and a null check for _private.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39452
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Tue, 23 Dec 2008 17:22:10 +0000 (17:22 +0000)]
2008-12-23 Darin Adler <darin@apple.com>
Reviewed by Dan Bernstein.
- https://bugs.webkit.org/show_bug.cgi?id=22978
a couple tweaks to the new strokeBoundingRect functions
* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
if the applier is non-null.
* platform/graphics/cg/PathCG.cpp:
(WebCore::putBytesNowhere): Added.
(WebCore::createScratchContext): Changed to use a "/dev/null" type
function to discard bytes rather than using a data object. This
eliminates the possibility that memory will be used if someone draws
into the scratch context by accident. Also moved to the top of the
file; it was in a slightly strange place before.
(WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
if the applier is non-null. Simplify the empty path special case.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39451
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
barraclough@apple.com [Tue, 23 Dec 2008 07:08:59 +0000 (07:08 +0000)]
2008-12-22 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Fix rounding / bounds / signed comparison bug in ExecutableAllocator.
ExecutableAllocator::alloc assumed that m_freePtr would be aligned. This was
not always true, since the first allocation from an additional pool would not
be rounded up. Subsequent allocations would be unaligned, and too much memory
could be erroneously allocated from the pool, when the size requested was
available, but the size rounded up to word granularity was not available in the
pool. This may result in the value of m_freePtr being greater than m_end.
Under these circumstances, the unsigned check for space will always pass,
resulting in pointers to memory outside of the arena being returned, and
ultimately segfaulty goodness when attempting to memcpy the hot freshly jitted
code from the AssemblerBuffer.
https://bugs.webkit.org/show_bug.cgi?id=22974
... and probably many, many more.
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::alloc):
(JSC::ExecutablePool::roundUpAllocationSize):
(JSC::ExecutablePool::ExecutablePool):
(JSC::ExecutablePool::poolAllocate):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39450
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Tue, 23 Dec 2008 03:05:47 +0000 (03:05 +0000)]
2008-12-22 Sam Weinig <sam@webkit.org>
Reviewed by Mark Rowe.
Save a word in all Elements by moving the 5 loose bits to Node,
where we had 16 spare.
* dom/Element.cpp:
(WebCore::Element::Element):
* dom/Element.h:
* dom/Node.cpp:
(WebCore::Node::Node):
* dom/Node.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39449
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Tue, 23 Dec 2008 02:14:09 +0000 (02:14 +0000)]
Reviewed by George Staikos.
Fixes: https://bugs.webkit.org/show_bug.cgi?id=22972
Add WML <meta> element support. All needed functionality is present
in Document::processHttpEquiv, already covered by tests.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39448
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Tue, 23 Dec 2008 01:55:21 +0000 (01:55 +0000)]
Rubber-stamped by Darin Adler.
Don't reference specific layout tests in comments.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39447
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Tue, 23 Dec 2008 01:31:15 +0000 (01:31 +0000)]
Reviewed by George Staikos.
Fixes: https://bugs.webkit.org/show_bug.cgi?id=22965
Add WML <head> element support. Doesn't require a WMLHeadElement.
No functional behaviour, as we already created a WMLElement for headTag, by default.
It's just cleaner to list <head> in WMLTagNames, forwarding to a WMLElement constructor.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39446
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Tue, 23 Dec 2008 01:29:05 +0000 (01:29 +0000)]
Reviewed by George Staikos.
Fixes: https://bugs.webkit.org/show_bug.cgi?id=22971
Fix regression caused by the HTMLFormElement refactorization.
File form elements without a name have to be included in multipart/form-data
submission. Cover this behaviour with a new test case.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39445
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Tue, 23 Dec 2008 01:06:58 +0000 (01:06 +0000)]
<rdar://problem/6438298> Bump schema version for app cache
Reviewed by Alexey Proskuryakov.
* loader/appcache/ApplicationCacheStorage.cpp: Increment
SchemaVersion from 2 to 3.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39444
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Tue, 23 Dec 2008 00:49:34 +0000 (00:49 +0000)]
Use Deque in CSSStyleSheet::addSubresourceStyleURLs()
Reviewed by Darin Adler.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::addSubresourceStyleURLs): Replaced
use of ListHashSet with more efficient Deque.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39443
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Tue, 23 Dec 2008 00:25:13 +0000 (00:25 +0000)]
Reviewed by Sam Weinig.
Fix obvious crash fix for WML enabled builds.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39442
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Tue, 23 Dec 2008 00:00:14 +0000 (00:00 +0000)]
Bug 11850: Webarchive fails to save images referenced in CSS
<https://bugs.webkit.org/show_bug.cgi?id=11850>
Reviewed by Darin Adler.
WebCore:
This entry contains two parts since the tests for adding a
completeURL() method to StyleSheet and CSSStyleSheet (part 1) depend
on Bug 11850 being fixed (part 2).
--
Tests: http/tests/webarchive/test-css-url-encoding-shift-jis.html
http/tests/webarchive/test-css-url-encoding-utf-8.html
http/tests/webarchive/test-css-url-encoding.html
Added completeURL() methods to StyleSheet and CSSStyleSheet that
match the behavior of Document::completeURL(). Most notably,
CSSStyleSheet::completeURL() uses the charset of the stylesheet
(if it exists) to construct URLs, just like Document::completeURL().
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Use CSSStyleSheet::completeURL().
(WebCore::CSSParser::parseContent): Ditto.
(WebCore::CSSParser::parseFillImage): Ditto.
(WebCore::CSSParser::parseFontFaceSrc): Ditto.
(WebCore::CSSParser::parseBorderImage): Ditto.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::completeURL): Added.
* css/CSSStyleSheet.h:
(WebCore::CSSStyleSheet::completeURL): Added declaration.
* css/StyleSheet.cpp:
(WebCore::StyleSheet::completeURL): Added.
* css/StyleSheet.h:
(WebCore::StyleSheet::completeURL): Added declaration.
* dom/Document.cpp:
(WebCore::Document::completeURL): Added comment referring to the new
completeURL() methods in StyleSheet and CSSStyleSheet.
--
Tests: webarchive/test-css-url-resources-in-stylesheets.html
webarchive/test-css-url-resources-inline-styles.html
Walk stylesheets and inline style attributes for url() references
when building a list of URLs to include in a webarchive. Note that
not all URLs found this way will be included in the webarchive if
they were not used (and thus not downloaded) when laying out the
page.
The key method for CSS stylesheets is
CSSStyleSheet::addSubresourceStyleURLs() which iterates over all
CSSStyleSheet objects recursively referenced from its own stylesheet
through @import rules. Starting with the CSSRule objects in each
sheet and continuing down through the CSSMutableStyleDeclaration and
CSSValue objects, addSubresourceStyleURLs() methods are called to
gather URLs.
For inline style attributes in HTML DOM elements,
StyledElement::addSubresourceAttributeURLs() calls
CSSMutableStyleDeclaration::addSubresourceStyleURLs() to gather URLs
from each element, hence the need to call
addSubresourceAttributeURLs() on superclasses when the method is
implemented on the element class itself.
* css/CSSBorderImageValue.cpp:
(WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added.
* css/CSSBorderImageValue.h:
(WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added
declaration.
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added.
* css/CSSFontFaceRule.h:
(WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added
declaration.
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added.
* css/CSSFontFaceSrcValue.h:
(WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added
declaration.
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::addSubresourceStyleURLs): Added.
* css/CSSImportRule.h:
(WebCore::CSSImportRule::addSubresourceStyleURLs): Added
declaration.
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::addSubresourceStyleURLs): Added.
Iterates over m_properties vector of CSSProperty objects calling
addSubresourceStyleURLs() on each property's CSSValue object.
* css/CSSMutableStyleDeclaration.h:
(WebCore::CSSMutableStyleDeclaration::addSubresourceStyleURLs): Added
declaration.
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Added.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Added
declaration.
* css/CSSReflectValue.cpp:
(WebCore::CSSReflectValue::addSubresourceStyleURLs): Added.
* css/CSSReflectValue.h:
(WebCore::CSSReflectValue::addSubresourceStyleURLs): Added
declaration.
* css/CSSRule.h:
(WebCore::CSSRule::addSubresourceStyleURLs): Added. Virtual
method with empty implementation that's overridden by subclasses
as needed.
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::addSubresourceStyleURLs): Added.
* css/CSSStyleRule.h:
(WebCore::CSSStyleRule::addSubresourceStyleURLs): Added
declaration.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::addSubresourceStyleURLs): Updated to
call CSSRule::addSubresourceStyleURLs on each rule to extract
URLs. Removed unneeded baseURL parameter now that the
completeURL() method exists.
* css/CSSStyleSheet.h:
(WebCore::CSSStyleSheet::addSubresourceStyleURLs): Updated
declaration.
* css/CSSValue.h:
(WebCore::CSSValue::addSubresourceStyleURLs): Added. Virtual
method with empty implementation that's overridden by subclasses
as needed.
* css/CSSValueList.cpp:
(WebCore::CSSValueList::addSubresourceStyleURLs): Added.
Iterates over m_values vector of CSSValue objects calling
addSubresourceStyleURLs() on each.
* css/CSSValueList.h:
(WebCore::CSSValueList::addSubresourceStyleURLs): Added
declaration.
* css/StyleSheet.h:
(WebCore::StyleSheet::addSubresourceStyleURLs): Updated
declaration to remove unneeded baseURL parameter.
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::addSubresourceAttributeURLs):
Fixed to use the StyleBase::baseURL() method to get the
stylesheet's URL instead of calling Document::completeURL().
* dom/StyledElement.cpp:
(WebCore::StyledElement::addSubresourceAttributeURLs): Added method
to extract URLs from inline style declarations.
* dom/StyledElement.h:
(WebCore::StyledElement::addSubresourceAttributeURLs): Added
declaration.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::addSubresourceAttributeURLs): Call
addSubresourceAttributeURLs() in superclass to extract URLs
from inline style declarations.
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): Ditto.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::addSubresourceAttributeURLs): Ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::addSubresourceAttributeURLs): Ditto.
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::addSubresourceAttributeURLs): Ditto.
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::addSubresourceAttributeURLs): Ditto.
* html/HTMLParamElement.cpp:
(WebCore::HTMLParamElement::addSubresourceAttributeURLs): Ditto.
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::addSubresourceAttributeURLs): Ditto.
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::addSubresourceAttributeURLs): Ditto.
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): Ditto.
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::addSubresourceAttributeURLs): Ditto.
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::addSubresourceAttributeURLs): Ditto.
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::addSubresourceAttributeURLs): Ditto.
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::addSubresourceAttributeURLs): Ditto.
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::addSubresourceAttributeURLs): Ditto.
LayoutTests:
The first set of files below tests that URLs are encoded properly
based on the charset of the stylesheet. Normally this behavior may
only be tested by looking at web server logs with manual tests, but
webarchives represent this information in such a way that they may
be tested by DumpRenderTree. Note that these tests depend on Bug
11850 being fixed, so it's not possible to separate them.
The second set of files below tests that all types of resources
referenced by url() in CSS stylesheets are now saved in webarchives.
* http/tests/webarchive/resources/.htaccess: Added.
* http/tests/webarchive/resources/apple.gif: Copied from LayoutTests/fast/canvas/resources/apple.gif.
* http/tests/webarchive/resources/test-no-charset.css: Added.
* http/tests/webarchive/resources/test-shift-jis.css: Added.
* http/tests/webarchive/resources/test-utf-8.css: Added.
* http/tests/webarchive/test-css-url-encoding-expected.webarchive: Added.
* http/tests/webarchive/test-css-url-encoding-shift-jis-expected.webarchive: Added.
* http/tests/webarchive/test-css-url-encoding-shift-jis.html: Added.
* http/tests/webarchive/test-css-url-encoding-utf-8-expected.webarchive: Added.
* http/tests/webarchive/test-css-url-encoding-utf-8.html: Added.
* http/tests/webarchive/test-css-url-encoding.html: Added.
* webarchive/resources/Ahem.ttf: Copied from LayoutTests/fast/css/resources/Ahem.ttf.
* webarchive/test-css-url-resources-in-stylesheets-expected.webarchive: Added.
* webarchive/test-css-url-resources-in-stylesheets.html: Added.
* webarchive/test-css-url-resources-inline-styles-expected.webarchive: Added.
* webarchive/test-css-url-resources-inline-styles.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39441
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Mon, 22 Dec 2008 21:21:18 +0000 (21:21 +0000)]
2008-12-22 Sam Weinig <sam@webkit.org>
Reviewed by Gavin Barraclough.
Rename all uses of the term "repatch" to "patch".
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::DataLabelPtr::patch):
(JSC::MacroAssembler::DataLabel32::patch):
(JSC::MacroAssembler::Jump::patch):
(JSC::MacroAssembler::PatchBuffer::PatchBuffer):
(JSC::MacroAssembler::PatchBuffer::setPtr):
(JSC::MacroAssembler::loadPtrWithAddressOffsetPatch):
(JSC::MacroAssembler::storePtrWithAddressOffsetPatch):
(JSC::MacroAssembler::storePtrWithPatch):
(JSC::MacroAssembler::jnePtrWithPatch):
* assembler/X86Assembler.h:
(JSC::X86Assembler::patchAddress):
(JSC::X86Assembler::patchImmediate):
(JSC::X86Assembler::patchPointer):
(JSC::X86Assembler::patchBranchOffset):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::tryCTICachePutByID):
(JSC::Interpreter::tryCTICacheGetByID):
(JSC::Interpreter::cti_op_put_by_id):
(JSC::Interpreter::cti_op_get_by_id):
(JSC::Interpreter::cti_op_get_by_id_self_fail):
(JSC::Interpreter::cti_op_get_by_id_proto_list):
(JSC::Interpreter::cti_vm_dontLazyLinkCall):
* jit/JIT.cpp:
(JSC::ctiPatchCallByReturnAddress):
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompile):
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::unlinkCall):
(JSC::JIT::linkCall):
(JSC::JIT::compileOpCall):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::compilePutByIdHotPath):
(JSC::JIT::compileGetByIdSlowCase):
(JSC::JIT::compilePutByIdSlowCase):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::patchGetByIdSelf):
(JSC::JIT::patchPutByIdReplace):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdSelf):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
(JSC::JIT::privateCompilePutByIdReplace):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39440
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Mon, 22 Dec 2008 21:20:26 +0000 (21:20 +0000)]
2008-12-22 Dhananjoy Chutia <dhanrd@gmail.com>
Reviewed by David Kilzer.
Fixes: https://bugs.webkit.org/show_bug.cgi?id=22959
Memory leak fixes for WebKit+soup
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::finishedCallback):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39439
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker@apple.com [Mon, 22 Dec 2008 19:19:04 +0000 (19:19 +0000)]
Reviewed by Anders Carlsson.
<rdar://problem/6449588> REGRESSION (r38279-r38280): Minimize them remaximize a window with a flash plugin, plugin doesn't resume at full speed
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView windowDidDeminiaturize:]): Deminiaturizing should restart timers, not stop timers.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39438
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Mon, 22 Dec 2008 18:16:59 +0000 (18:16 +0000)]
Reviewed by Darin Adler.
<rdar://problem/6277060> ASSERTION FAILED: !m_cacheBeingUpdated if the manifest is not available
Tests: http/tests/appcache/404-manifest.html
http/tests/appcache/fail-on-update.html
* loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::stopLoading):
Removed the incorrect assertion.
* loader/appcache/ApplicationCacheGroup.h: Added an explanation of somewhat nonintuitive
m_currentHandle handling.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39437
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Mon, 22 Dec 2008 16:00:34 +0000 (16:00 +0000)]
Reviewed by Alexey Proskuryakov & George Staikos.
Fixes: https://bugs.webkit.org/show_bug.cgi?id=22961
Add WML <fieldset> element support.
Unlike HTML's <fieldset> element, WML doesn't provide a <legend> child element
to describe the <fieldset>. WML instead offers a 'title' attribute on the <fieldset>
element. To integrate within the existing RenderFieldset code, we just create an
internal <insertedLegend> element as first child for a WML <fieldset> element, containing
the title attribute value.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39436
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aroben@apple.com [Mon, 22 Dec 2008 14:28:48 +0000 (14:28 +0000)]
Build fix after r39428
* jit/JITCall.cpp:
(JSC::JIT::compileOpCallSlowCase): Added a missing MacroAssembler::
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39435
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Mon, 22 Dec 2008 07:31:37 +0000 (07:31 +0000)]
2008-12-21 David Levin <levin@chromium.org>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=22950
Attempted fix for 4 failing XMLHttpReuqest tests on Tiger:
access-control-basic-allow-preflight-cache-invalidation-by-header.html
access-control-basic-allow-preflight-cache-invalidation-by-method.html
access-control-basic-allow-preflight-cache-timeout.html
access-control-basic-allow-preflight-cache.html
* http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache-invalidation.php:
* http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache-timeout.php:
* http/tests/xmlhttprequest/resources/access-control-basic-preflight-cache.php:
* http/tests/xmlhttprequest/resources/portabilityLayer.php:
* http/tests/xmlhttprequest/resources/reset-temp-file.php:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39434
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Mon, 22 Dec 2008 02:57:09 +0000 (02:57 +0000)]
Not reviewed. Try to fix clean Mac builds, set role=private for FormDataBuilder.h
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39433
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Mon, 22 Dec 2008 02:22:10 +0000 (02:22 +0000)]
Rubber-stamped by George Staikos.
Unify all TorchMobile copyright lines. Consolidate in a single line, as requested by Mark Rowe, some time ago.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39432
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Mon, 22 Dec 2008 02:04:51 +0000 (02:04 +0000)]
Reviewed by George Staikos.
Fixes: https://bugs.webkit.org/show_bug.cgi?id=22638
Add POST method support to WMLGoElement. GET & POST over HTTP
covered by a new set of WML HTTP layout tests.
Tests: http/tests/wml/go-task-get-method-accept-charset.html
http/tests/wml/go-task-get-method.html
http/tests/wml/go-task-post-method-accept-charset.html
http/tests/wml/go-task-post-method.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39431
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Mon, 22 Dec 2008 01:45:35 +0000 (01:45 +0000)]
Reviewed by Darin Adler and George Staikos.
Fixes: https://bugs.webkit.org/show_bug.cgi?id=22949
Refactor HTMLFormElement to share a maximum level of code between HTMLFormElement & WMLGoElement.
Create a new helper class 'FormDataBuilder', which is hold as member variable in those classes.
It encapsulates all functionality needed to generate a FormData object, usable for HTML/WML form
submission, including boundary string generation, multi-part form handling etc.
No functional changes, no test cases affected.
WMLGoElement will be converted in a follow-up patch.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39430
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zimmermann@webkit.org [Mon, 22 Dec 2008 01:42:03 +0000 (01:42 +0000)]
Rubber-stamped by George Staikos.
Fix copyright of the new RandomNumber* files.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39429
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
barraclough@apple.com [Mon, 22 Dec 2008 01:00:07 +0000 (01:00 +0000)]
2008-12-21 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt & Cameron Zwarich.
Add support for call and property access repatching on x86-64.
No change in performance on current configurations (2x impovement on v8-tests with JIT enabled on x86-64).
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::DataLabelPtr::repatch):
(JSC::MacroAssembler::DataLabelPtr::operator X86Assembler::JmpDst):
(JSC::MacroAssembler::DataLabel32::repatch):
(JSC::MacroAssembler::RepatchBuffer::addressOf):
(JSC::MacroAssembler::add32):
(JSC::MacroAssembler::sub32):
(JSC::MacroAssembler::loadPtrWithAddressOffsetRepatch):
(JSC::MacroAssembler::storePtrWithAddressOffsetRepatch):
(JSC::MacroAssembler::jePtr):
(JSC::MacroAssembler::jnePtr):
(JSC::MacroAssembler::jnePtrWithRepatch):
(JSC::MacroAssembler::differenceBetween):
* assembler/X86Assembler.h:
(JSC::X86Assembler::addl_im):
(JSC::X86Assembler::subl_im):
(JSC::X86Assembler::cmpl_rm):
(JSC::X86Assembler::movq_rm_disp32):
(JSC::X86Assembler::movq_mr_disp32):
(JSC::X86Assembler::repatchPointer):
(JSC::X86Assembler::X86InstructionFormatter::oneByteOp64_disp32):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::unlinkCall):
(JSC::JIT::linkCall):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITInlineMethods.h:
(JSC::JIT::restoreArgumentReferenceForTrampoline):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::compileGetByIdSlowCase):
(JSC::JIT::compilePutByIdHotPath):
(JSC::JIT::compilePutByIdSlowCase):
(JSC::resizePropertyStorage):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* wtf/Platform.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39428
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
krit@webkit.org [Sun, 21 Dec 2008 23:44:16 +0000 (23:44 +0000)]
2008-12-21 Dirk Schulze <krit@webkit.org>
Reviewed by Darin Adler, Nikolas Zimmermann.
Move the the platform dependent strokeBBox functionality out of RenderPath
into Path with strokeBoundingRect.
RenderPath clean-up for strokeBoundingBox
[https://bugs.webkit.org/show_bug.cgi?id=22902]
* GNUmakefile.am:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GraphicsContext.h:
* platform/graphics/Path.h:
* platform/graphics/StrokeStyleApplier.h: Added.
(WebCore::StrokeStyleApplier::~StrokeStyleApplier):
* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::strokeBoundingRect):
* platform/graphics/cg/PathCG.cpp:
(WebCore::createScratchContext):
(WebCore::scratchContext):
(WebCore::Path::strokeBoundingRect):
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::pen):
* platform/graphics/qt/PathQt.cpp:
(WebCore::Path::strokeBoundingRect):
* rendering/RenderPath.cpp:
(WebCore::StrokeBoundingRectStyleApplier::StrokeBoundingRectStyleApplier):
(WebCore::StrokeBoundingRectStyleApplier::strokeStyle):
(WebCore::RenderPath::relativeBBox):
* rendering/RenderPath.h:
* svg/graphics/cairo/RenderPathCairo.cpp:
* svg/graphics/cg/RenderPathCg.cpp:
* svg/graphics/qt/RenderPathQt.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39427
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
christian@webkit.org [Sun, 21 Dec 2008 14:49:10 +0000 (14:49 +0000)]
2008-12-21 Xan Lopez <xan@gnome.org>
Reviewed by Holger Freyther.
https://bugs.webkit.org/show_bug.cgi?id=16092
[GTK] Middle-mouse click should allow opening a URL in a new tab
Add mouse button and keyboard state modifiers info to navigation action.
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* webkit/webkitwebnavigationaction.cpp:
(_WebKitWebNavigationActionPrivate::):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_get_property):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_set_property):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_class_init):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_get_button):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_get_modifier_state):
* webkit/webkitwebnavigationaction.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39426
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Sat, 20 Dec 2008 22:41:48 +0000 (22:41 +0000)]
Reviewed by Ada Chan.
- expose the new allItems() method via a new IWebHistoryPrivate
interface
* Interfaces/IWebHistoryPrivate.idl: Added.
* Interfaces/WebKit.idl: Added IWebHistoryPrivate.idl.
* WebHistory.cpp:
(WebHistory::QueryInterface): Added IWebHistoryPrivate.
(WebHistory::allItems):
* WebHistory.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39425
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sat, 20 Dec 2008 20:52:46 +0000 (20:52 +0000)]
Fix typo "CSSAferRuleValue" to "CSSAfterRuleValue"
* html/PreloadScanner.cpp:
(WebCore::PreloadScanner::tokenizeCSS):
* html/PreloadScanner.h:
(WebCore::PreloadScanner::CSSState):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39424
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@webkit.org [Sat, 20 Dec 2008 10:26:43 +0000 (10:26 +0000)]
Reviewed by Geoff Garen.
<rdar://problem/6454076> Random crashes on JS raytracer
No test, because the crash is not readily reproducible.
* platform/text/StringImpl.cpp:
(WebCore::StringImpl::empty):
* platform/text/StringImpl.h:
Made empty string per-thread.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39423
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
barraclough@apple.com [Sat, 20 Dec 2008 10:11:31 +0000 (10:11 +0000)]
2008-12-20 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Port optimized property access generation to the MacroAssembler.
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::AbsoluteAddress::AbsoluteAddress):
(JSC::MacroAssembler::DataLabelPtr::repatch):
(JSC::MacroAssembler::DataLabel32::DataLabel32):
(JSC::MacroAssembler::DataLabel32::repatch):
(JSC::MacroAssembler::Label::operator X86Assembler::JmpDst):
(JSC::MacroAssembler::Jump::repatch):
(JSC::MacroAssembler::JumpList::empty):
(JSC::MacroAssembler::RepatchBuffer::link):
(JSC::MacroAssembler::add32):
(JSC::MacroAssembler::and32):
(JSC::MacroAssembler::sub32):
(JSC::MacroAssembler::loadPtrWithAddressRepatch):
(JSC::MacroAssembler::storePtrWithAddressRepatch):
(JSC::MacroAssembler::push):
(JSC::MacroAssembler::ja32):
(JSC::MacroAssembler::jePtr):
(JSC::MacroAssembler::jnePtr):
(JSC::MacroAssembler::jnePtrWithRepatch):
(JSC::MacroAssembler::align):
(JSC::MacroAssembler::differenceBetween):
* assembler/X86Assembler.h:
(JSC::X86Assembler::movl_rm_disp32):
(JSC::X86Assembler::movl_mr_disp32):
(JSC::X86Assembler::X86InstructionFormatter::oneByteOp_disp32):
(JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
* jit/JIT.cpp:
(JSC::ctiRepatchCallByReturnAddress):
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompile):
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JIT.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::compileGetByIdSlowCase):
(JSC::JIT::compilePutByIdHotPath):
(JSC::JIT::compilePutByIdSlowCase):
(JSC::resizePropertyStorage):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::patchGetByIdSelf):
(JSC::JIT::patchPutByIdReplace):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdSelf):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
(JSC::JIT::privateCompilePutByIdReplace):
* wtf/RefCounted.h:
(WTF::RefCountedBase::addressOfCount):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39422
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zecke@webkit.org [Sat, 20 Dec 2008 03:18:31 +0000 (03:18 +0000)]
2008-12-19 Marco Barisione <marco.barisione@collabora.co.uk>
Reviewed by Holger Freyther.
http://bugs.webkit.org/show_bug.cgi?id=16562
[gtk] Implement WebPolicyDelegate methods
Original work by Pierre-Luc Beaudoin. Final touches by Gustavo
Noronha.
This implements the delegates methods of WebPolicyDelegate.
Since Gtk+/C doesn't have delegate methods, they are replaced with
signals.
A new object WebKitWebPolicyDecision allows the browser to delay its
response in certain cases. WebKitWebNavigationAction contains the
information about what caused a navigation request.
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::FrameLoaderClient):
(WebKit::FrameLoaderClient::~FrameLoaderClient):
(WebKit::FrameLoaderClient::dispatchDecidePolicyForMIMEType):
(WebKit::FrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::FrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::FrameLoaderClient::cancelPolicyCheck):
(WebKit::FrameLoaderClient::canShowMIMEType):
* WebCoreSupport/FrameLoaderClientGtk.h:
* webkit/webkit.h:
* webkit/webkitdefines.h:
* webkit/webkitprivate.cpp:
(WebKit::kit):
(WebKit::core):
* webkit/webkitprivate.h:
* webkit/webkitwebnavigationaction.cpp: Added.
(_WebKitWebNavigationActionPrivate::):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_get_property):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_set_property):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_init):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_finalize):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_class_init):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_get_reason):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_set_reason):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_get_original_uri):
(_WebKitWebNavigationActionPrivate::webkit_web_navigation_action_set_original_uri):
* webkit/webkitwebnavigationaction.h: Added.
* webkit/webkitwebpolicydecision.cpp: Added.
(_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_class_init):
(_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_init):
(_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_new):
(_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_use):
(_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_ignore):
(_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_download):
(_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_cancel):
* webkit/webkitwebpolicydecision.h: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39421
268f45cc-cd09-0410-ab3c-
d52691b4dbfc