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