b13c1dfe602303bbae14e5ff1d7f17a5c67e023a
[WebKit-https.git] / WebCore / ChangeLog
1 2009-10-05  Dave Hyatt  <hyatt@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         Add a beforeload event that will be fired before subresources load. (It isn't fired yet.)  The event
6         has one field, the URL that is going to be requested.  Setting preventDefault will stop the load
7         from occurring.
8
9         * DerivedSources.cpp:
10         * DerivedSources.make:
11         * WebCore.gypi:
12         * WebCore.vcproj/WebCore.vcproj:
13         * WebCore.xcodeproj/project.pbxproj:
14         * dom/BeforeLoadEvent.h: Added.
15         (WebCore::BeforeLoadEvent::create):
16         (WebCore::BeforeLoadEvent::initBeforeLoadEvent):
17         (WebCore::BeforeLoadEvent::url):
18         (WebCore::BeforeLoadEvent::BeforeLoadEvent):
19         * dom/BeforeLoadEvent.idl: Added.
20         * dom/EventNames.h:
21         * page/DOMWindow.idl:
22
23 2009-10-05  Priit Laes  <plaes@plaes.org>
24
25         Reviewed by Gustavo Noronha.
26
27         Add Gentoo-specific paths for searching browser plugins.
28         https://bugs.webkit.org/show_bug.cgi?id=30088
29
30         * plugins/PluginDatabase.cpp:
31         (WebCore::PluginDatabase::defaultPluginDirectories):
32
33 2009-10-02  Chris Marrin  <cmarrin@apple.com>
34
35         Reviewed by Adele Peterson.
36
37         Add functionality to pause/throttle CSS transitions/animations in a WebView
38         https://bugs.webkit.org/show_bug.cgi?id=29942
39
40         Exporting call from AnimationController
41
42         * WebCore.base.exp:
43
44 2009-10-05  Kevin Decker  <kdecker@apple.com>
45
46         Rubberstamped by Anders Carlsson.
47         
48         * WebCore.base.exp: Update export of HaltablePlugin/PluginHalterClient.
49         * WebCore.xcodeproj/project.pbxproj: Likewise.
50
51 2009-10-05  Eric Seidel  <eric@webkit.org>
52
53         No review, rolling out r49104.
54         http://trac.webkit.org/changeset/49104
55
56         * html/HTMLInputElement.cpp:
57         * html/HTMLInputElement.h:
58         * html/HTMLInputElement.idl:
59         * html/ValidityState.cpp:
60         * html/ValidityState.h:
61         (WebCore::ValidityState::rangeUnderflow):
62         (WebCore::ValidityState::rangeOverflow):
63         * rendering/RenderSlider.cpp:
64         (WebCore::SliderRange::SliderRange):
65         (WebCore::SliderRange::valueFromElement):
66
67 2009-10-05  Kent Tamura  <tkent@chromium.org>
68
69         Reviewed by Eric Seidel.
70
71         Update style immediately when validation-related values are updated.
72         https://bugs.webkit.org/show_bug.cgi?id=28868
73
74         In order to apply :valid, :invalid, :optional or :required lively,
75           - call setNeedsStyleRecalc() when properties which can change
76             willValidate state are updated, and
77              (Parent form element, name, disabled, readonly)
78           - call updateValidity() when properties which can change validity
79             state are updated. (value, pattern, required)
80
81         Tests: fast/forms/input-live-pseudo-selectors.html
82                fast/forms/textarea-live-pseudo-selectors.html
83
84         * html/HTMLFormControlElement.cpp:
85         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
86         (WebCore::HTMLFormControlElement::parseMappedAttribute):
87         (WebCore::HTMLFormControlElement::required):
88         (WebCore::HTMLFormControlElement::updateValidity):
89         * html/HTMLFormControlElement.h:
90         * html/HTMLInputElement.cpp:
91         (WebCore::HTMLInputElement::setInputType):
92         (WebCore::HTMLInputElement::parseMappedAttribute):
93         (WebCore::HTMLInputElement::setValue):
94         (WebCore::HTMLInputElement::setValueFromRenderer):
95         (WebCore::HTMLInputElement::setFileListFromRenderer):
96         * html/HTMLTextAreaElement.cpp:
97         (WebCore::HTMLTextAreaElement::setValue):
98         * rendering/RenderTextControlMultiLine.cpp:
99         (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
100
101 2009-10-05  Kent Tamura  <tkent@chromium.org>
102
103         Reviewed by Darin Adler.
104
105         Implement min/max attributes, ValidityState.rangeUnderflow and
106         ValidityState.rangeOverflow for <input type=number> and <input type=range>
107         https://bugs.webkit.org/show_bug.cgi?id=29069
108
109         Tests: fast/forms/ValidityState-rangeOverflow-number.html
110                fast/forms/ValidityState-rangeOverflow-range.html
111                fast/forms/ValidityState-rangeUnderflow-number.html
112                fast/forms/ValidityState-rangeUnderflow-range.html
113                fast/forms/input-minmax.html
114
115         * html/HTMLInputElement.cpp:
116         (WebCore::HTMLInputElement::rangeUnderflow):
117         (WebCore::HTMLInputElement::rangeOverflow):
118         (WebCore::HTMLInputElement::rangeMinimum):
119         (WebCore::HTMLInputElement::rangeMaximum):
120         * html/HTMLInputElement.h:
121         * html/HTMLInputElement.idl:
122         * html/ValidityState.cpp:
123         (WebCore::ValidityState::rangeUnderflow):
124         (WebCore::ValidityState::rangeOverflow):
125         * html/ValidityState.h:
126         * rendering/RenderSlider.cpp:
127         (WebCore::SliderRange::SliderRange):
128         (WebCore::SliderRange::valueFromElement):
129
130 2009-10-05  Kent Tamura  <tkent@chromium.org>
131
132         Reviewed by Eric Seidel.
133
134         Introduces
135          - new CSS pseudo selector: "-webkit-input-list-button"
136          - new CSS apperance type: "list-button"
137          - new ControlPart value: "ListButtonPart"
138         for the UI of the list attribute of the input element, and adds
139         implementation to draw ListButtonPart on Mac.
140         The code is guarded by ENABLE(DATALIST).
141
142         https://bugs.webkit.org/show_bug.cgi?id=27794
143
144         Test: platform/mac/fast/forms/input-list-button-size.html
145
146         * css/CSSPrimitiveValueMappings.h:
147         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
148         * css/CSSSelector.cpp:
149         (WebCore::CSSSelector::extractPseudoType):
150         * css/CSSSelector.h:
151         (WebCore::CSSSelector::):
152         * css/CSSStyleSelector.cpp:
153         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
154         * css/CSSValueKeywords.in:
155         * css/html.css:
156         * html/HTMLInputElement.cpp:
157         * platform/ThemeTypes.h:
158         (WebCore::):
159         * platform/mac/ThemeMac.mm:
160         (WebCore::listButtonSizes):
161         (WebCore::button):
162         (WebCore::paintButton):
163         (WebCore::ThemeMac::controlSize):
164         (WebCore::ThemeMac::minimumControlSize):
165         (WebCore::ThemeMac::controlBorder):
166         (WebCore::ThemeMac::paint):
167         * rendering/RenderTheme.cpp:
168         (WebCore::RenderTheme::adjustStyle):
169         (WebCore::RenderTheme::paint):
170         (WebCore::RenderTheme::paintBorderOnly):
171         (WebCore::RenderTheme::paintDecorations):
172         * rendering/RenderThemeMac.mm:
173         (WebCore::RenderThemeMac::adjustRepaintRect):
174         * rendering/style/RenderStyleConstants.h:
175         (WebCore::):
176
177 2009-10-05  Brian Weinstein  <bweinstein@apple.com>
178
179         Reviewed by Timothy Hatcher.
180
181         Fixes <https://bugs.webkit.org/show_bug.cgi?id=30065>
182         nodeTitleInfo should be placed in ElementsTreeOutline.
183         
184         Move nodeTitleInfo into ElementsTreeOutline.js from utilities.js.
185
186         * inspector/front-end/ElementsTreeOutline.js:
187         (WebInspector.ElementsTreeElement):
188         (WebInspector.ElementsTreeElement.prototype._updateTitle):
189         (WebInspector.ElementsTreeElement.prototype._nodeTitleInfo):
190         * inspector/front-end/utilities.js:
191
192 2009-10-02  Yael Aharon  <yael.aharon@nokia.com>
193
194         Reviewed by Simon Hausmann.
195
196         [Qt] Inform the application when a new request is created
197         https://bugs.webkit.org/show_bug.cgi?id=29975
198
199         Emit a signal each time a request is created, with the request and the frame
200         that created it.
201
202         * platform/network/qt/QNetworkReplyHandler.cpp:
203         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
204         (WebCore::QNetworkReplyHandler::start):
205
206 2009-10-05  Ben Murdoch  <benm@google.com>
207
208         Reviewed by Darin Adler.
209
210         Add an ASSERT in updateGuidVersionMap.
211         https://bugs.webkit.org/show_bug.cgi?id=30077
212
213         * storage/Database.cpp:
214         (WebCore::updateGuidVersionMap): ASSERT that the guidMutex() is locked.
215
216 2009-10-05  Nate Chapin  <japhet@chromium.org>
217
218         Reviewed by Eric Seidel.
219
220         Allow V8 to throw an exception in _NPN_SetException without worrying about context
221         if we don't have enough information to find the correct context.
222
223         https://bugs.webkit.org/show_bug.cgi?id=30026
224
225         Part of the fix for Chromium's failure of LayouTests/plugins/netscape-throw-exception.html.
226
227         * bindings/v8/NPV8Object.cpp: 
228         (_NPN_SetException): Don't suppress the exception if we can't find the relevant context.
229
230 2009-10-05  Mikhail Naganov  <mnaganov@chromium.org>
231
232         Reviewed by Timothy Hatcher.
233
234         Place "Close" button in docked mode on the same side as the window "Close" button in detached mode.
235
236         https://bugs.webkit.org/show_bug.cgi?id=29961
237
238         * inspector/front-end/inspector.css:
239         * inspector/front-end/inspector.html:
240         * inspector/front-end/inspector.js:
241         (WebInspector.loaded):
242
243 2009-10-05  J-P Nurmi  <jpnurmi@gmail.com>
244
245         Reviewed by Simon Hausmann.
246
247         [Qt] Added pure virtual QWebPageClient::pluginParent()
248
249         https://bugs.webkit.org/show_bug.cgi?id=29710
250
251         * platform/qt/QWebPageClient.h:
252
253 2009-10-05  Jakub Wieczorek  <faw217@gmail.com>
254
255         Reviewed by Tor Arne Vestbø.
256
257         [Qt] windowsKeyCodeForKeyEvent() returns a wrong value for the F10 key.
258         https://bugs.webkit.org/show_bug.cgi?id=30042
259
260         * platform/qt/PlatformKeyboardEventQt.cpp:
261         (WebCore::windowsKeyCodeForKeyEvent):
262
263 2009-10-05  Fumitoshi Ukai  <ukai@chromium.org>
264
265         Unreviewed build fix for ENABLE(WEB_SOCKETS) and v8.
266
267         V8ObjectEventListener.h has been removed at r48978
268
269         * bindings/v8/custom/V8WebSocketCustom.cpp:
270
271 2009-10-04  Pavel Feldman  <pfeldman@chromium.org>
272
273         Reviewed by Timothy Hatcher.
274
275         Web Inspector console stops working while JS in IFRAME is paused.
276
277         https://bugs.webkit.org/show_bug.cgi?id=29958
278
279         * inspector/front-end/InjectedScript.js:
280         (InjectedScript._evaluateOn):
281         (InjectedScript.addInspectedNode):
282         (InjectedScript._ensureCommandLineAPIInstalled):
283
284 2009-10-04  Pavel Feldman  <pfeldman@chromium.org>
285
286         Reviewed by Timothy Hatcher.
287
288         Web Inspector: Introduce inspected object groups for console
289         and watch evaluation results so that they could be released
290         explicitly.
291
292         https://bugs.webkit.org/show_bug.cgi?id=29891
293
294         * bindings/js/JSInspectorBackendCustom.cpp:
295         (WebCore::JSInspectorBackend::wrapObject):
296         * bindings/v8/custom/V8InspectorBackendCustom.cpp:
297         (WebCore::CALLBACK_FUNC_DECL):
298         * inspector/InspectorBackend.cpp:
299         (WebCore::InspectorBackend::wrapObject):
300         (WebCore::InspectorBackend::releaseWrapperObjectGroup):
301         * inspector/InspectorBackend.h:
302         * inspector/InspectorBackend.idl:
303         * inspector/InspectorController.cpp:
304         (WebCore::InspectorController::clearConsoleMessages):
305         (WebCore::InspectorController::resetScriptObjects):
306         (WebCore::InspectorController::wrapObject):
307         (WebCore::InspectorController::unwrapObject):
308         (WebCore::InspectorController::releaseWrapperObjectGroup):
309         * inspector/InspectorController.h:
310         * inspector/InspectorFrontend.cpp:
311         (WebCore::InspectorFrontend::addMessageToConsole):
312         * inspector/front-end/ConsoleView.js:
313         (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
314         (WebInspector.ConsoleView.prototype.doEvalInWindow):
315         (WebInspector.ConsoleView.prototype._enterKeyPressed):
316         * inspector/front-end/InjectedScript.js:
317         (InjectedScript.evaluate):
318         (InjectedScript._evaluateAndWrap):
319         (InjectedScript.evaluateInCallFrame):
320         * inspector/front-end/ScriptsPanel.js:
321         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
322         (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
323         * inspector/front-end/WatchExpressionsSidebarPane.js:
324         (WebInspector.WatchExpressionsSidebarPane):
325         (WebInspector.WatchExpressionsSection.prototype.update):
326
327 2009-10-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
328
329         Reviewed by Eric Carlson.
330
331         Move mediaControls extras for the Qt port into WebCore/css like other ports
332
333         https://bugs.webkit.org/show_bug.cgi?id=30013
334
335         * WebCore.pro:
336         * WebCore.qrc:
337         * css/mediaControlsQt.css: Renamed from WebCore/css/qt/mediaControls-extras.css.
338         * platform/qt/RenderThemeQt.cpp:
339         (WebCore::RenderThemeQt::extraMediaControlsStyleSheet):
340
341 2009-10-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
342
343         Reviewed by Eric Carlson.
344
345         Rename WebCore/css/mediaControlsQT.css and MediaControllerThemeQT
346
347         https://bugs.webkit.org/show_bug.cgi?id=30013
348
349         The QT suffix has been expanded to QuickTime, to not cause confusion
350         and name-crashes with similar files in the Qt port.
351
352         * DerivedSources.make:
353         * WebCore.xcodeproj/project.pbxproj:
354         * css/mediaControlsQuickTime.css: Renamed from WebCore/css/mediaControlsQT.css.
355         * rendering/RenderThemeMac.mm:
356         (WebCore::):
357         (WebCore::mediaControllerTheme):
358         (WebCore::RenderThemeMac::adjustSliderThumbSize):
359         (WebCore::getUnzoomedRectAndAdjustCurrentContext):
360         (WebCore::RenderThemeMac::extraMediaControlsStyleSheet):
361
362 2009-10-04  Brian Weinstein  <bweinstein@apple.com>
363
364         Reviewed by Timothy Hatcher.
365         
366         Fixes <https://bugs.webkit.org/show_bug.cgi?id=30064>
367         Syntax Highlighting CSS shouldn't be duplicated.
368
369         Refactor syntax highlighting CSS into a new file, add it to the
370         projects, and have SourceFrame.js and inspector.html include the
371         new CSS file.
372
373         * WebCore.gypi:
374         * WebCore.vcproj/WebCore.vcproj:
375         * inspector/front-end/SourceFrame.js:
376         (WebInspector.SourceFrame.prototype._loaded):
377         * inspector/front-end/inspector.css:
378         * inspector/front-end/inspector.html:
379         * inspector/front-end/inspectorSyntaxHighlight.css: Added.
380         * inspector/front-end/WebKit.qrc:
381
382 2009-10-04  Brian Weinstein  <bweinstein@apple.com>
383
384         Reviewed by Timothy Hatcher.
385         
386         Fixes <https://bugs.webkit.org/show_bug.cgi?id=30062>
387         Inspector should syntax highlight JS/CSS in elements view.
388
389         Add syntax highlighting of CSS and JavaScript tags to the elements panel.
390         Copied CSS rules from SourceFrame.js to inspector.css, and have the text nodes
391         in utilities.js call the CSS or JS Syntax highlighters if their parent is a script
392         or style tag.
393
394         * inspector/front-end/inspector.css:
395         * inspector/front-end/utilities.js:
396
397 2009-10-04  Fumitoshi Ukai  <ukai@chromium.org>
398
399         Reviewed by Eric Seidel
400
401         Enable Web Sockets in chromium build.
402         https://bugs.webkit.org/show_bug.cgi?id=29917
403
404         * WebCore.gyp/WebCore.gyp:
405
406 2009-10-04  Xan Lopez  <xlopez@igalia.com>
407
408         Reviewed by Gustova Noronha.
409
410         [GTK] performs a POST when refreshing a view that was obtained with a GET
411         https://bugs.webkit.org/show_bug.cgi?id=29761
412
413         Update the HTTP method in the request stored by willSendRequest
414         after a redirect, since it could have changed.
415
416         Test: http/tests/navigation/postredirect-reload.html
417
418         * platform/network/soup/ResourceHandleSoup.cpp:
419         (WebCore::restartedCallback):
420
421 2009-10-04  Xan Lopez  <xlopez@igalia.com>
422
423         Revert previous patch, as the newly added test breaks other tests.
424
425         * platform/network/soup/ResourceHandleSoup.cpp:
426         (WebCore::restartedCallback):
427
428 2009-10-04  Xan Lopez  <xlopez@igalia.com>
429
430         Reviewed by Gustova Noronha.
431
432         [GTK] performs a POST when refreshing a view that was obtained with a GET
433         https://bugs.webkit.org/show_bug.cgi?id=29761
434
435         Update the HTTP method in the request stored by willSendRequest
436         after a redirect, since it could have changed.
437
438         Test: http/tests/navigation/postredirect-reload.html
439
440         * platform/network/soup/ResourceHandleSoup.cpp:
441         (WebCore::restartedCallback):
442
443 2009-10-04  Vitaly Repeshko  <vitalyr@chromium.org>
444
445         Reviewed by Adam Barth.
446
447         [V8] Fixed Function leak in V8LazyEventListener.
448         (Should fix the remaning leak in
449         https://bugs.webkit.org/show_bug.cgi?id=29093).
450         V8LazyEventListeners used to create FunctionTemplates for each
451         wrapped listener which in turn created Functions that were cached
452         forever in V8 Context. Now there is at most one such Function per
453         Context.
454         https://bugs.webkit.org/show_bug.cgi?id=30060
455
456         Added new hidden property name to store toString result:
457         * bindings/v8/V8HiddenPropertyName.cpp:
458         * bindings/v8/V8HiddenPropertyName.h:
459
460         Switched to static FunctionTemplate:
461         * bindings/v8/V8LazyEventListener.cpp:
462         (WebCore::V8LazyEventListenerToString):
463         (WebCore::V8LazyEventListener::prepareListenerObject):
464
465 2009-10-03  Joseph Pecoraro  <joepeck@webkit.org>
466
467         Reviewed by Timothy Hatcher.
468
469         CSS Source View Should be Syntax Highlighted
470         https://bugs.webkit.org/show_bug.cgi?id=14359
471
472           Support for WebKit's CSS Variables @variables and var()
473
474         * inspector/front-end/SourceFrame.js:
475         (WebInspector.CSSSourceSyntaxHighligher):
476
477 2009-10-03  Joseph Pecoraro  <joepeck@webkit.org>
478
479         Reviewed by Timothy Hatcher.
480
481         Inspector should remember preferences for docked/undocked etc
482         https://bugs.webkit.org/show_bug.cgi?id=29089
483
484         * inspector/front-end/ResourcesPanel.js:
485         (WebInspector.ResourcesPanel.prototype._toggleLargerResources): toggle the preference
486         * inspector/front-end/inspector.js:
487         (WebInspector._loadPreferences): factored out loading preferences
488         (WebInspector.loaded):
489
490 2009-10-03  Joseph Pecoraro  <joepeck@webkit.org>
491
492         Reviewed by Timothy Hatcher.
493
494         CSS Source View Should be Syntax Highlighted
495         https://bugs.webkit.org/show_bug.cgi?id=14359
496
497           Trigger the Syntax Highlighter for CSS files.
498
499         * inspector/front-end/SourceFrame.js:
500         (WebInspector.SourceFrame.prototype.syntaxHighlightJavascript):
501         (WebInspector.SourceFrame.prototype.syntaxHighlightCSS):
502         * inspector/front-end/SourceView.js:
503         (WebInspector.SourceView.prototype._contentLoaded):
504
505           Factored out the Syntax Highlighting procedure into a "Class"
506           Added CSSSourceSyntaxHighlighter and JavaScriptSourceSyntaxHighlighter
507
508         (WebInspector.SourceSyntaxHighligher):
509         (WebInspector.SourceSyntaxHighligher.prototype.createSpan):
510         (WebInspector.SourceSyntaxHighligher.prototype.process.processChunk):
511         (WebInspector.SourceSyntaxHighligher.prototype.process):
512         (WebInspector.CSSSourceSyntaxHighligher): the CSS Highlighter
513         (WebInspector.JavaScriptSourceSyntaxHighligher): the JS Highlighter
514
515 2009-10-03  Adam Barth  <abarth@webkit.org>
516
517         Reviewed by Sam Weinig.
518
519         Factor back-forward list methods out of FrameLoader
520         https://bugs.webkit.org/show_bug.cgi?id=30037
521
522         This change moves these back-forward related methods from FrameLoader
523         to Page.  It's possible we should move these methods into some kind of
524         "page controller" object, but we can figure that out in a future patch.
525
526         * loader/FrameLoader.cpp:
527         * loader/FrameLoader.h:
528         * loader/RedirectScheduler.cpp:
529         (WebCore::RedirectScheduler::timerFired):
530         * page/ContextMenuController.cpp:
531         (WebCore::ContextMenuController::contextMenuItemSelected):
532         * page/DOMWindow.cpp:
533         (WebCore::DOMWindow::close):
534         * page/History.cpp:
535         (WebCore::History::length):
536         * page/Page.cpp:
537         (WebCore::Page::canGoBackOrForward):
538         (WebCore::Page::goBackOrForward):
539         (WebCore::Page::getHistoryLength):
540         * page/Page.h:
541         * platform/ContextMenu.cpp:
542         (WebCore::ContextMenu::populate):
543         (WebCore::ContextMenu::checkOrEnableIfNeeded):
544
545 2009-10-02  Pavel Feldman  <pfeldman@chromium.org>
546
547         Reviewed by Timothy Hatcher.
548
549         Web Inspector: prepare InspectorController for being used from layout tests.
550         This change adds evaluateForTestInFrontend method with the callback that
551         allows evaluating arbitrary code in the frontend context.
552
553         https://bugs.webkit.org/show_bug.cgi?id=30008
554
555         * WebCore.Inspector.exp:
556         * WebCore.order:
557         * inspector/InspectorBackend.cpp:
558         (WebCore::InspectorBackend::didEvaluateForTestInFrontend):
559         * inspector/InspectorBackend.h:
560         * inspector/InspectorBackend.idl:
561         * inspector/InspectorController.cpp:
562         (WebCore::InspectorController::populateScriptObjects):
563         (WebCore::InspectorController::evaluateForTestInFrontend):
564         (WebCore::InspectorController::didEvaluateForTestInFrontend):
565         * inspector/InspectorController.h:
566         * inspector/InspectorFrontend.cpp:
567         (WebCore::InspectorFrontend::evaluateForTestInFrontend):
568         * inspector/InspectorFrontend.h:
569         * inspector/front-end/inspector.js:
570         (WebInspector.evaluateForTestInFrontend):
571
572 2009-10-02  Pavel Feldman  <pfeldman@chromium.org>
573
574         Reviewed by Timothy Hatcher.
575
576         Web Inspector: Node search mode is not getting reset on element selection.
577
578         https://bugs.webkit.org/show_bug.cgi?id=30016
579
580         * inspector/front-end/ElementsPanel.js:
581         (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
582
583 2009-10-02  Brian Weinstein  <bweinstein@apple.com>
584
585         Reviewed by Timothy Hatcher.
586
587         Fixes <https://bugs.webkit.org/show_bug.cgi?id=30036>
588         Should be able to resize Cookie Columns.
589
590         * inspector/front-end/CookieItemsView.js:
591         (WebInspector.CookieItemsView.prototype.update.callback):
592         (WebInspector.CookieItemsView.prototype.update):
593         (WebInspector.CookieItemsView.prototype.resize):
594
595 2009-09-25  Jon Honeycutt  <jhoneycutt@apple.com>
596
597         Make WebCore::PluginView participate in plug-in halting.
598
599         Reviewed by Sam Weinig.
600
601         * platform/graphics/BitmapImage.h:
602         Declare a create() function that takes an HBITMAP.
603
604         * platform/graphics/win/ImageCGWin.cpp:
605         (WebCore::BitmapImage::create):
606         Use GetObject() to fill out a DIBSECTION structure for the given
607         HBITMAP. Call CGBitmapContextCreate() to create a CG context from the
608         bits of the bitmap. Create a CG image from the context, and pass this
609         when creating a new BitmapImage.
610
611         * plugins/PluginView.cpp:
612         (WebCore::PluginView::start):
613         If we successfully started, tell our parent frame's Page.
614         (WebCore::PluginView::stop):
615         Tell our parent frame's Page that we stopped.
616         (WebCore::PluginView::node):
617
618         * plugins/PluginView.h:
619         Inherit from HaltablePlugin.
620         (WebCore::PluginView::setPlatformPluginWidget):
621         On platforms where the platform plug-in widget is the WebCore::Widget's
622         platform widget, have setPlatformPluginWidget() call
623         setPlatformWidget().
624
625         * plugins/PluginViewNone.cpp:
626         (WebCore::PluginView::halt):
627         Stubbed.
628         (WebCore::PluginView::restart):
629         Stubbed.
630
631         * plugins/gtk/PluginViewGtk.cpp:
632         (WebCore::PluginView::halt):
633         Stubbed.
634         (WebCore::PluginView::restart):
635         Stubbed.
636
637         * plugins/mac/PluginViewMac.cpp:
638         (WebCore::PluginView::halt):
639         Stubbed.
640         (WebCore::PluginView::restart):
641         Stubbed.
642
643         * plugins/qt/PluginViewQt.cpp:
644         (WebCore::PluginView::halt):
645         Stubbed.
646         (WebCore::PluginView::restart):
647         Stubbed.
648
649         * plugins/win/PluginViewWin.cpp:
650         (WebCore::PluginView::platformDestroy):
651         After destroying the window, set the platform plug-in widget to 0 to
652         ensure that Widget isn't holding a stale handle.
653         (WebCore::PluginView::halt):
654         Have our element's RenderWidget display a screenshot of the plug-in,
655         then stop the plug-in and destroy it.
656         (WebCore::PluginView::restart):
657         Clear the RenderWidget's substitute image, then start the plug-in.
658
659         * rendering/RenderWidget.cpp:
660         (WebCore::RenderWidget::showSubstituteImage):
661         Set m_substituteImage to the passed image, and repaint.
662         (WebCore::RenderWidget::paint):
663         If we have a substitute image, paint that instead of allowing the
664         widget to paint itself.
665
666         * rendering/RenderWidget.h:
667         Declare showSubstituteImage(). Added a member to store the substitute
668         image.
669
670 2009-10-02  Adam Barth  <abarth@webkit.org>
671
672         Reviewed by Darin Adler.
673
674         Move PolicyCheck out of FrameLoader.{h,cpp}
675         https://bugs.webkit.org/show_bug.cgi?id=30035
676
677         Purely code motion (and adding a destructor).
678
679         * GNUmakefile.am:
680         * WebCore.gypi:
681         * WebCore.pro:
682         * WebCore.vcproj/WebCore.vcproj:
683         * WebCore.xcodeproj/project.pbxproj:
684         * loader/FrameLoader.cpp:
685         * loader/FrameLoader.h:
686         * loader/PolicyCheck.cpp:
687         * loader/PolicyCheck.h:
688
689 2009-10-02  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
690
691         Reviewed by Tor Arne Vestbø.
692
693         [Qt] Add NPNVToolkit value quirk in plugins for nspluginwrapper.
694         Plugin error message was:
695         ERROR: failed to initialize brower-side RPC events listener
696         https://bugs.webkit.org/show_bug.cgi?id=25053
697
698         (WebCore::staticPluginQuirkRequiresGtkToolKit_NPN_GetValue):
699         (WebCore::PluginPackage::load):
700
701 2009-10-02  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
702
703         Reviewed by Tor Arne Vestbø.
704
705         [Qt] X sync our XEmbed container window creation before sending the
706         xid to plugins.
707         https://bugs.webkit.org/show_bug.cgi?id=25053
708
709         * plugins/qt/PluginViewQt.cpp:
710         (WebCore::PluginView::setNPWindowIfNeeded):
711
712 2009-10-02  Simon Fraser  <simon.fraser@apple.com>
713
714         Reviewed by Dan Bernstein.
715
716         Setting zero size on a container of a video element doesn't hide the controller
717         https://bugs.webkit.org/show_bug.cgi?id=30031
718         
719         Fix a logic error in enclosingCompositingLayer() when mixing normal flow and 
720         positioned layers. This resulted in enclosingCompositingLayer() giving back a different
721         answer to the logic used to actually parent compositing layers, so layer positions
722         and layer hierarchy would be out of agreement.
723         
724         Test: compositing/geometry/clipped-video-controller.html
725
726         * rendering/RenderLayer.cpp:
727         (WebCore::compositingContainer):
728         (WebCore::RenderLayer::enclosingCompositingLayer):
729         * rendering/RenderLayerCompositor.cpp:
730         (WebCore::RenderLayerCompositor::setCompositingParent):
731
732 2009-10-02  Kent Tamura  <tkent@chromium.org>
733
734         Reviewed by Eric Seidel.
735
736         - Move the following methods of HTMLInputElement and HTMLTextAreaElement
737           to HTMLTextFormControlElement.
738            setSelectionStart()
739            setSelectionEnd()
740            select()
741            setSelectionRange()
742            selectionStart()
743            selectionEnd()
744            selection()
745
746         - Introduce cachedSelectionStart() and cachedSelectionEnd().
747
748         - Unify HTMLInputElement::isTextFieldWithRenderer() and
749          HTMLTextAreaElement::rendererAfterUpdateLayout() into textRendererAfterUpdateLayout().
750         
751         - Unify a part of parseMappedAttribute() of HTMLInputElement and HTMLTextAreaElement.
752
753         https://bugs.webkit.org/show_bug.cgi?id=29782
754
755         * html/HTMLFormControlElement.cpp:
756         (WebCore::HTMLTextFormControlElement::textRendererAfterUpdateLayout):
757         (WebCore::HTMLTextFormControlElement::setSelectionStart):
758         (WebCore::HTMLTextFormControlElement::setSelectionEnd):
759         (WebCore::HTMLTextFormControlElement::select):
760         (WebCore::HTMLTextFormControlElement::setSelectionRange):
761         (WebCore::HTMLTextFormControlElement::selectionStart):
762         (WebCore::HTMLTextFormControlElement::selectionEnd):
763         (WebCore::HTMLTextFormControlElement::selection):
764         (WebCore::HTMLTextFormControlElement::parseMappedAttribute):
765         * html/HTMLFormControlElement.h:
766         * html/HTMLInputElement.cpp:
767         (WebCore::HTMLInputElement::parseMappedAttribute):
768         * html/HTMLInputElement.h:
769         (WebCore::HTMLInputElement::select):
770         (WebCore::HTMLInputElement::cachedSelectionStart):
771         (WebCore::HTMLInputElement::cachedSelectionEnd):
772         * html/HTMLTextAreaElement.cpp:
773         (WebCore::HTMLTextAreaElement::parseMappedAttribute):
774         * html/HTMLTextAreaElement.h:
775         (WebCore::HTMLTextAreaElement::cachedSelectionStart):
776         (WebCore::HTMLTextAreaElement::cachedSelectionEnd):
777
778 2009-10-02  Vitaly Repeshko  <vitalyr@chromium.org>
779
780         Reviewed by Dimitri Glazkov.
781
782         [V8] Disconnect event listeners on navigation.
783         Fixes http://crbug.com/23597.
784         https://bugs.webkit.org/show_bug.cgi?id=30027
785
786         Added V8ListenerGuard that is shared by listeners and proxy. On
787         navigation proxy sets a flag in the guard turning off listeners.
788
789         * bindings/v8/V8AbstractEventListener.cpp:
790         (WebCore::V8AbstractEventListener::V8AbstractEventListener):
791         * bindings/v8/V8AbstractEventListener.h:
792         (WebCore::V8ListenerGuard::create):
793         (WebCore::V8ListenerGuard::isDisconnected):
794         (WebCore::V8ListenerGuard::disconnectListeners):
795         (WebCore::V8ListenerGuard::V8ListenerGuard):
796         (WebCore::V8AbstractEventListener::disconnected):
797         * bindings/v8/V8DOMWrapper.cpp:
798         (WebCore::V8DOMWrapper::getEventListener):
799         * bindings/v8/V8EventListenerList.h:
800         (WebCore::V8EventListenerList::findOrCreateWrapper):
801         * bindings/v8/V8LazyEventListener.cpp:
802         (WebCore::V8LazyEventListener::V8LazyEventListener):
803         * bindings/v8/V8Proxy.cpp:
804         (WebCore::V8Proxy::V8Proxy):
805         (WebCore::V8Proxy::disconnectFrame):
806         (WebCore::V8Proxy::disconnectEventListeners):
807         (WebCore::V8Proxy::clearForNavigation):
808         * bindings/v8/V8Proxy.h:
809         (WebCore::V8Proxy::listenerGuard):
810         * bindings/v8/V8WorkerContextEventListener.cpp:
811         (WebCore::V8WorkerContextEventListener::V8WorkerContextEventListener):
812         * bindings/v8/V8WorkerContextEventListener.h:
813         (WebCore::V8WorkerContextEventListener::create):
814         * bindings/v8/WorkerContextExecutionProxy.cpp:
815         (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
816         (WebCore::WorkerContextExecutionProxy::dispose):
817         (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
818         * bindings/v8/WorkerContextExecutionProxy.h:
819         * bindings/v8/custom/V8CustomEventListener.cpp:
820         (WebCore::V8EventListener::V8EventListener):
821         * bindings/v8/custom/V8CustomEventListener.h:
822         (WebCore::V8EventListener::create):
823
824 2009-10-02  Kenneth Russell  <kbr@google.com>
825
826         Reviewed by Dimitri Glazkov.
827
828         [chromium] Fix WebGL build after CustomGetter constructor changes
829         https://bugs.webkit.org/show_bug.cgi?id=30020
830
831         * page/DOMWindow.idl:
832         Changed CustomGetter to JSCCustomGetter for CanvasArray constructors.
833
834 2009-10-02  Patrick Mueller  <Patrick_Mueller@us.ibm.com>
835
836         Reviewed by Timothy Hatcher.
837
838         Web Inspector: text in a "Request Payload" section disappears on selection
839         https://bugs.webkit.org/show_bug.cgi?id=29967
840
841         No new tests.
842
843         * inspector/front-end/ResourceView.js:
844         (WebInspector.ResourceView.prototype._refreshRequestPayload):
845
846 2009-10-02  Vitaly Repeshko  <vitalyr@chromium.org>
847
848         Reviewed by Dimitri Glazkov.
849
850         [V8] Recursion guard for V8Proxy::callFunction.
851         Fixes http://crbug.com/23278.
852         https://bugs.webkit.org/show_bug.cgi?id=29974
853
854         Test: fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html
855
856         * bindings/v8/V8Proxy.cpp:
857         (WebCore::V8Proxy::callFunction):
858
859 2009-10-02  Brian Weinstein  <bweinstein@apple.com>
860
861         Reviewed by Jon Honeycutt.
862
863         Fix test breakages by adding null checks, and putting inspector code in
864         ENABLE(INSPECTOR).
865
866         * dom/Document.cpp:
867         (WebCore::Document::finishedParsing):
868         * page/DOMWindow.cpp:
869         (WebCore::DOMWindow::dispatchLoadEvent):
870
871 2009-10-02  Kenneth Rohde Christiansen  <kenneth@webkit.org>
872
873         Reviewed by Simon Hausmann.
874
875         Clean up the QNetworkReplyHandler to only apply HTTP headers
876         for protocols in the HTTP family.
877
878         * platform/network/qt/QNetworkReplyHandler.cpp:
879         (WebCore::QNetworkReplyHandler::finish):
880         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
881
882 2009-10-02  Kenneth Rohde Christiansen  <kenneth@webkit.org>
883
884         Reviewed by Simon Hausmann.
885
886         Move error check into sendResponseIfNeeded() as suggested
887         by Eric Seidel. Also, remove some dead code.
888
889         * platform/network/qt/QNetworkReplyHandler.cpp:
890         (WebCore::QNetworkReplyHandler::finish):
891         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
892
893 2009-10-02  Enrica Casucci  <enrica@apple.com>
894
895         Reviewed by Adele Peterson.
896
897         Assertion failure in CompositeEditCommand::moveParagraphs() and crash in Node::nodeIndex() when pasting.
898         <rdar://problem/7148712>
899         https://bugs.webkit.org/show_bug.cgi?id=28992
900
901         Test: editing/selection/replace-selection-crash.html
902
903         * editing/ReplaceSelectionCommand.cpp:
904         (WebCore::ReplaceSelectionCommand::mergeEndIfNeeded): Handle properly the case of
905         the destination position matching the end of the paragraph to move.
906
907 2009-10-02  Jeremy Orlow  <jorlow@chromium.org>
908
909         Reviewed by Dimitri Glazkov.
910
911         Implement per-storage-area quotas for LocalStorage
912         https://bugs.webkit.org/show_bug.cgi?id=29991
913
914         I put 90% of the code in StorageMap since the decision to allow an update is
915         closely tied to quota tracking.  The quota is set via a page's Settings class.
916         Like with the local storage path and whether it's enabled, it's assumed that
917         all pages in the same group will have the same settings.  The setting defaults
918         to 5mb which is what the spec suggests, but it can easily be changed to
919         anything else--including StorageMap::noQuota.  Any values in LocalStorage are
920         grandfathered in regarudless of quota, so importItem only tracks (and will
921         never block) imports.
922
923         I believe this change is a good transition to more complex quota management.
924         For example, if we wanted to track quotas in the SQLite DB, then we'd just add
925         a function to the StorageMap that sets the quota.  This would be fine since all
926         use of LocalStorage is blocked on the import completing, so you'd never hit a
927         quota error in the mean time.  Also, if embedders wanted to ask the user
928         whether to expand the quota whenever it's hit (before deciding whether or not
929         to raise an exception), a callback via the chrome client should be fairly easy.
930         That said, I think it's best to add these features in steps rather than one
931         huge patch.  (Both of these are on my TODO list, btw.)
932
933         Included is a layout test that verifies the behavior.  It assumes the default
934         quota is 5mb (since that's what Settings defaults to).
935
936         Test: storage/domstorage/localstorage/quota.html
937
938         * page/PageGroup.cpp:
939         (WebCore::PageGroup::localStorage):
940         * page/Settings.cpp:
941         (WebCore::Settings::Settings):
942         (WebCore::Settings::setLocalStorageQuota):
943         * page/Settings.h:
944         (WebCore::Settings::localStorageQuota):
945         * storage/StorageAreaImpl.cpp:
946         (WebCore::StorageAreaImpl::create):
947         (WebCore::StorageAreaImpl::StorageAreaImpl):
948         (WebCore::StorageAreaImpl::setItem):
949         (WebCore::StorageAreaImpl::clear):
950         * storage/StorageAreaImpl.h:
951         * storage/StorageMap.cpp:
952         (WebCore::StorageMap::create):
953         (WebCore::StorageMap::StorageMap):
954         (WebCore::StorageMap::copy):
955         (WebCore::StorageMap::setItem):
956         (WebCore::StorageMap::removeItem):
957         (WebCore::StorageMap::importItem):
958         * storage/StorageMap.h:
959         (WebCore::StorageMap::quota):
960         * storage/StorageNamespace.cpp:
961         (WebCore::StorageNamespace::localStorageNamespace):
962         * storage/StorageNamespace.h:
963         * storage/StorageNamespaceImpl.cpp:
964         (WebCore::StorageNamespaceImpl::localStorageNamespace):
965         (WebCore::StorageNamespaceImpl::sessionStorageNamespace):
966         (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
967         (WebCore::StorageNamespaceImpl::copy):
968         (WebCore::StorageNamespaceImpl::storageArea):
969         * storage/StorageNamespaceImpl.h:
970
971 2009-10-02  Joseph Pecoraro  <joepeck@webkit.org>
972
973         Reviewed by Timothy Hatcher.
974
975         Database Inspector crashes Safari when table has more than 21 columns
976         https://bugs.webkit.org/show_bug.cgi?id=29924
977
978         * inspector/front-end/StoragePanel.js:
979         (WebInspector.StoragePanel.prototype.dataGridForResult): adjust the minimum column width percentage to be flexible for many columns.
980
981 2009-10-02  Brian Weinstein  <bweinstein@apple.com>
982
983         Reviewed by Timothy Hatcher.
984
985         Fixes <http://webkit.org/b/14370>.
986         Inspector's timeline should record when certain DOM events fired.
987         
988         This patch adds calls into the Web Inspector when the main frame
989         fires an load event, and when the document fires its DOMContent
990         event. Once these values are passed in, they are sent to the Web Inspector
991         as a timing change, and these are denoted by vertical lines in the resources
992         panel (blue for DOM Content, red for load event).
993
994         * English.lproj/localizedStrings.js: Added tooltip text.
995         * dom/Document.cpp:
996         (WebCore::Document::finishedParsing): Added an Inspector callback for DOM Content.
997         * inspector/InspectorController.cpp:
998         (WebCore::InspectorController::mainResourceFiredDOMContentEvent): Tell the main resource it got the event.
999         (WebCore::InspectorController::mainResourceFiredLoadEvent): Ditto.
1000         * inspector/InspectorController.h:
1001         * inspector/InspectorResource.cpp:
1002         (WebCore::InspectorResource::InspectorResource): Added new variables.
1003         (WebCore::InspectorResource::updateScriptObject): Send new variables to inspector.js.
1004         (WebCore::InspectorResource::markDOMContentEventTime): Send a TimingChange event.
1005         (WebCore::InspectorResource::markLoadEventTime): Ditto.
1006         * inspector/InspectorResource.h:
1007         * inspector/front-end/ResourcesPanel.js:
1008         (WebInspector.ResourcesPanel.prototype.get mainResourceLoadTime):
1009         (WebInspector.ResourcesPanel.prototype.set mainResourceLoadTime):
1010         (WebInspector.ResourcesPanel.prototype.get mainResourceDOMContentTime):
1011         (WebInspector.ResourcesPanel.prototype.set mainResourceDOMContentTime):
1012         (WebInspector.ResourcesPanel.prototype.reset):
1013         (WebInspector.ResourcesPanel.prototype._updateGraphDividersIfNeeded): Draw dividers for event timings.
1014         (WebInspector.ResourceTimeCalculator.prototype.computePercentageFromEventTime):
1015         * inspector/front-end/inspector.css:
1016         * inspector/front-end/inspector.js:
1017         (WebInspector.updateResource):
1018         * page/DOMWindow.cpp:
1019         (WebCore::DOMWindow::dispatchLoadEvent): Add an Inspector callback for the Load event.
1020
1021 2009-10-02  Dave Hyatt  <hyatt@apple.com>
1022
1023         Reviewed by Adam Roben.
1024
1025         Add support for blacklist patterns to user stylesheets and scripts in addition to whitelist patterns.
1026
1027         * WebCore.base.exp:
1028         * dom/Document.cpp:
1029         (WebCore::Document::pageGroupUserSheets):
1030         * page/Frame.cpp:
1031         (WebCore::Frame::injectUserScriptsForWorld):
1032         * page/PageGroup.cpp:
1033         (WebCore::PageGroup::addUserScript):
1034         (WebCore::PageGroup::addUserStyleSheet):
1035         (WebCore::PageGroup::removeUserContentWithURLForWorld):
1036         (WebCore::PageGroup::removeUserContentForWorld):
1037         * page/PageGroup.h:
1038         * page/UserContentURLPattern.cpp:
1039         (WebCore::UserContentURLPattern::matchesPatterns):
1040         * page/UserContentURLPattern.h:
1041         * page/UserScript.h:
1042         (WebCore::UserScript::UserScript):
1043         (WebCore::UserScript::whitelist):
1044         (WebCore::UserScript::blacklist):
1045         * page/UserStyleSheet.h:
1046         (WebCore::UserStyleSheet::UserStyleSheet):
1047         (WebCore::UserStyleSheet::whitelist):
1048         (WebCore::UserStyleSheet::blacklist):
1049
1050 2009-10-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1051
1052         Reviewed by Darin Adler.
1053
1054         Build fix when SVG is not enabled
1055         https://bugs.webkit.org/show_bug.cgi?id=30011
1056
1057         Move TextRenderingMode related functions out from
1058         the ENABLE(SVG) guard.
1059
1060         * css/CSSPrimitiveValueMappings.h:
1061         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1062         (WebCore::CSSPrimitiveValue::operator TextRenderingMode):
1063
1064 2009-10-02  Kenneth Russell  <kbr@google.com>
1065
1066         Reviewed by Oliver Hunt.
1067
1068         WebGL crashes with recent CanvasArray change
1069         https://bugs.webkit.org/show_bug.cgi?id=30018
1070
1071         Test: fast/canvas/webgl/array-unit-tests.html
1072
1073         * html/canvas/CanvasArray.cpp:
1074         (WebCore::CanvasArray::CanvasArray):
1075         Fix bug where PassRefPtr was tested after transferring value to RefPtr.
1076
1077 2009-10-02  Steve Falkenburg  <sfalken@apple.com>
1078
1079         Reviewed by Mark Rowe.
1080
1081         <https://bugs.webkit.org/show_bug.cgi?id=29989>
1082         Safari version number shouldn't be exposed in WebKit code
1083         
1084         For a WebKit version of 532.3.4:
1085         Product version is: 5.32.3.4 (was 4.0.3.0)
1086         File version is: 5.32.3.4 (was 4.532.3.4)
1087
1088         * WebCore.vcproj/QTMovieWin.rc:
1089
1090 2009-10-02  Stephen White  <senorblanco@chromium.org>
1091
1092         Reviewed by Dimitri Glazkov.
1093
1094         Enable two point radial gradients in Chromium/Skia.
1095
1096         https://bugs.webkit.org/show_bug.cgi?id=30017
1097
1098         Covered by the following tests:
1099
1100         LayoutTests/svg/W3C-SVG-1.1/pservers-grad-13-b.svg
1101         LayoutTests/fast/backgrounds/svg-as-background-3.html
1102         LayoutTests/fast/gradients/generated-gradients.html
1103         LayoutTests/fast/gradients/simple-gradients.html
1104
1105         * platform/graphics/skia/GradientSkia.cpp:
1106         (WebCore::Gradient::platformGradient):
1107
1108 2009-10-02  Norbert Leser  <norbert.leser@nokia.com>
1109
1110         Reviewed by Simon Hausmann.
1111
1112         Conditionally guard cursor code (cursor and updateCursor functions) with !QT_NO_CURSOR.
1113         Otherwise, it is inconsistent with class declaration of QCursor.
1114
1115         No new tests.
1116
1117         * platform/qt/QWebPageClient.h:
1118
1119 2009-10-02  Philippe Normand  <pnormand@igalia.com>
1120
1121         Reviewed by Gustavo Noronha.
1122
1123         [GTK] missing support for anamorphic PAR video size
1124         https://bugs.webkit.org/show_bug.cgi?id=29717
1125
1126         cleanup of caps handling in the video sink
1127
1128         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
1129         (webkit_video_sink_set_caps):
1130
1131 2009-10-02  Prasanth Ullattil  <prasanth.ullattil@nokia.com>
1132
1133         Reviewed by Simon Hausmann.
1134
1135         Fix compiler warnings about unused function arguments.
1136
1137         * bridge/qt/qt_class.h:
1138         * bridge/qt/qt_runtime.cpp:
1139         (JSC::Bindings::QtRuntimeMetaMethod::call):
1140         (JSC::Bindings::QtRuntimeConnectionMethod::call):
1141         * dom/XMLTokenizerQt.cpp:
1142         (WebCore::XMLTokenizer::initializeParserContext):
1143         * platform/graphics/qt/FontCacheQt.cpp:
1144         (WebCore::FontCache::getTraitsInFamily):
1145         (WebCore::FontCache::getCachedFontPlatformData):
1146         * platform/graphics/qt/FontFallbackListQt.cpp:
1147         (WebCore::FontFallbackList::setPlatformFont):
1148         * platform/graphics/qt/FontQt.cpp:
1149         (WebCore::Font::offsetForPositionForComplexText):
1150         * platform/graphics/qt/GraphicsContextQt.cpp:
1151         (WebCore::GraphicsContext::drawLineForText):
1152         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1153         (WebCore::GraphicsContext::setPlatformShadow):
1154         (WebCore::GraphicsContext::setURLForRect):
1155         * platform/graphics/qt/IconQt.cpp:
1156         (WebCore::Icon::createIconForFiles):
1157         * platform/graphics/qt/ImageBufferQt.cpp:
1158         (WebCore::ImageBuffer::ImageBuffer):
1159         * platform/graphics/qt/ImageDecoderQt.cpp:
1160         (WebCore::ImageDecoderQt::frameBufferAtIndex):
1161         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
1162         (WebCore::MediaPlayerPrivate::supportsType):
1163         (WebCore::MediaPlayerPrivate::setEndTime):
1164         * platform/graphics/qt/SimpleFontDataQt.cpp:
1165         (WebCore::SimpleFontData::containsCharacters):
1166         * platform/graphics/qt/StillImageQt.h:
1167         (WebCore::StillImage::destroyDecodedData):
1168         * platform/network/qt/DnsPrefetchHelper.h:
1169         (WebCore::DnsPrefetchHelper::lookedUp):
1170         * platform/qt/ContextMenuQt.cpp:
1171         (WebCore::ContextMenu::setPlatformDescription):
1172         * platform/qt/DragDataQt.cpp:
1173         (WebCore::DragData::asURL):
1174         * platform/qt/PopupMenuQt.cpp:
1175         (WebCore::PopupMenu::populate):
1176         * platform/qt/RenderThemeQt.cpp:
1177         (WebCore::RenderThemeQt::supportsFocusRing):
1178         (WebCore::RenderThemeQt::systemFont):
1179         (WebCore::RenderThemeQt::adjustButtonStyle):
1180         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
1181         (WebCore::RenderThemeQt::paintMediaSeekBackButton):
1182         (WebCore::RenderThemeQt::paintMediaSeekForwardButton):
1183         * platform/qt/ScrollViewQt.cpp:
1184         (WebCore::ScrollView::platformAddChild):
1185         * platform/qt/SearchPopupMenuQt.cpp:
1186         (WebCore::SearchPopupMenu::saveRecentSearches):
1187         (WebCore::SearchPopupMenu::loadRecentSearches):
1188         * platform/qt/TemporaryLinkStubs.cpp:
1189         (WebCore::signedPublicKeyAndChallengeString):
1190         * platform/qt/WidgetQt.cpp:
1191         (WebCore::Widget::paint):
1192         * xml/XSLStyleSheetQt.cpp:
1193         (WebCore::XSLStyleSheet::loadChildSheet):
1194         (WebCore::XSLStyleSheet::setParentStyleSheet):
1195         * xml/XSLTProcessorQt.cpp:
1196         (WebCore::XSLTMessageHandler::handleMessage):
1197         (WebCore::XSLTProcessor::transformToString):
1198
1199 2009-10-02  Ben Murdoch  <benm@google.com>
1200
1201         Reviewed by David Kilzer.
1202
1203         Stale database version persists through browser refresh (changeVersion doesn't work)
1204         https://bugs.webkit.org/show_bug.cgi?id=27836
1205
1206         Scale the cairo surface of the video sink depending on the
1207         pixel-aspect-ratio of the video buffer to paint. Also
1208         destruct/re-create the surface when setSize() is called with a new
1209         size.
1210
1211         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
1212         (WebCore::MediaPlayerPrivate::naturalSize):
1213         (WebCore::MediaPlayerPrivate::setSize):
1214         (WebCore::MediaPlayerPrivate::paint):
1215         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
1216         (webkit_video_sink_idle_func):
1217
1218 2009-10-02  Philippe Normand  <pnormand@igalia.com>
1219
1220         Reviewed by Gustavo Noronha.
1221
1222         [GTK] missing support for anamorphic PAR video size
1223         https://bugs.webkit.org/show_bug.cgi?id=29717
1224
1225         Tests: storage/change-version-handle-reuse.html
1226                storage/change-version.html
1227
1228         * bindings/v8/custom/V8DatabaseCustom.cpp:
1229         (WebCore::CALLBACK_FUNC_DECL): Implement the V8 binding for database.changeVersion().
1230         (WebCore::createTransaction): Fix a bug that was checking the wrong argument index to save the success callback.
1231         * storage/Database.cpp:
1232         (WebCore::updateGuidVersionMap): Safely update the Guid/version hash map.
1233         (WebCore::Database::~Database): Remove code that removes the database from the guid->database and guid->version maps.
1234         (WebCore::Database::setVersionInDatabase): Add a comment to explain some behaviour.
1235         (WebCore::Database::close): Move the code that updates the maps from the destructor to here.
1236         (WebCore::Database::performOpenAndVerify): Call updateGuidVersionMap instead of setting the hash map directly.
1237         (WebCore::Database::setExpectedVersion): Update the in memory guid->version map when we want to update the database version.
1238
1239 2009-10-02  Janne Koskinen <janne.p.koskinen@digia.com>
1240
1241         Reviewed by Simon Hausmann.
1242
1243         Partial WINSCW build fix.
1244
1245         Add parentheses around the function pointer declaration, similar to the
1246         second hunk in r48825.
1247
1248         * loader/CachedResourceHandle.h:
1249
1250 2009-10-02  Adam Barth  <abarth@webkit.org>
1251
1252         Unreviewed attempted build fix by Xcode magic.
1253
1254         * WebCore.xcodeproj/project.pbxproj:
1255
1256 2009-10-02  Adam Barth  <abarth@webkit.org>
1257
1258         Unreviewed build fix.  Actually add the new files.
1259
1260         * loader/RedirectScheduler.cpp: Added.
1261         (WebCore::ScheduledRedirection::):
1262         (WebCore::ScheduledRedirection::ScheduledRedirection):
1263         (WebCore::RedirectScheduler::RedirectScheduler):
1264         (WebCore::RedirectScheduler::~RedirectScheduler):
1265         (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
1266         (WebCore::RedirectScheduler::clear):
1267         (WebCore::RedirectScheduler::scheduleRedirect):
1268         (WebCore::RedirectScheduler::mustLockBackForwardList):
1269         (WebCore::RedirectScheduler::scheduleLocationChange):
1270         (WebCore::RedirectScheduler::scheduleFormSubmission):
1271         (WebCore::RedirectScheduler::scheduleRefresh):
1272         (WebCore::RedirectScheduler::locationChangePending):
1273         (WebCore::RedirectScheduler::scheduleHistoryNavigation):
1274         (WebCore::RedirectScheduler::timerFired):
1275         (WebCore::RedirectScheduler::schedule):
1276         (WebCore::RedirectScheduler::startTimer):
1277         (WebCore::RedirectScheduler::cancel):
1278         * loader/RedirectScheduler.h: Added.
1279
1280 2009-10-01  Adam Barth  <abarth@webkit.org>
1281
1282         Reviewed by Darin Adler.
1283
1284         Move RedirectScheduler to its own file
1285         https://bugs.webkit.org/show_bug.cgi?id=29952
1286
1287         This change is purely code motion.
1288
1289         No behavior change.
1290
1291         * GNUmakefile.am:
1292         * WebCore.gypi:
1293         * WebCore.pro:
1294         * WebCore.vcproj/WebCore.vcproj:
1295         * WebCore.xcodeproj/project.pbxproj:
1296         * WebCoreSources.bkl:
1297         * loader/FrameLoader.cpp:
1298         * loader/FrameLoader.h:
1299         * loader/RedirectScheduler.cpp: Added.
1300         (WebCore::ScheduledRedirection::):
1301         (WebCore::ScheduledRedirection::ScheduledRedirection):
1302         (WebCore::RedirectScheduler::RedirectScheduler):
1303         (WebCore::RedirectScheduler::~RedirectScheduler):
1304         (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
1305         (WebCore::RedirectScheduler::clear):
1306         (WebCore::RedirectScheduler::scheduleRedirect):
1307         (WebCore::RedirectScheduler::mustLockBackForwardList):
1308         (WebCore::RedirectScheduler::scheduleLocationChange):
1309         (WebCore::RedirectScheduler::scheduleFormSubmission):
1310         (WebCore::RedirectScheduler::scheduleRefresh):
1311         (WebCore::RedirectScheduler::locationChangePending):
1312         (WebCore::RedirectScheduler::scheduleHistoryNavigation):
1313         (WebCore::RedirectScheduler::timerFired):
1314         (WebCore::RedirectScheduler::schedule):
1315         (WebCore::RedirectScheduler::startTimer):
1316         (WebCore::RedirectScheduler::cancel):
1317         * loader/RedirectScheduler.h: Added.
1318
1319 2009-10-02  Dave MacLachlan  <dmaclach@gmail.com>
1320
1321         Reviewed by David Levin.
1322
1323         Clean up warnings in WebCore/bindings/v8/npruntime.cpp
1324         https://bugs.webkit.org/show_bug.cgi?id=29971
1325
1326         Gets rid of warnings on gcc about using anonymous namespaces 
1327           warning: 'StringKeyHashTraits' has a base
1328           'WTF::GenericHashTraits<<unnamed>::StringKey>' 
1329           whose type uses the anonymous namespace
1330         and
1331           warning: 'WTF::PairHashTraits<StringKeyHashTraits,
1332           WTF::HashTraits<PrivateIdentifier*> >' has a base
1333           'WTF::GenericHashTraits<std::pair<<unnamed>::StringKey,
1334           PrivateIdentifier*> >' whose type uses the anonymous namespace
1335
1336         No tests required.
1337
1338         * bindings/v8/npruntime.cpp:
1339
1340 2009-10-01  Mark Rowe  <mrowe@apple.com>
1341
1342         Fix the Tiger build.  Don't unconditionally enable 3D canvas as it is not supported on Tiger.
1343
1344         * Configurations/FeatureDefines.xcconfig:
1345
1346 2009-10-01  Chris Marrin  <cmarrin@apple.com>
1347
1348         Reviewed by Oliver Hunt.
1349
1350         Turn on ENABLE_3D_CANVAS in TOT
1351         https://bugs.webkit.org/show_bug.cgi?id=29906
1352
1353         Fixed a bug found when running tests with flag on
1354
1355         * Configurations/FeatureDefines.xcconfig:
1356         * WebCore.base.exp:
1357         * bindings/js/JSCanvasArrayBufferConstructor.h:
1358         (WebCore::construct):
1359         * html/HTMLCanvasElement.cpp:
1360         (WebCore::HTMLCanvasElement::getContext):
1361         * html/canvas/CanvasArray.cpp:
1362         (WebCore::CanvasArray::CanvasArray):
1363         * html/canvas/CanvasByteArray.cpp:
1364         (WebCore::CanvasByteArray::create):
1365         * html/canvas/CanvasFloatArray.cpp:
1366         (WebCore::CanvasFloatArray::create):
1367         * html/canvas/CanvasIntArray.cpp:
1368         (WebCore::CanvasIntArray::create):
1369         * html/canvas/CanvasShortArray.cpp:
1370         (WebCore::CanvasShortArray::create):
1371         * html/canvas/CanvasUnsignedByteArray.cpp:
1372         (WebCore::CanvasUnsignedByteArray::create):
1373         * html/canvas/CanvasUnsignedIntArray.cpp:
1374         (WebCore::CanvasUnsignedIntArray::create):
1375         * html/canvas/CanvasUnsignedShortArray.cpp:
1376         (WebCore::CanvasUnsignedShortArray::create):
1377         * page/Settings.cpp:
1378         (WebCore::Settings::Settings):
1379         (WebCore::Settings::setWebGLEnabled):
1380         * page/Settings.h:
1381         (WebCore::Settings::webGLEnabled):
1382
1383 2009-10-01  Beth Dakin  <bdakin@apple.com>
1384
1385         Reviewed by Dan Bernstein.
1386
1387         Fix for <rdar://problem/7264725> Re-add a vendor prefix to box-
1388         shadow (29927)
1389         -and corresponding-
1390         https://bugs.webkit.org/show_bug.cgi?id=29927
1391
1392         * css/CSSComputedStyleDeclaration.cpp:
1393         (WebCore::):
1394         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1395         * css/CSSParser.cpp:
1396         (WebCore::CSSParser::parseValue):
1397         (WebCore::ShadowParseContext::ShadowParseContext):
1398         (WebCore::ShadowParseContext::commitValue):
1399         (WebCore::ShadowParseContext::commitLength):
1400         (WebCore::ShadowParseContext::commitColor):
1401         (WebCore::cssPropertyID):
1402         * css/CSSPropertyNames.in:
1403         * css/CSSStyleSelector.cpp:
1404         (WebCore::CSSStyleSelector::applyProperty):
1405         * page/animation/AnimationBase.cpp:
1406         (WebCore::ensurePropertyMap):
1407
1408 2009-10-01  Beth Dakin  <bdakin@apple.com>
1409
1410         Rubber-stamped by Sam Weinig.
1411
1412         At bad merge at some point in the development of my patch must have 
1413         put TextRenderMode.h in a weird spot in the xcodeproj. Moving it 
1414         back where it belongs!
1415
1416         * WebCore.xcodeproj/project.pbxproj:
1417
1418 2009-09-30  Adam Barth  <abarth@webkit.org>
1419
1420         Reviewed by Darin Adler.
1421
1422         Remove FrameLoader::schedule* APIs
1423         https://bugs.webkit.org/show_bug.cgi?id=29950
1424
1425         Change clients of FrameLoader::schedule* to call redirectScheduler
1426         directly.
1427
1428         No behavior change.
1429
1430         * bindings/js/JSDOMWindowCustom.cpp:
1431         (WebCore::JSDOMWindow::setLocation):
1432         (WebCore::createWindow):
1433         (WebCore::JSDOMWindow::open):
1434         * bindings/js/JSDocumentCustom.cpp:
1435         (WebCore::JSDocument::setLocation):
1436         * bindings/js/JSLocationCustom.cpp:
1437         (WebCore::navigateIfAllowed):
1438         (WebCore::JSLocation::reload):
1439         * bindings/v8/V8Utilities.cpp:
1440         (WebCore::navigateIfAllowed):
1441         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1442         (WebCore::createWindow):
1443         (WebCore::CALLBACK_FUNC_DECL):
1444         * bindings/v8/custom/V8LocationCustom.cpp:
1445         (WebCore::CALLBACK_FUNC_DECL):
1446         * dom/Document.cpp:
1447         (WebCore::Document::implicitClose):
1448         (WebCore::Document::processHttpEquiv):
1449         * html/HTMLTokenizer.cpp:
1450         (WebCore::HTMLTokenizer::write):
1451         * loader/FrameLoader.cpp:
1452         (WebCore::FrameLoader::requestFrame):
1453         (WebCore::FrameLoader::submitForm):
1454         (WebCore::FrameLoader::receivedFirstData):
1455         * loader/FrameLoader.h:
1456         * loader/appcache/ApplicationCacheGroup.cpp:
1457         (WebCore::ApplicationCacheGroup::selectCache):
1458         * page/History.cpp:
1459         (WebCore::History::back):
1460         (WebCore::History::forward):
1461         (WebCore::History::go):
1462
1463 2009-10-01  Beth Dakin  <bdakin@apple.com>
1464
1465         Just removing a comment I accidentally committed earlier. 
1466
1467         * platform/graphics/mac/SimpleFontDataMac.mm:
1468         (WebCore::SimpleFontData::getCFStringAttributes):
1469
1470 2009-09-30  Jeremy Orlow  <jorlow@chromium.org>
1471
1472         Reviewed by Darin Adler.
1473
1474         Clean up use of const and mutable in StorageMap
1475         https://bugs.webkit.org/show_bug.cgi?id=29933
1476
1477         What's the point of having every single member variable be mutable and nearly
1478         every method be const?  Let's clean it up.
1479
1480         * storage/StorageMap.cpp:
1481         (WebCore::StorageMap::setIteratorToIndex):
1482         (WebCore::StorageMap::key):
1483         (WebCore::StorageMap::importItem):
1484         * storage/StorageMap.h:
1485
1486 2009-10-01  Beth Dakin  <bdakin@apple.com>
1487
1488         Reviewed by Dave Hyatt.
1489
1490         Fix for <rdar://problem/6934421> Support CSS for Text Kerning and 
1491         ligature
1492         -and corresponding-
1493         https://bugs.webkit.org/show_bug.cgi?id=6136
1494
1495         This patch makes the SVG CSS property text-rendering work with any 
1496         HTML, much like it does in Firefox. It accepts four possible input 
1497         values: auto, optimizeSpeed, optimizeLegibility, and 
1498         geometricPrecision. Right now, in this implementation, here is what 
1499         those values correspond to:
1500
1501         auto = optimizeSpeed = what we normally when the value's not set
1502         optimizeLegibility = geometricPrecision = ligatures + kerning
1503
1504         Add new file TextRenderingMode.h to the project files.
1505         * WebCore.vcproj/WebCore.vcproj:
1506         * WebCore.xcodeproj/project.pbxproj:
1507
1508         CSS support for the new CSSPropertyTextRendering
1509         * css/CSSComputedStyleDeclaration.cpp:
1510         (WebCore::):
1511         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1512         * css/CSSParser.cpp:
1513         (WebCore::CSSParser::parseValue):
1514         * css/CSSPrimitiveValueMappings.h:
1515         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1516         (WebCore::CSSPrimitiveValue::operator TextRenderingMode):
1517         * css/CSSPropertyNames.in:
1518         * css/CSSStyleSelector.cpp:
1519         (WebCore::CSSStyleSelector::applyProperty):
1520         * css/CSSValueKeywords.in:
1521
1522         All the old SVG CSS support for this property can go away. When 
1523         it's used in SVG, it will just fall into the normal HTML case.
1524         * css/SVGCSSComputedStyleDeclaration.cpp:
1525         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
1526         * css/SVGCSSParser.cpp:
1527         (WebCore::CSSParser::parseSVGValue):
1528         * css/SVGCSSPropertyNames.in:
1529         * css/SVGCSSStyleSelector.cpp:
1530         (WebCore::CSSStyleSelector::applySVGProperty):
1531         * css/SVGCSSValueKeywords.in:
1532
1533         FontDescription stores the m_textRendering bit.
1534         * platform/graphics/FontDescription.h:
1535         (WebCore::FontDescription::FontDescription):
1536         (WebCore::FontDescription::textRenderingMode):
1537         (WebCore::FontDescription::setTextRenderingMode):
1538         (WebCore::FontDescription::operator==):
1539
1540         We want to fall into the complex text rendering code path if 
1541         kerning and ligatures have been enabled with this property.
1542         * platform/graphics/FontFastPath.cpp:
1543         (WebCore::Font::canUseGlyphCache):
1544
1545         Now takes a TextRenderingMode as a parameter.
1546         * platform/graphics/SimpleFontData.h:
1547
1548         New header for the enum.
1549         * platform/graphics/TextRenderingMode.h: Added.
1550         (WebCore::):
1551
1552         getCFStringAttributes() now takes a TextRenderingMode as an 
1553         attribute.
1554         * platform/graphics/mac/CoreTextController.cpp:
1555         (WebCore::CoreTextController::collectCoreTextRunsForCharacters):
1556
1557         Enable kerning and ligatures whenever the TextRenderingMode is 
1558         OptimizeLegibility or GeometricPrecision
1559         * platform/graphics/mac/FontMacATSUI.mm:
1560         (WebCore::disableLigatures):
1561         (WebCore::initializeATSUStyle):
1562         (WebCore::ATSULayoutParameters::initialize):
1563         * platform/graphics/mac/SimpleFontDataMac.mm:
1564         (WebCore::SimpleFontData::getCFStringAttributes):
1565
1566         More SVG CSS stuff that isn't needed anymore since SVG will use the 
1567         new HTML CSS implementation.
1568         * rendering/style/SVGRenderStyle.h:
1569         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
1570         (WebCore::SVGRenderStyle::setBitDefaults):
1571         * rendering/style/SVGRenderStyleDefs.h:
1572
1573 2009-10-01  Yury Semikhatsky  <yurys@chromium.org>
1574
1575         Reviewed by Timothy Hatcher.
1576
1577         Use isClosure property of scope proxy to decide whether the
1578         scope is a closure.
1579
1580         https://bugs.webkit.org/show_bug.cgi?id=29965
1581
1582         * inspector/front-end/ScopeChainSidebarPane.js:
1583         (WebInspector.ScopeChainSidebarPane.prototype.update):
1584
1585 2009-10-01  Simon Fraser  <simon.fraser@apple.com>
1586
1587         Reviewed by Dave Hyatt.
1588
1589         Odd color transitions on anchors with transition-property: all
1590         https://bugs.webkit.org/show_bug.cgi?id=29911
1591
1592         When transitioning maybe-invalid colors, if the source and destination
1593         color are both invalid, then don't animate.
1594         
1595         This fixes an issue where a child element of an element running a color
1596         transition, with -webkit-transition-property:all, would show a color change.
1597         This happened because the "maybe invalid color" logic copied the color style
1598         into -webkit-text-fill-color for both endpoints, causing -webkit-text-fill-color
1599         to animate while the transition ran, and to then to disappear when the transition
1600         finished.
1601         
1602         Test: transitions/color-transition-all.html
1603
1604         * page/animation/AnimationBase.cpp:
1605         (WebCore::PropertyWrapperMaybeInvalidColor::equals):
1606         (WebCore::PropertyWrapperMaybeInvalidColor::blend):
1607
1608 2009-10-01  Victor Wang  <victorw@chromium.org>
1609
1610         Reviewed by Oliver Hunt.
1611
1612         Allow dragging a node who has child nodes.
1613
1614         https://bugs.webkit.org/show_bug.cgi?id=28632
1615
1616         Test: fast/events/drag-parent-node.html
1617
1618         * page/EventHandler.cpp:
1619         (WebCore::EventHandler::shouldDragAutoNode):
1620
1621 2009-10-01  Philippe Normand  <pnormand@igalia.com>
1622
1623         Reviewed by Gustavo Noronha.
1624
1625         [GTK] media player: better mute support
1626         https://bugs.webkit.org/show_bug.cgi?id=29960
1627
1628         Handle volume and mute state with the two corresponding properties
1629         of playbin2.
1630
1631         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
1632         (WebCore::MediaPlayerPrivate::setMuted):
1633         (WebCore::MediaPlayerPrivate::setVolume):
1634
1635 2009-10-01  Philippe Normand  <pnormand@igalia.com>
1636
1637         Reviewed by Gustavo Noronha.
1638
1639         [GTK] video sink pad template colorspace is wrong
1640         https://bugs.webkit.org/show_bug.cgi?id=29953
1641
1642         Set sink pad template colorspace depending on byte order.
1643
1644         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
1645         (webkit_video_sink_idle_func):
1646
1647 2009-10-01  Vitaly Repeshko  <vitalyr@chromium.org>
1648
1649         Reviewed by Dimitri Glazkov.
1650
1651         [V8] Refactored V8 event listeners:
1652         (This change should fix http://crbug.com/21079 and
1653         https://bugs.webkit.org/show_bug.cgi?id=29093.)
1654          o All listeners use weak handles to JS objects to avoid creating
1655            cycles and leaking memory.
1656          o "Object" variants of listeners removed.
1657          o All event accessor callbacks are generated.
1658          o Custom event accessors removed.
1659          o All wrappers have hidden dependencies on their listeners to
1660            prevent listeners from being collected.
1661          o All variats of getEventListener function grouped in V8DOMWrapper.
1662          o Pointers to C++ EventListener wrappers are stored in JS objects
1663            instead of event listener lists.
1664         https://bugs.webkit.org/show_bug.cgi?id=29825
1665
1666         * WebCore.gypi: Removed "Object" listeners.
1667         * bindings/scripts/CodeGeneratorV8.pm: Now handles event accessors.
1668         * bindings/v8/DOMObjectsInclude.h:
1669
1670         V8AbstractEventListener manages weak JS handle:
1671         * bindings/v8/V8AbstractEventListener.cpp:
1672         (WebCore::weakEventListenerCallback):
1673         (WebCore::V8AbstractEventListener::V8AbstractEventListener):
1674         (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
1675         (WebCore::V8AbstractEventListener::handleEvent):
1676         (WebCore::V8AbstractEventListener::disposeListenerObject):
1677         (WebCore::V8AbstractEventListener::setListenerObject):
1678         * bindings/v8/V8AbstractEventListener.h:
1679         (WebCore::V8AbstractEventListener::cast):
1680         (WebCore::V8AbstractEventListener::isLazy):
1681         (WebCore::V8AbstractEventListener::getListenerObject):
1682         (WebCore::V8AbstractEventListener::getExistingListenerObject):
1683         (WebCore::V8AbstractEventListener::hasExistingListenerObject):
1684         (WebCore::V8AbstractEventListener::disconnectFrame):
1685         (WebCore::V8AbstractEventListener::disconnected):
1686         (WebCore::V8AbstractEventListener::prepareListenerObject):
1687         (WebCore::V8AbstractEventListener::lineNumber):
1688         (WebCore::V8AbstractEventListener::virtualisAttribute):
1689
1690         Grouped getEventListener functions:
1691         * bindings/v8/V8DOMWrapper.cpp:
1692         (WebCore::V8DOMWrapper::getTemplate):
1693         (WebCore::V8DOMWrapper::getEventListener):
1694         * bindings/v8/V8DOMWrapper.h:
1695
1696         Removed most event listener objects bookkeeping:
1697         * bindings/v8/V8EventListenerList.cpp:
1698         * bindings/v8/V8EventListenerList.h:
1699         (WebCore::V8EventListenerList::findWrapper):
1700         (WebCore::V8EventListenerList::clearWrapper):
1701         (WebCore::V8EventListenerList::doFindWrapper):
1702         (WebCore::V8EventListenerList::getHiddenProperty):
1703         (WebCore::V8EventListenerList::findOrCreateWrapper):
1704
1705         Added hidden properties for storing EventListener wrappers:
1706         * bindings/v8/V8HiddenPropertyName.cpp:
1707         (WebCore::V8HiddenPropertyName::listener):
1708         (WebCore::V8HiddenPropertyName::attributeListener):
1709         * bindings/v8/V8HiddenPropertyName.h:
1710
1711         * bindings/v8/V8LazyEventListener.cpp:
1712         (WebCore::V8LazyEventListener::V8LazyEventListener):
1713         (WebCore::V8LazyEventListener::callListenerFunction):
1714         (WebCore::V8LazyEventListener::prepareListenerObject):
1715         * bindings/v8/V8LazyEventListener.h:
1716         (WebCore::V8LazyEventListener::isLazy):
1717         * bindings/v8/V8ObjectEventListener.cpp: Removed.
1718         * bindings/v8/V8ObjectEventListener.h: Removed.
1719         * bindings/v8/V8Proxy.cpp:
1720         (WebCore::V8Proxy::disconnectFrame):
1721         (WebCore::V8Proxy::disconnectEventListeners):
1722         * bindings/v8/V8Proxy.h:
1723         * bindings/v8/V8WorkerContextEventListener.cpp:
1724         (WebCore::V8WorkerContextEventListener::reportError):
1725         (WebCore::V8WorkerContextEventListener::getReceiverObject):
1726         * bindings/v8/V8WorkerContextEventListener.h:
1727         * bindings/v8/V8WorkerContextObjectEventListener.cpp: Removed.
1728         * bindings/v8/V8WorkerContextObjectEventListener.h: Removed.
1729         * bindings/v8/WorkerContextExecutionProxy.cpp:
1730         (WebCore::WorkerContextExecutionProxy::dispose):
1731         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
1732         (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
1733         * bindings/v8/WorkerContextExecutionProxy.h:
1734         * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
1735         (WebCore::CALLBACK_FUNC_DECL):
1736         * bindings/v8/custom/V8CustomBinding.h:
1737         * bindings/v8/custom/V8CustomEventListener.cpp:
1738         (WebCore::V8EventListener::V8EventListener):
1739         (WebCore::V8EventListener::getListenerFunction):
1740         (WebCore::V8EventListener::callListenerFunction):
1741         * bindings/v8/custom/V8CustomEventListener.h:
1742         * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
1743         (WebCore::CALLBACK_FUNC_DECL):
1744         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1745         (WebCore::CALLBACK_FUNC_DECL):
1746         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
1747         * bindings/v8/custom/V8MessagePortCustom.cpp:
1748         (WebCore::getEventListener):
1749         (WebCore::CALLBACK_FUNC_DECL):
1750         * bindings/v8/custom/V8NodeCustom.cpp:
1751         (WebCore::CALLBACK_FUNC_DECL):
1752         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
1753         (WebCore::CALLBACK_FUNC_DECL):
1754         * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
1755         (WebCore::CALLBACK_FUNC_DECL):
1756         * bindings/v8/custom/V8WebSocketCustom.cpp:
1757         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1758         (WebCore::CALLBACK_FUNC_DECL):
1759         * bindings/v8/custom/V8WorkerCustom.cpp:
1760         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
1761         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1762         (WebCore::CALLBACK_FUNC_DECL):
1763         * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
1764
1765 2009-10-01  Alexis Menard  <alexis.menard@nokia.com>
1766
1767         Reviewed by Tor Arne Vestbø.
1768
1769         Rename QWebGraphicsItem to QGraphicsWebView
1770
1771         * WebCore.pro:
1772
1773 2009-10-01  Dumitru Daniliuc  <dumi@chromium.org>
1774
1775         Reviewed by Dimitri Glazkov.
1776
1777         Read-only transactions do not change file sizes and therefore
1778         should not trigger quota updates.
1779
1780         https://bugs.webkit.org/show_bug.cgi?id=29945
1781
1782         * storage/SQLTransaction.cpp:
1783         (WebCore::SQLTransaction::openTransactionAndPreflight):
1784         (WebCore::SQLTransaction::runStatements):
1785
1786 2009-09-30  Timothy Hatcher  <timothy@apple.com>
1787
1788         Fix list box scrolling by correctly overriding the scroll()
1789         function on RenderBox.
1790
1791         <rdar://problem/7255440> REGRESSION (r48683): Mousewheel scrolling
1792         of listboxes is broken (29756)
1793
1794         Reviewed by Dan Bernstein.
1795
1796         * rendering/RenderListBox.cpp:
1797         (WebCore::RenderListBox::scroll):
1798         * rendering/RenderListBox.h:
1799         * rendering/RenderTextControlSingleLine.cpp:
1800         (WebCore::RenderTextControlSingleLine::scroll):
1801         * rendering/RenderTextControlSingleLine.h:
1802
1803 2009-10-01  Yury Semikhatsky  <yurys@chromium.org>
1804
1805         Reviewed by Timothy Hatcher.
1806
1807         Make a copy of listeners array before dispatching an event in
1808         WebInspector.Object.prototype.dispatchEventToListeners. Otherwise if current
1809         listener removes itself from the array next listener will be skipped.
1810
1811         https://bugs.webkit.org/show_bug.cgi?id=29920
1812
1813         * inspector/front-end/Object.js:
1814         (WebInspector.Object.prototype.dispatchEventToListeners): make a copy of listeners array before dispatching an event
1815
1816 2009-10-01  Martin Robinson  <martin.james.robinson@gmail.com>
1817
1818         Reviewed by Xan Lopez.
1819
1820         [GTK] GtkIMContext filtering interferes with DOM key events
1821         https://bugs.webkit.org/show_bug.cgi?id=28733
1822
1823         Ensure that keyboard events filtered by the GtkIMContext still create
1824         the proper DOM events.
1825
1826         No tests added. Instead previously skipped tests have been enabled.
1827
1828         * platform/gtk/KeyEventGtk.cpp:
1829         (WebCore::keyIdentifierForGdkKeyCode):
1830         (WebCore::singleCharacterString):
1831
1832 2009-10-01  Philippe Normand  <pnormand@igalia.com>
1833
1834         Reviewed by Xan Lopez.
1835
1836         [GTK] data: uri support in media player
1837         https://bugs.webkit.org/show_bug.cgi?id=29842
1838
1839         New GStreamer element to handle data: uris. For now only base64
1840         encoded data is supported. Decoded data is handed over to
1841         giostreamsrc.
1842
1843         * GNUmakefile.am:
1844         * platform/graphics/gtk/DataSourceGStreamer.cpp: Added.
1845         (_do_init):
1846         (webkit_data_src_base_init):
1847         (webkit_data_src_class_init):
1848         (webkit_data_src_reset):
1849         (webkit_data_src_init):
1850         (webkit_data_src_finalize):
1851         (webkit_data_src_uri_get_type):
1852         (webkit_data_src_uri_get_protocols):
1853         (webkit_data_src_uri_get_uri):
1854         (webkit_data_src_uri_set_uri):
1855         (webkit_data_src_uri_handler_init):
1856         * platform/graphics/gtk/DataSourceGStreamer.h: Added.
1857         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
1858         (WebCore::do_gst_init):
1859         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1860         (WebCore::MediaPlayerPrivate::mimeTypeCache):
1861
1862 2009-09-30  Daniel Bates  <dbates@webkit.org>
1863
1864         Reviewed by Adam Barth.
1865
1866         https://bugs.webkit.org/show_bug.cgi?id=29944
1867         
1868         Reduces false positives in the XSSAuditor by explicitly allowing requests
1869         that do not contain illegal URI characters.
1870         
1871         As a side effect of this change, the tests property-inject.html, 
1872         property-escape-noquotes.html, and property-escape-noquotes-tab-slash-chars.html 
1873         fail because these attacks do not contain any illegal URI characters and 
1874         thus are now allowed by the XSSAuditor, where previously they weren't. A future
1875         change may reinstate this functionality.
1876
1877         Tests: http/tests/security/xssAuditor/script-tag-safe2.html
1878                http/tests/security/xssAuditor/script-tag-safe3.html
1879
1880         * page/XSSAuditor.cpp:
1881         (WebCore::isIllegalURICharacter): Added method.
1882         (WebCore::XSSAuditor::canEvaluate):
1883         (WebCore::XSSAuditor::canCreateInlineEventListener):
1884         (WebCore::XSSAuditor::findInRequest): Added parameter 
1885         allowRequestIfNoIllegalURICharacters.
1886         * page/XSSAuditor.h:
1887
1888 2009-09-30  Oliver Hunt  <oliver@apple.com>
1889
1890         Reviewed by Maciej Stachowiak.
1891
1892         reproducible freeze and crash on closing form popup at bosch-home.nl
1893         https://bugs.webkit.org/show_bug.cgi?id=28948
1894
1895         showModalDialog calls getDirect on what is actually a window shell,
1896         so ends up not getting a value (since no value can ever be placed
1897         directly on the shell), which leads to incorrect behaviour.
1898
1899         We use a manual test rather than automatic as it was not
1900         possible to get a modal run loop to work inside DRT.
1901
1902         * bindings/js/JSDOMWindowCustom.cpp:
1903         (WebCore::JSDOMWindow::showModalDialog):
1904         * manual-tests/showModalDialog-returnValue.html: manual testcase.
1905
1906 2009-09-30  Kent Tamura  <tkent@chromium.org>
1907
1908         Reviewed by Darin Adler.
1909
1910         Adds ValidityState.tooLong support for <input> and <textarea>.
1911
1912         Introduces tooLong() in HTMLFormControlElement and it always returns false.
1913         HTMLInputElement and HTMLTextAreaElement overrides it and checks the text
1914         length and maxLength.  tooLong() should work only for `dirty' values.
1915         So, introduces m_isDirty flag for HTMLTextAreaElement, and
1916         !m_data.value().isNull() works as a dirty flag for HTMLInputElement.
1917
1918         Renames parameter names of setMaxLength().
1919
1920         https://bugs.webkit.org/show_bug.cgi?id=27454
1921
1922         Tests: fast/forms/ValidityState-tooLong-input.html
1923                fast/forms/ValidityState-tooLong-textarea.html
1924
1925         * html/HTMLFormControlElement.h:
1926         (WebCore::HTMLFormControlElement::tooLong):
1927         * html/HTMLInputElement.cpp:
1928         (WebCore::HTMLInputElement::tooLong):
1929         (WebCore::HTMLInputElement::setMaxLength):
1930         * html/HTMLInputElement.h:
1931         * html/HTMLTextAreaElement.cpp:
1932         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
1933         (WebCore::HTMLTextAreaElement::reset):
1934         (WebCore::HTMLTextAreaElement::updateValue):
1935         (WebCore::HTMLTextAreaElement::setMaxLength):
1936         (WebCore::HTMLTextAreaElement::tooLong):
1937         * html/HTMLTextAreaElement.h:
1938         * html/ValidityState.h:
1939         (WebCore::ValidityState::tooLong):
1940
1941 2009-09-30  Adam Barth  <abarth@webkit.org>
1942
1943         Reviewed by Maciej Stachowiak.
1944
1945         Factor RedirectScheduler out of FrameLoader
1946         https://bugs.webkit.org/show_bug.cgi?id=29948
1947
1948         This change introduces a new sub-object of Frame, redirectScheduler.
1949         The redirectScheduler is responsible for scheduling redirects.
1950
1951         This change leaves the code for the redirectScheduler in
1952         FrameLoader.cpp.  A future change will move the class into its own
1953         file.
1954
1955         No behavior change (hopefully!).
1956
1957         * loader/FrameLoader.cpp:
1958         (WebCore::RedirectScheduler::RedirectScheduler):
1959         (WebCore::RedirectScheduler::~RedirectScheduler):
1960         (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
1961         (WebCore::RedirectScheduler::clear):
1962         (WebCore::FrameLoader::FrameLoader):
1963         (WebCore::FrameLoader::setDefersLoading):
1964         (WebCore::FrameLoader::stopLoading):
1965         (WebCore::FrameLoader::didOpenURL):
1966         (WebCore::FrameLoader::didExplicitOpen):
1967         (WebCore::FrameLoader::cancelAndClear):
1968         (WebCore::FrameLoader::clear):
1969         (WebCore::FrameLoader::checkCompleted):
1970         (WebCore::FrameLoader::isScheduledLocationChangePending):
1971         (WebCore::FrameLoader::scheduleHTTPRedirection):
1972         (WebCore::RedirectScheduler::scheduleRedirect):
1973         (WebCore::RedirectScheduler::mustLockBackForwardList):
1974         (WebCore::FrameLoader::scheduleLocationChange):
1975         (WebCore::RedirectScheduler::scheduleLocationChange):
1976         (WebCore::FrameLoader::scheduleFormSubmission):
1977         (WebCore::RedirectScheduler::scheduleFormSubmission):
1978         (WebCore::FrameLoader::scheduleRefresh):
1979         (WebCore::RedirectScheduler::scheduleRefresh):
1980         (WebCore::RedirectScheduler::locationChangePending):
1981         (WebCore::FrameLoader::scheduleHistoryNavigation):
1982         (WebCore::RedirectScheduler::scheduleHistoryNavigation):
1983         (WebCore::RedirectScheduler::timerFired):
1984         (WebCore::FrameLoader::provisionalLoadStarted):
1985         (WebCore::RedirectScheduler::schedule):
1986         (WebCore::RedirectScheduler::startTimer):
1987         (WebCore::RedirectScheduler::cancel):
1988         (WebCore::FrameLoader::completed):
1989         (WebCore::FrameLoader::open):
1990         * loader/FrameLoader.h:
1991         (WebCore::FrameLoader::committedFirstRealDocumentLoad):
1992         * page/Frame.cpp:
1993         (WebCore::Frame::Frame):
1994         (WebCore::Frame::redirectScheduler):
1995         * page/Frame.h:
1996
1997 2009-09-30  Maciej Stachowiak  <mjs@apple.com>
1998
1999         Build fix, not reviewed.
2000
2001         More Windows build fixes for https://bugs.webkit.org/show_bug.cgi?id=29943
2002
2003         * platform/network/cf/ResourceHandleCFNet.cpp:
2004         (WebCore::willSendRequest):
2005
2006 2009-09-30  Maciej Stachowiak  <mjs@apple.com>
2007
2008         Build fix, not reviewed.
2009
2010         Fix windows build for fix for https://bugs.webkit.org/show_bug.cgi?id=29943
2011
2012         * platform/network/cf/ResourceHandleCFNet.cpp:
2013         (WebCore::willSendRequest):
2014
2015 2009-09-30  Dimitri Glazkov  <dglazkov@chromium.org>
2016
2017         Reviewed by Darin Fisher.
2018
2019         [V8] HTMLAudioElement, HTMLImageElement, and HTMLOptionElement are constructable, but they shouldn't be.
2020         Only Audio, Image, and Option should be constructable.
2021         https://bugs.webkit.org/show_bug.cgi?id=29940
2022
2023         Test: fast/dom/dom-constructor.html
2024
2025         * WebCore.gypi: Added new files to project.
2026         * bindings/scripts/CodeGeneratorV8.pm: Modified to generate custom constructors.
2027         * bindings/v8/V8DOMWrapper.cpp:
2028         (WebCore::V8DOMWrapper::getTemplate): Removed handling of HTMLImageElement, HTMLOptionElement
2029           and HTMLAudioElement construction.
2030         * bindings/v8/V8HTMLAudioElementConstructor.h: Added.
2031         * bindings/v8/V8HTMLImageElementConstructor.h: Added.
2032         * bindings/v8/V8HTMLOptionElementConstructor.h: Added.
2033         * bindings/v8/V8Index.cpp: Added new headers.
2034         * bindings/v8/V8Index.h: Added Audio, Image and Option decls.
2035         * bindings/v8/custom/V8CustomBinding.h: Ditto.
2036         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2037         (WebCore::ACCESSOR_GETTER): Added custom constructors.
2038         * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
2039         (WebCore::V8HTMLImageElementConstructor::GetTemplate): Added custom template creator.
2040         * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
2041         (WebCore::V8HTMLOptionElementConstructor::GetTemplate): Ditto.
2042         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2043         (WebCore::V8HTMLImageElementConstructor::GetTemplate): Ditto.
2044
2045 2009-09-30  Maciej Stachowiak  <mjs@apple.com>
2046
2047         Reviewed by Brady Eidson.
2048
2049         307 redirects should pass along http body and Content-Type header
2050         https://bugs.webkit.org/show_bug.cgi?id=29943
2051
2052         Follow-up fix for:
2053         <rdar://problem/3802660> SAP: 307 (Temporary Redirect) responses should use POST, not GET
2054         
2055         Test: http/tests/loading/resources/redirect-methods-result.php
2056
2057         * platform/network/cf/ResourceHandleCFNet.cpp:
2058         (WebCore::willSendRequest): Pass along http body and Content-Type header.
2059         * platform/network/mac/ResourceHandleMac.mm:
2060         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): ditto
2061
2062 2009-09-30  Geoffrey Garen  <ggaren@apple.com>
2063
2064         Reviewed by Mark Rowe.
2065
2066         Fixed https://bugs.webkit.org/show_bug.cgi?id=29941
2067         REGRESSION (r48882-r48888): Many memory leaks on SnowLeopard leaks bot
2068
2069         Forgot to implement a destructor for JSDOMWindowBaseData, so it was
2070         leaking its RefPtr data member.
2071
2072         * bindings/js/JSDOMWindowBase.cpp:
2073         (WebCore::JSDOMWindowBase::destroyJSDOMWindowBaseData):
2074         * bindings/js/JSDOMWindowBase.h:
2075         (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData::JSDOMWindowBaseData):
2076
2077 2009-09-30  Dave Hyatt  <hyatt@apple.com>
2078
2079         Reviewed by Tim Hatcher.
2080
2081         Make sure the removal of user stylesheets results in all of the WebViews being updated to
2082         reflect the changes.
2083
2084         * page/PageGroup.cpp:
2085         (WebCore::PageGroup::removeUserContentWithURLForWorld):
2086         (WebCore::PageGroup::removeUserContentForWorld):
2087
2088 2009-09-30  Dan Bernstein  <mitz@apple.com>
2089
2090         Reviewed by Sam Weinig.
2091
2092         REGRESSION(r47440): drop down menus at americanexpress.com disappear on mouse out
2093         https://bugs.webkit.org/show_bug.cgi?id=29209
2094
2095         Test: fast/inline/relative-positioned-overflow.html
2096
2097         * rendering/InlineFlowBox.cpp:
2098         (WebCore::InlineFlowBox::computeVerticalOverflow): Add self-painting
2099         inlines to overflow to ensure that they are included in hit-testing.
2100
2101 2009-09-30  Simon Fraser  <simon.fraser@apple.com>
2102
2103         Reviewed by Mark Rowe.
2104
2105         transforms/3d tests are not run in Release builds
2106         https://bugs.webkit.org/show_bug.cgi?id=29827
2107
2108         Make sure we export the WebCoreHas3DRendering symbol in Release builds,
2109         because this symbols is used by run-webkit-tests (via 'nm') to detect whether
2110         WebCore was built with ENABLE_3D_RENDERING turned on.
2111
2112         * DerivedSources.make:
2113         * WebCore.3DRendering.exp: Added.
2114         * WebCore.xcodeproj/project.pbxproj:
2115
2116 2009-09-30  Jeremy Orlow  <jorlow@chromium.org>
2117
2118         Build fix for QT.  Didn't know WebCore.pro existed.
2119
2120         * WebCore.pro:
2121
2122 2009-09-30  Dave Hyatt  <hyatt@apple.com>
2123
2124         Reviewed by Adam Roben.
2125
2126         Add a method for removal of user scripts and stylesheets by URL from a specific world.
2127
2128         * page/PageGroup.cpp:
2129         (WebCore::PageGroup::removeUserContentURLForWorld):
2130         * page/PageGroup.h:
2131
2132 2009-09-30  Chris Hawk  <hawk@chromium.org>
2133
2134         Reviewed by Dimitri Glazkov.
2135
2136         Fix for conditionals in the WebCore gyp file, which contained two separate
2137         'conditions' values for the webcore target. The first entry was ignored,
2138         resulting in some missine defines.
2139         https://bugs.webkit.org/show_bug.cgi?id=29907
2140
2141         * WebCore.gyp/WebCore.gyp:
2142
2143 2009-09-21  Jeremy Orlow  <jorlow@chromium.org>
2144
2145         Reviewed by Adam Barth.
2146
2147         DOM Storage needs to be more careful about where "ThreadSafe" objects are destroyed.
2148         https://bugs.webkit.org/show_bug.cgi?id=29265
2149
2150         DOM Storage needs to be more careful about where "ThreadSafe" objects are
2151         destroyed.  With the current code, there actually isn't a race condition, but
2152         it sure would be easy for someone to introduce one.  A bunch of
2153         ThreadSafeShared objects have RefPtrs to objects that are NOT ThreadSafeShared
2154         objects.  If it were possible any of these objects' destructors to be fired off
2155         the main thread, then the you'd have a race condition.  The code should be more
2156         clear and self-documenting about how things related to each other.
2157
2158         Since the lifetime of a LocalStorageTask is bounded by the LocalStorageThread
2159         which is bounded by the StorageSyncManager, StorageAreaImpl, and
2160         StorageAreaSync, there's no reason for LocalStorageTask to store anything other
2161         than pointers.  By breaking this dependency, we can eliminate the risk.
2162
2163         Note that we _could_ have LocalStorageThread's task queue just store
2164         LocalStorageTask*'s rather than RefPtr<LocalStorageTask>s but then we'd need to
2165         manually take care of deleting.  It'd probably also be possible to change
2166         LocalStorageThread around so that it needn't hold onto a reference of itself
2167         and have a more deterministic shutdown, but my initial attempts to do so
2168         failed, and I decided it wasn't worth changing.  The queue is killed before
2169         hand, so the thread is 100% impotent before the main thread continues anyway.
2170
2171         The constructors and destructors of StorageSyncManager, StorageAreaImpl, and
2172         StorageAreaSync now have ASSERTs to verify they're running on the main thread. 
2173         I'm fairly positive that it'd be impossible to hit these asserts and the fact
2174         that these classes are no longer ThreadSafeShared should make it clear how
2175         they're meant to be used, but I think it's worth it to be extra sure.  Of
2176         course, ideally, we'd have such an assert every time a ref is incremented or
2177         decremented.
2178
2179         Behavior should be unchanged and this is just an internal code cleanup, so no
2180         new tests.
2181
2182         * storage/LocalStorageTask.cpp:
2183         (WebCore::LocalStorageTask::LocalStorageTask):
2184         (WebCore::LocalStorageTask::performTask):
2185         * storage/LocalStorageTask.h:
2186         (WebCore::LocalStorageTask::createImport):
2187         (WebCore::LocalStorageTask::createSync):
2188         (WebCore::LocalStorageTask::createTerminate):
2189         * storage/LocalStorageThread.cpp:
2190         (WebCore::LocalStorageThread::scheduleImport):
2191         (WebCore::LocalStorageThread::scheduleSync):
2192         * storage/LocalStorageThread.h:
2193         * storage/StorageArea.h:
2194         * storage/StorageAreaImpl.cpp:
2195         (WebCore::StorageAreaImpl::~StorageAreaImpl):
2196         (WebCore::StorageAreaImpl::StorageAreaImpl):
2197         * storage/StorageAreaSync.cpp:
2198         (WebCore::StorageAreaSync::StorageAreaSync):
2199         (WebCore::StorageAreaSync::~StorageAreaSync):
2200         * storage/StorageSyncManager.cpp:
2201         (WebCore::StorageSyncManager::StorageSyncManager):
2202         (WebCore::StorageSyncManager::~StorageSyncManager):
2203         (WebCore::StorageSyncManager::scheduleImport):
2204         (WebCore::StorageSyncManager::scheduleSync):
2205         * storage/StorageSyncManager.h:
2206
2207 2009-09-28  Jeremy Orlow  <jorlow@chromium.org>
2208
2209         Reviewed by Darin Fisher.
2210
2211         Chromium needs to be able to override the way storage events are delivered
2212         https://bugs.webkit.org/show_bug.cgi?id=29655
2213
2214         Chromium needs to be able to override the way storage events are delivered.
2215         This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
2216         faster (no vtables and extra allocation) and somewhat cleaner (no dependency
2217         injection).  This is necessary because Chromium needs to transport events across
2218         a process barrier and then dispatch them without use of a Frame*.
2219
2220         Behavior should not change with this, so no updates to tests.
2221
2222         * GNUmakefile.am:
2223         * WebCore.gypi:
2224         * WebCore.vcproj/WebCore.vcproj:
2225         * WebCore.xcodeproj/project.pbxproj:
2226         * WebCoreSources.bkl:
2227         * storage/StorageAreaImpl.cpp:
2228         (WebCore::StorageAreaImpl::setItem):
2229         (WebCore::StorageAreaImpl::removeItem):
2230         (WebCore::StorageAreaImpl::clear):
2231         * storage/StorageAreaImpl.h:
2232         * storage/StorageEventDispatcher.cpp: Copied from WebCore/storage/StorageAreaImpl.cpp.
2233         (WebCore::StorageEventDispatcher::dispatch):
2234         * storage/StorageEventDispatcher.h: Added.  (Well, technically in the other half of this patch.)
2235
2236 2009-09-30  Jian Li  <jianli@chromium.org>
2237
2238         Reviewed by Darin Adler.
2239
2240         Need to check NULL frame in EventHandler::updateDragAndDrop.
2241         https://bugs.webkit.org/show_bug.cgi?id=29929
2242
2243         Test: http/tests/misc/drag-over-iframe-invalid-source-crash.html
2244
2245         * page/EventHandler.cpp:
2246         (WebCore::EventHandler::updateDragAndDrop):
2247
2248 2009-09-29  Simon Fraser  <simon.fraser@apple.com>
2249
2250         Reviewed by Dan Bernstein.
2251
2252         ASSERTION FAILED: !repaintContainer || repaintContainer == this
2253         https://bugs.webkit.org/show_bug.cgi?id=29755
2254         
2255         Generalize the fix for this bug to account for cases where there may be multiple
2256         containing blocks between the repaint container, and the container of the element
2257         being repainted.
2258
2259         Test: compositing/repaint/opacity-between-absolute2.html
2260
2261         * rendering/RenderBox.cpp:
2262         (WebCore::RenderBox::mapLocalToContainer):
2263         Call offsetFromAncestorContainer() to get the correct offset.
2264         
2265         (WebCore::RenderBox::computeRectForRepaint): Ditto
2266         * rendering/RenderInline.cpp:
2267         (WebCore::RenderInline::computeRectForRepaint): Ditto.
2268         
2269         * rendering/RenderObject.h:
2270         * rendering/RenderObject.cpp:
2271         (WebCore::RenderObject::offsetFromAncestorContainer):
2272         New method that computes an offset from some object in the ancestor container() chain.
2273
2274 2009-09-30  Andras Becsi  <becsi.andras@stud.u-szeged.hu>
2275
2276         Reviewed by Simon Hausmann.
2277
2278         [Qt] Fix TextCodecQt::decode method after r48752 to return a non-null string if the length of the input is 0.
2279         This fixes https://bugs.webkit.org/show_bug.cgi?id=29736.
2280
2281         * platform/text/qt/TextCodecQt.cpp:
2282         (WebCore::TextCodecQt::decode):
2283
2284 2009-09-29  Dave Hyatt  <hyatt@apple.com>
2285
2286         Reviewed by Jon Honeycutt.
2287
2288         Fix a couple of bugs with patterns.  Move the setting of the document URL to before the style
2289         selector gets constructed so that pattern match testing gets the correct URL.
2290
2291         * loader/FrameLoader.cpp:
2292         (WebCore::FrameLoader::begin):
2293         * page/UserContentURLPattern.cpp:
2294         (WebCore::UserContentURLPattern::parse):
2295
2296 2009-09-29  Alexey Proskuryakov  <ap@apple.com>
2297
2298         Rubber-stamped by Brady Eidson.
2299
2300         Assertion failure in http/tests/xmlhttprequest/failed-auth.html.
2301
2302         I couldn't find out why this only started to happen now, but it was incorrect to check
2303         persistence of a credential returned by CredentialStorage::get() without checking that it
2304         was non-null. When there is no credential for the protection space in storage, get()
2305         returns a new object, and Credentil constructor doesn't initialize m_persistence.
2306
2307         * platform/network/mac/ResourceHandleMac.mm:
2308         (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Moved the
2309         assertion after credential null check.
2310         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Added the same persistence
2311         assertion, matching sync code (and CF one, as well).
2312
2313 2009-09-29  Yong Li  <yong.li@torchmobile.com>
2314
2315         Reviewed by Darin Adler.
2316
2317         Add an ASSERT for UTF8Encoding().isValid()
2318         https://bugs.webkit.org/show_bug.cgi?id=29908
2319
2320         * platform/text/TextEncoding.cpp:
2321         (WebCore::UTF8Encoding):
2322
2323 2009-09-29  Dave Hyatt  <hyatt@apple.com>
2324
2325         Reviewed by Jon Honeycutt.
2326
2327         https://bugs.webkit.org/show_bug.cgi?id=29892
2328         Add support for whitelist patterns to control conditional injection of user scripts and
2329         user stylesheets.
2330
2331         No new tests. Not testable until WebKit portion is added in followup patch.
2332
2333         * GNUmakefile.am:
2334         * WebCore.gypi:
2335         * WebCore.pro:
2336         * WebCore.vcproj/WebCore.vcproj:
2337         * WebCore.xcodeproj/project.pbxproj:
2338         * dom/Document.cpp:
2339         (WebCore::Document::pageGroupUserSheets):
2340         * page/Frame.cpp:
2341         (WebCore::Frame::injectUserScriptsForWorld):
2342         * page/UserContentURLPattern.cpp: Added.
2343         (WebCore::UserContentURLPattern::matchesPatterns):
2344         (WebCore::UserContentURLPattern::parse):
2345         (WebCore::UserContentURLPattern::matches):
2346         (WebCore::UserContentURLPattern::matchesHost):
2347         (WebCore::MatchTester::MatchTester):
2348         (WebCore::MatchTester::testStringFinished):
2349         (WebCore::MatchTester::patternStringFinished):
2350         (WebCore::MatchTester::eatWildcard):
2351         (WebCore::MatchTester::eatSameChars):
2352         (WebCore::MatchTester::test):
2353         (WebCore::UserContentURLPattern::matchesPath):
2354         * page/UserContentURLPattern.h: Added.
2355         (WebCore::UserContentURLPattern::UserContentURLPattern):
2356         (WebCore::UserContentURLPattern::scheme):
2357         (WebCore::UserContentURLPattern::host):
2358         (WebCore::UserContentURLPattern::path):
2359         (WebCore::UserContentURLPattern::matchSubdomains):
2360
2361 2009-09-29  Enrica Casucci  <enrica@apple.com>
2362
2363         Reviewed by Adele Peterson.
2364
2365         Reproducible crash pressing return inside quoted content
2366         at WebCore::BreakBlockquoteCommand::doApply.
2367         <rdar://problem/7085453>
2368         In some case, like the one provided in the test case, m_downStreamEnd
2369         refers to a node that gets deleted when executing the DeleteSelectionCommand.
2370         We shouldn't use m_downStreamEnd to recalculate the new m_endPosition when
2371         pruning is needed, because it may be point to a node that has been deleted, but
2372         rather rely on removeNode in CompositeEditCommand to update m_endPosition correctly.
2373
2374         Test: editing/selection/blockquote-crash.html
2375
2376         * editing/BreakBlockquoteCommand.cpp:
2377         (WebCore::BreakBlockquoteCommand::doApply): Added check for invalid position
2378         to avoid dereferencing a null node pointer.
2379         * editing/DeleteSelectionCommand.cpp:
2380         (WebCore::DeleteSelectionCommand::mergeParagraphs): Don't reset m_endPosition
2381         using the value in m_downStreamEnd when it is necessary to prune the start block.
2382         
2383 2009-09-29  Alexey Proskuryakov  <ap@apple.com>
2384
2385         Reviewed by Brady Eidson.
2386
2387         Basic authentication credentials are not sent automatically to top resources
2388         https://bugs.webkit.org/show_bug.cgi?id=29901
2389
2390         No new tests - I don't want to pollute root directory of http tests to check for this rather
2391         minor issue.
2392
2393         * platform/network/CredentialStorage.cpp:
2394         (WebCore::CredentialStorage::set): Changed to always preserve leading slash.
2395         (WebCore::CredentialStorage::getDefaultAuthenticationCredential): Made breaking out of the
2396         loop more explicit.
2397
2398 2009-09-29  Pavel Feldman  <pfeldman@chromium.org>
2399
2400         Reviewed by Oliver Hunt.
2401
2402         Web Inspector REGRESSION(r47820-r47822): Profiles aren't
2403         added to the inspector unless the inspector is already open
2404         when the profile completes.
2405
2406         https://bugs.webkit.org/show_bug.cgi?id=29897
2407
2408         * inspector/front-end/ProfilesPanel.js:
2409         (WebInspector.ProfilesPanel.prototype._populateProfiles):
2410
2411 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2412
2413         Rubberstamped by David Hyatt.
2414
2415         Fix to logic of earlier commit 48902.
2416
2417         When merging two if's before committing, I forgot to invert the
2418         bool check.
2419
2420         * platform/network/qt/QNetworkReplyHandler.cpp:
2421         (WebCore::ignoreHttpError):
2422
2423 2009-09-29  Stephen White  <senorblanco@chromium.org>
2424
2425         Unreviewed, build fix.
2426
2427         Fixing Chromium build, following r48884.
2428
2429         [https://bugs.webkit.org/show_bug.cgi?id=29894]
2430
2431         * bindings/v8/V8AbstractEventListener.cpp:
2432         (WebCore::V8AbstractEventListener::handleEvent):
2433         * bindings/v8/V8AbstractEventListener.h:
2434         * bindings/v8/V8WorkerContextEventListener.cpp:
2435         (WebCore::V8WorkerContextEventListener::handleEvent):
2436         * bindings/v8/V8WorkerContextEventListener.h:
2437
2438 2009-09-29  Kent Tamura  <tkent@chromium.org>
2439
2440         Reviewed by Darin Adler.
2441
2442         Follows HTML5's maxLength change in September 2009.
2443         - Change HTMLTextAreaElement.maxLength type to signed.
2444         - HTMLTextAreaElement.maxLength returns -1 if maxlength= attribute is missing.
2445         - HTMLTextAreaElement.maxLength and HTMLInputElement.maxLength
2446           throw INDEX_SIZE_ERR for setting negative values.
2447         https://bugs.webkit.org/show_bug.cgi?id=29796
2448
2449         * html/HTMLInputElement.cpp:
2450         (WebCore::HTMLInputElement::setMaxLength):
2451         * html/HTMLInputElement.h:
2452         * html/HTMLInputElement.idl:
2453         * html/HTMLTextAreaElement.cpp:
2454         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
2455         (WebCore::HTMLTextAreaElement::maxLength):
2456         (WebCore::HTMLTextAreaElement::setMaxLength):
2457         * html/HTMLTextAreaElement.h:
2458         * html/HTMLTextAreaElement.idl:
2459
2460 2009-09-29  Dimitri Glazkov  <dglazkov@chromium.org>
2461
2462         No review, rolling out r48894, because review discussion was not complete.
2463         http://trac.webkit.org/changeset/48894
2464
2465         * platform/sql/SQLiteTransaction.cpp:
2466         (WebCore::SQLiteTransaction::begin):
2467
2468 2009-09-29  Dirk Schulze  <krit@webkit.org>
2469
2470         Reviewed by Nikolas Zimmermann.
2471
2472         SVG Filter feComposite implementation is missing
2473         [https://bugs.webkit.org/show_bug.cgi?id=28362]
2474
2475         feComposite implementation for SVG.
2476
2477         Test: svg/filters/feComposite.svg
2478
2479         * platform/graphics/filters/FEComposite.cpp:
2480         (WebCore::arithmetic):
2481         (WebCore::FEComposite::apply):
2482
2483 2009-09-29  Dumitru Daniliuc  <dumi@chromium.org>
2484
2485         Reviewed by Dimitri Glazkov.
2486
2487         Starting all read-only transactions with an explicit BEGIN
2488         DEFERRED command instead of BEGIN, since some ports (chromium)
2489         might compile their own SQLite library and set BEGIN to BEGIN
2490         IMMEDIATE by default; which would result in a deadlock in case of
2491         two concurrent read-only transactions on the same DB, and would
2492         unnecessarily delay other potential transactions to the same DB.
2493
2494         https://bugs.webkit.org/show_bug.cgi?id=29729
2495
2496         * platform/sql/SQLiteTransaction.cpp:
2497         (WebCore::SQLiteTransaction::begin):
2498
2499 2009-09-29  Kenneth Russell  <kbr@google.com>
2500
2501         Reviewed by Dimitri Glazkov.
2502
2503         Add support for run-time flag for 3D canvas
2504         https://bugs.webkit.org/show_bug.cgi?id=29826
2505
2506         * html/HTMLCanvasElement.cpp:
2507         (WebCore::HTMLCanvasElement::getContext): Check page settings for
2508         experimental WebGL flag before returning 3D graphics context.
2509         * page/Settings.cpp:
2510         (WebCore::Settings::Settings): Initialize new flag to false.
2511         (WebCore::Settings::setExperimentalWebGLEnabled):
2512         * page/Settings.h: Set new flag.
2513         (WebCore::Settings::experimentalWebGLEnabled): Return new flag.
2514
2515 2009-09-29  Jeremy Orlow  <jorlow@chromium.org>
2516
2517         Reviewed by Darin Fisher.
2518
2519         Chromium needs to be able to override the way storage events are delivered - part 1
2520         https://bugs.webkit.org/show_bug.cgi?id=29889
2521
2522         Chromium needs to be able to override the way storage events are delivered.
2523         This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
2524         faster (no vtables and extra allocation) and somewhat cleaner (no dependency
2525         injection).  This is necessary because Chromium needs to transport events across
2526         a process barrier and then dispatch them without use of a Frame*.
2527
2528         This patch should be a no-op for all ports other than Chromium.
2529
2530         * WebCore.gypi:
2531         * storage/StorageEventDispatcher.h: Added.
2532
2533 2009-09-29  Oliver Hunt  <oliver@apple.com>
2534
2535         Reviewed by NOBODY (missed file).
2536
2537         Adding file missed in previous commit.
2538
2539         * manual-tests/gtk/resources/long_cell.cur: Copied from WebCore/dom/PositionCreationFunctions.h.
2540
2541 2009-09-29  Dimitri Glazkov  <dglazkov@chromium.org>
2542
2543         Reviewed by Darin Fisher.
2544
2545         [V8] Correct an issue with XMLHttpRequest attribute event listeners never being cleared.
2546         https://bugs.webkit.org/show_bug.cgi?id=29888
2547
2548         Test: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
2549
2550         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2551         (WebCore::getEventListener): Added isAttribute parameter.
2552         (WebCore::ACCESSOR_SETTER): Made all event listener setters create attribute listeners.
2553         (WebCore::CALLBACK_FUNC_DECL): Made addEventListener create object listener.
2554
2555 2009-09-22  Martin Robinson  <martin.james.robinson@gmail.com>
2556
2557         Reviewed by Eric Seidel.
2558
2559         Fix corruption for non-square images.
2560
2561         [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
2562         https://bugs.webkit.org/show_bug.cgi?id=29654
2563
2564         Added an additional manual-test for this issue to the existing Gtk
2565         cursor image test.
2566
2567         * manual-tests/gtk/cursor-image.html:
2568         * manual-tests/gtk/resources/long_cell.cur: Added.
2569         * platform/graphics/gtk/ImageGtk.cpp:
2570         (WebCore::BitmapImage::getGdkPixbuf):
2571
2572 2009-09-29  Alexey Proskuryakov  <ap@apple.com>
2573
2574         Reviewed by Timothy Hatcher.
2575
2576         Build fix - pass a proper ScriptExecutipnContext to getEventListenerHandlerBody()
2577
2578         * bindings/js/ScriptEventListener.cpp:
2579         (WebCore::getEventListenerHandlerBody):
2580         * bindings/js/ScriptEventListener.h:
2581         * bindings/v8/ScriptEventListener.cpp:
2582         (WebCore::getEventListenerHandlerBody):
2583         * bindings/v8/ScriptEventListener.h:
2584         * inspector/InspectorDOMAgent.cpp:
2585         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2586
2587 2009-09-29  Nate Chapin  <japhet@chromium.org>
2588
2589         Reviewed by Eric Seidel.
2590
2591         Ensure that we don't scroll lock to an anchor node after a
2592         user-initiated scroll, even if that scroll doesn't propagate
2593         all the way up to FrameView.
2594
2595         Test: fast/events/node-event-anchor-lock.html
2596
2597         * page/EventHandler.cpp: Call setFrameWasScrolledByUser() when a scroll is handled by a node rather than a frame.
2598         (WebCore::EventHandler::scrollOverflow):
2599         (WebCore::EventHandler::handleWheelEvent):
2600         (WebCore::EventHandler::sendScrollEvent): Use setFrameWasScrolledByUser();
2601         (WebCore::EventHandler::setFrameWasScrolledByUser): Split out of sendScrollEvent();
2602         (WebCore::EventHandler::passMousePressEventToScrollbar):
2603         * page/EventHandler.h: Declare setFrameWasScrolledByUser().
2604
2605 2009-09-28  Alexey Proskuryakov  <ap@apple.com>
2606
2607         Reviewed by Darin Adler and Sam Weinig.
2608
2609         Onclick not fired for an element copied with cloneContents() or cloneNode()
2610         https://bugs.webkit.org/show_bug.cgi?id=25130
2611
2612         The change here is that JS event listeners don't keep a reference to a global object from
2613         where they were created, and instead take it as a parameter when parsing source code. Also,
2614         the listener creation won't fail just because it happens for an element in a frameless
2615         document.
2616         Thus, moving nodes between documents no longer results in having incorrect registered
2617         lazy event listeners on them.
2618
2619         Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
2620                fast/events/attribute-listener-cloned-from-frameless-doc-context.html
2621                fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
2622                fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
2623                fast/events/attribute-listener-extracted-from-frameless-doc-context.html
2624
2625         * bindings/js/JSEventListener.cpp:
2626         (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
2627         (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
2628         getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
2629         (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
2630         (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
2631         (WebCore::JSEventListener::reportError): Ditto.
2632
2633         * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
2634         to JSDOMGlobalObject.
2635
2636         * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
2637         creation was split between this function and ScriptEventListener; moved it here, as JS
2638         global object can be different now.
2639
2640         * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
2641         which can not be determined at parsing time.
2642
2643         * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
2644         for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
2645         expect that errors are logged at document parsing time, and because I don't know what other
2646         side effects moving it vould have.
2647
2648         * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
2649         because JSC needs a global context here.
2650
2651         * bindings/js/JSAbstractWorkerCustom.cpp:
2652         (WebCore::JSAbstractWorker::addEventListener):
2653         (WebCore::JSAbstractWorker::removeEventListener):
2654         * bindings/js/JSDOMApplicationCacheCustom.cpp:
2655         (WebCore::JSDOMApplicationCache::addEventListener):
2656         (WebCore::JSDOMApplicationCache::removeEventListener):
2657         * bindings/js/JSDOMGlobalObject.cpp:
2658         (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
2659         * bindings/js/JSDOMWindowCustom.cpp:
2660         (WebCore::JSDOMWindow::addEventListener):
2661         (WebCore::JSDOMWindow::removeEventListener):
2662         * bindings/js/JSEventSourceCustom.cpp:
2663         (WebCore::JSEventSource::addEventListener):
2664         (WebCore::JSEventSource::removeEventListener):
2665         * bindings/js/JSMessagePortCustom.cpp:
2666         (WebCore::JSMessagePort::addEventListener):
2667         (WebCore::JSMessagePort::removeEventListener):
2668         * bindings/js/JSNodeCustom.cpp:
2669         (WebCore::JSNode::addEventListener):
2670         (WebCore::JSNode::removeEventListener):
2671         * bindings/js/JSSVGElementInstanceCustom.cpp:
2672         (WebCore::JSSVGElementInstance::addEventListener):
2673         (WebCore::JSSVGElementInstance::removeEventListener):
2674         * bindings/js/JSWorkerContextCustom.cpp:
2675         (WebCore::JSWorkerContext::addEventListener):
2676         (WebCore::JSWorkerContext::removeEventListener):
2677         * bindings/js/JSXMLHttpRequestCustom.cpp:
2678         (WebCore::JSXMLHttpRequest::addEventListener):
2679         (WebCore::JSXMLHttpRequest::removeEventListener):
2680         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
2681         (WebCore::JSXMLHttpRequestUpload::addEventListener):
2682         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
2683         * bindings/objc/ObjCEventListener.h:
2684         * bindings/objc/ObjCEventListener.mm:
2685         (WebCore::ObjCEventListener::handleEvent):
2686         * bindings/scripts/CodeGeneratorJS.pm:
2687         * dom/EventTarget.cpp:
2688         (WebCore::EventTarget::fireEventListeners):
2689         * inspector/InspectorDOMAgent.cpp:
2690         (WebCore::InspectorDOMAgent::handleEvent):
2691         * inspector/InspectorDOMAgent.h:
2692         * inspector/InspectorDOMStorageResource.cpp:
2693         (WebCore::InspectorDOMStorageResource::handleEvent):
2694         * inspector/InspectorDOMStorageResource.h:
2695         * loader/ImageDocument.cpp:
2696         (WebCore::ImageEventListener::handleEvent):
2697         * svg/animation/SVGSMILElement.cpp:
2698         (WebCore::ConditionEventListener::handleEvent):
2699         * workers/WorkerContext.cpp:
2700         (WebCore::WorkerContext::reportException):
2701         Don't pass global object to JSEventListener::create(), which no longer needs it.
2702         Note that some of these functions still have an early return for null global object, which
2703         can probably be removed in a later patch.
2704         Pass ScriptExecutionContext to EventListener methods that now need it.
2705
2706         * bindings/scripts/CodeGeneratorCOM.pm: Don't force EventTarget implementation on Node -
2707         it doesn't work yet (it didn't quite work before this patch, too, because it assumed that
2708         any object implementing EventTarget COM interface originated from WebCore).
2709
2710         * dom/EventListener.idl: Just like in ObjC, EventListener should be a pure interface in
2711         COM bindings.
2712
2713 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
2714
2715         Reviewed by Sam Weinig.
2716
2717         Removed virtual destructor from JSGlobalObjectData to eliminate pointer
2718         fix-ups when accessing JSGlobalObject::d.
2719         
2720         Replaced with an explicit destructor function pointer.
2721
2722         * bindings/js/JSDOMGlobalObject.cpp:
2723         (WebCore::JSDOMGlobalObject::destroyJSDOMGlobalObjectData):
2724         * bindings/js/JSDOMGlobalObject.h:
2725         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
2726
2727 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2728
2729         Reviewed by Simon Hausmann.
2730
2731         Don't rely on QNetworkReply::NetworkError codes, but
2732         on HTTP error codes instead.
2733
2734         * platform/network/qt/QNetworkReplyHandler.cpp:
2735         (WebCore::ignoreHttpError):
2736         (WebCore::QNetworkReplyHandler::finish):
2737
2738 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2739
2740         Reviewed by Simon Hausmann.
2741
2742         Use const references when using Qt's foreach.
2743
2744         * platform/network/qt/QNetworkReplyHandler.cpp:
2745         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2746
2747 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2748
2749         Reviewed by Simon Hausmann.
2750
2751         Fix handling of QNetworkReply errors.
2752
2753         In the QNetworkReplyHandler::finish() a response was sent even when
2754         the reply contained an error. This resulted in a sendResponseIfNeeded()
2755         calling didReceiveResponse on the client, leading to the destruction
2756         of the m_resourceHandle, discontinuing further processing in finish(),
2757         and thus not calling didFail on the client.
2758
2759         Instead it continued as everything went fine, and
2760         FrameLoaderClientQt::dispatchDecidePolicyForMIMEType() changed the
2761         policy to PolicyDownload due to not being able to show the non existing
2762         MIMEType. As the download also obviously fails, it ended up with a
2763         policy change error.
2764
2765         * platform/network/qt/QNetworkReplyHandler.cpp:
2766         (WebCore::QNetworkReplyHandler::finish):
2767
2768 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2769
2770         Reviewed by Simon Hausmann.
2771
2772         The code for showing error pages when the response was
2773         a 401/403/404, was not actually doing so. This patch
2774         fixes that.
2775
2776         * platform/network/qt/QNetworkReplyHandler.cpp:
2777         (WebCore::QNetworkReplyHandler::finish):
2778
2779 2009-09-28  Alexey Proskuryakov  <ap@apple.com>
2780
2781         Reviewed by Brady Eidson.
2782
2783         <rdar://problem/7259965> REGRESSION: http/tests/xmlhttprequest/cross-origin-authorization.html
2784         is failing/crashing intermittently
2785         https://bugs.webkit.org/show_bug.cgi?id=29322
2786
2787         This was caused by CStringBuffer::encodeBase64() returning a buffer that wasn't zero terminated.
2788         The code had other issues as well, so I removed it altogether:
2789         - it claimed to avoid some buffer copies, but it didn't;
2790         - and I don't think that base64 encoding should be part of CString interface.
2791
2792         * platform/network/mac/ResourceHandleMac.mm:
2793         (WebCore::encodeBasicAuthorization): Encode username and password using Base64.h directly.
2794         (WebCore::ResourceHandle::start): Use encodeBasicAuthorization().
2795         (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Ditto.
2796         (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Extended logging
2797         to synchronous case.
2798         (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Ditto.
2799         (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Ditto.
2800         (-[WebCoreSynchronousLoader connection:didReceiveResponse:]): Ditto.
2801         (-[WebCoreSynchronousLoader connection:didReceiveData:]): Ditto.
2802         (-[WebCoreSynchronousLoader connectionDidFinishLoading:]): Ditto.
2803         (-[WebCoreSynchronousLoader connection:didFailWithError:]): Ditto.
2804
2805         * platform/network/cf/ResourceHandleCFNet.cpp: Matched Mac changes.
2806
2807         * platform/text/CString.cpp:
2808         * platform/text/CString.h:
2809         (WebCore::CStringBuffer::create):
2810         (WebCore::CStringBuffer::CStringBuffer):
2811         Removed code that was added for Base64 in r48363.
2812
2813 2009-09-29  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2814
2815         Reviewed by Simon Hausmann.
2816
2817         Fix typo in Localizations.cpp
2818
2819         https://bugs.webkit.org/show_bug.cgi?id=29872
2820
2821         * platform/qt/Localizations.cpp:
2822         (WebCore::localizedMediaControlElementHelpText):
2823
2824 2009-09-29  Simon Hausmann  <simon.hausmann@nokia.com>
2825
2826         Reviewed by Tor Arne Vestbø.
2827
2828         Make the XSLT conditional in DOMWindow.idl's xsltProcessor
2829         attribute conditional in the generated files, similar to
2830         r44116.
2831
2832         * page/DOMWindow.idl:
2833
2834 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2835
2836         Reviewed by Simon Hausmann and Tor Arne Vestbø.
2837
2838         Use the ResourceError as it is supposed to and handle
2839         not HTTP errors from QNetworkReply.
2840
2841         Thanks to Adam Roben for his input.
2842
2843         * platform/network/qt/QNetworkReplyHandler.cpp:
2844         (WebCore::QNetworkReplyHandler::finish):
2845
2846 2009-09-29  Pavel Feldman  <pfeldman@chromium.org>
2847
2848         Reviewed by Timothy Hatcher.
2849
2850         Web Inspector: Encapsulate JS listeners specifics into ScriptEventListener.
2851
2852         https://bugs.webkit.org/show_bug.cgi?id=29816
2853
2854         * bindings/js/ScriptEventListener.cpp:
2855         (WebCore::getEventListenerHandlerBody):
2856         * bindings/js/ScriptEventListener.h:
2857         * bindings/v8/ScriptEventListener.cpp:
2858         (WebCore::getEventListenerHandlerBody):
2859         * bindings/v8/ScriptEventListener.h:
2860         * inspector/InspectorDOMAgent.cpp:
2861         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2862
2863 2009-09-29  Xan Lopez  <xlopez@igalia.com>
2864
2865         Unreviewed attempt to fix the build.
2866
2867         * page/Settings.cpp:
2868         (WebCore::Settings::Settings):
2869
2870 2009-09-28  Fumitoshi Ukai  <ukai@chromium.org>
2871
2872         Reviewed by Eric Seidel.
2873
2874         Add experimentalWebSocketsEnabled in Settings.
2875         https://bugs.webkit.org/show_bug.cgi?id=28941
2876
2877         * WebCore.base.exp:
2878         * bindings/js/JSDOMWindowCustom.cpp:
2879         (WebCore::JSDOMWindow::webSocket):
2880         * bindings/v8/V8DOMWrapper.cpp:
2881         (WebCore::V8DOMWrapper::getConstructor):
2882         * bindings/v8/custom/V8WebSocketCustom.cpp:
2883         * page/Settings.cpp:
2884         (WebCore::Settings::Settings):
2885         (WebCore::Settings::setExperimentalWebSocketsEnabled):
2886         * page/Settings.h:
2887         (WebCore::Settings::experimentalWebSocketsEnabled):
2888         
2889 2009-09-11  Fumitoshi Ukai  <ukai@chromium.org>
2890
2891         Reviewed by Adam Barth.
2892
2893         Add platform code to support WebSocket for chromium.
2894         https://bugs.webkit.org/show_bug.cgi?id=29171
2895
2896         To build within chromium tree, it requires a patch in bug 29174.
2897         Real implementation will be landed in chromium tree.
2898
2899         * WebCore.gypi:
2900         * platform/network/chromium/SocketStreamError.h: Added.
2901         (WebCore::SocketStreamError::SocketStreamError):
2902         * platform/network/chromium/SocketStreamHandle.h: Added.
2903         (WebCore::SocketStreamHandle::create):
2904
2905 2009-09-28  Dan Bernstein  <mitz@apple.com>
2906
2907         Reviewed by Sam Weinig.
2908
2909         <rdar://problem/7157288> Crash in RenderStyle::computedLineHeight()
2910         when Times New Roman is not installed
2911
2912         * platform/graphics/win/FontCacheWin.cpp:
2913         (WebCore::FontCache::getLastResortFallbackFont): If Times New Roman is
2914         not available, use the Windows default GUI font.
2915
2916 2009-09-28  Jian Li  <jianli@chromium.org>
2917
2918         Reviewed by David Levin.
2919
2920         Do not add platform-specific methods to cross-platform header
2921         FileSystem.h per Darin's feedback for 29109.
2922         https://bugs.webkit.org/show_bug.cgi?id=29830
2923
2924         * platform/FileSystem.h:
2925         * platform/chromium/DragDataChromium.cpp:
2926         (WebCore::DragData::asURL):
2927         * platform/chromium/FileSystemChromium.cpp:
2928
2929 2009-09-28  Dumitru Daniliuc  <dumi@chromium.org>
2930
2931         Reviewed by Dimitri Glazkov.
2932
2933         Register Chromium's VFSs with a proper sqlite3_io_methods
2934         finder. This should only affect the POSIX implementation. The
2935         Windows change is included for consistency and in case sqlite
2936         starts using something similar in its Windows VFS in the future.
2937
2938         https://bugs.webkit.org/show_bug.cgi?id=29743
2939
2940         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
2941         (WebCore::SQLiteFileSystem::registerSQLiteVFS):
2942         * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
2943         (WebCore::SQLiteFileSystem::registerSQLiteVFS):
2944
2945 2009-09-28  Nate Chapin  <japhet@chromium.org>
2946
2947         Reviewed by Adam Barth.
2948
2949         Change the V8 bindings' handling of window.toString(),
2950         so we return [object DOMWindow] (like JSC), not [object global].
2951
2952         https://bugs.webkit.org/show_bug.cgi?id=29742
2953
2954         This will fix a couple of Chromium port test failures and enable us to
2955         use the default expectations for a bunch more.
2956
2957         * bindings/v8/custom/V8DOMWindowCustom.cpp: Use the DOMWindow wrapper instead
2958         of the global object wrapper when it's available in the DOMWindow toString callback.
2959
2960 2009-09-28  Nate Chapin  <japhet@chromium.org>
2961
2962         Rubber stamped by David Levin.
2963
2964         Chromium build fix, add back in #include of V8Proxy.h in V8WebKitPointConstructor.cpp.
2965
2966         * bindings/v8/custom/V8WebKitPointConstructor.cpp: Re-include V8Proxy.h.
2967
2968 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
2969
2970         Reviewed by Darin Adler.
2971
2972         NotNullPassRefPtr: smart pointer optimized for passing references that are not null
2973         https://bugs.webkit.org/show_bug.cgi?id=29822
2974         
2975         Added NotNullPassRefPtr, and deployed it in all places that initialize
2976         JavaScript objects.
2977
2978         * bindings/js/DOMObjectWithSVGContext.h:
2979         (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
2980         * bindings/js/JSDOMBinding.cpp:
2981         (WebCore::cacheDOMStructure):
2982         * bindings/js/JSDOMBinding.h:
2983         (WebCore::DOMObject::DOMObject):
2984         (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
2985         (WebCore::DOMConstructorObject::DOMConstructorObject):
2986         (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
2987         * bindings/js/JSDOMGlobalObject.cpp:
2988         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
2989         * bindings/js/JSDOMGlobalObject.h:
2990         * bindings/js/JSDOMWindowBase.cpp:
2991         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2992         * bindings/js/JSDOMWindowBase.h:
2993         * bindings/js/JSHTMLAllCollection.h:
2994         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
2995         * bindings/js/JSInspectedObjectWrapper.cpp:
2996         (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
2997         * bindings/js/JSInspectedObjectWrapper.h:
2998         * bindings/js/JSInspectorCallbackWrapper.cpp:
2999         (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
3000         * bindings/js/JSInspectorCallbackWrapper.h:
3001         * bindings/js/JSQuarantinedObjectWrapper.cpp:
3002         (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
3003         * bindings/js/JSQuarantinedObjectWrapper.h:
3004         * bindings/js/JSWorkerContextBase.cpp:
3005         (WebCore::JSWorkerContextBase::JSWorkerContextBase):
3006         * bindings/js/JSWorkerContextBase.h:
3007         * bindings/scripts/CodeGeneratorJS.pm:
3008         * bridge/runtime_object.cpp:
3009         (JSC::RuntimeObjectImp::RuntimeObjectImp):
3010         * bridge/runtime_object.h:
3011
3012 2009-09-28  Nate Chapin  <japhet@chromium.org>
3013
3014         Reviewed by Dimitri Glazkov.
3015
3016         Allow V8 to handle x/y parameters in a WebKitPoint constructor.
3017         https://bugs.webkit.org/show_bug.cgi?id=29823
3018
3019         Fixes V8's handling of LayoutTests/fast/dom/Window/webkitConvertPoint.html
3020
3021         * bindings/v8/custom/V8WebKitPointConstructor.cpp: Allow for x/y parameters in constructor.
3022
3023 2009-09-28  Mark Rowe  <mrowe@apple.com>
3024
3025         Fix the build by doing something approximating reasonableness in the Xcode project.
3026
3027         * WebCore.xcodeproj/project.pbxproj:
3028
3029 2009-09-28  Simon Hausmann  <hausmann@webkit.org>
3030
3031         Prospective Tiger build fix.
3032
3033         * WebCore.xcodeproj/project.pbxproj: Try to use unique IDs for the new files.
3034
3035 2009-09-28  Pavel Feldman  <pfeldman@chromium.org>
3036
3037         Reviewed by Timothy Hatcher.
3038
3039         Web Inspector: Add explicit frontend event for commit load.
3040
3041         https://bugs.webkit.org/show_bug.cgi?id=29814
3042
3043         * inspector/InspectorController.cpp:
3044         (WebCore::InspectorController::didCommitLoad):
3045         * inspector/InspectorFrontend.cpp:
3046         (WebCore::InspectorFrontend::didCommitLoad):
3047         * inspector/InspectorFrontend.h:
3048         * inspector/front-end/DOMAgent.js:
3049         (WebInspector.DOMAgent.prototype._setDocument):
3050         * inspector/front-end/inspector.js:
3051         (WebInspector.addResource):
3052         (WebInspector.didCommitLoad):
3053
3054 2009-09-28  Yaar Schnitman  <yaar@chromium.org>
3055
3056         Reviewed by Dimitri Glazkov.
3057
3058         Chromium port - recognize we are being built independently
3059         of chromium and look for dependencies under webkit/chromium rather
3060         than chromium/src.
3061
3062         https://bugs.webkit.org/show_bug.cgi?id=29722
3063
3064         * WebCore.gyp/WebCore.gyp: See above. Also removed a few files from
3065           the sources list, since they are not supposed to be built here.
3066
3067 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
3068
3069         Reviewed by Simon Hausmann.
3070
3071         [Qt] Implement XSLT support with QtXmlPatterns.
3072         https://bugs.webkit.org/show_bug.cgi?id=28303
3073
3074         * GNUmakefile.am:
3075         * WebCore.gypi:
3076         * WebCore.pro:
3077         * WebCore.vcproj/WebCore.vcproj:
3078         * WebCoreSources.bkl:
3079         * dom/Document.cpp:
3080         (WebCore::Document::Document):
3081         (WebCore::Document::~Document):
3082         (WebCore::Document::setTransformSource):
3083         * dom/Document.h:
3084         (WebCore::Document::transformSource):
3085         * dom/TransformSource.h: Added.
3086         (WebCore::TransformSource::platformSource):
3087         * dom/TransformSourceLibxslt.cpp: Added.
3088         (WebCore::TransformSource::TransformSource): Wraps a libxml2 document.
3089         (WebCore::TransformSource::~TransformSource):
3090         * dom/TransformSourceQt.cpp: Added.
3091         (WebCore::TransformSource::TransformSource): Wraps a plain string.
3092         (WebCore::TransformSource::~TransformSource):
3093         * dom/XMLTokenizerLibxml2.cpp:
3094         (WebCore::XMLTokenizer::doEnd):
3095         * dom/XMLTokenizerQt.cpp:
3096         (WebCore::XMLTokenizer::doEnd):
3097         (WebCore::XMLTokenizer::parseProcessingInstruction):
3098         * xml/XSLStyleSheet.h:
3099         (WebCore::XSLStyleSheet::sheetString):
3100         * xml/XSLStyleSheetLibxslt.cpp:
3101         (WebCore::XSLStyleSheet::document):
3102         * xml/XSLStyleSheetQt.cpp: Added.
3103         * xml/XSLTProcessor.h:
3104         * xml/XSLTProcessorLibxslt.cpp:
3105         (WebCore::xmlDocPtrFromNode):
3106         * xml/XSLTProcessorQt.cpp: Added.
3107         (WebCore::XSLTMessageHandler::XSLTMessageHandler): A subclass of QAbstractMessageHandler.
3108         (WebCore::XSLTMessageHandler::handleMessage): Forwards all processor messages to the Console.
3109         (WebCore::XSLTProcessor::transformToString): Uses QXmlQuery.
3110
3111 2009-09-28  Andrew Scherkus  <scherkus@chromium.org>
3112
3113         Reviewed by Eric Carlson.
3114
3115         Delegate implementation of rendererIsNeeded() for media control elements to RenderTheme.
3116
3117         https://bugs.webkit.org/show_bug.cgi?id=28689
3118
3119         Covered by LayoutTests/media/video-no-audio.html
3120
3121         * rendering/MediaControlElements.cpp: Removed subclass implementations of rendererIsNeeded().
3122         (WebCore::MediaControlElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
3123         (WebCore::MediaControlInputElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
3124         * rendering/MediaControlElements.h:
3125         * rendering/RenderTheme.cpp:
3126         (WebCore::RenderTheme::shouldRenderMediaControlPart): New method.  Contains logic moved from subclass implementations of rendererIsNeeded().
3127         * rendering/RenderTheme.h:
3128         * rendering/RenderThemeChromiumSkia.cpp:
3129         (WebCore::RenderThemeChromiumSkia::shouldRenderMediaControlPart): Override to always render mute button.
3130         * rendering/RenderThemeChromiumSkia.h:
3131
3132 2009-09-28  Jian Li  <jianli@chromium.org>
3133
3134         Reviewed by David Levin.
3135
3136         [chromium] DragData::asURL should return file URL.
3137         https://bugs.webkit.org/show_bug.cgi?id=29109
3138
3139         Tested by LayoutTests/fast/events/drag-to-navigate.html.
3140
3141         * platform/FileSystem.h:
3142         * platform/chromium/ChromiumBridge.h:
3143         * platform/chromium/DragDataChromium.cpp:
3144         (WebCore::DragData::asURL):
3145         * platform/chromium/FileSystemChromium.cpp:
3146         (WebCore::getAbsolutePath):
3147         (WebCore::isDirectory):
3148         (WebCore::filePathToURL):
3149
3150 2009-09-28  Dimitri Glazkov  <dglazkov@chromium.org>
3151
3152         Reviewed by David Levin.
3153
3154         [V8] Add a special case to handle index arguments, because we need to be
3155         able to see if they're < 0.
3156         https://bugs.webkit.org/show_bug.cgi?id=29810
3157
3158         Test: LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.html
3159
3160         * bindings/scripts/CodeGeneratorV8.pm: Added special case (matching CodeGeneratorJS.pm)
3161           for index arguments.
3162
3163 2009-09-28  Dan Bernstein  <mitz@apple.com>
3164
3165         Reviewed by Darin Adler.
3166
3167         Extend the MediaWiki/KHTMLFixes.css workaround to cover older MediaWiki versions
3168         https://bugs.webkit.org/show_bug.cgi?id=29792
3169
3170         * html/HTMLLinkElement.cpp:
3171         (WebCore::HTMLLinkElement::setCSSStyleSheet): If site specific hacks are
3172         enabled, check if the linked style sheet is one of two versions of the
3173         MediaWiki KHTMLFixes.css. If so, remove the offending rule.
3174
3175 2009-09-28  Dimitri Glazkov  <dglazkov@chromium.org>
3176
3177         Reviewed by Adam Barth.
3178
3179         [V8] Fix an error in type logic in CodeGeneratorV8.pm, where
3180         unsigned ints are accidentally used as signed.
3181         https://bugs.webkit.org/show_bug.cgi?id=29810
3182
3183         Test: LayoutTests/fast/forms/textarea-maxlength.html
3184
3185         * bindings/scripts/CodeGeneratorV8.pm: Made sure "unsigned long" in IDL is
3186           properly generates on "unsigned" return value.
3187
3188 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
3189
3190         Reviewed by Simon Hausmann.
3191
3192         Rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp.
3193         https://bugs.webkit.org/show_bug.cgi?id=28303
3194
3195         In preparation for adding XSLT support with QtXmlPatterns to the Qt
3196         port, rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp as we will
3197         have our own implementation which most likely will not share any code
3198         with the current one.
3199
3200         Additionally, fix some coding style issues.
3201
3202         * GNUmakefile.am:
3203         * WebCore.gypi:
3204         * WebCore.vcproj/WebCore.vcproj:
3205         * WebCore.xcodeproj/project.pbxproj:
3206         * WebCoreSources.bkl:
3207         * xml/XSLStyleSheet.cpp: Renamed to XSLStyleSheetLibxslt.cpp.
3208         * xml/XSLStyleSheetLibxslt.cpp: Added.
3209
3210 2009-09-28  Simon Hausmann  <simon.hausmann@nokia.com>
3211
3212         Prospective build fix for r48812.
3213
3214         Forgot to remove the inline reset() implementation when reverting the indentation
3215         changes in the file.
3216
3217         * xml/XSLTProcessor.h:
3218
3219 2009-09-28  Pavel Feldman  <pfeldman@chromium.org>
3220
3221         Reviewed by nobody (trivial follow up fix), Joseph Pecoraro LGTM-ed.
3222
3223         Web Inspector: Follow up to r48809.
3224         InspectorController.wrapObject should only be called on the inspectable page side.
3225
3226         https://bugs.webkit.org/show_bug.cgi?id=17429
3227
3228         * inspector/front-end/EventListenersSidebarPane.js:
3229         (WebInspector.EventListenersSidebarPane.prototype.update.callback):
3230         (WebInspector.EventListenersSidebarPane.prototype.update):
3231         (WebInspector.EventListenersSection):
3232         (WebInspector.EventListenersSection.prototype.update):
3233         (WebInspector.EventListenerBar):
3234         (WebInspector.EventListenerBar.prototype.update):
3235
3236 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
3237
3238         Reviewed by Simon Hausmann.
3239
3240         Move the libxslt specific part of XSLTProcessor to a separate file.
3241         https://bugs.webkit.org/show_bug.cgi?id=28303
3242
3243         In preparation for adding XSLT support with QtXmlPatterns to the Qt
3244         port, move the libxslt part of the XSLTProcessor implementation into
3245         another file and leave the part that can be reused and shared.
3246
3247         Additionally, fix some coding style issues.
3248
3249         * GNUmakefile.am:
3250         * WebCore.gypi:
3251         * WebCore.vcproj/WebCore.vcproj:
3252         * WebCore.xcodeproj/project.pbxproj:
3253         * WebCoreSources.bkl:
3254         * xml/XSLTProcessor.cpp:
3255         (WebCore::XSLTProcessor::createDocumentFromSource): Remove trailing whitespaces.
3256         (WebCore::createFragmentFromSource): Remove trailing whitespaces.
3257         (WebCore::XSLTProcessor::transformToFragment): Remove trailing whitespaces.
3258         (WebCore::XSLTProcessor::reset): Moved out of the class definition.
3259         * xml/XSLTProcessorLibxslt.cpp: Added.
3260         (WebCore::XSLTProcessor::genericErrorFunc): Moved.
3261         (WebCore::XSLTProcessor::parseErrorFunc): Moved.
3262         (WebCore::docLoaderFunc): Moved.
3263         (WebCore::setXSLTLoadCallBack): Moved.
3264         (WebCore::writeToVector): Moved.
3265         (WebCore::saveResultToString): Moved.
3266         (WebCore::xsltParamArrayFromParameterMap): Moved.
3267         (WebCore::freeXsltParamArray): Moved.
3268         (WebCore::xsltStylesheetPointer): Moved.
3269         (WebCore::xmlDocPtrFromNode): Moved.
3270         (WebCore::resultMIMEType): Moved.
3271         (WebCore::XSLTProcessor::transformToString): Moved.
3272
3273 2009-09-28  Charles Wei  <charles.wei@torchmobile.com.cn>
3274
3275         Reviewed by Nikolas Zimmermann.
3276
3277         Fix the crash of SVG that crashes when use a non-exist symbol
3278         https://bugs.webkit.org/show_bug.cgi?id=27693
3279
3280         Test: svg/custom/use-non-existing-symbol-crash.svg
3281
3282         * svg/SVGUseElement.cpp:
3283         (WebCore::shadowTreeContainsChangedNodes):
3284
3285 2009-09-28  Joseph Pecoraro  <joepeck@webkit.org>
3286
3287         Reviewed by Timothy Hatcher.
3288
3289         Inspector Should Show Event Listeners/Handlers Registered on each Node
3290         https://bugs.webkit.org/show_bug.cgi?id=17429
3291         
3292           Extracted a method from dispatchEvent to get the event ancestor chain
3293         
3294         * dom/Node.cpp:
3295         (WebCore::Node::eventAncestors): the extracted method
3296         (WebCore::Node::dispatchGenericEvent): use eventAncestors
3297         * dom/Node.h:
3298
3299           Asynchronous Flow For the Inspector, Backend -> DOM Agent -> Frontend
3300           The DOMAgent's getEventListenersForNode handles the logic of finding
3301           all the relevant listeners in the event flow.
3302
3303         * inspector/InspectorBackend.cpp:
3304         (WebCore::InspectorBackend::getEventListenersForNode):
3305         * inspector/InspectorBackend.h:
3306         * inspector/InspectorBackend.idl:
3307         * inspector/InspectorDOMAgent.cpp:
3308         (WebCore::InspectorDOMAgent::getEventListenersForNode):
3309         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
3310         (WebCore::InspectorDOMAgent::buildObjectForNode): added localName
3311         * inspector/InspectorDOMAgent.h:
3312         (WebCore::EventListenerInfo::EventListenerInfo):
3313         * inspector/InspectorFrontend.cpp:
3314         (WebCore::InspectorFrontend::didGetEventListenersForNode):
3315         * inspector/InspectorFrontend.h:
3316         (WebCore::InspectorFrontend::scriptState):
3317         * inspector/front-end/DOMAgent.js: added localName to WebInspector.DOMNode from payload
3318         (WebInspector.EventListeners.getEventListenersForNodeAsync.mycallback):
3319         (WebInspector.EventListeners.getEventListenersForNodeAsync):
3320
3321           New Sidebar Pane in the Element's Panel
3322           Includes Gear Menu for filtering the Event Listeners on the
3323           "Selected Node Only" or "All Nodes"
3324
3325         * inspector/front-end/ElementsPanel.js: Handles refreshing the Pane when necessary
3326         (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
3327         (WebInspector.ElementsPanel):
3328         (WebInspector.ElementsPanel.prototype.updateEventListeners):
3329         * inspector/front-end/EventListenersSidebarPane.js: Added. 
3330         (WebInspector.EventListenersSidebarPane): The 1st level in the Pane
3331         (WebInspector.EventListenersSidebarPane.prototype.update.callback):
3332         (WebInspector.EventListenersSidebarPane.prototype.update):
3333         (WebInspector.EventListenersSection): The 2nd level in the Pane
3334         (WebInspector.EventListenersSection.prototype.update): filters on Preference
3335         (WebInspector.EventListenersSection.prototype.addListener):
3336         (WebInspector.EventListenerBar): The 3rd level in the Pane
3337         (WebInspector.EventListenerBar.prototype._getNodeDisplayName):
3338         (WebInspector.EventListenerBar.prototype._getFunctionDisplayName):
3339         (WebInspector.EventListenersSidebarPane.prototype._changeSetting): For the Gear Menu
3340         
3341           Consolidated "appropriateSelectorForNode"
3342
3343         * inspector/front-end/StylesSidebarPane.js:
3344         * inspector/front-end/utilities.js:
3345
3346           Miscellaneous Updates
3347
3348         * English.lproj/localizedStrings.js: "Event Listeners", "No Event Listeners", "Selected Node Only", "All Nodes"
3349         * WebCore.gypi: included the new inspector files
3350         * WebCore.vcproj/WebCore.vcproj: included source files that were missing
3351         * inspector/front-end/Images/grayConnectorPoint.png: Added. Thanks to Timothy Hatcher.
3352         * inspector/front-end/Images/whiteConnectorPoint.png: Added. Thanks to Timothy Hatcher.
3353         * inspector/front-end/inspector.js: Preferences for the Gear Menu Event Listeners filter
3354         * inspector/front-end/inspector.css: reused as much as possible
3355         * inspector/front-end/inspector.html: include the new script
3356         * inspector/front-end/WebKit.qrc: included the new inspector files
3357
3358 2009-09-27  Sam Weinig  <sam@webkit.org>
3359
3360         Reviewed by Dan Bernstein.
3361
3362         Fix for https://bugs.webkit.org/show_bug.cgi?id=29760
3363         Implement CSSOM Range.getClientRects/getBoundingClientRect 
3364
3365         Tests: fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html
3366                fast/dom/Range/getBoundingClientRect.html
3367                fast/dom/Range/getClientRects.html
3368
3369         * dom/Range.cpp:
3370         (WebCore::Range::getClientRects):
3371         (WebCore::Range::getBoundingClientRect):
3372         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoom):
3373         (WebCore::Range::getBorderAndTextQuads):
3374         * dom/Range.h:
3375         * dom/Range.idl:
3376         Implement Range.getClientRects/getBoundingClientRect.
3377
3378         * dom/Element.cpp:
3379         * rendering/RenderObject.h: 
3380         (WebCore::adjustForAbsoluteZoom):
3381         (WebCore::adjustIntRectForAbsoluteZoom):
3382         (WebCore::adjustFloatPointForAbsoluteZoom):
3383         (WebCore::adjustFloatQuadForAbsoluteZoom):
3384         Move point/quad adjustment methods from Element.cpp to RenderObject.h
3385         so that Range.cpp can use them as well.
3386
3387 2009-09-27  Simon Hausmann  <hausmann@webkit.org>
3388
3389         Unreviewed fix for WebInspector with Qt build.
3390
3391         Simply re-generate the Qt resource file by running
3392         WebKitTools/Scripts/generate-qt-inspector-resource
3393
3394         * inspector/front-end/WebKit.qrc:
3395
3396 2009-09-27  Pavel Feldman  <pfeldman@chromium.org>
3397
3398         Reviewed by nobody (trivial ChangeLog fix).
3399
3400         Restore WebCore/ChangeLog truncated in r48778.
3401
3402 2009-09-27  Pavel Feldman  <pfeldman@chromium.org>
3403
3404         Reviewed by Timothy Hatcher.
3405
3406         Web Inspector: DOM store is being unbound twice, leading to assertion failure.
3407
3408         https://bugs.webkit.org/show_bug.cgi?id=29770
3409
3410         * inspector/InspectorController.cpp:
3411         (WebCore::InspectorController::didOpenDatabase):
3412         (WebCore::InspectorController::didUseDOMStorage):
3413         * inspector/InspectorDOMStorageResource.cpp:
3414         (WebCore::InspectorDOMStorageResource::unbind):
3415
3416 2009-09-26  Pavel Feldman  <pfeldman@chromium.org>
3417
3418         Reviewed by Timothy Hatcher.
3419
3420         Web Inspector: Do not track DOM changes while inspector window is closed.
3421
3422         https://bugs.webkit.org/show_bug.cgi?id=29769
3423
3424         * inspector/InspectorController.cpp:
3425         (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
3426         (WebCore::InspectorController::populateScriptObjects):
3427         (WebCore::InspectorController::resetScriptObjects):
3428         (WebCore::InspectorController::didCommitLoad):
3429         * inspector/InspectorController.h:
3430         * inspector/InspectorDOMAgent.cpp:
3431         (WebCore::InspectorDOMAgent::setDocument):
3432         * inspector/InspectorDOMAgent.h:
3433         * loader/FrameLoader.cpp:
3434         (WebCore::FrameLoader::dispatchWindowObjectAvailable):
3435         * page/android/InspectorControllerAndroid.cpp:
3436         (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
3437
3438 2009-09-26  Pavel Feldman  <pfeldman@chromium.org>
3439
3440         Reviewed by Timothy Hatcher.
3441
3442         Web Inspector: [REGRESSION] Double Clicking Resources Fails to Open in New Window
3443
3444         https://bugs.webkit.org/show_bug.cgi?id=29762
3445
3446         * inspector/front-end/InjectedScript.js:
3447         (InjectedScript.setStyleText):
3448         (InjectedScript.openInInspectedWindow):
3449         * inspector/front-end/InjectedScriptAccess.js:
3450         * inspector/front-end/ResourcesPanel.js:
3451         (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
3452
3453 2009-09-26  David Kilzer  <ddkilzer@apple.com>
3454
3455         Part 2 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
3456
3457         Reviewed by Darin Adler.
3458
3459         Fix ENABLE_ORIENTATION_EVENTS for non-Mac platforms.
3460
3461         * DerivedSources.make: Moved Platform.h check for
3462         ENABLE_ORIENTATION_EVENTS into Mac-only section and added
3463         default of ENABLE_ORIENTATION_EVENTS = 0 to non-Mac section.
3464         Added ifndef test to make it possible to override both
3465         ENABLE_DASHBOARD_SUPPORT and ENABLE_ORIENTATION_EVENTS external
3466         to the makefile.  Moved addition of ENABLE_ORIENTATION_EVENTS to
3467         ADDITIONAL_IDL_DEFINES to common section.
3468         * GNUmakefile.am: Added support for ENABLE_ORIENTATION_EVENTS if
3469         it is ever used.
3470         * WebCore.pro: Ditto.
3471
3472 2009-09-26  Kent Tamura  <tkent@chromium.org>
3473
3474         Reviewed by David Kilzer.
3475
3476         Move placeholder-related code to HTMLTextFormControlElement from
3477         HTMLInputElement, WMLInputElement, InputElement, and
3478         HTMLTextAreaElement.
3479         https://bugs.webkit.org/show_bug.cgi?id=28703
3480
3481         * dom/InputElement.cpp:
3482         (WebCore::InputElement::dispatchFocusEvent):
3483         (WebCore::InputElement::dispatchBlurEvent):
3484         (WebCore::InputElement::setValueFromRenderer):
3485         * dom/InputElement.h:
3486         * html/HTMLFormControlElement.cpp:
3487         (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
3488         (WebCore::HTMLTextFormControlElement::~HTMLTextFormControlElement):
3489         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
3490         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
3491         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
3492         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
3493         * html/HTMLFormControlElement.h:
3494         (WebCore::HTMLTextFormControlElement::handleFocusEvent):
3495         (WebCore::HTMLTextFormControlElement::handleBlurEvent):
3496         * html/HTMLInputElement.cpp:
3497         (WebCore::HTMLInputElement::HTMLInputElement):
3498         (WebCore::HTMLInputElement::handleFocusEvent):
3499         (WebCore::HTMLInputElement::handleBlurEvent):
3500         (WebCore::HTMLInputElement::parseMappedAttribute):
3501         (WebCore::HTMLInputElement::createRenderer):
3502         (WebCore::HTMLInputElement::setValue):
3503         (WebCore::HTMLInputElement::setValueFromRenderer):
3504         * html/HTMLInputElement.h:
3505         (WebCore::HTMLInputElement::supportsPlaceholder):
3506         (WebCore::HTMLInputElement::isEmptyValue):
3507         * html/HTMLIsIndexElement.cpp:
3508         (WebCore::HTMLIsIndexElement::parseMappedAttribute):
3509         * html/HTMLTextAreaElement.cpp:
3510         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
3511         (WebCore::HTMLTextAreaElement::createRenderer):
3512         * html/HTMLTextAreaElement.h:
3513         (WebCore::HTMLTextAreaElement::supportsPlaceholder):
3514         (WebCore::HTMLTextAreaElement::isEmptyValue):
3515         * rendering/RenderTextControl.cpp:
3516         (WebCore::RenderTextControl::RenderTextControl):
3517         * rendering/RenderTextControl.h:
3518         * rendering/RenderTextControlMultiLine.cpp:
3519         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
3520         * rendering/RenderTextControlMultiLine.h:
3521         * rendering/RenderTextControlSingleLine.cpp:
3522         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
3523         (WebCore::RenderTextControlSingleLine::updateFromElement):
3524         * rendering/RenderTextControlSingleLine.h:
3525         * wml/WMLInputElement.cpp:
3526         (WebCore::WMLInputElement::setValue):
3527         (WebCore::WMLInputElement::createRenderer):
3528         * wml/WMLInputElement.h:
3529
3530 2009-09-26  Shu Chang  <Chang.Shu@nokia.com>
3531
3532         Reviewed by Alexey Proskuryakov.
3533
3534         Optimize the code so only the text from start to end is scanned.
3535         https://bugs.webkit.org/show_bug.cgi?id=29092
3536
3537         On a platform with webkit+Qt+Symbian, the parsing time for a 600K text
3538         file improved from 400ms to 40ms (10x faster).
3539
3540         * dom/Text.cpp:
3541         (WebCore::Text::createWithLengthLimit):
3542
3543 2009-09-26  Xiaomei Ji  <xji@chromium.org>
3544
3545         Reviewed by Eric Seidel.
3546
3547         This Patch fixes [chromium] the drop-down is always left-aligned even
3548         for RTL element.
3549         https://bugs.webkit.org/show_bug.cgi?id=29612
3550
3551         For auto-complete, the items in drop-down should be right-aligned if
3552         the directionality of <input> field is RTL.
3553         For <select><option>, the items in drop-down should be right-aligned
3554         if the directionality of <select> is RTL.
3555
3556         No automatic test is possible. Manual tests are added.
3557
3558         * manual-tests/autofill_alignment.html: Added.
3559         * manual-tests/select_alignment.html: Added.
3560         * platform/chromium/PopupMenuChromium.cpp:
3561         (WebCore::PopupListBox::paintRow): Adjust the starting x-axis of text to
3562         be paint if it should be right-aligned.
3563
3564 2009-09-25  Dan Bernstein  <mitz@apple.com>
3565
3566         Reviewed by Sam Weinig.
3567
3568         REGRESSION (r48775) FontList.plist written by TOT WebKit causes Safari 4
3569         to crash on launch
3570         https://bugs.webkit.org/show_bug.cgi?id=29759
3571
3572         * platform/graphics/win/FontDatabase.cpp:
3573         (WebCore::writeFontDatabaseToPlist): Reverted to saving the CG font DB
3574         property list at the root of FontList.plist, but with an additional
3575         key for the last value of the Fonts registry key.
3576         (WebCore::populateFontDatabase): Pass the FontList.plist in its entirety
3577         to populatFontDatabaseFromPlist.
3578
3579 2009-09-25  Kevin Ollivier  <kevino@theolliviers.com>
3580
3581         Build fix. Adding missing header files.
3582
3583         * bindings/js/JSNamedNodeMapCustom.cpp:
3584
3585 2009-09-25  David Kilzer  <ddkilzer@apple.com>
3586
3587         Part 1 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
3588
3589         Reviewed by Darin Adler.
3590
3591         * DerivedSources.make: Move tests for ENABLE_CONTEXT_MENUS,
3592         ENABLE_DRAG_SUPPORT and ENABLE_INSPECTOR into Mac-only section.
3593
3594 2009-09-25  Adam Barth  <abarth@webkit.org>
3595
3596         Reviewed by Darin Adler.
3597
3598         Load blocks during unload should not affect targeted loads
3599         https://bugs.webkit.org/show_bug.cgi?id=29747
3600
3601         Move the check of the unload state after checking for targeted links.
3602
3603         Test: fast/loader/unload-hyperlink-targeted.html
3604
3605         * loader/FrameLoader.cpp:
3606         (WebCore::FrameLoader::loadURL):
3607
3608 2009-09-25  Kenneth Russell  <kbr@google.com>
3609
3610         Reviewed by Dimitri Glazkov.
3611
3612         [Chromium] Add initial V8 bindings for WebGL
3613         https://bugs.webkit.org/show_bug.cgi?id=29664
3614
3615         * WebCore.gypi:
3616         * bindings/scripts/CodeGeneratorV8.pm:
3617         * bindings/v8/DOMObjectsInclude.h:
3618         * bindings/v8/DerivedSourcesAllInOne.cpp:
3619         * bindings/v8/V8DOMWrapper.cpp:
3620         (WebCore::V8DOMWrapper::getTemplate):
3621         * bindings/v8/V8Index.cpp:
3622         * bindings/v8/V8Index.h:
3623         * bindings/v8/custom/V8CanvasArrayBufferCustom.cpp: Added.
3624         (WebCore::CALLBACK_FUNC_DECL):
3625         * bindings/v8/custom/V8CanvasArrayCustom.h: Added.
3626         (WebCore::constructCanvasArray):
3627         * bindings/v8/custom/V8CanvasByteArrayCustom.cpp: Added.
3628         (WebCore::CALLBACK_FUNC_DECL):
3629         (WebCore::INDEXED_PROPERTY_GETTER):
3630         (WebCore::INDEXED_PROPERTY_SETTER):
3631         * bindings/v8/custom/V8CanvasFloatArrayCustom.cpp: Added.
3632         (WebCore::CALLBACK_FUNC_DECL):
3633         (WebCore::INDEXED_PROPERTY_GETTER):
3634         (WebCore::INDEXED_PROPERTY_SETTER):
3635         * bindings/v8/custom/V8CanvasIntArrayCustom.cpp: Added.
3636         (WebCore::CALLBACK_FUNC_DECL):
3637         (WebCore::INDEXED_PROPERTY_GETTER):
3638         (WebCore::INDEXED_PROPERTY_SETTER):
3639         * bindings/v8/custom/V8CanvasRenderingContext3DCustom.cpp: Added.
3640         (WebCore::jsArrayToFloatArray):
3641         (WebCore::jsArrayToIntArray):
3642         (WebCore::CALLBACK_FUNC_DECL):
3643         (WebCore::):
3644         (WebCore::vertexAttribAndUniformHelperf):
3645         (WebCore::uniformHelperi):
3646         (WebCore::uniformMatrixHelper):
3647         * bindings/v8/custom/V8CanvasShortArrayCustom.cpp: Added.
3648         (WebCore::CALLBACK_FUNC_DECL):
3649         (WebCore::INDEXED_PROPERTY_GETTER):
3650         (WebCore::INDEXED_PROPERTY_SETTER):
3651         * bindings/v8/custom/V8CanvasUnsignedByteArrayCustom.cpp: Added.
3652         (WebCore::CALLBACK_FUNC_DECL):
3653         (WebCore::INDEXED_PROPERTY_GETTER):
3654         (WebCore::INDEXED_PROPERTY_SETTER):
3655         * bindings/v8/custom/V8CanvasUnsignedIntArrayCustom.cpp: Added.
3656         (WebCore::CALLBACK_FUNC_DECL):
3657         (WebCore::INDEXED_PROPERTY_GETTER):
3658         (WebCore::INDEXED_PROPERTY_SETTER):
3659         * bindings/v8/custom/V8CanvasUnsignedShortArrayCustom.cpp: Added.
3660         (WebCore::CALLBACK_FUNC_DECL):
3661         (WebCore::INDEXED_PROPERTY_GETTER):
3662         (WebCore::INDEXED_PROPERTY_SETTER):
3663         * bindings/v8/custom/V8CustomBinding.h:
3664         * bindings/v8/custom/V8DocumentCustom.cpp:
3665         (WebCore::CALLBACK_FUNC_DECL):
3666         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3667         (WebCore::CALLBACK_FUNC_DECL):
3668         * platform/graphics/GraphicsContext3D.h:
3669
3670 2009-09-25  Jeremy Orlow  <jorlow@chromium.org>
3671
3672         This is breaking Chromium try bots, so I'm counting this as a build fix.
3673
3674         Add more svn:ignore exceptions.  On different platforms, these files are
3675         generated with different case for WebCore.
3676
3677         * WebCore.gyp: Changed property svn:ignore.
3678
3679 2009-09-25  Alexey Proskuryakov  <ap@apple.com>
3680
3681         Reverting r48767, as it broke Windows build in a non-trivial way.
3682
3683         * bindings/js/JSAbstractWorkerCustom.cpp:
3684         (WebCore::JSAbstractWorker::addEventListener):
3685         (WebCore::JSAbstractWorker::removeEventListener):
3686         * bindings/js/JSDOMApplicationCacheCustom.cpp:
3687         (WebCore::JSDOMApplicationCache::addEventListener):
3688         (WebCore::JSDOMApplicationCache::removeEventListener):
3689         * bindings/js/JSDOMGlobalObject.cpp:
3690         (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
3691         * bindings/js/JSDOMWindowCustom.cpp:
3692         (WebCore::JSDOMWindow::addEventListener):
3693         (WebCore::JSDOMWindow::removeEventListener):
3694         * bindings/js/JSEventListener.cpp:
3695         (WebCore::JSEventListener::JSEventListener):
3696         (WebCore::JSEventListener::jsFunction):
3697         (WebCore::JSEventListener::markJSFunction):
3698         (WebCore::JSEventListener::handleEvent):
3699         (WebCore::JSEventListener::reportError):
3700         * bindings/js/JSEventListener.h:
3701         (WebCore::JSEventListener::create):
3702         * bindings/js/JSEventSourceCustom.cpp:
3703         (WebCore::JSEventSource::addEventListener):
3704         (WebCore::JSEventSource::removeEventListener):
3705         * bindings/js/JSLazyEventListener.cpp:
3706         (WebCore::JSLazyEventListener::JSLazyEventListener):
3707         (WebCore::JSLazyEventListener::jsFunction):
3708         (WebCore::JSLazyEventListener::parseCode):
3709         * bindings/js/JSLazyEventListener.h:
3710         (WebCore::JSLazyEventListener::create):
3711         * bindings/js/JSMessagePortCustom.cpp:
3712         (WebCore::JSMessagePort::addEventListener):
3713         (WebCore::JSMessagePort::removeEventListener):
3714         * bindings/js/JSNodeCustom.cpp:
3715         (WebCore::JSNode::addEventListener):
3716         (WebCore::JSNode::removeEventListener):
3717         * bindings/js/JSSVGElementInstanceCustom.cpp:
3718         (WebCore::JSSVGElementInstance::addEventListener):
3719         (WebCore::JSSVGElementInstance::removeEventListener):
3720         * bindings/js/JSWorkerContextCustom.cpp:
3721         (WebCore::JSWorkerContext::addEventListener):
3722         (WebCore::JSWorkerContext::removeEventListener):
3723         * bindings/js/JSXMLHttpRequestCustom.cpp:
3724         (WebCore::JSXMLHttpRequest::addEventListener):
3725         (WebCore::JSXMLHttpRequest::removeEventListener):
3726         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
3727         (WebCore::JSXMLHttpRequestUpload::addEventListener):
3728         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
3729         * bindings/js/ScriptEventListener.cpp:
3730         (WebCore::createAttributeEventListener):
3731         * bindings/objc/ObjCEventListener.h:
3732         * bindings/objc/ObjCEventListener.mm:
3733         (WebCore::ObjCEventListener::handleEvent):
3734         * bindings/scripts/CodeGeneratorJS.pm:
3735         * dom/EventListener.h:
3736         (WebCore::EventListener::reportError):
3737         (WebCore::EventListener::jsFunction):
3738         * dom/EventTarget.cpp:
3739         (WebCore::EventTarget::fireEventListeners):
3740         * inspector/InspectorDOMAgent.cpp:
3741         (WebCore::InspectorDOMAgent::handleEvent):
3742         * inspector/InspectorDOMAgent.h:
3743         * inspector/InspectorDOMStorageResource.cpp:
3744         (WebCore::InspectorDOMStorageResource::handleEvent):
3745         * inspector/InspectorDOMStorageResource.h:
3746         * loader/ImageDocument.cpp:
3747         (WebCore::ImageEventListener::handleEvent):
3748         * svg/animation/SVGSMILElement.cpp:
3749         (WebCore::ConditionEventListener::handleEvent):
3750         * workers/WorkerContext.cpp:
3751         (WebCore::WorkerContext::reportException):
3752
3753 2009-09-24  Tony Chang  <tony@chromium.org>
3754
3755         Reviewed by David Levin.
3756
3757         Add a gyp variable to allow building a debug webcore without debug
3758         symbols.  This allows for faster compile, link, and gdb times.
3759
3760         https://bugs.webkit.org/show_bug.cgi?id=29721
3761
3762         No new tests, build config change.
3763
3764         * WebCore.gyp/WebCore.gyp:
3765
3766 2009-09-25  Darin Fisher  <darin@chromium.org>
3767
3768         Reviewed by Dimitri Glazkov.
3769
3770         Declare RegisteredEventListener as a class instead of a struct.
3771         This fixes a warning in the Chromium build.
3772
3773         * dom/RegisteredEventListener.h:
3774
3775 2009-09-25  Dan Bernstein  <mitz@apple.com>
3776
3777         Reviewed by Jon Honeycutt.
3778
3779         WebCore part of
3780         <rdar://problem/7211635> 2 byte characters are displayed as garbaged
3781         <rdar://problem/7212626> garbled/gibberish text (off-by-one)
3782
3783         When the Windows Fonts directory contains more than one font file for a
3784         given font name, which of the fonts gets assigned to the name in the
3785         Core Graphics font database was determined arbitrarily and did not
3786         always match the font GDI used for the same font name. The mismatch
3787         caused character-to-glyph mapping to use one font and glyph rendering to
3788         use another.
3789
3790         The fix is to update the Core Graphics font database from the registry
3791         entries (that reflect the name-to-font mapping that GDI uses) after
3792         populating it with the result of scanning the Fonts directory. As a
3793         consequence, the directory needs to be scanned at startup every time the
3794         registry key changes, so the last value of the registry key is kept
3795         in the property list on disk so that it could be compared to the current
3796         value on startup.
3797
3798         * platform/graphics/win/FontDatabase.cpp:
3799         (WebCore::populateFontDatabaseFromPlist): Now takes a property list as
3800         a parameter and avoids round-tripping through XML by calling
3801         wkAddFontsFromPlist() instead of wkAddFontsFromPlistRepresentation().
3802         (WebCore::fontFilenamesFromRegistryKey):
3803         (WebCore::cgFontDBKey):
3804         (WebCore::writeFontDatabaseToPlist): Now takes the CG font DB property
3805         list and a property list with the font filenames from the registry and
3806         writes a dictionary with those property lists as values.
3807         (WebCore::fontFilenamesFromRegistry): Added. Returns an array with the
3808         values in the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
3809         registry key.
3810         (WebCore::populateFontDatabase): Changed to read the contents of the
3811         Fonts registry key and compare it with the last-saved value from the
3812         property list, and to call wkAddFontsFromRegistry() after populating the
3813         CG font DB from the file system. Uses wkCreateFontsPlist() instead of
3814         wkCreateFontsPlistRepresentation() to avoid round-tripping through XML.
3815
3816 2009-09-25  Geoffrey Garen  <ggaren@apple.com>
3817
3818         Reviewed by Darin Adler.
3819
3820         Inlined some object creation code, including lexicalGlobalObject access
3821         https://bugs.webkit.org/show_bug.cgi?id=29750
3822
3823         * bindings/js/JSInspectorBackendCustom.cpp:
3824         (WebCore::JSInspectorBackend::currentCallFrame):
3825         * inspector/JavaScriptDebugServer.cpp:
3826         (WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
3827         API changes.
3828
3829 2009-09-25  Dave Hyatt  <hyatt@apple.com>
3830
3831         Reviewed by Anders Carlsson.
3832
3833         https://bugs.webkit.org/show_bug.cgi?id=24399
3834         Make @import work in user stylesheets.  The first bug was that the URL wasn't being set on the
3835         user sheets themselves, so relative @import URLs couldn't resolve properly.  The second bug
3836         was that the loads would be denied.  This is fixed by using the requestUserCSSStyleSheet method
3837         instead of the normal request method.  In order to know when to do this, CSSStyleSheets now have
3838         a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not.
3839
3840         * css/CSSImportRule.cpp:
3841         (WebCore::CSSImportRule::insertedIntoParent):
3842         * css/CSSStyleSheet.cpp:
3843         (WebCore::CSSStyleSheet::CSSStyleSheet):
3844         * css/CSSStyleSheet.h:
3845         (WebCore::CSSStyleSheet::setIsUserStyleSheet):
3846         (WebCore::CSSStyleSheet::isUserStyleSheet):
3847         * dom/Document.cpp:
3848         (WebCore::Document::pageUserSheet):
3849         (WebCore::Document::pageGroupUserSheets):
3850
3851 2009-09-25  Simon Fraser  <simon.fraser@apple.com>
3852
3853         Reviewed by Darin Adler.
3854
3855         ASSERTION FAILED: !repaintContainer || repaintContainer == this
3856         https://bugs.webkit.org/show_bug.cgi?id=29755
3857         
3858         It's possible for RenderObject::container() to return an object that is higher
3859         in the hierarchy than the repaintContainer that is being used to repaint an
3860         object. For example, this can happen when running an accelerated opacity
3861         transition on an element with a position:absolute parent, and a position:absolute child.
3862         
3863         In this case we need to detect when RenderObject::container() will skip over
3864         repaintContainer, and in that case adjust the coords to shift into repaintContainer's space.
3865
3866         Test: compositing/repaint/opacity-between-absolute.html
3867
3868         * rendering/RenderBox.cpp:
3869         (WebCore::RenderBox::mapLocalToContainer):
3870         (WebCore::RenderBox::computeRectForRepaint):
3871         * rendering/RenderInline.cpp:
3872         (WebCore::RenderInline::computeRectForRepaint):
3873         * rendering/RenderObject.cpp:
3874         (WebCore::RenderObject::container):
3875         * rendering/RenderObject.h:
3876
3877 2009-09-25  Simon Fraser  <simon.fraser@apple.com>
3878
3879         Reviewed by Darin Adler.
3880
3881         Crash with hardware accelerated rotation of a PDF image in a data URL
3882         <rdar://problem/7250378>
3883         
3884         PDF images don't return a color space from CGImageGetColorSpace(),
3885         so we need to null-check the return value before use.
3886
3887         Test: compositing/color-matching/pdf-image-match.html
3888
3889         * platform/graphics/mac/GraphicsLayerCA.mm:
3890         (WebCore::GraphicsLayerCA::setContentsToImage):
3891
3892 2009-09-25  Darin Adler  <darin@apple.com>
3893
3894         Reviewed by Geoffrey Garen.
3895
3896         Null-deref when first access to an Attr node is after its Element is destroyed
3897         https://bugs.webkit.org/show_bug.cgi?id=29748
3898
3899         Test: fast/dom/Attr/access-after-element-destruction.html
3900
3901         * bindings/js/JSAttrCustom.cpp:
3902         (WebCore::JSAttr::markChildren): Added. Keeps the ownerElement alive as
3903         long as the Attr is alive.
3904
3905         * bindings/js/JSNamedNodeMapCustom.cpp:
3906         (WebCore::JSNamedNodeMap::markChildren): Added. Keeps the Element alive as
3907         long as the NamedNodeMap is alive.
3908
3909         * dom/Attr.idl: Added CustomMarkFunction attribute.
3910
3911         * dom/NamedAttrMap.cpp:
3912         (WebCore::NamedNodeMap::getAttributeItem): Tweaked formatting.
3913         (WebCore::NamedNodeMap::detachFromElement): Call clearAttributes so we don't
3914         have attributes hanging around that might need an Attr node created; that way
3915         we won't crash with a null-dereference trying to deal with one of them. This
3916         can't happen when working with JavaScript since the Element will be kept
3917         alive due to the change above.
3918         (WebCore::NamedNodeMap::addAttribute): Fix function name in comment.
3919         (WebCore::NamedNodeMap::removeAttribute): Removed unneeded "+ 1" and added
3920         missing braces.
3921
3922         * dom/NamedAttrMap.h: Made the element function public so it can be used by
3923         the JavaScript binding to keep the Element alive.
3924
3925         * dom/NamedNodeMap.idl: Added CustomMarkFunction attribute.
3926
3927 2009-09-24  Alexey Proskuryakov  <ap@apple.com>
3928
3929         Reviewed by Darin Adler and Sam Weinig.
3930
3931         Onclick not fired for an element copied with cloneContents() or cloneNode()
3932         https://bugs.webkit.org/show_bug.cgi?id=25130
3933
3934         The change here is that JS event listeners don't keep a reference to a global object from
3935         where they were created, and instead take it as a parameter when parsing source code. Also,
3936         the listener creation won't fail just because it happens for an element in a frameless
3937         document.
3938         Thus, moving nodes between documents no longer results in having incorrect registered
3939         lazy event listeners on them.
3940
3941         Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
3942                fast/events/attribute-listener-cloned-from-frameless-doc-context.html
3943                fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
3944                fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
3945                fast/events/attribute-listener-extracted-from-frameless-doc-context.html
3946
3947         * bindings/js/JSEventListener.cpp:
3948         (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
3949         (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
3950         getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
3951         (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
3952         (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
3953         (WebCore::JSEventListener::reportError): Ditto.
3954
3955         * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
3956         to JSDOMGlobalObject.
3957
3958         * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
3959         creation was split between this function and ScriptEventListener; moved it here, as JS
3960         global object can be different now.
3961
3962         * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
3963         which can not be determined at parsing time.
3964
3965         * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
3966         for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
3967         expect that errors are logged at document parsing time, and because I don't know what other
3968         side effects moving it vould have.
3969
3970         * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
3971         because JSC needs a global context here.
3972
3973         * bindings/js/JSAbstractWorkerCustom.cpp:
3974         (WebCore::JSAbstractWorker::addEventListener):
3975         (WebCore::JSAbstractWorker::removeEventListener):
3976         * bindings/js/JSDOMApplicationCacheCustom.cpp:
3977         (WebCore::JSDOMApplicationCache::addEventListener):
3978         (WebCore::JSDOMApplicationCache::removeEventListener):
3979         * bindings/js/JSDOMGlobalObject.cpp:
3980         (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
3981         * bindings/js/JSDOMWindowCustom.cpp:
3982         (WebCore::JSDOMWindow::addEventListener):
3983         (WebCore::JSDOMWindow::removeEventListener):
3984         * bindings/js/JSEventSourceCustom.cpp:
3985         (WebCore::JSEventSource::addEventListener):
3986         (WebCore::JSEventSource::removeEventListener):
3987         * bindings/js/JSMessagePortCustom.cpp:
3988         (WebCore::JSMessagePort::addEventListener):
3989         (WebCore::JSMessagePort::removeEventListener):
3990         * bindings/js/JSNodeCustom.cpp:
3991         (WebCore::JSNode::addEventListener):
3992         (WebCore::JSNode::removeEventListener):
3993         * bindings/js/JSSVGElementInstanceCustom.cpp:
3994         (WebCore::JSSVGElementInstance::addEventListener):
3995         (WebCore::JSSVGElementInstance::removeEventListener):
3996         * bindings/js/JSWorkerContextCustom.cpp:
3997         (WebCore::JSWorkerContext::addEventListener):
3998         (WebCore::JSWorkerContext::removeEventListener):
3999         * bindings/js/JSXMLHttpRequestCustom.cpp:
4000         (WebCore::JSXMLHttpRequest::addEventListener):
4001         (WebCore::JSXMLHttpRequest::removeEventListener):
4002         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
4003         (WebCore::JSXMLHttpRequestUpload::addEventListener):
4004         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
4005         * bindings/objc/ObjCEventListener.h:
4006         * bindings/objc/ObjCEventListener.mm:
4007         (WebCore::ObjCEventListener::handleEvent):
4008         * bindings/scripts/CodeGeneratorJS.pm:
4009         * dom/EventTarget.cpp:
4010         (WebCore::EventTarget::fireEventListeners):
4011         * inspector/InspectorDOMAgent.cpp:
4012         (WebCore::InspectorDOMAgent::handleEvent):
4013         * inspector/InspectorDOMAgent.h:
4014         * inspector/InspectorDOMStorageResource.cpp:
4015         (WebCore::InspectorDOMStorageResource::handleEvent):
4016         * inspector/InspectorDOMStorageResource.h:
4017         * loader/ImageDocument.cpp:
4018         (WebCore::ImageEventListener::handleEvent):
4019         * svg/animation/SVGSMILElement.cpp:
4020         (WebCore::ConditionEventListener::handleEvent):
4021         * workers/WorkerContext.cpp:
4022         (WebCore::WorkerContext::reportException):
4023         Don't pass global object to JSEventListener::create(), which no longer needs it.
4024         Note that some of these functions still have an early return for null global object, which
4025         can probably be removed in a later patch.
4026         Pass ScriptExecutionContext to EventListener methods that now need it.
4027
4028 2009-09-25  Enrica Casucci  <enrica@apple.com>
4029
4030         Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
4031
4032         Fix for https://bugs.webkit.org/show_bug.cgi?id=29740
4033         <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
4034
4035         Change the way style is preserved when inserting a new paragraph.
4036         The original code handled insertion at the beginning and at the end of a paragraph as special
4037         cases. The newly created paragraph contained a set of nodes generated starting from the
4038         computed style of the insertion node. This approach has two problems:
4039         1. if the insertion node has a non opaque background color and one of the parent element did have
4040         a solid background color the new paragraph did not have the element with the solid color in the tree.
4041         2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
4042         background color and some font attribute was being reproduced as span + bold + italic + font as separate tags.
4043         The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
4044         paragraph where the insertion point is.
4045
4046         Test: editing/inserting/insert-bg-font.html
4047
4048         * editing/InsertParagraphSeparatorCommand.cpp:
4049         (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
4050         between the insert node and the outer block.
4051         (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
4052         in the new paragraph the same element hierarchy present in the starting paragraph.
4053         (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
4054         in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
4055         at the end of the paragraph to use the new methods instead of applying the calculated style.
4056         * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.
4057
4058 2009-09-25  Patrick Mueller  <Patrick_Mueller@us.ibm.com>
4059
4060         Reviewed by Timothy Hatcher.
4061
4062         Content-type parameters not taken into account when building form-data
4063         https://bugs.webkit.org/show_bug.cgi?id=28970
4064
4065         existing manual test case extended with new tests
4066
4067         * English.lproj/localizedStrings.js:
4068         * inspector/front-end/ResourceView.js:
4069         (WebInspector.ResourceView.prototype._refreshFormData):
4070         (WebInspector.ResourceView.prototype._refreshParms):
4071         * manual-tests/inspector/display-form-data.html:
4072
4073 2009-09-25  Yuan Song  <song.yuan@ericsson.com>
4074
4075         Reviewed by Darin Adler.
4076
4077         https://bugs.webkit.org/show_bug.cgi?id=14566
4078
4079         Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value.
4080
4081         Test: fast/js/invalid-domain-change-throws-exception.html
4082
4083         * dom/Document.cpp:
4084         (WebCore::Document::setDomain):
4085         * dom/Document.h:
4086         * dom/Document.idl:
4087
4088 2009-09-25  Adam Barth  <abarth@webkit.org>
4089
4090         Reviewed by Dimitri Glazkov.
4091
4092         [V8] Teach ScheduledAction::execute about isolated worlds
4093         https://bugs.webkit.org/show_bug.cgi?id=27703
4094
4095         When setTimeout is called with a string argument in an isolated
4096         world, we now compile the string in the isolated world.
4097
4098         Last time we tried this change, we got a lot of crashes.  This
4099         time we're using a fresh local handle as our context to avoid
4100         trouble if the peristent handle gets disposed before we leave
4101         the context.
4102
4103         Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
4104
4105         * bindings/v8/ScheduledAction.cpp:
4106         (WebCore::ScheduledAction::execute):
4107
4108 2009-09-25  Paul Godavari  <paul@chromium.org>
4109
4110         Reviewed by Darin Fisher.
4111
4112         Fix a regression in Mac Chromium popup menus, where the user's
4113         selection was ignored and the popup became unresponsive.
4114         https://bugs.webkit.org/show_bug.cgi?id=29726
4115
4116         The fix is to notify the popup's client that the popup was hidden,
4117         even if the popup has no parent.
4118
4119         * platform/chromium/PopupMenuChromium.cpp:
4120         (WebCore::PopupListBox::hidePopup):
4121
4122 2009-09-25  Alexander Pavlov  <apavlov@chromium.org>
4123
4124         Reviewed by Dan Bernstein.
4125
4126         Enable Pasteboard::writePlainText for Chromium and fix code style nits.
4127         https://bugs.webkit.org/show_bug.cgi?id=29734
4128
4129         * platform/chromium/PasteboardChromium.cpp:
4130         (WebCore::Pasteboard::writePlainText):
4131         * platform/gtk/PasteboardGtk.cpp:
4132         (WebCore::Pasteboard::writePlainText):
4133         (WebCore::Pasteboard::writeURL):
4134         * platform/mac/PasteboardMac.mm:
4135         (WebCore::Pasteboard::writeSelection):
4136         (WebCore::Pasteboard::writePlainText):
4137         (WebCore::Pasteboard::writeURL):
4138         * platform/qt/PasteboardQt.cpp:
4139         (WebCore::Pasteboard::writePlainText):
4140
4141 2009-09-25  Yongjun Zhang  <yongjun.zhang@nokia.com>
4142
4143         Reviewed by Ariya Hidayat.
4144
4145         https://bugs.webkit.org/show_bug.cgi?id=28876
4146         [Qt] reduce peak memory consumption of text decoding.
4147
4148         Chop large input buffer into small buffers to reduce peak memory
4149         during decoding.
4150
4151         * platform/text/qt/TextCodecQt.cpp:
4152         (WebCore::TextCodecQt::decode):
4153
4154 2009-09-24  Jon Honeycutt  <jhoneycutt@apple.com>
4155
4156         Add a mechanism for automatically halting plug-ins.
4157
4158         Reviewed by Oliver Hunt and Alice Liu.
4159
4160         * GNUmakefile.am:
4161
4162         * WebCore.base.exp:
4163         Update export of Page constructor.
4164
4165         * WebCore.gypi:
4166
4167         * WebCore.pro:
4168
4169         * WebCore.vcproj/WebCore.vcproj:
4170         Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
4171         HaltablePlugin.h.
4172
4173         * WebCore.xcodeproj/project.pbxproj:
4174         Add files to Mac project.
4175
4176         * loader/EmptyClients.h:
4177         Added an empty PluginHalterClient.
4178         (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
4179         Return false.
4180
4181         * page/PluginHalter.cpp: Added.
4182         (WebCore::PluginHalter::PluginHalter):
4183         (WebCore::PluginHalter::didStartPlugin):
4184         Add the object to the plug-in set. If this is the only item in the set,
4185         set m_oldestStartTime to this object's time, and start the timer.
4186         (WebCore::PluginHalter::didStopPlugin):
4187         Remove the plug-in from the set.
4188         (WebCore::PluginHalter::timerFired):
4189         Find the cut-off time as the current time minus the allowed run time;
4190         plug-ins older than this may be halted. Iterate over the plug-ins. Find
4191         the object with the oldest start time that is too young to be halted;
4192         we'll use its start time to set the timer's next fire time. For all
4193         plug-ins that are candidates to be halted, call the
4194         PluginHalterClient's shouldHaltPlugin(). If this function returns true,
4195         call the plug-in's halt() function. Remove these objects from the set
4196         of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
4197         (WebCore::PluginHalter::startTimerIfNecessary):
4198         If the timer is set to fire, or the set of tracked plug-ins is empty,
4199         return early. Set the timer to fire after the oldest plug-in has run
4200         for the allowed run time.
4201
4202         * page/PluginHalter.h: Added.
4203         (WebCore::PluginHalter::setPluginAllowedRunTime):
4204
4205         * page/PluginHalterClient.h: Added.
4206         (WebCore::PluginHalterClient::~PluginHalterClient):
4207
4208         * page/Page.cpp:
4209         (WebCore::Page::Page):
4210         Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
4211         to create the PluginHalter if necessary.
4212         (WebCore::Page::pluginHalterEnabledStateChanged):
4213         If plug-in halting is enabled, create the PluginHalter. If it is
4214         disabled, clear it.
4215         (WebCore::Page::pluginAllowedRunTimeChanged):
4216         If there is a plug-in halter, call its setPluginAllowedRunTime().
4217         (WebCore::Page::didStartPlugin):
4218         If there is a plug-in halter, call its didStartPlugin().
4219         (WebCore::Page::didStopPlugin):
4220         If there is a plug-in halter, call its didStopPlugin().
4221
4222         * page/Page.h:
4223         Add a parameter to the Page constructor for the PluginHalterClient.
4224         Added declarations for didStartPlugin() and didStopPlugin(), which are
4225         called when HaltablePlugins are added to or removed from the page. Adds
4226         pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
4227         notify the Page when these settings are changed. Added members to hold
4228         the PluginHalter and the PluginHalterClient.
4229
4230         * page/Settings.cpp:
4231         (WebCore::Settings::Settings):
4232         (WebCore::Settings::setPluginHalterEnabled):
4233         If the enabled state has changed, call the Page's
4234         pluginHalterEnabledStateChanged().
4235         (WebCore::Settings::setPluginAllowedRunTime):
4236         Call the Page's pluginAllowedRunTimeChanged().
4237
4238         * page/Settings.h:
4239         (WebCore::Settings::pluginHalterEnabled):
4240         (WebCore::Settings::pluginAllowedRunTime):
4241
4242         * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that