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