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