https://bugs.webkit.org/show_bug.cgi?id=30456
[WebKit-https.git] / WebCore / ChangeLog
1 2009-10-16  Steve Falkenburg  <sfalken@apple.com>
2
3         Reviewed by Dan Bernstein.
4
5         https://bugs.webkit.org/show_bug.cgi?id=30456
6         Fixes for new Debug_All Windows build configuration.
7
8         * platform/network/cf/ResourceRequestCFNet.cpp:
9         (WebCore::findCFNetworkModule): Ask for the correct library instead of guessing.
10         * platform/win/ScrollbarThemeSafari.cpp: Use new DEBUG_ALL preprocessor define for library naming.
11         * rendering/RenderMediaControls.cpp: Use new DEBUG_ALL preprocessor define for library naming.
12         * rendering/RenderThemeSafari.cpp: Use new DEBUG_ALL preprocessor define for library naming.
13
14 2009-10-16  Jon Honeycutt  <jhoneycutt@apple.com>
15
16         Add SPI to determine whether a plug-in has ever been halted.
17
18         Part of <rdar://problem/7312158>.
19
20         Reviewed by Dan Bernstein.
21
22         * plugins/PluginView.cpp:
23         (WebCore::PluginView::PluginView):
24         Initialize m_hasBeenHalted.
25
26         * plugins/PluginView.h:
27         (WebCore::PluginView::hasBeenHalted):
28         Return m_hasBeenHalted.
29
30         * plugins/win/PluginViewWin.cpp:
31         (WebCore::PluginView::halt):
32         Set m_hasBeenHalted.
33
34 2009-10-16  Adam Barth  <abarth@webkit.org>
35
36         Reviewed by Alexey Proskuryakov.
37
38         @charset rule after the first byte causes the rest of css to be ignored
39         https://bugs.webkit.org/show_bug.cgi?id=18265
40
41         Apparently we're supposed to tolerate whitespace before the charset
42         rule so folks can write code like this:
43
44         <style>
45         @charset "utf-8"
46         ...
47         </style>
48
49         I'm told this is one of the top compatability problems in China.
50         Tests: fast/css/comment-before-charset-external.html
51                fast/css/comment-before-charset.html
52                fast/css/many-spaces-before-charset.html
53                fast/css/space-before-charset-external.html
54                fast/css/space-before-charset.html
55
56         * css/CSSGrammar.y:
57
58 2009-10-16  Brian Weinstein  <bweinstein@apple.com>
59
60         Reviewed by Darin Adler.
61
62         Fixes part of <http://webkit.org/b/30412>.
63         Web Inspector should get human readable DOM Exceptions.
64
65         Add a description field to ExceptionBase, and call it through 
66         reportException which allows the user/developer to get a more detailed
67         and coherent error explanation through the Web Inspector.
68
69         This only applies to exceptions that come from a script on the page when
70         it is run. DOM Exceptions that come from the code run in the console, or DOM
71         exceptions that are caught and logged will come in a future patch.
72
73         Tests: inspector/uncaught-dom1-exception.html
74                inspector/uncaught-dom3-exception.html
75                inspector/uncaught-dom8-exception.html
76
77         * WebCore.gypi:
78         * WebCore.vcproj/WebCore.vcproj:
79         * WebCore.xcodeproj/project.pbxproj:
80         * bindings/js/JSDOMBinding.cpp:
81         (WebCore::reportException):
82         * bindings/js/JSExceptionBase.cpp: Added.
83         (WebCore::toExceptionBase):
84         * bindings/js/JSExceptionBase.h: Added.
85         * dom/ExceptionBase.cpp:
86         (WebCore::ExceptionBase::ExceptionBase):
87         * dom/ExceptionBase.h:
88         (WebCore::ExceptionBase::description):
89         * dom/ExceptionCode.cpp:
90         (WebCore::):
91         (WebCore::getExceptionCodeDescription):
92         * dom/ExceptionCode.h:
93
94 2009-10-16  Geoffrey Garen  <ggaren@apple.com>
95
96         Build fix: forgot to check in this #include.
97
98         * bridge/runtime_root.h:
99
100 2009-10-16  Simon Fraser  <simon.fraser@apple.com>
101
102         Reviewed by Dan Bernstein.
103
104         Transform layer gets stuck with the wrong transform after an animation ends
105         <rdar://problem/7311662>
106
107         Work around a CoreAnimation bug which causes an animated transform layer to
108         end up with a stale transform.
109         
110         Test: compositing/animation/state-at-end-event-transform-layer.html
111
112         * platform/graphics/mac/GraphicsLayerCA.mm:
113         (WebCore::bug7311367Workaround):
114         (WebCore::GraphicsLayerCA::removeAnimationFromLayer):
115
116 2009-10-16  Simon Fraser  <simon.fraser@apple.com>
117
118         Reviewed by Dan Bernstein.
119
120         After running a transition with an end event listener, can't change the transform
121         https://bugs.webkit.org/show_bug.cgi?id=30454
122         
123         Fix an issue where, if a document had any listener for webkitTransitionEnd or webkitAnimationEnd,
124         the animations would not get cleaned up correctly, which broke subsequent changes of transform.
125         
126         Now, we always clean up the animations right after queuing up the end events.
127
128         Tests: animations/state-at-end-event.html
129                transitions/move-after-transition.html
130
131         * page/animation/ImplicitAnimation.cpp:
132         (WebCore::ImplicitAnimation::onAnimationEnd):
133         * page/animation/KeyframeAnimation.cpp:
134         (WebCore::KeyframeAnimation::onAnimationEnd):
135
136 2009-10-15  Joseph Pecoraro  <joepeck@webkit.org>
137
138         Reviewed by Timothy Hatcher.
139
140         Web Inspector: Handle the Enter Key in the Elements Tree Hierarchy
141         https://bugs.webkit.org/show_bug.cgi?id=30428
142
143         TextNode => Edit Text Node
144         Has Attributes => Edit First Attribute
145         No Attributes => Start Editing New Attribute
146
147         * inspector/front-end/ElementsTreeOutline.js:
148         (WebInspector.ElementsTreeOutline.prototype.handleKeyEvent): handle the "Enter" key
149         (WebInspector.ElementsTreeElement.prototype.set hovered): only add new attribute button on nodes with attributes
150         (WebInspector.ElementsTreeElement.prototype._addNewAttribute): prevent moving backwards where there are no attributes
151         (WebInspector.ElementsTreeElement.prototype._startEditingFromEvent): renamed to be clearer
152         (WebInspector.ElementsTreeElement.prototype._startEditing): transition to the appropriate edit state for a tree element
153
154 2009-10-16  Adam Barth  <abarth@webkit.org>
155
156         Reviewed by Eric Seidel.
157
158         Fix header indent style for FrameLoader and friends
159         https://bugs.webkit.org/show_bug.cgi?id=30430
160
161         * loader/FrameLoader.h:
162         (WebCore::FrameLoader::frame):
163         (WebCore::FrameLoader::policyChecker):
164         (WebCore::FrameLoader::history):
165         (WebCore::FrameLoader::notifier):
166         (WebCore::FrameLoader::isLoadingMainResource):
167         (WebCore::FrameLoader::documentLoader):
168         (WebCore::FrameLoader::policyDocumentLoader):
169         (WebCore::FrameLoader::provisionalDocumentLoader):
170         (WebCore::FrameLoader::state):
171         (WebCore::FrameLoader::client):
172         (WebCore::FrameLoader::url):
173         (WebCore::FrameLoader::isLoadingFromCachedPage):
174         (WebCore::FrameLoader::committingFirstRealLoad):
175         (WebCore::FrameLoader::committedFirstRealDocumentLoad):
176         (WebCore::FrameLoader::creatingInitialEmptyDocument):
177         * loader/HistoryController.h:
178         (WebCore::HistoryController::currentItem):
179         (WebCore::HistoryController::provisionalItem):
180         * loader/PolicyCallback.h:
181         (WebCore::PolicyCallback::request):
182         * loader/PolicyChecker.h:
183         (WebCore::PolicyChecker::loadType):
184         (WebCore::PolicyChecker::setLoadType):
185         (WebCore::PolicyChecker::delegateIsDecidingNavigationPolicy):
186         (WebCore::PolicyChecker::delegateIsHandlingUnimplementablePolicy):
187         * loader/RedirectScheduler.h:
188         * loader/ResourceLoadNotifier.h:
189
190 2009-10-16  Steve Falkenburg  <sfalken@apple.com>
191
192         Reviewed by Adam Roben.
193
194         Add a Debug_All configuration to build entire stack as debug.
195         Change Debug_Internal to:
196         - stop using _debug suffix for all WebKit/Safari binaries
197         - not use _debug as a DLL naming suffix
198         - use non-debug C runtime lib.
199
200         * WebCore.vcproj/QTMovieWin.vcproj: Add Debug_All configuration.
201         * WebCore.vcproj/WebCore.make: Debug build in makefile should build Debug_All.
202         * WebCore.vcproj/WebCore.sln: Add Debug_All configuration.
203         * WebCore.vcproj/WebCore.submit.sln: Add Debug_All configuration.
204         * WebCore.vcproj/WebCore.vcproj: Add Debug_All configuration.
205         * WebCore.vcproj/WebCoreGenerated.vcproj: Renamed single configuration from "Release" to "all".
206
207 2009-10-16  Dimitri Glazkov  <dglazkov@chromium.org>
208
209         No review, rolling out r49693, because it broke Chromium build.
210         http://trac.webkit.org/changeset/49693
211
212         * WebCore.gyp/WebCore.gyp:
213         * WebCore.gypi:
214
215 2009-10-16  Andrew Scherkus  <scherkus@chromium.org>
216
217         Reviewed by Eric Carlson.
218
219         Updated media resource selection algorithm to reflect latest HTML 5 specification.
220
221         Noticable changes:
222             -  Elements with no source should have their network state set to NETWORK_EMPTY as opposed to NETWORK_NO_SOURCE
223             -  Empty string ("") is now considered a valid URL resolving to the current page and will be loaded
224
225         Tests: media/video-src-empty.html
226                media/video-src-none.html
227
228         https://bugs.webkit.org/show_bug.cgi?id=30407
229
230         * html/HTMLMediaElement.cpp:
231         (WebCore::HTMLMediaElement::selectMediaResource): Updated code and comments to match spec.
232
233 2009-10-16  Adam Barth  <abarth@webkit.org>
234
235         Reviewed by Eric Seidel.
236
237         Insecure plug-ins don't trigger mixed content
238         https://bugs.webkit.org/show_bug.cgi?id=30431
239
240         Added the missing check.
241
242         Test: http/tests/security/mixedContent/insecure-plugin-in-iframe.html
243
244         * loader/FrameLoader.cpp:
245         (WebCore::FrameLoader::loadPlugin):
246
247 2009-10-16  Andrew Scherkus  <scherkus@chromium.org>
248
249         Reviewed by Eric Carlson.
250
251         Set autobuffer to true and schedule load in V8 audio element constructor.
252
253         https://bugs.webkit.org/show_bug.cgi?id=30448
254
255         Covered by existing tests.
256
257         * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
258         (WebCore::CALLBACK_FUNC_DECL): Set autobuffer to true and schedule load.
259
260 2009-10-16  Andrew Scherkus  <scherkus@chromium.org>
261
262         Reviewed by Eric Seidel.
263
264         Remove FIXME in RenderMediaControlsChromium as bug was fixed upstream.
265
266         https://bugs.webkit.org/show_bug.cgi?id=30422
267
268         Covered by existing media layout tests.
269
270         * rendering/RenderMediaControlsChromium.cpp:
271         (WebCore::paintMediaSlider): Removed round() and FIXME.
272
273 2009-10-16  Andrew Scherkus  <scherkus@chromium.org>
274
275         Reviewed by Eric Seidel.
276
277         Fix Chromium media controls to render a disabled play button when the element is unintialized.
278
279         https://bugs.webkit.org/show_bug.cgi?id=30410
280
281         Covered by existing layout tests.
282
283         * rendering/RenderMediaControlsChromium.cpp:
284         (WebCore::paintMediaPlayButton): Include check for NETWORK_EMPTY to render disabled play button.
285
286 2009-10-16  Oliver Hunt  <oliver@apple.com>
287
288         Reviewed by Gavin Barraclough.
289
290         Make typeinfo flags default to false
291         https://bugs.webkit.org/show_bug.cgi?id=30372
292
293         Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames
294         flag.
295
296         * bindings/js/JSDOMWindowShell.h:
297         (WebCore::JSDOMWindowShell::createStructure):
298         * bindings/js/JSHTMLAllCollection.h:
299         (WebCore::JSHTMLAllCollection::createStructure):
300         * bindings/js/JSQuarantinedObjectWrapper.h:
301         (WebCore::JSQuarantinedObjectWrapper::createStructure):
302         * bindings/scripts/CodeGeneratorJS.pm:
303         * bridge/runtime_array.h:
304         (JSC::RuntimeArray::createStructure):
305         * bridge/runtime_object.h:
306         (JSC::RuntimeObjectImp::createStructure):
307
308 2009-10-16  Steven Knight  <sgk@chromium.org>
309
310         Reviewed by David Levin.
311
312         https://bugs.webkit.org/show_bug.cgi?id=30447
313         Handle long link lines by building .idl-generated bindings in a
314         separate webcore_bindings library target.  Avoid Visual Studio
315         dependency issues by building additional generated .cpp and .h files
316         in a separate webcore_bindings_sources target.
317
318         Chrome should still build and test successfully.
319
320         * WebCore.gyp/WebCore.gyp:
321         * WebCore.gypi:
322
323 2009-10-16  Simon Fraser  <simon.fraser@apple.com>
324
325         Reviewed by Eric Carlson.
326
327         Transform transitions that used to be accelerated are no longer so
328         https://bugs.webkit.org/show_bug.cgi?id=30453
329
330         The change in r49633, to not run accelerated animations/transitions on layers that
331         are not attached, broke accelerated transitions/animations in many cases where they start
332         as soon as the page loads. This change reverts the code that tests for the GraphicsLayer being
333         attached.
334         
335         No test, because it's not possible from a test to know whether a transition is accelerated or not.
336
337         * rendering/RenderLayerBacking.cpp:
338         (WebCore::RenderLayerBacking::startAnimation):
339         (WebCore::RenderLayerBacking::startTransition):
340
341 2009-10-16  Kevin Ollivier  <kevino@theolliviers.com>
342
343         wxMSW build fix, build the MSW source to get methods that use the MSW version of
344         PlatformModuleVersion.
345
346         * wscript:
347
348 2009-10-16  Adam Barth  <abarth@webkit.org>
349
350         Unreviewed build fix.  Add back MIMETypeRegistryChromium with the right
351         casing.
352
353         * platform/chromium/MIMETypeRegistryChromium.cpp: Added.
354         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
355         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
356         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
357         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
358         (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
359         (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
360         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
361         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
362         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
363         (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
364         (WebCore::MIMETypeRegistry::getMediaMIMETypeForExtension):
365         (WebCore::dummyHashSet):
366         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
367         (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
368         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding):
369         (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
370         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
371
372 2009-10-16  Adam Barth  <abarth@webkit.org>
373
374         Reviewed by Darin Adler.
375
376         MimeTypeRegistryChromium is mis-casen
377         https://bugs.webkit.org/show_bug.cgi?id=30441
378
379         Change the case of MimeTypeRegistryChromium to match other platforms.
380
381         * WebCore.gypi:
382         * platform/chromium/MIMETypeRegistryChromium.cpp: Copied from WebCore/platform/chromium/MimeTypeRegistryChromium.cpp.
383         * platform/chromium/MimeTypeRegistryChromium.cpp: Removed.
384
385 2009-10-16  Dimitri Glazkov  <dglazkov@chromium.org>
386
387         Reviewed by Eric Seidel.
388
389         Change EmptyPluginHalterClient in SVGImage to be non-static, to
390         match changes made http://trac.webkit.org/changeset/49385.
391         https://bugs.webkit.org/show_bug.cgi?id=30403
392
393         Run the following layout test sequence:
394           LayoutTests/svg/W3C-SVG-1.1/struct-image-01-t.svg
395           LayoutTests/svg/W3C-SVG-1.1/struct-image-03-t.svg
396           LayoutTests/svg/W3C-SVG-1.1/struct-image-04-t.svg
397           LayoutTests/svg/W3C-SVG-1.1/struct-image-05-b.svg
398           LayoutTests/svg/W3C-SVG-1.1/struct-image-06-t.svg
399           LayoutTests/svg/W3C-SVG-1.1/struct-image-07-t.svg
400           LayoutTests/svg/W3C-SVG-1.1/struct-image-08-t.svg
401           LayoutTests/svg/W3C-SVG-1.1/struct-image-09-t.svg
402           LayoutTests/svg/W3C-SVG-1.1/struct-image-10-t.svg
403           LayoutTests/svg/carto.net/scrollbar.svg
404           LayoutTests/svg/carto.net/selectionlist.svg
405
406         selectionlist.svg should not crash.
407
408         * svg/graphics/SVGImage.cpp:
409         (WebCore::SVGImage::dataChanged): Made EmptyPluginHalterClient non-static.
410
411 2009-10-16  Victor Wang  <victorw@chromium.org>
412
413         Reviewed by David Levin.
414
415         Add beforeload event support to V8DOMWrapper
416
417         https://bugs.webkit.org/show_bug.cgi?id=30413
418
419         LayoutTests/fast/dom/beforeload/frame-before-load.html
420
421         * bindings/v8/V8DOMWrapper.cpp:
422         (WebCore::V8DOMWrapper::convertEventToV8Object):
423
424 2009-10-16  Adam Barth  <abarth@webkit.org>
425
426         Reviewed by Darin Adler.
427
428         MimeTypeRegistryChromium is mis-casen
429         https://bugs.webkit.org/show_bug.cgi?id=30441
430
431         Change the case of MimeTypeRegistryChromium to match other platforms.
432
433         * WebCore.gypi:
434         * platform/chromium/MIMETypeRegistryChromium.cpp: Copied from WebCore/platform/chromium/MimeTypeRegistryChromium.cpp.
435         * platform/chromium/MimeTypeRegistryChromium.cpp: Removed.
436
437 2009-10-16  Adam Barth  <abarth@webkit.org>
438
439         Reviewed by Mark Rowe.
440
441         Chrome doesn't set Content-Type for file upload when the file extension
442         is not recognized
443         https://bugs.webkit.org/show_bug.cgi?id=30433
444
445         Apparently, getMIMETypeForPath is supposed to return
446         application/octet-stream when it doesn't have a better MIME type.
447
448         * platform/chromium/MimeTypeRegistryChromium.cpp:
449         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
450
451 2009-10-16  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
452
453         Pull out r49676 as it caused build breakges on Symbian
454
455         * plugins/symbian/PluginViewSymbian.cpp:
456
457 2009-10-16  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
458
459         Reviewed by Ariya Hidayat.
460
461         Crash fix when loading NPAPI plugins on Qt/Mac
462
463         There's no guarantee that the plist will be valid even if we
464         ask the plugin to create it. Crash obverved with iGetter.
465
466         * plugins/mac/PluginPackageMac.cpp:
467
468 2009-10-15  Stephen White  <senorblanco@chromium.org>
469
470         Reviewed by David Levin.
471
472         Fix for Chromium/skia's implementation of canvas's isPointInPath().
473         https://bugs.webkit.org/show_bug.cgi?id=30402
474
475         Covered by LayoutTests/fast/canvas/pointInPath.html.
476
477         * platform/graphics/skia/SkiaUtils.cpp:
478         (WebCore::SkPathContainsPoint):
479
480 2009-10-15  Adam Barth  <abarth@webkit.org>
481
482         Reviewed by Darin Adler.
483
484         Factor ResourceLoadNotifier out of FrameLoader
485         https://bugs.webkit.org/show_bug.cgi?id=30379
486
487         These methods have virtually no interaction with the rest of
488         FrameLoader.
489
490         * GNUmakefile.am:
491         * WebCore.gypi:
492         * WebCore.pro:
493         * WebCore.vcproj/WebCore.vcproj:
494         * WebCore.xcodeproj/project.pbxproj:
495         * WebCoreSources.bkl:
496         * dom/Document.cpp:
497         (WebCore::Document::resourceRetrievedByXMLHttpRequest):
498         * loader/FrameLoader.cpp:
499         (WebCore::FrameLoader::FrameLoader):
500         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
501         (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
502         (WebCore::ResourceLoadNotifier::activeDocumentLoader):
503         (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
504         (WebCore::ResourceLoadNotifier::willSendRequest):
505         (WebCore::ResourceLoadNotifier::didReceiveResponse):
506         (WebCore::ResourceLoadNotifier::didReceiveData):
507         (WebCore::ResourceLoadNotifier::didFailToLoad):
508         (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
509         (WebCore::FrameLoader::sendRemainingDelegateMessages):
510         (WebCore::FrameLoader::requestFromDelegate):
511         (WebCore::ResourceLoadNotifier::didFinishLoad):
512         (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
513         (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
514         (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
515         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
516         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
517         (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
518         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
519         * loader/FrameLoader.h:
520         (WebCore::FrameLoader::notifier):
521         * loader/MainResourceLoader.cpp:
522         (WebCore::MainResourceLoader::receivedError):
523         * loader/ResourceLoadNotifier.cpp: Added.
524         (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
525         (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
526         (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
527         (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
528         (WebCore::ResourceLoadNotifier::willSendRequest):
529         (WebCore::ResourceLoadNotifier::didReceiveResponse):
530         (WebCore::ResourceLoadNotifier::didReceiveData):
531         (WebCore::ResourceLoadNotifier::didFinishLoad):
532         (WebCore::ResourceLoadNotifier::didFailToLoad):
533         (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
534         (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
535         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
536         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
537         (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
538         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
539         (WebCore::ResourceLoadNotifier::activeDocumentLoader):
540         * loader/ResourceLoadNotifier.h: Added.
541         * loader/ResourceLoader.cpp:
542         (WebCore::ResourceLoader::willSendRequest):
543         (WebCore::ResourceLoader::didReceiveResponse):
544         (WebCore::ResourceLoader::didReceiveData):
545         (WebCore::ResourceLoader::didFinishLoadingOnePart):
546         (WebCore::ResourceLoader::didFail):
547         (WebCore::ResourceLoader::didCancel):
548         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
549         (WebCore::ResourceLoader::didCancelAuthenticationChallenge):
550
551 2009-10-15  Roland Steiner  <rolandsteiner@google.com>
552
553         Reviewed by Darin Fisher.
554
555         Bug 30427 -  Remove unneeded methods in ChromiumDataObject
556         (https://bugs.webkit.org/show_bug.cgi?id=30427)
557         
558         Remove no longer needed methods from ChromiumDataObject.
559
560         No new tests (no functional change)
561
562         * platform/chromium/ChromiumDataObject.h:
563
564 2009-10-16  Yael Aharon  <yael.aharon@nokia.com>
565
566         Reviewed by Tor Arne Vestbø.
567
568         [Qt] Need a way to inform the application when a Netscape plugin is created or deleted
569         https://bugs.webkit.org/show_bug.cgi?id=30179
570
571         Inform the application when a plugin is created or destroyed, but only if the 
572         application registered for these notifications.
573
574         * plugins/symbian/PluginViewSymbian.cpp:
575         (WebCore::PluginView::platformStart):
576         (WebCore::PluginView::platformDestroy):
577
578 2009-10-16  Shu Chang  <Chang.Shu@nokia.com>
579
580         Reviewed by Eric Seidel.
581
582         Default language translation should be determined by locale settings,
583         e.g., "en-US".
584         https://bugs.webkit.org/show_bug.cgi?id=29653
585
586         Test: fast/js/navigator-language.html
587
588         * platform/qt/Localizations.cpp:
589         (WebCore::defaultLanguage):
590
591 2009-10-16  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
592
593         Reviewed by Ariya Hidayat.
594
595         Crash fix when loading NPAPI plugins on Qt/Mac
596
597         There's no guarantee that the plist will be valid even if we
598         ask the plugin to create it. Crash obverved with iGetter.
599
600         * plugins/mac/PluginPackageMac.cpp:
601
602 2009-10-15  Stephen White  <senorblanco@chromium.org>
603
604         Reviewed by David Levin.
605
606         Fix for Chromium/skia's implementation of canvas's isPointInPath().
607         https://bugs.webkit.org/show_bug.cgi?id=30402
608
609         Covered by LayoutTests/fast/canvas/pointInPath.html.
610
611         * platform/graphics/skia/SkiaUtils.cpp:
612         (WebCore::SkPathContainsPoint):
613
614 2009-10-15  Adam Barth  <abarth@webkit.org>
615
616         Reviewed by Darin Adler.
617
618         Factor ResourceLoadNotifier out of FrameLoader
619         https://bugs.webkit.org/show_bug.cgi?id=30379
620
621         These methods have virtually no interaction with the rest of
622         FrameLoader.
623
624         * GNUmakefile.am:
625         * WebCore.gypi:
626         * WebCore.pro:
627         * WebCore.vcproj/WebCore.vcproj:
628         * WebCore.xcodeproj/project.pbxproj:
629         * WebCoreSources.bkl:
630         * dom/Document.cpp:
631         (WebCore::Document::resourceRetrievedByXMLHttpRequest):
632         * loader/FrameLoader.cpp:
633         (WebCore::FrameLoader::FrameLoader):
634         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
635         (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
636         (WebCore::ResourceLoadNotifier::activeDocumentLoader):
637         (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
638         (WebCore::ResourceLoadNotifier::willSendRequest):
639         (WebCore::ResourceLoadNotifier::didReceiveResponse):
640         (WebCore::ResourceLoadNotifier::didReceiveData):
641         (WebCore::ResourceLoadNotifier::didFailToLoad):
642         (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
643         (WebCore::FrameLoader::sendRemainingDelegateMessages):
644         (WebCore::FrameLoader::requestFromDelegate):
645         (WebCore::ResourceLoadNotifier::didFinishLoad):
646         (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
647         (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
648         (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
649         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
650         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
651         (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
652         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
653         * loader/FrameLoader.h:
654         (WebCore::FrameLoader::notifier):
655         * loader/MainResourceLoader.cpp:
656         (WebCore::MainResourceLoader::receivedError):
657         * loader/ResourceLoadNotifier.cpp: Added.
658         (WebCore::ResourceLoadNotifier::ResourceLoadNotifier):
659         (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
660         (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
661         (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
662         (WebCore::ResourceLoadNotifier::willSendRequest):
663         (WebCore::ResourceLoadNotifier::didReceiveResponse):
664         (WebCore::ResourceLoadNotifier::didReceiveData):
665         (WebCore::ResourceLoadNotifier::didFinishLoad):
666         (WebCore::ResourceLoadNotifier::didFailToLoad):
667         (WebCore::ResourceLoadNotifier::didLoadResourceByXMLHttpRequest):
668         (WebCore::ResourceLoadNotifier::dispatchAssignIdentifierToInitialRequest):
669         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
670         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
671         (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
672         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
673         (WebCore::ResourceLoadNotifier::activeDocumentLoader):
674         * loader/ResourceLoadNotifier.h: Added.
675         * loader/ResourceLoader.cpp:
676         (WebCore::ResourceLoader::willSendRequest):
677         (WebCore::ResourceLoader::didReceiveResponse):
678         (WebCore::ResourceLoader::didReceiveData):
679         (WebCore::ResourceLoader::didFinishLoadingOnePart):
680         (WebCore::ResourceLoader::didFail):
681         (WebCore::ResourceLoader::didCancel):
682         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
683         (WebCore::ResourceLoader::didCancelAuthenticationChallenge):
684
685 2009-10-15  Roland Steiner  <rolandsteiner@google.com>
686
687         Reviewed by Darin Fisher.
688
689         Bug 30427 -  Remove unneeded methods in ChromiumDataObject
690         (https://bugs.webkit.org/show_bug.cgi?id=30427)
691         
692         Remove no longer needed methods from ChromiumDataObject.
693
694         No new tests (no functional change)
695
696         * platform/chromium/ChromiumDataObject.h:
697
698 2009-10-15  Daniel Bates  <dbates@webkit.org>
699
700         No review, rolling out r49644.
701         http://trac.webkit.org/changeset/49644
702         
703         We need to think about this change some more. See bug #30418 
704         for more details.
705
706         * page/XSSAuditor.cpp:
707         (WebCore::XSSAuditor::canEvaluate):
708         (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
709         (WebCore::XSSAuditor::canCreateInlineEventListener):
710         (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
711         (WebCore::XSSAuditor::canLoadObject):
712         (WebCore::XSSAuditor::canSetBaseElementURL):
713         (WebCore::XSSAuditor::findInRequest):
714         * page/XSSAuditor.h:
715
716 2009-10-14  Jon Honeycutt  <jhoneycutt@apple.com>
717
718         Add SPI to determine whether a node is a halted plug-in.
719
720         Part of <rdar://problem/7273354> Halted plug-ins should restart on
721         mouseover
722
723         https://bugs.webkit.org/show_bug.cgi?id=30151
724
725         Reviewed by Darin Adler.
726
727         * plugins/PluginView.cpp:
728         (WebCore::PluginView::PluginView):
729         Initialize m_isHalted.
730
731         * plugins/PluginView.h:
732         (WebCore::PluginView::isHalted):
733         Return m_isHalted.
734
735         * plugins/win/PluginViewWin.cpp:
736         (WebCore::PluginView::halt):
737         Set m_isHalted to true.
738         (WebCore::PluginView::restart):
739         clear m_isHalted.
740
741 2009-10-15  Zoltan Horvath  <zoltan@webkit.org>
742
743         Reviewed by Oliver Hunt.
744
745         [Qt] Build fix for QtWebKit after r49649.
746
747         Change JSC::HasNonDefaultMark to OverridesMarkChildren in createStructure function.
748
749         * bridge/qt/qt_runtime.h:
750         (JSC::Bindings::QtRuntimeMethod::createStructure):
751
752 2009-10-15  Pavel Feldman  <pfeldman@chromium.org>
753
754         Not reviewed - build fix.
755
756         Web Inspector: add file missing in r49648
757
758         * inspector/front-end/TestController.js: Added.
759         (WebInspector.TestController):
760         (WebInspector.TestController.prototype.waitUntilDone):
761         (WebInspector.TestController.prototype.notifyDone):
762         (WebInspector.evaluateForTestInFrontend):
763
764 2009-10-15  Oliver Hunt  <oliver@apple.com>
765
766         Reviewed by Darin Adler.
767
768         Make typeinfo flags default to false
769         https://bugs.webkit.org/show_bug.cgi?id=30372
770
771         Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc
772
773         * bindings/js/JSDOMBinding.h:
774         (WebCore::DOMObjectWithGlobalPointer::createStructure):
775         (WebCore::DOMConstructorObject::createStructure):
776         * bindings/js/JSDOMWindowShell.h:
777         (WebCore::JSDOMWindowShell::createStructure):
778         * bindings/js/JSHTMLAllCollection.h:
779         (WebCore::JSHTMLAllCollection::createStructure):
780         * bindings/js/JSQuarantinedObjectWrapper.h:
781         (WebCore::JSQuarantinedObjectWrapper::createStructure):
782         * bindings/scripts/CodeGeneratorJS.pm:
783         * bridge/qt/qt_runtime.h:
784         (JSC::Bindings::QtRuntimeMethod::createStructure):
785         * bridge/runtime_method.h:
786         (JSC::RuntimeMethod::createStructure):
787
788 2009-10-15  Pavel Feldman  <pfeldman@chromium.org>
789
790         Reviewed by Timothy Hatcher.
791
792         Web Inspector: introduce test controller with waitUntilDone
793         on frontend side.
794
795         https://bugs.webkit.org/show_bug.cgi?id=30400
796
797         * WebCore.gypi:
798         * WebCore.vcproj/WebCore.vcproj:
799         * inspector/front-end/TestController.js: Added.
800         (WebInspector.TestController):
801         (WebInspector.TestController.prototype.waitUntilDone):
802         (WebInspector.TestController.prototype.notifyDone):
803         (WebInspector.evaluateForTestInFrontend):
804         * inspector/front-end/WebKit.qrc:
805         * inspector/front-end/inspector.html:
806         * inspector/front-end/inspector.js:
807
808 2009-10-15  Daniel Bates  <dbates@webkit.org>
809
810         Reviewed by Adam Barth.
811
812         https://bugs.webkit.org/show_bug.cgi?id=27895
813         
814         Fixes an issue in which injecting an inline event handler whose value ends in a single-line
815         JavaScript comment can bypass the XSSAuditor. Similarly fixes this issue with respect to
816         the HTML Base element, HTML Object element, inline and external script tags, and
817         JavaScript multi-line variants of all of these attacks.
818
819         Tests: http/tests/security/xssAuditor/base-href-comment.html
820                http/tests/security/xssAuditor/iframe-javascript-url-comment.html
821                http/tests/security/xssAuditor/img-onerror-HTML-comment.html
822                http/tests/security/xssAuditor/img-onerror-comment.html
823                http/tests/security/xssAuditor/object-tag-comment.html
824                http/tests/security/xssAuditor/script-tag-comment-HTML-entity.html
825                http/tests/security/xssAuditor/script-tag-comment.html
826                http/tests/security/xssAuditor/script-tag-with-source-comment.html
827
828         * page/XSSAuditor.cpp: Added constant minAttackLength.
829         (WebCore::XSSAuditor::canEvaluate):
830         (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
831         (WebCore::XSSAuditor::canCreateInlineEventListener):
832         (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
833         (WebCore::XSSAuditor::canLoadObject):
834         (WebCore::XSSAuditor::canSetBaseElementURL):
835         (WebCore::XSSAuditor::findInRequest): Added parameter context. Only looks at up 
836         to minAttackLength of script code plus context (if any).
837         * page/XSSAuditor.h:
838
839 2009-10-08  Adam Langley  <agl@google.com>
840
841         Reviewed by Eric Seidel.
842
843         Currently, Skia clip paths are 1-bit. This patch makes our path
844         clipping anti-aliased for non-canvas drawing.
845
846         http://code.google.com/p/chromium/issues/detail?id=5927
847         https://bugs.webkit.org/show_bug.cgi?id=28820
848         http://www.imperialviolet.org/2009/09/02/anti-aliased-clipping.html
849
850         Already covered by layout tests. New baselines will be needed in the
851         Chromium tree.
852
853         (Reland. First landed in r49329, reverted in r49330 due to Windows
854         build break)
855
856         * html/canvas/CanvasRenderingContext2D.cpp:
857         (WebCore::CanvasRenderingContext2D::clip):
858         * platform/graphics/GraphicsContext.h:
859         * platform/graphics/cairo/GraphicsContextCairo.cpp:
860         (WebCore::GraphicsContext::canvasClip):
861         * platform/graphics/cg/GraphicsContextCG.cpp:
862         (WebCore::GraphicsContext::canvasClip):
863         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
864         (WebCore::GraphicsContext::canvasClip):
865         * platform/graphics/qt/GraphicsContextQt.cpp:
866         (WebCore::GraphicsContext::canvasClip):
867         * platform/graphics/skia/GraphicsContextSkia.cpp:
868         (WebCore::GraphicsContext::addInnerRoundedRectClip):
869         (WebCore::GraphicsContext::clip):
870         (WebCore::GraphicsContext::canvasClip):
871         (WebCore::GraphicsContext::clipPath):
872         * platform/graphics/skia/PlatformContextSkia.cpp:
873         (PlatformContextSkia::clipPathAntiAliased):
874         (PlatformContextSkia::restore):
875         (PlatformContextSkia::applyAntiAliasedClipPaths):
876         * platform/graphics/skia/PlatformContextSkia.h:
877         * platform/graphics/win/GraphicsContextWin.cpp:
878         (WebCore::GraphicsContext::canvasClip):
879         * platform/graphics/wince/GraphicsContextWince.cpp:
880         (WebCore::GraphicsContext::canvasClip):
881         * platform/graphics/wx/GraphicsContextWx.cpp:
882         (WebCore::GraphicsContext::canvasClip):
883
884 2009-10-15  Eric Carlson  <eric.carlson@apple.com>
885
886         Reviewed by Simon Fraser.
887
888         <rdar://problem/7295738> No way to mute/unmute a movie in full screen video mode
889
890         * WebCore.Video.exp: Export muted and setMute.
891
892 2009-10-15  Simon Fraser  <simon.fraser@apple.com>
893
894         Reviewed by Dan Bernstein.
895
896         Transitions fail to run sometimes
897         https://bugs.webkit.org/show_bug.cgi?id=26770
898
899         Fix an issue where we could attempt to start accelerated animations or transitions on
900         GraphicsLayer that were not rooted (because of visibility:hidden), which would leave
901         the AnimationController's m_waitingForResponse flag in a state that killed subsequent
902         software transitions.
903
904         * page/animation/AnimationController.cpp:
905         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
906         (WebCore::AnimationControllerPrivate::endAnimationUpdate):
907         (WebCore::AnimationControllerPrivate::receivedStartTimeResponse):
908         (WebCore::AnimationControllerPrivate::addToStartTimeResponseWaitList):
909         (WebCore::AnimationControllerPrivate::startTimeResponse):
910         * page/animation/AnimationControllerPrivate.h:
911         Make some methods non-inline for ease of debugging (these are not hot methods).
912         Rename m_waitingForAResponse to m_waitingForResponse.
913         
914         * platform/graphics/GraphicsLayer.h:
915         * platform/graphics/GraphicsLayer.cpp:
916         (WebCore::GraphicsLayer::hasAncestor):
917         New method to report whether the receiver has the given layer as an ancestor. Used for checking
918         whether a layer is rooted.
919
920         * rendering/RenderLayerBacking.cpp:
921         (WebCore::RenderLayerBacking::startAnimation):
922         (WebCore::RenderLayerBacking::startTransition):
923         Don't try to start accelerated animations or transitions on non-rooted GraphicsLayers.
924
925 2009-10-15  Alexander Pavlov  <apavlov@chromium.org>
926
927         Reviewed by Pavel Feldman.
928
929         Refactor ProfilesPanel to support multiple profile types
930
931         Data describing different profile types are now stored in distinct objects.
932         https://bugs.webkit.org/show_bug.cgi?id=30332
933
934         * WebCore.vcproj/WebCore.vcproj:
935         * inspector/front-end/ProfileView.js:
936         (WebInspector.CPUProfileView.profileCallback):
937         (WebInspector.CPUProfileView):
938         (WebInspector.CPUProfileView.prototype._sortData):
939         (WebInspector.CPUProfileType):
940         (WebInspector.CPUProfileType.prototype.get buttonTooltip):
941         (WebInspector.CPUProfileType.prototype.get buttonStyle):
942         (WebInspector.CPUProfileType.prototype.buttonClicked):
943         (WebInspector.CPUProfileType.prototype.setRecordingProfile):
944         (WebInspector.CPUProfile):
945         (WebInspector.CPUProfile.prototype.get title):
946         (WebInspector.CPUProfile.prototype.get uid):
947         (WebInspector.CPUProfile.prototype.get head):
948         (WebInspector.CPUProfile.prototype.createView):
949         (WebInspector.CPUProfile.prototype.viewForProfile):
950         * inspector/front-end/ProfilesPanel.js:
951         (WebInspector.ProfileType):
952         (WebInspector.ProfileType.prototype.get buttonTooltip):
953         (WebInspector.ProfileType.prototype.get buttonStyle):
954         (WebInspector.ProfileType.prototype.get buttonCaption):
955         (WebInspector.ProfileType.prototype.get id):
956         (WebInspector.ProfileType.prototype.get name):
957         (WebInspector.ProfileType.prototype.buttonClicked):
958         (WebInspector.ProfilesPanel):
959         (WebInspector.ProfilesPanel.prototype.get statusBarItems.clickHandler):
960         (WebInspector.ProfilesPanel.prototype.get statusBarItems):
961         (WebInspector.ProfilesPanel.prototype.reset):
962         (WebInspector.ProfilesPanel.prototype.registerProfileType):
963         (WebInspector.ProfilesPanel.prototype._makeKey):
964         (WebInspector.ProfilesPanel.prototype.addProfileHeader):
965         (WebInspector.ProfilesPanel.prototype.showProfile):
966         (WebInspector.ProfilesPanel.prototype.getProfileType):
967         (WebInspector.ProfilesPanel.prototype.showProfileForURL):
968         (WebInspector.ProfilesPanel.prototype.updateProfileTypeButtons):
969         (WebInspector.ProfilesPanel.prototype.displayTitleForProfileLink):
970         (WebInspector.ProfilesPanel.prototype.get searchableViews):
971         (WebInspector.ProfilesPanel.prototype._updateInterface):
972         * inspector/front-end/inspector.js:
973         (WebInspector._createPanels):
974         (WebInspector.documentClick.followLink):
975         (WebInspector.documentClick):
976         (WebInspector.addProfileHeader):
977         (WebInspector.setRecordingProfile):
978         (WebInspector.linkifyStringAsFragment):
979         (WebInspector.showProfileForURL):
980
981 2009-10-15  Pavel Feldman  <pfeldman@chromium.org>
982
983         Reviewed by Timothy Hatcher.
984
985         Web Inspector: Enable inspector layout tests.
986
987         https://bugs.webkit.org/show_bug.cgi?id=30014
988
989         * inspector/InspectorController.cpp:
990         (WebCore::InspectorController::evaluateForTestInFrontend):
991
992 2009-10-15  Philippe Normand  <pnormand@igalia.com>
993
994         Reviewed by Gustavo Noronha.
995
996         [GStreamer] READY state doesn't mean "enough data"
997         https://bugs.webkit.org/show_bug.cgi?id=30003
998
999         STATE_READY means MediaPlayer::HaveNothing
1000
1001         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
1002         (WebCore::MediaPlayerPrivate::updateStates):
1003
1004 2009-10-15  Philippe Normand  <pnormand@igalia.com>
1005
1006         Reviewed by Gustavo Noronha.
1007
1008         https://bugs.webkit.org/show_bug.cgi?id=30002
1009
1010         implement cancelLoad
1011
1012         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
1013         (WebCore::MediaPlayerPrivate::cancelLoad):
1014
1015 2009-10-15  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
1016
1017         Reviewed by Gustavo Noronha.
1018
1019         https://bugs.webkit.org/show_bug.cgi?id=30353
1020         
1021         Fix race condition, leading to a deadlock
1022
1023         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
1024         (webkit_video_sink_timeout_func):
1025         (webkit_video_sink_render):
1026         (unlock_buffer_mutex):
1027         (webkit_video_sink_unlock):
1028         (webkit_video_sink_unlock_stop):
1029         (webkit_video_sink_stop):
1030         (webkit_video_sink_start):
1031         (webkit_video_sink_class_init):
1032         Fix race condition in unlock/render that would lead to deadlocks.
1033
1034 2009-10-15  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
1035
1036         Reviewed by Gustavo Noronha.
1037
1038         https://bugs.webkit.org/show_bug.cgi?id=30374
1039         
1040         Check if caps are valid before parsing them
1041
1042         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
1043         (WebCore::MediaPlayerPrivate::duration):
1044         Check if caps are valid before parsing them in ::naturalSize().
1045         This prevents assertions if the natural size should be calculated
1046         before the video caps are negotiated.
1047
1048 2009-10-15  Philippe Normand  <pnormand@igalia.com>
1049
1050         Reviewed by Gustavo Noronha.
1051
1052         https://bugs.webkit.org/show_bug.cgi?id=30006
1053         [GStreamer] Unnecessary checks for Messages types in callbacks
1054
1055         refactored gst message callbacks into a single one
1056
1057         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
1058         (WebCore::mediaPlayerPrivateMessageCallback):
1059         (WebCore::do_gst_init):
1060         (WebCore::MediaPlayerPrivate::duration):
1061         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
1062
1063 2009-10-15  Shu Chang  <Chang.Shu@nokia.com>
1064
1065         Reviewed by Adele Peterson.
1066
1067         Anchor elements should be mouse focusable regardless isLink flag.
1068         https://bugs.webkit.org/show_bug.cgi?id=26856
1069
1070         * html/HTMLAnchorElement.cpp:
1071         * html/HTMLAnchorElement.h:
1072
1073 2009-10-15  Nikolas Zimmermann  <nzimmermann@rim.com>
1074
1075         Not reviewed. Sort XCode project file.
1076
1077         * WebCore.xcodeproj/project.pbxproj:
1078
1079 2009-10-15  Yury Semikhatsky  <yurys@chromium.org>
1080
1081         Reviewed by Dave Hyatt.
1082
1083         Return correct shorthand property name for 
1084         background-repeat-x, background-repeat-y, background-position-x,
1085         background-position-y, -webkit-mask-position-x, -webkit-mask-position-y,
1086         -webkit-mask-repeat-x, -webkit-mask-repeat-y.
1087
1088         https://bugs.webkit.org/show_bug.cgi?id=28972
1089
1090         Test: fast/backgrounds/repeat/background-repeat-shorthand.html
1091
1092         * css/CSSParser.cpp:
1093         (WebCore::CSSParser::parseValue):
1094
1095 2009-10-14  Mikhail Naganov  <mnaganov@chromium.org>
1096
1097         Reviewed by Pavel Feldman.
1098
1099         Web Inspector: Migrate profiles to the injected script-based schema.
1100
1101         https://bugs.webkit.org/show_bug.cgi?id=30328
1102
1103         * bindings/js/JSInspectorBackendCustom.cpp:
1104         * bindings/v8/custom/V8CustomBinding.h:
1105         * inspector/InspectorBackend.cpp:
1106         (WebCore::InspectorBackend::getProfileHeaders):
1107         (WebCore::InspectorBackend::getProfile):
1108         * inspector/InspectorBackend.h:
1109         * inspector/InspectorBackend.idl:
1110         * inspector/InspectorController.cpp:
1111         (WebCore::InspectorController::addProfile):
1112         (WebCore::InspectorController::getProfileHeaders):
1113         (WebCore::InspectorController::getProfile):
1114         (WebCore::InspectorController::createProfileHeader):
1115         * inspector/InspectorController.h:
1116         * inspector/InspectorFrontend.cpp:
1117         (WebCore::InspectorFrontend::addProfileHeader):
1118         (WebCore::InspectorFrontend::didGetProfileHeaders):
1119         (WebCore::InspectorFrontend::didGetProfile):
1120         * inspector/InspectorFrontend.h:
1121         * inspector/JavaScriptProfileNode.cpp:
1122         (WebCore::ProfileNodeClass):
1123         * inspector/front-end/ProfileView.js:
1124         (WebInspector.ProfileView.profileCallback):
1125         (WebInspector.ProfileView):
1126         (WebInspector.ProfileView.prototype._mouseDownInDataGrid):
1127         (WebInspector.ProfileView.prototype._assignParentsInProfile):
1128         * inspector/front-end/ProfilesPanel.js:
1129         (WebInspector.ProfilesPanel.prototype.addProfileHeader):
1130         * inspector/front-end/inspector.js:
1131         (WebInspector.addProfileHeader):
1132
1133 2009-10-14  Pavel Feldman  <pfeldman@chromium.org>
1134
1135         Reviewed by Timothy Hatcher.
1136
1137         Web Inspector: Create and update frontend script objects only when
1138         web inspector is visible.
1139
1140         https://bugs.webkit.org/show_bug.cgi?id=30376
1141
1142         * inspector/InspectorController.cpp:
1143         (WebCore::InspectorController::addConsoleMessage):
1144         (WebCore::InspectorController::populateScriptObjects):
1145         (WebCore::InspectorController::pruneResources):
1146         (WebCore::InspectorController::didCommitLoad):
1147         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
1148         (WebCore::InspectorController::identifierForInitialRequest):
1149         (WebCore::InspectorController::mainResourceFiredDOMContentEvent):
1150         (WebCore::InspectorController::mainResourceFiredLoadEvent):
1151         (WebCore::InspectorController::willSendRequest):
1152         (WebCore::InspectorController::didReceiveResponse):
1153         (WebCore::InspectorController::didReceiveContentLength):
1154         (WebCore::InspectorController::didFinishLoading):
1155         (WebCore::InspectorController::didFailLoading):
1156         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
1157         (WebCore::InspectorController::scriptImported):
1158         (WebCore::InspectorController::didOpenDatabase):
1159         (WebCore::InspectorController::didUseDOMStorage):
1160         (WebCore::InspectorController::evaluateForTestInFrontend):
1161
1162 2009-10-15  Joseph Pecoraro  <joepeck@webkit.org>
1163
1164         Fix Windows build.
1165
1166         * dom/Document.idl:
1167
1168 2009-10-14  Joseph Pecoraro  <joepeck@webkit.org>
1169
1170         Reviewed by Adam Barth.
1171
1172         [HTML5] Add document.head
1173         https://bugs.webkit.org/show_bug.cgi?id=30232
1174
1175         Test is fast/dom/document-head.html
1176
1177         * dom/Document.idl: added readonly attribute head
1178
1179 2009-10-14  Matt Mueller  <mattm@chromium.org>
1180
1181         Reviewed by Darin Adler.
1182
1183         Check FNonNeg after the unit switch to avoid valgrind uninitialised conditional reference in WebCore::CSSParser::validUnit.  See http://crbug.com/20939.
1184         https://bugs.webkit.org/show_bug.cgi?id=30347
1185         https://bugs.webkit.org/show_bug.cgi?id=22772
1186
1187         Covered by running LayoutTests/fast/css/invalid-percentage-property.html under valgrind.
1188
1189         * css/CSSParser.cpp:
1190         (WebCore::CSSParser::validUnit):
1191
1192 2009-10-14  Adam Barth  <abarth@webkit.org>
1193
1194         Reviewed by Sam Weinig.
1195
1196         Move scrolling code from FrameLoader to FrameView
1197         https://bugs.webkit.org/show_bug.cgi?id=30370
1198
1199         This code is about controlling the Frame's view, not about loading
1200         stuff into the frame.
1201
1202         * loader/FrameLoader.cpp:
1203         (WebCore::FrameLoader::finishedParsing):
1204         (WebCore::FrameLoader::scrollToAnchor):
1205         * page/FrameView.cpp:
1206         (WebCore::FrameView::scrollToFragment):
1207         (WebCore::FrameView::scrollToAnchor):
1208         * page/FrameView.h:
1209
1210 2009-10-14  Oliver Hunt  <oliver@apple.com>
1211
1212         Reviewed by Geoff Garen.
1213
1214         Make typeinfo flags default to false
1215         https://bugs.webkit.org/show_bug.cgi?id=30372
1216         
1217         Part 1. Reverse the HasStandardGetOwnPropertySlot flag.
1218
1219         * bindings/js/JSDOMBinding.h:
1220         (WebCore::DOMObjectWithGlobalPointer::createStructure):
1221         (WebCore::DOMConstructorObject::createStructure):
1222         * bindings/js/JSDOMWindowShell.h:
1223         (WebCore::JSDOMWindowShell::createStructure):
1224         * bindings/js/JSHTMLAllCollection.h:
1225         (WebCore::JSHTMLAllCollection::createStructure):
1226         * bindings/js/JSQuarantinedObjectWrapper.h:
1227         (WebCore::JSQuarantinedObjectWrapper::createStructure):
1228         * bindings/scripts/CodeGeneratorJS.pm:
1229         * bridge/objc/objc_runtime.h:
1230         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
1231         * bridge/runtime_array.h:
1232         (JSC::RuntimeArray::createStructure):
1233         * bridge/runtime_method.h:
1234         (JSC::RuntimeMethod::createStructure):
1235         * bridge/runtime_object.h:
1236         (JSC::RuntimeObjectImp::createStructure):
1237
1238 2009-10-14  Adam Barth  <abarth@webkit.org>
1239
1240         Reviewed by Darin Adler.
1241
1242         [XSSAuditor] Add an exception for local files
1243         https://bugs.webkit.org/show_bug.cgi?id=30352
1244
1245         Reduce XSS auditor false positives by always letting pages load scripts
1246         from their own host. We don't actually know of any false positives
1247         that this prevents, but it seems like a good idea.
1248
1249         One subtly is that we don't add this exception for scripts that have a
1250         query string because (1) URLs with query strings are more apt to
1251         confuse servers and (2) it is much less common to load scripts with a
1252         query string.
1253
1254         Tests: http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query.html
1255                http/tests/security/xssAuditor/script-tag-with-source-same-host.html
1256
1257         * page/XSSAuditor.cpp:
1258         (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
1259
1260 2009-10-14  Nikolas Zimmermann  <nzimmermann@rim.com>
1261
1262         Reviewed by George Staikos.
1263
1264         Kill virtual contextElement() method spread all over SVG code
1265         https://bugs.webkit.org/show_bug.cgi?id=30183
1266
1267         Remove virtual contextElement() function from all SVG*Element classes, as all animated properties live in the
1268         SVG*Element classes now instead of the SVGFitToViewBox / SVGURIReference / SVGExternalResourcesRequired
1269         subclasses. This is a first step to working animVal support. More patches will follow that depend on this change.
1270
1271         Remove "This file is part of the KDE project" from several files, change my old mail adress wildfox -> zimmermann,
1272         and remove vim modelines on all files I touched. No change in functionality, thus no new tests.
1273
1274         * svg/SVGAElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1275         * svg/SVGAltGlyphElement.h: Remove virtual contextElement() method.
1276         * svg/SVGAnimatedProperty.h:
1277         (WebCore::::synchronize):
1278         (WebCore::::startAnimation):
1279         (WebCore::::stopAnimation):
1280         * svg/SVGAnimationElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1281         * svg/SVGCircleElement.h: Ditto.
1282         * svg/SVGClipPathElement.h: Ditto.
1283         * svg/SVGCursorElement.h: Ditto.
1284         * svg/SVGDefsElement.h: Ditto.
1285         * svg/SVGEllipseElement.h: Ditto.
1286         * svg/SVGExternalResourcesRequired.h: Remove pure-virtual contextElement() method.
1287         * svg/SVGFEImageElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1288         * svg/SVGFELightElement.h: Remove virtual contextElement() method.
1289         * svg/SVGFEMergeNodeElement.h: Ditto.
1290         * svg/SVGFilterElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1291         * svg/SVGFilterPrimitiveStandardAttributes.h: Remove virtual contextElement() method.
1292         * svg/SVGFitToViewBox.cpp:
1293         (WebCore::SVGFitToViewBox::parseViewBox): Add Document* parameter - we used to fetch the Document pointer from the context element.
1294         (WebCore::SVGFitToViewBox::parseMappedAttribute): Ditto.
1295         * svg/SVGFitToViewBox.h: Remove pure-virtual contextElement() method.
1296         * svg/SVGFontElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1297         * svg/SVGForeignObjectElement.h: Ditto.
1298         * svg/SVGGElement.h: Ditto.
1299         * svg/SVGGradientElement.h: Ditto.
1300         * svg/SVGImageElement.h: Ditto.
1301         * svg/SVGLineElement.h: Ditto.
1302         * svg/SVGMPathElement.h: Ditto. Fix license indention.
1303         * svg/SVGMarkerElement.cpp:
1304         (WebCore::SVGMarkerElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
1305         * svg/SVGMarkerElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1306         * svg/SVGMaskElement.h: Ditto.
1307         * svg/SVGPathElement.h: Ditto.
1308         * svg/SVGPatternElement.cpp:
1309         (WebCore::SVGPatternElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
1310         * svg/SVGPatternElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1311         * svg/SVGPolyElement.cpp:
1312         (WebCore::SVGPolyElement::updateAnimatedSVGAttribute): synchronizeProperty<...>() has been renamed to PropertySynchronizer<...>::synchronize().
1313         * svg/SVGPolyElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1314         * svg/SVGRectElement.h: Ditto.
1315         * svg/SVGSVGElement.cpp:
1316         (WebCore::SVGSVGElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
1317         * svg/SVGSVGElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1318         * svg/SVGScriptElement.h: Ditto.
1319         * svg/SVGSwitchElement.h: Ditto.
1320         * svg/SVGSymbolElement.cpp:
1321         (WebCore::SVGSymbolElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
1322         * svg/SVGSymbolElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1323         * svg/SVGTRefElement.h: Remove virtual contextElement() method.
1324         * svg/SVGTextContentElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1325         * svg/SVGTextPathElement.h: Remove virtual contextElement() method.
1326         * svg/SVGUseElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1327         * svg/SVGViewElement.cpp:
1328         (WebCore::SVGViewElement::parseMappedAttribute): Pass document() to SVGFitToViewBox::parseMappedAttribute().
1329         * svg/SVGViewElement.h: Remove virtual contextElement() method. Change OwnerType of ANIMATED_* macros to this class.
1330         * svg/SVGViewSpec.cpp:
1331         (WebCore::SVGViewSpec::setViewBoxString): Pass document() to SVGFitToViewBox::parseMappedAttribute().
1332         (WebCore::SVGViewSpec::parseViewSpec): Ditto.
1333         * svg/SVGViewSpec.h: Devirtualize contextElement() method, it's the only place where contextElement() remains needed.
1334
1335 2009-10-14  Dirk Schulze  <krit@webkit.org>
1336
1337         Reviewed by Nikolas Zimmermann.
1338
1339         SVG Masking with wrong offset
1340         [https://bugs.webkit.org/show_bug.cgi?id=30325]
1341
1342         SVGMaskElement moves the mask image graphics context to the wrong location.
1343         In objectBoundingBoxMode the maskDestRect gets translated. This transformation
1344         is not used in the later calculation. Fix by consistenly calculating the translation
1345         offsets from the final mask destination rect.
1346
1347         Test: svg/custom/mask-with-default-value.svg
1348
1349         * svg/SVGMaskElement.cpp:
1350         (WebCore::SVGMaskElement::drawMaskerContent):
1351
1352 2009-10-14  Kevin Decker  <kdecker@apple.com>
1353
1354         Rubberstamped by Jon Honeycutt.
1355         
1356         Export a few more showSubstituteImage() related methods.
1357         
1358         * WebCore.base.exp:
1359         * WebCore.xcodeproj/project.pbxproj:
1360
1361 2009-10-14  Evan Martin  <evan@chromium.org>
1362
1363         Reviewed by Darin Adler.
1364
1365         Stringify CSS units manually (without printf) to make the formatting
1366         locale-insensitive and obey CSS spec with respect to large values.
1367         
1368         https://bugs.webkit.org/show_bug.cgi?id=18994
1369
1370         * css/CSSPrimitiveValue.cpp:
1371         (WebCore::appendCSSDouble):
1372         (WebCore::formatWithUnits):
1373         (WebCore::CSSPrimitiveValue::cssText):
1374
1375 2009-10-14  Mark Seaborn  <mseaborn@google.com>
1376
1377         Reviewed by Darin Adler.
1378
1379         Check error return value in Perl build script
1380         https://bugs.webkit.org/show_bug.cgi?id=30316
1381
1382         * css/makevalues.pl: Die if gperf fails.
1383
1384 2009-10-14  Dirk Schulze  <krit@webkit.org>
1385
1386         Reviewed by Nikolas Zimmermann.
1387
1388         SVG wrong filterRegions for userSpaceOnUse and percentage values
1389         [https://bugs.webkit.org/show_bug.cgi?id=30330]
1390
1391         Some clean-up of the SVG filter calculation code. This clean-up
1392         also fixes the problem with percentage and userSpaceInUse mode.
1393
1394         Test: svg/filters/subRegion-in-userSpace.svg
1395
1396         * platform/graphics/filters/FilterEffect.cpp:
1397         (WebCore::FilterEffect::FilterEffect):
1398         * platform/graphics/filters/FilterEffect.h:
1399         * rendering/SVGRenderSupport.cpp:
1400         (WebCore::SVGRenderBase::filterBoundingBoxForRenderer):
1401         * svg/SVGFilterElement.cpp:
1402         (WebCore::SVGFilterElement::buildFilter):
1403         (WebCore::SVGFilterElement::canvasResource):
1404         * svg/SVGFilterElement.h:
1405         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1406         (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
1407         * svg/graphics/SVGResourceFilter.cpp:
1408         (WebCore::SVGResourceFilter::SVGResourceFilter):
1409         (WebCore::SVGResourceFilter::~SVGResourceFilter):
1410         (WebCore::SVGResourceFilter::addFilterEffect):
1411         (WebCore::SVGResourceFilter::prepareFilter):
1412         * svg/graphics/SVGResourceFilter.h:
1413         (WebCore::SVGResourceFilter::create):
1414         * svg/graphics/filters/SVGFilter.cpp:
1415         (WebCore::SVGFilter::SVGFilter):
1416         (WebCore::SVGFilter::calculateEffectSubRegion):
1417         (WebCore::SVGFilter::create):
1418         * svg/graphics/filters/SVGFilter.h:
1419
1420 2009-10-14  Chris Marrin  <cmarrin@apple.com>
1421
1422         The last change fixed the problem, removing diagnostic printfs.
1423
1424         * platform/graphics/mac/GraphicsContext3DMac.cpp:
1425         (WebCore::GraphicsContext3D::GraphicsContext3D):
1426
1427 2009-10-14  Kevin Ollivier  <kevino@theolliviers.com>
1428
1429         CURL build fix for versions < 7.18.
1430
1431         * platform/network/curl/ResourceHandleCurl.cpp:
1432         (WebCore::ResourceHandle::setDefersLoading):
1433         * platform/network/curl/ResourceHandleManager.cpp:
1434         (WebCore::ResourceHandleManager::initializeHandle):
1435
1436 2009-10-14  Chris Marrin  <cmarrin@apple.com>
1437
1438         One more round of changes to figure out why the webgl 
1439         tests are crashing on the build bot. Here I am trying
1440         to see if we can create a software renderer. I am also
1441         printing the found pixel formats.
1442
1443         * platform/graphics/mac/GraphicsContext3DMac.cpp:
1444         (WebCore::GraphicsContext3D::GraphicsContext3D):
1445
1446 2009-10-14  Yael Aharon  <yael.aharon@nokia.com>
1447  
1448         Reviewed by 
1449  
1450         Enabling NPAPI plugin support on Qt Webkit for S60 platform
1451         https://bugs.webkit.org/show_bug.cgi?id=29302
1452
1453         Also implemented by Mahesh Kulkarni<mahesh.kulkarni@nokia.com>, 
1454         Rohini Ananth <rohini.ananth@nokia.com> and help from Norbert Lesr
1455         <norbert.leser@nokia.com>
1456          
1457         * WebCore.pro:
1458         Enabling ENABLE_NETSCAPE_PLUGIN_API for S60 and added S60 specific 
1459         new plugin files to be compiled under symbian: macro
1460
1461         * bridge/npapi.h:
1462         Added NPEvent and NPRegion definition for Symbian
1463
1464         * plugins/PluginPackage.h:
1465         Added S60 specific plugin interface and plugin loader variables
1466         * plugins/PluginPackage.cpp:
1467         (WebCore::PluginPackage::unload): Added !PLATFORM(SYMBIAN) macro.
1468         Default implementation to be used only for non-symbian platform
1469         * plugins/PluginDatabase.cpp:
1470         Macro !SYMBIAN checking
1471         * plugins/PluginView.h:
1472         Add Symbian to platforms that support setNPWindowIfNeeded
1473         * plugins/PluginView.cpp:
1474         (WebCore::PluginView::setFrameRect): Add Symbian to platforms that
1475         call setNPWindowRect from setFrameRect
1476          
1477         Added folder 'symbian' which contains implementation files for S60
1478         platform-specific NPAPI plugin functionality, under /plugins folder
1479         * plugins/symbian
1480         * plugins/symbian/npinterface.h:
1481         Plugin Interface to be implemented by S60 NPAPI plugins 
1482         * plugins/symbian/PluginContainerSymbian.h:
1483         * plugins/symbian/PluginContainerSymbian.cpp:
1484         * plugins/symbian/PluginDatabaseSymbian.cpp:
1485         * plugins/symbian/PluginViewSymbian.cpp:
1486         * plugins/symbian/PluginPackageSymbian.cpp:
1487
1488 2009-10-14  Chris Marrin  <cmarrin@apple.com>
1489
1490         More changes to figure out why the webgl tests are crashing on the build bot.
1491
1492         * platform/graphics/mac/GraphicsContext3DMac.cpp:
1493         (WebCore::GraphicsContext3D::GraphicsContext3D):
1494
1495 2009-10-14  Victor Wang  <victorw@chromium.org>
1496
1497         Reviewed by David Hyatt.
1498
1499         Round non-integer line height values.
1500
1501         Change webkit to rounding non-integer line height values
1502         instead of truncating them. This fixes a layout test
1503         failure on Windows and matches the calculation in IE and Firefox. 
1504
1505         https://bugs.webkit.org/show_bug.cgi?id=24434
1506
1507         Test: fast/css/line-height-rounding.html
1508               fast/forms/textarea-scrollbar-height.htm
1509
1510         * css/CSSComputedStyleDeclaration.cpp:
1511         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1512         * rendering/InlineFlowBox.cpp:
1513         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
1514         * rendering/RenderBR.cpp:
1515         (WebCore::RenderBR::lineHeight):
1516         * rendering/style/RenderStyle.h:
1517         (WebCore::InheritedFlags::computedLineHeight):
1518
1519 2009-10-13  Kelly Norton  <knorton@google.com>
1520
1521         Reviewed by Pavel Feldman.
1522
1523         Removes the persistent setting for InspectorTimelineAgent and renames timeline related
1524         interfaces to be more consistent with the JavaScript profiler.
1525
1526         * inspector/InspectorBackend.cpp:
1527         (WebCore::InspectorBackend::startTimelineProfiler):
1528         (WebCore::InspectorBackend::stopTimelineProfiler):
1529         (WebCore::InspectorBackend::timelineProfilerEnabled):
1530         * inspector/InspectorBackend.h:
1531         * inspector/InspectorBackend.idl:
1532         * inspector/InspectorController.cpp:
1533         (WebCore::InspectorController::setFrontendProxyObject):
1534         (WebCore::InspectorController::startTimelineProfiler):
1535         (WebCore::InspectorController::stopTimelineProfiler):
1536         (WebCore::InspectorController::timelineProfilerEnabled):
1537         * inspector/InspectorController.h:
1538         * inspector/InspectorFrontend.cpp:
1539         (WebCore::InspectorFrontend::timelineProfilerWasStarted):
1540         (WebCore::InspectorFrontend::timelineProfilerWasStopped):
1541         * inspector/InspectorFrontend.h:
1542         * inspector/front-end/TimelineAgent.js:
1543         (WebInspector.timelineProfilerWasStarted):
1544         (WebInspector.timelineProfilerWasStopped):
1545
1546 2009-10-01  Yong Li  <yong.li@torchmobile.com>
1547
1548         Reviewed by Adele Peterson.
1549
1550         Fix crash when loading invalid image data
1551         https://bugs.webkit.org/show_bug.cgi?id=29980
1552
1553         * rendering/RenderImage.cpp:
1554         (WebCore::RenderImage::setImageSizeForAltText):
1555
1556 2009-10-09  Stephen White  <senorblanco@chromium.org>
1557
1558         Reviewed by Eric Seidel.
1559
1560         Fix for NULL ptr deref in canvas's toDataURL().
1561         https://bugs.webkit.org/show_bug.cgi?id=30254
1562
1563         Test: fast/canvas/canvas-toDataURL-crash.html
1564
1565         * html/HTMLCanvasElement.cpp:
1566         (WebCore::HTMLCanvasElement::toDataURL):
1567
1568 2009-10-14  Pavel Feldman  <pfeldman@chromium.org>
1569
1570         Not reviewed, reverting r49558 since it broke profiler tests.
1571
1572         https://bugs.webkit.org/show_bug.cgi?id=30328
1573
1574         * bindings/js/JSInspectorBackendCustom.cpp:
1575         * bindings/v8/custom/V8CustomBinding.h:
1576         * inspector/InspectorBackend.cpp:
1577         (WebCore::InspectorBackend::getProfileHeaders):
1578         (WebCore::InspectorBackend::getProfile):
1579         * inspector/InspectorBackend.h:
1580         * inspector/InspectorBackend.idl:
1581         * inspector/InspectorController.cpp:
1582         (WebCore::InspectorController::addProfile):
1583         (WebCore::InspectorController::getProfileHeaders):
1584         (WebCore::InspectorController::getProfile):
1585         (WebCore::InspectorController::createProfileHeader):
1586         * inspector/InspectorController.h:
1587         * inspector/InspectorFrontend.cpp:
1588         (WebCore::InspectorFrontend::addProfileHeader):
1589         (WebCore::InspectorFrontend::didGetProfileHeaders):
1590         (WebCore::InspectorFrontend::didGetProfile):
1591         * inspector/InspectorFrontend.h:
1592         * inspector/JavaScriptProfileNode.cpp:
1593         (WebCore::ProfileNodeClass):
1594         * inspector/front-end/ProfileView.js:
1595         (WebInspector.ProfileView.profileCallback):
1596         (WebInspector.ProfileView):
1597         (WebInspector.ProfileView.prototype._mouseDownInDataGrid):
1598         (WebInspector.ProfileView.prototype._assignParentsInProfile):
1599         * inspector/front-end/ProfilesPanel.js:
1600         (WebInspector.ProfilesPanel.prototype.addProfileHeader):
1601         * inspector/front-end/inspector.js:
1602         (WebInspector.addProfileHeader):
1603
1604 2009-10-13  Holger Hans Peter Freyther  <zecke@selfish.org>
1605
1606         Reviewed by Simon Hausmann.
1607
1608         ImageDecoderQt: Minor tweaks to the decoder
1609
1610         - Only cache the data when we start to use it.
1611         - Start with a repetition count of none for normal images.
1612         - Do not use canRead as this will trigger parsing of the full image
1613         - Cope with a GIF failing to decode the first frame, do not
1614           set m_failed to true if decoding the first frame failed
1615         - Inform the QImageReader about the format that was detected
1616         - Always create a ImageDecoderQt when when we have more
1617         than four byte.
1618
1619
1620         * platform/graphics/qt/ImageDecoderQt.cpp:
1621         (WebCore::ImageDecoder::create): Always create QImageReader for a significant speed up
1622         (WebCore::ImageDecoderQt::ImageDecoderQt): Initialize m_repetitionCount to cAnimationNone
1623         (WebCore::ImageDecoderQt::setData): Only call ImageDecoder::setData when everything has been received
1624         (WebCore::ImageDecoderQt::isSizeAvailable): Do not check m_failed twice.
1625         (WebCore::ImageDecoderQt::filenameExtension): Convert from QByteArray to String
1626         (WebCore::ImageDecoderQt::frameBufferAtIndex): Check for m_failed before trying to decode
1627         (WebCore::ImageDecoderQt::internalDecodeSize): Fail if the size is QSize()
1628         (WebCore::ImageDecoderQt::forceLoadEverything): Handle the case were decoding the first frame fails
1629         * platform/graphics/qt/ImageDecoderQt.h: Change the m_format type
1630
1631 2009-10-14  Mikhail Naganov  <mnaganov@chromium.org>
1632
1633         Reviewed by Pavel Feldman.
1634
1635         Web Inspector: Migrate profiles to the injected script-based schema.
1636
1637         https://bugs.webkit.org/show_bug.cgi?id=30328
1638
1639         * bindings/js/JSInspectorBackendCustom.cpp:
1640         * bindings/v8/custom/V8CustomBinding.h:
1641         * inspector/InspectorBackend.cpp:
1642         (WebCore::InspectorBackend::getProfileHeaders):
1643         (WebCore::InspectorBackend::getProfile):
1644         * inspector/InspectorBackend.h:
1645         * inspector/InspectorBackend.idl:
1646         * inspector/InspectorController.cpp:
1647         (WebCore::InspectorController::addProfile):
1648         (WebCore::InspectorController::getProfileHeaders):
1649         (WebCore::InspectorController::getProfile):
1650         (WebCore::InspectorController::createProfileHeader):
1651         * inspector/InspectorController.h:
1652         * inspector/InspectorFrontend.cpp:
1653         (WebCore::InspectorFrontend::addProfileHeader):
1654         (WebCore::InspectorFrontend::didGetProfileHeaders):
1655         (WebCore::InspectorFrontend::didGetProfile):
1656         * inspector/InspectorFrontend.h:
1657         * inspector/JavaScriptProfileNode.cpp:
1658         (WebCore::ProfileNodeClass):
1659         * inspector/front-end/ProfileView.js:
1660         (WebInspector.ProfileView.profileCallback):
1661         (WebInspector.ProfileView):
1662         (WebInspector.ProfileView.prototype._mouseDownInDataGrid):
1663         (WebInspector.ProfileView.prototype._assignParentsInProfile):
1664         * inspector/front-end/ProfilesPanel.js:
1665         (WebInspector.ProfilesPanel.prototype.addProfileHeader):
1666         * inspector/front-end/inspector.js:
1667         (WebInspector.addProfileHeader):
1668
1669 2009-10-13  Yury Semikhatsky  <yurys@chromium.org>
1670
1671         Reviewed by Pavel Feldman.
1672
1673         Don't collect call frame properties until they're needed for completion.
1674
1675         https://bugs.webkit.org/show_bug.cgi?id=30334
1676
1677         * inspector/front-end/ConsoleView.js:
1678         (WebInspector.ConsoleView.prototype.completions):
1679         * inspector/front-end/InjectedScript.js:
1680         (InjectedScript.getCompletions): if call frame id is specified and the expression is empty collect frame properties.
1681         (InjectedScript.CallFrameProxy.prototype._wrapScopeChain): don't send call frame properties until they're needed.
1682         * inspector/front-end/ScriptsPanel.js:
1683
1684 2009-10-13  Yongjun Zhang  <yongjun.zhang@nokia.com>
1685
1686         Reviewed by Ariya Hidayat.
1687
1688         https://bugs.webkit.org/show_bug.cgi?id=29106
1689         [Qt] make CachedResourceHandle.h compile in winscw Symbian compiler.
1690
1691         Don't inline constructor CachedResourceHandle<T>(R*) to stop winscw
1692         compiler aggressively resolve inheritance of class R.  
1693         
1694         The winscw compiler bug is reported at:
1695         https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812.
1696         
1697         The change should be reverted when the above bug is fixed in winscw compiler.
1698
1699         * loader/CachedResourceHandle.h:
1700         (WebCore::::CachedResourceHandle):
1701
1702 2009-10-13  Dimitri Glazkov  <dglazkov@chromium.org>
1703
1704         No review, rolling out r49554, because it broke Win and Chromium builds.
1705         http://trac.webkit.org/changeset/49554
1706
1707         * css/CSSPrimitiveValue.cpp:
1708         (WebCore::CSSPrimitiveValue::cssText):
1709
1710 2009-10-13  Evan Martin  <evan@chromium.org>
1711
1712         Reviewed by Adam Barth.
1713
1714         Stringify CSS units manually (without printf) to make the formatting
1715         locale-insensitive and obey CSS spec with respect to large values.
1716         
1717         https://bugs.webkit.org/show_bug.cgi?id=18994
1718
1719         * css/CSSPrimitiveValue.cpp:
1720         (WebCore::appendCSSDouble):
1721         (WebCore::formatWithUnits):
1722         (WebCore::CSSPrimitiveValue::cssText):
1723
1724 2009-10-13  Evan Martin  <evan@chromium.org>
1725
1726         Reviewed by David Levin.
1727
1728         Make grippy lines vertical on horizontal scrollbars in Linux Chrome.
1729         While we're rebaselining scrollbars, fix an off by one in the vertical
1730         scrollbar rendering too.
1731
1732         https://bugs.webkit.org/show_bug.cgi?id=30319
1733
1734         Tests: this is covered by every pixel test involving scrollbars.
1735
1736         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1737         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
1738
1739 2009-10-13  Sam Weinig  <sam@webkit.org>
1740
1741         Reviewed by David Hyatt.
1742
1743         Fix issue where clientX and clientY on MouseEvents were wrong when
1744         the page was zoomed and scrolled.
1745
1746         Test: fast/events/clientXY-in-zoom-and-scroll.html
1747
1748         * dom/MouseRelatedEvent.cpp:
1749         (WebCore::contentsX): Take page zoom into account.
1750         (WebCore::contentsY): Ditto.
1751
1752 2009-10-13  Dave Hyatt  <hyatt@apple.com>
1753
1754         Reviewed by Adam Roben.
1755
1756         Change the order of arguments on some of the user stylesheet/script functions.  Split the removal functions
1757         out into separate ones for scripts and stylesheets.
1758
1759         * WebCore.base.exp:
1760         * page/PageGroup.cpp:
1761         (WebCore::PageGroup::addUserScriptToWorld):
1762         (WebCore::PageGroup::addUserStyleSheetToWorld):
1763         (WebCore::PageGroup::removeUserScriptFromWorld):
1764         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
1765         (WebCore::PageGroup::removeUserScriptsFromWorld):
1766         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
1767         * page/PageGroup.h:
1768         (WebCore::PageGroup::userScripts):
1769         (WebCore::PageGroup::userStyleSheets):
1770
1771 2009-10-13  Evan Martin  <evan@chromium.org>
1772
1773         Reviewed by Dmitry Titov.
1774
1775         Chrome's "Skia" theme paints select controls backwards in RTL.
1776
1777         https://bugs.webkit.org/show_bug.cgi?id=30320
1778
1779         Test: fast/text/international/bidi-menulist.html
1780         (The test is about something else, but it includes RTL selects.)
1781
1782         * rendering/RenderThemeChromiumSkia.cpp:
1783         (WebCore::RenderThemeChromiumSkia::paintMenuList): flip the arrow position in RTL case.
1784
1785 2009-10-13  Dmitry Titov  <dimich@chromium.org>
1786
1787         Reviewed by Alexey Proskuryakov.
1788
1789         https://bugs.webkit.org/show_bug.cgi?id=30318
1790         ScriptExecutionContext is not anymore needed to create an EventListener - remove old code.
1791         It's a followup to r48884. It removed the need to pass the ScritpExecutionContext
1792         into EventListener constructor but did not remove the code pulling ScriptExecutionContext.
1793
1794         Tests:
1795         Test adds event listener to a DocumentType Node which is created without a document
1796         and then dispatches the event after attaching a node to the tree. Event
1797         should fire when node is attached to the tree.
1798
1799         * fast/events/add-event-without-document-expected.txt: Added.
1800         * fast/events/add-event-without-document.html: Added.
1801
1802         All changes in files below are the same - remove the code that calls
1803         EventTarget::scriptExecutionContext and checks it for NULL.
1804
1805         * bindings/js/JSAbstractWorkerCustom.cpp:
1806         (WebCore::JSAbstractWorker::addEventListener):
1807         (WebCore::JSAbstractWorker::removeEventListener):
1808         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1809         (WebCore::JSDOMApplicationCache::addEventListener):
1810         (WebCore::JSDOMApplicationCache::removeEventListener):
1811         * bindings/js/JSDesktopNotificationsCustom.cpp:
1812         (WebCore::JSNotification::addEventListener):
1813         (WebCore::):
1814         * bindings/js/JSEventSourceCustom.cpp:
1815         (WebCore::JSEventSource::addEventListener):
1816         (WebCore::JSEventSource::removeEventListener):
1817         * bindings/js/JSMessagePortCustom.cpp:
1818         (WebCore::JSMessagePort::addEventListener):
1819         (WebCore::JSMessagePort::removeEventListener):
1820         * bindings/js/JSNodeCustom.cpp:
1821         (WebCore::JSNode::addEventListener):
1822         (WebCore::JSNode::removeEventListener):
1823         * bindings/js/JSSVGElementInstanceCustom.cpp:
1824         (WebCore::JSSVGElementInstance::addEventListener):
1825         (WebCore::JSSVGElementInstance::removeEventListener):
1826         * bindings/js/JSXMLHttpRequestCustom.cpp:
1827         (WebCore::JSXMLHttpRequest::addEventListener):
1828         (WebCore::JSXMLHttpRequest::removeEventListener):
1829         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1830         (WebCore::JSXMLHttpRequestUpload::addEventListener):
1831         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
1832         * bindings/js/JSWebSocketCustom.cpp:
1833         (WebCore::JSWebSocket::addEventListener):
1834         (WebCore::JSWebSocket::removeEventListener):
1835
1836 2009-10-13  Drew Wilson  <atwilson@atwilson-macpro.local>
1837
1838         Reviewed by David Levin.
1839
1840         Enable SHARED_WORKERS for Chromium
1841         https://bugs.webkit.org/show_bug.cgi?id=30289
1842
1843         Cleaned up bitrot in SharedWorker V8 bindings.
1844
1845         * WebCore.gypi:
1846         Removed default implementation of SharedWorkerRepository so Chromium can provide its own.
1847         * bindings/v8/DerivedSourcesAllInOne.cpp:
1848         Added V8SharedWorkerContext.cpp.
1849         * bindings/v8/V8DOMWrapper.cpp:
1850         (WebCore::V8DOMWrapper::getTemplate):
1851         Added case statements for SHAREDWORKER and SHAREDWORKERCONTEXT.
1852         * bindings/v8/V8Index.cpp:
1853         Now includes V8SharedWorkerContext.h to allow supporting SharedWorkers.
1854         * bindings/v8/V8Index.h:
1855         Added definition for SHAREDWORKERCONTEXT wrapper.
1856         * bindings/v8/WorkerContextExecutionProxy.cpp:
1857         Added includes for SharedWorker.h and SharedWorkerContext.h.
1858         * bindings/v8/custom/V8CustomBinding.h:
1859         Reorganized Worker field indexes to be clearer, and fixed mismatch in worker field index.
1860         Also added field indexes for SharedWorkers.
1861         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1862         (WebCore::ACCESSOR_RUNTIME_ENABLER):
1863         Added runtime enabler for the SharedWorker constructor.
1864         * bindings/v8/custom/V8SharedWorkerCustom.cpp:
1865         (WebCore::CALLBACK_FUNC_DECL):
1866         Cleaned up bitrot (various APIs have changed since this file was written).
1867         * page/DOMWindow.idl:
1868         Added EnabledAtRuntime flag to window.SharedWorker.
1869
1870 2009-10-13  Alexey Proskuryakov  <ap@apple.com>
1871
1872         Reviewed by Brady Eidson.
1873
1874         https://bugs.webkit.org/show_bug.cgi?id=30345
1875         HTTP tests for credential handling fail on Tiger
1876
1877         We cannot prevent NSURLConnection from doing its credentil handling on Tiger anyway; so
1878         let it do its work without intervention. Once again, we pass explicitly passed credentials
1879         in URL, fixing regressions from Safari 3.
1880
1881         * platform/network/mac/ResourceHandleMac.mm:
1882         (WebCore::ResourceHandle::start):
1883         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
1884         (WebCore::ResourceHandle::receivedCredential):
1885
1886 2009-10-13  Roland Steiner  <rolandsteiner@google.com>
1887
1888         Reviewed by Adam Barth.
1889
1890         Bug 28964 -  [Chromium] ChromiumDataObject should have getter/setter interface
1891
1892         Reworked and added to the getter/setter interface in ChromiumDataObject:
1893         - added contains...() methods to just query the state
1894         - added containsValid...URL() methods for URL data members
1895         - removed takeFileNames() as this was too type-dependent
1896         - changed return type of fileNames() to Vector<String>
1897         - added interface methods to allow appending to and iteration over file names
1898
1899         No new tests (no functional behavior changed).
1900
1901         * platform/chromium/ChromiumDataObject.h:
1902         (WebCore::ChromiumDataObject::containsMainURL):
1903         (WebCore::ChromiumDataObject::containsValidMainURL):
1904         (WebCore::ChromiumDataObject::containsMainURLTitle):
1905         (WebCore::ChromiumDataObject::containsTextPlain):
1906         (WebCore::ChromiumDataObject::containsTextHTML):
1907         (WebCore::ChromiumDataObject::containsHTMLBaseURL):
1908         (WebCore::ChromiumDataObject::containsValidHTMLBaseURL):
1909         (WebCore::ChromiumDataObject::containsContent):
1910         (WebCore::ChromiumDataObject::containsContentFileExtension):
1911         (WebCore::ChromiumDataObject::containsContentFileName):
1912         (WebCore::ChromiumDataObject::setContentFileName):
1913         (WebCore::ChromiumDataObject::containsFileNames):
1914         (WebCore::ChromiumDataObject::fileNames):
1915         (WebCore::ChromiumDataObject::clearFileNames):
1916         (WebCore::ChromiumDataObject::countFileNames):
1917         (WebCore::ChromiumDataObject::fileNameAt):
1918         (WebCore::ChromiumDataObject::setFileNames):
1919         (WebCore::ChromiumDataObject::appendToFileNames):
1920         (WebCore::ChromiumDataObject::popFileName):
1921
1922 2009-10-13  Simon Fraser  <simon.fraser@apple.com>
1923
1924         Temporary debugging changes to figure out why the webgl tests are crashing on the build bot.
1925
1926         * platform/graphics/mac/GraphicsContext3DMac.cpp:
1927         (WebCore::GraphicsContext3D::GraphicsContext3D):
1928
1929 2009-10-13  Simon Fraser  <simon.fraser@apple.com>
1930
1931         Reviewed by Dan Bernstein.
1932
1933         Visibility:visible inside a compositing layer doesn't make the element visible
1934         https://bugs.webkit.org/show_bug.cgi?id=30339
1935         
1936         When deciding if a layer had any renderable content, RenderLayerBacking::paintIntoLayer()
1937         only consulted hasVisibleContent(), which does not take into a account child layers which
1938         may be visible. We also have to consult hasVisibleDescendant() as well.
1939
1940         Test: compositing/compositing-visible-descendant.html
1941
1942         * rendering/RenderLayer.h:
1943         (WebCore::RenderLayer::hasVisibleDescendant):
1944         * rendering/RenderLayerBacking.cpp:
1945         (WebCore::RenderLayerBacking::paintIntoLayer):
1946
1947 2009-10-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1948
1949         Reviewed by Simon Hausmann.
1950
1951         Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
1952         https://bugs.webkit.org/show_bug.cgi?id=30278
1953
1954         Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 
1955         from the make system into common code.
1956
1957         Enable ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH if NETSCAPE_PLUGIN_API 
1958         support is not enabled.
1959
1960         Remove notImplemented() from PluginPackageNone.cpp and 
1961         PluginDataNone.cpp make them just empty functions.
1962
1963         * GNUmakefile.am:
1964         * WebCore.pro:
1965         * plugins/PluginDataNone.cpp:
1966         (WebCore::PluginData::initPlugins):
1967         (WebCore::PluginData::refresh):
1968         * plugins/PluginPackageNone.cpp:
1969         (WebCore::PluginPackage::determineQuirks):
1970         (WebCore::PluginPackage::fetchInfo):
1971         (WebCore::PluginPackage::load):
1972
1973 2009-10-13  Alexey Proskuryakov  <ap@apple.com>
1974
1975         Reviewed by Dan Bernstein.
1976
1977         https://bugs.webkit.org/show_bug.cgi?id=30150
1978         <rdar://problem/7283540> REGRESSION: Crash when accessing clipboardData.types
1979
1980         Test: editing/pasteboard/crash-accessing-clipboardData-types.html
1981
1982         * platform/mac/ClipboardMac.mm: (WebCore::addHTMLClipboardTypesForCocoaType): The String
1983         class doesn't have operator bool, it's operator NSString* that is invoked instead, and it
1984         converts null strings to non-null @"".
1985
1986 2009-10-13  Drew Wilson  <atwilson@atwilson-macpro.local>
1987
1988         Reviewed by Dimitri Glazkov.
1989
1990         window attributes (like localStorage) that are disabled at runtime are still visible
1991         https://bugs.webkit.org/show_bug.cgi?id=30240
1992
1993         Adding codegen/bindings to support runtime disabling of attributes.
1994
1995         No new tests (only supported by chrome currently)
1996
1997         * bindings/scripts/CodeGeneratorV8.pm:
1998         Refactored the guts of GenerateBatchedAttributeData into a separate GenerateSingleBatchedAttribute with a passed-in indentation level to allow generating a single BatchedAttribute struct.
1999         Added support for the EnabledAtRuntime extended attribute, which generates a call to the appropriate XXXXEnabled() API before adding the attribute to the instance.
2000         * bindings/v8/V8Proxy.cpp:
2001         (WebCore::batchConfigureAttributes):
2002         Refactored attribute setting code into a common inline routine.
2003         * bindings/v8/V8Proxy.h:
2004         (WebCore::configureAttribute):
2005         Inline function which configures a single attribute given a BatchedAttribute struct.
2006         * bindings/v8/custom/V8CustomBinding.h:
2007         Added (DECLARE_)ACCESSOR_RUNTIME_ENABLER to allow enabling attributes at runtime.
2008         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2009         Added code to enable window.Audio only if MediaPlayer.isAvailable() == true
2010         * page/DOMWindow.idl:
2011         Added [EnabledAtRuntime] extended attribute to the Audio attribute.
2012
2013 2009-10-13  Michelangelo De Simone  <micdesim@gmail.com>
2014
2015         Reviewed by Adam Barth.
2016
2017         https://bugs.webkit.org/show_bug.cgi?id=27457
2018         Added support for static validation on type=email input elements as per
2019         HTML5 specs:
2020         http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state
2021
2022         Test: fast/forms/ValidityState-typeMismatch-email.html
2023
2024         * html/ValidityState.cpp:
2025         (WebCore::ValidityState::typeMismatch): ValidityState.typeMismatch
2026         performs validation on type=email input elements now.
2027         (WebCore::ValidityState::isValidEmailAddress): simple validation method 
2028         * html/ValidityState.h:
2029
2030 2009-10-13  Dmitry Titov  <dimich@chromium.org>
2031
2032         Reviewed by Adam Barth.
2033
2034         Event listeners installed on a window object returned from window.open() don't work
2035         https://bugs.webkit.org/show_bug.cgi?id=28716
2036
2037         Tests: http/tests/security/window-events-clear-domain.html
2038                http/tests/security/window-events-clear-port.html
2039                http/tests/security/window-events-pass.html
2040
2041         * dom/Document.cpp: Split code of Document::clear() in a way to avoid removing all
2042         window event handlers when implicitOpen is called. It is called in 2 cases - on
2043         committing loaded content (no need to clean handlers) and on document.open() (needs to remove handlers).
2044
2045         (WebCore::Document::open): in addition to calling implicitOpen it also removes window
2046         event handlers, to preserve the behavior of document.open().
2047
2048         (WebCore::Document::implicitOpen): includes the part of removed Document::clear() that
2049         does not remove window event handlers.
2050
2051         * dom/Document.h: Removed clear().
2052
2053         * loader/FrameLoader.cpp:
2054         (WebCore::FrameLoader::stopLoading): add check to avoid removing window event handlers
2055         if we transition from temporary empty document to a loaded one.
2056
2057         (WebCore::FrameLoader::didOpenURL): Remove closeURL() which was called twice when loading.
2058         (WebCore::FrameLoader::finishedLoadingDocument): add closeURL() to compensate for change above.
2059
2060 2009-10-13  Brian Weinstein  <bweinstein@apple.com>
2061
2062         Reviewed by Pavel Feldman.
2063
2064         Fix a leak in the inspector by calling didRemoveNode with
2065         an error code when it fails, instead of returning from the
2066         Backend.
2067
2068         * inspector/InspectorBackend.cpp:
2069         (WebCore::InspectorBackend::removeNode):
2070         * inspector/front-end/ElementsTreeOutline.js:
2071
2072 2009-10-13  Brian Weinstein  <bweinstein@apple.com>
2073
2074         Reviewed by Timothy Hatcher.
2075
2076         Fixes <https://bugs.webkit.org/show_bug.cgi?id=30337>.
2077         Web Inspector: Should be able to delete nodes from the Elements Tree.
2078         
2079         When the delete key is pressed and a element is selected in the tree,
2080         the element should be deleted from the Elements Tree and the DOM.
2081
2082         * inspector/InspectorBackend.cpp:
2083         (WebCore::InspectorBackend::removeNode):
2084         * inspector/InspectorBackend.h:
2085         * inspector/InspectorBackend.idl:
2086         * inspector/InspectorFrontend.cpp:
2087         (WebCore::InspectorFrontend::didRemoveNode):
2088         * inspector/InspectorFrontend.h:
2089         * inspector/front-end/ElementsPanel.js:
2090         (WebInspector.ElementsPanel.prototype._updateModifiedNodes):
2091         * inspector/front-end/ElementsTreeOutline.js:
2092         (WebInspector.ElementsTreeOutline.prototype.handleKeyEvent):
2093
2094 2009-10-13  Brian Weinstein  <bweinstein@apple.com>
2095
2096         Reviewed by Timothy Hatcher.
2097
2098         Fix REGRESSION(49479): Mouseover on resources graph doesn't show timings.
2099         
2100         Set pointer-events: none on the new overlay so mouseover events are passed
2101         to the resources graph so we can show timings.
2102
2103         * inspector/front-end/inspector.css:
2104
2105 2009-10-13  Girish Ramakrishnan  <girish@forwardbias.in>
2106
2107         Reviewed by Simon Hausmann.
2108
2109         [Qt] Plugins : Remove all traces of winId. Use ownerWidget() instead.
2110         
2111         This is a bug for two reasons:
2112         1. Everytime we use winId(), we end up creating a native widget. This causes an
2113         unnecessary copy of contents from the backing store to the native widget.
2114         2. Neither windowed nor windowless plugins require the winId of the QWebView or
2115         QGraphicsView.
2116         
2117         Introduce ownerWidget() which returns a QWidget * without creating a native widget
2118         (as opposed to QWidget::find(winId)).
2119
2120        https://bugs.webkit.org/show_bug.cgi?id=30170
2121
2122         * platform/qt/PlatformScreenQt.cpp:
2123         (WebCore::screenDepthPerComponent):
2124         * platform/qt/PopupMenuQt.cpp:
2125         (WebCore::PopupMenu::show):
2126         * platform/qt/QWebPageClient.h:
2127         * plugins/qt/PluginViewQt.cpp:
2128         (WebCore::setSharedXEventFields):
2129         (WebCore::PluginView::initXEvent):
2130         (WebCore::PluginView::getValue):
2131         (WebCore::PluginView::platformStart):
2132
2133 2009-10-13  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2134
2135         Unreviewed build system fix. Typo in a filename.
2136
2137         * GNUmakefile.am:
2138
2139 2009-10-12  Alexander Pavlov  <apavlov@chromium.org>
2140
2141         Reviewed by Timothy Hatcher.
2142         Alter profile link format to enable multiple profile types
2143         https://bugs.webkit.org/show_bug.cgi?id=30253
2144
2145         The new profile URL includes the profile type along with the
2146         profile title and uid.
2147
2148         * inspector/InspectorController.cpp:
2149         (WebCore::InspectorController::addProfileFinishedMessageToConsole):
2150         (WebCore::InspectorController::addStartProfilingMessageToConsole):
2151         * inspector/front-end/inspector.js:
2152         (WebInspector.documentClick.followLink):
2153         (WebInspector.documentClick):
2154         (WebInspector.linkifyStringAsFragment):
2155
2156 2009-10-12  Alexander Pavlov  <apavlov@chromium.org>
2157
2158         Reviewed by Timothy Hatcher.
2159
2160         Fix same-named profiles grouping in the Profiles panel.
2161
2162         The tree node re-parenting while adding a new group node was broken.
2163          
2164         https://bugs.webkit.org/show_bug.cgi?id=30299
2165
2166         * inspector/front-end/ProfilesPanel.js:
2167         (WebInspector.ProfilesPanel.prototype.addProfile):
2168
2169 2009-10-12  Pavel Feldman  <pfeldman@chromium.org>
2170
2171         Reviewed by Timothy Hatcher.
2172
2173         Web Inspector: Enforce async interaction between inspector controller and frontend.
2174
2175         https://bugs.webkit.org/show_bug.cgi?id=30300
2176
2177         * inspector/front-end/inspector.js:
2178         (WebInspector.dispatch.delayDispatch):
2179         (WebInspector.dispatch):
2180
2181 2009-10-12  Xiaomei Ji  <xji@chromium.org>
2182
2183         Reviewed by Sam Weinig.
2184
2185         Fix issue caretRangeFromPoint() returns wrong result for a zoomed and 
2186         scrolled page.
2187         https://bugs.webkit.org/show_bug.cgi?id=30034
2188
2189         * dom/Document.cpp:
2190         (WebCore::Document::elementFromPoint): calculate the correct point 
2191         relative to document when the page is zoomed and scrolled.
2192         (WebCore::Document::caretRangeFromPoint): calculate the correct point 
2193         relative to document when the page is zoomed and scrolled.
2194
2195 2009-10-12  Fumitoshi Ukai  <ukai@chromium.org>
2196
2197         Reviewed by Sam Weinig.
2198
2199         JavaScript bindings of WebSocket addEventListener/removeEventListener
2200         https://bugs.webkit.org/show_bug.cgi?id=29841
2201
2202         Test: fast/websockets/websocket-event-target.html
2203
2204         * bindings/js/JSWebSocketCustom.cpp:
2205         (WebCore::JSWebSocket::addEventListener):
2206         (WebCore::JSWebSocket::removeEventListener):
2207         * bindings/v8/custom/V8CustomBinding.h:
2208         * bindings/v8/custom/V8WebSocketCustom.cpp:
2209         (WebCore::CALLBACK_FUNC_DECL):
2210         * websockets/WebSocket.idl:
2211
2212 2009-10-12  Sam Weinig  <sam@webkit.org>
2213
2214         Reviewed by Darin Adler.
2215
2216         Fix for https://bugs.webkit.org/show_bug.cgi?id=29078
2217         <rdar://problem/7288221>
2218
2219         Add a mechanism to blacklist certain codecs.  Initially, just blacklist UTF-7 as HTML5 encourages.
2220
2221         * platform/text/TextEncodingRegistry.cpp:
2222         (WebCore::pruneBlacklistedCodecs):
2223         (WebCore::buildBaseTextCodecMaps):
2224         (WebCore::extendTextCodecMaps):
2225
2226 2009-10-09  Dave Hyatt  <hyatt@apple.com>
2227
2228         Reviewed by Darin Adler.
2229
2230         Add support for the beforeload event to frames.  Complete support of the beforeload event by making sure
2231         its wrapper gets properly constructed (so that the URL field of the event can be accessed).  Add support
2232         for the Objective-C wrapper class as well.
2233
2234         Added fast/dom/beforeload/frame-before-load.html
2235
2236         * WebCore.xcodeproj/project.pbxproj:
2237         * bindings/js/JSEventCustom.cpp:
2238         (WebCore::toJS):
2239         * bindings/objc/DOMEvents.mm:
2240         (kitClass):
2241         * dom/BeforeLoadEvent.h:
2242         (WebCore::BeforeLoadEvent::isBeforeLoadEvent):
2243         * dom/Event.cpp:
2244         (WebCore::Event::isBeforeLoadEvent):
2245         * dom/Event.h:
2246         * html/HTMLFrameElementBase.cpp:
2247         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
2248         * loader/FrameLoader.cpp:
2249         (WebCore::FrameLoader::loadWithDocumentLoader):
2250
2251 2009-10-12  Dan Bernstein  <mitz@apple.com>
2252
2253         Reviewed by Simon Fraser.
2254
2255         Fix <rdar://problem/7094146> Reproducible crash at
2256         RenderObject::localToAbsolute()
2257
2258         Test: fast/dynamic/position-absolute-to-fixed-crash.html
2259
2260         The crash was caused by stale positioned objects lists following an
2261         object transitioning from being absolutely position to being fixed
2262         positioned.
2263
2264         * rendering/RenderBox.cpp:
2265         (WebCore::RenderBox::styleWillChange): In case of a transition between
2266         absolute and fixed position, mark the parent as having a child needing
2267         layout, so that this object will get inserted into its new container's
2268         positioned objects list.
2269         * rendering/RenderObject.cpp:
2270         (WebCore::RenderObject::styleWillChange): Changed a condition to cover
2271         this transition, so that this object gets removed from its current
2272         container's positioned objects list.
2273
2274 2009-10-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2275
2276         Reviewed by Simon Hausmann.
2277
2278         Add a palette() method that is needed by our RenderTheme.
2279
2280         * platform/qt/QWebPageClient.h:
2281
2282 2009-10-12  Dirk Schulze  <krit@webkit.org>
2283
2284         Reviewed by Nikolas Zimmermann.
2285
2286         SVG Gradients can't handle percentage values in userSpaceOnUse mode
2287         [https://bugs.webkit.org/show_bug.cgi?id=30286]
2288
2289         Fixed *GradientAttributes to take SVGLength instead of double. This casues
2290         the problem, that we can't calculate the correct size of a gradient on
2291         userSpaceOnUse mode with percentage values.
2292
2293         Test: svg/custom/gradient-userSpaceOnUse-with-percentage.svg
2294
2295         * svg/LinearGradientAttributes.h:
2296         (WebCore::LinearGradientAttributes::LinearGradientAttributes):
2297         (WebCore::LinearGradientAttributes::x1):
2298         (WebCore::LinearGradientAttributes::y1):
2299         (WebCore::LinearGradientAttributes::x2):
2300         (WebCore::LinearGradientAttributes::y2):
2301         (WebCore::LinearGradientAttributes::setX1):
2302         (WebCore::LinearGradientAttributes::setY1):
2303         (WebCore::LinearGradientAttributes::setX2):
2304         (WebCore::LinearGradientAttributes::setY2):
2305         * svg/RadialGradientAttributes.h:
2306         (WebCore::RadialGradientAttributes::RadialGradientAttributes):
2307         (WebCore::RadialGradientAttributes::cx):
2308         (WebCore::RadialGradientAttributes::cy):
2309         (WebCore::RadialGradientAttributes::r):
2310         (WebCore::RadialGradientAttributes::fx):
2311         (WebCore::RadialGradientAttributes::fy):
2312         (WebCore::RadialGradientAttributes::setCx):
2313         (WebCore::RadialGradientAttributes::setCy):
2314         (WebCore::RadialGradientAttributes::setR):
2315         (WebCore::RadialGradientAttributes::setFx):
2316         (WebCore::RadialGradientAttributes::setFy):
2317         * svg/SVGLinearGradientElement.cpp:
2318         (WebCore::SVGLinearGradientElement::buildGradient):
2319         (WebCore::SVGLinearGradientElement::collectGradientProperties):
2320         * svg/SVGRadialGradientElement.cpp:
2321         (WebCore::SVGRadialGradientElement::buildGradient):
2322         (WebCore::SVGRadialGradientElement::collectGradientProperties):
2323
2324 2009-10-12  Brian Weinstein  <bweinstein@apple.com>
2325
2326         Reviewed by Timothy Hatcher.
2327
2328         Fixes <http://webkit.org/b/30315>.
2329         Web Inspector: DOM Content and Load lines in Resources are unclear what they mean.
2330         
2331         Add tooltip text to the Load event and DOM Content event lines through
2332         a new layer that allows these lines to be on top of the view.
2333
2334         * inspector/front-end/ResourcesPanel.js:
2335         (WebInspector.ResourcesPanel.prototype._updateGraphDividersIfNeeded):
2336         (WebInspector.ResourcesPanel.prototype._updateDividersLabelBarPosition):
2337         * inspector/front-end/inspector.css:
2338
2339 2009-10-12  Dimitri Glazkov  <dglazkov@chromium.org>
2340
2341         No review, rolling out r49429, because it broke layout tests.
2342         http://trac.webkit.org/changeset/49429
2343
2344         * bindings/v8/V8AbstractEventListener.cpp:
2345         (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
2346
2347 2009-10-12  Dirk Schulze  <krit@webkit.org>
2348
2349         Reviewed by Eric Seidel.
2350
2351         SVG - crash on feMerge when input not available
2352         [https://bugs.webkit.org/show_bug.cgi?id=30297]
2353
2354         Make a early return in SVGFEMergeElement if the needed
2355         filter effect doesn't exist.
2356
2357         Test: svg/filters/feMerge-wrong-input.svg
2358
2359         * svg/SVGFEMergeElement.cpp:
2360         (WebCore::SVGFEMergeElement::build):
2361
2362 2009-10-12  Chris Marrin  <cmarrin@apple.com>
2363
2364         Reviewed by Oliver Hunt.
2365
2366         Added automatic flush before compositing
2367         https://bugs.webkit.org/show_bug.cgi?id=30236
2368
2369         This causes image to always render correctly. In writing a testcase
2370         I needed to implement readPixels. This exposed a bug in reading back
2371         values from a CanvasArray subclass, so I fixed that as well. Now when
2372         you wrap a CanvasArray in a JSValue it actually wraps the specific
2373         subclass. To do this I need to add virtual methods to each CanvasArray
2374         subclass to determine the type and a custom toJS method for CanvasArray
2375         to create the proper wrapper. 
2376
2377         Test: fast/canvas/webgl/triangle.html
2378
2379         * WebCore.xcodeproj/project.pbxproj:
2380         * bindings/js/JSCanvasArrayCustom.cpp:
2381         (WebCore::toJS):
2382         * html/canvas/CanvasArray.h:
2383         (WebCore::CanvasArray::isByteArray):
2384         (WebCore::CanvasArray::isUnsignedByteArray):
2385         (WebCore::CanvasArray::isShortArray):
2386         (WebCore::CanvasArray::isUnsignedShortArray):
2387         (WebCore::CanvasArray::isIntArray):
2388         (WebCore::CanvasArray::isUnsignedIntArray):
2389         (WebCore::CanvasArray::isFloatArray):
2390         * html/canvas/CanvasArray.idl:
2391         * html/canvas/CanvasByteArray.h:
2392         (WebCore::CanvasByteArray::isByteArray):
2393         * html/canvas/CanvasFloatArray.h:
2394         (WebCore::CanvasFloatArray::isFloatArray):
2395         * html/canvas/CanvasIntArray.h:
2396         (WebCore::CanvasIntArray::isIntArray):
2397         * html/canvas/CanvasRenderingContext3D.cpp:
2398         (WebCore::CanvasRenderingContext3D::readPixels):
2399         * html/canvas/CanvasRenderingContext3D.h:
2400         * html/canvas/CanvasRenderingContext3D.idl:
2401         * html/canvas/CanvasShortArray.h:
2402         (WebCore::CanvasShortArray::isShortArray):
2403         * html/canvas/CanvasUnsignedByteArray.h:
2404         (WebCore::CanvasUnsignedByteArray::isUnsignedByteArray):
2405         * html/canvas/CanvasUnsignedIntArray.h:
2406         (WebCore::CanvasUnsignedIntArray::isUnsignedIntArray):
2407         * html/canvas/CanvasUnsignedShortArray.h:
2408         (WebCore::CanvasUnsignedShortArray::isUnsignedShortArray):
2409         * platform/graphics/GraphicsContext3D.h:
2410         * platform/graphics/mac/Canvas3DLayer.mm:
2411         (-[Canvas3DLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]):
2412         * platform/graphics/mac/GraphicsContext3DMac.cpp:
2413         (WebCore::GraphicsContext3D::readPixels):
2414
2415 2009-10-12  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
2416
2417         Reviewed by Gustavo Noronha.
2418
2419         https://bugs.webkit.org/show_bug.cgi?id=30307
2420         
2421         Fix 0 sentinel for g_object_set() function call.
2422
2423         * platform/graphics/gtk/DataSourceGStreamer.cpp:
2424         (webkit_data_src_uri_set_uri):
2425         0 is passed as 32 bit value on x86-64 in vararg functions, but
2426         g_object_set() expects a 64 bit 0. This will cause crashes.
2427
2428 2009-10-12  Cameron McCormack  <cam@mcc.id.au>
2429
2430         Reviewed by Eric Seidel.
2431
2432         Drop in="" from <feFlood>
2433         https://bugs.webkit.org/show_bug.cgi?id=29001
2434
2435         This makes <feFlood in="bogus"> have an effect, too.
2436
2437         http://www.w3.org/2003/01/REC-SVG11-20030114-errata#feflood-attribute
2438
2439         Test: svg/dom/feFlood-no-in1.html
2440
2441         * svg/SVGFEFloodElement.cpp:
2442         (WebCore::SVGFEFloodElement::SVGFEFloodElement):
2443         (WebCore::SVGFEFloodElement::build):
2444         * svg/SVGFEFloodElement.h:
2445         * svg/SVGFEFloodElement.idl:
2446         * svg/graphics/filters/SVGFEFlood.cpp:
2447         (WebCore::FEFlood::FEFlood):
2448         (WebCore::FEFlood::create):
2449         * svg/graphics/filters/SVGFEFlood.h:
2450
2451 2009-10-12  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
2452
2453         Reviewed by Gustavo Noronha.
2454
2455         https://bugs.webkit.org/show_bug.cgi?id=29998
2456         
2457         Scale video to completely fill the target surface while
2458         keeping the aspect ratio. This fixes displaying of the
2459         YouTube HTML5 sample website.
2460
2461         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2462         Scale video to completely fill the target surface, keep
2463         the aspect ratio and center it.
2464
2465 2009-10-12  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
2466
2467         Reviewed by Gustavo Noronha.
2468
2469         https://bugs.webkit.org/show_bug.cgi?id=29997
2470         
2471         Fixes double memcpy of all rendered video frames.
2472
2473         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2474         (WebCore::mediaPlayerPrivateRepaintCallback):
2475         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2476         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2477         (WebCore::MediaPlayerPrivate::duration):
2478         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
2479         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
2480         (webkit_video_sink_timeout_func):
2481         (webkit_video_sink_dispose):
2482         (unlock_buffer_mutex):
2483         (webkit_video_sink_unlock):
2484         (marshal_VOID__MINIOBJECT):
2485         (webkit_video_sink_class_init):
2486         (webkit_video_sink_new):
2487         * platform/graphics/gtk/VideoSinkGStreamer.h:
2488         Directly pass the buffers up to the MediaPlayerPrivate::paint()
2489         method instead of rendering them first to an intermediate cairo
2490         surface. This should increase performance and peak memory usage.
2491
2492 2009-10-11  Daniel Bates  <dbates@webkit.org>
2493
2494         Reviewed by Adam Barth.
2495
2496         https://bugs.webkit.org/show_bug.cgi?id=30242
2497         
2498         Fixes an issue where JavaScript URLs that are URL-encoded twice can 
2499         bypass the XSSAuditor.
2500         
2501         JavaScript URLs that are completed by method Document::completeURL have added
2502         URL-encoded characters such that a direct comparison with the URL-decoded 
2503         outgoing HTTP parameters is not sufficient. Instead, the URL-decoded outgoing 
2504         HTTP parameters must be URL-decoded before comparison.
2505
2506         Tests: http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode.html
2507                http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode2.html
2508                http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode3.html
2509
2510         * bindings/ScriptControllerBase.cpp:
2511         (WebCore::ScriptController::executeIfJavaScriptURL): Modified to pass XSSAuditor
2512         the URL-decoded source code for the JavaScript URL.
2513         * page/XSSAuditor.cpp:
2514         (WebCore::isIllegalURICharacter): Minor syntactical change to the comment.
2515         (WebCore::XSSAuditor::CachingURLCanonicalizer::canonicalizeURL): Added 
2516         parameter decodeURLEscapeSequencesTwice.
2517         (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
2518         (WebCore::XSSAuditor::decodeURL): Ditto.
2519         (WebCore::XSSAuditor::findInRequest): Ditto.
2520         * page/XSSAuditor.h:
2521         (WebCore::XSSAuditor::CachingURLCanonicalizer::CachingURLCanonicalizer): Ditto.
2522
2523 2009-10-11  Dominic Cooney  <dominicc@google.com>
2524
2525         Reviewed by Adam Barth.
2526
2527         Fixes a build break in the V8 bindings caused by revision 49420.
2528         https://bugs.webkit.org/show_bug.cgi?id=30294
2529
2530         Revision 49420 introduces an IDL-defined CanvasActiveInfo
2531         type. This causes a build break in the V8 bindings where
2532         CanvasGraphicsContext3D naively refers to CanvasActiveInfo as a
2533         non-ref type.
2534
2535         * WebCore.gypi: Include CanvasActiveInfo.idl in build.
2536         * bindings/scripts/CodeGeneratorV8.pm: CanvasActiveInfo is a ref
2537           ptr type.
2538         * bindings/v8/DOMObjectsInclude.h: Include generated
2539           CanvasActiveInfo files.
2540         * bindings/v8/DerivedSourcesAllInOne.cpp:
2541         * bindings/v8/V8Index.cpp:
2542         * bindings/v8/V8Index.h:
2543
2544 2009-10-11  Collin Jackson  <collinj@webkit.org>
2545
2546         Reviewed by Adam Barth.
2547
2548         Log mixed content warnings to console
2549
2550         https://bugs.webkit.org/show_bug.cgi?id=30290
2551
2552         * loader/FrameLoader.cpp:
2553         (WebCore::FrameLoader::checkIfDisplayInsecureContent):
2554         (WebCore::FrameLoader::checkIfRunInsecureContent):
2555
2556 2009-10-11  Søren Gjesse  <sgjesse@chromium.org>
2557
2558         Reviewed by Adam Barth.
2559
2560         [V8] Add a context scope in JS listener destructor. The destructor code uses the cotext. See http://crbug.com/24200.
2561         https://bugs.webkit.org/show_bug.cgi?id=30250
2562
2563         * bindings/v8/V8AbstractEventListener.cpp:
2564         (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
2565
2566 2009-10-11  Lyon Chen  <lyon.chen@torchmobile.com>
2567
2568         Reviewed by Alexey Proskuryakov.
2569
2570         Correct the position of #endif sentence inside WebCore::Document::finishedParsing().
2571
2572         https://bugs.webkit.org/show_bug.cgi?id=30244
2573
2574         This change requires no test case as it fix a compiling error.
2575
2576         * dom/Document.cpp:
2577         (WebCore::Document::finishedParsing):
2578
2579 2009-10-11  Dominic Cooney  <dominicc@google.com>
2580
2581         Reviewed by Adam Barth.
2582
2583         Sets a 500K stack limit for JavaScript workers in Chromium.
2584         https://bugs.webkit.org/show_bug.cgi?id=29797
2585
2586         Runaway recursion in JavaScript workers crashes the Chromium
2587         worker process on OS X. This is because V8's default stack limit
2588         is 512K on ia32 or 1M on x64, but the worker process runs workers
2589         on a thread with the OS X default stack size--512K. Because there
2590         are already some C+frames on the stack when V8 establishes its
2591         512K default stack limit, and V8 doesn't precisely enforce the
2592         stack limit, runaway recursion in V8 workers overflows the OS
2593         stack and segfaults, killing the worker process. This is described
2594         in Chromium bug 21653 <http://crbug.com/21653>.
2595
2596         This patch sets the V8 stack limit for worker JavaScript in
2597         Chromium to a more conservative 500K on all platforms. This allows
2598         some "headroom" for the C+stack in use when the limit is set up,
2599         and some "legroom" for the V8 helper functions which in practice
2600         briefly flout the V8 stack limit.
2601
2602         Test: LayoutTests/fast/workers/use-machine-stack.html
2603
2604         * bindings/v8/WorkerContextExecutionProxy.cpp:
2605         (WebCore::WorkerContextExecutionProxy::initV8IfNeeded):
2606         * bindings/v8/WorkerContextExecutionProxy.h:
2607
2608 2009-10-11  Kevin Ollivier  <kevino@theolliviers.com>
2609
2610         wx build fix for wxMac 2.9, use wxGC API for measuring text.
2611
2612         * platform/wx/wxcode/mac/carbon/fontprops.cpp:
2613         (GetTextExtent):
2614
2615 2009-10-10  Cameron McCormack  <cam@mcc.id.au>
2616
2617         Reviewed by Sam Weinig.
2618
2619         Allow [Reflect] on SVG elements.
2620         https://bugs.webkit.org/show_bug.cgi?id=28936
2621
2622         Update the JS binding generators to reference SVGNames instead of
2623         HTMLNames, if [Reflect]ing an attribute on an SVG element.  Make
2624         SVGElement::id use [Reflect].
2625
2626         Also make [Reflect] on an attribute with a setter exception work in ObjC
2627         bindings.
2628
2629         Test: svg/dom/id-reflect.html
2630
2631         * bindings/scripts/CodeGenerator.pm: Add a function to determine the
2632         appropriate C+namespace for attribute name constants.
2633         * bindings/scripts/CodeGeneratorObjC.pm: Generate ExceptionCode handling
2634         code for [Reflect] on an attribute with a setter exception.
2635         * bindings/scripts/CodeGeneratorCOM.pm: Generate "SVGNames" instead of
2636         "HTMLNames" when appropriate.
2637         * bindings/scripts/CodeGeneratorJS.pm: Ditto.
2638         * bindings/scripts/CodeGeneratorV8.pm: Ditto.
2639         * svg/SVGElement.cpp: Remove getter and setter methods for id.
2640         * svg/SVGElement.h: Ditto.
2641         * svg/SVGElement.idl: Add [Reflect] to id.
2642
2643 2009-10-10  Oliver Hunt  <oliver@apple.com>
2644
2645         Fix paths in xcode.
2646
2647         * WebCore.xcodeproj/project.pbxproj:
2648
2649 2009-10-10  Oliver Hunt  <oliver@apple.com>
2650
2651         Reviewed by Eric Carlson.
2652
2653         Implement getActiveAttrib and getActiveUniform
2654         https://bugs.webkit.org/show_bug.cgi?id=30276
2655
2656         Implements the getActiveAttrib and getActiveUniform APIs.
2657         Rather simple patch, adds CanvasActiveInfo definition and implementation
2658         and adds forwarding to the GraphicsContext3D.
2659
2660         Test: fast/canvas/webgl/getActiveTest.html
2661
2662         * DerivedSources.make:
2663         * WebCore.xcodeproj/project.pbxproj:
2664         * html/canvas/CanvasActiveInfo.h: Added.
2665         (WebCore::CanvasActiveInfo::create):
2666         (WebCore::CanvasActiveInfo::name):
2667         (WebCore::CanvasActiveInfo::type):
2668         (WebCore::CanvasActiveInfo::size):
2669         (WebCore::CanvasActiveInfo::CanvasActiveInfo):
2670         * html/canvas/CanvasActiveInfo.idl: Added.
2671         * html/canvas/CanvasObject.h:
2672         (WebCore::CanvasObject::context):
2673           Need to make the context public as it is needed to ensure we don't
2674           provide a program from one context as an argument to another.
2675         * html/canvas/CanvasRenderingContext3D.cpp:
2676         (WebCore::CanvasRenderingContext3D::getActiveAttrib):
2677         (WebCore::CanvasRenderingContext3D::getActiveUniform):
2678         * html/canvas/CanvasRenderingContext3D.h:
2679         * html/canvas/CanvasRenderingContext3D.idl:
2680         * platform/graphics/GraphicsContext3D.h:
2681         * platform/graphics/mac/GraphicsContext3DMac.cpp:
2682         (WebCore::GraphicsContext3D::getActiveAttrib):
2683         (WebCore::GraphicsContext3D::getActiveUniform):
2684
2685 2009-10-10  Pavel Feldman  <pfeldman@chromium.org>
2686
2687         Reviewed by Timothy Hatcher.
2688
2689         Web Inspector: Adding new attributes in Element Panel is
2690         counterintuitive.
2691
2692         https://bugs.webkit.org/show_bug.cgi?id=30057
2693
2694         * inspector/front-end/ElementsTreeOutline.js:
2695         (WebInspector.ElementsTreeOutline.prototype._onmousemove):
2696         (WebInspector.ElementsTreeElement.prototype.set hovered):
2697         (WebInspector.ElementsTreeElement.prototype.toggleNewAttributeButton):
2698
2699 2009-10-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2700
2701         Reviewed by Holger Freyther.
2702
2703         Build fix if Netscape plugin support is turned off
2704         https://bugs.webkit.org/show_bug.cgi?id=30275
2705
2706         In addition to fixing the build break with guards
2707         remove notImplemented() from PluginViewNone.cpp and
2708         make them just just be empty functions.
2709
2710         * plugins/PluginView.cpp:
2711         (WebCore::PluginView::handleEvent):
2712         (WebCore::PluginView::PluginView):
2713         * plugins/PluginView.h:
2714         * plugins/PluginViewNone.cpp:
2715         (WebCore::PluginView::setFocus):
2716         (WebCore::PluginView::show):
2717         (WebCore::PluginView::hide):
2718         (WebCore::PluginView::paint):
2719         (WebCore::PluginView::handleKeyboardEvent):
2720         (WebCore::PluginView::handleMouseEvent):
2721         (WebCore::PluginView::setParent):
2722         (WebCore::PluginView::setNPWindowRect):
2723         (WebCore::PluginView::handlePostReadFile):
2724         (WebCore::PluginView::getValue):
2725         (WebCore::PluginView::getValueStatic):
2726         (WebCore::PluginView::invalidateRect):
2727         (WebCore::PluginView::invalidateRegion):
2728         (WebCore::PluginView::forceRedraw):
2729         (WebCore::PluginView::platformStart):
2730         (WebCore::PluginView::platformDestroy):
2731         (WebCore::PluginView::setParentVisible):
2732         (WebCore::PluginView::updatePluginWidget):
2733
2734 2009-10-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2735
2736         Unreviewed.
2737
2738         [Qt] Build fix for QtWebKit after r49415.
2739
2740         Add HistoryController.cpp to the build.
2741
2742         * WebCore.pro:
2743
2744 2009-10-09  Darin Fisher  <darin@chromium.org>
2745
2746         Reviewed by Eric Seidel.
2747
2748         [Chromium] KURLGoogle's protocolIs barfs on input containing hyphens
2749         https://bugs.webkit.org/show_bug.cgi?id=30262
2750
2751         This is not testable from WebKit since WebKit never uses the member
2752         function form of protocolIs with input that can be controlled from a
2753         web page.  It always passes string literals lacking hyphens.
2754
2755         * platform/KURLGoogle.cpp:
2756         (WebCore::lowerCaseEqualsASCII): Only assert if toASCIILower would
2757         transform the input character.
2758
2759 2009-10-10  Adam Barth  <abarth@webkit.org>
2760
2761         Reviewed by Oliver Hunt.
2762
2763         Move HistoryController to its own file
2764         https://bugs.webkit.org/show_bug.cgi?id=30272
2765
2766         Purely mechanical.
2767
2768         * GNUmakefile.am:
2769         * WebCore.gypi:
2770         * WebCore.vcproj/WebCore.vcproj:
2771         * WebCore.xcodeproj/project.pbxproj:
2772         * WebCoreSources.bkl:
2773         * loader/FrameLoader.cpp:
2774         * loader/FrameLoader.h:
2775         * loader/HistoryController.cpp: Added.
2776         * loader/HistoryController.h: Added.
2777
2778 2009-10-09  Ryosuke Niwa  <rniwa@webkit.org>
2779
2780         Reviewed by Eric Seidel.
2781
2782         ApplyStyleCommand removes presentational tags even when not necessary
2783         https://bugs.webkit.org/show_bug.cgi?id=28091
2784
2785         This patch updates implicitlyStyledElementShouldBeRemovedWhenApplyingStyle to return true
2786         (triggering removal of tag) only if the style implicitly added by the element is not present in
2787         the new style to apply. It also changes surroundNodeRangeWithElement so that it merges the
2788         surrounding element when possible. applyTextDecorationStyle is modified so that it does not add
2789         style span when the style attribute is empty.
2790
2791         Test: editing/execCommand/toggle-style-3.html
2792
2793         * editing/ApplyStyleCommand.cpp:
2794         (WebCore::ApplyStyleCommand::shouldRemoveTextDecorationTag): Returns true if specified text
2795         decoration is not present in the style to apply
2796         (WebCore::ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle): No longer
2797         returns true if the tag is used in new style
2798         (WebCore::ApplyStyleCommand::applyTextDecorationStyle): Does not add style-span when redundant
2799         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Merges the newly created element
2800         with the surrounding identical elements
2801         * editing/ApplyStyleCommand.h:
2802
2803 2009-10-09  Adam Barth  <abarth@webkit.org>
2804
2805         Reviewed by Darin Adler.
2806
2807         Factor HistoryController out of FrameLoader
2808         https://bugs.webkit.org/show_bug.cgi?id=30246
2809
2810         HistoryController is in charge of managing the current / previous /
2811         provisional HistoryItems.  The split isn't perfect, but it's a place to
2812         start.  I'll move HistoryController into its own file in another patch.
2813
2814         * WebCore.base.exp:
2815         * loader/FrameLoader.cpp:
2816         (WebCore::HistoryController::HistoryController):
2817         (WebCore::HistoryController::~HistoryController):
2818         (WebCore::FrameLoader::FrameLoader):
2819         (WebCore::FrameLoader::closeURL):
2820         (WebCore::FrameLoader::begin):
2821         (WebCore::HistoryController::restoreDocumentState):
2822         (WebCore::HistoryController::setCurrentItem):
2823         (WebCore::HistoryController::setProvisionalItem):
2824         (WebCore::FrameLoader::loadURLIntoChildFrame):
2825         (WebCore::FrameLoader::canCachePageContainingThisFrame):
2826         (WebCore::FrameLoader::logCanCacheFrameDecision):
2827         (WebCore::FrameLoader::scrollToAnchor):
2828         (WebCore::FrameLoader::commitProvisionalLoad):
2829         (WebCore::FrameLoader::transitionToCommitted):
2830         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2831         (WebCore::FrameLoader::didFirstLayout):
2832         (WebCore::HistoryController::updateForFrameLoadCompleted):
2833         (WebCore::FrameLoader::frameLoadCompleted):
2834         (WebCore::FrameLoader::detachFromParent):
2835         (WebCore::FrameLoader::receivedMainResourceError):
2836         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
2837         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2838         (WebCore::HistoryController::addHistoryItemForFragmentScroll):
2839         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
2840         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
2841         (WebCore::HistoryController::createHistoryItem):
2842         (WebCore::FrameLoader::checkDidPerformFirstNavigation):
2843         (WebCore::HistoryController::addBackForwardItemClippedAtTarget):
2844         (WebCore::HistoryController::createHistoryItemTree):
2845         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
2846         (WebCore::HistoryController::restoreScrollPositionAndViewState):
2847         (WebCore::HistoryController::invalidateCurrentItemCachedPage):
2848         (WebCore::HistoryController::saveDocumentState):
2849         (WebCore::FrameLoader::loadItem):
2850         (WebCore::HistoryController::urlsMatchItem):
2851         (WebCore::HistoryController::goToItem):
2852         (WebCore::HistoryController::recursiveGoToItem):
2853         (WebCore::HistoryController::childFramesMatchItem):
2854         (WebCore::HistoryController::updateForStandardLoad):
2855         (WebCore::HistoryController::updateForClientRedirect):
2856         (WebCore::HistoryController::updateForBackForwardNavigation):
2857         (WebCore::HistoryController::updateForReload):
2858         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
2859         (WebCore::HistoryController::updateForCommit):
2860         (WebCore::HistoryController::updateForAnchorScroll):
2861         (WebCore::HistoryController::saveDocumentAndScrollState):
2862         (WebCore::HistoryController::setCurrentItemTitle):
2863         (WebCore::FrameLoader::didChangeTitle):
2864         * loader/FrameLoader.h:
2865         (WebCore::HistoryController::current):
2866         (WebCore::HistoryController::provisional):
2867         (WebCore::FrameLoader::policyChecker):
2868         (WebCore::FrameLoader::history):
2869         (WebCore::FrameLoader::creatingInitialEmptyDocument):
2870         * page/Page.cpp:
2871         (WebCore::Page::goToItem):
2872
2873 2009-10-09  Alexey Proskuryakov  <ap@apple.com>
2874
2875         Unreviewed - fixing an obvious typo in my previous check-in.
2876
2877         https://bugs.webkit.org/show_bug.cgi?id=30260
2878         <rdar://problem/6447115> REGRESSION: Logging out from SAP doesn't work
2879
2880         Fixes existing tests (which I thought I had run the previous time).
2881
2882         * platform/network/CredentialStorage.cpp: (WebCore::originsWithCredentials): Return the
2883         set by reference.
2884
2885 2009-10-09  David Levin  <levin@chromium.org>
2886
2887         Reviewed by Eric Seidel.
2888
2889         [v8] Need change to V8WorkerContextEventListener::reportError signature to match the base class.
2890         https://bugs.webkit.org/show_bug.cgi?id=30264
2891
2892         The base class method changed in r48884.
2893
2894         Test: fast/worker/worker-script-error.html
2895
2896         * bindings/v8/V8WorkerContextEventListener.cpp:
2897         (WebCore::V8WorkerContextEventListener::reportError):
2898         * bindings/v8/V8WorkerContextEventListener.h:
2899
2900 2009-10-09  Alexey Proskuryakov  <ap@apple.com>
2901
2902         Reviewed by Brady Eidson.
2903
2904         https://bugs.webkit.org/show_bug.cgi?id=30260
2905         <rdar://problem/6447115> REGRESSION: Logging out from SAP doesn't work
2906
2907         Tests: http/tests/xmlhttprequest/logout.html
2908                http/tests/xmlhttprequest/re-login-async.html
2909                http/tests/xmlhttprequest/re-login.html
2910
2911         Fix several issues with existing credential handling code.
2912
2913         * platform/network/CredentialStorage.cpp:
2914         (WebCore::pathToDefaultProtectionSpaceMap): Changed the data structure to a simpler one.
2915         (WebCore::originsWithCredentials): The reason for two-stage lookup above was that we didn't
2916         want to iterate paths for origins that never had credentials associated with them. Changed
2917         to use a separate HashSet for this.
2918         (WebCore::pathToDefaultProtectionSpaceMap): The concept of default per-path credentials didn't
2919         match the spec very well. UAs are supposed to deduce protection space from an URL, and then
2920         use whichever credentials are known for this protection space. So, OriginToDefaultBasicCredentialMap
2921         is now PathToDefaultProtectionSpaceMap.
2922         (WebCore::protectionSpaceMapKeyFromURL): Factored out a helper that extracts a directory
2923         URL from a given URL. These directory URLs are what we use as keys in PathToDefaultProtectionSpaceMap.
2924         (WebCore::CredentialStorage::set): Updated for above changes.
2925         (WebCore::findDefaultProtectionSpaceForURL): Factored out code iterating path length to find
2926         a prefix in OriginToDefaultBasicCredentialMap.
2927         (WebCore::CredentialStorage::set): Another version of set() can update credentials for a
2928         URL default protection space. It does nothing if the given URL doesn't correspond to a known
2929         protection space.
2930         (WebCore::CredentialStorage::get): Renamed from getDefaultAuthenticationCredential.
2931
2932         * platform/network/CredentialStorage.h: Made the distinction between methods that use a known
2933         protection space and those that deduce one from URL more clear.
2934
2935         * platform/network/mac/ResourceHandleMac.mm:
2936         (WebCore::ResourceHandle::start): Update credentials before starting the request for real.
2937         This makes the following pattern work:
2938           var req = new XMLHttpRequest("GET", "logout.html", "logout", "logout"); // wrong credentials
2939           req.send("");
2940           req.abort();
2941         Abort() is used here to avoid having UA present an auth dialog after getting a 401 response.
2942         Note that one cannot log in using the same method, because there isn't a known protection
2943         space for the URL yet in that case, so the added code has no effect.
2944         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Use a correct persistence for
2945         calling receivedCredential(). This fixes logging in using an async XHR (withut abort(), of
2946         course), and matches sync case.
2947         (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]):
2948         Renamed getDefaultAuthenticationCredential() to get().
2949
2950         * platform/network/cf/ResourceHandleCFNet.cpp:
2951         (WebCore::ResourceHandle::start):
2952         (WebCore::WebCoreSynchronousLoader::load):
2953         Same changes as in Mac code.
2954
2955 2009-10-09  Enrica Casucci  <enrica@apple.com>
2956
2957         Reviewed by Adele Peterson.
2958
2959         Undoing a indent removes text instead of it's formatting.
2960         <rdar://problem/7169206>
2961         https://bugs.webkit.org/show_bug.cgi?id=28722
2962         Restored the behavior prior to http://trac.webkit.org/changeset/46143. This change implemented the
2963         indent command making simple DOM operation, without using moveParagraph which cause undo to be broken.
2964         
2965         Added editing/undo/undo-indent.html test.
2966
2967         * editing/IndentOutdentCommand.cpp:
2968         (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion): Restored. 
2969         (WebCore::IndentOutdentCommand::tryIndentingAsListItem): Merged changes.
2970         (WebCore::IndentOutdentCommand::indentIntoBlockquote): Restored.
2971         (WebCore::IndentOutdentCommand::indentRegion): Restored and added call to updateLayout to
2972         ensure TextIterator could correctly calculate the position starting from the index.
2973         * editing/IndentOutdentCommand.h: Restored.
2974
2975 2009-10-09  Jens Alfke  <snej@chromium.org>
2976
2977         Reviewed by Darin Adler.
2978         
2979         Optimization: Many StringImpl transformations are no-ops and should just return 'this'
2980         https://bugs.webkit.org/show_bug.cgi?id=30186
2981
2982         Optimized StringImpl methods lower(), stripWhiteSpace() and simplifyWhiteSpace() to
2983         detect no-ops and return this instead of creating a new instance.
2984         Empirical testing shows that the majority of calls to these methods are no-ops, making
2985         this worthwhile even if (in the case of lower()) the non-no-op case is slightly slowed.
2986         Upper() is very rarely a no-op, so it wasn't worthwhile to optimize it.
2987
2988         * platform/text/StringImpl.cpp:
2989         (WebCore::StringImpl::lower):
2990         (WebCore::StringImpl::upper): Just add a comment explaining why this wasn't optimized
2991         (WebCore::StringImpl::stripWhiteSpace):
2992         (WebCore::StringImpl::simplifyWhiteSpace):
2993
2994 2009-10-09  Dirk Schulze  <krit@webkit.org>
2995
2996         Reviewed by Oliver Hunt.
2997
2998         SVG Filter feGaussianBlur implementation is missing
2999         [https://bugs.webkit.org/show_bug.cgi?id=28141]
3000
3001         This is the implementation of GaussianBlur filter for SVG.
3002
3003         There is already a test for feGaussianBlur
3004         Test: svg/W3C-SVG-1.1/filters-gauss-01-b-w3c.svg 
3005
3006         Test: svg/filters/feGaussianBlur.svg
3007
3008         * platform/graphics/filters/FilterEffect.cpp:
3009         (WebCore::FilterEffect::FilterEffect):
3010         * platform/graphics/filters/FilterEffect.h:
3011         (WebCore::FilterEffect::isAlphaImage):
3012         (WebCore::FilterEffect::setIsAlphaImage):
3013         * platform/graphics/filters/SourceAlpha.cpp:
3014         (WebCore::SourceAlpha::apply):
3015         * svg/graphics/filters/SVGFEGaussianBlur.cpp:
3016         (WebCore::boxBlur):
3017         (WebCore::FEGaussianBlur::apply):
3018
3019 2009-10-09  Philippe Normand  <pnormand@igalia.com>
3020
3021         Reviewed by Gustavo Noronha.
3022
3023         [GTK] QoS support in the video sink
3024         https://bugs.webkit.org/show_bug.cgi?id=29959
3025
3026         Removed the async buffer queue from the sink. Synchronize the
3027         render method of the sink using a g_timeout_add() combined with a
3028         gcond triggered when the buffer has been rendered.
3029         Also fixed the video sink reference handling in the player, now
3030         that the idle is not there anymore to mess up things.
3031
3032         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3033         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3034         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
3035         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
3036         (webkit_video_sink_init):
3037         (webkit_video_sink_timeout_func):
3038         (webkit_video_sink_render):
3039         (webkit_video_sink_dispose):
3040         (unlock_buffer_mutex):
3041         (webkit_video_sink_unlock):
3042         (webkit_video_sink_stop):
3043         (webkit_video_sink_class_init):
3044
3045 2009-10-09  Dirk Schulze  <krit@webkit.org>
3046
3047         Reviewed by Nikolas Zimmermann.
3048
3049         feMorphology filter is not implemented
3050         [https://bugs.webkit.org/show_bug.cgi?id=5863]
3051
3052         Adds SVGFEMorphologyElement, for the SVG filter. It also fixes a bug
3053         with the attribute "operator". It was only accessible via "_operator" 
3054         on JavaScript.
3055
3056         Test: svg/dom/operatorAttribute.xhtml
3057
3058         * DerivedSources.cpp:
3059         * DerivedSources.make:
3060         * GNUmakefile.am:
3061         * WebCore.SVG.Filters.exp:
3062         * WebCore.gypi:
3063         * WebCore.pro:
3064         * WebCore.xcodeproj/project.pbxproj:
3065         * bindings/objc/DOM.mm:
3066         (WebCore::createElementClassMap):
3067         * bindings/objc/DOMSVG.h:
3068         * bindings/scripts/CodeGeneratorJS.pm:
3069         * bindings/scripts/CodeGeneratorObjC.pm:
3070         * page/DOMWindow.idl:
3071         * svg/SVGAllInOne.cpp:
3072         * svg/SVGFECompositeElement.idl:
3073         * svg/SVGFEMorphologyElement.cpp: Added.
3074         (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
3075         (WebCore::SVGFEMorphologyElement::~SVGFEMorphologyElement):
3076         (WebCore::SVGFEMorphologyElement::setRadius):
3077         (WebCore::SVGFEMorphologyElement::parseMappedAttribute):
3078         (WebCore::SVGFEMorphologyElement::build):
3079         * svg/SVGFEMorphologyElement.h: Added.
3080         * svg/SVGFEMorphologyElement.idl: Added.
3081         * svg/graphics/filters/SVGFEMorphology.cpp:
3082         (WebCore::operator<<):
3083         * svg/graphics/filters/SVGFEMorphology.h:
3084         (WebCore::):
3085         * svg/svgtags.in:
3086
3087 2009-10-09  Yury Semikhatsky  <yurys@chromium.org>
3088
3089         Reviewed by Dimitri Glazkov.
3090
3091         Fix Chromium breakage.
3092
3093         https://bugs.webkit.org/show_bug.cgi?id=30104
3094
3095         * inspector/front-end/inspector.js:
3096         (WebInspector.addCookieDomain): check that Storage panel is present before calling its methods.
3097
3098 2009-10-09  Joe Ligman  <joseph.ligman@nokia.com>
3099
3100         Reviewed by Simon Hausmann.
3101
3102         [Qt] Added pure virtual methods setInputMethodEnabled and setInputMethodHint to QWebPageClient
3103
3104         https://bugs.webkit.org/show_bug.cgi?id=30023
3105
3106         * platform/qt/QWebPageClient.h:
3107
3108 2009-10-08  Dave Hyatt  <hyatt@apple.com>
3109
3110         Reviewed by Darin Adler.
3111
3112         Implement beforeload for images.  ImageLoadEventSender has been refactored into a more generic
3113         ImageEventSender that can be used by both load and beforeload events.  If the document has any
3114         beforeload listeners, then the installation of images onto the renderer becomes asynchronous
3115         and will be held up until the beforeload event can fire at a later date.
3116
3117         Both beforeload and load events now fire at the end of the tokenizer write() methods, so that
3118         in the typical parsing case we don't have to put off the beforeload/load events until after
3119         a layout or paint might already have happened.  This lets beforeload/load not cause extra
3120         layouts and repaints.
3121
3122         * dom/ContainerNode.cpp:
3123         (WebCore::ContainerNode::dispatchBeforeLoadEvent):
3124         * dom/Document.cpp:
3125         (WebCore::Document::implicitClose):
3126         (WebCore::Document::addListenerTypeIfNeeded):
3127         * dom/Document.h:
3128         (WebCore::Document::):
3129         * dom/XMLTokenizer.cpp:
3130         (WebCore::XMLTokenizer::write):
3131         * html/HTMLImageElement.cpp:
3132         (WebCore::HTMLImageElement::attach):
3133         * html/HTMLInputElement.cpp:
3134         (WebCore::HTMLInputElement::attach):
3135         * html/HTMLTokenizer.cpp:
3136         (WebCore::HTMLTokenizer::write):
3137         * loader/ImageLoader.cpp:
3138         (WebCore::ImageBeforeLoadEventSender::ImageBeforeLoadEventSender):
3139         (WebCore::ImageLoadEventSender::ImageLoadEventSender):
3140         (WebCore::beforeLoadEventSender):
3141         (WebCore::ImageLoader::ImageLoader):
3142         (WebCore::ImageLoader::~ImageLoader):
3143         (WebCore::ImageLoader::setImage):
3144         (WebCore::ImageLoader::setLoadingImage):
3145         (WebCore::ImageLoader::updateFromElement):
3146         (WebCore::ImageLoader::notifyFinished):
3147         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
3148         (WebCore::ImageLoader::dispatchPendingEvents):
3149         (WebCore::ImageEventSender::ImageEventSender):
3150         (WebCore::ImageEventSender::dispatchEventSoon):
3151         (WebCore::ImageEventSender::cancelEvent):
3152         (WebCore::ImageEventSender::dispatchPendingEvents):
3153         (WebCore::ImageEventSender::timerFired):
3154         * loader/ImageLoader.h:
3155         (WebCore::ImageLoader::haveFiredBeforeLoadEvent):
3156         * wml/WMLImageElement.cpp:
3157         (WebCore::WMLImageElement::attach):
3158
3159 2009-10-09  Pavel Feldman  <pfeldman@chromium.org>
3160
3161         Reviewed by Dimitri Glazkov.
3162
3163         Web Inspector: Wrap Database into ScriptObject in v8 bindings.
3164
3165         https://bugs.webkit.org/show_bug.cgi?id=30174
3166
3167         No tests due to no Script* test infrastructure.
3168
3169         * bindings/v8/ScriptObjectQuarantine.cpp:
3170         (WebCore::getQuarantinedScriptObject):
3171
3172 2009-10-09  Girish Ramakrishnan  <girish@forwardbias.in>
3173
3174         Reviewed by Simon Hausmann.
3175
3176         [Qt] Windowless Plugins : Fix crash when using QWebPage without QWebView.
3177         
3178         'client' is 0 when we have no view.
3179
3180         https://bugs.webkit.org/show_bug.cgi?id=30251
3181
3182         * plugins/qt/PluginViewQt.cpp:
3183         (WebCore::PluginView::paint):
3184
3185 2009-10-09  Girish Ramakrishnan  <girish@forwardbias.in>
3186
3187         Reviewed by Simon Hausmann.
3188
3189         [Qt] Plugins : Add missing setCurrentPlugin(0)
3190
3191         https://bugs.webkit.org/show_bug.cgi?id=30248
3192
3193         * plugins/qt/PluginViewQt.cpp:
3194         (WebCore::PluginView::dispatchNPEvent):
3195
3196 2009-10-09  Jakub Wieczorek  <faw217@gmail.com>
3197
3198         Reviewed by Simon Hausmann.
3199
3200         [Qt] beforeload event does not fire on script elements in XML
3201         https://bugs.webkit.org/show_bug.cgi?id=30235
3202
3203         r49194 was lacking a change to XMLTokenizerQt.cpp, equivalent to the one
3204         made in XMLTokenizerLibxml2.cpp.
3205
3206         * dom/XMLTokenizerQt.cpp:
3207         (WebCore::XMLTokenizer::parseEndElement):
3208
3209 2009-10-09  Zoltan Horvath  <zoltan@webkit.org>
3210
3211         Reviewed by Darin Adler.
3212
3213         Allow custom memory allocation control for WebCore's CSSParserValueList
3214         https://bugs.webkit.org/show_bug.cgi?id=30249
3215
3216         Inherits CSSParserValueList class from FastAllocBase because it has 
3217         been instantiated by 'new' in WebCore/css/CSSGrammar.y:1271.
3218
3219         * css/CSSParserValues.h:
3220
3221 2009-10-09  Girish Ramakrishnan  <girish@forwardbias.in>
3222
3223         Reviewed by Simon Hausmann.
3224
3225         [Qt] Windowless Plugins : Create Pixmap only when size changes.
3226
3227         https://bugs.webkit.org/show_bug.cgi?id=30214
3228
3229         * plugins/qt/PluginViewQt.cpp:
3230         (WebCore::PluginView::updatePluginWidget):
3231
3232 2009-10-08  Jon Honeycutt  <jhoneycutt@apple.com>
3233
3234         Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
3235         for the existence of a PluginHalterDelegate.
3236
3237         This fixes a leak of WebPluginHalterClients:
3238         https://bugs.webkit.org/show_bug.cgi?id=30119.
3239
3240         Reviewed by Dan Bernstein.
3241
3242         * WebCore.base.exp:
3243         Removed the export of WebCore::Settings::setPluginHalterEnabled().
3244
3245         * loader/EmptyClients.h:
3246         (WebCore::EmptyPluginHalterClient::enabled):
3247
3248         * page/Page.cpp:
3249         (WebCore::Page::Page):
3250         Remove initialization of m_pluginHalterClient, which was removed. If a
3251         non-null PluginHalterClient was passed, create the PluginHalter, and
3252         set its allowed run time.
3253
3254         * page/Page.h:
3255         Removed pluginHalterEnabledStateChanged() and m_pluginHalterClient.
3256
3257         * page/PluginHalter.cpp:
3258         (WebCore::PluginHalter::didStartPlugin):
3259         Check whether the PluginHalterClient is enabled.
3260         (WebCore::PluginHalter::didStopPlugin):
3261         Ditto.
3262
3263         * page/PluginHalter.h:
3264         Made m_client an OwnPtr.
3265
3266         * page/PluginHalterClient.h:
3267         Added a function to return the enabled state.
3268
3269         * page/Settings.cpp:
3270         (WebCore::Settings::Settings):
3271         Remove initialization of removed member.
3272
3273         * page/Settings.h:
3274         Removed settings for the enabled state of the PluginHalter; we now use
3275         the existence of a WebPluginHalterDelegate to determine whether the
3276         PluginHalter is enabled.
3277
3278 2009-10-08  Adam Barth  <abarth@webkit.org>
3279
3280         Reviewed by Eric Seidel.
3281
3282         Move executeScript from FrameLoader to ScriptController
3283         https://bugs.webkit.org/show_bug.cgi?id=30200
3284
3285         These methods have virtually no interaction with FrameLoader.  They
3286         really seem like they ought to belong to ScriptController.
3287
3288         * WebCore.base.exp:
3289         * bindings/js/ScheduledAction.cpp:
3290         (WebCore::ScheduledAction::execute):
3291         * bindings/js/ScriptController.cpp:
3292         (WebCore::ScriptController::ScriptController):
3293         (WebCore::ScriptController::executeScript):
3294         (WebCore::ScriptController::executeIfJavaScriptURL):
3295         (WebCore::ScriptController::evaluate):
3296         * bindings/js/ScriptController.h:
3297         * bindings/v8/ScriptController.cpp:
3298         (WebCore::ScriptController::ScriptController):
3299         (WebCore::ScriptController::executeScript):
3300         (WebCore::ScriptController::executeIfJavaScriptURL):
3301         * bindings/v8/ScriptController.h:
3302         * dom/XMLTokenizer.cpp:
3303         (WebCore::XMLTokenizer::notifyFinished):
3304         * dom/XMLTokenizerLibxml2.cpp:
3305         (WebCore::XMLTokenizer::endElementNs):
3306         * dom/XMLTokenizerQt.cpp:
3307         (WebCore::XMLTokenizer::parseEndElement):
3308         * html/HTMLTokenizer.cpp:
3309         (WebCore::HTMLTokenizer::scriptExecution):
3310         * loader/FrameLoader.cpp:
3311         (WebCore::FrameLoader::changeLocation):
3312         (WebCore::FrameLoader::urlSelected):
3313         (WebCore::FrameLoader::requestFrame):
3314         (WebCore::FrameLoader::submitForm):
3315         (WebCore::FrameLoader::replaceDocument):
3316         * loader/FrameLoader.h:
3317         * plugins/PluginView.cpp:
3318         (WebCore::PluginView::performRequest):
3319
3320 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
3321
3322         Windows build fix: added missing #include.
3323
3324         * ForwardingHeaders/runtime/StructureChain.h: Copied from WebCore/ForwardingHeaders/runtime/PropertyNameArray.h.
3325
3326 2009-10-08  Brian Weinstein  <bweinstein@apple.com>
3327
3328         Reviewed by Timothy Hatcher.
3329
3330         Fixes <https://bugs.webkit.org/show_bug.cgi?id=30237>.
3331         DOM Content and Load lines aren't shown if a page is loaded when the inspector is up.
3332         
3333         Make sure to call update script object if we have an InspectorFrontend to
3334         call it on when we get one of the new events.
3335
3336         * inspector/InspectorController.cpp:
3337         (WebCore::InspectorController::mainResourceFiredDOMContentEvent):
3338         (WebCore::InspectorController::mainResourceFiredLoadEvent):
3339
3340 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
3341
3342         Build fix: updated for removal of Structure::markAggregate().
3343
3344         * bindings/js/JSDOMGlobalObject.cpp:
3345         (WebCore::JSDOMGlobalObject::markChildren):
3346
3347 2009-10-08  Jens Alfke  <snej@chromium.org>
3348
3349         Reviewed by Darin Adler.
3350
3351         Make AtomicString create its StringImpl via create(), not the constructor,
3352         so it gets allocated in a single heap block, saving memory and CPU cycles.
3353         This eliminates two StringImpl constructors, making the remaining ones
3354         unambiguous, so the "AdoptBuffer" parameter is no longer needed.
3355         Added const attribute to UChar* in StringImpl constructor, eliminating the
3356         need for several const_casts in calls to it.
3357         StringImpl also unfriends AtomicString (OMG drama!!!)
3358         https://bugs.webkit.org/show_bug.cgi?id=30141
3359
3360         * platform/text/AtomicString.cpp:
3361         (WebCore::CStringTranslator::translate): Call StringImpl::create().
3362         (WebCore::UCharBufferTranslator::translate): Ditto.
3363         (WebCore::HashAndCharactersTranslator::translate): Ditto.
3364         * platform/text/StringImpl.cpp:
3365         (WebCore::StringImpl::StringImpl): Remove unnecessary AdoptBuffer param.
3366         (WebCore::StringImpl::adopt): Ditto.
3367         (WebCore::StringImpl::createUninitialized): Ditto.
3368         (WebCore::StringImpl::create): Ditto.
3369         (WebCore::StringImpl::crossThreadString): Ditto.
3370         * platform/text/StringImpl.h:
3371         (WebCore::StringImpl::setHash): Used by AtomicString when creating StringImpls.
3372
3373 2009-10-08  Anders Carlsson  <andersca@apple.com>
3374
3375         Reviewed by Sam Weinig.
3376
3377         Remove the shouldLoadMediaElementURL frame loader client function.
3378
3379         * loader/FrameLoader.cpp:
3380         (WebCore::FrameLoader::willLoadMediaElementURL):
3381
3382 2009-10-08  John Gregg  <johnnyg@google.com>
3383
3384         Reviewed by Dimitri Glazkov.
3385
3386         SVGURIReference Build problem for V8.  An additional stale reference to SVGURIReference bindings
3387         which wasn't exposed until a clean build.
3388         https://bugs.webkit.org/show_bug.cgi?id=30217
3389
3390         No new tests, just a build fix.
3391
3392         * bindings/v8/V8Index.cpp:
3393
3394 2009-10-08  Nikolas Zimmermann  <nzimmermann@rim.com>
3395
3396         Not reviewed. Sort XCode project file.
3397
3398         * WebCore.xcodeproj/project.pbxproj:
3399
3400 2009-10-08  Patrick Mueller  <Patrick_Mueller@us.ibm.com>
3401
3402         Reviewed by Timothy Hatcher.
3403
3404         unselectable resources in resource panel
3405         https://bugs.webkit.org/show_bug.cgi?id=30079
3406
3407         manual test added
3408         
3409         Also changed the way DnD for resources in the Resources panel is 
3410         handled.
3411
3412         * inspector/front-end/ResourcesPanel.js:
3413         (WebInspector.ResourceSidebarTreeElement.prototype.onattach):
3414         (WebInspector.ResourceSidebarTreeElement.prototype.ondragstart):
3415         * manual-tests/inspector/duplicate-resource-urls.html: Added.
3416
3417 2009-10-08  Brian Weinstein  <bweinstein@apple.com>
3418
3419         Reviewed by Timothy Hatcher.
3420
3421         Fixes <http://webkit.org/b/30233>
3422         Local Storage and Cookies show Blank Titles on Local Files.
3423
3424         If a local storage or cookies sidebar item has no domain, set the 
3425         title to "Local Files", because that is what it represents.
3426
3427         * English.lproj/localizedStrings.js:
3428         * inspector/front-end/StoragePanel.js:
3429         (WebInspector.DOMStorageSidebarTreeElement.prototype.get mainTitle):
3430         (WebInspector.CookieSidebarTreeElement.prototype.get mainTitle):
3431         (WebInspector.CookieSidebarTreeElement.prototype.set mainTitle):
3432
3433 2009-10-08  Dave Hyatt  <hyatt@apple.com>
3434
3435         Reviewed by Oliver Hunt.
3436
3437         Fix failing media layout tests.  Don't make beforeload block loads of objects that aren't in the
3438         document, since video/audio (and images eventually too) can load when not in the document yet.
3439
3440         * dom/ContainerNode.cpp:
3441         (WebCore::ContainerNode::dispatchBeforeLoadEvent):
3442
3443 2009-10-08  Nikolas Zimmermann  <nzimmermann@rim.com>
3444
3445         Reviewed by Eric Seidel.
3446
3447         Move SVGFitToViewBox ANIMATED_* macros in classes that inherit from it
3448         https://bugs.webkit.org/show_bug.cgi?id=30230
3449
3450         This patch also devirtualizes viewBoxToViewTransform(), is it's superflous.
3451         viewBoxToViewTransform() is now a simple static heper function in SVGFitToViewBox.
3452         As a result, the SVGSVGElement::viewBoxToViewTransform() function now resuses the same logic.
3453
3454         As side-effect this patch fixes svg/custom/linking-a-03-b-transform.svg, the return
3455         statement in SVGSVGElement::viewBoxToViewTransform() was clearly wrong.
3456
3457         * svg/SVGFitToViewBox.cpp:
3458         (WebCore::SVGFitToViewBox::SVGFitToViewBox):
3459         (WebCore::SVGFitToViewBox::viewBoxToViewTransform):
3460         * svg/SVGFitToViewBox.h:
3461         * svg/SVGMarkerElement.cpp:
3462         (WebCore::SVGMarkerElement::SVGMarkerElement):
3463         (WebCore::SVGMarkerElement::viewBoxToViewTransform):
3464         * svg/SVGMarkerElement.h:
3465         * svg/SVGPatternElement.cpp:
3466         (WebCore::SVGPatternElement::SVGPatternElement):
3467         (WebCore::SVGPatternElement::buildPattern):
3468         * svg/SVGPatternElement.h:
3469         * svg/SVGSVGElement.cpp:
3470         (WebCore::SVGSVGElement::SVGSVGElement):
3471         (WebCore::SVGSVGElement::viewBoxToViewTransform):
3472         * svg/SVGSVGElement.h:
3473         * svg/SVGSymbolElement.cpp:
3474         (WebCore::SVGSymbolElement::SVGSymbolElement):
3475         * svg/SVGSymbolElement.h:
3476         * svg/SVGViewElement.cpp:
3477         (WebCore::SVGViewElement::SVGViewElement):
3478         * svg/SVGViewElement.h:
3479         * svg/SVGViewSpec.cpp:
3480         (WebCore::SVGViewSpec::SVGViewSpec):
3481         * svg/SVGViewSpec.h:
3482
3483 2009-10-08  Brian Weinstein  <bweinstein@apple.com>
3484
3485         Reviewed by Jon Honeycutt.
3486
3487         Correct a typo that fixes the resizing of columns in Cookie view when you
3488         resize the Inspector window.
3489
3490         * inspector/front-end/CookieItemsView.js:
3491         (WebInspector.CookieItemsView.prototype.resize):
3492
3493 2009-10-08  Brian Weinstein  <bweinstein@apple.com>
3494
3495         Reviewed by Adam Roben.
3496
3497         Fixes <https://bugs.webkit.org/show_bug.cgi?id=29811>
3498         Text in Inspector's Styles gear menu is invisible.
3499         
3500         Adds a style rule for the option text and hr's in the gear menu,
3501         to prevent them from being transparent.
3502
3503         * inspector/front-end/inspector.css:
3504
3505 2009-10-08  John Gregg  <johnnyg@google.com>
3506
3507         Reviewed by David Levin.
3508
3509         Fix build problem with SVGURIReference in V8.
3510         https://bugs.webkit.org/show_bug.cgi?id=30217
3511
3512         No new tests, just a build fix.
3513
3514         * WebCore.gypi:
3515         * bindings/v8/DerivedSourcesAllInOne.cpp:
3516
3517 2009-10-07  Dave Hyatt  <hyatt@apple.com>
3518
3519         Reviewed by Eric Carlson.
3520
3521         Make beforeload work on <video>/<audio> elements.
3522
3523         Added fast/dom/beforeload/video-before-load.html
3524
3525         * html/HTMLMediaElement.cpp:
3526         (WebCore::HTMLMediaElement::parseMappedAttribute):
3527         (WebCore::HTMLMediaElement::selectMediaResource):
3528         (WebCore::HTMLMediaElement::selectNextSourceChild):
3529
3530 2009-10-08  Nikolas Zimmermann  <nzimmermann@rim.com>
3531
3532         Reviewed by Eric Seidel.
3533
3534         Move SVGExternalResourcesRequired ANIMATED_* macros in classes that inherit from it
3535         https://bugs.webkit.org/show_bug.cgi?id=30218
3536
3537         The long term goal is to kill the need for the virtual contextElement() function in SVG code. 
3538         No change in functionality, thus no new tests.
3539
3540         * svg/SVGAElement.cpp:
3541         (WebCore::SVGAElement::SVGAElement):
3542         * svg/SVGAElement.h:
3543         * svg/SVGAnimationElement.cpp:
3544         (WebCore::SVGAnimationElement::SVGAnimationElement):
3545         * svg/SVGAnimationElement.h:
3546         * svg/SVGCircleElement.cpp:
3547         (WebCore::SVGCircleElement::SVGCircleElement):
3548         * svg/SVGCircleElement.h:
3549         * svg/SVGClipPathElement.cpp:
3550         (WebCore::SVGClipPathElement::SVGClipPathElement):
3551         * svg/SVGClipPathElement.h:
3552         * svg/SVGCursorElement.cpp:
3553         (WebCore::SVGCursorElement::SVGCursorElement):
3554         * svg/SVGCursorElement.h:
3555         * svg/SVGDefsElement.cpp:
3556         (WebCore::SVGDefsElement::SVGDefsElement):
3557         * svg/SVGDefsElement.h:
3558         * svg/SVGEllipseElement.cpp:
3559         (WebCore::SVGEllipseElement::SVGEllipseElement):
3560         * svg/SVGEllipseElement.h:
3561         * svg/SVGExternalResourcesRequired.cpp:
3562         (WebCore::SVGExternalResourcesRequired::SVGExternalResourcesRequired):
3563         * svg/SVGExternalResourcesRequired.h:
3564         * svg/SVGFEImageElement.cpp:
3565         (WebCore::SVGFEImageElement::SVGFEImageElement):
3566         * svg/SVGFEImageElement.h:
3567         * svg/SVGFilterElement.cpp:
3568         (WebCore::SVGFilterElement::SVGFilterElement):
3569         * svg/SVGFilterElement.h:
3570         * svg/SVGFontElement.cpp:
3571         (WebCore::SVGFontElement::SVGFontElement):
3572         * svg/SVGFontElement.h:
3573         * svg/SVGForeignObjectElement.cpp:
3574         (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
3575         * svg/SVGForeignObjectElement.h:
3576         * svg/SVGGElement.cpp:
3577         (WebCore::SVGGElement::SVGGElement):
3578         * svg/SVGGElement.h:
3579         * svg/SVGGradientElement.cpp:
3580         (WebCore::SVGGradientElement::SVGGradientElement):
3581         * svg/SVGGradientElement.h:
3582         * svg/SVGImageElement.cpp:
3583         (WebCore::SVGImageElement::SVGImageElement):
3584         * svg/SVGImageElement.h:
3585         * svg/SVGLineElement.cpp:
3586         (WebCore::SVGLineElement::SVGLineElement):
3587         * svg/SVGLineElement.h:
3588         * svg/SVGMPathElement.cpp:
3589         (WebCore::SVGMPathElement::SVGMPathElement):
3590         * svg/SVGMPathElement.h:
3591         * svg/SVGMarkerElement.cpp:
3592         (WebCore::SVGMarkerElement::SVGMarkerElement):
3593         * svg/SVGMarkerElement.h:
3594         * svg/SVGMaskElement.cpp:
3595         (WebCore::SVGMaskElement::SVGMaskElement):
3596         * svg/SVGMaskElement.h:
3597         * svg/SVGPathElement.cpp:
3598         (WebCore::SVGPathElement::SVGPathElement):
3599         * svg/SVGPathElement.h:
3600         * svg/SVGPatternElement.cpp:
3601         (WebCore::SVGPatternElement::SVGPatternElement):
3602         * svg/SVGPatternElement.h:
3603         * svg/SVGPolyElement.cpp:
3604         (WebCore::SVGPolyElement::SVGPolyElement):
3605         * svg/SVGPolyElement.h:
3606         * svg/SVGRectElement.cpp:
3607         (WebCore::SVGRectElement::SVGRectElement):