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