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