17a0aa14b9bbe0f03d388dd2ad1688918616d103
[WebKit.git] / WebCore / ChangeLog
1 2009-09-30  Dimitri Glazkov  <dglazkov@chromium.org>
2
3         Reviewed by Darin Fisher.
4
5         [V8] HTMLAudioElement, HTMLImageElement, and HTMLOptionElement are constructable, but they shouldn't be.
6         Only Audio, Image, and Option should be constructable.
7         https://bugs.webkit.org/show_bug.cgi?id=29940
8
9         Test: fast/dom/dom-constructor.html
10
11         * WebCore.gypi: Added new files to project.
12         * bindings/scripts/CodeGeneratorV8.pm: Modified to generate custom constructors.
13         * bindings/v8/V8DOMWrapper.cpp:
14         (WebCore::V8DOMWrapper::getTemplate): Removed handling of HTMLImageElement, HTMLOptionElement
15           and HTMLAudioElement construction.
16         * bindings/v8/V8HTMLAudioElementConstructor.h: Added.
17         * bindings/v8/V8HTMLImageElementConstructor.h: Added.
18         * bindings/v8/V8HTMLOptionElementConstructor.h: Added.
19         * bindings/v8/V8Index.cpp: Added new headers.
20         * bindings/v8/V8Index.h: Added Audio, Image and Option decls.
21         * bindings/v8/custom/V8CustomBinding.h: Ditto.
22         * bindings/v8/custom/V8DOMWindowCustom.cpp:
23         (WebCore::ACCESSOR_GETTER): Added custom constructors.
24         * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
25         (WebCore::V8HTMLImageElementConstructor::GetTemplate): Added custom template creator.
26         * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
27         (WebCore::V8HTMLOptionElementConstructor::GetTemplate): Ditto.
28         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
29         (WebCore::V8HTMLImageElementConstructor::GetTemplate): Ditto.
30
31 2009-09-30  Maciej Stachowiak  <mjs@apple.com>
32
33         Reviewed by Brady Eidson.
34
35         307 redirects should pass along http body and Content-Type header
36         https://bugs.webkit.org/show_bug.cgi?id=29943
37
38         Follow-up fix for:
39         <rdar://problem/3802660> SAP: 307 (Temporary Redirect) responses should use POST, not GET
40         
41         Test: http/tests/loading/resources/redirect-methods-result.php
42
43         * platform/network/cf/ResourceHandleCFNet.cpp:
44         (WebCore::willSendRequest): Pass along http body and Content-Type header.
45         * platform/network/mac/ResourceHandleMac.mm:
46         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): ditto
47
48 2009-09-30  Geoffrey Garen  <ggaren@apple.com>
49
50         Reviewed by Mark Rowe.
51
52         Fixed https://bugs.webkit.org/show_bug.cgi?id=29941
53         REGRESSION (r48882-r48888): Many memory leaks on SnowLeopard leaks bot
54
55         Forgot to implement a destructor for JSDOMWindowBaseData, so it was
56         leaking its RefPtr data member.
57
58         * bindings/js/JSDOMWindowBase.cpp:
59         (WebCore::JSDOMWindowBase::destroyJSDOMWindowBaseData):
60         * bindings/js/JSDOMWindowBase.h:
61         (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData::JSDOMWindowBaseData):
62
63 2009-09-30  Dave Hyatt  <hyatt@apple.com>
64
65         Reviewed by Tim Hatcher.
66
67         Make sure the removal of user stylesheets results in all of the WebViews being updated to
68         reflect the changes.
69
70         * page/PageGroup.cpp:
71         (WebCore::PageGroup::removeUserContentWithURLForWorld):
72         (WebCore::PageGroup::removeUserContentForWorld):
73
74 2009-09-30  Dan Bernstein  <mitz@apple.com>
75
76         Reviewed by Sam Weinig.
77
78         REGRESSION(r47440): drop down menus at americanexpress.com disappear on mouse out
79         https://bugs.webkit.org/show_bug.cgi?id=29209
80
81         Test: fast/inline/relative-positioned-overflow.html
82
83         * rendering/InlineFlowBox.cpp:
84         (WebCore::InlineFlowBox::computeVerticalOverflow): Add self-painting
85         inlines to overflow to ensure that they are included in hit-testing.
86
87 2009-09-30  Simon Fraser  <simon.fraser@apple.com>
88
89         Reviewed by Mark Rowe.
90
91         transforms/3d tests are not run in Release builds
92         https://bugs.webkit.org/show_bug.cgi?id=29827
93
94         Make sure we export the WebCoreHas3DRendering symbol in Release builds,
95         because this symbols is used by run-webkit-tests (via 'nm') to detect whether
96         WebCore was built with ENABLE_3D_RENDERING turned on.
97
98         * DerivedSources.make:
99         * WebCore.3DRendering.exp: Added.
100         * WebCore.xcodeproj/project.pbxproj:
101
102 2009-09-30  Jeremy Orlow  <jorlow@chromium.org>
103
104         Build fix for QT.  Didn't know WebCore.pro existed.
105
106         * WebCore.pro:
107
108 2009-09-30  Dave Hyatt  <hyatt@apple.com>
109
110         Reviewed by Adam Roben.
111
112         Add a method for removal of user scripts and stylesheets by URL from a specific world.
113
114         * page/PageGroup.cpp:
115         (WebCore::PageGroup::removeUserContentURLForWorld):
116         * page/PageGroup.h:
117
118 2009-09-30  Chris Hawk  <hawk@chromium.org>
119
120         Reviewed by Dimitri Glazkov.
121
122         Fix for conditionals in the WebCore gyp file, which contained two separate
123         'conditions' values for the webcore target. The first entry was ignored,
124         resulting in some missine defines.
125         https://bugs.webkit.org/show_bug.cgi?id=29907
126
127         * WebCore.gyp/WebCore.gyp:
128
129 2009-09-21  Jeremy Orlow  <jorlow@chromium.org>
130
131         Reviewed by Adam Barth.
132
133         DOM Storage needs to be more careful about where "ThreadSafe" objects are destroyed.
134         https://bugs.webkit.org/show_bug.cgi?id=29265
135
136         DOM Storage needs to be more careful about where "ThreadSafe" objects are
137         destroyed.  With the current code, there actually isn't a race condition, but
138         it sure would be easy for someone to introduce one.  A bunch of
139         ThreadSafeShared objects have RefPtrs to objects that are NOT ThreadSafeShared
140         objects.  If it were possible any of these objects' destructors to be fired off
141         the main thread, then the you'd have a race condition.  The code should be more
142         clear and self-documenting about how things related to each other.
143
144         Since the lifetime of a LocalStorageTask is bounded by the LocalStorageThread
145         which is bounded by the StorageSyncManager, StorageAreaImpl, and
146         StorageAreaSync, there's no reason for LocalStorageTask to store anything other
147         than pointers.  By breaking this dependency, we can eliminate the risk.
148
149         Note that we _could_ have LocalStorageThread's task queue just store
150         LocalStorageTask*'s rather than RefPtr<LocalStorageTask>s but then we'd need to
151         manually take care of deleting.  It'd probably also be possible to change
152         LocalStorageThread around so that it needn't hold onto a reference of itself
153         and have a more deterministic shutdown, but my initial attempts to do so
154         failed, and I decided it wasn't worth changing.  The queue is killed before
155         hand, so the thread is 100% impotent before the main thread continues anyway.
156
157         The constructors and destructors of StorageSyncManager, StorageAreaImpl, and
158         StorageAreaSync now have ASSERTs to verify they're running on the main thread. 
159         I'm fairly positive that it'd be impossible to hit these asserts and the fact
160         that these classes are no longer ThreadSafeShared should make it clear how
161         they're meant to be used, but I think it's worth it to be extra sure.  Of
162         course, ideally, we'd have such an assert every time a ref is incremented or
163         decremented.
164
165         Behavior should be unchanged and this is just an internal code cleanup, so no
166         new tests.
167
168         * storage/LocalStorageTask.cpp:
169         (WebCore::LocalStorageTask::LocalStorageTask):
170         (WebCore::LocalStorageTask::performTask):
171         * storage/LocalStorageTask.h:
172         (WebCore::LocalStorageTask::createImport):
173         (WebCore::LocalStorageTask::createSync):
174         (WebCore::LocalStorageTask::createTerminate):
175         * storage/LocalStorageThread.cpp:
176         (WebCore::LocalStorageThread::scheduleImport):
177         (WebCore::LocalStorageThread::scheduleSync):
178         * storage/LocalStorageThread.h:
179         * storage/StorageArea.h:
180         * storage/StorageAreaImpl.cpp:
181         (WebCore::StorageAreaImpl::~StorageAreaImpl):
182         (WebCore::StorageAreaImpl::StorageAreaImpl):
183         * storage/StorageAreaSync.cpp:
184         (WebCore::StorageAreaSync::StorageAreaSync):
185         (WebCore::StorageAreaSync::~StorageAreaSync):
186         * storage/StorageSyncManager.cpp:
187         (WebCore::StorageSyncManager::StorageSyncManager):
188         (WebCore::StorageSyncManager::~StorageSyncManager):
189         (WebCore::StorageSyncManager::scheduleImport):
190         (WebCore::StorageSyncManager::scheduleSync):
191         * storage/StorageSyncManager.h:
192
193 2009-09-28  Jeremy Orlow  <jorlow@chromium.org>
194
195         Reviewed by Darin Fisher.
196
197         Chromium needs to be able to override the way storage events are delivered
198         https://bugs.webkit.org/show_bug.cgi?id=29655
199
200         Chromium needs to be able to override the way storage events are delivered.
201         This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
202         faster (no vtables and extra allocation) and somewhat cleaner (no dependency
203         injection).  This is necessary because Chromium needs to transport events across
204         a process barrier and then dispatch them without use of a Frame*.
205
206         Behavior should not change with this, so no updates to tests.
207
208         * GNUmakefile.am:
209         * WebCore.gypi:
210         * WebCore.vcproj/WebCore.vcproj:
211         * WebCore.xcodeproj/project.pbxproj:
212         * WebCoreSources.bkl:
213         * storage/StorageAreaImpl.cpp:
214         (WebCore::StorageAreaImpl::setItem):
215         (WebCore::StorageAreaImpl::removeItem):
216         (WebCore::StorageAreaImpl::clear):
217         * storage/StorageAreaImpl.h:
218         * storage/StorageEventDispatcher.cpp: Copied from WebCore/storage/StorageAreaImpl.cpp.
219         (WebCore::StorageEventDispatcher::dispatch):
220         * storage/StorageEventDispatcher.h: Added.  (Well, technically in the other half of this patch.)
221
222 2009-09-30  Jian Li  <jianli@chromium.org>
223
224         Reviewed by Darin Adler.
225
226         Need to check NULL frame in EventHandler::updateDragAndDrop.
227         https://bugs.webkit.org/show_bug.cgi?id=29929
228
229         Test: http/tests/misc/drag-over-iframe-invalid-source-crash.html
230
231         * page/EventHandler.cpp:
232         (WebCore::EventHandler::updateDragAndDrop):
233
234 2009-09-29  Simon Fraser  <simon.fraser@apple.com>
235
236         Reviewed by Dan Bernstein.
237
238         ASSERTION FAILED: !repaintContainer || repaintContainer == this
239         https://bugs.webkit.org/show_bug.cgi?id=29755
240         
241         Generalize the fix for this bug to account for cases where there may be multiple
242         containing blocks between the repaint container, and the container of the element
243         being repainted.
244
245         Test: compositing/repaint/opacity-between-absolute2.html
246
247         * rendering/RenderBox.cpp:
248         (WebCore::RenderBox::mapLocalToContainer):
249         Call offsetFromAncestorContainer() to get the correct offset.
250         
251         (WebCore::RenderBox::computeRectForRepaint): Ditto
252         * rendering/RenderInline.cpp:
253         (WebCore::RenderInline::computeRectForRepaint): Ditto.
254         
255         * rendering/RenderObject.h:
256         * rendering/RenderObject.cpp:
257         (WebCore::RenderObject::offsetFromAncestorContainer):
258         New method that computes an offset from some object in the ancestor container() chain.
259
260 2009-09-30  Andras Becsi  <becsi.andras@stud.u-szeged.hu>
261
262         Reviewed by Simon Hausmann.
263
264         [Qt] Fix TextCodecQt::decode method after r48752 to return a non-null string if the length of the input is 0.
265         This fixes https://bugs.webkit.org/show_bug.cgi?id=29736.
266
267         * platform/text/qt/TextCodecQt.cpp:
268         (WebCore::TextCodecQt::decode):
269
270 2009-09-29  Dave Hyatt  <hyatt@apple.com>
271
272         Reviewed by Jon Honeycutt.
273
274         Fix a couple of bugs with patterns.  Move the setting of the document URL to before the style
275         selector gets constructed so that pattern match testing gets the correct URL.
276
277         * loader/FrameLoader.cpp:
278         (WebCore::FrameLoader::begin):
279         * page/UserContentURLPattern.cpp:
280         (WebCore::UserContentURLPattern::parse):
281
282 2009-09-29  Alexey Proskuryakov  <ap@apple.com>
283
284         Rubber-stamped by Brady Eidson.
285
286         Assertion failure in http/tests/xmlhttprequest/failed-auth.html.
287
288         I couldn't find out why this only started to happen now, but it was incorrect to check
289         persistence of a credential returned by CredentialStorage::get() without checking that it
290         was non-null. When there is no credential for the protection space in storage, get()
291         returns a new object, and Credentil constructor doesn't initialize m_persistence.
292
293         * platform/network/mac/ResourceHandleMac.mm:
294         (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Moved the
295         assertion after credential null check.
296         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Added the same persistence
297         assertion, matching sync code (and CF one, as well).
298
299 2009-09-29  Yong Li  <yong.li@torchmobile.com>
300
301         Reviewed by Darin Adler.
302
303         Add an ASSERT for UTF8Encoding().isValid()
304         https://bugs.webkit.org/show_bug.cgi?id=29908
305
306         * platform/text/TextEncoding.cpp:
307         (WebCore::UTF8Encoding):
308
309 2009-09-29  Dave Hyatt  <hyatt@apple.com>
310
311         Reviewed by Jon Honeycutt.
312
313         https://bugs.webkit.org/show_bug.cgi?id=29892
314         Add support for whitelist patterns to control conditional injection of user scripts and
315         user stylesheets.
316
317         No new tests. Not testable until WebKit portion is added in followup patch.
318
319         * GNUmakefile.am:
320         * WebCore.gypi:
321         * WebCore.pro:
322         * WebCore.vcproj/WebCore.vcproj:
323         * WebCore.xcodeproj/project.pbxproj:
324         * dom/Document.cpp:
325         (WebCore::Document::pageGroupUserSheets):
326         * page/Frame.cpp:
327         (WebCore::Frame::injectUserScriptsForWorld):
328         * page/UserContentURLPattern.cpp: Added.
329         (WebCore::UserContentURLPattern::matchesPatterns):
330         (WebCore::UserContentURLPattern::parse):
331         (WebCore::UserContentURLPattern::matches):
332         (WebCore::UserContentURLPattern::matchesHost):
333         (WebCore::MatchTester::MatchTester):
334         (WebCore::MatchTester::testStringFinished):
335         (WebCore::MatchTester::patternStringFinished):
336         (WebCore::MatchTester::eatWildcard):
337         (WebCore::MatchTester::eatSameChars):
338         (WebCore::MatchTester::test):
339         (WebCore::UserContentURLPattern::matchesPath):
340         * page/UserContentURLPattern.h: Added.
341         (WebCore::UserContentURLPattern::UserContentURLPattern):
342         (WebCore::UserContentURLPattern::scheme):
343         (WebCore::UserContentURLPattern::host):
344         (WebCore::UserContentURLPattern::path):
345         (WebCore::UserContentURLPattern::matchSubdomains):
346
347 2009-09-29  Enrica Casucci  <enrica@apple.com>
348
349         Reviewed by Adele Peterson.
350
351         Reproducible crash pressing return inside quoted content
352         at WebCore::BreakBlockquoteCommand::doApply.
353         <rdar://problem/7085453>
354         In some case, like the one provided in the test case, m_downStreamEnd
355         refers to a node that gets deleted when executing the DeleteSelectionCommand.
356         We shouldn't use m_downStreamEnd to recalculate the new m_endPosition when
357         pruning is needed, because it may be point to a node that has been deleted, but
358         rather rely on removeNode in CompositeEditCommand to update m_endPosition correctly.
359
360         Test: editing/selection/blockquote-crash.html
361
362         * editing/BreakBlockquoteCommand.cpp:
363         (WebCore::BreakBlockquoteCommand::doApply): Added check for invalid position
364         to avoid dereferencing a null node pointer.
365         * editing/DeleteSelectionCommand.cpp:
366         (WebCore::DeleteSelectionCommand::mergeParagraphs): Don't reset m_endPosition
367         using the value in m_downStreamEnd when it is necessary to prune the start block.
368         
369 2009-09-29  Alexey Proskuryakov  <ap@apple.com>
370
371         Reviewed by Brady Eidson.
372
373         Basic authentication credentials are not sent automatically to top resources
374         https://bugs.webkit.org/show_bug.cgi?id=29901
375
376         No new tests - I don't want to pollute root directory of http tests to check for this rather
377         minor issue.
378
379         * platform/network/CredentialStorage.cpp:
380         (WebCore::CredentialStorage::set): Changed to always preserve leading slash.
381         (WebCore::CredentialStorage::getDefaultAuthenticationCredential): Made breaking out of the
382         loop more explicit.
383
384 2009-09-29  Pavel Feldman  <pfeldman@chromium.org>
385
386         Reviewed by Oliver Hunt.
387
388         Web Inspector REGRESSION(r47820-r47822): Profiles aren't
389         added to the inspector unless the inspector is already open
390         when the profile completes.
391
392         https://bugs.webkit.org/show_bug.cgi?id=29897
393
394         * inspector/front-end/ProfilesPanel.js:
395         (WebInspector.ProfilesPanel.prototype._populateProfiles):
396
397 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
398
399         Rubberstamped by David Hyatt.
400
401         Fix to logic of earlier commit 48902.
402
403         When merging two if's before committing, I forgot to invert the
404         bool check.
405
406         * platform/network/qt/QNetworkReplyHandler.cpp:
407         (WebCore::ignoreHttpError):
408
409 2009-09-29  Stephen White  <senorblanco@chromium.org>
410
411         Unreviewed, build fix.
412
413         Fixing Chromium build, following r48884.
414
415         [https://bugs.webkit.org/show_bug.cgi?id=29894]
416
417         * bindings/v8/V8AbstractEventListener.cpp:
418         (WebCore::V8AbstractEventListener::handleEvent):
419         * bindings/v8/V8AbstractEventListener.h:
420         * bindings/v8/V8WorkerContextEventListener.cpp:
421         (WebCore::V8WorkerContextEventListener::handleEvent):
422         * bindings/v8/V8WorkerContextEventListener.h:
423
424 2009-09-29  Kent Tamura  <tkent@chromium.org>
425
426         Reviewed by Darin Adler.
427
428         Follows HTML5's maxLength change in September 2009.
429         - Change HTMLTextAreaElement.maxLength type to signed.
430         - HTMLTextAreaElement.maxLength returns -1 if maxlength= attribute is missing.
431         - HTMLTextAreaElement.maxLength and HTMLInputElement.maxLength
432           throw INDEX_SIZE_ERR for setting negative values.
433         https://bugs.webkit.org/show_bug.cgi?id=29796
434
435         * html/HTMLInputElement.cpp:
436         (WebCore::HTMLInputElement::setMaxLength):
437         * html/HTMLInputElement.h:
438         * html/HTMLInputElement.idl:
439         * html/HTMLTextAreaElement.cpp:
440         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
441         (WebCore::HTMLTextAreaElement::maxLength):
442         (WebCore::HTMLTextAreaElement::setMaxLength):
443         * html/HTMLTextAreaElement.h:
444         * html/HTMLTextAreaElement.idl:
445
446 2009-09-29  Dimitri Glazkov  <dglazkov@chromium.org>
447
448         No review, rolling out r48894, because review discussion was not complete.
449         http://trac.webkit.org/changeset/48894
450
451         * platform/sql/SQLiteTransaction.cpp:
452         (WebCore::SQLiteTransaction::begin):
453
454 2009-09-29  Dirk Schulze  <krit@webkit.org>
455
456         Reviewed by Nikolas Zimmermann.
457
458         SVG Filter feComposite implementation is missing
459         [https://bugs.webkit.org/show_bug.cgi?id=28362]
460
461         feComposite implementation for SVG.
462
463         Test: svg/filters/feComposite.svg
464
465         * platform/graphics/filters/FEComposite.cpp:
466         (WebCore::arithmetic):
467         (WebCore::FEComposite::apply):
468
469 2009-09-29  Dumitru Daniliuc  <dumi@chromium.org>
470
471         Reviewed by Dimitri Glazkov.
472
473         Starting all read-only transactions with an explicit BEGIN
474         DEFERRED command instead of BEGIN, since some ports (chromium)
475         might compile their own SQLite library and set BEGIN to BEGIN
476         IMMEDIATE by default; which would result in a deadlock in case of
477         two concurrent read-only transactions on the same DB, and would
478         unnecessarily delay other potential transactions to the same DB.
479
480         https://bugs.webkit.org/show_bug.cgi?id=29729
481
482         * platform/sql/SQLiteTransaction.cpp:
483         (WebCore::SQLiteTransaction::begin):
484
485 2009-09-29  Kenneth Russell  <kbr@google.com>
486
487         Reviewed by Dimitri Glazkov.
488
489         Add support for run-time flag for 3D canvas
490         https://bugs.webkit.org/show_bug.cgi?id=29826
491
492         * html/HTMLCanvasElement.cpp:
493         (WebCore::HTMLCanvasElement::getContext): Check page settings for
494         experimental WebGL flag before returning 3D graphics context.
495         * page/Settings.cpp:
496         (WebCore::Settings::Settings): Initialize new flag to false.
497         (WebCore::Settings::setExperimentalWebGLEnabled):
498         * page/Settings.h: Set new flag.
499         (WebCore::Settings::experimentalWebGLEnabled): Return new flag.
500
501 2009-09-29  Jeremy Orlow  <jorlow@chromium.org>
502
503         Reviewed by Darin Fisher.
504
505         Chromium needs to be able to override the way storage events are delivered - part 1
506         https://bugs.webkit.org/show_bug.cgi?id=29889
507
508         Chromium needs to be able to override the way storage events are delivered.
509         This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
510         faster (no vtables and extra allocation) and somewhat cleaner (no dependency
511         injection).  This is necessary because Chromium needs to transport events across
512         a process barrier and then dispatch them without use of a Frame*.
513
514         This patch should be a no-op for all ports other than Chromium.
515
516         * WebCore.gypi:
517         * storage/StorageEventDispatcher.h: Added.
518
519 2009-09-29  Oliver Hunt  <oliver@apple.com>
520
521         Reviewed by NOBODY (missed file).
522
523         Adding file missed in previous commit.
524
525         * manual-tests/gtk/resources/long_cell.cur: Copied from WebCore/dom/PositionCreationFunctions.h.
526
527 2009-09-29  Dimitri Glazkov  <dglazkov@chromium.org>
528
529         Reviewed by Darin Fisher.
530
531         [V8] Correct an issue with XMLHttpRequest attribute event listeners never being cleared.
532         https://bugs.webkit.org/show_bug.cgi?id=29888
533
534         Test: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
535
536         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
537         (WebCore::getEventListener): Added isAttribute parameter.
538         (WebCore::ACCESSOR_SETTER): Made all event listener setters create attribute listeners.
539         (WebCore::CALLBACK_FUNC_DECL): Made addEventListener create object listener.
540
541 2009-09-22  Martin Robinson  <martin.james.robinson@gmail.com>
542
543         Reviewed by Eric Seidel.
544
545         Fix corruption for non-square images.
546
547         [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
548         https://bugs.webkit.org/show_bug.cgi?id=29654
549
550         Added an additional manual-test for this issue to the existing Gtk
551         cursor image test.
552
553         * manual-tests/gtk/cursor-image.html:
554         * manual-tests/gtk/resources/long_cell.cur: Added.
555         * platform/graphics/gtk/ImageGtk.cpp:
556         (WebCore::BitmapImage::getGdkPixbuf):
557
558 2009-09-29  Alexey Proskuryakov  <ap@apple.com>
559
560         Reviewed by Timothy Hatcher.
561
562         Build fix - pass a proper ScriptExecutipnContext to getEventListenerHandlerBody()
563
564         * bindings/js/ScriptEventListener.cpp:
565         (WebCore::getEventListenerHandlerBody):
566         * bindings/js/ScriptEventListener.h:
567         * bindings/v8/ScriptEventListener.cpp:
568         (WebCore::getEventListenerHandlerBody):
569         * bindings/v8/ScriptEventListener.h:
570         * inspector/InspectorDOMAgent.cpp:
571         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
572
573 2009-09-29  Nate Chapin  <japhet@chromium.org>
574
575         Reviewed by Eric Seidel.
576
577         Ensure that we don't scroll lock to an anchor node after a
578         user-initiated scroll, even if that scroll doesn't propagate
579         all the way up to FrameView.
580
581         Test: fast/events/node-event-anchor-lock.html
582
583         * page/EventHandler.cpp: Call setFrameWasScrolledByUser() when a scroll is handled by a node rather than a frame.
584         (WebCore::EventHandler::scrollOverflow):
585         (WebCore::EventHandler::handleWheelEvent):
586         (WebCore::EventHandler::sendScrollEvent): Use setFrameWasScrolledByUser();
587         (WebCore::EventHandler::setFrameWasScrolledByUser): Split out of sendScrollEvent();
588         (WebCore::EventHandler::passMousePressEventToScrollbar):
589         * page/EventHandler.h: Declare setFrameWasScrolledByUser().
590
591 2009-09-28  Alexey Proskuryakov  <ap@apple.com>
592
593         Reviewed by Darin Adler and Sam Weinig.
594
595         Onclick not fired for an element copied with cloneContents() or cloneNode()
596         https://bugs.webkit.org/show_bug.cgi?id=25130
597
598         The change here is that JS event listeners don't keep a reference to a global object from
599         where they were created, and instead take it as a parameter when parsing source code. Also,
600         the listener creation won't fail just because it happens for an element in a frameless
601         document.
602         Thus, moving nodes between documents no longer results in having incorrect registered
603         lazy event listeners on them.
604
605         Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
606                fast/events/attribute-listener-cloned-from-frameless-doc-context.html
607                fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
608                fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
609                fast/events/attribute-listener-extracted-from-frameless-doc-context.html
610
611         * bindings/js/JSEventListener.cpp:
612         (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
613         (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
614         getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
615         (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
616         (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
617         (WebCore::JSEventListener::reportError): Ditto.
618
619         * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
620         to JSDOMGlobalObject.
621
622         * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
623         creation was split between this function and ScriptEventListener; moved it here, as JS
624         global object can be different now.
625
626         * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
627         which can not be determined at parsing time.
628
629         * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
630         for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
631         expect that errors are logged at document parsing time, and because I don't know what other
632         side effects moving it vould have.
633
634         * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
635         because JSC needs a global context here.
636
637         * bindings/js/JSAbstractWorkerCustom.cpp:
638         (WebCore::JSAbstractWorker::addEventListener):
639         (WebCore::JSAbstractWorker::removeEventListener):
640         * bindings/js/JSDOMApplicationCacheCustom.cpp:
641         (WebCore::JSDOMApplicationCache::addEventListener):
642         (WebCore::JSDOMApplicationCache::removeEventListener):
643         * bindings/js/JSDOMGlobalObject.cpp:
644         (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
645         * bindings/js/JSDOMWindowCustom.cpp:
646         (WebCore::JSDOMWindow::addEventListener):
647         (WebCore::JSDOMWindow::removeEventListener):
648         * bindings/js/JSEventSourceCustom.cpp:
649         (WebCore::JSEventSource::addEventListener):
650         (WebCore::JSEventSource::removeEventListener):
651         * bindings/js/JSMessagePortCustom.cpp:
652         (WebCore::JSMessagePort::addEventListener):
653         (WebCore::JSMessagePort::removeEventListener):
654         * bindings/js/JSNodeCustom.cpp:
655         (WebCore::JSNode::addEventListener):
656         (WebCore::JSNode::removeEventListener):
657         * bindings/js/JSSVGElementInstanceCustom.cpp:
658         (WebCore::JSSVGElementInstance::addEventListener):
659         (WebCore::JSSVGElementInstance::removeEventListener):
660         * bindings/js/JSWorkerContextCustom.cpp:
661         (WebCore::JSWorkerContext::addEventListener):
662         (WebCore::JSWorkerContext::removeEventListener):
663         * bindings/js/JSXMLHttpRequestCustom.cpp:
664         (WebCore::JSXMLHttpRequest::addEventListener):
665         (WebCore::JSXMLHttpRequest::removeEventListener):
666         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
667         (WebCore::JSXMLHttpRequestUpload::addEventListener):
668         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
669         * bindings/objc/ObjCEventListener.h:
670         * bindings/objc/ObjCEventListener.mm:
671         (WebCore::ObjCEventListener::handleEvent):
672         * bindings/scripts/CodeGeneratorJS.pm:
673         * dom/EventTarget.cpp:
674         (WebCore::EventTarget::fireEventListeners):
675         * inspector/InspectorDOMAgent.cpp:
676         (WebCore::InspectorDOMAgent::handleEvent):
677         * inspector/InspectorDOMAgent.h:
678         * inspector/InspectorDOMStorageResource.cpp:
679         (WebCore::InspectorDOMStorageResource::handleEvent):
680         * inspector/InspectorDOMStorageResource.h:
681         * loader/ImageDocument.cpp:
682         (WebCore::ImageEventListener::handleEvent):
683         * svg/animation/SVGSMILElement.cpp:
684         (WebCore::ConditionEventListener::handleEvent):
685         * workers/WorkerContext.cpp:
686         (WebCore::WorkerContext::reportException):
687         Don't pass global object to JSEventListener::create(), which no longer needs it.
688         Note that some of these functions still have an early return for null global object, which
689         can probably be removed in a later patch.
690         Pass ScriptExecutionContext to EventListener methods that now need it.
691
692         * bindings/scripts/CodeGeneratorCOM.pm: Don't force EventTarget implementation on Node -
693         it doesn't work yet (it didn't quite work before this patch, too, because it assumed that
694         any object implementing EventTarget COM interface originated from WebCore).
695
696         * dom/EventListener.idl: Just like in ObjC, EventListener should be a pure interface in
697         COM bindings.
698
699 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
700
701         Reviewed by Sam Weinig.
702
703         Removed virtual destructor from JSGlobalObjectData to eliminate pointer
704         fix-ups when accessing JSGlobalObject::d.
705         
706         Replaced with an explicit destructor function pointer.
707
708         * bindings/js/JSDOMGlobalObject.cpp:
709         (WebCore::JSDOMGlobalObject::destroyJSDOMGlobalObjectData):
710         * bindings/js/JSDOMGlobalObject.h:
711         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
712
713 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
714
715         Reviewed by Simon Hausmann.
716
717         Don't rely on QNetworkReply::NetworkError codes, but
718         on HTTP error codes instead.
719
720         * platform/network/qt/QNetworkReplyHandler.cpp:
721         (WebCore::ignoreHttpError):
722         (WebCore::QNetworkReplyHandler::finish):
723
724 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
725
726         Reviewed by Simon Hausmann.
727
728         Use const references when using Qt's foreach.
729
730         * platform/network/qt/QNetworkReplyHandler.cpp:
731         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
732
733 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
734
735         Reviewed by Simon Hausmann.
736
737         Fix handling of QNetworkReply errors.
738
739         In the QNetworkReplyHandler::finish() a response was sent even when
740         the reply contained an error. This resulted in a sendResponseIfNeeded()
741         calling didReceiveResponse on the client, leading to the destruction
742         of the m_resourceHandle, discontinuing further processing in finish(),
743         and thus not calling didFail on the client.
744
745         Instead it continued as everything went fine, and
746         FrameLoaderClientQt::dispatchDecidePolicyForMIMEType() changed the
747         policy to PolicyDownload due to not being able to show the non existing
748         MIMEType. As the download also obviously fails, it ended up with a
749         policy change error.
750
751         * platform/network/qt/QNetworkReplyHandler.cpp:
752         (WebCore::QNetworkReplyHandler::finish):
753
754 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
755
756         Reviewed by Simon Hausmann.
757
758         The code for showing error pages when the response was
759         a 401/403/404, was not actually doing so. This patch
760         fixes that.
761
762         * platform/network/qt/QNetworkReplyHandler.cpp:
763         (WebCore::QNetworkReplyHandler::finish):
764
765 2009-09-28  Alexey Proskuryakov  <ap@apple.com>
766
767         Reviewed by Brady Eidson.
768
769         <rdar://problem/7259965> REGRESSION: http/tests/xmlhttprequest/cross-origin-authorization.html
770         is failing/crashing intermittently
771         https://bugs.webkit.org/show_bug.cgi?id=29322
772
773         This was caused by CStringBuffer::encodeBase64() returning a buffer that wasn't zero terminated.
774         The code had other issues as well, so I removed it altogether:
775         - it claimed to avoid some buffer copies, but it didn't;
776         - and I don't think that base64 encoding should be part of CString interface.
777
778         * platform/network/mac/ResourceHandleMac.mm:
779         (WebCore::encodeBasicAuthorization): Encode username and password using Base64.h directly.
780         (WebCore::ResourceHandle::start): Use encodeBasicAuthorization().
781         (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Ditto.
782         (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Extended logging
783         to synchronous case.
784         (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Ditto.
785         (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Ditto.
786         (-[WebCoreSynchronousLoader connection:didReceiveResponse:]): Ditto.
787         (-[WebCoreSynchronousLoader connection:didReceiveData:]): Ditto.
788         (-[WebCoreSynchronousLoader connectionDidFinishLoading:]): Ditto.
789         (-[WebCoreSynchronousLoader connection:didFailWithError:]): Ditto.
790
791         * platform/network/cf/ResourceHandleCFNet.cpp: Matched Mac changes.
792
793         * platform/text/CString.cpp:
794         * platform/text/CString.h:
795         (WebCore::CStringBuffer::create):
796         (WebCore::CStringBuffer::CStringBuffer):
797         Removed code that was added for Base64 in r48363.
798
799 2009-09-29  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
800
801         Reviewed by Simon Hausmann.
802
803         Fix typo in Localizations.cpp
804
805         https://bugs.webkit.org/show_bug.cgi?id=29872
806
807         * platform/qt/Localizations.cpp:
808         (WebCore::localizedMediaControlElementHelpText):
809
810 2009-09-29  Simon Hausmann  <simon.hausmann@nokia.com>
811
812         Reviewed by Tor Arne Vestbø.
813
814         Make the XSLT conditional in DOMWindow.idl's xsltProcessor
815         attribute conditional in the generated files, similar to
816         r44116.
817
818         * page/DOMWindow.idl:
819
820 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
821
822         Reviewed by Simon Hausmann and Tor Arne Vestbø.
823
824         Use the ResourceError as it is supposed to and handle
825         not HTTP errors from QNetworkReply.
826
827         Thanks to Adam Roben for his input.
828
829         * platform/network/qt/QNetworkReplyHandler.cpp:
830         (WebCore::QNetworkReplyHandler::finish):
831
832 009-09-29  Pavel Feldman  <pfeldman@chromium.org>
833
834         Reviewed by Timothy Hatcher.
835
836         Web Inspector: Encapsulate JS listeners specifics into ScriptEventListener.
837
838         https://bugs.webkit.org/show_bug.cgi?id=29816
839
840         * bindings/js/ScriptEventListener.cpp:
841         (WebCore::getEventListenerHandlerBody):
842         * bindings/js/ScriptEventListener.h:
843         * bindings/v8/ScriptEventListener.cpp:
844         (WebCore::getEventListenerHandlerBody):
845         * bindings/v8/ScriptEventListener.h:
846         * inspector/InspectorDOMAgent.cpp:
847         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
848
849 2009-09-29  Xan Lopez  <xlopez@igalia.com>
850
851         Unreviewed attempt to fix the build.
852
853         * page/Settings.cpp:
854         (WebCore::Settings::Settings):
855
856 2009-09-28  Fumitoshi Ukai  <ukai@chromium.org>
857
858         Reviewed by Eric Seidel.
859
860         Add experimentalWebSocketsEnabled in Settings.
861         https://bugs.webkit.org/show_bug.cgi?id=28941
862
863         * WebCore.base.exp:
864         * bindings/js/JSDOMWindowCustom.cpp:
865         (WebCore::JSDOMWindow::webSocket):
866         * bindings/v8/V8DOMWrapper.cpp:
867         (WebCore::V8DOMWrapper::getConstructor):
868         * bindings/v8/custom/V8WebSocketCustom.cpp:
869         * page/Settings.cpp:
870         (WebCore::Settings::Settings):
871         (WebCore::Settings::setExperimentalWebSocketsEnabled):
872         * page/Settings.h:
873         (WebCore::Settings::experimentalWebSocketsEnabled):
874         
875 2009-09-11  Fumitoshi Ukai  <ukai@chromium.org>
876
877         Reviewed by Adam Barth.
878
879         Add platform code to support WebSocket for chromium.
880         https://bugs.webkit.org/show_bug.cgi?id=29171
881
882         To build within chromium tree, it requires a patch in bug 29174.
883         Real implementation will be landed in chromium tree.
884
885         * WebCore.gypi:
886         * platform/network/chromium/SocketStreamError.h: Added.
887         (WebCore::SocketStreamError::SocketStreamError):
888         * platform/network/chromium/SocketStreamHandle.h: Added.
889         (WebCore::SocketStreamHandle::create):
890
891 2009-09-28  Dan Bernstein  <mitz@apple.com>
892
893         Reviewed by Sam Weinig.
894
895         <rdar://problem/7157288> Crash in RenderStyle::computedLineHeight()
896         when Times New Roman is not installed
897
898         * platform/graphics/win/FontCacheWin.cpp:
899         (WebCore::FontCache::getLastResortFallbackFont): If Times New Roman is
900         not available, use the Windows default GUI font.
901
902 2009-09-28  Jian Li  <jianli@chromium.org>
903
904         Reviewed by David Levin.
905
906         Do not add platform-specific methods to cross-platform header
907         FileSystem.h per Darin's feedback for 29109.
908         https://bugs.webkit.org/show_bug.cgi?id=29830
909
910         * platform/FileSystem.h:
911         * platform/chromium/DragDataChromium.cpp:
912         (WebCore::DragData::asURL):
913         * platform/chromium/FileSystemChromium.cpp:
914
915 2009-09-28  Dumitru Daniliuc  <dumi@chromium.org>
916
917         Reviewed by Dimitri Glazkov.
918
919         Register Chromium's VFSs with a proper sqlite3_io_methods
920         finder. This should only affect the POSIX implementation. The
921         Windows change is included for consistency and in case sqlite
922         starts using something similar in its Windows VFS in the future.
923
924         https://bugs.webkit.org/show_bug.cgi?id=29743
925
926         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
927         (WebCore::SQLiteFileSystem::registerSQLiteVFS):
928         * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
929         (WebCore::SQLiteFileSystem::registerSQLiteVFS):
930
931 2009-09-28  Nate Chapin  <japhet@chromium.org>
932
933         Reviewed by Adam Barth.
934
935         Change the V8 bindings' handling of window.toString(),
936         so we return [object DOMWindow] (like JSC), not [object global].
937
938         https://bugs.webkit.org/show_bug.cgi?id=29742
939
940         This will fix a couple of Chromium port test failures and enable us to
941         use the default expectations for a bunch more.
942
943         * bindings/v8/custom/V8DOMWindowCustom.cpp: Use the DOMWindow wrapper instead
944         of the global object wrapper when it's available in the DOMWindow toString callback.
945
946 2009-09-28  Nate Chapin  <japhet@chromium.org>
947
948         Rubber stamped by David Levin.
949
950         Chromium build fix, add back in #include of V8Proxy.h in V8WebKitPointConstructor.cpp.
951
952         * bindings/v8/custom/V8WebKitPointConstructor.cpp: Re-include V8Proxy.h.
953
954 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
955
956         Reviewed by Darin Adler.
957
958         NotNullPassRefPtr: smart pointer optimized for passing references that are not null
959         https://bugs.webkit.org/show_bug.cgi?id=29822
960         
961         Added NotNullPassRefPtr, and deployed it in all places that initialize
962         JavaScript objects.
963
964         * bindings/js/DOMObjectWithSVGContext.h:
965         (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
966         * bindings/js/JSDOMBinding.cpp:
967         (WebCore::cacheDOMStructure):
968         * bindings/js/JSDOMBinding.h:
969         (WebCore::DOMObject::DOMObject):
970         (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
971         (WebCore::DOMConstructorObject::DOMConstructorObject):
972         (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
973         * bindings/js/JSDOMGlobalObject.cpp:
974         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
975         * bindings/js/JSDOMGlobalObject.h:
976         * bindings/js/JSDOMWindowBase.cpp:
977         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
978         * bindings/js/JSDOMWindowBase.h:
979         * bindings/js/JSHTMLAllCollection.h:
980         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
981         * bindings/js/JSInspectedObjectWrapper.cpp:
982         (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
983         * bindings/js/JSInspectedObjectWrapper.h:
984         * bindings/js/JSInspectorCallbackWrapper.cpp:
985         (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
986         * bindings/js/JSInspectorCallbackWrapper.h:
987         * bindings/js/JSQuarantinedObjectWrapper.cpp:
988         (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
989         * bindings/js/JSQuarantinedObjectWrapper.h:
990         * bindings/js/JSWorkerContextBase.cpp:
991         (WebCore::JSWorkerContextBase::JSWorkerContextBase):
992         * bindings/js/JSWorkerContextBase.h:
993         * bindings/scripts/CodeGeneratorJS.pm:
994         * bridge/runtime_object.cpp:
995         (JSC::RuntimeObjectImp::RuntimeObjectImp):
996         * bridge/runtime_object.h:
997
998 2009-09-28  Nate Chapin  <japhet@chromium.org>
999
1000         Reviewed by Dimitri Glazkov.
1001
1002         Allow V8 to handle x/y parameters in a WebKitPoint constructor.
1003         https://bugs.webkit.org/show_bug.cgi?id=29823
1004
1005         Fixes V8's handling of LayoutTests/fast/dom/Window/webkitConvertPoint.html
1006
1007         * bindings/v8/custom/V8WebKitPointConstructor.cpp: Allow for x/y parameters in constructor.
1008
1009 2009-09-28  Mark Rowe  <mrowe@apple.com>
1010
1011         Fix the build by doing something approximating reasonableness in the Xcode project.
1012
1013         * WebCore.xcodeproj/project.pbxproj:
1014
1015 2009-09-28  Simon Hausmann  <hausmann@webkit.org>
1016
1017         Prospective Tiger build fix.
1018
1019         * WebCore.xcodeproj/project.pbxproj: Try to use unique IDs for the new files.
1020
1021 2009-09-28  Pavel Feldman  <pfeldman@chromium.org>
1022
1023         Reviewed by Timothy Hatcher.
1024
1025         Web Inspector: Add explicit frontend event for commit load.
1026
1027         https://bugs.webkit.org/show_bug.cgi?id=29814
1028
1029         * inspector/InspectorController.cpp:
1030         (WebCore::InspectorController::didCommitLoad):
1031         * inspector/InspectorFrontend.cpp:
1032         (WebCore::InspectorFrontend::didCommitLoad):
1033         * inspector/InspectorFrontend.h:
1034         * inspector/front-end/DOMAgent.js:
1035         (WebInspector.DOMAgent.prototype._setDocument):
1036         * inspector/front-end/inspector.js:
1037         (WebInspector.addResource):
1038         (WebInspector.didCommitLoad):
1039
1040 2009-09-28  Yaar Schnitman  <yaar@chromium.org>
1041
1042         Reviewed by Dimitri Glazkov.
1043
1044         Chromium port - recognize we are being built independently
1045         of chromium and look for dependencies under webkit/chromium rather
1046         than chromium/src.
1047
1048         https://bugs.webkit.org/show_bug.cgi?id=29722
1049
1050         * WebCore.gyp/WebCore.gyp: See above. Also removed a few files from
1051           the sources list, since they are not supposed to be built here.
1052
1053 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
1054
1055         Reviewed by Simon Hausmann.
1056
1057         [Qt] Implement XSLT support with QtXmlPatterns.
1058         https://bugs.webkit.org/show_bug.cgi?id=28303
1059
1060         * GNUmakefile.am:
1061         * WebCore.gypi:
1062         * WebCore.pro:
1063         * WebCore.vcproj/WebCore.vcproj:
1064         * WebCoreSources.bkl:
1065         * dom/Document.cpp:
1066         (WebCore::Document::Document):
1067         (WebCore::Document::~Document):
1068         (WebCore::Document::setTransformSource):
1069         * dom/Document.h:
1070         (WebCore::Document::transformSource):
1071         * dom/TransformSource.h: Added.
1072         (WebCore::TransformSource::platformSource):
1073         * dom/TransformSourceLibxslt.cpp: Added.
1074         (WebCore::TransformSource::TransformSource): Wraps a libxml2 document.
1075         (WebCore::TransformSource::~TransformSource):
1076         * dom/TransformSourceQt.cpp: Added.
1077         (WebCore::TransformSource::TransformSource): Wraps a plain string.
1078         (WebCore::TransformSource::~TransformSource):
1079         * dom/XMLTokenizerLibxml2.cpp:
1080         (WebCore::XMLTokenizer::doEnd):
1081         * dom/XMLTokenizerQt.cpp:
1082         (WebCore::XMLTokenizer::doEnd):
1083         (WebCore::XMLTokenizer::parseProcessingInstruction):
1084         * xml/XSLStyleSheet.h:
1085         (WebCore::XSLStyleSheet::sheetString):
1086         * xml/XSLStyleSheetLibxslt.cpp:
1087         (WebCore::XSLStyleSheet::document):
1088         * xml/XSLStyleSheetQt.cpp: Added.
1089         * xml/XSLTProcessor.h:
1090         * xml/XSLTProcessorLibxslt.cpp:
1091         (WebCore::xmlDocPtrFromNode):
1092         * xml/XSLTProcessorQt.cpp: Added.
1093         (WebCore::XSLTMessageHandler::XSLTMessageHandler): A subclass of QAbstractMessageHandler.
1094         (WebCore::XSLTMessageHandler::handleMessage): Forwards all processor messages to the Console.
1095         (WebCore::XSLTProcessor::transformToString): Uses QXmlQuery.
1096
1097 2009-09-28  Andrew Scherkus  <scherkus@chromium.org>
1098
1099         Reviewed by Eric Carlson.
1100
1101         Delegate implementation of rendererIsNeeded() for media control elements to RenderTheme.
1102
1103         https://bugs.webkit.org/show_bug.cgi?id=28689
1104
1105         Covered by LayoutTests/media/video-no-audio.html
1106
1107         * rendering/MediaControlElements.cpp: Removed subclass implementations of rendererIsNeeded().
1108         (WebCore::MediaControlElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
1109         (WebCore::MediaControlInputElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
1110         * rendering/MediaControlElements.h:
1111         * rendering/RenderTheme.cpp:
1112         (WebCore::RenderTheme::shouldRenderMediaControlPart): New method.  Contains logic moved from subclass implementations of rendererIsNeeded().
1113         * rendering/RenderTheme.h:
1114         * rendering/RenderThemeChromiumSkia.cpp:
1115         (WebCore::RenderThemeChromiumSkia::shouldRenderMediaControlPart): Override to always render mute button.
1116         * rendering/RenderThemeChromiumSkia.h:
1117
1118 2009-09-28  Jian Li  <jianli@chromium.org>
1119
1120         Reviewed by David Levin.
1121
1122         [chromium] DragData::asURL should return file URL.
1123         https://bugs.webkit.org/show_bug.cgi?id=29109
1124
1125         Tested by LayoutTests/fast/events/drag-to-navigate.html.
1126
1127         * platform/FileSystem.h:
1128         * platform/chromium/ChromiumBridge.h:
1129         * platform/chromium/DragDataChromium.cpp:
1130         (WebCore::DragData::asURL):
1131         * platform/chromium/FileSystemChromium.cpp:
1132         (WebCore::getAbsolutePath):
1133         (WebCore::isDirectory):
1134         (WebCore::filePathToURL):
1135
1136 2009-09-28  Dimitri Glazkov  <dglazkov@chromium.org>
1137
1138         Reviewed by David Levin.
1139
1140         [V8] Add a special case to handle index arguments, because we need to be
1141         able to see if they're < 0.
1142         https://bugs.webkit.org/show_bug.cgi?id=29810
1143
1144         Test: LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.html
1145
1146         * bindings/scripts/CodeGeneratorV8.pm: Added special case (matching CodeGeneratorJS.pm)
1147           for index arguments.
1148
1149 2009-09-28  Dan Bernstein  <mitz@apple.com>
1150
1151         Reviewed by Darin Adler.
1152
1153         Extend the MediaWiki/KHTMLFixes.css workaround to cover older MediaWiki versions
1154         https://bugs.webkit.org/show_bug.cgi?id=29792
1155
1156         * html/HTMLLinkElement.cpp:
1157         (WebCore::HTMLLinkElement::setCSSStyleSheet): If site specific hacks are
1158         enabled, check if the linked style sheet is one of two versions of the
1159         MediaWiki KHTMLFixes.css. If so, remove the offending rule.
1160
1161 2009-09-28  Dimitri Glazkov  <dglazkov@chromium.org>
1162
1163         Reviewed by Adam Barth.
1164
1165         [V8] Fix an error in type logic in CodeGeneratorV8.pm, where
1166         unsigned ints are accidentally used as signed.
1167         https://bugs.webkit.org/show_bug.cgi?id=29810
1168
1169         Test: LayoutTests/fast/forms/textarea-maxlength.html
1170
1171         * bindings/scripts/CodeGeneratorV8.pm: Made sure "unsigned long" in IDL is
1172           properly generates on "unsigned" return value.
1173
1174 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
1175
1176         Reviewed by Simon Hausmann.
1177
1178         Rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp.
1179         https://bugs.webkit.org/show_bug.cgi?id=28303
1180
1181         In preparation for adding XSLT support with QtXmlPatterns to the Qt
1182         port, rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp as we will
1183         have our own implementation which most likely will not share any code
1184         with the current one.
1185
1186         Additionally, fix some coding style issues.
1187
1188         * GNUmakefile.am:
1189         * WebCore.gypi:
1190         * WebCore.vcproj/WebCore.vcproj:
1191         * WebCore.xcodeproj/project.pbxproj:
1192         * WebCoreSources.bkl:
1193         * xml/XSLStyleSheet.cpp: Renamed to XSLStyleSheetLibxslt.cpp.
1194         * xml/XSLStyleSheetLibxslt.cpp: Added.
1195
1196 2009-09-28  Simon Hausmann  <simon.hausmann@nokia.com>
1197
1198         Prospective build fix for r48812.
1199
1200         Forgot to remove the inline reset() implementation when reverting the indentation
1201         changes in the file.
1202
1203         * xml/XSLTProcessor.h:
1204
1205 2009-09-28  Pavel Feldman  <pfeldman@chromium.org>
1206
1207         Reviewed by nobody (trivial follow up fix), Joseph Pecoraro LGTM-ed.
1208
1209         Web Inspector: Follow up to r48809.
1210         InspectorController.wrapObject should only be called on the inspectable page side.
1211
1212         https://bugs.webkit.org/show_bug.cgi?id=17429
1213
1214         * inspector/front-end/EventListenersSidebarPane.js:
1215         (WebInspector.EventListenersSidebarPane.prototype.update.callback):
1216         (WebInspector.EventListenersSidebarPane.prototype.update):
1217         (WebInspector.EventListenersSection):
1218         (WebInspector.EventListenersSection.prototype.update):
1219         (WebInspector.EventListenerBar):
1220         (WebInspector.EventListenerBar.prototype.update):
1221
1222 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
1223
1224         Reviewed by Simon Hausmann.
1225
1226         Move the libxslt specific part of XSLTProcessor to a separate file.
1227         https://bugs.webkit.org/show_bug.cgi?id=28303
1228
1229         In preparation for adding XSLT support with QtXmlPatterns to the Qt
1230         port, move the libxslt part of the XSLTProcessor implementation into
1231         another file and leave the part that can be reused and shared.
1232
1233         Additionally, fix some coding style issues.
1234
1235         * GNUmakefile.am:
1236         * WebCore.gypi:
1237         * WebCore.vcproj/WebCore.vcproj:
1238         * WebCore.xcodeproj/project.pbxproj:
1239         * WebCoreSources.bkl:
1240         * xml/XSLTProcessor.cpp:
1241         (WebCore::XSLTProcessor::createDocumentFromSource): Remove trailing whitespaces.
1242         (WebCore::createFragmentFromSource): Remove trailing whitespaces.
1243         (WebCore::XSLTProcessor::transformToFragment): Remove trailing whitespaces.
1244         (WebCore::XSLTProcessor::reset): Moved out of the class definition.
1245         * xml/XSLTProcessorLibxslt.cpp: Added.
1246         (WebCore::XSLTProcessor::genericErrorFunc): Moved.
1247         (WebCore::XSLTProcessor::parseErrorFunc): Moved.
1248         (WebCore::docLoaderFunc): Moved.
1249         (WebCore::setXSLTLoadCallBack): Moved.
1250         (WebCore::writeToVector): Moved.
1251         (WebCore::saveResultToString): Moved.
1252         (WebCore::xsltParamArrayFromParameterMap): Moved.
1253         (WebCore::freeXsltParamArray): Moved.
1254         (WebCore::xsltStylesheetPointer): Moved.
1255         (WebCore::xmlDocPtrFromNode): Moved.
1256         (WebCore::resultMIMEType): Moved.
1257         (WebCore::XSLTProcessor::transformToString): Moved.
1258
1259 2009-09-28  Charles Wei  <charles.wei@torchmobile.com.cn>
1260
1261         Reviewed by Nikolas Zimmermann.
1262
1263         Fix the crash of SVG that crashes when use a non-exist symbol
1264         https://bugs.webkit.org/show_bug.cgi?id=27693
1265
1266         Test: svg/custom/use-non-existing-symbol-crash.svg
1267
1268         * svg/SVGUseElement.cpp:
1269         (WebCore::shadowTreeContainsChangedNodes):
1270
1271 2009-09-28  Joseph Pecoraro  <joepeck@webkit.org>
1272
1273         Reviewed by Timothy Hatcher.
1274
1275         Inspector Should Show Event Listeners/Handlers Registered on each Node
1276         https://bugs.webkit.org/show_bug.cgi?id=17429
1277         
1278           Extracted a method from dispatchEvent to get the event ancestor chain
1279         
1280         * dom/Node.cpp:
1281         (WebCore::Node::eventAncestors): the extracted method
1282         (WebCore::Node::dispatchGenericEvent): use eventAncestors
1283         * dom/Node.h:
1284
1285           Asynchronous Flow For the Inspector, Backend -> DOM Agent -> Frontend
1286           The DOMAgent's getEventListenersForNode handles the logic of finding
1287           all the relevant listeners in the event flow.
1288
1289         * inspector/InspectorBackend.cpp:
1290         (WebCore::InspectorBackend::getEventListenersForNode):
1291         * inspector/InspectorBackend.h:
1292         * inspector/InspectorBackend.idl:
1293         * inspector/InspectorDOMAgent.cpp:
1294         (WebCore::InspectorDOMAgent::getEventListenersForNode):
1295         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1296         (WebCore::InspectorDOMAgent::buildObjectForNode): added localName
1297         * inspector/InspectorDOMAgent.h:
1298         (WebCore::EventListenerInfo::EventListenerInfo):
1299         * inspector/InspectorFrontend.cpp:
1300         (WebCore::InspectorFrontend::didGetEventListenersForNode):
1301         * inspector/InspectorFrontend.h:
1302         (WebCore::InspectorFrontend::scriptState):
1303         * inspector/front-end/DOMAgent.js: added localName to WebInspector.DOMNode from payload
1304         (WebInspector.EventListeners.getEventListenersForNodeAsync.mycallback):
1305         (WebInspector.EventListeners.getEventListenersForNodeAsync):
1306
1307           New Sidebar Pane in the Element's Panel
1308           Includes Gear Menu for filtering the Event Listeners on the
1309           "Selected Node Only" or "All Nodes"
1310
1311         * inspector/front-end/ElementsPanel.js: Handles refreshing the Pane when necessary
1312         (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
1313         (WebInspector.ElementsPanel):
1314         (WebInspector.ElementsPanel.prototype.updateEventListeners):
1315         * inspector/front-end/EventListenersSidebarPane.js: Added. 
1316         (WebInspector.EventListenersSidebarPane): The 1st level in the Pane
1317         (WebInspector.EventListenersSidebarPane.prototype.update.callback):
1318         (WebInspector.EventListenersSidebarPane.prototype.update):
1319         (WebInspector.EventListenersSection): The 2nd level in the Pane
1320         (WebInspector.EventListenersSection.prototype.update): filters on Preference
1321         (WebInspector.EventListenersSection.prototype.addListener):
1322         (WebInspector.EventListenerBar): The 3rd level in the Pane
1323         (WebInspector.EventListenerBar.prototype._getNodeDisplayName):
1324         (WebInspector.EventListenerBar.prototype._getFunctionDisplayName):
1325         (WebInspector.EventListenersSidebarPane.prototype._changeSetting): For the Gear Menu
1326         
1327           Consolidated "appropriateSelectorForNode"
1328
1329         * inspector/front-end/StylesSidebarPane.js:
1330         * inspector/front-end/utilities.js:
1331
1332           Miscellaneous Updates
1333
1334         * English.lproj/localizedStrings.js: "Event Listeners", "No Event Listeners", "Selected Node Only", "All Nodes"
1335         * WebCore.gypi: included the new inspector files
1336         * WebCore.vcproj/WebCore.vcproj: included source files that were missing
1337         * inspector/front-end/Images/grayConnectorPoint.png: Added. Thanks to Timothy Hatcher.
1338         * inspector/front-end/Images/whiteConnectorPoint.png: Added. Thanks to Timothy Hatcher.
1339         * inspector/front-end/inspector.js: Preferences for the Gear Menu Event Listeners filter
1340         * inspector/front-end/inspector.css: reused as much as possible
1341         * inspector/front-end/inspector.html: include the new script
1342         * inspector/front-end/WebKit.qrc: included the new inspector files
1343
1344 2009-09-27  Sam Weinig  <sam@webkit.org>
1345
1346         Reviewed by Dan Bernstein.
1347
1348         Fix for https://bugs.webkit.org/show_bug.cgi?id=29760
1349         Implement CSSOM Range.getClientRects/getBoundingClientRect 
1350
1351         Tests: fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html
1352                fast/dom/Range/getBoundingClientRect.html
1353                fast/dom/Range/getClientRects.html
1354
1355         * dom/Range.cpp:
1356         (WebCore::Range::getClientRects):
1357         (WebCore::Range::getBoundingClientRect):
1358         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoom):
1359         (WebCore::Range::getBorderAndTextQuads):
1360         * dom/Range.h:
1361         * dom/Range.idl:
1362         Implement Range.getClientRects/getBoundingClientRect.
1363
1364         * dom/Element.cpp:
1365         * rendering/RenderObject.h: 
1366         (WebCore::adjustForAbsoluteZoom):
1367         (WebCore::adjustIntRectForAbsoluteZoom):
1368         (WebCore::adjustFloatPointForAbsoluteZoom):
1369         (WebCore::adjustFloatQuadForAbsoluteZoom):
1370         Move point/quad adjustment methods from Element.cpp to RenderObject.h
1371         so that Range.cpp can use them as well.
1372
1373 2009-09-27  Simon Hausmann  <hausmann@webkit.org>
1374
1375         Unreviewed fix for WebInspector with Qt build.
1376
1377         Simply re-generate the Qt resource file by running
1378         WebKitTools/Scripts/generate-qt-inspector-resource
1379
1380         * inspector/front-end/WebKit.qrc:
1381
1382 2009-09-27  Pavel Feldman  <pfeldman@chromium.org>
1383
1384         Reviewed by nobody (trivial ChangeLog fix).
1385
1386         Restore WebCore/ChangeLog truncated in r48778.
1387
1388 2009-09-27  Pavel Feldman  <pfeldman@chromium.org>
1389
1390         Reviewed by Timothy Hatcher.
1391
1392         Web Inspector: DOM store is being unbound twice, leading to assertion failure.
1393
1394         https://bugs.webkit.org/show_bug.cgi?id=29770
1395
1396         * inspector/InspectorController.cpp:
1397         (WebCore::InspectorController::didOpenDatabase):
1398         (WebCore::InspectorController::didUseDOMStorage):
1399         * inspector/InspectorDOMStorageResource.cpp:
1400         (WebCore::InspectorDOMStorageResource::unbind):
1401
1402 2009-09-26  Pavel Feldman  <pfeldman@chromium.org>
1403
1404         Reviewed by Timothy Hatcher.
1405
1406         Web Inspector: Do not track DOM changes while inspector window is closed.
1407
1408         https://bugs.webkit.org/show_bug.cgi?id=29769
1409
1410         * inspector/InspectorController.cpp:
1411         (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
1412         (WebCore::InspectorController::populateScriptObjects):
1413         (WebCore::InspectorController::resetScriptObjects):
1414         (WebCore::InspectorController::didCommitLoad):
1415         * inspector/InspectorController.h:
1416         * inspector/InspectorDOMAgent.cpp:
1417         (WebCore::InspectorDOMAgent::setDocument):
1418         * inspector/InspectorDOMAgent.h:
1419         * loader/FrameLoader.cpp:
1420         (WebCore::FrameLoader::dispatchWindowObjectAvailable):
1421         * page/android/InspectorControllerAndroid.cpp:
1422         (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
1423
1424 2009-09-26  Pavel Feldman  <pfeldman@chromium.org>
1425
1426         Reviewed by Timothy Hatcher.
1427
1428         Web Inspector: [REGRESSION] Double Clicking Resources Fails to Open in New Window
1429
1430         https://bugs.webkit.org/show_bug.cgi?id=29762
1431
1432         * inspector/front-end/InjectedScript.js:
1433         (InjectedScript.setStyleText):
1434         (InjectedScript.openInInspectedWindow):
1435         * inspector/front-end/InjectedScriptAccess.js:
1436         * inspector/front-end/ResourcesPanel.js:
1437         (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
1438
1439 2009-09-26  David Kilzer  <ddkilzer@apple.com>
1440
1441         Part 2 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
1442
1443         Reviewed by Darin Adler.
1444
1445         Fix ENABLE_ORIENTATION_EVENTS for non-Mac platforms.
1446
1447         * DerivedSources.make: Moved Platform.h check for
1448         ENABLE_ORIENTATION_EVENTS into Mac-only section and added
1449         default of ENABLE_ORIENTATION_EVENTS = 0 to non-Mac section.
1450         Added ifndef test to make it possible to override both
1451         ENABLE_DASHBOARD_SUPPORT and ENABLE_ORIENTATION_EVENTS external
1452         to the makefile.  Moved addition of ENABLE_ORIENTATION_EVENTS to
1453         ADDITIONAL_IDL_DEFINES to common section.
1454         * GNUmakefile.am: Added support for ENABLE_ORIENTATION_EVENTS if
1455         it is ever used.
1456         * WebCore.pro: Ditto.
1457
1458 2009-09-26  Kent Tamura  <tkent@chromium.org>
1459
1460         Reviewed by David Kilzer.
1461
1462         Move placeholder-related code to HTMLTextFormControlElement from
1463         HTMLInputElement, WMLInputElement, InputElement, and
1464         HTMLTextAreaElement.
1465         https://bugs.webkit.org/show_bug.cgi?id=28703
1466
1467         * dom/InputElement.cpp:
1468         (WebCore::InputElement::dispatchFocusEvent):
1469         (WebCore::InputElement::dispatchBlurEvent):
1470         (WebCore::InputElement::setValueFromRenderer):
1471         * dom/InputElement.h:
1472         * html/HTMLFormControlElement.cpp:
1473         (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
1474         (WebCore::HTMLTextFormControlElement::~HTMLTextFormControlElement):
1475         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
1476         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
1477         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
1478         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
1479         * html/HTMLFormControlElement.h:
1480         (WebCore::HTMLTextFormControlElement::handleFocusEvent):
1481         (WebCore::HTMLTextFormControlElement::handleBlurEvent):
1482         * html/HTMLInputElement.cpp:
1483         (WebCore::HTMLInputElement::HTMLInputElement):
1484         (WebCore::HTMLInputElement::handleFocusEvent):
1485         (WebCore::HTMLInputElement::handleBlurEvent):
1486         (WebCore::HTMLInputElement::parseMappedAttribute):
1487         (WebCore::HTMLInputElement::createRenderer):
1488         (WebCore::HTMLInputElement::setValue):
1489         (WebCore::HTMLInputElement::setValueFromRenderer):
1490         * html/HTMLInputElement.h:
1491         (WebCore::HTMLInputElement::supportsPlaceholder):
1492         (WebCore::HTMLInputElement::isEmptyValue):
1493         * html/HTMLIsIndexElement.cpp:
1494         (WebCore::HTMLIsIndexElement::parseMappedAttribute):
1495         * html/HTMLTextAreaElement.cpp:
1496         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
1497         (WebCore::HTMLTextAreaElement::createRenderer):
1498         * html/HTMLTextAreaElement.h:
1499         (WebCore::HTMLTextAreaElement::supportsPlaceholder):
1500         (WebCore::HTMLTextAreaElement::isEmptyValue):
1501         * rendering/RenderTextControl.cpp:
1502         (WebCore::RenderTextControl::RenderTextControl):
1503         * rendering/RenderTextControl.h:
1504         * rendering/RenderTextControlMultiLine.cpp:
1505         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
1506         * rendering/RenderTextControlMultiLine.h:
1507         * rendering/RenderTextControlSingleLine.cpp:
1508         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
1509         (WebCore::RenderTextControlSingleLine::updateFromElement):
1510         * rendering/RenderTextControlSingleLine.h:
1511         * wml/WMLInputElement.cpp:
1512         (WebCore::WMLInputElement::setValue):
1513         (WebCore::WMLInputElement::createRenderer):
1514         * wml/WMLInputElement.h:
1515
1516 2009-09-26  Shu Chang  <Chang.Shu@nokia.com>
1517
1518         Reviewed by Alexey Proskuryakov.
1519
1520         Optimize the code so only the text from start to end is scanned.
1521         https://bugs.webkit.org/show_bug.cgi?id=29092
1522
1523         On a platform with webkit+Qt+Symbian, the parsing time for a 600K text
1524         file improved from 400ms to 40ms (10x faster).
1525
1526         * dom/Text.cpp:
1527         (WebCore::Text::createWithLengthLimit):
1528
1529 2009-09-26  Xiaomei Ji  <xji@chromium.org>
1530
1531         Reviewed by Eric Seidel.
1532
1533         This Patch fixes [chromium] the drop-down is always left-aligned even
1534         for RTL element.
1535         https://bugs.webkit.org/show_bug.cgi?id=29612
1536
1537         For auto-complete, the items in drop-down should be right-aligned if
1538         the directionality of <input> field is RTL.
1539         For <select><option>, the items in drop-down should be right-aligned
1540         if the directionality of <select> is RTL.
1541
1542         No automatic test is possible. Manual tests are added.
1543
1544         * manual-tests/autofill_alignment.html: Added.
1545         * manual-tests/select_alignment.html: Added.
1546         * platform/chromium/PopupMenuChromium.cpp:
1547         (WebCore::PopupListBox::paintRow): Adjust the starting x-axis of text to
1548         be paint if it should be right-aligned.
1549
1550 2009-09-25  Dan Bernstein  <mitz@apple.com>
1551
1552         Reviewed by Sam Weinig.
1553
1554         REGRESSION (r48775) FontList.plist written by TOT WebKit causes Safari 4
1555         to crash on launch
1556         https://bugs.webkit.org/show_bug.cgi?id=29759
1557
1558         * platform/graphics/win/FontDatabase.cpp:
1559         (WebCore::writeFontDatabaseToPlist): Reverted to saving the CG font DB
1560         property list at the root of FontList.plist, but with an additional
1561         key for the last value of the Fonts registry key.
1562         (WebCore::populateFontDatabase): Pass the FontList.plist in its entirety
1563         to populatFontDatabaseFromPlist.
1564
1565 2009-09-25  Kevin Ollivier  <kevino@theolliviers.com>
1566
1567         Build fix. Adding missing header files.
1568
1569         * bindings/js/JSNamedNodeMapCustom.cpp:
1570
1571 2009-09-25  David Kilzer  <ddkilzer@apple.com>
1572
1573         Part 1 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
1574
1575         Reviewed by Darin Adler.
1576
1577         * DerivedSources.make: Move tests for ENABLE_CONTEXT_MENUS,
1578         ENABLE_DRAG_SUPPORT and ENABLE_INSPECTOR into Mac-only section.
1579
1580 2009-09-25  Adam Barth  <abarth@webkit.org>
1581
1582         Reviewed by Darin Adler.
1583
1584         Load blocks during unload should not affect targeted loads
1585         https://bugs.webkit.org/show_bug.cgi?id=29747
1586
1587         Move the check of the unload state after checking for targeted links.
1588
1589         Test: fast/loader/unload-hyperlink-targeted.html
1590
1591         * loader/FrameLoader.cpp:
1592         (WebCore::FrameLoader::loadURL):
1593
1594 2009-09-25  Kenneth Russell  <kbr@google.com>
1595
1596         Reviewed by Dimitri Glazkov.
1597
1598         [Chromium] Add initial V8 bindings for WebGL
1599         https://bugs.webkit.org/show_bug.cgi?id=29664
1600
1601         * WebCore.gypi:
1602         * bindings/scripts/CodeGeneratorV8.pm:
1603         * bindings/v8/DOMObjectsInclude.h:
1604         * bindings/v8/DerivedSourcesAllInOne.cpp:
1605         * bindings/v8/V8DOMWrapper.cpp:
1606         (WebCore::V8DOMWrapper::getTemplate):
1607         * bindings/v8/V8Index.cpp:
1608         * bindings/v8/V8Index.h:
1609         * bindings/v8/custom/V8CanvasArrayBufferCustom.cpp: Added.
1610         (WebCore::CALLBACK_FUNC_DECL):
1611         * bindings/v8/custom/V8CanvasArrayCustom.h: Added.
1612         (WebCore::constructCanvasArray):
1613         * bindings/v8/custom/V8CanvasByteArrayCustom.cpp: Added.
1614         (WebCore::CALLBACK_FUNC_DECL):
1615         (WebCore::INDEXED_PROPERTY_GETTER):
1616         (WebCore::INDEXED_PROPERTY_SETTER):
1617         * bindings/v8/custom/V8CanvasFloatArrayCustom.cpp: Added.
1618         (WebCore::CALLBACK_FUNC_DECL):
1619         (WebCore::INDEXED_PROPERTY_GETTER):
1620         (WebCore::INDEXED_PROPERTY_SETTER):
1621         * bindings/v8/custom/V8CanvasIntArrayCustom.cpp: Added.
1622         (WebCore::CALLBACK_FUNC_DECL):
1623         (WebCore::INDEXED_PROPERTY_GETTER):
1624         (WebCore::INDEXED_PROPERTY_SETTER):
1625         * bindings/v8/custom/V8CanvasRenderingContext3DCustom.cpp: Added.
1626         (WebCore::jsArrayToFloatArray):
1627         (WebCore::jsArrayToIntArray):
1628         (WebCore::CALLBACK_FUNC_DECL):
1629         (WebCore::):
1630         (WebCore::vertexAttribAndUniformHelperf):
1631         (WebCore::uniformHelperi):
1632         (WebCore::uniformMatrixHelper):
1633         * bindings/v8/custom/V8CanvasShortArrayCustom.cpp: Added.
1634         (WebCore::CALLBACK_FUNC_DECL):
1635         (WebCore::INDEXED_PROPERTY_GETTER):
1636         (WebCore::INDEXED_PROPERTY_SETTER):
1637         * bindings/v8/custom/V8CanvasUnsignedByteArrayCustom.cpp: Added.
1638         (WebCore::CALLBACK_FUNC_DECL):
1639         (WebCore::INDEXED_PROPERTY_GETTER):
1640         (WebCore::INDEXED_PROPERTY_SETTER):
1641         * bindings/v8/custom/V8CanvasUnsignedIntArrayCustom.cpp: Added.
1642         (WebCore::CALLBACK_FUNC_DECL):
1643         (WebCore::INDEXED_PROPERTY_GETTER):
1644         (WebCore::INDEXED_PROPERTY_SETTER):
1645         * bindings/v8/custom/V8CanvasUnsignedShortArrayCustom.cpp: Added.
1646         (WebCore::CALLBACK_FUNC_DECL):
1647         (WebCore::INDEXED_PROPERTY_GETTER):
1648         (WebCore::INDEXED_PROPERTY_SETTER):
1649         * bindings/v8/custom/V8CustomBinding.h:
1650         * bindings/v8/custom/V8DocumentCustom.cpp:
1651         (WebCore::CALLBACK_FUNC_DECL):
1652         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1653         (WebCore::CALLBACK_FUNC_DECL):
1654         * platform/graphics/GraphicsContext3D.h:
1655
1656 2009-09-25  Jeremy Orlow  <jorlow@chromium.org>
1657
1658         This is breaking Chromium try bots, so I'm counting this as a build fix.
1659
1660         Add more svn:ignore exceptions.  On different platforms, these files are
1661         generated with different case for WebCore.
1662
1663         * WebCore.gyp: Changed property svn:ignore.
1664
1665 2009-09-25  Alexey Proskuryakov  <ap@apple.com>
1666
1667         Reverting r48767, as it broke Windows build in a non-trivial way.
1668
1669         * bindings/js/JSAbstractWorkerCustom.cpp:
1670         (WebCore::JSAbstractWorker::addEventListener):
1671         (WebCore::JSAbstractWorker::removeEventListener):
1672         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1673         (WebCore::JSDOMApplicationCache::addEventListener):
1674         (WebCore::JSDOMApplicationCache::removeEventListener):
1675         * bindings/js/JSDOMGlobalObject.cpp:
1676         (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
1677         * bindings/js/JSDOMWindowCustom.cpp:
1678         (WebCore::JSDOMWindow::addEventListener):
1679         (WebCore::JSDOMWindow::removeEventListener):
1680         * bindings/js/JSEventListener.cpp:
1681         (WebCore::JSEventListener::JSEventListener):
1682         (WebCore::JSEventListener::jsFunction):
1683         (WebCore::JSEventListener::markJSFunction):
1684         (WebCore::JSEventListener::handleEvent):
1685         (WebCore::JSEventListener::reportError):
1686         * bindings/js/JSEventListener.h:
1687         (WebCore::JSEventListener::create):
1688         * bindings/js/JSEventSourceCustom.cpp:
1689         (WebCore::JSEventSource::addEventListener):
1690         (WebCore::JSEventSource::removeEventListener):
1691         * bindings/js/JSLazyEventListener.cpp:
1692         (WebCore::JSLazyEventListener::JSLazyEventListener):
1693         (WebCore::JSLazyEventListener::jsFunction):
1694         (WebCore::JSLazyEventListener::parseCode):
1695         * bindings/js/JSLazyEventListener.h:
1696         (WebCore::JSLazyEventListener::create):
1697         * bindings/js/JSMessagePortCustom.cpp:
1698         (WebCore::JSMessagePort::addEventListener):
1699         (WebCore::JSMessagePort::removeEventListener):
1700         * bindings/js/JSNodeCustom.cpp:
1701         (WebCore::JSNode::addEventListener):
1702         (WebCore::JSNode::removeEventListener):
1703         * bindings/js/JSSVGElementInstanceCustom.cpp:
1704         (WebCore::JSSVGElementInstance::addEventListener):
1705         (WebCore::JSSVGElementInstance::removeEventListener):
1706         * bindings/js/JSWorkerContextCustom.cpp:
1707         (WebCore::JSWorkerContext::addEventListener):
1708         (WebCore::JSWorkerContext::removeEventListener):
1709         * bindings/js/JSXMLHttpRequestCustom.cpp:
1710         (WebCore::JSXMLHttpRequest::addEventListener):
1711         (WebCore::JSXMLHttpRequest::removeEventListener):
1712         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1713         (WebCore::JSXMLHttpRequestUpload::addEventListener):
1714         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
1715         * bindings/js/ScriptEventListener.cpp:
1716         (WebCore::createAttributeEventListener):
1717         * bindings/objc/ObjCEventListener.h:
1718         * bindings/objc/ObjCEventListener.mm:
1719         (WebCore::ObjCEventListener::handleEvent):
1720         * bindings/scripts/CodeGeneratorJS.pm:
1721         * dom/EventListener.h:
1722         (WebCore::EventListener::reportError):
1723         (WebCore::EventListener::jsFunction):
1724         * dom/EventTarget.cpp:
1725         (WebCore::EventTarget::fireEventListeners):
1726         * inspector/InspectorDOMAgent.cpp:
1727         (WebCore::InspectorDOMAgent::handleEvent):
1728         * inspector/InspectorDOMAgent.h:
1729         * inspector/InspectorDOMStorageResource.cpp:
1730         (WebCore::InspectorDOMStorageResource::handleEvent):
1731         * inspector/InspectorDOMStorageResource.h:
1732         * loader/ImageDocument.cpp:
1733         (WebCore::ImageEventListener::handleEvent):
1734         * svg/animation/SVGSMILElement.cpp:
1735         (WebCore::ConditionEventListener::handleEvent):
1736         * workers/WorkerContext.cpp:
1737         (WebCore::WorkerContext::reportException):
1738
1739 2009-09-24  Tony Chang  <tony@chromium.org>
1740
1741         Reviewed by David Levin.
1742
1743         Add a gyp variable to allow building a debug webcore without debug
1744         symbols.  This allows for faster compile, link, and gdb times.
1745
1746         https://bugs.webkit.org/show_bug.cgi?id=29721
1747
1748         No new tests, build config change.
1749
1750         * WebCore.gyp/WebCore.gyp:
1751
1752 2009-09-25  Darin Fisher  <darin@chromium.org>
1753
1754         Reviewed by Dimitri Glazkov.
1755
1756         Declare RegisteredEventListener as a class instead of a struct.
1757         This fixes a warning in the Chromium build.
1758
1759         * dom/RegisteredEventListener.h:
1760
1761 2009-09-25  Dan Bernstein  <mitz@apple.com>
1762
1763         Reviewed by Jon Honeycutt.
1764
1765         WebCore part of
1766         <rdar://problem/7211635> 2 byte characters are displayed as garbaged
1767         <rdar://problem/7212626> garbled/gibberish text (off-by-one)
1768
1769         When the Windows Fonts directory contains more than one font file for a
1770         given font name, which of the fonts gets assigned to the name in the
1771         Core Graphics font database was determined arbitrarily and did not
1772         always match the font GDI used for the same font name. The mismatch
1773         caused character-to-glyph mapping to use one font and glyph rendering to
1774         use another.
1775
1776         The fix is to update the Core Graphics font database from the registry
1777         entries (that reflect the name-to-font mapping that GDI uses) after
1778         populating it with the result of scanning the Fonts directory. As a
1779         consequence, the directory needs to be scanned at startup every time the
1780         registry key changes, so the last value of the registry key is kept
1781         in the property list on disk so that it could be compared to the current
1782         value on startup.
1783
1784         * platform/graphics/win/FontDatabase.cpp:
1785         (WebCore::populateFontDatabaseFromPlist): Now takes a property list as
1786         a parameter and avoids round-tripping through XML by calling
1787         wkAddFontsFromPlist() instead of wkAddFontsFromPlistRepresentation().
1788         (WebCore::fontFilenamesFromRegistryKey):
1789         (WebCore::cgFontDBKey):
1790         (WebCore::writeFontDatabaseToPlist): Now takes the CG font DB property
1791         list and a property list with the font filenames from the registry and
1792         writes a dictionary with those property lists as values.
1793         (WebCore::fontFilenamesFromRegistry): Added. Returns an array with the
1794         values in the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
1795         registry key.
1796         (WebCore::populateFontDatabase): Changed to read the contents of the
1797         Fonts registry key and compare it with the last-saved value from the
1798         property list, and to call wkAddFontsFromRegistry() after populating the
1799         CG font DB from the file system. Uses wkCreateFontsPlist() instead of
1800         wkCreateFontsPlistRepresentation() to avoid round-tripping through XML.
1801
1802 2009-09-25  Geoffrey Garen  <ggaren@apple.com>
1803
1804         Reviewed by Darin Adler.
1805
1806         Inlined some object creation code, including lexicalGlobalObject access
1807         https://bugs.webkit.org/show_bug.cgi?id=29750
1808
1809         * bindings/js/JSInspectorBackendCustom.cpp:
1810         (WebCore::JSInspectorBackend::currentCallFrame):
1811         * inspector/JavaScriptDebugServer.cpp:
1812         (WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
1813         API changes.
1814
1815 2009-09-25  Dave Hyatt  <hyatt@apple.com>
1816
1817         Reviewed by Anders Carlsson.
1818
1819         https://bugs.webkit.org/show_bug.cgi?id=24399
1820         Make @import work in user stylesheets.  The first bug was that the URL wasn't being set on the
1821         user sheets themselves, so relative @import URLs couldn't resolve properly.  The second bug
1822         was that the loads would be denied.  This is fixed by using the requestUserCSSStyleSheet method
1823         instead of the normal request method.  In order to know when to do this, CSSStyleSheets now have
1824         a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not.
1825
1826         * css/CSSImportRule.cpp:
1827         (WebCore::CSSImportRule::insertedIntoParent):
1828         * css/CSSStyleSheet.cpp:
1829         (WebCore::CSSStyleSheet::CSSStyleSheet):
1830         * css/CSSStyleSheet.h:
1831         (WebCore::CSSStyleSheet::setIsUserStyleSheet):
1832         (WebCore::CSSStyleSheet::isUserStyleSheet):
1833         * dom/Document.cpp:
1834         (WebCore::Document::pageUserSheet):
1835         (WebCore::Document::pageGroupUserSheets):
1836
1837 2009-09-25  Simon Fraser  <simon.fraser@apple.com>
1838
1839         Reviewed by Darin Adler.
1840
1841         ASSERTION FAILED: !repaintContainer || repaintContainer == this
1842         https://bugs.webkit.org/show_bug.cgi?id=29755
1843         
1844         It's possible for RenderObject::container() to return an object that is higher
1845         in the hierarchy than the repaintContainer that is being used to repaint an
1846         object. For example, this can happen when running an accelerated opacity
1847         transition on an element with a position:absolute parent, and a position:absolute child.
1848         
1849         In this case we need to detect when RenderObject::container() will skip over
1850         repaintContainer, and in that case adjust the coords to shift into repaintContainer's space.
1851
1852         Test: compositing/repaint/opacity-between-absolute.html
1853
1854         * rendering/RenderBox.cpp:
1855         (WebCore::RenderBox::mapLocalToContainer):
1856         (WebCore::RenderBox::computeRectForRepaint):
1857         * rendering/RenderInline.cpp:
1858         (WebCore::RenderInline::computeRectForRepaint):
1859         * rendering/RenderObject.cpp:
1860         (WebCore::RenderObject::container):
1861         * rendering/RenderObject.h:
1862
1863 2009-09-25  Simon Fraser  <simon.fraser@apple.com>
1864
1865         Reviewed by Darin Adler.
1866
1867         Crash with hardware accelerated rotation of a PDF image in a data URL
1868         <rdar://problem/7250378>
1869         
1870         PDF images don't return a color space from CGImageGetColorSpace(),
1871         so we need to null-check the return value before use.
1872
1873         Test: compositing/color-matching/pdf-image-match.html
1874
1875         * platform/graphics/mac/GraphicsLayerCA.mm:
1876         (WebCore::GraphicsLayerCA::setContentsToImage):
1877
1878 2009-09-25  Darin Adler  <darin@apple.com>
1879
1880         Reviewed by Geoffrey Garen.
1881
1882         Null-deref when first access to an Attr node is after its Element is destroyed
1883         https://bugs.webkit.org/show_bug.cgi?id=29748
1884
1885         Test: fast/dom/Attr/access-after-element-destruction.html
1886
1887         * bindings/js/JSAttrCustom.cpp:
1888         (WebCore::JSAttr::markChildren): Added. Keeps the ownerElement alive as
1889         long as the Attr is alive.
1890
1891         * bindings/js/JSNamedNodeMapCustom.cpp:
1892         (WebCore::JSNamedNodeMap::markChildren): Added. Keeps the Element alive as
1893         long as the NamedNodeMap is alive.
1894
1895         * dom/Attr.idl: Added CustomMarkFunction attribute.
1896
1897         * dom/NamedAttrMap.cpp:
1898         (WebCore::NamedNodeMap::getAttributeItem): Tweaked formatting.
1899         (WebCore::NamedNodeMap::detachFromElement): Call clearAttributes so we don't
1900         have attributes hanging around that might need an Attr node created; that way
1901         we won't crash with a null-dereference trying to deal with one of them. This
1902         can't happen when working with JavaScript since the Element will be kept
1903         alive due to the change above.
1904         (WebCore::NamedNodeMap::addAttribute): Fix function name in comment.
1905         (WebCore::NamedNodeMap::removeAttribute): Removed unneeded "+ 1" and added
1906         missing braces.
1907
1908         * dom/NamedAttrMap.h: Made the element function public so it can be used by
1909         the JavaScript binding to keep the Element alive.
1910
1911         * dom/NamedNodeMap.idl: Added CustomMarkFunction attribute.
1912
1913 2009-09-24  Alexey Proskuryakov  <ap@apple.com>
1914
1915         Reviewed by Darin Adler and Sam Weinig.
1916
1917         Onclick not fired for an element copied with cloneContents() or cloneNode()
1918         https://bugs.webkit.org/show_bug.cgi?id=25130
1919
1920         The change here is that JS event listeners don't keep a reference to a global object from
1921         where they were created, and instead take it as a parameter when parsing source code. Also,
1922         the listener creation won't fail just because it happens for an element in a frameless
1923         document.
1924         Thus, moving nodes between documents no longer results in having incorrect registered
1925         lazy event listeners on them.
1926
1927         Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
1928                fast/events/attribute-listener-cloned-from-frameless-doc-context.html
1929                fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
1930                fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
1931                fast/events/attribute-listener-extracted-from-frameless-doc-context.html
1932
1933         * bindings/js/JSEventListener.cpp:
1934         (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
1935         (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
1936         getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
1937         (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
1938         (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
1939         (WebCore::JSEventListener::reportError): Ditto.
1940
1941         * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
1942         to JSDOMGlobalObject.
1943
1944         * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
1945         creation was split between this function and ScriptEventListener; moved it here, as JS
1946         global object can be different now.
1947
1948         * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
1949         which can not be determined at parsing time.
1950
1951         * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
1952         for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
1953         expect that errors are logged at document parsing time, and because I don't know what other
1954         side effects moving it vould have.
1955
1956         * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
1957         because JSC needs a global context here.
1958
1959         * bindings/js/JSAbstractWorkerCustom.cpp:
1960         (WebCore::JSAbstractWorker::addEventListener):
1961         (WebCore::JSAbstractWorker::removeEventListener):
1962         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1963         (WebCore::JSDOMApplicationCache::addEventListener):
1964         (WebCore::JSDOMApplicationCache::removeEventListener):
1965         * bindings/js/JSDOMGlobalObject.cpp:
1966         (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
1967         * bindings/js/JSDOMWindowCustom.cpp:
1968         (WebCore::JSDOMWindow::addEventListener):
1969         (WebCore::JSDOMWindow::removeEventListener):
1970         * bindings/js/JSEventSourceCustom.cpp:
1971         (WebCore::JSEventSource::addEventListener):
1972         (WebCore::JSEventSource::removeEventListener):
1973         * bindings/js/JSMessagePortCustom.cpp:
1974         (WebCore::JSMessagePort::addEventListener):
1975         (WebCore::JSMessagePort::removeEventListener):
1976         * bindings/js/JSNodeCustom.cpp:
1977         (WebCore::JSNode::addEventListener):
1978         (WebCore::JSNode::removeEventListener):
1979         * bindings/js/JSSVGElementInstanceCustom.cpp:
1980         (WebCore::JSSVGElementInstance::addEventListener):
1981         (WebCore::JSSVGElementInstance::removeEventListener):
1982         * bindings/js/JSWorkerContextCustom.cpp:
1983         (WebCore::JSWorkerContext::addEventListener):
1984         (WebCore::JSWorkerContext::removeEventListener):
1985         * bindings/js/JSXMLHttpRequestCustom.cpp:
1986         (WebCore::JSXMLHttpRequest::addEventListener):
1987         (WebCore::JSXMLHttpRequest::removeEventListener):
1988         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1989         (WebCore::JSXMLHttpRequestUpload::addEventListener):
1990         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
1991         * bindings/objc/ObjCEventListener.h:
1992         * bindings/objc/ObjCEventListener.mm:
1993         (WebCore::ObjCEventListener::handleEvent):
1994         * bindings/scripts/CodeGeneratorJS.pm:
1995         * dom/EventTarget.cpp:
1996         (WebCore::EventTarget::fireEventListeners):
1997         * inspector/InspectorDOMAgent.cpp:
1998         (WebCore::InspectorDOMAgent::handleEvent):
1999         * inspector/InspectorDOMAgent.h:
2000         * inspector/InspectorDOMStorageResource.cpp:
2001         (WebCore::InspectorDOMStorageResource::handleEvent):
2002         * inspector/InspectorDOMStorageResource.h:
2003         * loader/ImageDocument.cpp:
2004         (WebCore::ImageEventListener::handleEvent):
2005         * svg/animation/SVGSMILElement.cpp:
2006         (WebCore::ConditionEventListener::handleEvent):
2007         * workers/WorkerContext.cpp:
2008         (WebCore::WorkerContext::reportException):
2009         Don't pass global object to JSEventListener::create(), which no longer needs it.
2010         Note that some of these functions still have an early return for null global object, which
2011         can probably be removed in a later patch.
2012         Pass ScriptExecutionContext to EventListener methods that now need it.
2013
2014 2009-09-25  Enrica Casucci  <enrica@apple.com>
2015
2016         Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
2017
2018         Fix for https://bugs.webkit.org/show_bug.cgi?id=29740
2019         <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
2020
2021         Change the way style is preserved when inserting a new paragraph.
2022         The original code handled insertion at the beginning and at the end of a paragraph as special
2023         cases. The newly created paragraph contained a set of nodes generated starting from the
2024         computed style of the insertion node. This approach has two problems:
2025         1. if the insertion node has a non opaque background color and one of the parent element did have
2026         a solid background color the new paragraph did not have the element with the solid color in the tree.
2027         2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
2028         background color and some font attribute was being reproduced as span + bold + italic + font as separate tags.
2029         The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
2030         paragraph where the insertion point is.
2031
2032         Test: editing/inserting/insert-bg-font.html
2033
2034         * editing/InsertParagraphSeparatorCommand.cpp:
2035         (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
2036         between the insert node and the outer block.
2037         (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
2038         in the new paragraph the same element hierarchy present in the starting paragraph.
2039         (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
2040         in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
2041         at the end of the paragraph to use the new methods instead of applying the calculated style.
2042         * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.
2043
2044 2009-09-25  Patrick Mueller  <Patrick_Mueller@us.ibm.com>
2045
2046         Reviewed by Timothy Hatcher.
2047
2048         Content-type parameters not taken into account when building form-data
2049         https://bugs.webkit.org/show_bug.cgi?id=28970
2050
2051         existing manual test case extended with new tests
2052
2053         * English.lproj/localizedStrings.js:
2054         * inspector/front-end/ResourceView.js:
2055         (WebInspector.ResourceView.prototype._refreshFormData):
2056         (WebInspector.ResourceView.prototype._refreshParms):
2057         * manual-tests/inspector/display-form-data.html:
2058
2059 2009-09-25  Yuan Song  <song.yuan@ericsson.com>
2060
2061         Reviewed by Darin Adler.
2062
2063         https://bugs.webkit.org/show_bug.cgi?id=14566
2064
2065         Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value.
2066
2067         Test: fast/js/invalid-domain-change-throws-exception.html
2068
2069         * dom/Document.cpp:
2070         (WebCore::Document::setDomain):
2071         * dom/Document.h:
2072         * dom/Document.idl:
2073
2074 2009-09-25  Adam Barth  <abarth@webkit.org>
2075
2076         Reviewed by Dimitri Glazkov.
2077
2078         [V8] Teach ScheduledAction::execute about isolated worlds
2079         https://bugs.webkit.org/show_bug.cgi?id=27703
2080
2081         When setTimeout is called with a string argument in an isolated
2082         world, we now compile the string in the isolated world.
2083
2084         Last time we tried this change, we got a lot of crashes.  This
2085         time we're using a fresh local handle as our context to avoid
2086         trouble if the peristent handle gets disposed before we leave
2087         the context.
2088
2089         Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
2090
2091         * bindings/v8/ScheduledAction.cpp:
2092         (WebCore::ScheduledAction::execute):
2093
2094 2009-09-25  Paul Godavari  <paul@chromium.org>
2095
2096         Reviewed by Darin Fisher.
2097
2098         Fix a regression in Mac Chromium popup menus, where the user's
2099         selection was ignored and the popup became unresponsive.
2100         https://bugs.webkit.org/show_bug.cgi?id=29726
2101
2102         The fix is to notify the popup's client that the popup was hidden,
2103         even if the popup has no parent.
2104
2105         * platform/chromium/PopupMenuChromium.cpp:
2106         (WebCore::PopupListBox::hidePopup):
2107
2108 2009-09-25  Alexander Pavlov  <apavlov@chromium.org>
2109
2110         Reviewed by Dan Bernstein.
2111
2112         Enable Pasteboard::writePlainText for Chromium and fix code style nits.
2113         https://bugs.webkit.org/show_bug.cgi?id=29734
2114
2115         * platform/chromium/PasteboardChromium.cpp:
2116         (WebCore::Pasteboard::writePlainText):
2117         * platform/gtk/PasteboardGtk.cpp:
2118         (WebCore::Pasteboard::writePlainText):
2119         (WebCore::Pasteboard::writeURL):
2120         * platform/mac/PasteboardMac.mm:
2121         (WebCore::Pasteboard::writeSelection):
2122         (WebCore::Pasteboard::writePlainText):
2123         (WebCore::Pasteboard::writeURL):
2124         * platform/qt/PasteboardQt.cpp:
2125         (WebCore::Pasteboard::writePlainText):
2126
2127 2009-09-25  Yongjun Zhang  <yongjun.zhang@nokia.com>
2128
2129         Reviewed by Ariya Hidayat.
2130
2131         https://bugs.webkit.org/show_bug.cgi?id=28876
2132         [Qt] reduce peak memory consumption of text decoding.
2133
2134         Chop large input buffer into small buffers to reduce peak memory
2135         during decoding.
2136
2137         * platform/text/qt/TextCodecQt.cpp:
2138         (WebCore::TextCodecQt::decode):
2139
2140 2009-09-24  Jon Honeycutt  <jhoneycutt@apple.com>
2141
2142         Add a mechanism for automatically halting plug-ins.
2143
2144         Reviewed by Oliver Hunt and Alice Liu.
2145
2146         * GNUmakefile.am:
2147
2148         * WebCore.base.exp:
2149         Update export of Page constructor.
2150
2151         * WebCore.gypi:
2152
2153         * WebCore.pro:
2154
2155         * WebCore.vcproj/WebCore.vcproj:
2156         Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
2157         HaltablePlugin.h.
2158
2159         * WebCore.xcodeproj/project.pbxproj:
2160         Add files to Mac project.
2161
2162         * loader/EmptyClients.h:
2163         Added an empty PluginHalterClient.
2164         (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
2165         Return false.
2166
2167         * page/PluginHalter.cpp: Added.
2168         (WebCore::PluginHalter::PluginHalter):
2169         (WebCore::PluginHalter::didStartPlugin):
2170         Add the object to the plug-in set. If this is the only item in the set,
2171         set m_oldestStartTime to this object's time, and start the timer.
2172         (WebCore::PluginHalter::didStopPlugin):
2173         Remove the plug-in from the set.
2174         (WebCore::PluginHalter::timerFired):
2175         Find the cut-off time as the current time minus the allowed run time;
2176         plug-ins older than this may be halted. Iterate over the plug-ins. Find
2177         the object with the oldest start time that is too young to be halted;
2178         we'll use its start time to set the timer's next fire time. For all
2179         plug-ins that are candidates to be halted, call the
2180         PluginHalterClient's shouldHaltPlugin(). If this function returns true,
2181         call the plug-in's halt() function. Remove these objects from the set
2182         of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
2183         (WebCore::PluginHalter::startTimerIfNecessary):
2184         If the timer is set to fire, or the set of tracked plug-ins is empty,
2185         return early. Set the timer to fire after the oldest plug-in has run
2186         for the allowed run time.
2187
2188         * page/PluginHalter.h: Added.
2189         (WebCore::PluginHalter::setPluginAllowedRunTime):
2190
2191         * page/PluginHalterClient.h: Added.
2192         (WebCore::PluginHalterClient::~PluginHalterClient):
2193
2194         * page/Page.cpp:
2195         (WebCore::Page::Page):
2196         Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
2197         to create the PluginHalter if necessary.
2198         (WebCore::Page::pluginHalterEnabledStateChanged):
2199         If plug-in halting is enabled, create the PluginHalter. If it is
2200         disabled, clear it.
2201         (WebCore::Page::pluginAllowedRunTimeChanged):
2202         If there is a plug-in halter, call its setPluginAllowedRunTime().
2203         (WebCore::Page::didStartPlugin):
2204         If there is a plug-in halter, call its didStartPlugin().
2205         (WebCore::Page::didStopPlugin):
2206         If there is a plug-in halter, call its didStopPlugin().
2207
2208         * page/Page.h:
2209         Add a parameter to the Page constructor for the PluginHalterClient.
2210         Added declarations for didStartPlugin() and didStopPlugin(), which are
2211         called when HaltablePlugins are added to or removed from the page. Adds
2212         pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
2213         notify the Page when these settings are changed. Added members to hold
2214         the PluginHalter and the PluginHalterClient.
2215
2216         * page/Settings.cpp:
2217         (WebCore::Settings::Settings):
2218         (WebCore::Settings::setPluginHalterEnabled):
2219         If the enabled state has changed, call the Page's
2220         pluginHalterEnabledStateChanged().
2221         (WebCore::Settings::setPluginAllowedRunTime):
2222         Call the Page's pluginAllowedRunTimeChanged().
2223
2224         * page/Settings.h:
2225         (WebCore::Settings::pluginHalterEnabled):
2226         (WebCore::Settings::pluginAllowedRunTime):
2227
2228         * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that
2229         can be automatically halted.
2230         (WebCore::HaltablePlugin::~HaltablePlugin):
2231
2232         * svg/graphics/SVGImage.cpp:
2233         (WebCore::SVGImage::dataChanged):
2234         Pass a dummy PluginHalterClient.
2235
2236 2009-09-24  Simon Fraser  <simon.fraser@apple.com>
2237
2238         Reviewed by Dan Bernstein.
2239
2240         REGRESSION: webkit-transform scale no longer works properly in nightly build
2241         https://bugs.webkit.org/show_bug.cgi?id=29730
2242         
2243         When the initial or final state of a scale animation does not specify a transform,
2244         use a default scale of 1, rather than zero.
2245
2246         Test: compositing/transitions/scale-transition-no-start.html
2247
2248         * platform/graphics/mac/GraphicsLayerCA.mm:
2249         (WebCore::getTransformFunctionValue):
2250
2251 2009-09-24  John Gregg  <johnnyg@google.com>
2252
2253         Reviewed by Eric Seidel.
2254
2255         isEnabled switch for notifications (experimental) in Page Settings
2256         https://bugs.webkit.org/show_bug.cgi?id=28930
2257
2258         Adds a run-time flag in Settings object that controls whether
2259         to expose desktop notifications.
2260
2261         No new test, but test code also modified to set this preference.
2262
2263         * page/DOMWindow.cpp:
2264         (WebCore::DOMWindow::webkitNotifications): check preference before returning notifications object
2265         * page/Settings.cpp:
2266         (WebCore::Settings::Settings):
2267         (WebCore::Settings::setExperimentalNotificationsEnabled):
2268         * page/Settings.h:
2269         (WebCore::Settings::experimentalNotificationsEnabled):
2270
2271 2009-09-24  Dan Bernstein  <mitz@apple.com>
2272
2273         Reviewed by Sam Weinig.
2274
2275         Fix <rdar://problem/7162000> Crash while trying to
2276         calculate the horizontal position of image
2277
2278         Test: fast/inline-block/relative-positioned-rtl-crash.html
2279
2280         * rendering/RenderBox.cpp:
2281         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Corrected an
2282         isInline() test to isRenderInline(). This is similar to r41259.
2283
2284 2009-09-24  Jessie Berlin  <jberlin@webkit.org>
2285
2286         Reviewed by Timothy Hatcher.
2287
2288         Fix expanding profile call stacks being broken after sorting.
2289         https://bugs.webkit.org/show_bug.cgi?id=26423
2290
2291         * inspector/front-end/ProfileDataGridTree.js:
2292         (WebInspector.ProfileDataGridNode.prototype.sort):
2293         Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
2294         causes the children to be placed in the right positions.
2295
2296 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
2297
2298         Reviewed by Stephanie Lewis.
2299
2300         Fixed sudden termination console spew due to too many calls to
2301         enableSuddenTermination.
2302         
2303         <rdar://problem/7063125> 10A410: Safari logging enableSuddenTermination errors
2304
2305         * page/DOMWindow.cpp:
2306         (WebCore::removeUnloadEventListener):
2307         (WebCore::removeAllUnloadEventListeners):
2308         (WebCore::removeBeforeUnloadEventListener):
2309         (WebCore::removeAllBeforeUnloadEventListeners): Only
2310         enableSuddenTermination if the set of listeners is empty *and* this
2311         window was in the set. Otherwise, a no-op will cause us to enableSuddenTermination.
2312
2313 2009-09-24  Carol Szabo  <carol.szabo@nokia.com>
2314
2315         Reviewed by Alexey Proskuryakov.
2316
2317         WebKit returns "" instead of null when getting
2318         inexistent, forbidden or invalidly named headers.
2319         https://bugs.webkit.org/show_bug.cgi?id=29140
2320
2321         * xml/XMLHttpRequest.cpp:
2322         (WebCore::XMLHttpRequest::getResponseHeader):
2323         Changed to return null as it should according to the spec.
2324
2325 2009-09-24  Jeremy Orlow  <jorlow@chromium.org>
2326
2327         Reviewed by Dimitri Glazkov.
2328
2329         Add GYP generated files to svn:ignore
2330         https://bugs.webkit.org/show_bug.cgi?id=29724
2331
2332         Adding the following files to the svn:ignore list (all in the
2333         WebCore/WebCore.gyp directory)
2334
2335         WebCore.xcodeproj
2336         WebCore.sln
2337         WebCore.vcproj
2338         WebCore_Debug.rules
2339         WebCore_Release.rules
2340         WebCore_Release - no tcmalloc.rules
2341         WebCore_Purify.rules
2342         WebCore.mk
2343         WebCore_Debug_rules.mk
2344         WebCore_Release_rules.mk
2345         WebCore_Release - no tcmalloc_rules.mk
2346         WebCore_Purify_rules.mk
2347         WebCore.scons
2348         WebCore_main.scons
2349
2350         * WebCore.gyp: Changed property svn:ignore.
2351
2352 2009-09-24  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2353
2354         Unreviewed. Mac build fix.
2355
2356         * page/EventHandler.cpp:
2357         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2358         remove unused parameter from function signature;
2359
2360 2009-09-24  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2361
2362         Reviewed by Oliver Hunt.
2363
2364         Implement correct horizontal scrollbar behavior for GTK+ also on
2365         styled scrollbars.
2366
2367         https://bugs.webkit.org/show_bug.cgi?id=29348
2368         [Gtk] Scrollwheel on horizontal scrollbars should slide horizontally
2369
2370         Test: platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
2371
2372         * page/EventHandler.cpp:
2373         (WebCore::EventHandler::handleWheelEvent): on GTK+, when using the
2374         wheel with the pointer on the horizontal scrollbar, scroll
2375         horizontally;
2376         * platform/PlatformWheelEvent.h:
2377         * platform/gtk/WheelEventGtk.cpp:
2378         (WebCore::PlatformWheelEvent::swapOrientation): allow adding a
2379         vertical scroll to the horizontal one;
2380
2381 2009-09-24  Jeremy Orlow  <jorlow@chromium.org>
2382
2383         Reviewed by Eric Seidel.
2384
2385         StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
2386         https://bugs.webkit.org/show_bug.cgi?id=29290
2387
2388         Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
2389         per http://webkit.org/coding/RefPtr.html
2390
2391         No behavior change, so no tests.
2392
2393         * storage/StorageNamespace.h:
2394         * storage/StorageNamespaceImpl.cpp:
2395         (WebCore::StorageNamespaceImpl::storageArea):
2396         * storage/StorageNamespaceImpl.h:
2397
2398 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
2399
2400         Reviewed by Sam Weinig.
2401
2402         Added back enable/disableSuddenTermination() functionality I accidentally
2403         removed in my last patch.
2404
2405         * page/DOMWindow.cpp:
2406         (WebCore::addUnloadEventListener):
2407         (WebCore::removeUnloadEventListener):
2408         (WebCore::removeAllUnloadEventListeners):
2409         (WebCore::addBeforeUnloadEventListener):
2410         (WebCore::removeBeforeUnloadEventListener):
2411         (WebCore::removeAllBeforeUnloadEventListeners):
2412         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
2413         (WebCore::DOMWindow::~DOMWindow):
2414         (WebCore::DOMWindow::addEventListener):
2415         (WebCore::DOMWindow::removeEventListener):
2416         (WebCore::DOMWindow::removeAllEventListeners):
2417
2418 2009-09-24  Sam Weinig  <sam@webkit.org>
2419
2420         Reviewed by Steve Falkenburg and Mark Rowe.
2421
2422         Don't pass -F to GCC on non-mac platforms since it is an darwin only.
2423
2424         * DerivedSources.make:
2425
2426 2009-09-24  Sam Weinig  <sam@webkit.org>
2427
2428         Fix windows build.
2429
2430         * dom/Element.idl:
2431
2432 2009-09-23  Stephen White  <senorblanco@chromium.org>
2433
2434         Reviewed by Eric Seidel.
2435
2436         Revert the relevant parts of r47925, and implement an alternate
2437         fix (localize the coordinate check to GraphicsContext::clipPath()).
2438         This fixes http://crbug.com/21174.
2439
2440         Covered by LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html.
2441
2442         * platform/graphics/skia/GraphicsContextSkia.cpp:
2443         (WebCore::GraphicsContext::clipPath):
2444         * platform/graphics/skia/PlatformContextSkia.cpp:
2445         (PlatformContextSkia::currentPathInLocalCoordinates):
2446
2447 2009-09-24  Brady Eidson  <beidson@apple.com>
2448
2449         Reviewed by Sam Weinig.
2450
2451         Merge changes from Mozilla's FTP directory parser.
2452         <rdar://problem/7227620> and https://bugs.webkit.org/show_bug.cgi?id=29294
2453
2454         FTP layout tests not possible at this time.
2455         https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible.
2456
2457         * loader/FTPDirectoryParser.cpp:
2458         (WebCore::ParsingFailed):
2459         (WebCore::parseOneFTPLine):
2460
2461 2009-09-24  Philippe Normand  <pnormand@igalia.com>
2462
2463         Reviewed by Gustavo Noronha.
2464
2465         [GTK] re-enable some media tests
2466         https://bugs.webkit.org/show_bug.cgi?id=29716
2467
2468         make canPlayType() return "probably" if mime-type is known
2469         and codecs string is not empty. If codecs is empty return
2470         "maybe".
2471
2472         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2473         (WebCore::MediaPlayerPrivate::supportsType):
2474
2475 2009-09-24  Sam Weinig  <sam@webkit.org>
2476
2477         Reviewed by Dan Bernstein.
2478
2479         Fix for https://bugs.webkit.org/show_bug.cgi?id=29703
2480         Add a function to element to check whether it matches a CSS selector
2481
2482         Implement Element.webkitMatchesSelector.
2483
2484         * css/CSSSelectorList.cpp:
2485         (WebCore::forEachTagSelector):
2486         (WebCore::forEachSelector):
2487         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
2488         (WebCore::CSSSelectorList::selectorsNeedNamespaceResolution):
2489         * css/CSSSelectorList.h:
2490         Moved code to iterate the CSSSelectorList and determine if any
2491         selectors need namespace resolution from a static function in
2492         Node.cpp to CSSSelectorList so that it can be used by webkitMatchesSelector
2493         as well as querySelector/querySelectorAll.
2494
2495         * dom/Element.cpp:
2496         (WebCore::Element::webkitMatchesSelector):
2497         * dom/Element.h: 
2498         * dom/Element.idl:
2499         Implement the new function. Handles exceptional cases identically to
2500         querySelector/querySelectorAll.
2501
2502         * dom/Node.cpp:
2503         (WebCore::Node::querySelector):
2504         (WebCore::Node::querySelectorAll):
2505         Moved selectorsNeedNamespaceResolution to CSSSelectorList from here.
2506
2507 2009-09-24  Vitaly Repeshko  <vitalyr@chromium.org>
2508
2509         Reviewed by Dimitri Glazkov.
2510
2511         [V8] Fixed bindings build after http://trac.webkit.org/changeset/48701
2512         https://bugs.webkit.org/show_bug.cgi?id=29713
2513
2514         Got rid of isWindowEvent in function signatures:
2515         * bindings/v8/V8AbstractEventListener.cpp:
2516         (WebCore::V8AbstractEventListener::invokeEventHandler):
2517         (WebCore::V8AbstractEventListener::handleEvent):
2518         (WebCore::V8AbstractEventListener::getReceiverObject):
2519         * bindings/v8/V8AbstractEventListener.h:
2520         * bindings/v8/V8LazyEventListener.cpp:
2521         (WebCore::V8LazyEventListener::callListenerFunction):
2522         * bindings/v8/V8LazyEventListener.h:
2523         * bindings/v8/V8WorkerContextEventListener.cpp:
2524         (WebCore::V8WorkerContextEventListener::handleEvent):
2525         (WebCore::V8WorkerContextEventListener::callListenerFunction):
2526         (WebCore::V8WorkerContextEventListener::getReceiverObject):
2527         * bindings/v8/V8WorkerContextEventListener.h:
2528         * bindings/v8/custom/V8CustomEventListener.cpp:
2529         (WebCore::V8EventListener::callListenerFunction):
2530         * bindings/v8/custom/V8CustomEventListener.h:
2531
2532         Switched to EventTarget methods of adding/removing listeners:
2533         * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
2534         (WebCore::toEventID):
2535         (WebCore::ACCESSOR_SETTER):
2536
2537         * dom/EventTarget.h: Some functions were incorrectly marked
2538         as JSC-specific.
2539
2540 2009-09-24  Pavel Feldman  <pfeldman@chromium.org>
2541
2542         Reviewed by Timothy Hatcher.
2543
2544         Web Inspector: Color-code watch expression errors with red.
2545
2546         https://bugs.webkit.org/show_bug.cgi?id=29707
2547
2548         * inspector/front-end/WatchExpressionsSidebarPane.js:
2549         (WebInspector.WatchExpressionsSection.prototype.update):
2550         (WebInspector.WatchExpressionTreeElement.prototype.update):
2551         * inspector/front-end/inspector.css:
2552
2553 2009-09-24  Pavel Feldman  <pfeldman@chromium.org>
2554
2555         Reviewed by Timothy Hatcher.
2556
2557         Web Inspector: Fix formatting for messages derived from resource warnings,
2558         couple of drive-by formatting fixes.
2559
2560         https://bugs.webkit.org/show_bug.cgi?id=29705
2561
2562         * inspector/InspectorFrontend.cpp:
2563         (WebCore::InspectorFrontend::addMessageToConsole):
2564         * inspector/front-end/ConsoleView.js:
2565         * inspector/front-end/InjectedScript.js:
2566         (InjectedScript._evaluateAndWrap):
2567         * inspector/front-end/WatchExpressionsSidebarPane.js:
2568         (WebInspector.WatchExpressionsSection.prototype.update):
2569
2570 2009-09-22  Pavel Feldman  <pfeldman@chromium.org>
2571
2572         Reviewed by Timothy Hatcher.
2573
2574         WebInspector: Implement InspectorController::copyNode(id).
2575
2576         https://bugs.webkit.org/show_bug.cgi?id=28357
2577
2578         * inspector/InspectorBackend.cpp:
2579         (WebCore::InspectorBackend::copyNode):
2580         * inspector/InspectorBackend.h:
2581         * inspector/InspectorBackend.idl:
2582         * inspector/front-end/ElementsPanel.js:
2583         (WebInspector.ElementsPanel.prototype.handleCopyEvent):
2584
2585 2009-09-24  Oliver Hunt  <oliver@apple.com>
2586
2587         Reviewed by NOBODY(rollout)
2588
2589         Roll out r48712 as it is incorrect.
2590
2591         Overriding getPropertyNames is incorrect.
2592
2593         * bridge/runtime_array.cpp:
2594         * bridge/runtime_array.h:
2595
2596 2009-09-24  Xan Lopez  <xlopez@igalia.com>
2597
2598         Revert r48697, since it broke key handling notification to GTK+.
2599
2600         * platform/gtk/KeyEventGtk.cpp:
2601         (WebCore::keyIdentifierForGdkKeyCode):
2602         (WebCore::singleCharacterString):
2603
2604 2009-09-24  Philippe Normand  <pnormand@igalia.com>
2605
2606         Reviewed by Xan Lopez.
2607
2608         [GTK] GStreamer MediaPlayer is unable to correctly querry duration
2609         https://bugs.webkit.org/show_bug.cgi?id=24639
2610
2611         check duration returned by gst_element_query_duration() only
2612         when using GStreamer < 0.10.23.
2613
2614         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2615         (WebCore::MediaPlayerPrivate::duration):
2616
2617 2009-09-24  Benjamin Poulain  <benjamin.poulain@nokia.com>
2618
2619         Reviewed by Eric Seidel.
2620
2621         The indices of RuntimeArray should be enumerated like for a regular array.
2622         https://bugs.webkit.org/show_bug.cgi?id=29005
2623
2624         * bridge/runtime_array.cpp:
2625         (JSC::RuntimeArray::getPropertyNames):
2626         * bridge/runtime_array.h:
2627
2628 2009-09-23  Alexander Pavlov  <apavlov@chromium.org>
2629
2630         Reviewed by Eric Seidel.
2631
2632         Introduce Pasteboard::writePlaintext(const String&) so that copying
2633         of the inspected elements HTML will be possible in WebInspector.
2634         https://bugs.webkit.org/show_bug.cgi?id=29634
2635
2636         * platform/Pasteboard.h:
2637         * platform/android/TemporaryLinkStubs.cpp:
2638         (Pasteboard::writePlainText):
2639         * platform/chromium/ChromiumBridge.h:
2640         * platform/chromium/PasteboardChromium.cpp:
2641         (WebCore::Pasteboard::writePlainText):
2642         * platform/gtk/PasteboardGtk.cpp:
2643         (WebCore::Pasteboard::writePlainText):
2644         * platform/haiku/PasteboardHaiku.cpp:
2645         (WebCore::Pasteboard::writePlainText):
2646         * platform/mac/PasteboardMac.mm:
2647         (WebCore::Pasteboard::writePlainText):
2648         * platform/qt/PasteboardQt.cpp:
2649         (WebCore::Pasteboard::writePlainText):
2650         * platform/win/PasteboardWin.cpp:
2651         (WebCore::Pasteboard::writeSelection):
2652         (WebCore::Pasteboard::writePlainText):
2653         * platform/wince/PasteboardWince.cpp:
2654         (WebCore::Pasteboard::writePlainText):
2655         * platform/wx/PasteboardWx.cpp:
2656         (WebCore::Pasteboard::writeSelection):
2657         (WebCore::Pasteboard::writePlainText):
2658         (WebCore::Pasteboard::writeURL):
2659
2660 2009-09-24  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
2661
2662         Reviewed by Simon Hausmann.
2663
2664         Fix QApp::translate() calls to provide the correct class name without
2665         a trailing comma.
2666
2667         * platform/qt/Localizations.cpp:
2668         (WebCore::localizedMediaTimeDescription):
2669
2670 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
2671
2672         More build fix: Removed JSSharedWorkerContextCustom.cpp from project
2673         files, since it no longer exists in the repository.
2674
2675         * GNUmakefile.am:
2676         * WebCore.gypi:
2677         * WebCore.pro:
2678         * WebCore.vcproj/WebCore.vcproj:
2679
2680 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
2681
2682         Windows build fix: Declare set/unsetPendingActivity public, so
2683         SharedWorkerScriptLoader can call them.
2684
2685         * dom/ActiveDOMObject.h:
2686
2687 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
2688
2689         Fixed a bit of the Windows build.
2690
2691         * workers/SharedWorker.idl: Declare a custom mark function. (I accidentally
2692         removed this in my last patch.)
2693         * WebCore.xcodeproj/project.pbxproj: Added JSSharedWorkerCustom.cpp back
2694         to the build. (I accidentally removed this in my last patch.)
2695
2696 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
2697
2698         32-bit build fix: restore previous cast that I thought was unnecessary.
2699
2700         * xml/XMLHttpRequest.cpp:
2701         (WebCore::XMLHttpRequest::didSendData):
2702         (WebCore::XMLHttpRequest::didReceiveData):
2703
2704 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
2705
2706         Reviewed by Sam Weinig.
2707
2708         Bring a little sanity to this crazy EventTarget world of ours
2709         https://bugs.webkit.org/show_bug.cgi?id=29701
2710
2711         Lots of EventTarget refactoring to achieve a single shared implementation
2712         that fixes some of the performance and correctness bugs of the many individual
2713         implementations, and makes reasoning about EventTargets and EventListeners
2714         much easier.
2715         
2716         The basic design is this:
2717             - EventTarget manages a set of EventListeners.
2718             - onXXX EventListener attributes forward to standard EventTarget APIs.
2719             - Since the onXXX code is repetitive, it is usually done with macros
2720               of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName).
2721             - EventTarget provides a shared implementation of dispatchEvent,
2722               which subclasses with special event dispatch rules, like Node, override.
2723             - To support Node, which lazily instantiates its EventTarget data,
2724               EventTarget has no data members, and instead makes a virtual call
2725               to get its data from wherever its subclass chose to store it.
2726               
2727         Code that used to call dispatchEvent, passing an ExceptionCode paratmeter,
2728         even though no exception could be thrown, has been changed not to do so,
2729         to improve clarity and performance.
2730         
2731         Code that used to call a special dispatchXXXEvent function, which just
2732         turned around and called dispatchEvent, has been changed to call
2733         dispatchEvent, to improve clarity and performance.
2734
2735         * WebCore.base.exp:
2736         * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit
2737         engineer.
2738
2739         * bindings/js/JSDOMBinding.cpp:
2740         (WebCore::isObservableThroughDOM): Updated for Node API change. Added
2741         "is not in the document but is firing event listeners" as a condition
2742         that makes a Node observable in the DOM, so that event listeners firing
2743         on removed nodes are not destroyed midstream. (This was a long-standing
2744         bug that was somewhat hidden by the old implementation's habit of
2745         copying the RegisteredEventListener vector before firing events, which
2746         would keep almost all the relevant objects from being destroyed.)
2747
2748         * bindings/js/JSEventListener.cpp:
2749         (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag
2750         because it was one of the most elaborately planned no-ops in the history
2751         of software crime, and one of the reasons clients thought they needed more
2752         than one dispatchEvent function even though they didn't.
2753         * bindings/js/JSEventListener.h:
2754
2755         * bindings/js/JSDOMWindowCustom.cpp:
2756         (WebCore::JSDOMWindow::markChildren):
2757         (WebCore::JSMessagePort::markChildren):
2758         * bindings/js/JSNodeCustom.cpp:
2759         (WebCore::JSNode::markChildren):
2760         * bindings/js/JSAbstractWorkerCustom.cpp:
2761         * bindings/js/JSDOMApplicationCacheCustom.cpp:
2762         * bindings/js/JSDedicatedWorkerContextCustom.cpp:
2763         * bindings/js/JSEventSourceCustom.cpp:
2764         * bindings/js/JSMessagePortCustom.cpp:
2765         * bindings/js/JSSharedWorkerContextCustom.cpp: Removed.
2766         * bindings/js/JSWebSocketCustom.cpp:
2767         * bindings/js/JSWorkerContextCustom.cpp:
2768         (WebCore::JSWorkerContext::markChildren):
2769         * bindings/js/JSWorkerCustom.cpp:
2770         * bindings/js/JSXMLHttpRequestCustom.cpp:
2771         (WebCore::JSXMLHttpRequest::markChildren):
2772         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
2773         (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is
2774         now autogenerated. Classes that still have custom mark functions for other
2775         reasons now call a shared EventTarget API to mark their EventListeners.
2776
2777         * bindings/objc/ObjCEventListener.h:
2778         * bindings/objc/ObjCEventListener.mm:
2779         (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent.
2780
2781         * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for
2782         marking and invalidating event listeners.
2783
2784         * dom/CharacterData.cpp:
2785         (WebCore::CharacterData::dispatchModifiedEvent):
2786         * dom/ContainerNode.cpp:
2787         (WebCore::ContainerNode::insertBefore):
2788         (WebCore::ContainerNode::replaceChild):
2789         (WebCore::willRemoveChild):
2790         (WebCore::ContainerNode::appendChild):
2791         (WebCore::dispatchChildInsertionEvents):
2792         (WebCore::dispatchChildRemovalEvents):
2793         * dom/Document.cpp:
2794         (WebCore::Document::removeAllEventListeners):
2795         (WebCore::Document::implicitClose):
2796         (WebCore::Document::setFocusedNode):
2797         (WebCore::Document::dispatchWindowEvent):
2798         (WebCore::Document::dispatchWindowLoadEvent):
2799         (WebCore::Document::finishedParsing):
2800         * dom/Document.h: Use dispatchEvent directly.
2801
2802         * dom/Element.h: Moved a few event listener attributes down from Node,
2803         since they don't apply to all Nodes, only Elements.
2804
2805         * dom/EventListener.h: Removed isWindowEvent parameter.
2806
2807         * dom/EventNames.h: Added the "display" event name, so it works correctly
2808         with attribute macros, and for performance.
2809
2810         * dom/EventTarget.cpp:
2811         (WebCore::forbidEventDispatch):
2812         (WebCore::allowEventDispatch):
2813         (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread
2814         safe, since it's now called on multiple threads. (Currently, we only forbid
2815         event dispatch on the main thread. If we ever want to forbid event dispatch
2816         on secondary threads, we can improve it then.)
2817
2818         (WebCore::EventTarget::addEventListener):
2819         (WebCore::EventTarget::removeEventListener):
2820         (WebCore::EventTarget::setAttributeEventListener):
2821         (WebCore::EventTarget::getAttributeEventListener):
2822         (WebCore::EventTarget::clearAttributeEventListener):
2823         (WebCore::EventTarget::dispatchEvent):
2824         (WebCore::EventTarget::fireEventListeners):
2825         (WebCore::EventTarget::getEventListeners):
2826         (WebCore::EventTarget::removeAllEventListeners):
2827         * dom/EventTarget.h:
2828         (WebCore::FiringEventEndIterator::FiringEventEndIterator):
2829         (WebCore::EventTarget::ref):
2830         (WebCore::EventTarget::deref):
2831         (WebCore::EventTarget::markEventListeners):
2832         (WebCore::EventTarget::invalidateEventListeners):
2833         (WebCore::EventTarget::isFiringEventListeners):
2834         (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of
2835         EventTarget APIs, crafted from an amalgam of all the different versions
2836         we used to have. The most significant change here is that we no longer
2837         make a copy of an EventListener vector before firing the events in the
2838         vector -- instead, we use a reference to the original vector, along with
2839         a notification mechanism for the unlikely case when an EventListener is
2840         removed from the vector. This substantially reduces malloc, copying, and
2841         refcount overhead, and complexity.
2842
2843         * dom/InputElement.cpp:
2844         (WebCore::InputElement::setValueFromRenderer):
2845         * dom/MessageEvent.h:
2846         (WebCore::MessageEvent::create): Use dispatchEvent directly.
2847
2848         * dom/MessagePort.cpp:
2849         (WebCore::MessagePort::dispatchMessages):
2850         (WebCore::MessagePort::eventTargetData):
2851         (WebCore::MessagePort::ensureEventTargetData):
2852         * dom/MessagePort.h:
2853         (WebCore::MessagePort::setOnmessage):
2854         (WebCore::MessagePort::onmessage):
2855         * dom/MessagePort.idl: Removed custom EventTarget implementation.
2856
2857         * dom/MutationEvent.h:
2858         (WebCore::MutationEvent::create): Added some default values so callers
2859         can construct MutationEvents more easily, without calling a custom dispatch
2860         function.
2861
2862         * dom/Node.cpp:
2863         (WebCore::Node::addEventListener):
2864         (WebCore::Node::removeEventListener):
2865         (WebCore::Node::eventTargetData):
2866         (WebCore::Node::ensureEventTargetData):
2867         (WebCore::Node::handleLocalEvents):
2868         (WebCore::Node::dispatchEvent):
2869         (WebCore::Node::dispatchGenericEvent):
2870         (WebCore::Node::dispatchSubtreeModifiedEvent):
2871         (WebCore::Node::dispatchUIEvent):
2872         (WebCore::Node::dispatchKeyEvent):
2873         (WebCore::Node::dispatchMouseEvent):
2874         (WebCore::Node::dispatchWheelEvent):
2875         (WebCore::Node::dispatchFocusEvent):
2876         (WebCore::Node::dispatchBlurEvent):
2877         * dom/Node.h:
2878         (WebCore::Node::preDispatchEventHandler):
2879         (WebCore::Node::postDispatchEventHandler):
2880         * dom/Node.idl:
2881         * dom/NodeRareData.h:
2882         (WebCore::NodeRareData::eventTargetData):
2883         (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget
2884         interface, and call dispatchEvent directly instead of custom dispatchXXXEvent
2885         functions that just forwarded to dispatchEvent.
2886
2887         * dom/RegisteredEventListener.cpp:
2888         * dom/RegisteredEventListener.h:
2889         (WebCore::RegisteredEventListener::RegisteredEventListener):
2890         (WebCore::operator==): This is just a simple struct now, since we no longer
2891         do a complicated copy / refCount / isRemoved dance just to honor the rule
2892         that an EventListener can be removed during event dispatch.
2893
2894         * history/CachedFrame.cpp:
2895         (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent.
2896
2897         * html/HTMLBodyElement.cpp:
2898         * html/HTMLBodyElement.h: Use the shared EventTarget API.
2899
2900         * html/HTMLFormControlElement.cpp:
2901         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
2902         (WebCore::HTMLFormControlElement::checkValidity):
2903         * html/HTMLFormElement.cpp:
2904         (WebCore::HTMLFormElement::handleLocalEvents):
2905         (WebCore::HTMLFormElement::prepareSubmit):
2906         (WebCore::HTMLFormElement::reset):
2907         * html/HTMLFormElement.h: Use the standard dispatchEvent API.
2908
2909         * html/HTMLFrameSetElement.cpp:
2910         * html/HTMLFrameSetElement.h: Use the shared EventTarget API.
2911
2912         * html/HTMLImageLoader.cpp:
2913         (WebCore::HTMLImageLoader::dispatchLoadEvent):
2914         * html/HTMLInputElement.cpp:
2915         (WebCore::HTMLInputElement::onSearch):
2916         * html/HTMLMediaElement.cpp:
2917         (WebCore::HTMLMediaElement::loadInternal):
2918         * html/HTMLScriptElement.cpp:
2919         (WebCore::HTMLScriptElement::dispatchLoadEvent):
2920         (WebCore::HTMLScriptElement::dispatchErrorEvent):
2921         * html/HTMLSourceElement.cpp:
2922         (WebCore::HTMLSourceElement::errorEventTimerFired):
2923         * html/HTMLTokenizer.cpp:
2924         (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API.
2925
2926         * inspector/InspectorDOMAgent.cpp:
2927         (WebCore::InspectorDOMAgent::handleEvent):
2928         * inspector/InspectorDOMAgent.h:
2929         * inspector/InspectorDOMStorageResource.cpp:
2930         (WebCore::InspectorDOMStorageResource::handleEvent):
2931         * inspector/InspectorDOMStorageResource.h:
2932         * loader/FrameLoader.cpp:
2933         (WebCore::FrameLoader::stopLoading):
2934         (WebCore::FrameLoader::canCachePageContainingThisFrame):
2935         (WebCore::FrameLoader::logCanCacheFrameDecision):
2936         (WebCore::HashChangeEventTask::performTask):
2937         (WebCore::FrameLoader::pageHidden): No more isWindowEvent.
2938
2939         * loader/ImageDocument.cpp:
2940         (WebCore::ImageEventListener::handleEvent):
2941         * loader/appcache/ApplicationCacheGroup.cpp:
2942         (WebCore::CallCacheListenerTask::performTask):
2943         * loader/appcache/ApplicationCacheHost.cpp:
2944         (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
2945         * loader/appcache/ApplicationCacheHost.h:
2946         * loader/appcache/DOMApplicationCache.cpp:
2947         (WebCore::DOMApplicationCache::eventTargetData):
2948         (WebCore::DOMApplicationCache::ensureEventTargetData):
2949         * loader/appcache/DOMApplicationCache.h:
2950         * loader/appcache/DOMApplicationCache.idl: Switched to the standard
2951         EventTarget API. As a part of this, I switched this class from using a
2952         custom internal event name enumeration to using the standard EventNames.
2953
2954         * notifications/Notification.cpp:
2955         (WebCore::Notification::eventTargetData):
2956         (WebCore::Notification::ensureEventTargetData):
2957         * notifications/Notification.h:
2958         (WebCore::Notification::scriptExecutionContext):
2959         * notifications/Notification.idl: Switched to the standard EventTarget API.
2960
2961         * page/DOMWindow.cpp:
2962         (WebCore::PostMessageTimer::event):
2963         (WebCore::windowsWithUnloadEventListeners):
2964         (WebCore::windowsWithBeforeUnloadEventListeners):
2965         (WebCore::allowsBeforeUnloadListeners):
2966         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
2967         (WebCore::DOMWindow::pendingUnloadEventListeners):
2968         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending"
2969         unload / beforeunload listener tracker just to track which windows had
2970         such listeners, instead of actually keeping a copy of the listeners. Now,
2971         this code can use the standard EventTarget API.
2972
2973         (WebCore::DOMWindow::~DOMWindow):
2974         (WebCore::DOMWindow::postMessageTimerFired):
2975         (WebCore::DOMWindow::addEventListener):
2976         (WebCore::DOMWindow::removeEventListener):
2977         (WebCore::DOMWindow::dispatchLoadEvent):
2978         (WebCore::DOMWindow::dispatchEvent):
2979         (WebCore::DOMWindow::removeAllEventListeners):
2980         (WebCore::DOMWindow::captureEvents):
2981         (WebCore::DOMWindow::releaseEvents):
2982         (WebCore::DOMWindow::eventTargetData):
2983         (WebCore::DOMWindow::ensureEventTargetData):
2984         * page/DOMWindow.h:
2985         * page/DOMWindow.idl: Use the standard EventTarget APIs.
2986
2987         * page/EventHandler.cpp:
2988         (WebCore::EventHandler::canMouseDownStartSelect):
2989         (WebCore::EventHandler::canMouseDragExtendSelect):
2990         (WebCore::EventHandler::sendResizeEvent):
2991         (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly.
2992
2993         * page/EventSource.cpp:
2994         (WebCore::EventSource::endRequest):
2995         (WebCore::EventSource::didReceiveResponse):
2996         (WebCore::EventSource::parseEventStreamLine):
2997         (WebCore::EventSource::stop):
2998         (WebCore::EventSource::createMessageEvent):
2999         (WebCore::EventSource::eventTargetData):
3000         (WebCore::EventSource::ensureEventTargetData):
3001         * page/EventSource.h:
3002         * page/EventSource.idl: Use the standard EventTarget APIs.
3003
3004         * page/FocusController.cpp:
3005         (WebCore::dispatchEventsOnWindowAndFocusedNode):
3006         (WebCore::FocusController::setFocusedFrame):
3007         * page/Frame.cpp:
3008         (WebCore::Frame::shouldClose):
3009         * page/Frame.h:
3010         * page/Page.cpp:
3011         (WebCore::networkStateChanged):
3012         * page/animation/AnimationController.cpp:
3013         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
3014         * rendering/RenderListBox.cpp:
3015         (WebCore::RenderListBox::valueChanged):
3016         * rendering/RenderTextControl.cpp:
3017         (WebCore::RenderTextControl::selectionChanged):
3018         * rendering/RenderTextControlMultiLine.cpp:
3019         (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent.
3020
3021         * svg/SVGElement.cpp:
3022         (WebCore::hasLoadListener): Rewritten for new EventTarget API.
3023
3024         * svg/SVGElementInstance.cpp:
3025         (WebCore::dummyEventTargetData):
3026         (WebCore::SVGElementInstance::addEventListener):
3027         (WebCore::SVGElementInstance::removeEventListener):
3028         (WebCore::SVGElementInstance::removeAllEventListeners):
3029         (WebCore::SVGElementInstance::dispatchEvent):
3030         (WebCore::SVGElementInstance::eventTargetData):
3031         (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API.
3032
3033         * svg/SVGElementInstance.h:
3034         * svg/SVGImageLoader.cpp:
3035         (WebCore::SVGImageLoader::dispatchLoadEvent):
3036         * svg/SVGScriptElement.cpp:
3037         (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly.
3038
3039         * svg/SVGUseElement.cpp:
3040         (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for
3041         new EventTarget API.
3042
3043         * svg/animation/SVGSMILElement.cpp:
3044         (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent.
3045
3046         * websockets/WebSocket.cpp:
3047         (WebCore::ProcessWebSocketEventTask::create):
3048         (WebCore::ProcessWebSocketEventTask::performTask):
3049         (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
3050         (WebCore::WebSocket::didConnect):
3051         (WebCore::WebSocket::didReceiveMessage):
3052         (WebCore::WebSocket::didClose):
3053         (WebCore::WebSocket::eventTargetData):
3054         (WebCore::WebSocket::ensureEventTargetData):
3055         * websockets/WebSocket.h:
3056         * websockets/WebSocket.idl:
3057         * workers/AbstractWorker.cpp:
3058         (WebCore::AbstractWorker::eventTargetData):
3059         (WebCore::AbstractWorker::ensureEventTargetData):
3060         * workers/AbstractWorker.h:
3061         * workers/AbstractWorker.idl:
3062         * workers/DedicatedWorkerContext.cpp:
3063         * workers/DedicatedWorkerContext.h:
3064         * workers/DedicatedWorkerContext.idl:
3065         * workers/DefaultSharedWorkerRepository.cpp:
3066         (WebCore::SharedWorkerConnectTask::performTask):
3067         (WebCore::SharedWorkerScriptLoader::load):
3068         (WebCore::SharedWorkerScriptLoader::notifyFinished):
3069         * workers/SharedWorker.idl:
3070         * workers/SharedWorkerContext.cpp:
3071         (WebCore::createConnectEvent):
3072         * workers/SharedWorkerContext.h:
3073         * workers/SharedWorkerContext.idl:
3074         * workers/Worker.cpp:
3075         (WebCore::Worker::notifyFinished):
3076         * workers/Worker.h:
3077         * workers/Worker.idl:
3078         * workers/WorkerContext.cpp:
3079         (WebCore::WorkerContext::eventTargetData):
3080         (WebCore::WorkerContext::ensureEventTargetData):
3081         * workers/WorkerContext.h:
3082         * workers/WorkerContext.idl:
3083         * workers/WorkerMessagingProxy.cpp:
3084         (WebCore::MessageWorkerContextTask::performTask):
3085         (WebCore::MessageWorkerTask::performTask):
3086         (WebCore::WorkerExceptionTask::performTask):
3087         * xml/XMLHttpRequest.cpp:
3088         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
3089         (WebCore::XMLHttpRequest::createRequest):
3090         (WebCore::XMLHttpRequest::abort):
3091         (WebCore::XMLHttpRequest::networkError):
3092         (WebCore::XMLHttpRequest::abortError):
3093         (WebCore::XMLHttpRequest::didSendData):
3094         (WebCore::XMLHttpRequest::didReceiveData):
3095         (WebCore::XMLHttpRequest::eventTargetData):
3096         (WebCore::XMLHttpRequest::ensureEventTargetData):
3097         * xml/XMLHttpRequest.h:
3098         * xml/XMLHttpRequest.idl:
3099         * xml/XMLHttpRequestProgressEvent.h:
3100         (WebCore::XMLHttpRequestProgressEvent::create):
3101         * xml/XMLHttpRequestUpload.cpp:
3102         (WebCore::XMLHttpRequestUpload::eventTargetData):
3103         (WebCore::XMLHttpRequestUpload::ensureEventTargetData):
3104         * xml/XMLHttpRequestUpload.h:
3105         * xml/XMLHttpRequestUpload.idl: Use new EventTarget API.
3106
3107 2009-09-23  Kent Tamura  <tkent@chromium.org>
3108
3109         Reviewed by Darin Adler.
3110
3111         - Support for maxLength of <textarea>
3112         - Move numGraphemeClusters() and numCharactersInGraphemeClusters() from InputElement to String.
3113         https://bugs.webkit.org/show_bug.cgi?id=29292
3114
3115         Test: fast/forms/textarea-maxlength.html
3116
3117         * dom/InputElement.cpp:
3118         (WebCore::InputElement::sanitizeUserInputValue):
3119         (WebCore::InputElement::handleBeforeTextInsertedEvent):
3120         * html/HTMLTextAreaElement.cpp:
3121         (WebCore::HTMLTextAreaElement::defaultEventHandler):
3122         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
3123         (WebCore::HTMLTextAreaElement::sanitizeUserInputValue):
3124         (WebCore::HTMLTextAreaElement::maxLength):
3125         (WebCore::HTMLTextAreaElement::setMaxLength):
3126         * html/HTMLTextAreaElement.h:
3127         * html/HTMLTextAreaElement.idl:
3128         * platform/text/PlatformString.h:
3129         * platform/text/String.cpp:
3130         (WebCore::String::numGraphemeClusters):
3131         (WebCore::String::numCharactersInGraphemeClusters):
3132
3133 2009-09-23  Martin Robinson  <martin.james.robinson@gmail.com>
3134
3135         Reviewed by Xan Lopez.
3136
3137         [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
3138         https://bugs.webkit.org/show_bug.cgi?id=29654
3139
3140         Give GDK_Backspace key events the proper text properties.
3141
3142         Instead of adding new tests, this change removes existing tests
3143         from Gtk's skipped list.
3144
3145         * platform/gtk/KeyEventGtk.cpp:
3146         (WebCore::keyIdentifierForGdkKeyCode):
3147         (WebCore::singleCharacterString):
3148
3149 2009-09-23  Sam Weinig  <sam@webkit.org>
3150
3151         Reviewed by Adam Barth.
3152
3153         Fix for https://bugs.webkit.org/show_bug.cgi?id=26989
3154         Should allow navigation of top-level openers
3155         <rdar://problem/7034025>
3156
3157         Allow navigation of cross-origin window.opener if it is top-level frame.
3158
3159         Test: http/tests/security/frameNavigation/cross-origin-opener.html
3160
3161         * loader/FrameLoader.cpp:
3162         (WebCore::FrameLoader::shouldAllowNavigation):
3163
3164 2009-09-23  Marshall Culpepper  <mculpepper@appcelerator.com>
3165
3166         Reviewed by Eric Seidel.
3167
3168         Added $(WebKitLibrariesDir)/include/cairo so cairo.h is found by
3169         default when the necessary dependencies are extracted into the
3170         WebKitLibrariesDir.
3171         https://bugs.webkit.org/show_bug.cgi?id=29661
3172
3173         * WebCore.vcproj/WebCoreCairo.vsprops:
3174
3175 2009-09-23  Darin Adler  <darin@apple.com>
3176
3177         Reviewed by Sam Weinig.
3178
3179         Crash when website does a history.back() followed by an alert()
3180         https://bugs.webkit.org/show_bug.cgi?id=29686
3181         rdar://problem/6984996
3182
3183         When loading is deferred, we need to defer timer-based loads
3184         too, not just networking-driven loads. Otherwise we can get
3185         syncronouse navigation while running a script, which leads to
3186         crashes and other badness.
3187
3188         This patch includes a manual test; an automated test may be
3189         possible some time in the future.
3190
3191         * dom/Document.cpp:
3192         (WebCore::Document::processHttpEquiv): Use scheduleLocationChange
3193         instead of scheduleHTTPRedirection to implement the navigation
3194         needed for x-frame-options.
3195
3196         * loader/FrameLoader.cpp:
3197         (WebCore::FrameLoader::FrameLoader): Updated for data members with
3198         new names and new data members.
3199         (WebCore::FrameLoader::setDefersLoading): When turning deferral
3200         off, call startRedirectionTimer and startCheckCompleteTimer, since
3201         either of them might have been fired and ignored while defersLoading
3202         was true.
3203         (WebCore::FrameLoader::clear): Updated for replacement of the
3204         m_checkCompletedTimer and m_checkLoadCompleteTimer timers.
3205         (WebCore::FrameLoader::allAncestorsAreComplete): Added.
3206         (WebCore::FrameLoader::checkCompleted): Added code to set
3207         m_shouldCallCheckCompleted to false. Changed code that calls
3208         startRedirectionTimer to call it unconditionally, since that
3209         function now knows when to do work and doesn't expect callers
3210         to handle that any more.
3211         (WebCore::FrameLoader::checkTimerFired): Added. Replaces the old
3212         timer fired callbacks. Calls checkCompleted and checkLoadComplete
3213         as appropriate, but not when defersLoading is true.
3214         (WebCore::FrameLoader::startCheckCompleteTimer): Added. Replaces
3215         the two different calls to start timers before. Only starts the
3216         timers if they are needed.
3217         (WebCore::FrameLoader::scheduleCheckCompleted): Changed to call
3218         startCheckCompleteTimer after setting boolean.
3219         (WebCore::FrameLoader::scheduleCheckLoadComplete): Ditto.
3220         (WebCore::FrameLoader::scheduleHistoryNavigation): Removed
3221         canGoBackOrForward check. The logic works more naturally when
3222         we don't do anything until the timer fires.
3223         (WebCore::FrameLoader::redirectionTimerFired): Do nothing if
3224         defersLoading is true. Also moved canGoBackOrForward check here.
3225         (WebCore::FrameLoader::scheduleRedirection): Changed code that
3226         calls startRedirectionTimer to do so unconditionally. That
3227         function now handles the rules about when to start the timer
3228         rather than expecting the caller to do so.
3229         (WebCore::FrameLoader::startRedirectionTimer): Added code to
3230         handle the case where there is no redirection scheduled,
3231         where the timer is already active, or where this is a classic
3232         redirection and there is an ancestor that has not yet completed
3233         loading.
3234         (WebCore::FrameLoader::completed): Call startRedirectionTimer
3235         here directly instead of calling a cover named parentCompleted.
3236         Hooray! One less function in the giant FrameLoader class!
3237         (WebCore::FrameLoader::checkLoadComplete): Added code to set
3238         m_shouldCallCheckLoadComplete to false.
3239
3240         * loader/FrameLoader.h: Replaced the two functions
3241         checkCompletedTimerFired and checkLoadCompleteTimerFired with
3242         one function, checkTimerFired. Removed the parentCompleted
3243         function. Added the startCheckCompleteTimer and
3244         allAncestorsAreComplete functions. Replaced the
3245         m_checkCompletedTimer and m_checkLoadCompleteTimer data
3246         members with m_checkTimer, m_shouldCallCheckCompleted, and
3247         m_shouldCallCheckLoadComplete.
3248
3249         * manual-tests/go-back-after-alert.html: Added.
3250         * manual-tests/resources/alert-and-go-back.html: Added.
3251
3252 2009-09-23  David Kilzer  <ddkilzer@apple.com>
3253
3254         <http://webkit.org/b/29660> Move "Generate 64-bit Export File" build phase script into DerivedSources.make
3255
3256         Reviewed by Mark Rowe.
3257
3258         The "Generate 64-bit Export File" build phase script generated
3259         the WebCore.LP64.exp export file used to link 64-bit WebCore.
3260         Instead of having a separate build phase script, move its
3261         generation into DerivedSources.make where WebCore.exp is
3262         generated.
3263
3264         * DerivedSources.make: Added a rule to make WebCore.LP64.exp.
3265         Added code to append WebCore.PluginHostProcess.exp to
3266         $(WEBCORE_EXPORT_DEPENDENCIES) when WTF_USE_PLUGIN_HOST_PROCESS
3267         is set to 1.
3268         * WebCore.PluginHostProcess.exp: Renamed from WebCore/WebCore.LP64.exp.
3269         * WebCore.xcodeproj/project.pbxproj: Removed the "Generate
3270         64-bit Export File" build phase script. Renamed WebCore.LP64.exp
3271         to WebCore.PluginHostProcess.exp.
3272
3273 2009-09-23  Peter Kasting  <pkasting@google.com>
3274
3275         Reviewed by Dimitri Glazkov.
3276
3277         https://bugs.webkit.org/show_bug.cgi?id=29694
3278         [Chromium] Eliminate dependency on gfx::Rect from ImageSkia.
3279
3280         * platform/graphics/skia/ImageSkia.cpp:
3281         (WebCore::drawResampledBitmap):
3282
3283 2009-09-22  Timothy Hatcher  <timothy@apple.com>
3284
3285         Prevent scrolling multiple elements during latched wheel events.
3286
3287         Reviewed by Anders Carlsson.
3288
3289         * page/EventHandler.cpp:
3290         (WebCore::scrollAndAcceptEvent):
3291         (WebCore::EventHandler::clear):
3292         (WebCore::EventHandler::handleWheelEvent):
3293         * page/EventHandler.h:
3294         * rendering/RenderBox.cpp:
3295         (WebCore::RenderBox::scroll):
3296         * rendering/RenderBox.h:
3297
3298 2009-09-23  Daniel Bates  <dbates@webkit.org>
3299
3300         Reviewed by Adam Barth.
3301
3302         https://bugs.webkit.org/show_bug.cgi?id=29523
3303         
3304         Fixes an issue where a JavaScript URL that was URL-encoded twice can bypass the
3305         XSSAuditor.
3306         
3307         The method FrameLoader::executeIfJavaScriptURL decodes the URL escape 
3308         sequences in a JavaScript URL before it is eventually passed to the XSSAuditor.
3309         Because the XSSAuditor also decodes the URL escape sequences as part of its
3310         canonicalization, the double decoding of a JavaScript URL would
3311         not match the canonicalization of the input parameters.
3312
3313         Tests: http/tests/security/xssAuditor/iframe-javascript-url-url-encoded.html
3314                http/tests/security/xssAuditor/javascript-link-url-encoded.html
3315
3316         * bindings/js/ScriptController.cpp:
3317         (WebCore::ScriptController::evaluate): Moved call to 
3318         XSSAuditor::canEvaluateJavaScriptURL into FrameLoader::executeIfJavaScriptURL.
3319         * bindings/v8/ScriptController.cpp:
3320         (WebCore::ScriptController::evaluate): Ditto.
3321         * loader/FrameLoader.cpp:
3322         (WebCore::FrameLoader::executeIfJavaScriptURL): Modified to call 
3323         XSSAuditor::canEvaluateJavaScriptURL on the JavaScript URL before it is
3324         decoded.
3325
3326 2009-09-22  Dave Hyatt  <hyatt@apple.com>
3327
3328         Reviewed by John Sullivan.
3329
3330         https://bugs.webkit.org/show_bug.cgi?id=29657
3331         Columns don't break properly in positioned elements with a fixed height.  Make sure that
3332         a block is still considered to have columns even when the column count is 1 if the column
3333         width is non-auto.
3334     
3335         Added fast/multicol/positioned-with-constrained-height.html
3336
3337         * rendering/RenderBlock.cpp:
3338         (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
3339
3340 2009-09-23  Holger Hans Peter Freyther  <zecke@selfish.org>
3341
3342         Rubber-stamped by Simon Hausmann.
3343
3344         Add a null check for the Document*. In the mirror benchmarking
3345         application a crash from a call from JavaScript was observed.
3346
3347         I was not able to come up with a test case for this issue.
3348
3349         * platform/qt/CookieJarQt.cpp:
3350         (WebCore::cookieJar):
3351
3352 2009-09-23  Simon Hausmann  <simon.hausmann@nokia.com>
3353
3354         Reviewed by Tor Arne Vestbø.
3355
3356         Fix the Qt/Windows build, after the introduction of
3357         the page client.
3358
3359         * plugins/win/PluginViewWin.cpp:
3360         (windowHandleForPageClient):
3361         (WebCore::PluginView::getValue):
3362         (WebCore::PluginView::forceRedraw):
3363         (WebCore::PluginView::platformStart):
3364
3365 2009-09-23  Gustavo Noronha Silva  <gns@gnome.org>
3366
3367         Reviewed by Xan Lopez.
3368
3369         [GTK] media tests failing after their rework
3370         https://bugs.webkit.org/show_bug.cgi?id=29532
3371
3372         Correctly advertise the mime types used by the common formats used
3373         in the tests.
3374
3375         Tests that regressed, and will pass again:
3376
3377            media/video-canvas-source.html
3378            media/video-controls.html
3379            media/video-currentTime-set2.html
3380            media/video-dom-autoplay.html
3381            media/video-dom-src.html
3382            media/video-error-abort.html
3383            media/video-load-networkState.html
3384            media/video-load-readyState.html
3385            media/video-muted.html
3386            media/video-no-autoplay.html
3387            media/video-pause-empty-events.html
3388            media/video-play-empty-events.html
3389            media/video-seekable.html
3390            media/video-seeking.html
3391            media/video-size.html
3392            media/video-source-type-params.html
3393            media/video-source-type.html
3394            media/video-source.html
3395            media/video-src-change.html
3396            media/video-src-invalid-remove.html
3397            media/video-src-remove.html
3398            media/video-src-set.html
3399            media/video-src-source.html
3400            media/video-src.html
3401            media/video-timeupdate-during-playback.html
3402            media/video-volume.html
3403
3404         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3405         (WebCore::mimeTypeCache):
3406
3407 2009-09-22  Charles Wei  <charles.wei@torchmobile.com.cn>
3408
3409         Reviewed by Eric Seidel.
3410
3411         Fix the crash problem with absolte positioned children in foreignobject
3412         htts://bugs.webkit.org/show_bug.cgi?id=26342
3413
3414         Test: svg/custom/foreignobject-crash-with-absolute-positioned-children.svg
3415
3416         * rendering/RenderForeignObject.h:
3417         (WebCore::RenderForeignObject::isSVGForeignObject):
3418         * rendering/RenderObject.cpp:
3419         (WebCore::RenderObject::containingBlock):
3420         * rendering/RenderObject.h:
3421         (WebCore::RenderObject::isSVGForeignObject):
3422
3423 2009-09-22  Drew Wilson  <atwilson@google.com>
3424
3425         Reviewed by David Levin.
3426
3427         SharedWorkers "name" attribute is now optional.
3428         https://bugs.webkit.org/show_bug.cgi?id=28897
3429
3430         Test: fast/workers/shared-worker-name.html
3431
3432         * bindings/js/JSSharedWorkerConstructor.cpp:
3433         (WebCore::constructSharedWorker):
3434         Default 'name' attribute to empty string if it is not provided.
3435         * bindings/v8/custom/V8SharedWorkerCustom.cpp:
3436         (WebCore::CALLBACK_FUNC_DECL):
3437         Default 'name' attribute to empty string if it is not provided.
3438         * workers/DefaultSharedWorkerRepository.cpp:
3439         (WebCore::SharedWorkerProxy::matches):
3440         Now matches URLs if names are empty strings.
3441         (WebCore::DefaultSharedWorkerRepository::getProxy):
3442         Pass URL in to SharedWorkerProxy::matches().
3443
3444 2009-09-22  Dimitri Glazkov  <dglazkov@chromium.org>
3445
3446         Unreviewed, another build fix.
3447
3448         [Chromium] Add another missing include.
3449         https://bugs.webkit.org/show_bug.cgi?id=29536
3450
3451         * inspector/InspectorController.cpp: Added DOMWindow.h include.
3452
3453 2009-09-22  Dimitri Glazkov  <dglazkov@chromium.org>
3454
3455         Unreviewed, build fix.
3456
3457         [Chromium] Add missing include.
3458         https://bugs.webkit.org/show_bug.cgi?id=29536
3459
3460         * inspector/InspectorDOMStorageResource.cpp: Added DOMWindow.h include.
3461
3462 2009-09-22  Darin Adler  <darin@apple.com>
3463
3464         Reviewed by Sam Weinig.
3465
3466         Tighten up the ScheduledRedirection machinery to prepare for a bug fix
3467         https://bugs.webkit.org/show_bug.cgi?id=29663
3468
3469         * loader/FrameLoader.cpp:
3470         (WebCore::ScheduledRedirection::ScheduledRedirection): Added a boolean,
3471         initialized to false, to keep track if the redirection has been
3472         communicated to the client.
3473         (WebCore::FrameLoader::stopLoading): Tweaked a comment.
3474         (WebCore::FrameLoader::cancelRedirection): Removed code to clear
3475         m_scheduledRedirection.clear since stopRedirectionTimer does that now.
3476         (WebCore::FrameLoader::allChildrenAreComplete): Added.
3477         (WebCore::FrameLoader::checkCompleted): Use allChildrenAreComplete
3478         function for clarity.
3479         (WebCore::FrameLoader::checkCallImplicitClose): Ditto.
3480         (WebCore::FrameLoader::scheduleRedirection): Changed to take a PassOwnPtr.
3481         (WebCore::FrameLoader::startRedirectionTimer): Added code to set the
3482         toldClient flag and not call clientRedirected a second time if it is set.
3483         (WebCore::FrameLoader::stopRedirectionTimer): Changed so this can be safely
3484         called multiple times and it will call clientRedirectCancelledOrFinished
3485         only once.
3486
3487         * loader/FrameLoader.h: Changed scheduleRedirection to be a PassOwnPtr.
3488         Added allChildrenAreComplete function.
3489
3490 2009-09-22  Yury Semikhatsky  <yurys@chromium.org>
3491
3492         Reviewed by Timothy Hatcher.
3493
3494         WebInspector: Migrate Databases tab to InjectedScript /
3495         serialized interaction.
3496
3497         DOMStorage interaction is now serialized into JSON messages
3498         and doesn't require quarantined objects.
3499         
3500         https://bugs.webkit.org/show_bug.cgi?id=28873
3501
3502         * dom/EventListener.h:
3503         (WebCore::EventListener::):
3504         * inspector/InspectorBackend.cpp:
3505         (WebCore::InspectorBackend::selectDOMStorage):
3506         (WebCore::InspectorBackend::getDOMStorageEntries):
3507         (WebCore::InspectorBackend::setDOMStorageItem):
3508         (WebCore::InspectorBackend::removeDOMStorageItem):
3509         * inspector/InspectorBackend.h:
3510         * inspector/InspectorBackend.idl:
3511         * inspector/InspectorController.cpp:
3512         (WebCore::InspectorController::didCommitLoad):
3513         (WebCore::InspectorController::selectDOMStorage):
3514         (WebCore::InspectorController::getDOMStorageEntries):
3515         (WebCore::InspectorController::setDOMStorageItem):
3516         (WebCore::InspectorController::removeDOMStorageItem):
3517         (WebCore::InspectorController::getDOMStorageResourceForId):
3518         * inspector/InspectorController.h:
3519         * inspector/InspectorDOMStorageResource.cpp:
3520         (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
3521         (WebCore::InspectorDOMStorageResource::bind):
3522         (WebCore::InspectorDOMStorageResource::unbind):
3523         (WebCore::InspectorDOMStorageResource::startReportingChangesToFrontend):
3524         (WebCore::InspectorDOMStorageResource::handleEvent):
3525         (WebCore::InspectorDOMStorageResource::operator==):
3526         * inspector/InspectorDOMStorageResource.h:
3527         (WebCore::InspectorDOMStorageResource::cast):
3528         (WebCore::InspectorDOMStorageResource::id):
3529         (WebCore::InspectorDOMStorageResource::domStorage):
3530         * inspector/InspectorFrontend.cpp:
3531         (WebCore::InspectorFrontend::selectDOMStorage):
3532         (WebCore::InspectorFrontend::didGetDOMStorageEntries):
3533         (WebCore::InspectorFrontend::didSetDOMStorageItem):
3534         (WebCore::InspectorFrontend::didRemoveDOMStorageItem):
3535         (WebCore::InspectorFrontend::updateDOMStorage):
3536         * inspector/InspectorFrontend.h:
3537         * inspector/front-end/DOMStorage.js:
3538         (WebInspector.DOMStorage):
3539         (WebInspector.DOMStorage.prototype.get id):
3540         (WebInspector.DOMStorage.prototype.get domStorage):
3541         (WebInspector.DOMStorage.prototype.get isLocalStorage):
3542         (WebInspector.DOMStorage.prototype.getEntriesAsync):
3543         (WebInspector.DOMStorage.prototype.setItemAsync):
3544         (WebInspector.DOMStorage.prototype.removeItemAsync):
3545         * inspector/front-end/DOMStorageDataGrid.js:
3546         (WebInspector.DOMStorageDataGrid):
3547         (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode):
3548         (WebInspector.DOMStorageDataGrid.prototype._startEditing):
3549         (WebInspector.DOMStorageDataGrid.prototype._editingCommitted):
3550         (WebInspector.DOMStorageDataGrid.prototype._editingCancelled):
3551         (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow):
3552         * inspector/front-end/DOMStorageItemsView.js:
3553         (WebInspector.DOMStorageItemsView.prototype.update):
3554         (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
3555         (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries):
3556         * inspector/front-end/StoragePanel.js:
3557         (WebInspector.StoragePanel.prototype.show):
3558         (WebInspector.StoragePanel.prototype.reset):
3559         (WebInspector.StoragePanel.prototype.selectDOMStorage):
3560         (WebInspector.StoragePanel.prototype.updateDOMStorage):
3561         (WebInspector.StoragePanel.prototype._domStorageForId):
3562         * inspector/front-end/inspector.js:
3563         (WebInspector.addDOMStorage):
3564         (WebInspector.updateDOMStorage):
3565
3566 2009-09-22  Sam Weinig  <sam@webkit.org>
3567
3568         Reviewed by Alexey Proskuryakov.
3569
3570         Fix for XMLHttpRequest.abort() should destroy the response text.
3571         https://bugs.webkit.org/show_bug.cgi?id=29658
3572         <rdar://problem/5301430>
3573
3574         Clearing the response text after calling XMLHttpRequest.abort() is necessary
3575         per spec and matches Firefox. It is also a potential memory win.
3576
3577         Test: http/tests/xmlhttprequest/abort-should-destroy-responseText.html
3578
3579         * xml/XMLHttpRequest.cpp:
3580         (WebCore::XMLHttpRequest::abort): Clear the response text making sure to
3581         keep the actual ResourceReponse around so that the response status and response
3582         status text are kept around.
3583
3584 2009-09-22  Dimitri Glazkov  <dglazkov@chromium.org>
3585
3586         No review, rolling out r48639.
3587         http://trac.webkit.org/changeset/48639
3588
3589         * bindings/v8/V8GCController.cpp:
3590         (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
3591
3592 2009-09-22  Dumitru Daniliuc  <dumi@chromium.org>
3593
3594         Reviewed by Dimitri Glazkov.
3595
3596         Changing the transaction coordinator to (re-)allow multiple read
3597         transactions on the same database to run concurrently (without
3598         risking a deadlock this time).
3599
3600         https://bugs.webkit.org/show_bug.cgi?id=29115
3601
3602         Tests: storage/read-and-write-transactions-dont-run-together.html
3603                storage/read-transactions-running-concurrently.html
3604
3605         * storage/SQLTransaction.h:
3606         (WebCore::SQLTransaction::isReadOnly): Returns the type of the
3607         transaction.
3608         * storage/SQLTransactionCoordinator.cpp:
3609         (WebCore::SQLTransactionCoordinator::acquireLock): Changed to
3610         allow multiple read transactions on the same DB to run
3611         concurrently.
3612         (WebCore::SQLTransactionCoordinator::releaseLock): Changed to
3613         allow multiple read transactions on the same DB to run
3614         concurrently.
3615         (WebCore::SQLTransactionCoordinator::shutdown): Renamed the map.
3616         * storage/SQLTransactionCoordinator.h:
3617
3618 2009-09-22  Peter Kasting  <pkasting@google.com>
3619
3620         Reviewed by David Levin.
3621
3622         https://bugs.webkit.org/show_bug.cgi?id=29652
3623         Support true system colors for CSS system colors in Chromium/Win.
3624
3625         * rendering/RenderThemeChromiumWin.cpp:
3626         (WebCore::cssValueIdToSysColorIndex):
3627         (WebCore::RenderThemeChromiumWin::systemColor):
3628         * rendering/RenderThemeChromiumWin.h:
3629
3630 2009-09-22  Beth Dakin  <bdakin@apple.com>
3631
3632         Reviewed by Dave Hyatt.
3633
3634         Fix for <rdar://problem/6925121> SAP: Wrong width calculation in 
3635         table with fixed layout
3636         -and corresponding-
3637         https://bugs.webkit.org/show_bug.cgi?id=29501
3638
3639         New Tests:
3640         * fast/table/fixed-table-with-percent-inside-percent-table.html: Added.
3641         * fast/table/fixed-table-with-percent-width-inside-auto-table.html: Added.
3642         * fast/table/fixed-table-with-percent-width-inside-div.html: Added.
3643         * fast/table/fixed-table-with-percent-width-inside-extra-large-div.html: Added.
3644         * fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html: Added.
3645         * fast/table/fixed-table-with-small-percent-width.html: Added.
3646
3647         This new quirk is very similar to an existing one that was 
3648         implemented in revision 4316.
3649         * rendering/FixedTableLayout.cpp:
3650         (WebCore::FixedTableLayout::calcPrefWidths):
3651
3652 2009-09-22  Brian Weinstein  <bweinstein@apple.com>
3653
3654         Reviewed by Timothy Hatcher.
3655
3656         List HTTP status code with response headers in resources tab of Web Inspector.
3657         http://webkit.org/b/19945
3658
3659         This patch adds a new top level list in the resources tab, HTTP Information, that 
3660         for now, contains the Request Method (GET, POST, etc.) and the Status Code (200, 404, etc.).
3661         Additionally, it adds a colored dot next to the requested URL to show the status 
3662         (green for success, orange for redirect, red for error).
3663
3664         * English.lproj/localizedStrings.js:
3665         * inspector/front-end/ImageView.js:
3666         (WebInspector.ImageView):
3667         * inspector/front-end/Images/errorRedDot.png: Added.
3668         * inspector/front-end/Images/successGreenDot.png: Added.
3669         * inspector/front-end/Images/warningOrangeDot.png: Added.
3670         * inspector/front-end/Resource.js:
3671         (WebInspector.Resource.StatusTextForCode):
3672         * inspector/front-end/ResourceView.js:
3673         (WebInspector.ResourceView):
3674         (WebInspector.ResourceView.prototype._refreshURL):
3675         (WebInspector.ResourceView.prototype._refreshHTTPInformation):
3676         * inspector/front-end/inspector.css:
3677
3678 2009-09-22  Brady Eidson  <beidson@apple.com>
3679
3680         Reviewed by Darin Adler.
3681
3682         Back list isn't properly updated for fragment changes after a redirect.
3683         <rdar://problem/6142803> and https://bugs.webkit.org/show_bug.cgi?id=20355
3684
3685         Test: fast/loader/fragment-after-redirect-gets-back-entry.html
3686
3687         * loader/FrameLoader.cpp:
3688         (WebCore::FrameLoader::loadURL): Properly reset the policy FrameLoadType before
3689           consulting the policy delegate for fragment scrolling.
3690
3691 2009-09-22  Darin Fisher  <darin@chromium.org>
3692
3693         Reviewed by Dimitri Glazkov.
3694
3695         Drop down selects get stuck in the non-visible state and cannot be opened.
3696         https://bugs.webkit.org/show_bug.cgi?id=29645
3697
3698         All paths that lead to hiding the popup menu must call popupDidHide on
3699         the PopupMenuClient.  This change makes it so by moving all of the
3700         hiding logic to PopupListBox::hidePopup.
3701
3702         * platform/chromium/PopupMenuChromium.cpp:
3703         (WebCore::PopupContainer::hidePopup):
3704         (WebCore::PopupListBox::hidePopup):
3705         * platform/chromium/PopupMenuChromium.h:
3706
3707 2009-09-22  Patrick Mueller  <Patrick_Mueller@us.ibm.com>
3708
3709         Reviewed by Timothy Hatcher.
3710
3711         WebInspector.log() function not protected if console not yet created
3712         https://bugs.webkit.org/show_bug.cgi?id=29336
3713         
3714         No new tests.  Only affects Web Inspector developers adding logging
3715         to their code during development.
3716
3717         * inspector/front-end/inspector.js:
3718         (WebInspector.log.isLogAvailable):
3719         (WebInspector.log.flushQueue):
3720         (WebInspector.log.flushQueueIfAvailable):
3721         (WebInspector.log.logMessage):
3722         (WebInspector.log):
3723
3724 2009-09-22  Yaar Schnitman  <yaar@chromium.org>
3725
3726         Reviewed by David Levin.
3727
3728         Ported chromium.org's webcore.gyp for the webkit chromium port.
3729
3730         https://bugs.webkit.org/show_bug.cgi?id=29617
3731
3732         * WebCore.gyp/WebCore.gyp: Added.
3733
3734 2009-09-22  Christian Plesner Hansen  <christian.plesner.hansen@gmail.com>
3735
3736         Reviewed by Adam Barth.
3737
3738         [v8] Don't keep clean wrappers artificially alive        
3739         We currently keep all DOM node wrappers alive, even when there are
3740         no more references to them from JS, in case they have properties
3741         that we need to keep around if new JS references are created.
3742         This changes the policy to only keep wrappers artificially alive
3743         if they have changed since they were created. Empty wrappers are
3744         discarded and recreated as needed.
3745         https://bugs.webkit.org/show_bug.cgi?id=29330
3746
3747         * bindings/v8/V8GCController.cpp:
3748         (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
3749
3750 2009-09-22  Pavel Feldman  <pfeldman@chromium.org>
3751
3752         Reviewed by Timothy Hatcher.
3753
3754         Web Inspector: console.count and console.timeEnd
3755         crash when inspector is opened.
3756
3757         https://bugs.webkit.org/show_bug.cgi?id=29632
3758
3759         * inspector/InspectorFrontend.cpp:
3760         (WebCore::InspectorFrontend::addMessageToConsole):
3761
3762 2009-09-22  Adam Barth  <abarth@webkit.org>
3763
3764         Unreviewed.
3765
3766         Fix bogus build fix I did last night.
3767
3768         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3769         (WebCore::V8Custom::WindowSetTimeoutImpl):
3770
3771 2009-09-22  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3772
3773         Reviewed by Simon Hausmann.
3774
3775         NPAPI/Mac: Don't paint plugins if we don't have a CGContextRef
3776
3777         * plugins/mac/PluginViewMac.cpp:
3778
3779 2009-09-22  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3780
3781         Reivewed by Simon Hausmann.
3782
3783         Fix the Qt/Mac build after r48604 (Implement new QWebPageClient class)
3784
3785         There's no QWidget::x11Info() on Mac, and setPlatformPluginWidget()
3786         takes a QWidget*, not a QWebPageClient*
3787
3788         * plugins/mac/PluginViewMac.cpp:
3789         (WebCore::PluginView::platformStart):
3790
3791 2009-09-21  Adam Barth  <abarth@webkit.org>
3792
3793         Attempted fix for the V8 build.
3794
3795         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3796         (WebCore::V8Custom::WindowSetTimeoutImpl):
3797
3798 2009-09-21  Adam Barth  <abarth@webkit.org>
3799
3800         Reviewed by Sam Weinig.
3801
3802         Don't re-enter JavaScript after performing access checks
3803         https://bugs.webkit.org/show_bug.cgi?id=29531
3804
3805         Moved the access check slightly later in this functions to avoid
3806         re-entering the JavaScript interpreter (typically via toString)
3807         after performing the access check.
3808
3809         I can't really think of a meaningful test for this change.  It's more
3810         security hygiene.
3811
3812         * bindings/js/JSDOMWindowCustom.cpp:
3813         (WebCore::JSDOMWindow::setLocation):
3814         (WebCore::JSDOMWindow::open):
3815         (WebCore::JSDOMWindow::showModalDialog):
3816         * bindings/js/JSLocationCustom.cpp:
3817         (WebCore::JSLocation::setHref):
3818         (WebCore::JSLocation::replace):
3819         (WebCore::JSLocation::assign):
3820         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3821         (WebCore::V8Custom::WindowSetTimeoutImpl):
3822         (WebCore::if):
3823         (CALLBACK_FUNC_DECL):
3824         (V8Custom::WindowSetLocation):
3825         (V8Custom::ClearTimeoutImpl):
3826         * bindings/v8/custom/V8LocationCustom.cpp:
3827         (WebCore::ACCESSOR_SETTER):
3828         (WebCore::CALLBACK_FUNC_DECL):
3829
3830 2009-09-21  Dumitru Daniliuc  <dumi@chromium.org>
3831
3832         Reviewed by Eric Seidel.
3833
3834         Make all write transaction start with a BEGIN IMMEDIATE command
3835         instead of BEGIN.
3836
3837         We cannot test this change in a layout test, because in order to
3838         test it we need to spawn two database threads and execute
3839         transaction steps on these two threads in a very specific order,
3840         which seems impossible to do when they share the same main thread
3841         (as they would in a layout test). The SQLite docs and the case
3842         described in the bug though should be enough proof that we do have
3843         a problem here and that this patch will fix it.
3844
3845         Relevant SQLite documentation:
3846         http://www.sqlite.org/lang_transaction.html
3847         http://www.sqlite.org/lockingv3.html#locking
3848
3849         https://bugs.webkit.org/show_bug.cgi?id=29218
3850
3851         * platform/sql/SQLiteTransaction.cpp:
3852         (WebCore::SQLiteTransaction::SQLiteTransaction): Added a readOnly
3853         parameter.
3854         (WebCore::SQLiteTransaction::begin): Changed to BEGIN IMMEDIATE
3855         for write transactions.
3856         * platform/sql/SQLiteTransaction.h:
3857         * storage/SQLTransaction.cpp:
3858         (WebCore::SQLTransaction::openTransactionAndPreflight): Passing
3859         the read-only flag to the SQLiteTransaction instance.
3860
3861 2009-09-21  Brady Eidson  <beidson@apple.com>
3862
3863         Rubberstamped by Mark Rowe.
3864
3865         * DerivedSources.make: Fix the Xcode build on SnowLeopard.
3866
3867 2009-09-15  John Abd-El-Malek  <jam@chromium.org>
3868
3869         Reviewed by Darin Fisher.
3870
3871         Prevent sleeps in unload handlers.
3872         https://bugs.webkit.org/show_bug.cgi?id=29193
3873
3874         Test: fast/dom/Window/slow_unload_handler.html
3875
3876         * WebCore.gypi:
3877         * bindings/v8/DateExtension.cpp: Added.
3878         (WebCore::DateExtension::DateExtension):
3879         (WebCore::DateExtension::get):
3880         (WebCore::DateExtension::setAllowSleep):
3881         (WebCore::DateExtension::GetNativeFunction):
3882         (WebCore::DateExtension::weakCallback):
3883         (WebCore::DateExtension::GiveEnableSleepDetectionFunction):
3884         (WebCore::DateExtension::OnSleepDetected):
3885         * bindings/v8/DateExtension.h: Added.
3886         * bindings/v8/V8AbstractEventListener.cpp:
3887         (WebCore::V8AbstractEventListener::invokeEventHandler):
3888         * bindings/v8/V8Proxy.cpp:
3889         (WebCore::V8Proxy::createNewContext):
3890         (WebCore::V8Proxy::registerExtensionWithV8):
3891         (WebCore::V8Proxy::registeredExtensionWithV8):
3892         * bindings/v8/V8Proxy.h:
3893
3894 2009-09-21  Jian Li  <jianli@chromium.org>
3895
3896         Reviewed by David Levin.
3897
3898         [V8] Run-time exception in onmessage handler is not forwarded to the
3899         worker object.
3900         https://bugs.webkit.org/show_bug.cgi?id=28980
3901
3902         The previous fix was partially reverted due to a reliability build break
3903         in chromium. The break happens when an exception is thrown without
3904         setting a message. We need to check for this scenario and handle it.
3905
3906         Tested by worker-close.html.
3907
3908         * bindings/v8/V8AbstractEventListener.cpp:
3909         (WebCore::V8AbstractEventListener::invokeEventHandler):
3910         * bindings/v8/V8Utilities.cpp:
3911         (WebCore::reportException):
3912
3913 2009-09-21  Greg Bolsinga  <bolsinga@apple.com>
3914
3915         Reviewed by Simon Fraser & Sam Weinig.
3916
3917         Add ENABLE(ORIENTATION_EVENTS)
3918         https://bugs.webkit.org/show_bug.cgi?id=29508
3919         
3920         See documentation here:
3921         http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW16
3922
3923         * DerivedSources.make: Use new WebCore.OrientationEvents.exp file if ENABLE_ORIENTATION_EVENTS.
3924         Add ENABLE_ORIENTATION_EVENTS to the new ADDITIONAL_IDL_DEFINES variable that is passed to the IDL
3925         code generator. This is because ENABLE_ORIENTATION_EVENTS is not in FEATURE_DEFINES.
3926         * WebCore.OrientationEvents.exp: Added.
3927         * WebCore.xcodeproj/project.pbxproj: Add WebCore.OrientationEvents.exp.
3928         * dom/EventNames.h: Add onorientationchange.
3929         * html/HTMLAttributeNames.in: Ditto.
3930         * html/HTMLBodyElement.cpp: Handle onorientationchange properly.
3931         (WebCore::HTMLBodyElement::parseMappedAttribute):
3932         (WebCore::HTMLBodyElement::onorientationchange):
3933         (WebCore::HTMLBodyElement::setOnorientationchange):
3934         * html/HTMLBodyElement.h: Ditto.
3935         * html/HTMLBodyElement.idl: Ditto.
3936         * html/HTMLFrameSetElement.cpp: Ditto.
3937         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
3938         (WebCore::HTMLFrameSetElement::onorientationchange):
3939         (WebCore::HTMLFrameSetElement::setOnorientationchange):
3940         * html/HTMLFrameSetElement.h: Ditto.
3941         * html/HTMLFrameSetElement.idl: Ditto.
3942         * page/DOMWindow.cpp: Ditto.
3943         (WebCore::DOMWindow::orientation): Calls up the to the Frame for the orientation value.
3944         (WebCore::DOMWindow::onorientationchange):
3945         (WebCore::DOMWindow::setOnorientationchange):
3946         * page/DOMWindow.h: Handle onorientationchange properly.
3947         * page/DOMWindow.idl: Ditto.
3948         * page/Frame.cpp: Ditto.
3949         (WebCore::Frame::Frame):
3950         (WebCore::Frame::sendOrientationChangeEvent):
3951         * page/Frame.h: Ditto.
3952         (WebCore::Frame::orientation):
3953
3954 2009-09-18  Anders Carlsson  <andersca@apple.com>
3955
3956         Try fixing the build again.
3957         
3958         * platform/win/PopupMenuWin.cpp:
3959         (WebCore::PopupMenu::wndProc):
3960
3961 2009-09-21  Pavel Feldman  <pfeldman@chromium.org>
3962
3963         Reviewed by Timothy Hatcher.
3964
3965         Web Inspector: completions are always evaluated against
3966         window (discarding call frames).
3967
3968         https://bugs.webkit.org/show_bug.cgi?id=29616
3969
3970         * inspector/front-end/ConsoleView.js:
3971         (WebInspector.ConsoleView.prototype.completions):
3972         * inspector/front-end/InjectedScript.js:
3973         (InjectedScript.getCompletions):
3974         * inspector/front-end/ScriptsPanel.js:
3975         (WebInspector.ScriptsPanel.prototype.selectedCallFrameId):
3976
3977 2009-09-21  Brent Fulgham  <bfulgham@webkit.org>
3978
3979         Unreviewed build fix for Windows (Cairo) target.
3980
3981         Add stubs for SocketStream classes added in @r47788, which
3982         broke the WinCairo build.
3983
3984         No new tests. (Build failure).
3985
3986         * WebCore.vcproj/WebCore.vcproj:  Add references to new files
3987           to Cairo build, exclude from standard Apple build.
3988         * platform/network/curl/SocketStreamError.h: Added.
3989         * platform/network/curl/SocketStreamHandle.h: Added.
3990         * platform/network/curl/SocketStreamHandleCurl.cpp: Added.
3991
3992 2009-09-21  Pavel Feldman  <pfeldman@chromium.org>
3993
3994         Reviewed by Timothy Hatcher.
3995
3996         Web Inspector: Expose InspectorResource fields.
3997
3998         https://bugs.webkit.org/show_bug.cgi?id=29537
3999
4000         * inspector/InspectorResource.cpp:
4001         (WebCore::InspectorResource::sourceString):
4002         (WebCore::InspectorResource::resourceData):
4003         * inspector/InspectorResource.h:
4004         (WebCore::InspectorResource::requestHeaderFields):
4005         (WebCore::InspectorResource::responseHeaderFields):
4006         (WebCore::InspectorResource::responseStatusCode):
4007         (WebCore::InspectorResource::requestMethod):
4008         (WebCore::InspectorResource::requestFormData):
4009
4010 2009-09-21  Pavel Feldman  <pfeldman@chromium.org>
4011
4012         Reviewed by Timothy Hatcher.
4013
4014         Web Inspector: JS error drilling down childless node.
4015         No need to dispatch double click twice - it is already handled
4016         in TreeElement.treeElementDoubleClicked.
4017
4018         https://bugs.webkit.org/show_bug.cgi?id=22144
4019
4020         * inspector/front-end/ElementsTreeOutline.js:
4021         (WebInspector.ElementsTreeOutline):
4022
4023 2009-09-21  Kenneth Rohde Christiansen  <kenneth@webkit.org>
4024
4025         Reviewed by Simon Hausmann.
4026
4027         Implement new QWebPageClient class and let our classes
4028         QWebViewPrivate and QWebGraphicsItemPrivate inherit from it.
4029
4030         For Qt, platformPageClient() will now return a class derived from
4031         the QWebPageClient, so the patch adapts our Qt hooks to go though
4032         this class and not depend on the QWebView.
4033
4034         * WebCore.pro:
4035         * platform/Widget.h:
4036         * platform/qt/PlatformScreenQt.cpp:
4037         (WebCore::screenDepth):
4038         (WebCore::screenDepthPerComponent):
4039         (WebCore::screenIsMonochrome):
4040         (WebCore::screenRect):
4041         (WebCore::screenAvailableRect):
4042         * platform/qt/PopupMenuQt.cpp:
4043         (WebCore::PopupMenu::show):
4044         * platform/qt/QWebPageClient.h: Added.
4045         * platform/qt/WidgetQt.cpp:
4046         (WebCore::Widget::setCursor):
4047         * plugins/qt/PluginViewQt.cpp:
4048         (WebCore::PluginView::handleKeyboardEvent):
4049         (WebCore::PluginView::getValue):
4050         (WebCore::PluginView::platformStart):
4051
4052 2009-09-21  Pavel Feldman  <pfeldman@chromium.org>
4053
4054         Reviewed by Timothy Hatcher.
4055
4056         Web Inspector: Evaluating on call frame always returns "undefined".
4057
4058         https://bugs.webkit.org/show_bug.cgi?id=29613
4059
4060         * inspector/front-end/InjectedScript.js:
4061         (InjectedScript.evaluate):
4062         (InjectedScript._evaluateAndWrap):
4063         (InjectedScript._evaluateOn):
4064         (InjectedScript.evaluateInCallFrame):
4065
4066 2009-09-21  Pavel Feldman  <pfeldman@chromium.org>
4067
4068         Reviewed by Timothy Hatcher.
4069
4070         Web Inspector: Exception formatting is broken in console.
4071
4072         https://bugs.webkit.org/show_bug.cgi?id=29608
4073
4074         * inspector/front-end/ConsoleView.js:
4075         (WebInspector.ConsoleCommandResult):
4076         * inspector/front-end/InjectedScript.js:
4077         (InjectedScript.evaluate):
4078         (InjectedScript.createProxyObject):
4079
4080 2009-09-21  Pavel Feldman  <pfeldman@chromium.org>
4081
4082         Reviewed by Timothy Hatcher.
4083
4084         Web Inspector: Console object formatting is broken.
4085
4086         https://bugs.webkit.org/show_bug.cgi?id=29607
4087
4088         * inspector/front-end/ConsoleView.js:
4089         (WebInspector.ConsoleMessage.prototype._format):
4090         * inspector/front-end/ObjectProxy.js:
4091         (WebInspector.ObjectProxy.wrapPrimitiveValue):
4092
4093 2009-09-21  Pavel Feldman  <pfeldman@chromium.org>
4094
4095         Reviewed by Timothy Hatcher.
4096
4097         Web Inspector: Crash When Logging an Element Before Opening Inspector
4098
4099         https://bugs.webkit.org/show_bug.cgi?id=29514
4100
4101         * inspector/InspectorController.cpp:
4102         (WebCore::InspectorController::populateScriptObjects):
4103
4104 2009-09-21  Simon Fraser  <simon.fraser@apple.com>
4105
4106         Reviewed by Dan Bernstein.
4107
4108         Incorrect clipping with accelerated compositing content, and position:fixed
4109         https://bugs.webkit.org/show_bug.cgi?id=29347
4110         
4111         Fix the compositing clipping logic to behave correctly when position:fixed
4112         elements clip, by using the new backgroundClipRect() method to determine
4113         when we need to clip, and to compute the clipping layer position.
4114
4115         Test: compositing/overflow/fixed-position-ancestor-clip.html
4116
4117         * rendering/RenderLayerBacking.cpp:
4118         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
4119         * rendering/RenderLayerCompositor.cpp:
4120         (WebCore::RenderLayerCompositor::clippedByAncestor):
4121
4122 2009-09-21  Nate Chapin  <japhet@chromium.org>
4123
4124         Reviewed by Adam Barth.
4125
4126         Add back in a special case for window.top in the V8 bindings.
4127
4128         https://bugs.webkit.org/show_bug.cgi?id=29605
4129
4130         Fixes LayoutTests/fast/dom/Window/window-property-shadowing.html in the Chromium port.
4131
4132         * bindings/scripts/CodeGeneratorV8.pm: Ensure window.top is not marked as read only, as this breaks the shadowing disabling.
4133
4134 2009-09-21  Eric Carlson  <eric.carlson@apple.com>
4135
4136         Reviewed by Brady Eidson.
4137
4138         HTMLMediaElement: media file should not reload when page comes out of page cache
4139         https://bugs.webkit.org/show_bug.cgi?id=29604
4140
4141         Test: media/restore-from-page-cache.html
4142
4143         * html/HTMLMediaElement.cpp:
4144         (WebCore::HTMLMediaElement::userCancelledLoad): Do nothing unless the element
4145         is still loading. Only fire an 'emptied' event if the readyState is HAVE_NOTHING,
4146         otherwise set the network state to NETWORK_IDLE.
4147
4148 2009-09-21  Sam Weinig  <sam@webkit.org>
4149
4150         Reviewed by Geoffrey "Sean/Shawn/Shaun" Garen.
4151
4152         Clarify two FIXMEs.
4153
4154         * bindings/js/JSHTMLCollectionCustom.cpp:
4155         (WebCore::getNamedItems):
4156         * bindings/js/JSHTMLFormElementCustom.cpp:
4157         (WebCore::JSHTMLFormElement::nameGetter):
4158
4159 2009-09-21  Darin Fisher  <darin@chromium.org>
4160
4161         Reviewed by Dimitri Glazkov.
4162
4163         Drop down selects fail to close when a value is selected
4164         https://bugs.webkit.org/show_bug.cgi?id=29582
4165
4166         Implement PopupListBox::hidePopup, which was previously
4167         declared but unimplemented.  Removes the declaration of
4168         showPopup since that method is not implemented.
4169
4170         PopupListBox::hidePopup takes care of hiding the popup,
4171         by invoking hidePopup on its parent PopupContainer, and
4172         then informs the PopupMenuClient that popupDidHide.
4173         This mimics the old behavior prior to r48370.
4174
4175         * platform/chromium/PopupMenuChromium.cpp:
4176         (WebCore::PopupListBox::handleKeyEvent):
4177         (WebCore::PopupListBox::abandon):
4178         (WebCore::PopupListBox::acceptIndex):
4179         (WebCore::PopupListBox::hidePopup):
4180
4181 2009-09-21  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
4182
4183         Rubber-stamped by Simon Hausmann.
4184
4185         [Qt] Windows build fix.
4186         https://bugs.webkit.org/show_bug.cgi?id=29535
4187
4188         * platform/network/qt/DnsPrefetchHelper.cpp: Missing #include "config.h"  added.
4189
4190 2009-09-21  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
4191
4192         Unreviewed make dist build fix. Missing files.
4193
4194         * GNUmakefile.am:
4195
4196 2009-09-20  Adam Barth  <abarth@webkit.org>
4197
4198         Reviewed by Maciej Stachowiak.
4199
4200         Crash when clicking link in unload handler
4201         https://bugs.webkit.org/show_bug.cgi?id=29525
4202
4203         Test that the first navigation always wins when the page tries to start
4204         a new navigation in an unload handler.
4205
4206         Tests: fast/loader/unload-form-about-blank.html
4207                fast/loader/unload-form-post-about-blank.html
4208                fast/loader/unload-form-post.html
4209                fast/loader/unload-form.html
4210                fast/loader/unload-hyperlink.html
4211                fast/loader/unload-javascript-url.html
4212                fast/loader/unload-reload.html
4213                fast/loader/unload-window-location.html
4214
4215         * loader/FrameLoader.cpp:
4216         (WebCore::FrameLoader::loadURL):
4217         (WebCore::FrameLoader::loadWithDocumentLoader):
4218
4219 2009-09-18  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
4220
4221         Reviewed by Xan Lopez.
4222
4223         [GTK] Sometimes crashes when a page is destroyed/loads another URL while playing video
4224         https://bugs.webkit.org/show_bug.cgi?id=29496
4225
4226         Protect the video sink object, and destroy it in an idle callback
4227         to hopefully avoid a race condition that leads to a crash.
4228
4229         This is already tested by media/video-seekable.html
4230
4231         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
4232         (WebCore::idleUnref):
4233         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
4234         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
4235
4236 2009-09-19  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
4237
4238         Unreviewed build fix for GTK+ and a blind one for Qt after r48566.
4239
4240         * GNUmakefile.am:
4241         * WebCore.pro:
4242
4243 2009-09-19  Sam Weinig  <sam@webkit.org>
4244
4245         Reviewed by Oliver Hunt.
4246
4247         Fix for https://bugs.webkit.org/show_bug.cgi?id=29519
4248         Remove JSNameNodeCollection and just use StaticNodeList
4249
4250         * WebCore.vcproj/WebCore.vcproj:
4251         * WebCore.xcodeproj/project.pbxproj:
4252         * WebCoreSources.bkl:
4253         * bindings/js/JSHTMLCollectionCustom.cpp:
4254         (WebCore::getNamedItems):
4255         * bindings/js/JSHTMLFormElementCustom.cpp:
4256         (WebCore::JSHTMLFormElement::nameGetter):
4257         * bindings/js/JSNamedNodesCollection.cpp: Removed.
4258         * bindings/js/JSNamedNodesCollection.h: Removed.
4259
4260 2009-09-19  Daniel Bates  <dbates@webkit.org>
4261
4262         Reviewed by Adam Barth.
4263
4264         https://bugs.webkit.org/show_bug.cgi?id=29511
4265         
4266         Fixes an issue where script code that contains non-ASCII characters may bypass the 
4267         XSSAuditor.
4268         
4269         Before performing a comparison between the script source code and input parameters, we
4270         remove all non-ASCII characters, including non-printable ASCII characters from the
4271         script source code and input parameters.
4272
4273         Tests: http/tests/security/xssAuditor/img-onerror-non-ASCII-char.html
4274                http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding.html
4275                http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-default-encoding.html
4276                http/tests/security/xssAuditor/img-onerror-non-ASCII-char2.html
4277
4278         * page/XSSAuditor.cpp:
4279         (WebCore::isNonCanonicalCharacter): Modified to remove all non-ASCII characters,
4280         including non-printable ASCII characters.
4281
4282 2009-09-19  Simon Fraser  <simon.fraser@apple.com>
4283
4284         Reviewed by Dan Bernstein.
4285
4286         Incorrect animation with scale(0) transform (singular matrix)
4287         https://bugs.webkit.org/show_bug.cgi?id=29465
4288         
4289         Make accelerated scale() and translate() animations go through the component animation
4290         path (rather than just matrix animation) to avoid problems with singular scale matrices,
4291         and be slightly more efficient.
4292
4293         Test: compositing/transitions/singular-scale-transition.html
4294
4295         * platform/graphics/mac/GraphicsLayerCA.mm:
4296         (WebCore::getTransformFunctionValue):
4297         (WebCore::getValueFunctionNameForTransformOperation):
4298
4299 2009-09-19  Alex Milowski  <alex@milowski.com>
4300
4301         Reviewed by Maciej Stachowiak.
4302
4303         Adds CSS styling and basic DOM element support for MathML
4304
4305         * DerivedSources.make:
4306           Added user stylesheet and tag factory generation
4307
4308         * WebCore.xcodeproj/project.pbxproj:
4309           Added new DOM element code
4310
4311         * css/CSSParser.cpp:
4312         (WebCore::CSSParser::parseAttr):
4313           Added check for document since stylesheet can be added before there is a document
4314
4315         * css/CSSStyleSelector.cpp:
4316         (WebCore::CSSStyleSelector::styleForElement):
4317           Added check to add MathML user agent stylesheet
4318
4319         * css/mathml.css: Added.
4320           MathML user agent stylesheet
4321
4322         * dom/Document.cpp:
4323         (WebCore::Document::createElement):
4324           Added support for creation of MathML DOM objects
4325
4326         * dom/Node.h:
4327         (WebCore::Node::isMathMLElement):
4328           Added check method for whether the node is a MathML node
4329
4330         * mathml: Added.
4331         * mathml/MathMLElement.cpp: Added.
4332         (WebCore::MathMLElement::MathMLElement):
4333         (WebCore::MathMLElement::create):