WebCore:
[WebKit-https.git] / WebCore / ChangeLog
1 2008-05-06  Brady Eidson  <beidson@apple.com>
2
3         Reviewed by Darin Adler
4
5         Preparation for upcoming work making LocalStorage persistent.
6
7         When the application terminates, all pending local storage writes need to be
8         sync'ed out to disk.
9         This works n combination with platform specific code in WebKit that calls it.
10
11         * WebCore.base.exp:
12
13         * page/PageGroup.cpp:
14         (WebCore::PageGroup::closeLocalStorage): Close all open LocalStorage objects
15         * page/PageGroup.h:
16
17         * storage/LocalStorage.cpp:
18         (WebCore::LocalStorage::close): Placeholder for what will sync and terminate the
19           local storage thread in the future.
20         * storage/LocalStorage.h:
21
22 2008-05-06  Brady Eidson  <beidson@apple.com>
23
24         Rubberstamped by David Kilzer
25
26         * WebCore.base.exp:  Sort this mess!
27
28 2008-05-05  Mark Rowe  <mrowe@apple.com>
29
30         Reviewed by Dan Bernstein.
31
32         Fix 60 crashes seen on the buildbots that were misreported as hangs.
33
34         * dom/Document.cpp:
35         (WebCore::Document::detachNodeIterator): Null-check page() before dereferencing it.
36         (WebCore::Document::nodeWillBeRemoved): Ditto.
37         (WebCore::Document::textInserted): Ditto.
38         (WebCore::Document::textNodesMerged): Ditto.
39         (WebCore::Document::textRemoved): Ditto.
40
41 2008-05-05  Brady Eidson  <beidson@apple.com>
42
43         Reviewed by Mitz Pettel RTL
44
45         Preparation for upcoming work making LocalStorage persistent.
46
47         The other half of the StorageMap::importItem() addition.
48
49         * storage/StorageArea.cpp:
50         (WebCore::StorageArea::importItem):
51         * storage/StorageArea.h:
52
53 2008-05-05  Brady Eidson  <beidson@apple.com>
54
55         Reviewed by Mitz Pettel RTL
56
57         Preparation for upcoming work making LocalStorage persistent.
58
59         - Create the LocalStorage object for a PageGroup the moment the first Page is added to it
60           The Settings of the first Page define what persistent path the LocalStorage will use
61         - Add a Frame argument for the LocalStorageArea request - this will allow a client object
62           to be queried before the LocalStorageArea is established
63
64         * page/DOMWindow.cpp:
65         (WebCore::DOMWindow::localStorage):
66
67         * page/PageGroup.cpp:
68         (WebCore::PageGroup::addPage):
69         (WebCore::PageGroup::localStorage):
70
71         * storage/LocalStorage.cpp:
72         (WebCore::LocalStorage::LocalStorage): Take the path as a constructor argument.  Deep copy
73           the path as it will be used from another thread.
74         (WebCore::LocalStorage::storageArea):
75         * storage/LocalStorage.h:
76         (WebCore::LocalStorage::create):
77
78 2008-05-05  Brady Eidson  <beidson@apple.com>
79
80         Reviewed by Mitz Pettel RTL
81
82         Preparation for upcoming work making LocalStorage persistent.
83
84         StorageMaps normally have copy-on-write semantics to help support SessionStorage.
85         For LocalStorage, we never want this behavior.  When we forcefully import items into 
86         a StorageMap from the LocalStorage background thread, this new import method will be used.
87
88         * storage/StorageMap.cpp:
89         (WebCore::StorageMap::importItem): Add a deep-copy of the item to the map without worrying
90           about copy-on-write.
91         * storage/StorageMap.h:
92
93 2008-05-05  Kevin McCullough  <kmccullough@apple.com>
94
95         Reviewed by Tim.
96
97         -<rdar://problem/5770054> JavaScript profiler (10928)
98         -Begininings of a UI for the Profiler in the WebInspector.
99
100         * English.lproj/InspectorLocalizedStrings.js: Add new strings to be
101         localized.
102         * page/inspector/DatabasesPanel.js: Changed the name of the Databae's
103         results table to be more generic as it is now also used by the profiler.
104         * page/inspector/Images/glossySelected.png: Added.
105         * page/inspector/Images/profilesIcon.png: Added.
106         * page/inspector/Images/treeUpTriangleBlack.png: Added.
107         * page/inspector/Images/treeUpTriangleWhite.png: Added.
108         * page/inspector/ProfileView.js: Added. Sets up the header of the table.
109         * page/inspector/ProfilesPanel.js: Added.
110         * page/inspector/ProfilesPanel.js: Added. Sets up the containers of the
111         profiler's content.
112         * page/inspector/inspector.css: Change database-result-table to be more
113         generic as well as add the styles needed by the profiler.
114         * page/inspector/inspector.html: Add profiler support.
115
116 2008-05-05  Brady Eidson  <beidson@apple.com>
117
118         Change by Darin, reviewed by Brady
119
120         Small efficiency improvement Darin just spotted
121
122         * storage/StorageMap.cpp:
123         (WebCore::StorageMap::setItem):
124
125 2008-05-05  Antti Koivisto  <antti@apple.com>
126
127         Reviewed by Anders.
128
129         Fix https://bugs.webkit.org/show_bug.cgi?id=18899
130         Bug 18899: REGRESSION (r32871): Non-Safari crash in WTF::HashTable on startup
131
132         * loader/loader.cpp:
133         (WebCore::Loader::Loader):
134
135 2008-05-05  Brady Eidson  <beidson@apple.com>
136
137         Reviewed by Sam Weinig
138
139         Fix a bug in StorageMap iterator tracking where the iterator was not successfully
140         invalidated at an appropriate time.
141
142         * storage/StorageMap.cpp:
143         (WebCore::StorageMap::setItem): ALWAYS invalidate it here
144
145 2008-05-05  Justin Garcia  <justin.garcia@apple.com>
146
147         Reviewed by Darin.
148
149         <rdar://problem/5865171> REGRESSION: Creating a new quote places caret at beginning of quote instead of the end
150         
151         Disable Range mutation on document modifications in Tiger and Leopard Mail,
152         since they do their own mutation which interferes with ours.
153
154         * WebCore.base.exp:
155         * dom/Document.cpp:
156         (WebCore::Document::nodeChildrenChanged):
157         (WebCore::Document::nodeWillBeRemoved):
158         (WebCore::Document::textInserted):
159         (WebCore::Document::textRemoved):
160         (WebCore::Document::textNodesMerged):
161         (WebCore::Document::textNodeSplit):
162         * page/Settings.cpp:
163         (WebCore::Settings::Settings):
164         (WebCore::Settings::disableRangeMutationForOldAppleMail):
165         * page/Settings.h:
166         (WebCore::Settings::rangeMutationDisabledForOldAppleMail):
167
168 2008-05-05  Sam Weinig  <sam@webkit.org>
169
170         Reviewed by Tim Hatcher.
171
172         Make the Inspector's localizable strings file match the format used by Dashboard widgets.
173
174         * English.lproj/InspectorLocalizedStrings.js: Removed.
175         * English.lproj/localizedStrings.js: Added.
176         * WebCore.vcproj/WebCore.vcproj:
177         * WebCore.xcodeproj/project.pbxproj:
178         * page/inspector/inspector.js:
179
180 2008-05-05  Steve Falkenburg  <sfalken@apple.com>
181
182         Add support for default button appearance.
183         Add WebCore setting for app chrome mode.
184         
185         Reviewed by Dave Hyatt.
186
187         * css/CSSPrimitiveValueMappings.h:
188         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
189         * css/CSSValueKeywords.in: Added default-button value keyword.
190         * page/Settings.cpp:
191         (WebCore::Settings::Settings):
192         (WebCore::Settings::setApplicationChromeMode):
193         * page/Settings.h:
194         (WebCore::Settings::inApplicationChromeMode):
195         * rendering/RenderButton.cpp:
196         (WebCore::RenderButton::RenderButton):
197         (WebCore::RenderButton::setStyle):
198         (WebCore::RenderButton::timerFired):
199         * rendering/RenderButton.h:
200         * rendering/RenderStyle.h:
201         (WebCore::):
202         * rendering/RenderTheme.cpp:
203         (WebCore::RenderTheme::adjustStyle):
204         (WebCore::RenderTheme::paint):
205         (WebCore::RenderTheme::paintBorderOnly):
206         (WebCore::RenderTheme::paintDecorations):
207         (WebCore::RenderTheme::isControlStyled):
208         (WebCore::RenderTheme::isDefault):
209         * rendering/RenderTheme.h:
210         (WebCore::):
211         * rendering/RenderThemeSafari.cpp:
212         (WebCore::RenderThemeSafari::determineState):
213         (WebCore::RenderThemeSafari::adjustRepaintRect):
214         (WebCore::RenderThemeSafari::adjustButtonStyle):
215         * rendering/RenderThemeWin.cpp:
216         (WebCore::RenderThemeWin::supportsFocus):
217
218 2008-05-05  Alexey Proskuryakov  <ap@webkit.org>
219
220         Reviewed by Darin.
221
222         https://bugs.webkit.org/show_bug.cgi?id=11947
223         nbsps should be converted to entities in innerHTML
224
225         https://bugs.webkit.org/show_bug.cgi?id=18769
226         replacing &nbsp; with spaces using regexp creates inconsistent result
227
228         Tests: fast/dom/innerHTML-nbsp.html
229                fast/dom/innerHTML-escaping-attribute.html
230
231         * editing/markup.cpp:
232         (WebCore::appendAttributeValue):
233         (WebCore::escapeContentText):
234         (WebCore::appendEscapedContent):
235         Added U+00a0/nbsp to the list of characters to escape.
236
237 2008-05-05  David Hyatt  <hyatt@apple.com>
238
239         Fix for https://bugs.webkit.org/show_bug.cgi?id=18821.  Fix some bugs in both get/PutImageData of <canvas>.
240
241         Reviewed by Eric
242
243         New tests added in fast/canvas/
244
245         * platform/graphics/cg/ImageBufferCG.cpp:
246         (WebCore::ImageBuffer::getImageData):
247         (WebCore::ImageBuffer::putImageData):
248
249 2008-05-05  Dan Bernstein  <mitz@apple.com>
250
251         Reviewed by Dave Hyatt.
252
253         - fix https://bugs.webkit.org/show_bug.cgi?id=18809
254           Forms with block level generated content and absolutely positioned labels break inline layout (fixed on reflow)
255
256         Test: fast/block/basic/adding-near-anonymous-block.html
257
258         * rendering/RenderBlock.cpp:
259         (WebCore::RenderBlock::addChildToFlow): When adding a floating or
260         positioned object, if it follows an anonymous block, put it
261         inside the anonymous block. When adding an inline, check if it comes
262         after an anonymous block and put it in the anonymous block.
263
264 2008-05-05  Antti Koivisto  <antti@apple.com>
265
266         Reviewed by Darin.
267
268         Speculative fix for <rdar://problem/5906790> 
269         Crash in Loader::servePendingRequests() due to hash table being modified during iteration
270         
271         I don't know how to reproduce this. It would require the load to fail (or succeed)
272         synchronously, something that should not usually happen.
273
274         * loader/loader.cpp:
275         (WebCore::Loader::Loader):
276         (WebCore::Loader::load):
277         (WebCore::Loader::servePendingRequests):
278         (WebCore::Loader::cancelRequests):
279         (WebCore::Loader::Host::Host):
280         * loader/loader.h:
281         (WebCore::Loader::Host::name):
282
283 2008-05-05  Ariya Hidayat  <ariya.hidayat@trolltech.com>
284
285         Reviewed by Simon.
286
287         Disable SVG As Image support in the Qt port again, as it
288         requires more work. Right now the chrome client is
289         assumed to be a ChromeClientQt, which the SVG Image support
290         changes.
291
292         * WebCore.pro:
293
294 2008-05-02  Antti Koivisto  <antti@apple.com>
295
296         Reviewed by Mitz.
297
298         Fix <rdar://problem/5840475>
299         CrashTracer: [USER] 2 crashes in Safari at com.apple.WebCore: WebCore::RenderBlock::insertPositionedObject
300         
301         Non-block objects can have transforms so containingBlock() could end up returning null. 
302         RenderObject::container() needs to match.
303
304         Test: fast/transforms/container-transform-crash.html
305
306         * rendering/RenderObject.cpp:
307         (WebCore::RenderObject::containingBlock):
308         (WebCore::RenderObject::container):
309
310 2008-05-04  Sam Weinig  <sam@webkit.org>
311
312         Roll out r32851.  It broke tiger builds.
313
314         * bindings/objc/DOMUtility.mm:
315         (KJS::createDOMWrapper):
316         (WebCore::createDOMWrapper):
317
318 2008-05-04  Dan Bernstein  <mitz@apple.com>
319
320         Reviewed by Sam Weinig.
321
322         - fix https://bugs.webkit.org/show_bug.cgi?id=18879
323           <rdar://problem/5909481> Reproducible crash when removing a gradient
324
325         Test: fast/gradients/crash-on-remove.html
326
327         * css/CSSImageGeneratorValue.cpp:
328         (WebCore::CSSImageGeneratorValue::CSSImageGeneratorValue):
329         (WebCore::CSSImageGeneratorValue::addClient): Added a call to ref() the
330         value.
331         (WebCore::CSSImageGeneratorValue::removeClient): Added code to deref()
332         the value.
333
334 2008-05-03  Sam Weinig  <sam@webkit.org>
335
336         Reviewed by Mark Rowe.
337
338         Move createDOMWrapper(JSObject* object) out of the KJS namespace and into
339         the WebCore namespace now that the required compilers don't freak out about
340         this anymore.
341
342         * bindings/objc/DOMUtility.mm:
343         (WebCore::createDOMWrapper):
344
345 2008-05-03  Rob Buis  <buis@kde.org>
346
347         Reviewed by Sam.
348
349         https://bugs.webkit.org/show_bug.cgi?id=18652
350         onchange events don't seem to fire for input[type=range] controls.
351
352         Fire changeEvent when clicking the slider outside the current
353         thumb position.
354
355         * rendering/RenderSlider.cpp:
356         (WebCore::RenderSlider::setValueForPosition):
357
358 2008-05-03  Sam Weinig  <sam@webkit.org>
359
360         Reviewed by Mark Rowe.
361
362         Remove unused enums from JSDOMWindowBase.
363
364         * bindings/js/JSDOMWindowBase.h:
365         (WebCore::JSDOMWindowBase::):
366
367 2008-05-03  Sam Weinig  <sam@webkit.org>
368
369         Real build fix.
370
371         * WebCore.xcodeproj/project.pbxproj:
372
373 2008-05-03  Sam Weinig  <sam@webkit.org>
374
375         Build fix.
376
377         * bindings/js/kjs_events.cpp:
378         (WebCore::JSAbstractEventListener::handleEvent):
379
380 2008-05-03  Sam Weinig  <sam@webkit.org>
381
382         Rubber-stamped by Geoffrey Garen.
383
384         Rename JSDOMWindowWrapper to JSDOMWindowShell.
385
386 2008-05-01  Rob Buis  <buis@kde.org>
387
388         Reviewed by Eric.
389
390         https://bugs.webkit.org/show_bug.cgi?id=18568
391         background: currentColor fails
392
393         Implement currentColor from CSS3 color module.
394
395         Tests: fast/css/background-currentcolor.html
396
397         * css/CSSParser.cpp:
398         (WebCore::CSSParser::parseValue):
399         (WebCore::CSSParser::parseBackgroundColor):
400         * css/CSSStyleSelector.cpp:
401         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
402         * css/CSSValueKeywords.in:
403         * css/SVGCSSValueKeywords.in:
404
405 2008-05-02  Anders Carlsson  <andersca@apple.com>
406
407         Reviewed by Mark.
408
409         Turns out calling locationInWindow on keyboard events will not throw an exception,
410         but the point returned is completely bogus, so remove coordinates from the keyboard event struct.
411         
412         * bridge/npapi.h:
413         (_NPCocoaEvent::):
414
415 2008-05-02  Benjamin Otte  <otte@gnome.org>
416
417         Reviewed by Alp Toker.
418
419         http://bugs.webkit.org/show_bug.cgi?id=18856
420         [GTK] variable initialization missing
421
422         Not initializing the m_needsXEmbed variable could have very funny
423         results. Most often those results would be crashes.
424
425         * plugins/PluginView.cpp:
426         (WebCore::PluginView::PluginView):
427
428 2008-05-02  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
429
430         Reviewed by Eric.
431
432         https://bugs.webkit.org/show_bug.cgi?id=18811
433         Enable dashboard and offline web apps in autotools
434
435         * GNUmakefile.am:
436
437 2008-05-02  Anders Carlsson  <andersca@apple.com>
438
439         Reviewed by Sam.
440
441         Name the event union so it will work in plain C.
442
443         * bridge/npapi.h:
444         (_NPCocoaEvent::):
445
446 2008-05-02  Dan Bernstein  <mitz@apple.com>
447
448         Reviewed by John Sullivan.
449
450         - render text shadows with zero offset, as the shadow can be seen behind
451           the text if the text is translucent
452
453         Test: fast/text/shadow-no-blur.html
454
455         * platform/graphics/mac/FontMac.mm:
456         (WebCore::Font::drawComplexText): Removed the isEmpty() condition on the
457         shadow offset. Since isEmpty() is also true for sizes that have one or
458         more non-positive components, this also ensures that subpixel
459         antialiasing of the text is maintained with shadows in all directions.
460         (WebCore::Font::drawGlyphs): Ditto.
461         * platform/graphics/win/FontCGWin.cpp:
462         (WebCore::Font::drawGlyphs): Ditto.
463
464 2008-05-02  Ariya Hidayat  <ariya.hidayat@trolltech.com>
465
466         Reviewed by Simon.
467
468         Build the Qt port with SVG Use and As Image support.
469
470         * WebCore.pro:
471
472 2008-05-02  Ariya Hidayat  <ariya.hidayat@trolltech.com>
473
474         Reviewed by Simon.
475
476         Fixed potential crash on SVG animation (added more checks to the assert).
477
478         * svg/SVGUseElement.cpp:
479         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
480
481 2008-05-02  Alexey Proskuryakov  <ap@webkit.org>
482
483         Rubber-stamped by John Sullivan.
484
485         Fix a debug-only crash in layout tests.
486
487         * loader/CachedResource.cpp:
488         (WebCore::CachedResource::~CachedResource): Don't call resourceForURL() for null URLs.
489
490 2008-05-02  Simon Hausmann  <shausman@trolltech.com>
491
492         Fix the Qt build on Windows when Phonon is enabled for Audio/Video support
493
494         * WebCore.pro: Don't use QT += phonon as it prepends the phonon
495         includes to the include paths. Instead add it manually and make sure
496         phonon comes last, to avoid the conflict of phonon's path.h with
497         WebCore's Path.h on case-insensitive filesystems.
498
499 2008-05-02  Simon Hausmann  <hausmann@webkit.org>
500
501         Fix the Qt build. Add ExecState where necessary.
502
503         * bridge/qt/qt_class.cpp:
504         (KJS::Bindings::QtClass::fallbackObject):
505         * bridge/qt/qt_instance.cpp:
506         (KJS::Bindings::QtRuntimeObjectImp::construct):
507         (KJS::Bindings::QtInstance::getRuntimeObject):
508         (KJS::Bindings::QtInstance::invokeDefaultMethod):
509         (KJS::Bindings::QtInstance::defaultValue):
510         (KJS::Bindings::QtInstance::stringValue):
511         * bridge/qt/qt_instance.h:
512         (KJS::Bindings::QtInstance::getObject):
513         * bridge/qt/qt_runtime.cpp:
514         (KJS::Bindings::convertValueToQVariant):
515         (KJS::Bindings::convertQVariantToValue):
516         (KJS::Bindings::QtRuntimeMetaMethod::lengthGetter):
517         (KJS::Bindings::QtRuntimeMetaMethod::connectGetter):
518         (KJS::Bindings::QtRuntimeMetaMethod::disconnectGetter):
519         (KJS::Bindings::QtRuntimeConnectionMethod::lengthGetter):
520         (KJS::Bindings::QtConnectionObject::execute):
521         * bridge/runtime.cpp:
522         (KJS::Bindings::Instance::createRuntimeObject):
523
524 2008-05-02  Simon Hausmann  <shausman@trolltech.com>
525
526         Fix the Qt/Win build.
527
528         * WebCore.pro:
529         * platform/qt/TemporaryLinkStubs.cpp:
530         (PluginDatabase::getPluginPathsInDirectories):
531         (PluginDatabase::defaultPluginDirectories):
532         (PluginDatabase::isPreferredPluginDirectory):
533         (PluginView::setNPWindowRect):
534         (PluginView::userAgent):
535         (PluginView::invalidateRect):
536         (PluginView::invalidateRegion):
537         (PluginView::forceRedraw):
538         (PluginView::setFocus):
539         (PluginView::show):
540         (PluginView::hide):
541         (PluginView::paint):
542         (PluginView::setParent):
543         (PluginView::attachToWindow):
544         (PluginView::detachFromWindow):
545         (PluginView::updateWindow):
546         (PluginView::handleKeyboardEvent):
547         (PluginView::handleMouseEvent):
548         (PluginView::handlePostReadFile):
549         (PluginView::getValue):
550         * plugins/qt/PluginPackageQt.cpp:
551         (WebCore::PluginPackage::load):
552
553 2008-05-02  Alexey Proskuryakov  <ap@webkit.org>
554
555         Reviewed by Geoffrey Garen.
556
557         https://bugs.webkit.org/show_bug.cgi?id=18826
558         Make JavaScript heap per-thread
559
560         This is mostly adaptation for JSC changes. The most prominent one is that JSObject
561         allocator now takes ExecState, e.g. "new (exec) JSXMLHttpRequestConstructor(...)". It is
562         OK to pass either the current or global one, whichever is faster to get hold of, as both
563         have the same reference to a per-thread JS heap.
564
565         * bindings/scripts/CodeGeneratorJS.pm: Pass ExecState to functions that now need it.
566         JSDOMWindow, JSDOMWindowPrototype and JSDOMWindowWrapper are special, because they are
567         constructed before any ExecState comes into existence, so they use Heap::threadHeap()
568         directly for allocation.
569
570         * bindings/js/JSDOMWindowWrapper.cpp:
571         (WebCore::JSDOMWindowWrapper::operator new):
572         * bindings/js/JSDOMWindowWrapper.h:
573         Added a custom operator new to use per-thread heap when there's no ExecState around.
574
575         * bindings/js/JSAudioConstructor.cpp:
576         (WebCore::JSAudioConstructor::JSAudioConstructor):
577         * bindings/js/JSCSSRuleCustom.cpp:
578         (WebCore::toJS):
579         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
580         (WebCore::JSCSSStyleDeclaration::nameGetter):
581         * bindings/js/JSCSSValueCustom.cpp:
582         (WebCore::toJS):
583         * bindings/js/JSCanvasPixelArrayCustom.cpp:
584         (WebCore::JSCanvasPixelArray::indexGetter):
585         (WebCore::toJS):
586         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
587         (WebCore::toJS):
588         * bindings/js/JSClipboardCustom.cpp:
589         (WebCore::JSClipboard::types):
590         (WebCore::JSClipboard::getData):
591         * bindings/js/JSCustomXPathNSResolver.cpp:
592         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
593         * bindings/js/JSDOMApplicationCacheCustom.cpp:
594         (WebCore::JSDOMApplicationCache::addEventListener):
595         (WebCore::JSDOMApplicationCache::removeEventListener):
596         (WebCore::JSDOMApplicationCache::setOnchecking):
597         (WebCore::JSDOMApplicationCache::setOnerror):
598         (WebCore::JSDOMApplicationCache::setOnnoupdate):
599         (WebCore::JSDOMApplicationCache::setOndownloading):
600         (WebCore::JSDOMApplicationCache::setOnprogress):
601         (WebCore::JSDOMApplicationCache::setOnupdateready):
602         (WebCore::JSDOMApplicationCache::setOncached):
603         * bindings/js/JSDOMWindowBase.cpp:
604         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
605         (WebCore::JSDOMWindowBase::getValueProperty):
606         (WebCore::JSDOMWindowBase::setListener):
607         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
608         (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
609         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
610         (WebCore::windowProtoFuncAToB):
611         (WebCore::windowProtoFuncBToA):
612         (WebCore::windowProtoFuncSetTimeout):
613         (WebCore::windowProtoFuncSetInterval):
614         (WebCore::windowProtoFuncAddEventListener):
615         * bindings/js/JSDOMWindowBase.h:
616         * bindings/js/JSDocumentCustom.cpp:
617         (WebCore::toJS):
618         * bindings/js/JSEventCustom.cpp:
619         (WebCore::toJS):
620         * bindings/js/JSEventTargetBase.cpp:
621         (WebCore::jsEventTargetAddEventListener):
622         * bindings/js/JSEventTargetBase.h:
623         (WebCore::JSEventTargetPrototype::self):
624         * bindings/js/JSEventTargetNode.cpp:
625         (WebCore::JSEventTargetNode::setListener):
626         * bindings/js/JSHTMLCollectionCustom.cpp:
627         (WebCore::getNamedItems):
628         (WebCore::toJS):
629         * bindings/js/JSHTMLElementWrapperFactory.cpp:
630         (WebCore::createJSHTMLWrapper):
631         * bindings/js/JSHTMLFormElementCustom.cpp:
632         (WebCore::JSHTMLFormElement::nameGetter):
633         * bindings/js/JSHTMLInputElementBase.cpp:
634         (WebCore::JSHTMLInputElementBase::getValueProperty):
635         * bindings/js/JSHTMLOptionElementConstructor.cpp:
636         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
637         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
638         (WebCore::JSHTMLOptionsCollection::length):
639         * bindings/js/JSInspectedObjectWrapper.cpp:
640         (WebCore::JSInspectedObjectWrapper::wrap):
641         * bindings/js/JSInspectorCallbackWrapper.cpp:
642         (WebCore::JSInspectorCallbackWrapper::wrap):
643         * bindings/js/JSLocationCustom.cpp:
644         (WebCore::JSLocation::toString):
645         * bindings/js/JSNamedNodesCollection.cpp:
646         (WebCore::JSNamedNodesCollection::lengthGetter):
647         * bindings/js/JSNavigatorCustom.cpp:
648         (WebCore::JSNavigator::appVersion):
649         * bindings/js/JSNodeCustom.cpp:
650         (WebCore::toJS):
651         * bindings/js/JSNodeFilterCustom.cpp:
652         (WebCore::JSNodeFilter::acceptNode):
653         * bindings/js/JSRGBColor.cpp:
654         (WebCore::getJSRGBColor):
655         * bindings/js/JSSQLResultSetRowListCustom.cpp:
656         (WebCore::JSSQLResultSetRowList::item):
657         * bindings/js/JSSVGElementWrapperFactory.cpp:
658         (WebCore::createJSSVGWrapper):
659         * bindings/js/JSSVGLazyEventListener.cpp:
660         (WebCore::JSSVGLazyEventListener::eventParameterName):
661         * bindings/js/JSStorageCustom.cpp:
662         (WebCore::JSStorage::nameGetter):
663         * bindings/js/JSStyleSheetCustom.cpp:
664         (WebCore::toJS):
665         * bindings/js/JSXMLHttpRequestConstructor.cpp:
666         (WebCore::JSXMLHttpRequestConstructor::construct):
667         * bindings/js/JSXMLHttpRequestCustom.cpp:
668         (WebCore::JSXMLHttpRequest::setOnreadystatechange):
669         (WebCore::JSXMLHttpRequest::setOnload):
670         (WebCore::JSXMLHttpRequest::setOnprogress):
671         (WebCore::JSXMLHttpRequest::getResponseHeader):
672         (WebCore::JSXMLHttpRequest::addEventListener):
673         (WebCore::JSXMLHttpRequest::removeEventListener):
674         * bindings/js/JSXSLTProcessor.cpp:
675         (WebCore::jsXSLTProcessorPrototypeFunctionGetParameter):
676         (WebCore::JSXSLTProcessorConstructor::construct):
677         * bindings/js/kjs_binding.cpp:
678         (WebCore::jsStringOrNull):
679         (WebCore::jsOwnedStringOrNull):
680         (WebCore::jsStringOrUndefined):
681         (WebCore::jsStringOrFalse):
682         (WebCore::nonCachingStaticFunctionGetter):
683         (WebCore::objectToStringFunctionGetter):
684         * bindings/js/kjs_binding.h:
685         (WebCore::DOMObject::DOMObject):
686         (WebCore::cacheDOMObject):
687         (WebCore::cacheSVGDOMObject):
688         * bindings/js/kjs_events.cpp:
689         (WebCore::JSLazyEventListener::eventParameterName):
690         (WebCore::JSLazyEventListener::parseCode):
691         * bindings/js/kjs_html.cpp:
692         (WebCore::getRuntimeObject):
693         * bridge/c/c_instance.cpp:
694         (KJS::Bindings::CInstance::defaultValue):
695         (KJS::Bindings::CInstance::stringValue):
696         (KJS::Bindings::CInstance::numberValue):
697         (KJS::Bindings::CInstance::valueOf):
698         * bridge/c/c_instance.h:
699         * bridge/c/c_utility.cpp:
700         (KJS::Bindings::convertNPVariantToValue):
701         * bridge/jni/jni_instance.cpp:
702         (JavaInstance::stringValue):
703         (JavaInstance::numberValue):
704         (JavaInstance::invokeMethod):
705         (JavaInstance::defaultValue):
706         (JavaInstance::valueOf):
707         * bridge/jni/jni_instance.h:
708         * bridge/jni/jni_jsobject.h:
709         * bridge/jni/jni_jsobject.mm:
710         (JavaJSObject::call):
711         (JavaJSObject::setMember):
712         (JavaJSObject::setSlot):
713         (JavaJSObject::convertJObjectToValue):
714         (JavaJSObject::getListFromJArray):
715         * bridge/jni/jni_objc.mm:
716         (KJS::Bindings::dispatchJNICall):
717         * bridge/jni/jni_runtime.cpp:
718         (JavaArray::convertJObjectToArray):
719         (JavaField::dispatchValueFromInstance):
720         (JavaField::valueFromInstance):
721         (JavaField::dispatchSetValueToInstance):
722         (JavaArray::valueAt):
723         * bridge/jni/jni_utility.h:
724         * bridge/objc/objc_class.mm:
725         (KJS::Bindings::ObjcClass::fallbackObject):
726         * bridge/objc/objc_instance.h:
727         * bridge/objc/objc_instance.mm:
728         (ObjcInstance::defaultValue):
729         (ObjcInstance::stringValue):
730         (ObjcInstance::numberValue):
731         (ObjcInstance::valueOf):
732         * bridge/objc/objc_utility.h:
733         * bridge/objc/objc_utility.mm:
734         (KJS::Bindings::convertNSStringToString):
735         (KJS::Bindings::convertObjcValueToValue):
736         * bridge/runtime.cpp:
737         (KJS::Bindings::Instance::createRuntimeObject):
738         * bridge/runtime.h:
739         (KJS::Bindings::Instance::valueOf):
740         * bridge/runtime_array.cpp:
741         (RuntimeArray::lengthGetter):
742         * bridge/runtime_method.cpp:
743         (RuntimeMethod::lengthGetter):
744         * bridge/runtime_object.cpp:
745         (RuntimeObjectImp::RuntimeObjectImp):
746         (RuntimeObjectImp::methodGetter):
747         (RuntimeObjectImp::defaultValue):
748         * xml/XMLHttpRequest.cpp:
749         (WebCore::XMLHttpRequest::dropProtection):
750         * bindings/js/GCController.cpp:
751         (WebCore::GCController::gcTimerFired):
752         (WebCore::GCController::garbageCollectNow):
753         Adapted to JSC changes. Pass ExecState to functions that now need it. Removed
754         collectOnMainThreadOnly, as this is the only way to collect now. Replaced calls to static
755         Collector methods with calls to per-thread Heap ones.
756
757 2008-05-02  Ariya Hidayat  <ariya.hidayat@trolltech.com>
758
759         Reviewed by Simon.
760
761         Build the Qt port with SVG Animation support.
762
763         * WebCore.pro:
764
765 2008-05-02  Simon Hausmann  <hausmann@webkit.org>
766
767         Build fix for Qt/Gtk. Don't declare NP_InitializeFuncPtr twice
768         with different signatures.
769
770         * plugins/npfunctions.h:
771
772 2008-05-01  Robin Dunn  <robin@alldunn.com>
773
774         Reviewed by Kevin Ollivier.
775
776         Explicitly set the pen style in wx port to keep pen style changes from 
777         affecting URL underline or text field drawing.
778         
779         https://bugs.webkit.org/show_bug.cgi?id=18775
780
781         * platform/graphics/wx/GraphicsContextWx.cpp:
782         (WebCore::GraphicsContext::fillRect):
783         (WebCore::GraphicsContext::drawLineForText):
784         * platform/wx/RenderThemeWx.cpp:
785         (WebCore::RenderThemeWx::paintTextField):
786
787 2008-05-01  Robin Dunn  <robin@alldunn.com>
788
789         Reviewed by Kevin Ollivier.
790
791         Implement popup menu support for wx port.
792         
793         https://bugs.webkit.org/show_bug.cgi?id=18776
794
795         * platform/PopupMenu.h:
796         * platform/wx/PopupMenuWx.cpp: Added.
797         (WebCore::PopupMenu::PopupMenu):
798         (WebCore::PopupMenu::~PopupMenu):
799         (WebCore::PopupMenu::show):
800         (WebCore::PopupMenu::OnMenuItemSelected):
801         (WebCore::PopupMenu::hide):
802         (WebCore::PopupMenu::updateFromElement):
803         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
804         * platform/wx/TemporaryLinkStubs.cpp:
805         * webcore-wx.bkl:
806
807 2008-05-01  Kevin Ollivier  <kevino@theolliviers.com>
808
809         Reviewed by Eric Seidel.
810
811         Make sure we properly set the button for all mouse events,
812         not just mouse down, set the click count to 0
813         for non-click events, and finally set the timestamp.
814         
815         https://bugs.webkit.org/show_bug.cgi?id=18464
816
817         * platform/wx/MouseEventWx.cpp:
818         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
819
820 2008-05-01  Sam Weinig  <sam@webkit.org>
821
822         Reviewed by Mark Rowe (in his infinite wisdom).
823
824         Auto-generate the JSXSLTProcessor binding.
825
826         * DerivedSources.make:
827         * GNUmakefile.am:
828         * WebCore.pro:
829         * WebCore.vcproj/WebCore.vcproj:
830         * WebCore.xcodeproj/project.pbxproj:
831         * WebCoreSources.bkl:
832         * bindings/js/JSDOMWindowBase.cpp:
833         (WebCore::JSDOMWindowBase::getValueProperty):
834         * bindings/js/JSDOMWindowBase.h:
835         (WebCore::JSDOMWindowBase::):
836         * bindings/js/JSXSLTProcessor.cpp: Removed.
837         * bindings/js/JSXSLTProcessor.h: Removed.
838         * xml/XSLTProcessor.h:
839
840 2008-05-01  Sam Weinig  <sam@webkit.org>
841
842         Reviewed by Geoffrey Garen.
843
844         Fixes:
845           - https://bugs.webkit.org/show_bug.cgi?id=17249
846             Incorrect lexical scope after navigation leads to UXSS
847             <rdar://problem/5738497>
848
849           - https://bugs.webkit.org/show_bug.cgi?id=16824
850             Script authorization should follow lexical (not dynamic) scope
851             <rdar://problem/5683032>
852
853         This patch changes us to perform same-origin checks based on the lexical global object) 
854         rather than dynamic global object, which is now possible we don't re-use the window on 
855         navigations, but rather switch in a new one and re-use the outer shell.  This is both
856         more secure and conforms with the HTML5 specification.  Now that all the checks are
857         done based on the lexical global object, we can remove the SecurityOrigin::Reason
858         concept, as it was only around to work around an ebay.com bug that required the check to
859         be done that way.
860
861         An important thing to note is that we currently implement a stricter than necessary policy
862         and perform the same-origin check based on the currently active global object to avoid leaking
863         the document in cases when the target frame is navigated before access.  This will be fixed in
864         an upcoming patch.
865
866         * bindings/js/JSDOMWindowBase.cpp:
867         (WebCore::JSDOMWindowBase::allowsAccessFrom):
868         (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
869         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
870         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
871         (WebCore::JSDOMWindowBase::printErrorMessage):
872         (WebCore::asJSDOMWindow):
873         * bindings/js/JSDOMWindowBase.h:
874         * html/CanvasRenderingContext2D.cpp:
875         (WebCore::CanvasRenderingContext2D::checkOrigin):
876         (WebCore::CanvasRenderingContext2D::createPattern):
877         * loader/FrameLoader.cpp:
878         (WebCore::FrameLoader::begin):
879         (WebCore::FrameLoader::write):
880         (WebCore::FrameLoader::setOpener):
881         (WebCore::FrameLoader::shouldAllowNavigation):
882         * page/DOMWindow.h:
883         (WebCore::DOMWindow::setSecurityOrigin):
884         (WebCore::DOMWindow::securityOrigin):
885         (WebCore::DOMWindow::setURL):
886         (WebCore::DOMWindow::url):
887         * platform/SecurityOrigin.cpp:
888         (WebCore::SecurityOrigin::canAccess):
889         (WebCore::SecurityOrigin::isSecureTransitionTo):
890         * platform/SecurityOrigin.h:
891
892 2008-05-01  Anders Carlsson  <andersca@apple.com>
893
894         Reviewed by Mark.
895
896         Enable 64-bit NPAPI plugins.
897         
898         * WebCore.xcodeproj/project.pbxproj:
899         Don't remove NPAPI related symbols from the 64-bit .exp file.
900         
901         * bridge/npruntime.h:
902         Remove now unnecessary #error.
903
904 2008-05-01  Maciej Stachowiak  <mjs@apple.com>
905
906         Reviewed by Oliver (a while ago)
907
908         - just a wee bit more bindings speedup
909         
910         Store the per-document Node --> JS wrapper cache in the document
911         instead of an external hashtable.
912
913         * bindings/js/kjs_binding.cpp:
914         (WebCore::ScriptInterpreter::getDOMNodeForDocument):
915         (WebCore::ScriptInterpreter::forgetDOMNodeForDocument):
916         (WebCore::ScriptInterpreter::putDOMNodeForDocument):
917         (WebCore::ScriptInterpreter::forgetAllDOMNodesForDocument):
918         (WebCore::ScriptInterpreter::markDOMNodesForDocument):
919         * dom/Document.h:
920         (WebCore::Document::wrapperCache):
921
922 2008-05-01  Anders Carlsson  <andersca@apple.com>
923
924         Reviewed by Tim.
925
926         Remove duplicate npfunctions.h header from WebKit.
927         
928         * WebCore.xcodeproj/project.pbxproj:
929         Add npfunctions.h and set its role to private.
930         
931         * plugins/npfunctions.h:
932         Merge Mac specific changes.
933
934 2008-05-01  Sam Weinig  <sam@webkit.org>
935
936         Reviewed by Geoffrey Garen.
937
938         Rename toJSDOMWindow(KJS::JSGlobalObject) to asJSDOMWindow, as all it does is
939         cast.
940
941         * bindings/js/JSCustomVoidCallback.cpp:
942         (WebCore::toVoidCallback):
943         * bindings/js/JSCustomXPathNSResolver.cpp:
944         (WebCore::JSCustomXPathNSResolver::create):
945         * bindings/js/JSDOMApplicationCacheCustom.cpp:
946         (WebCore::JSDOMApplicationCache::add):
947         (WebCore::JSDOMApplicationCache::remove):
948         * bindings/js/JSDOMWindowBase.cpp:
949         (WebCore::allowPopUp):
950         (WebCore::createWindow):
951         (WebCore::windowProtoFuncOpen):
952         (WebCore::asJSDOMWindow):
953         * bindings/js/JSDOMWindowBase.h:
954         * bindings/js/JSDOMWindowCustom.cpp:
955         (WebCore::JSDOMWindow::setLocation):
956         (WebCore::JSDOMWindow::postMessage):
957         * bindings/js/JSDatabaseCustom.cpp:
958         (WebCore::JSDatabase::changeVersion):
959         (WebCore::JSDatabase::transaction):
960         * bindings/js/JSDocumentCustom.cpp:
961         (WebCore::JSDocument::setLocation):
962         * bindings/js/JSLocationCustom.cpp:
963         (WebCore::navigateIfAllowed):
964         (WebCore::JSLocation::setHref):
965         (WebCore::JSLocation::replace):
966         (WebCore::JSLocation::reload):
967         (WebCore::JSLocation::assign):
968         * bindings/js/JSSQLTransactionCustom.cpp:
969         (WebCore::JSSQLTransaction::executeSql):
970         * bindings/js/JSXMLHttpRequestCustom.cpp:
971         (WebCore::JSXMLHttpRequest::open):
972         * page/JavaScriptDebugServer.cpp:
973         (WebCore::toPage):
974
975 2008-05-01  Anatoli Papirovski  <apapirovski@mac.com>
976
977         Reviewed by Dave Hyatt.
978
979         - fix https://bugs.webkit.org/show_bug.cgi?id=18347
980           Absolutely positioned image percentage width does not respect container's padding
981
982         Test: fast/replaced/absolute-position-percentage-width.html
983
984         * rendering/RenderBox.cpp:
985         (WebCore::RenderBox::calcReplacedWidthUsing):
986
987 2008-05-01  Dan Bernstein  <mitz@apple.com>
988
989         - Windows build fix
990
991         * platform/graphics/win/FontCGWin.cpp:
992         (WebCore::Font::drawGlyphs):
993
994 2008-05-01  Dan Bernstein  <mitz@apple.com>
995
996         Reviewed by Darin Adler.
997
998         - make synthetic bold and synthetic italics work in GDI text
999         - account for synthetic bold in complex text on Windows
1000
1001         * platform/graphics/win/FontCGWin.cpp:
1002         (WebCore::Font::drawGlyphs): Adjusted the text rectangle's x coordinates
1003         to fit italics. Added a skew transform for synthetic italics and a
1004         second paint pass for synthetic bold.
1005         * platform/graphics/win/SimpleFontDataWin.cpp:
1006         (WebCore::SimpleFontData::widthForGDIGlyph): Added the synthetic bold
1007         offset.
1008         * platform/graphics/win/UniscribeController.cpp:
1009         (WebCore::UniscribeController::shapeAndPlaceItem): Added the synthetic
1010         bold offset.
1011
1012 2008-05-01  Alp Toker  <alp@nuanti.com>
1013
1014         Qt/Win build fix attempt following plugin changes. Add missing return
1015         statements.
1016
1017         Also fixes some newly introduced coding style issues in the Qt port.
1018
1019         * platform/qt/FileSystemQt.cpp:
1020         (WebCore::openTemporaryFile):
1021         (WebCore::closeFile):
1022         (WebCore::writeToFile):
1023         (WebCore::unloadModule):
1024
1025 2008-05-01  Anders Carlsson  <andersca@apple.com>
1026
1027         Reviewed by Adam.
1028
1029         Export methods needed to subclass Widget.  (See r32770.)
1030
1031         * WebCore.base.exp:
1032
1033 2008-05-01  Marc Ordinas i Llopis  <marc.ordinasillopis@collabora.co.uk>
1034
1035         Reviewed by Alp Toker.
1036         Qt parts OK'ed by Simon Hausmann.
1037
1038         https://bugs.webkit.org/show_bug.cgi?id=14750
1039         Added support for NPAPI plugins on Gtk and Qt-x11 ports.
1040
1041         * GNUmakefile.am: Added Gtk plugin files.
1042         * WebCore.pro: Added Qt plugins files, defined XP_UNIX and
1043         ENABLE_NETSCAPE_PLUGIN_API
1044         * bridge/npruntime_internal.h: Additional undefs that conflict
1045         with Qt headers.
1046         * page/gtk/FrameGtk.cpp: Create js bindings for PluginView.
1047         (WebCore::Frame::createScriptInstanceForWidget):
1048         * page/qt/FrameQt.cpp: Create js bindings for PluginView.
1049         (WebCore::Frame::createScriptInstanceForWidget):
1050         (WebCore::Frame::clearPlatformScriptObjects):
1051         (WebCore::Frame::disconnectPlatformScriptObjects):
1052         * platform/FileSystem.h: Qt FileSystem implementation.
1053         * platform/Widget.h: Members to differentiate between Qt plugins and
1054         NPAPI ones.
1055         * platform/gtk/ScrollViewGtk.cpp:
1056         (WebCore::ScrollView::addChild): Set containing window before calling setParent.
1057         * platform/gtk/TemporaryLinkStubs.cpp: Removed implemented functions.
1058         (PluginView::invalidateRegion):
1059         * platform/qt/FileSystemQt.cpp: Implemented functions necessary for
1060         NPAPI plugins.
1061         (WebCore::openTemporaryFile):
1062         (WebCore::closeFile):
1063         (WebCore::writeToFile):
1064         (WebCore::unloadModule): Delete module if unloaded.
1065         * platform/qt/TemporaryLinkStubs.cpp: Removed implemented functions.
1066         * platform/qt/WidgetQt.cpp: Differentiate between Qt plugins and
1067         NPAPI ones.
1068         (WebCore::WidgetPrivate::WidgetPrivate):
1069         (WebCore::Widget::isNPAPIPlugin):
1070         (WebCore::Widget::setIsNPAPIPlugin):
1071         * plugins/PluginPackage.cpp:
1072         (WebCore::PluginPackage::~PluginPackage): Unload the module before
1073         destruction.
1074         (WebCore::PluginPackage::compare): Moved here as it's platform
1075         independent.
1076         * plugins/PluginView.cpp: Moved platform-independent functions here.
1077         (WebCore::PluginView::PluginView): Initialize m_npWindow.ws_info on
1078         Unix platforms.
1079         (WebCore::PluginView::freeStringArray):
1080         (WebCore::startsWithBlankLine):
1081         (WebCore::locationAfterFirstBlankLine):
1082         (WebCore::findEOL):
1083         (WebCore::capitalizeRFC822HeaderFieldName):
1084         (WebCore::parseRFC822HeaderFields):
1085         (WebCore::PluginView::handlePost):
1086         * plugins/PluginView.h: Moved platform-independent functions here.
1087         Added member to signal plugin needs XEmbed extension.
1088         * plugins/gtk/PluginDataGtk.cpp: Added.
1089         (WebCore::PluginData::initPlugins):
1090         (WebCore::PluginData::refresh):
1091         * plugins/gtk/PluginDatabaseGtk.cpp:
1092         (WebCore::PluginDatabase::defaultPluginDirectories):
1093         (WebCore::PluginDatabase::isPreferredPluginDirectory):
1094         * plugins/gtk/PluginPackageGtk.cpp: Added.
1095         (WebCore::PluginPackage::determineQuirks):
1096         (WebCore::PluginPackage::fetchInfo):
1097         (WebCore::PluginPackage::load):
1098         (WebCore::PluginPackage::hash):
1099         (WebCore::PluginPackage::equal):
1100         (WebCore::PluginPackage::compareFileVersion):
1101         * plugins/gtk/PluginViewGtk.cpp: Added.
1102         (WebCore::PluginView::updateWindow):
1103         (WebCore::PluginView::setFocus):
1104         (WebCore::PluginView::show):
1105         (WebCore::PluginView::hide):
1106         (WebCore::PluginView::paint):
1107         (WebCore::PluginView::handleKeyboardEvent):
1108         (WebCore::PluginView::handleMouseEvent):
1109         (WebCore::PluginView::setParent):
1110         (WebCore::PluginView::setNPWindowRect):
1111         (WebCore::PluginView::attachToWindow):
1112         (WebCore::PluginView::detachFromWindow):
1113         (WebCore::PluginView::stop):
1114         (WebCore::PluginView::userAgent):
1115         (WebCore::PluginView::handlePostReadFile):
1116         (WebCore::PluginView::getValue):
1117         (WebCore::PluginView::invalidateRect):
1118         (WebCore::PluginView::forceRedraw):
1119         (WebCore::PluginView::~PluginView):
1120         (WebCore::plug_removed_cb): Added callback to handle plug removal.
1121         (WebCore::PluginView::init):
1122         * plugins/gtk/xembed.h: Added.
1123         * plugins/npapi.cpp:
1124         (NPN_GetValue): Return error if no view present.
1125         * plugins/qt/PluginDataQt.cpp:
1126         (WebCore::PluginData::initPlugins):
1127         (WebCore::PluginData::refresh):
1128         * plugins/qt/PluginDatabaseQt.cpp: Added.
1129         (WebCore::PluginDatabase::getPluginPathsInDirectories):
1130         (WebCore::addQtWebKitPluginDirectories):
1131         (WebCore::addMozillaPluginDirectories):
1132         (WebCore::PluginDatabase::defaultPluginDirectories):
1133         (WebCore::PluginDatabase::isPreferredPluginDirectory):
1134         * plugins/qt/PluginPackageQt.cpp: Added.
1135         (WebCore::PluginPackage::determineQuirks):
1136         (WebCore::PluginPackage::fetchInfo):
1137         (WebCore::PluginPackage::load):
1138         (WebCore::PluginPackage::hash):
1139         (WebCore::PluginPackage::equal):
1140         (WebCore::PluginPackage::compareFileVersion):
1141         * plugins/qt/PluginViewQt.cpp: Added.
1142         (WebCore::PluginView::updateWindow):
1143         (WebCore::PluginView::setFocus):
1144         (WebCore::PluginView::show):
1145         (WebCore::PluginView::hide):
1146         (WebCore::PluginView::paint):
1147         (WebCore::PluginView::handleKeyboardEvent):
1148         (WebCore::PluginView::handleMouseEvent):
1149         (WebCore::PluginView::setParent):
1150         (WebCore::PluginView::setNPWindowRect):
1151         (WebCore::PluginView::attachToWindow):
1152         (WebCore::PluginView::detachFromWindow):
1153         (WebCore::PluginView::stop):
1154         (WebCore::PluginView::userAgent):
1155         (WebCore::PluginView::handlePostReadFile):
1156         (WebCore::PluginView::getValue):
1157         (WebCore::PluginView::invalidateRect):
1158         (WebCore::PluginView::invalidateRegion):
1159         (WebCore::PluginView::forceRedraw):
1160         (WebCore::PluginView::~PluginView):
1161         (WebCore::PluginView::init):
1162         * plugins/win/PluginPackageWin.cpp: Moved platform-independent code
1163         to plugins/PluginPackage.cpp
1164         * plugins/win/PluginViewWin.cpp: Moved platform-independent code to
1165         plugins/PluginView.cpp
1166         (WebCore::PluginView::stop):
1167         (WebCore::PluginView::handlePostReadFile):
1168         (WebCore::PluginView::getValue): Moved this function to each platform.
1169
1170 2008-05-01  Sam Weinig  <sam@webkit.org>
1171
1172         Fix build.
1173
1174         * ForwardingHeaders/wtf/StrHash.h: Added.
1175
1176 2008-05-01  Anders Carlsson  <andersca@apple.com>
1177
1178         Reviewed by Darin.
1179
1180         Move management of cache groups to ApplicationCacheStorage. Also,
1181         application caches now start out with a null group and will have their group set
1182         when the cache has finished loading. 
1183
1184         * loader/appcache/ApplicationCache.cpp:
1185         (WebCore::ApplicationCache::ApplicationCache):
1186         Initialize m_group to 0.
1187         
1188         (WebCore::ApplicationCache::~ApplicationCache):
1189         Null check the group.
1190         
1191         (WebCore::ApplicationCache::setGroup):
1192         New method for setting the group.
1193         
1194         * loader/appcache/ApplicationCache.h:        
1195         (WebCore::ApplicationCache::create):
1196         Remove the group argument.
1197         
1198         * loader/appcache/ApplicationCacheGroup.cpp:
1199         (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup):
1200         Let the storage know that the cache group has been destroyed.
1201         
1202         (WebCore::ApplicationCacheGroup::cacheForMainRequest):
1203         Call into the storage.
1204         
1205         (WebCore::ApplicationCacheGroup::selectCache):
1206         Call into the storage.
1207         
1208         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed):
1209         When there are no document loaders associated with the cache group,
1210         set the newest cache to 0.
1211         
1212         (WebCore::ApplicationCacheGroup::cacheDestroyed):
1213         Delete the group if there are no associated caches.
1214         
1215         (WebCore::ApplicationCacheGroup::setNewestCache):
1216         New method that will set the newest cache and associate the group with the cache.
1217         
1218         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
1219         Call setNewestCache instead.
1220         
1221         * loader/appcache/ApplicationCacheStorage.cpp:
1222         (WebCore::urlHostHash):
1223         Move host hash method here.
1224         
1225         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
1226         New method that finds a cache group with a given manifest URL or creates a new one.
1227
1228         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
1229         New method that returns a cache group for a given URL.
1230         
1231         (WebCore::ApplicationCacheStorage::cacheGroupDestroyed):
1232         When the cache group has been destroyed, remove it from the hash map.
1233         
1234         * loader/appcache/ApplicationCacheStorage.h:
1235         Add new methods.I b
1236
1237 2008-05-01  Dan Winship  <danw@gnome.org>
1238
1239         Reviewed by Alp Toker.
1240
1241         http://bugs.webkit.org/show_bug.cgi?id=18490
1242         Add mostly-working file: support and mostly-broken ftp: support to
1243         the soup backend.
1244
1245         * platform/network/soup/ResourceHandleSoup.cpp (start): after
1246         doing basic checks, delegate to one of three submethods
1247         (startData): handles data: URLs
1248         (startHttp): handles http: and https: URLs, via libsoup
1249         (startGio, etc): handles file: and ftp: URLs, via gio. Lots of
1250         FIXMEs detailing the parts that don't fully work yet.
1251
1252         * platform/network/ResourceHandle.h:
1253         * platform/network/ResourceHandleInternal.h: add new member
1254         variables for gio-based loading
1255
1256 2008-05-01  Alp Toker  <alp@nuanti.com>
1257
1258         Rubber-stamped by Anders.
1259
1260         GTK+ build fix for changes in r32752. Use int32, not int32_t types in
1261         npapi.h.
1262
1263         Additional fix to use same signedness in npapi.h and Mac for the
1264         interval parameter.
1265
1266         * bridge/npapi.h:
1267
1268 2008-04-30  Anders Carlsson  <andersca@apple.com>
1269
1270         Reviewed by Adam.
1271
1272         Add new Cocoa event model type declarations.
1273         
1274         * bridge/npapi.h:
1275
1276 2008-04-30  Beth Dakin  <bdakin@apple.com>
1277
1278         Reviewed by Sam Weinig.
1279
1280         This patch does three things:
1281         1. Adds support for the "img" ARIA role
1282         2. Switches over to a HashMap for converting ARIA role attributes 
1283         to WebCore's AccessibilityRole type. 
1284         3. Fixes a crash in the new ARIA code that I ran into while 
1285         browsing with VoiceOver enabled.
1286
1287         * page/AccessibilityObject.cpp:
1288         (WebCore::AccessibilityObject::headingLevel): This is the crash 
1289         fix. Make sure the node's renderer is not null before looking up 
1290         its corresponding AccessibilityObject in the cache.
1291         (WebCore::AccessibilityObject::accessibilityIsIgnored): Account for 
1292         ARIA images.
1293         (WebCore::createARIARoleMap): Switch to HashMap, and add "img" to 
1294         the Map.
1295         (WebCore::RoleEntry::): Same.
1296         (WebCore::ariaRoleToWebCoreRole): Same.
1297         (WebCore::AccessibilityObject::ariaRoleAttribute): Same.
1298
1299 2008-04-30  Rob Buis  <buis@kde.org>
1300
1301         Reviewed by Nikolas.
1302
1303         https://bugs.webkit.org/show_bug.cgi?id=16447
1304         onload called too many times for <svg:image>
1305         https://bugs.webkit.org/show_bug.cgi?id=12282
1306         SVG wastes time in malloc to send loadEvents to non-existent listeners
1307
1308         Postpone load event dispatching for image when externalResourcesRequired
1309         is true, delaying parents but not siblings, and make sure the load event
1310         is sent once for image in all cases.
1311
1312         * svg/SVGElement.cpp:
1313         (WebCore::hasLoadListener):
1314         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
1315         * svg/SVGImageElement.cpp:
1316         (WebCore::SVGImageElement::haveLoadedRequiredResources):
1317         * svg/SVGImageLoader.cpp:
1318         (WebCore::SVGImageLoader::dispatchLoadEvent):
1319
1320 2008-04-30  David Hyatt  <hyatt@apple.com>
1321
1322         Fix crashes when dynamically removing <video> elements with layers that establish stacking contexts.  This
1323         won't typically crash release builds because of arena recycling.
1324
1325         Reviewed by Dan Bernstein
1326         
1327         * rendering/RenderLayer.cpp:
1328         (WebCore::RenderLayer::~RenderLayer):
1329         Make sure to remove the reflection's child layer from its parent.
1330
1331         * rendering/RenderMedia.cpp:
1332         (WebCore::RenderMedia::~RenderMedia):
1333         (WebCore::RenderMedia::destroy):
1334         (WebCore::RenderMedia::removeChild):
1335         * rendering/RenderMedia.h:
1336         Adjust the teardown of RenderMedia so that it does all of its teardown inside destroy() (this makes it more
1337         like other renderers and doesn't leave you staring at a trashed layer hierarchy in the RenderMedia
1338         destructor).
1339
1340 2008-04-30  Rémi Zara  <remi_zara@mac.com>
1341
1342         Reviewed by Dave Hyatt.
1343
1344         fix https://bugs.webkit.org/show_bug.cgi?id=18618
1345         <rdar://problem/5876063> REGRESSION (r31823-r31847): Patterns are upside down
1346
1347         * svg/graphics/cg/SVGPaintServerPatternCg.cpp:
1348         (WebCore::patternCallback): flip the y axis when drawing the tile
1349
1350 2008-04-30  Timothy Hatcher  <timothy@apple.com>
1351
1352         Fixes an undefined type exception that fires when adding a resource to the inspector
1353         that has a MIME type warning.
1354
1355         Reviewed by Adam Roben.
1356
1357         * page/inspector/Resource.js:
1358         (WebInspector.Resource.prototype._addTip): Call WebInspector.console instead of
1359         WebInspector.consolePanel.
1360         (WebInspector.Resource.prototype._checkWarning): Ditto.
1361
1362 2008-04-30  Timothy Hatcher  <timothy@apple.com>
1363
1364         Fixes the bug where the selected resource would be deselected after
1365         changing the sort order in the Resources panel.
1366
1367         Reviewed by Dan Bernstein.
1368
1369         * page/inspector/ResourcesPanel.js:
1370         (WebInspector.ResourcesPanel.prototype._sortResourcesIfNeeded):
1371         Rememebr if the tree element that we are sorting was selected, so
1372         the selection can be restored after it is re-inserted. The onSelect
1373         is suppressed since we don't need to show the resource again.
1374
1375 2008-04-29  Timothy Hatcher  <timothy@apple.com>
1376
1377         Fixes the regression where error bubbles in source views always show
1378         "undefined" for the content because the message property on
1379         ConsoleMessage was removed. Adds support for a plain text formated
1380         message that is stored in the message proeprty.
1381
1382         Reviewed by Adam Roben.
1383
1384         * page/inspector/Console.js:
1385         (WebInspector.Console.prototype._format): Add a plainText argument that is passed to
1386         the formatters.
1387         (WebInspector.Console.prototype._formatvalue): Add a plainText argument, and a comment
1388         about needing to honor it if the textContent of the output doesn't make sense.
1389         (WebInspector.Console.prototype._formatvalue): Ditto.
1390         (WebInspector.Console.prototype._formatstring): Ditto.
1391         (WebInspector.Console.prototype._formatregexp): Ditto.
1392         (WebInspector.Console.prototype._formatarray): Ditto.
1393         (WebInspector.Console.prototype._formatnode): Ditto.
1394         (WebInspector.Console.prototype._formatobject): Ditto.
1395         (WebInspector.Console.prototype._formaterror): Ditto.
1396         (WebInspector.ConsoleMessage): Call _format passing true for plainText. Get the 
1397         textContnet of the result and assign to the message proeprty. This property is 
1398         referenced from the SourceView.
1399         (WebInspector.ConsoleMessage.prototype._format): Add a plainText argument. Build the 
1400         result element as a local and return it, instead of using formatedMessage directly.
1401
1402 2008-04-30  Timothy Hatcher  <timothy@apple.com>
1403
1404         Adds a helper function to convert a JSValueRef to a String.
1405
1406         Reviewed by Adam Roben.
1407
1408         * page/InspectorController.cpp:
1409         (WebCore::toString): Converts a JSValueRef to a String.
1410         (WebCore::search): Use toString.
1411         (WebCore::InspectorController::handleException): Ditto.
1412
1413 2008-04-30  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1414
1415         Reviewed by Simon.
1416         
1417         Build the Qt port with SVG Foreign Object support.
1418
1419         * WebCore.pro:
1420
1421 2008-04-30  Simon Hausmann  <hausmann@webkit.org>
1422
1423         Reviewed by Holger.
1424
1425         Fix null pointer deference triggered by
1426         LayoutTests/fast/loader/cancel-load-during-port-block-timer.html
1427
1428         * platform/network/qt/ResourceHandleQt.cpp:
1429         (WebCore::ResourceHandle::cancel): Check m_job before dereferencing.
1430
1431 2008-04-29  David Hyatt  <hyatt@apple.com>
1432
1433         Improve the performance of masks by adding code to set more precise clips on the transparency layers
1434         used to paint the content under the mask, and then also avoid creating transparency layers for the masks
1435         themselves in common cases.
1436
1437         Reviewed by Dan Bernstein
1438
1439         * platform/graphics/GraphicsContext.cpp:
1440         (WebCore::GraphicsContext::drawTiledImage):
1441         Fix a bug in drawTiledImage where the composite mode got lost in the double stretch case for nine piece
1442         images.
1443
1444         * rendering/InlineFlowBox.cpp:
1445         (WebCore::InlineFlowBox::paintFillLayers):
1446         (WebCore::InlineFlowBox::paintFillLayer):
1447         (WebCore::InlineFlowBox::paintMask):
1448         Optimize to only push a transparency layer for the mask if multiple images are combining.  Add a new
1449         composite operator argument for use when painting fill layers to do direct destination-in compositing while
1450         painting images.
1451
1452
1453         * rendering/InlineFlowBox.h:
1454         * rendering/RenderBox.cpp:
1455         (WebCore::RenderBox::paintMask):
1456         (WebCore::RenderBox::paintMaskImages):
1457         Optimize to only push a transparency layer for the mask if multiple images are combining.
1458
1459         (WebCore::RenderBox::maskClipRect):
1460         A new method that attempts to compute a precise clip rect for the mask images.
1461
1462         (WebCore::RenderBox::paintFillLayers):
1463         (WebCore::RenderBox::paintFillLayer):
1464         (WebCore::RenderBox::paintFillLayerExtended):
1465         * rendering/RenderBox.h:
1466         Added the composite operator argument to the paintFillLayer methods.
1467
1468         * rendering/RenderFieldset.cpp:
1469         (WebCore::RenderFieldset::paintMask):
1470         Call the new base class paintMaskImages method for optimized mask painting.
1471
1472         * rendering/RenderLayer.cpp:
1473         (WebCore::transparencyClipBox):
1474         Fix a coordinate space issue with transparencyClipBox when masks were used.  The border box was in the
1475         wrong coordinate space.  Moved the code into the layer's boundingBox() method instead.
1476
1477         (WebCore::RenderLayer::paintLayer):
1478         Removed the code that always pushed a transparency layer before painting masks.
1479
1480         (WebCore::RenderLayer::boundingBox):
1481         Call maskClipRect to shrink the bounding box of the layer to fit the mask clip.
1482
1483         * rendering/RenderObject.cpp:
1484         (WebCore::RenderObject::paintNinePieceImage):
1485         Added a composite operator argument for direct destination-in painting of nine piece images.
1486
1487         * rendering/RenderObject.h:
1488         (WebCore::RenderObject::maskClipRect):
1489         (WebCore::RenderObject::paintFillLayerExtended):
1490         Base class stubs for RenderBox-implemented methods.
1491
1492         * rendering/RenderTable.cpp:
1493         (WebCore::RenderTable::paintMask):
1494         * rendering/RenderTableCell.cpp:
1495         (WebCore::RenderTableCell::paintMask):
1496         Modified to call the new paintMaskImages function.
1497
1498         * svg/graphics/SVGImage.cpp:
1499         (WebCore::SVGImage::draw):
1500         SVG images now respect composite modes by pushing a transparency layer when the composite mode
1501         is anything other than source-over.
1502
1503 2008-04-30  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1504
1505         Rubber-stamped by Rob Buis.
1506
1507         Fixed crash or assertion if SVG_FOREIGN_OBJECT is not enabled
1508
1509         * svg/SVGUseElement.cpp:
1510         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
1511
1512 2008-04-30  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1513
1514         Rubber-stamped by Rob Buis.
1515
1516         Fixed compile, due to API change in XMLSerializer
1517
1518         * svg/SVGUseElement.cpp:
1519         (WebCore::SVGUseElement::buildPendingResource):
1520
1521 2008-04-30  Rob Buis  <buis@kde.org>
1522
1523         Reviewed by Eric.
1524
1525         https://bugs.webkit.org/show_bug.cgi?id=11939
1526         Quirksmode: Ignores media types in stylesheet PIs
1527
1528         Transfer the xml-stylesheet pseudo attribute media to the css
1529         stylesheet created from the ProcessingInstruction.
1530
1531         Tests: fast/css/xml-stylesheet-media-processing.xhtml
1532
1533         * css/StyleSheet.cpp:
1534         (WebCore::StyleSheet::setMedia):
1535         * css/StyleSheet.h:
1536         * dom/ProcessingInstruction.cpp:
1537         (WebCore::ProcessingInstruction::checkStyleSheet):
1538         (WebCore::ProcessingInstruction::setCSSStyleSheet):
1539         * dom/ProcessingInstruction.h:
1540
1541 2008-04-29  David D. Kilzer  <ddkilzer@apple.com>
1542
1543         BUILD FIX for export of WTF::RefCounted<WebCore::FormData>::deref()
1544
1545         On the buildbot, this is a fatal error:
1546
1547         ld: symbols names listed in -exported_symbols_list: WebKitBuild/Release/DerivedSources/WebCore/WebCore.exp not in linked objects
1548         __ZN3WTF10RefCountedIN7WebCore8FormDataEE5derefEv
1549         /usr/bin/libtool: internal link edit command failed
1550
1551         Newer dev tools only produce a warning:
1552
1553         ld warning: cannot export hidden symbol __ZN3WTF10RefCountedIN7WebCore8FormDataEE5derefEv from WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/i386/DocumentLoader.o
1554
1555         * WebCore.base.exp: Remove hidden symbol from export list.
1556
1557 2008-04-29  David Kilzer  <ddkilzer@apple.com>
1558
1559         Another BUILD FIX for ENABLE(DASHBOARD_SUPPORT)
1560
1561         * dom/make_names.pl: Added #if ENABLE(DASHBOARD_SUPPORT) to Dashboard code.
1562
1563 2008-04-29  David Kilzer  <ddkilzer@apple.com>
1564
1565         BUILD FIX for ENABLE(DASHBOARD_SUPPORT)
1566
1567         * DerivedSources.make: Removed duplication of targets for
1568         generating CSSPropertyNames.h and CSSValueKeywords.h.
1569         * GNUmakefile.am: Ditto.  Added support for ENABLE_DASHBOARD_SUPPORT.
1570         * WebCore.pro: Added support for ENABLE_DASHBOARD_SUPPORT.
1571         Made both SVG and non-SVG variables of GENERATOR 6-A use new
1572         DASHBOARDSUPPORTCSSPROPERTIES variable.
1573
1574 2008-04-29  Ada Chan  <adachan@apple.com>
1575
1576         Added missing return.        
1577
1578         * platform/win/COMPtr.h:
1579         (WTF::):
1580
1581 2008-04-29  Alp Toker  <alp@nuanti.com>
1582
1583         GTK+ build fix attempt following breakage in r32700 which
1584         conditionalised dashboard support.
1585
1586         * GNUmakefile.am:
1587
1588 2008-04-29  Adam Roben  <aroben@apple.com>
1589
1590         Restore the beloved COMPtr::operator&
1591
1592         * platform/win/COMPtr.h: Removed the HashTableDeletedValueType
1593         constructor and isHashTableDeletedValue and hashTableDeletedValue
1594         functions.
1595         (WTF::): Changed constructDeletedValue to play nicely with
1596         COMPtr::operator&.
1597
1598 2008-04-29  Adam Roben  <aroben@apple.com>
1599
1600         Fix assertion on launch on Windows
1601
1602         * platform/graphics/win/FontPlatformData.h: Pass
1603         WTF::HashTableDeletedValue to the m_font constructor instead of a
1604         bogus -1 value. This is needed because m_font is a RefPtr.
1605
1606 2008-04-29  Greg Bolsinga  <bolsinga@apple.com>
1607
1608         Reviewed by Darin.
1609
1610         Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
1611
1612         * DerivedSources.make:
1613         * WebCore.DashboardSupport.exp: Added.
1614         * WebCore.base.exp:
1615         * WebCore.xcodeproj/project.pbxproj:
1616         * bindings/js/JSDOMWindowCustom.cpp:
1617         (WebCore::JSDOMWindow::setLocation):
1618         * css/CSSComputedStyleDeclaration.cpp:
1619         (WebCore::):
1620         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1621         * css/CSSParser.cpp:
1622         (WebCore::CSSParser::parseValue):
1623         * css/CSSPrimitiveValue.cpp:
1624         (WebCore::CSSPrimitiveValue::cleanup):
1625         (WebCore::CSSPrimitiveValue::cssText):
1626         * css/CSSPropertyNames.in:
1627         * css/CSSStyleSelector.cpp:
1628         (WebCore::CSSStyleSelector::applyProperty):
1629         * css/DashboardRegion.h:
1630         * css/DashboardSupportCSSPropertyNames.in: Added.
1631         * dom/DOMImplementation.cpp:
1632         (WebCore::DOMImplementation::createDocument):
1633         * dom/Document.cpp:
1634         (WebCore::Document::Document):
1635         (WebCore::Document::importNode):
1636         * dom/Document.h:
1637         * html/CanvasRenderingContext2D.cpp:
1638         (WebCore::CanvasRenderingContext2D::fill):
1639         (WebCore::CanvasRenderingContext2D::stroke):
1640         (WebCore::CanvasRenderingContext2D::clip):
1641         * html/CanvasRenderingContext2D.h:
1642         * html/HTMLCanvasElement.cpp:
1643         * html/HTMLCanvasElement.h:
1644         * page/Chrome.cpp:
1645         * page/ChromeClient.h:
1646         * page/Frame.cpp:
1647         (WebCore::Frame::paint):
1648         * page/Frame.h:
1649         * page/FrameView.cpp:
1650         (WebCore::FrameView::layout):
1651         * page/FrameView.h:
1652         * page/Settings.cpp:
1653         (WebCore::Settings::Settings):
1654         * page/Settings.h:
1655         * page/mac/EventHandlerMac.mm:
1656         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
1657         * page/mac/FrameMac.mm:
1658         * page/mac/WebDashboardRegion.h:
1659         * page/mac/WebDashboardRegion.m:
1660         * rendering/RenderLayer.cpp:
1661         (WebCore::RenderLayer::scrollToOffset):
1662         (WebCore::RenderLayer::setHasHorizontalScrollbar):
1663         (WebCore::RenderLayer::setHasVerticalScrollbar):
1664         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1665         * rendering/RenderObject.cpp:
1666         (WebCore::RenderObject::setStyle):
1667         * rendering/RenderObject.h:
1668         * rendering/RenderStyle.cpp:
1669         (WebCore::StyleRareNonInheritedData::operator==):
1670         (WebCore::RenderStyle::diff):
1671         * rendering/RenderStyle.h:
1672         * xml/XMLHttpRequest.cpp:
1673         (WebCore::XMLHttpRequest::send):
1674         (WebCore::XMLHttpRequest::setRequestHeader):
1675
1676 2008-04-29  Adam Roben  <aroben@apple.com>
1677
1678         Windows build fix
1679
1680         This removes COMPtr::operator&, which didn't jive with HashTable. It
1681         is replaced by COMPtr::adoptionPointer.
1682
1683         Discussed with Darin Adler and Anders Carlsson.
1684
1685         * platform/win/COMPtr.h: Replaced operator& with adoptionPointer.
1686
1687 2008-04-29  David Hyatt  <hyatt@apple.com>
1688
1689         Implement the new box-reflect property in CSS.  This property enables real-time reflections on
1690         objects (yes you can reflect <video>!).
1691
1692         Reviewed by Dan Bernstein
1693
1694         Test cases added in fast/reflections/
1695
1696         * GNUmakefile.am:
1697         * WebCore.pro:
1698         * WebCore.xcodeproj/project.pbxproj:
1699         * WebCoreSources.bkl:
1700         * css/CSSComputedStyleDeclaration.cpp:
1701         (WebCore::):
1702         (WebCore::valueForReflection):
1703         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1704         * css/CSSParser.cpp:
1705         (WebCore::CSSParser::parseValue):
1706         (WebCore::CSSParser::parseReflect):
1707         (WebCore::BorderImageParseContext::commitBorderImage):
1708         (WebCore::CSSParser::parseBorderImage):
1709         (WebCore::parseGradientColorStop):
1710         (WebCore::CSSParser::parseTransform):
1711         * css/CSSParser.h:
1712         * css/CSSPropertyNames.in:
1713         * css/CSSReflectValue.cpp: Added.
1714         (WebCore::CSSReflectValue::cssText):
1715         * css/CSSReflectValue.h: Added.
1716         (WebCore::):
1717         (WebCore::CSSReflectValue::CSSReflectValue):
1718         (WebCore::CSSReflectValue::direction):
1719         (WebCore::CSSReflectValue::offset):
1720         (WebCore::CSSReflectValue::mask):
1721         (WebCore::CSSReflectValue::setDirection):
1722         (WebCore::CSSReflectValue::setOffset):
1723         (WebCore::CSSReflectValue::setMask):
1724         * css/CSSStyleSelector.cpp:
1725         (WebCore::CSSStyleSelector::adjustRenderStyle):
1726         (WebCore::CSSStyleSelector::applyProperty):
1727         (WebCore::CSSStyleSelector::mapNinePieceImage):
1728         * css/CSSStyleSelector.h:
1729         * rendering/InlineFlowBox.cpp:
1730         (WebCore::InlineFlowBox::placeBoxesVertically):
1731         (WebCore::InlineFlowBox::paintMask):
1732         * rendering/Length.h:
1733         (WebCore::Length::calcFloatValue):
1734         * rendering/RenderBlock.cpp:
1735         (WebCore::RenderBlock::overflowHeight):
1736         (WebCore::RenderBlock::overflowWidth):
1737         (WebCore::RenderBlock::overflowLeft):
1738         (WebCore::RenderBlock::overflowTop):
1739         (WebCore::RenderBlock::overflowRect):
1740         (WebCore::RenderBlock::layoutBlock):
1741         * rendering/RenderBox.cpp:
1742         (WebCore::RenderBox::setStyle):
1743         (WebCore::RenderBox::paintMask):
1744         (WebCore::RenderBox::imageChanged):
1745         (WebCore::RenderBox::computeAbsoluteRepaintRect):
1746         * rendering/RenderFlexibleBox.cpp:
1747         (WebCore::RenderFlexibleBox::layoutBlock):
1748         * rendering/RenderLayer.cpp:
1749         (WebCore::RenderLayer::RenderLayer):
1750         (WebCore::RenderLayer::~RenderLayer):
1751         (WebCore::RenderLayer::updateLayerPositions):
1752         (WebCore::RenderLayer::enclosingPositionedAncestor):
1753         (WebCore::RenderLayer::enclosingTransformedAncestor):
1754         (WebCore::RenderLayer::isTransparent):
1755         (WebCore::transparencyClipBox):
1756         (WebCore::RenderLayer::operator delete):
1757         (WebCore::RenderLayer::destroy):
1758         (WebCore::RenderLayer::removeOnlyThisLayer):
1759         (WebCore::RenderLayer::insertOnlyThisLayer):
1760         (WebCore::RenderLayer::paintLayer):
1761         (WebCore::RenderLayer::updateZOrderLists):
1762         (WebCore::RenderLayer::updateOverflowList):
1763         (WebCore::RenderLayer::collectLayers):
1764         (WebCore::RenderLayer::shouldBeOverflowOnly):
1765         (WebCore::RenderLayer::styleChanged):
1766         (WebCore::RenderLayer::reflectionLayer):
1767         (WebCore::RenderLayer::createReflection):
1768         (WebCore::RenderLayer::updateReflectionStyle):
1769         * rendering/RenderLayer.h:
1770         (WebCore::RenderLayer::hasReflection):
1771         (WebCore::RenderLayer::reflection):
1772         (WebCore::RenderLayer::paintingInsideReflection):
1773         * rendering/RenderObject.cpp:
1774         (WebCore::RenderObject::RenderObject):
1775         (WebCore::RenderObject::requiresLayer):
1776         (WebCore::RenderObject::setStyle):
1777         (WebCore::RenderObject::updateImage):
1778         (WebCore::RenderObject::reflectionBox):
1779         (WebCore::RenderObject::reflectionOffset):
1780         * rendering/RenderObject.h:
1781         (WebCore::RenderObject::hasTransform):
1782         (WebCore::RenderObject::setHasReflection):
1783         (WebCore::RenderObject::hasReflection):
1784         * rendering/RenderReplica.cpp: Added.
1785         (WebCore::RenderReplica::RenderReplica):
1786         (WebCore::RenderReplica::~RenderReplica):
1787         (WebCore::RenderReplica::layout):
1788         (WebCore::RenderReplica::calcPrefWidths):
1789         (WebCore::RenderReplica::paint):
1790         * rendering/RenderReplica.h: Added.
1791         (WebCore::RenderReplica::renderName):
1792         (WebCore::RenderReplica::requiresLayer):
1793         * rendering/RenderStyle.cpp:
1794         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1795         (WebCore::StyleRareNonInheritedData::operator==):
1796         (WebCore::StyleRareNonInheritedData::reflectionDataEquivalent):
1797         (WebCore::RenderStyle::diff):
1798         (WebCore::RenderStyle::applyTransform):
1799         * rendering/RenderStyle.h:
1800         (WebCore::TranslateTransformOperation::apply):
1801         (WebCore::StyleReflection::StyleReflection):
1802         (WebCore::StyleReflection::operator==):
1803         (WebCore::StyleReflection::operator!=):
1804         (WebCore::StyleReflection::direction):
1805         (WebCore::StyleReflection::offset):
1806         (WebCore::StyleReflection::mask):
1807         (WebCore::StyleReflection::setDirection):
1808         (WebCore::StyleReflection::setOffset):
1809         (WebCore::StyleReflection::setMask):
1810         (WebCore::RenderStyle::boxReflect):
1811         (WebCore::RenderStyle::setBoxReflect):
1812         (WebCore::RenderStyle::initialBoxReflect):
1813         * rendering/RenderTable.cpp:
1814         (WebCore::RenderTable::layout):
1815         (WebCore::RenderTable::paintMask):
1816         * rendering/RenderTableCell.cpp:
1817         (WebCore::RenderTableCell::requiresLayer):
1818         (WebCore::RenderTableCell::paintMask):
1819
1820 2008-04-29  Beth Dakin  <bdakin@apple.com>
1821
1822         Reviewed by Alice.
1823
1824         Initial implementation of the following ARIA roles: button, 
1825         checkbox, heading, link, radio, textbox.
1826
1827         * html/HTMLAttributeNames.in: Add 'role' to list of attributes.
1828
1829         * page/AccessibilityObject.cpp:
1830          When an ARIA role is set, the role overrides whatever the actual 
1831 element is when the element reports itself to the screen reader. So all of these isBlah functions report based on their roleValue now.
1832         (WebCore::AccessibilityObject::isWebArea):
1833         (WebCore::AccessibilityObject::isImageButton):
1834         (WebCore::AccessibilityObject::isAnchor):
1835         (WebCore::AccessibilityObject::isTextControl):
1836         (WebCore::AccessibilityObject::isImage):
1837         (WebCore::AccessibilityObject::isAttachment):
1838         (WebCore::AccessibilityObject::isPasswordField):
1839         (WebCore::AccessibilityObject::isCheckboxOrRadio):
1840         (WebCore::AccessibilityObject::isHeading):
1841         (WebCore::AccessibilityObject::isLink):
1842
1843         Check for ARIA information:
1844         (WebCore::AccessibilityObject::headingLevel):
1845         (WebCore::AccessibilityObject::anchorElement):
1846         (WebCore::AccessibilityObject::actionElement):
1847         (WebCore::AccessibilityObject::hasIntValue):
1848         (WebCore::AccessibilityObject::intValue):
1849         (WebCore::AccessibilityObject::stringValue):
1850         (WebCore::AccessibilityObject::title):
1851         (WebCore::AccessibilityObject::accessibilityIsIgnored):
1852         (WebCore::AccessibilityObject::roleValue):
1853
1854         There are a few places in the code where it is important to identify the difference between ARIA and non-ARIA.
1855         (WebCore::AccessibilityObject::isNativeImage):
1856         (WebCore::AccessibilityObject::isNativeTextControl):
1857         (WebCore::isARIAInput):
1858         (WebCore::isARIAControl):
1859
1860         A lot of spots in the code used to cast to RenderTextControl to get information about the text inside the element. Now that non-native text controls can run this code with the ARIA role 'textbox', it needs to be as general as possible. 
1861         (WebCore::AccessibilityObject::text): Still calls into 
1862         RenderTextControl's text() for native text controls. Uses Element's 
1863         innerText() for ARIA textboxes.
1864         (WebCore::AccessibilityObject::textLength): Call 
1865         AccessibilityObject's text() instead of RenderTextControl's.
1866         (WebCore::AccessibilityObject::ariaSelectedTextDOMRange):
1867         (WebCore::AccessibilityObject::selectedText):
1868         (WebCore::AccessibilityObject::selectedTextRange):
1869         (WebCore::AccessibilityObject::selectionStart):
1870         (WebCore::AccessibilityObject::selectionEnd):
1871         (WebCore::AccessibilityObject::setSelectedTextRange):
1872         (WebCore::AccessibilityObject::setValue):
1873         (WebCore::AccessibilityObject::visiblePositionForIndex):
1874         (WebCore::AccessibilityObject::indexForVisiblePosition):
1875         (WebCore::AccessibilityObject::textMarkerRangeForRange):
1876         (WebCore::AccessibilityObject::textMarkerForIndex):
1877         (WebCore::AccessibilityObject::indexForTextMarker):
1878         (WebCore::AccessibilityObject::doAXRangeForLine):
1879         (WebCore::AccessibilityObject::doAXRangeForIndex):
1880         (WebCore::AccessibilityObject::doAXStringForRange):
1881         (WebCore::AccessibilityObject::doAXBoundsForRange):
1882         
1883         Reports ARIA role. If the role is not valid or simply not set, return UnknownRole.
1884         (WebCore::AccessibilityObject::ariaRoleAttribute):
1885         
1886         Added several new functions. Most of them existed before but were static, or have been added to reduce the dependency on RenderTextControl for a lot of the text functionality.
1887         * page/AccessibilityObject.h:
1888
1889         Eliminated dependency on RenderTextControl cast. The information is generalized now and available directly through the AccessibilityObject.
1890         * page/mac/AccessibilityObjectWrapper.mm:
1891         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1892         (-[AccessibilityObjectWrapper doAXAttributedStringForRange:]):
1893
1894 2008-04-29  Timothy Hatcher  <timothy@apple.com>
1895
1896         Make the exceptions that the InspectorController catches log the
1897         original file and line number, if present on the exception object.
1898
1899         Reviewed by Adam Roben.
1900
1901         * page/InspectorController.cpp:
1902         (WebCore::InspectorController::callFunction): Pass the context to HANDLE_EXCEPTION.
1903         (WebCore::InspectorController::~InspectorController): Ditto.
1904         (WebCore::InspectorController::scriptObjectReady): Ditto.
1905         (WebCore::InspectorController::addScriptResource): Ditto.
1906         (WebCore::InspectorController::updateScriptResourceRequest): Ditto.
1907         (WebCore::InspectorController::updateScriptResourceResponse): Ditto.
1908         (WebCore::InspectorController::updateScriptResource): Ditto.
1909         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
1910         (WebCore::InspectorController::addScriptConsoleMessage): Ditto.
1911         (WebCore::InspectorController::handleException): Take a context. Pull the line
1912         and sourceURL properties off the exception if it is an object.
1913         * page/InspectorController.h: Change handleException to take a context.
1914
1915 2008-04-29  Timothy Hatcher  <timothy@apple.com>
1916
1917         Fixes a regression where the Page's debugger would not be reattached
1918         when a new JSDOMWindow is created.
1919
1920         Reviewed by Sam Weinig.
1921
1922         * bindings/js/kjs_proxy.cpp:
1923         (WebCore::KJSProxy::clear): Call attachDebugger after creating the JSDOMWindow.
1924         * history/CachedPage.cpp:
1925         (WebCore::CachedPage::restore): For the case where the CachedPage doesn't
1926         contain a window, reattach the debugger to the new JSDOMWindow by calling
1927         proxy->attachDebugger. Also restore the setPageGroupIdentifier.
1928
1929 2008-04-29  Anatoli Papirovski  <apapirovski@mac.com>
1930
1931         Reviewed by Darin Adler.
1932
1933         Fix for https://bugs.webkit.org/show_bug.cgi?id=18355
1934         Fixed RGB and RGBA parsing to ignore the declaration when the value is not
1935         "either three integer values or three percentage values."
1936
1937         * css/CSSParser.cpp:
1938         (WebCore::CSSParser::parseColorParameters):
1939
1940 2008-04-29  Holger Hans Peter Freyther  <zecke@selfish.org>
1941
1942         Reviewed by Simon.
1943
1944         Fix crash when setHtml gets called from slots connected to QWebPage::unsupportedContent
1945
1946         Ben found this crash in the demo browser.
1947
1948         In void MainResourceLoader::continueAfterContentPolicy(PolicyAction contentPolicy,
1949
1950         case PolicyDownload:
1951         frameLoader()->client()->download(m_handle.get(), request(), m_handle.get()->request(), r);
1952         receivedError(interruptionForPolicyChangeError());
1953
1954         We are in a policy check, the download() call will call setHtml, which will start loading
1955         the data into a frame. The loading will cancel all policy checks and call ResourceLoader::releaseResources
1956         which will set m_frame to 0. Then we return and invoke interruptionForPolicyChangeError() which
1957         will use the m_frame->loader() but it is gone. Do not call into receivedError and
1958         interruptionForPolicyChangeError if we are gone anyway...
1959
1960         * loader/MainResourceLoader.cpp:
1961         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1962
1963 2008-04-29  Holger Hans Peter Freyther  <zecke@selfish.org>
1964
1965         Reviewed by Simon.
1966
1967         Rely on auto-boxing of C++ for the QCursor c'tor
1968
1969         * platform/qt/CursorQt.cpp:
1970
1971 2008-04-29  Holger Hans Peter Freyther  <zecke@selfish.org>
1972
1973         Reviewed by Simon.
1974
1975         Add the remaining cursors that defaulted to PointerCursor
1976
1977         * Resources/WebKitResources.qrc:
1978         * platform/qt/CursorQt.cpp:
1979         (WebCore::verticalTextCursor):
1980         (WebCore::cellCursor):
1981         (WebCore::contextMenuCursor):
1982         (WebCore::copyCursor):
1983         (WebCore::progressCursor):
1984         (WebCore::aliasCursor):
1985
1986 2008-04-29  Alice Liu  <alice.liu@apple.com>
1987
1988         Reviewed by Beth Dakin.
1989
1990         Comply with HTML5 spec about parsing tabindex property according to
1991         integer parsing rules
1992
1993         Test: fast/parser/tabindex-parsing.html
1994
1995         * html/HTMLElement.cpp:
1996         (WebCore::HTMLElement::parseMappedAttribute):
1997
1998 2008-04-29  Tor Arne Vestbø  <tavestbo@trolltech.com>
1999
2000         Reviewed by Simon.
2001
2002         Fixes: Fix timing problem where scrollbars in subframes were sometimes not property repainted.
2003
2004         https://bugs.webkit.org/show_bug.cgi?id=18482
2005
2006         We need to repaint scrollbars after a geometry change, and also make sure
2007         the computed clipping rect for the corners between scrollbars is propagated
2008         to the chrome client without beeing intersected by the visible content rect
2009         of the frame.
2010
2011         * platform/ScrollView.h:
2012         * platform/qt/ScrollViewQt.cpp:
2013         (WebCore::ScrollView::geometryChanged):
2014         (WebCore::ScrollView::suppressScrollbars):
2015         (WebCore::ScrollView::invalidateScrollbars):
2016
2017 2008-04-29  Holger Hans Peter Freyther  <zecke@selfish.org>
2018
2019         Reviewed by Simon.
2020
2021         Calling QWebView::setCursor will override the WebCore Cursor.
2022         Calling QWebView::setCursor will override the WebCore Cursor using
2023         QWidget::unsetCursor will revert to the WebCore Cursor.
2024
2025         For detecting the unset we have to compare the shape of the
2026         cursor to the default arrow. Qt::WA_SetCursor can not be used
2027         as it is set unconditionally but conditionally removed.
2028
2029         Calling QWidget::setCursor will immediately send the CursorChange
2030         event. We listen to this event to decide if we currently use a
2031         WebCore cursor, got a cursor from outside, or revert to the default.
2032
2033         This should be race free and work reliable, the manual test for this
2034         is WebCore/manual-tests/cursor.html
2035
2036         * platform/qt/WidgetQt.cpp:
2037         (WebCore::Widget::setCursor):
2038
2039 2008-04-28  Dan Bernstein  <mitz@apple.com>
2040
2041         Reviewed by Maciej Stachowiak.
2042
2043         - fix https://bugs.webkit.org/show_bug.cgi?id=18795
2044           REGRESSION (r32660): Text heavier with text-shadow
2045
2046         * rendering/InlineTextBox.cpp:
2047         (WebCore::paintTextWithShadows): The loop was doing one extra pass
2048         without shadow even in cases where the last pass with a shadow was
2049         painting the text at the right position (rather than outside the clip).
2050         Fixed that. The only case where a separate pass without shadow is needed
2051         is when there is text-stroke, since in that case all shadow passes
2052         paint the text outside the clip.
2053
2054 2008-04-28  Brady Eidson <beidson@apple.com>
2055
2056         Reviewed by Sam Weinig
2057
2058         Add Storage.clear(), per updates to HTML5
2059
2060         Tests: storage/domstorage/localstorage/clear.html
2061                storage/domstorage/sessionstorage/clear.html
2062
2063         * storage/LocalStorageArea.cpp:
2064         (WebCore::LocalStorageArea::areaCleared):
2065         * storage/LocalStorageArea.h:
2066
2067         * storage/SessionStorageArea.cpp:
2068         (WebCore::SessionStorageArea::areaCleared):
2069         * storage/SessionStorageArea.h:
2070
2071         * storage/Storage.cpp:
2072         (WebCore::Storage::clear):
2073         * storage/Storage.h:
2074         * storage/Storage.idl:
2075
2076         * storage/StorageArea.cpp:
2077         (WebCore::StorageArea::internalClear):
2078         * storage/StorageArea.h:
2079         (WebCore::StorageArea::clear):
2080
2081 2008-04-28  Adele Peterson  <adele@apple.com>
2082
2083         Reviewed by Dan Bernstein, Tim Hatcher, Anders Carlsson, and Darin Adler.
2084
2085         WebCore part of fix for <rdar://problem/3709505>
2086         Safari should have a way to upload bundles from the file upload control (as zip)
2087
2088         * WebCore.base.exp: Added symbols.
2089
2090         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData): Ask the application if a file will need to be replaced before it's uploaded.
2091           It will also give the replacement filename which is used to determine the correct mime-type and to construct the correct header.
2092
2093         * loader/FrameLoader.cpp:
2094         (WebCore::FrameLoader::submitForm): Asks the application to generate any files for the form data before a form submission starts.
2095         (WebCore::FrameLoader::loadItem): ditto.
2096         * loader/ResourceLoader.cpp:
2097         (WebCore::ResourceLoader::didReceiveResponse): Tells the FormData from the request to remove any generated files if it needs to.
2098         (WebCore::ResourceLoader::didCancel): ditto.
2099         (WebCore::ResourceLoader::didFail): ditto.
2100
2101         * platform/network/FormData.cpp:
2102         (WebCore::FormData::FormData): Initializes m_hasGeneratedFiles, which keeps track of whether there are files that will need to be removed.
2103         (WebCore::FormData::~FormData): Added.  Assert that there are no files that need to be removed, but if there are, release builds will still remove them here.
2104         (WebCore::FormData::appendFile): Passes along a shouldGenerateFile flag to the FormDataElement.
2105         (WebCore::FormData::generateFiles): Added. Iterates through the FormDataElements, and using the ChromeClient pointer, asks the application to
2106          create any compressed files so the FormDataElements can store the paths.
2107         (WebCore::FormData::removeGeneratedFilesIfNeeded): Added.  Removes generated files and their directories (if empty).
2108         * platform/network/FormData.h:
2109         (WebCore::FormDataElement::FormDataElement): Added a boolean to track whether the file will need to be generated,
2110          and a string to hold the path of the generated file.
2111
2112         * platform/network/mac/FormDataStreamMac.mm:
2113         (WebCore::advanceCurrentStream): Uses the generated file path instead of the original file path when streaming the file.
2114         (WebCore::setHTTPBody): Uses the generated file path when determining the size of the file to be uploaded.
2115
2116         * platform/FileSystem.h: Added directoryName.
2117         * platform/posix/FileSystemPOSIX.cpp: (WebCore::directoryName): Added.
2118         * platform/gtk/FileSystemGtk.cpp: (WebCore::directoryName): Added empty implementation.
2119         * platform/qt/FileSystemQt.cpp: (WebCore::directoryName): ditto.
2120         * platform/win/FileSystemWin.cpp: (WebCore::directoryName): ditto.
2121         * platform/wx/FileSystemWx.cpp: (WebCore::directoryName): ditto.
2122
2123         Added new ChromeClient methods to give the application control over the file compression for uploading.
2124         * page/Chrome.cpp:
2125         (WebCore::ChromeClient::shouldReplaceWithGeneratedFileForUpload): Added a default implementation.
2126         (WebCore::ChromeClient::generateReplacementFile): ditto.
2127         * page/ChromeClient.h:
2128
2129 2008-04-28  Anders Carlsson  <andersca@apple.com>
2130
2131         Reviewed by Sam, Mark, Adele and Darin.
2132
2133         Add a (currently not called) method for opening the application cache database.
2134         
2135         * WebCore.base.exp:
2136         * loader/appcache/ApplicationCacheStorage.cpp:
2137         (WebCore::ApplicationCacheStorage::setCacheDirectory):
2138         (WebCore::ApplicationCacheStorage::openDatabase):
2139         * loader/appcache/ApplicationCacheStorage.h:
2140
2141 2008-04-28  Alice Liu  <alice.liu@apple.com>
2142
2143         Reviewed by Darin.
2144
2145         Fix <rdar://problem/4911289> Add tabindex property to all children 
2146         of HTMLElement (7138)
2147         http://bugs.webkit.org/show_bug.cgi?id=7138
2148
2149         Test: fast/events/tabindex-focus-blur-all.html
2150
2151         * WebCore.xcodeproj/project.pbxproj:
2152         * bindings/objc/DOMPrivate.h:
2153         -DOMHTMLLabelElementPrivate.h and DOMHTMLLegendElementPrivate.h are no
2154          longer needed
2155
2156         * bindings/objc/PublicDOMInterfaces.h:
2157         -Moving focus, blur, tabindex to HTMLElement from its descendants.
2158
2159         * dom/Node.cpp:
2160         (WebCore::Node::Node):
2161         (WebCore::Node::isFocusable):
2162         (WebCore::Node::isKeyboardFocusable):
2163         -The concept of being focusable now needs to account for tabindex
2164         attribute.
2165
2166         * dom/Node.h:
2167         -Need to use a bit to keep track of whether tabindex was explicitly set
2168          to 0 or was just initialized to 0.
2169         (WebCore::Node::tabIndex):
2170         -Make this virtual so that Anchors and GenericFormElements can determine
2171          tabindex without accounting for focusability
2172         (WebCore::Node::setTabIndexExplicitly):
2173         -Renamed setTabIndex() to setTabIndexExplicitly() so as not to hide
2174          behind and/or be confused for HTMLElement::setTabIndex
2175
2176         * html/HTMLAnchorElement.cpp:
2177         * html/HTMLAnchorElement.h:
2178         (WebCore::HTMLAnchorElement::tabIndex):
2179         * html/HTMLGenericFormElement.cpp:
2180         * html/HTMLGenericFormElement.h:
2181         (WebCore::HTMLGenericFormElement::tabIndex):
2182         -Anchors and form elements are normally focusable, and need to avert the
2183          check for focusability in HTMLElement::tabIndex
2184          because tabIndex could be queried before a first layout happens.
2185
2186         * html/HTMLElement.cpp:
2187         (WebCore::HTMLElement::parseMappedAttribute):
2188         -Function Node::setTabIndex changed to Node::setTabIndexExplicitly
2189         (WebCore::HTMLElement::isFocusable):
2190         -The concept of being focusable now needs to account for tabindex
2191          attribute.
2192         (WebCore::HTMLElement::tabIndex):
2193         -HTML5 specifies that querying tabindex for elements that aren't
2194          focusable shall return -1
2195         (WebCore::HTMLElement::setTabIndex):
2196         -New default implementation
2197         * html/HTMLElement.h:
2198
2199         * html/HTMLLegendElement.cpp:
2200         (WebCore::HTMLLegendElement::focus):
2201         -Now with HTML5's enhanced specification of tabindex, legend elements
2202          themselves shall focus (if they should), and not the first form element 
2203          they encapsulate.  This matches Firefox behavior.  HTMLLabelElements
2204          still forward focus to the encapsulated element.  This also matches
2205          other browsers. 
2206
2207         * html/HTMLAreaElement.cpp:
2208         (WebCore::HTMLAreaElement::isFocusable):
2209         * html/HTMLAreaElement.h:
2210         -HTMLAreaElement isn't subject to the same focusability requirements as
2211          its parent, HTMLAnchorElement. Default HTMLElement implementation is
2212          desired.  
2213
2214         * html/HTMLFieldSetElement.cpp:
2215         (WebCore::HTMLFieldSetElement::isFocusable):
2216         * html/HTMLLegendElement.cpp:
2217         (WebCore::HTMLLegendElement::isFocusable):
2218         * html/HTMLOptGroupElement.cpp:
2219         (WebCore::HTMLOptGroupElement::isFocusable):
2220         * html/HTMLOptionElement.cpp:
2221         (WebCore::HTMLOptionElement::isFocusable):
2222         -These elements aren't subject to the same focusability requirements as
2223          their parent, HTMLGenericFormElement. Default HTMLElement 
2224          implementation is desired.  
2225
2226         * html/HTMLAnchorElement.idl:
2227         * html/HTMLAreaElement.idl:
2228         * html/HTMLButtonElement.idl:
2229         * html/HTMLElement.idl:
2230         * html/HTMLInputElement.idl:
2231         * html/HTMLLabelElement.idl:
2232         * html/HTMLLegendElement.idl:
2233         * html/HTMLObjectElement.idl:
2234         * html/HTMLSelectElement.idl:
2235         * html/HTMLTextAreaElement.idl:
2236         -Moving tabindex attribute, focus and blur methods from descendants of
2237          HTMLElement to HTMLElement
2238
2239 2008-04-28  Dan Bernstein  <mitz@apple.com>
2240
2241         Reviewed by Dave Hyatt.
2242
2243         - support multiple box- and text-shadows
2244
2245         Tests: fast/css/shadow-multiple.html
2246                fast/repaint/shadow-multiple-horizontal.html
2247                fast/repaint/shadow-multiple-strict-horizontal.html
2248                fast/repaint/shadow-multiple-strict-vertical.html
2249                fast/repaint/shadow-multiple-vertical.html
2250
2251         * css/CSSComputedStyleDeclaration.cpp:
2252         (WebCore::valueForShadow): Changed to account for reversing the order
2253         of the shadow values in the ShadowData list.
2254
2255         * css/CSSValueList.cpp:
2256         (WebCore::CSSValueList::prepend): Added.
2257         * css/CSSValueList.h:
2258
2259         * rendering/InlineFlowBox.cpp:
2260         (WebCore::InlineFlowBox::placeBoxesHorizontally): Changed to account for
2261         all shadows in overflow calculation.
2262         (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
2263         (WebCore::InlineFlowBox::paint): Changed to account for all shadows
2264         when testing for intersection with the damage rect.
2265         (WebCore::InlineFlowBox::paintTextDecorations): Changed to paint all
2266         shadows.
2267
2268         * rendering/InlineTextBox.cpp:
2269         (WebCore::paintTextWithShadows): Factored out from paint() and changed
2270         to paint all shadows.
2271         (WebCore::InlineTextBox::paint): Moved the text painting code out to
2272         paintTextWithShadows(). Changed to not paint shadows for markers and
2273         composition underlines and in "force black text" mode.
2274         (WebCore::InlineTextBox::paintSelection):
2275         (WebCore::InlineTextBox::paintCompositionBackground):
2276         (WebCore::InlineTextBox::paintDecoration): Changed to paint all shadows.
2277         * rendering/InlineTextBox.h: Changed some public methods to private
2278         or protected.
2279
2280         * rendering/RenderBlock.cpp:
2281         (WebCore::RenderBlock::overflowHeight): Changed to account for all
2282         shadows.
2283         (WebCore::RenderBlock::overflowWidth): Ditto.
2284         (WebCore::RenderBlock::overflowLeft): Ditto.
2285         (WebCore::RenderBlock::overflowTop): Ditto.
2286         (WebCore::RenderBlock::overflowRect): Ditto.
2287         (WebCore::RenderBlock::layoutBlock): Ditto.
2288
2289         * rendering/RenderFlexibleBox.cpp:
2290         (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
2291
2292         * rendering/RenderLayer.cpp:
2293         (WebCore::RenderLayer::calculateRects): Ditto.
2294
2295         * rendering/RenderObject.cpp:
2296         (WebCore::RenderObject::paintBoxShadow): Changed to paint all shadows.
2297         Changed to avoid clipping out the box if it has a fully opaque
2298         background.
2299         (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Changed to account
2300         for all shadows.
2301         (WebCore::RenderObject::selectionForegroundColor): Cleaned up.
2302         (WebCore::RenderObject::adjustRectForOutlineAndShadow): Changed to
2303         account for all shadows.
2304
2305         * rendering/RenderReplaced.cpp:
2306         (WebCore::RenderReplaced::adjustOverflowForBoxShadow): Ditto.
2307
2308         * rendering/RenderStyle.cpp:
2309         (WebCore::RenderStyle::setTextShadow): Changed to prepend when adding
2310         so that the stacking order of shadows when painting will be "first o
2311         top".
2312         (WebCore::RenderStyle::setBoxShadow): Ditto.
2313
2314         * rendering/RenderTable.cpp:
2315         (WebCore::RenderTable::layout): Changed to account for all shadows.
2316
2317 2008-04-28  Adam Roben  <aroben@apple.com>
2318
2319         Fix some more Windows build errors in COMPtr
2320
2321         * platform/win/COMPtr.h:
2322         (WTF::): Define DefaultHash<COMPtr<P> > by using PtrHash<COMPtr<P> >,
2323         which is just a copy of PtrHash<RefPtr<P> >.
2324
2325 2008-04-28  Adam Roben  <aroben@apple.com>
2326
2327         Fix some Windows build errors in COMPtr
2328
2329         * platform/win/COMPtr.h: Explicitly name the WTF namespace when using
2330         HashTableDeletedValueType.
2331
2332 2008-04-28  Adam Roben  <aroben@apple.com>
2333
2334         Fix some Windows build errors in FontPlatfomrData
2335
2336         * platform/graphics/win/FontPlatformData.h: Removed the Deleted
2337         constructor and replaced it with a HashTableDeletedValueType
2338         constructor. Also added isHashTableDeletedValue() and
2339         hashTableDeletedFontValue().
2340
2341 2008-04-28  David Hyatt  <hyatt@apple.com>
2342
2343         https://bugs.webkit.org/show_bug.cgi?id=18780
2344
2345         Canvas can't draw itself into its own buffer.  Make sure the dirtying call comes after the image()
2346         has been accessed.  Technically willDraw should be renamed to didDraw and all calls should be moved
2347         to after draws have occurred (since if the draw op itself wants to reference the image it shouldn't get
2348         a dirty copy either), but I'll take that up with olliej when he wakes up. :)
2349
2350         Reviewed by Dan Bernstein
2351
2352         Added fast/canvas/canvasDrawsIntoSelf.html
2353
2354         * html/CanvasRenderingContext2D.cpp:
2355         (WebCore::CanvasRenderingContext2D::drawImage):
2356
2357 2008-04-28  Alexey Proskuryakov  <ap@webkit.org>
2358
2359         Reviewed by Geoff Garen.
2360
2361         <rdar://problem/5825192> Replace use of Gestalt with BSD sysctl
2362
2363         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2364         (WebCore::MediaPlayerPrivate::isAvailable): There is no need to check QuickTime version post-Tiger,
2365         as it will never be below 7.3 again. This change may make library loading happen earlier in
2366         some cases, hopefully, that's not a big deal.
2367
2368 2008-04-25  Alexey Proskuryakov  <ap@webkit.org>
2369
2370         Reviewed by Darin.
2371
2372         Fix run-webkit-tests --threading
2373         and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661>
2374         Proxy server issue in Sunday's Nightly
2375
2376         Adjusted for JavaScriptCore changes: added a new member to ClassInfo objects, turned
2377         ClassInfo::propHashTable into a function, made getPropertyAttributes() take an ExecState pointer.
2378
2379         * bindings/js/JSAudioConstructor.cpp:
2380         (WebCore::):
2381         * bindings/js/JSDOMWindowBase.cpp:
2382         (WebCore::):
2383         * bindings/js/JSDOMWindowCustom.cpp:
2384         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2385         * bindings/js/JSDOMWindowWrapper.cpp:
2386         (WebCore::):
2387         (WebCore::JSDOMWindowWrapper::getPropertyAttributes):
2388         * bindings/js/JSDOMWindowWrapper.h:
2389         * bindings/js/JSEventTargetBase.h:
2390         (WebCore::JSEventTargetPrototype::classInfo):
2391         * bindings/js/JSHTMLInputElementBase.cpp:
2392         (WebCore::):
2393         * bindings/js/JSHTMLOptionElementConstructor.cpp:
2394         (WebCore::):
2395         * bindings/js/JSHistoryCustom.cpp:
2396         (WebCore::JSHistory::customGetOwnPropertySlot):
2397         * bindings/js/JSImageConstructor.cpp:
2398         (WebCore::):
2399         * bindings/js/JSInspectedObjectWrapper.cpp:
2400         (WebCore::):
2401         * bindings/js/JSInspectorCallbackWrapper.cpp:
2402         (WebCore::):
2403         * bindings/js/JSLocationCustom.cpp:
2404         (WebCore::JSLocation::customGetOwnPropertySlot):
2405         (WebCore::JSLocation::customPut):
2406         * bindings/js/JSNamedNodesCollection.cpp:
2407         (WebCore::):
2408         * bindings/js/JSQuarantinedObjectWrapper.cpp:
2409         (WebCore::):
2410         * bindings/js/JSRGBColor.cpp:
2411         (WebCore::):
2412         * bindings/js/JSStorageCustom.cpp:
2413         (WebCore::JSStorage::customPut):
2414         * bindings/js/JSXMLHttpRequestConstructor.cpp:
2415         (WebCore::):
2416         * bindings/js/JSXSLTProcessor.cpp:
2417         (WebCore::):
2418         * bindings/scripts/CodeGeneratorJS.pm:
2419         * bridge/objc/objc_runtime.mm:
2420         * bridge/runtime_array.cpp:
2421         * bridge/runtime_object.cpp:
2422
2423 2008-04-28  David Hyatt  <hyatt@apple.com>
2424
2425         https://bugs.webkit.org/show_bug.cgi?id=18779
2426
2427         The arguments in drawImage were reversed when I switched away from the image buffer method.
2428
2429         Reviewed by Tim Hatcher
2430
2431         Added fast/canvas/drawImage.html
2432
2433         * html/CanvasRenderingContext2D.cpp:
2434         (WebCore::CanvasRenderingContext2D::drawImage):
2435
2436 2008-04-28  Holger Hans Peter Freyther  <zecke@selfish.org>
2437
2438         Reviewed by Simon.
2439
2440         Fix the crash on http://www.orad.pl. We called end too early.
2441
2442         1. we need a ::write that will pause the parser due a pending
2443         script
2444         2. we need a second write to queue data (tricky part)
2445         3. we need to get a finish call (document loaded)
2446         4. we resume the script and parse, schedule loading of a new script
2447         and have called end
2448         5. we resume the new script and we get a crash
2449
2450         This bug is hard to trigger, e.g. if the web server is only allowing
2451         one connection per client/IP. This is why we need to sleep in the scripts. We
2452         want to make sure that the page is first fully received before serving the
2453         scripts.
2454
2455         Test: http/tests/misc/xmltokenizer-do-not-crash.pl
2456
2457         * dom/XMLTokenizer.cpp:
2458
2459 2008-04-28  Ariya Hidayat  <ahidayat@trolltech.com>
2460
2461         Reviewed by Simon.
2462
2463         Fix rounded corner on combo box with CSS border
2464
2465         * platform/qt/RenderThemeQt.cpp:
2466         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
2467
2468 2008-04-28  Ariya Hidayat  <ahidayat@trolltech.com>
2469
2470         Reviewed by Simon.
2471
2472         Fix CSS border does not show up for combo boxes
2473
2474         Do not clear the border when painting the combo box for 'select' form element
2475
2476         * platform/qt/RenderThemeQt.cpp:
2477
2478 2008-04-28  Olivier Goffart  <ogoffart@trolltech.com>
2479
2480         Reviewed by Simon.
2481
2482         Avoid comparing to 0 in qFuzzyCompare for increased
2483         numeric stability.
2484
2485         * platform/graphics/qt/PathQt.cpp:
2486         (WebCore::Path::addArc):
2487
2488 2008-04-28  Benjamin Meyer  <bmeyer@trolltech.com>
2489
2490         Reviewed by Simon.
2491
2492         Fixes: Pages returning 404 with content are not displayed.
2493
2494         A web page that returns 404 can still have content.
2495
2496         * platform/network/qt/QNetworkReplyHandler.cpp:
2497         (WebCore::QNetworkReplyHandler::finish):
2498
2499 2008-04-28  Paul Olav Tvete  <paul@trolltech.com>
2500
2501         Reviewed by Simon.
2502
2503         Fix compiler warning; Avoid the implicity QString(const char *)
2504         constructor
2505
2506         * platform/qt/RenderThemeQt.cpp:
2507         (WebCore::RenderThemeQt::fallbackStyle):
2508
2509 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
2510
2511         Reviewed by Simon.
2512
2513         Prevent middle-click from triggering open URL from clipboard when the event has already been accepted.
2514
2515         * platform/qt/PlatformScrollBarQt.cpp:
2516         (WebCore::PlatformScrollbar::handleMousePressEvent):
2517
2518 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
2519
2520         Reviewed by Simon.
2521
2522         Fix scrollbar behavior in QtWebKit to match QScrollBar.
2523
2524         Right click context menu is now supported, along with
2525         middle click to center slider thumb over mouse cursor.
2526
2527         * platform/qt/PlatformScrollBar.h:
2528         * platform/qt/PlatformScrollBarQt.cpp:
2529         (tr):
2530         (WebCore::PlatformScrollbar::pixelPosToRangeValue):
2531         (WebCore::PlatformScrollbar::handleMousePressEvent):
2532         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
2533         (WebCore::PlatformScrollbar::handleContextMenuEvent):
2534
2535 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
2536
2537         Reviewed by Simon.
2538
2539         Implemented channel-based logging for QtWebKit.
2540
2541         Comma-separated log channels are read from the QT_WEBKIT_LOG environment variable.
2542         Warnings for notImplemented() is still output by default, but can be disabled
2543         by setting DISABLE_NI_WARNINGS=1.
2544
2545         * WebCore.pro:
2546         * platform/NotImplemented.h:
2547         * platform/qt/LoggingQt.cpp: Added.
2548         (WebCore::getChannelFromName):
2549         (WebCore::InitializeLoggingChannelsIfNecessary):
2550
2551 2008-04-28  Simon Hausmann  <shausman@trolltech.com>
2552
2553         Reviewed by Holger.
2554
2555         Fixes: Popups/Context menu in WebKit appearing at the wrong location when embedded in the graphics view or using multiple screens
2556
2557         Give the popups the right parent widget and the right coordinates relative within the parent.
2558
2559         * platform/qt/PopupMenuQt.cpp:
2560         (WebCore::PopupMenu::show):
2561
2562 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
2563
2564         Reviewed by Simon.
2565
2566         Fixes: Tabbing to a checkbox/button doesn't work on Win/X11
2567
2568         Respect platform settings for tabbing to all controls.
2569
2570         * page/qt/EventHandlerQt.cpp:
2571
2572 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
2573
2574         Reviewed by Simon.
2575
2576         First part of the fix for tabbing to a checkbox/button doesn't work on Win/X11
2577
2578         Draw controls instead of pimitive elements, to get focus rects for free.
2579
2580         * platform/qt/RenderThemeQt.cpp:
2581         (WebCore::RenderThemeQt::paintButton):
2582
2583 2008-04-28  Lincoln Ramsay  <lincoln.ramsay@trolltech.com>
2584
2585         Reviewed by Simon.
2586
2587         Compile when QT_NO_CLIPBOARD is defined.
2588
2589         * platform/qt/ClipboardQt.cpp:
2590         (WebCore::ClipboardQt::ClipboardQt):
2591         (WebCore::ClipboardQt::clearData):
2592         (WebCore::ClipboardQt::clearAllData):
2593         (WebCore::ClipboardQt::setData):
2594         (WebCore::ClipboardQt::declareAndWriteDragImage):
2595         (WebCore::ClipboardQt::writeURL):
2596         (WebCore::ClipboardQt::writeRange):
2597         * platform/qt/PasteboardQt.cpp:
2598         (WebCore::Pasteboard::writeSelection):
2599         (WebCore::Pasteboard::plainText):
2600         (WebCore::Pasteboard::documentFragment):
2601         (WebCore::Pasteboard::writeURL):
2602         (WebCore::Pasteboard::writeImage):
2603
2604 2008-04-28  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2605
2606         Reviewed by Simon.
2607
2608         Draw the arrow button on the styled combo box using the fallback ("Windows") style
2609
2610         * platform/qt/RenderThemeQt.cpp:
2611         (WebCore::RenderThemeQt::RenderThemeQt):
2612         (WebCore::RenderThemeQt::~RenderThemeQt):
2613         (WebCore::RenderThemeQt::fallbackStyle):
2614         (WebCore::RenderThemeQt::paintMenuListButton):
2615         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
2616         * platform/qt/RenderThemeQt.h:
2617
2618 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
2619
2620         Reviewed by Holger.
2621
2622         Fix positioning of native widgets (plugins).
2623
2624         Correctly convert the coordinates of the Widget in Widget::setFrameGeometry()
2625         to be relative to the containing toplevel QWidget using convertToContainingWindow().
2626
2627         Note: convertToContainingWindow() takes child coordinates.
2628
2629         * platform/qt/WidgetQt.cpp:
2630         (WebCore::Widget::frameGeometry):
2631         (WebCore::Widget::setFrameGeometry):
2632
2633 2008-04-28  Holger Hans Peter Freyther  <zecke@selfish.org>
2634
2635         Reviewed by Simon.
2636
2637         plugins: fix scrolling issues
2638
2639         When scrolling you can see artefacts that remain on the screen, they
2640         seem to originate from the backingstore handling. I'm not entirely sure
2641         where they come from, my workarounds involved a
2642         data->m_widget->parentWidget()->update() call in Widget::geometryChanged or
2643         handling widgets with a native QWidget embedded like web pages with a
2644         static background. This needs more investigations, I think the ScrollView
2645         change is cleaner than the brute force in Widget::geometryChanged
2646
2647         Focus handling seems to be broken as well and needs further work, we don't
2648         clip plugin QWidgets and they can draw out of their bounds, e.g. on the ScrollBar,
2649         the z-order is likely not honored as well.
2650
2651         * platform/ScrollView.h:
2652         * platform/qt/ScrollViewQt.cpp:
2653         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
2654         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
2655         (WebCore::ScrollView::addChild):
2656         (WebCore::ScrollView::removeChild):
2657         (WebCore::ScrollView::incrementNativeWidgetCount):
2658         (WebCore::ScrollView::decrementNativeWidgetCount):
2659         (WebCore::ScrollView::hasNativeWidgets):
2660
2661 2008-04-28  Holger Hans Peter Freyther  <zecke@selfish.org>
2662
2663         Reviewed by Simon.
2664
2665         Add manual test to test placement of QWidgets in iframe's
2666
2667         * manual-tests/qt/main.html: Added.
2668         * manual-tests/qt/qtplugin.html: Added.
2669
2670 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
2671
2672         Fix the build with ENABLE_DATABASE=0 (Qt/Windows) by including
2673         SecurityOrigin.h. It's used in the file and also implicitly included
2674         through the database headers.
2675
2676         * page/DOMWindow.cpp:
2677
2678 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
2679
2680         Prospective Wx build fix.
2681
2682         * platform/graphics/wx/FontPlatformData.h:
2683
2684 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
2685
2686         Reviewed by Alp.
2687
2688         Gtk build fix, similar to the changes done in r32609.
2689
2690         * platform/graphics/gtk/FontPlatformData.h:
2691         (WebCore::FontPlatformData::FontPlatformData):
2692         (WebCore::FontPlatformData::isHashTableDeletedValue):
2693         (WebCore::FontPlatformData::hashTableDeletedFontValue):
2694
2695 2008-04-28  Simon Hausmann  <hausmann@webkit.org>
2696
2697         Prospective build fix. After r32609 it seems the workaround here
2698         is not needed anymore. With gcc 4.2/4.3 before 32609 the workaround
2699         is needed for compilation, after 32609 compilation only succeeds
2700         without the workaround.
2701
2702         * plugins/PluginPackage.h: Removed workaround of extra StorageTraits
2703         specification for the custom hash function of PluginPackage used in
2704         PluginSet.
2705
2706 2008-04-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
2707
2708         Reviewed by Simon.
2709
2710         https://bugs.webkit.org/show_bug.cgi?id=18713
2711
2712         Fix scrollbar painting issues in QtWebKit.
2713
2714         Hovering and click-draging outside of the scrollbar would
2715         produce unexpected and inconcistent results. We also didn't
2716         pass on leave-events to the underlying WebKit code, which
2717         was nessecary to implement the paint fix.
2718
2719         * platform/qt/PlatformScrollBarQt.cpp:
2720         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
2721         (WebCore::PlatformScrollbar::handleMouseOutEvent):
2722         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
2723
2724 2008-04-27  Oliver Hunt  <oliver@apple.com>
2725
2726         Reviewed by Maciej.
2727
2728         Bug 17173: HTML5 Canvas API requires us to ignore certain operations
2729         <https://bugs.webkit.org/show_bug.cgi?id=17173>
2730
2731         This fixes the semantics of a number of Canvas functions to match
2732         the new HTML5 non-throwing semantics.
2733
2734         Test: fast/canvas/canvas-path-with-inf-nan-dimensions.html
2735
2736         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2737         (WebCore::JSCanvasRenderingContext2D::strokeRect):
2738         * html/CanvasRenderingContext2D.cpp:
2739         (WebCore::CanvasRenderingContext2D::moveTo):
2740         (WebCore::CanvasRenderingContext2D::lineTo):
2741         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
2742         (WebCore::CanvasRenderingContext2D::bezierCurveTo):
2743         (WebCore::CanvasRenderingContext2D::arcTo):
2744         (WebCore::CanvasRenderingContext2D::arc):
2745         (WebCore::validateRectForCanvas):
2746         (WebCore::CanvasRenderingContext2D::rect):
2747         (WebCore::CanvasRenderingContext2D::clearRect):
2748         (WebCore::CanvasRenderingContext2D::fillRect):
2749         (WebCore::CanvasRenderingContext2D::strokeRect):
2750         * html/CanvasRenderingContext2D.h:
2751         * html/CanvasRenderingContext2D.idl:
2752
2753 2008-04-27  Rob Buis  <buis@kde.org>
2754
2755         Reviewed by Adele.
2756
2757         https://bugs.webkit.org/show_bug.cgi?id=18652
2758         onchange events don't seem to fire for input[type=range] controls.
2759
2760         Fire changeEvent when dragging the slider.
2761
2762         Test: fast/forms/slider-onchange-event.html
2763
2764         * rendering/RenderSlider.cpp:
2765         (WebCore::RenderSlider::valueChanged):
2766
2767 2008-04-25  Darin Adler  <darin@apple.com>
2768
2769         Reviewed by Maciej.
2770
2771         - update for compatibility with HashTable that no longer has optimization to share
2772           implementation between hash tables with integers, pointers, RefPtr, and String
2773           objects as keys
2774
2775         * bindings/js/JSSVGPODTypeWrapper.h:
2776         (WebCore::PODTypeReadWriteHashInfo::PODTypeReadWriteHashInfo): Added constructor
2777         for HashTableDeletedValue.
2778         (WebCore::PODTypeReadWriteHashInfo::isHashTableDeletedValue): Added.
2779         (WebCore::PODTypeReadWriteHashInfoTraits::constructDeletedValue): Added.
2780         (WebCore::PODTypeReadWriteHashInfoTraits::isDeletedValue): Added.
2781
2782         * dom/Document.cpp: Made changedDocuments internal to the file rather than a
2783         static data member of Document.
2784         (WebCore::FormElementKey::ref): Removed unneeded check for deleted value -- this
2785         will never be called on a deleted element.
2786         (WebCore::FormElementKey::deref): Ditto.
2787
2788         * dom/Document.h: Added HashTableDeletedValue constructor and isHashTableDeletedValue
2789         to FormElementKey. Changed FormElementKeyHashTraits to use construct/isDeletedValue.
2790         Got rid of the changedDocuments data member. Changed iconURL to be an inline that
2791         returns a const String&.
2792
2793         * dom/StyledElement.cpp: Changed MappedAttributeKeyTraits to use
2794         construct/isDeletedValue.
2795
2796         * page/mac/AXObjectCacheMac.mm:
2797         (WebCore::AXObjectCache::getAXID): Call isDeletedValue instead of deletedValue.
2798
2799         * platform/SecurityOriginHash.h: Added overload so that SecurityOriginHash can work
2800         with raw pointers as well as RefPt (helpful with the new RefPtrHashMap). Eliminated
2801         SecurityOriginTraits, since we can now use the default traits. Changed the value of
2802         safeToCompareToEmptyOrDeleted to false, since it's not safe to compare a deleted
2803         value using this hash function. I don't think it was safe before either; I'm not sure
2804         why it didn't cause a problem before.
2805
2806         * platform/cf/SchedulePair.h: Removed SchedulePairTraits -- custom traits are no
2807         longer needed.
2808
2809         * platform/graphics/FontCache.cpp:
2810         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Added constructor
2811         for HashTableDeletedValue.
2812         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue): Added.
2813         (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Added.
2814         (WebCore::FontPlatformDataCacheKeyTraits::constructDeletedValue): Added.
2815         (WebCore::FontPlatformDataCacheKeyTraits::isDeletedValue): Added.
2816         (WebCore::FontDataCacheKeyTraits::constructDeletedValue): Added.
2817         (WebCore::FontDataCacheKeyTraits::isDeletedValue): Added.
2818
2819         * platform/graphics/IntSizeHash.h: Changed HashTraits<IntSize> to use
2820         construct/isDeletedValue.
2821
2822         * platform/graphics/mac/FontPlatformData.h:
2823         (WebCore::FontPlatformData::FontPlatformData): Added constructor for
2824         HashTableDeletedValue.
2825         (WebCore::FontPlatformData::isHashTableDeletedValue): Added.
2826         (WebCore::FontPlatformData::hashTableDeletedFontValue): Added.
2827
2828         * platform/text/PlatformString.h:
2829         (WebCore::String::swap): Added. Avoids any refcount churn when swapping two strings.
2830         (WebCore::String::String): Added constructor for HashTableDeletedValue.
2831         (WebCore::String::isHashTableDeletedValue): Added.
2832         (WebCore::swap): Added. Avoids any refcount churn when swapping two strings.
2833
2834         * platform/text/StringHash.h: Changed specialization of HashTraits for
2835         WebCore::String to use the deleted value now defined in that class and removed
2836         the code to do ref/deref. Removed HashKeyStorageTraits specializations.
2837         
2838         * platform/win/COMPtr.h: Changed specialization of HashTraits for
2839         COMPtr to use the deleted value now defined in that class and removed
2840         the code to do ref/deref. Removed HashKeyStorageTraits specializations.
2841         (COMPtr::COMPtr): Added constructor for HashTableDeletedValue.
2842         (COMPtr::isHashTableDeletedValue): Added.
2843         (COMPtr::query): Removed inline keyword not needed since functions defined in the
2844         class definition are automatically marked inline.
2845         (COMPtr::hashTableDeletedValue): Added.
2846
2847         * storage/DatabaseTracker.h: Removed now-unneeded SecurityOriginTraits.
2848         * storage/LocalStorage.h: Ditto.
2849         * storage/OriginQuotaManager.h: Ditto.
2850         * storage/SessionStorage.h: Ditto.
2851
2852         * svg/SVGAnimatedTemplate.h:
2853         (WebCore::SVGAnimatedTypeWrapperKey::SVGAnimatedTypeWrapperKey): Added constructor
2854         for HashTableDeletedValue.
2855         (WebCore::SVGAnimatedTypeWrapperKey::isHashTableDeletedValue): Added.
2856         (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::constructDeletedValue): Added.
2857         (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::isDeletedValue): Added.
2858
2859 2008-04-27  Mark Rowe  <mrowe@apple.com>
2860
2861         Reviewed by Tim Hatcher.
2862
2863         Initialize the extra member of the xmlEntity struct when using libxml2 >= 2.6.27.
2864
2865         * dom/XMLTokenizer.cpp:
2866         (WebCore::):
2867
2868 2008-04-27  Dan Bernstein  <mitz@apple.com>
2869
2870         Reviewed by Darin Adler.
2871
2872         - fix https://bugs.webkit.org/show_bug.cgi?id=3729
2873           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
2874
2875         Test: editing/selection/move-left-right.html
2876
2877         * editing/SelectionController.cpp:
2878         (WebCore::SelectionController::modifyMovingRight): Added. Currently
2879         implemented for character granularity, all other being treated as
2880         "forward".
2881         (WebCore::SelectionController::modifyMovingForward): Renamed
2882         modifyMovingRightForward() to this.
2883         (WebCore::SelectionController::modifyMovingLeft): Added. Currently
2884         implemented for character granularity, all other being treated as
2885         "backward".
2886         (WebCore::SelectionController::modifyMovingBackward): Renamed
2887         modifyMovingLeftBackward() to this.
2888         (WebCore::SelectionController::modify): Changed to call either the
2889         visual (left/right) or logical (backward/forward) methods depending on
2890         the 'dir' argument for moves.
2891         * editing/SelectionController.h:
2892         * editing/VisiblePosition.cpp:
2893         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate): Added.
2894         (WebCore::VisiblePosition::left): Added.
2895         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate): Added.
2896         (WebCore::VisiblePosition::right): Added.
2897         * editing/VisiblePosition.h:
2898
2899 2008-04-27  Sam Weinig  <sam@webkit.org>
2900
2901         Reviewed by Maciej Stachowiak.
2902
2903         Fix for <rdar://problem/5893385> Need to provide access to the CanvasRenderingContext2D prototype
2904         Add a JS constructor for CanvasRenderingContext2D.
2905
2906         * html/CanvasRenderingContext2D.idl:
2907         * page/DOMWindow.idl:
2908
2909 2008-04-26  Adam Barth  <hk9565@gmail.com>
2910
2911         Reviewed by Adam Roben and Sam Weinig.
2912
2913         Fixes bug http://bugs.webkit.org/show_bug.cgi?id=17331
2914         Fixes bug http://bugs.webkit.org/show_bug.cgi?id=16848
2915         
2916         Updates postMessage implementation to match HTML 5 specification:
2917         1) Adds origin parameter to postMessage.
2918         2) Removes domain and uri attributes of MessageEvent in favor of
2919            origin attribute.
2920
2921         In order to do this correctly, we need to distinguish between hosts and domains
2922         in the SecurityOrigin class. There are now three ways to compare security origins:
2923         1) isSameSchemeHostPort compares scheme, host, and port, and is used for postMessage
2924         2) equal compares all aspects of the security origin, and is used for hash keys
2925         3) canAccess understands the semantics of schemes such as file:// and data:// URLs,
2926            and should be used for scripting access checks.
2927
2928         Changed SecurityOrigin::toString() to generate identifiers that are suitable for 
2929         being used as a MessageEvent's origin property. In the future, they could be used 
2930         as database string identifiers as well. Re-used KURL parser to parse serialized 
2931         SecurityOrigins.
2932
2933         Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
2934         
2935         Tests: http/tests/security/postMessage/invalid-origin-throws-exception.html
2936                http/tests/security/postMessage/javascript-page-still-sends-origin.html
2937                http/tests/security/postMessage/origin-unaffected-by-base-tag.html
2938                http/tests/security/postMessage/origin-unaffected-by-document-domain.html
2939                http/tests/security/postMessage/target-origin.html
2940
2941         * WebCore.base.exp:
2942         * bindings/js/JSDOMWindowCustom.cpp:
2943         (WebCore::JSDOMWindow::postMessage):
2944         * dom/Document.cpp:
2945         (WebCore::Document::domain):
2946         * dom/MessageEvent.cpp:
2947         (WebCore::MessageEvent::MessageEvent):
2948         (WebCore::MessageEvent::initMessageEvent):
2949         * dom/MessageEvent.h:
2950         (WebCore::MessageEvent::origin):
2951         * dom/MessageEvent.idl:
2952         * html/CanvasRenderingContext2D.cpp:
2953         (WebCore::CanvasRenderingContext2D::checkOrigin):
2954         (WebCore::CanvasRenderingContext2D::createPattern):
2955         * page/DOMWindow.cpp:
2956         (WebCore::DOMWindow::postMessage):
2957         * page/DOMWindow.h:
2958         * page/DOMWindow.idl:
2959         * platform/SecurityOrigin.cpp:
2960         (WebCore::SecurityOrigin::SecurityOrigin):
2961         (WebCore::SecurityOrigin::create):
2962         (WebCore::SecurityOrigin::createForFrame):
2963         (WebCore::SecurityOrigin::copy):
2964         (WebCore::SecurityOrigin::setDomainFromDOM):
2965         (WebCore::SecurityOrigin::canAccess):
2966         (WebCore::SecurityOrigin::isSecureTransitionTo):
2967         (WebCore::SecurityOrigin::toString):
2968         (WebCore::SecurityOrigin::createFromString):
2969         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
2970         (WebCore::SecurityOrigin::databaseIdentifier):
2971         (WebCore::SecurityOrigin::equal):
2972         (WebCore::SecurityOrigin::isSameSchemeHostPort):
2973         * platform/SecurityOrigin.h:
2974         (WebCore::SecurityOrigin::host):
2975         (WebCore::SecurityOrigin::domain):
2976         * platform/SecurityOriginHash.h:
2977         (WebCore::SecurityOriginTraits::deletedValue):
2978         * storage/DatabaseTracker.cpp:
2979         (WebCore::DatabaseTracker::hasEntryForDatabase):
2980         (WebCore::DatabaseTracker::originPath):
2981         (WebCore::DatabaseTracker::fullPathForDatabase):
2982         (WebCore::DatabaseTracker::populateOrigins):
2983         (WebCore::DatabaseTracker::databaseNamesForOrigin):
2984         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
2985         (WebCore::DatabaseTracker::setDatabaseDetails):
2986         (WebCore::DatabaseTracker::setQuota):
2987         (WebCore::DatabaseTracker::addDatabase):
2988         (WebCore::DatabaseTracker::deleteOrigin):
2989         (WebCore::DatabaseTracker::deleteDatabase):
2990
2991 2008-04-26  Kevin Ollivier  <kevino@theolliviers.com>
2992
2993         wx build fix. Add the AX*ActionVerb functions to the wx build.
2994         
2995         * platform/wx/LocalizedStringsWx.cpp:
2996         (WebCore::AXButtonActionVerb):
2997         (WebCore::AXRadioButtonActionVerb):
2998         (WebCore::AXTextFieldActionVerb):
2999         (WebCore::AXCheckedCheckBoxActionVerb):
3000         (WebCore::AXUncheckedCheckBoxActionVerb):
3001         (WebCore::AXLinkActionVerb):
3002
3003 2008-04-26  Robin Dunn  <robin@alldunn.com>
3004
3005         Reviewed by Kevin Ollivier.
3006
3007         wx build fix. Add needed wx includes for compilation.
3008
3009         https://bugs.webkit.org/show_bug.cgi?id=18758
3010
3011         * platform/wx/FileSystemWx.cpp:
3012
3013 2008-04-26  Anatoli Papirovski  <apapirovski@mac.com>
3014
3015         Reviewed by Dave Hyatt.
3016
3017         Fix for https://bugs.webkit.org/show_bug.cgi?id=18583
3018         WebKit should ignore declarations with a negative value for
3019         line-height and font-size, including in the shorthand font form.
3020
3021         Tests: fast/css/font-size-negative.html
3022                fast/css/line-height-negative.html
3023
3024         * css/CSSParser.cpp:
3025         (WebCore::CSSParser::parseValue):
3026         (WebCore::CSSParser::parseFont):
3027
3028 2008-04-25  Anders Carlsson  <andersca@apple.com>
3029
3030         Reviewed by Sam.
3031
3032         Add empty ApplicationCacheStorage class.
3033         
3034         * WebCore.vcproj/WebCore.vcproj:
3035         * WebCore.xcodeproj/project.pbxproj:
3036         * loader/appcache/ApplicationCacheStorage.cpp: Added.
3037         (WebCore::cacheStorage):
3038         * loader/appcache/ApplicationCacheStorage.h: Added.
3039
3040 2008-04-24  Sam Weinig  <sam@webkit.org>
3041
3042         Reviewed by Geoffrey Garen.
3043
3044         Replace the JSDOMWindow with a new one instead of clearing it.
3045
3046         * bindings/js/JSDOMWindowBase.cpp:
3047         (WebCore::JSDOMWindowBase::clear):
3048         Don't reset the window.
3049
3050         * bindings/js/kjs_proxy.cpp:
3051         (WebCore::KJSProxy::clear):
3052         Replace the current JSDOMWindow stored in the wrapper window
3053         with a new one.
3054
3055         * history/CachedPage.cpp:
3056         (WebCore::CachedPage::CachedPage):
3057         (WebCore::CachedPage::restore):
3058         (WebCore::CachedPage::clear):
3059         * history/CachedPage.h:
3060         Instead of storing the builtins, properties and localstorage in
3061         special holding structs, store the entire JSDOMWindow.
3062
3063         For the case of a page that has no JSDOMWindow before it's first
3064         navigation, has one created while it is in the cache and is then
3065         navigated back, create a new JSDOMWindow to keep the assumption
3066         in JSDOMWindowWrapper that it always has the correct window.
3067
3068         * loader/FrameLoader.cpp:
3069         (WebCore::FrameLoader::clear):
3070         We must clear the DOMWindow first, so that we create a new JSDOMWindow,
3071         it gets a new one.
3072
3073         * page/Frame.cpp:
3074         (WebCore::Frame::clearDOMWindow):
3075         Null out the domWindow so that on the next access, a new one is
3076         created.
3077
3078 2008-04-25  Sam Weinig  <sam@webkit.org>
3079
3080         Reviewed by Mark Rowe.
3081
3082         The EventListeners need to operate and store JSDOMWindows, not JSDOMWrapperWindows.
3083
3084         * bindings/js/JSDOMWindowBase.cpp:
3085         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
3086         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
3087         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
3088         * bindings/js/JSSVGLazyEventListener.cpp:
3089         (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener):
3090         * bindings/js/JSSVGLazyEventListener.h:
3091         * bindings/js/kjs_events.cpp:
3092         (WebCore::JSAbstractEventListener::handleEvent):
3093         (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
3094         (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
3095         (WebCore::JSUnprotectedEventListener::window):
3096         (WebCore::JSUnprotectedEventListener::clearWindow):
3097         (WebCore::JSEventListener::JSEventListener):
3098         (WebCore::JSEventListener::~JSEventListener):
3099         (WebCore::JSEventListener::window):
3100         (WebCore::JSEventListener::clearWindow):
3101         (WebCore::JSLazyEventListener::JSLazyEventListener):
3102         (WebCore::JSLazyEventListener::parseCode):
3103         * bindings/js/kjs_events.h:
3104         * bindings/js/kjs_proxy.cpp:
3105         (WebCore::KJSProxy::createHTMLEventHandler):
3106         (WebCore::KJSProxy::createSVGEventHandler):
3107
3108 2008-04-25  Mark Rowe  <mrowe@apple.com>
3109
3110         Rubber-stamped by Sam Weinig.
3111
3112         Add some content to an empty ICU header file to prevent verification errors.
3113
3114         * icu/unicode/utf_old.h:
3115
3116 2008-04-25  Anders Carlsson  <andersca@apple.com>
3117
3118         Fix tyop.
3119         
3120         * loader/DocumentLoader.cpp:
3121         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
3122
3123 2008-04-25  Anders Carlsson  <andersca@apple.com>
3124
3125         Reviewed by Sam.
3126
3127         Add and honor offlineWebApplicationCacheEnabled setting.
3128         
3129         * WebCore.base.exp:
3130         * loader/DocumentLoader.cpp:
3131         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
3132         * loader/MainResourceLoader.cpp:
3133         (WebCore::MainResourceLoader::load):
3134         * loader/appcache/ApplicationCacheGroup.cpp:
3135         (WebCore::ApplicationCacheGroup::selectCache):
3136         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
3137         * page/Settings.cpp:
3138         (WebCore::Settings::Settings):
3139         (WebCore::Settings::setOfflineWebApplicationCacheEnabled):
3140         * page/Settings.h:
3141         (WebCore::Settings::offlineWebApplicationCacheEnabled):
3142
3143 2008-04-25  Anders Carlsson  <andersca@apple.com>
3144
3145         Reviewed by Adam.
3146
3147         <rdar://problem/5629139>
3148         PluginInfoStoreWin needs to implement pluginNameForMIMEType().
3149         
3150         * plugins/PluginInfoStore.cpp:
3151         (WebCore::PluginInfoStore::pluginNameForMIMEType):
3152
3153 2008-04-25  Tor Arne Vestbø  <tavestbo@trolltech.com>
3154
3155         Reviewed by Simon.
3156
3157         Respect antialiasing hint when drawing focus rects.
3158
3159         * platform/graphics/qt/GraphicsContextQt.cpp:
3160         (WebCore::GraphicsContext::drawFocusRing):
3161
3162 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
3163
3164         Reviewed by Simon.
3165
3166         networking: Use Qt::QueuedConnection in QNetworkReplyHandler
3167
3168         Make sure we leave the networking backend before calling
3169         into WebCore. Otheriwse we might return to the networking
3170         backend when it is already deleted.
3171
3172         * platform/network/qt/QNetworkReplyHandler.cpp:
3173         (WebCore::FormDataIODevice::setParent):
3174         (WebCore::QNetworkReplyHandler::start):
3175
3176 2008-04-25  Tor Arne Vestbø  <tavestbo@trolltech.com>
3177
3178         Reviewed by Simon.
3179
3180         Fix propagation of mouse double click events.
3181
3182         Treat a mouse double click as a regular mouse press with just a different click count.
3183
3184         * platform/qt/PlatformMouseEventQt.cpp:
3185         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3186
3187 2008-04-25  Tor Arne Vestbø  <tavestbo@trolltech.com>
3188
3189         Reviewed by Simon.
3190
3191         Fixes: Fix strange button sizes (push, radio, and check) in QtWebKit.
3192
3193         We now use pixel metrics instead of fixed sizes for the
3194         button margins, or if the style supports layout rects we
3195         use the delta between the content rect and the layout rect.
3196
3197         In adition we compensate for the difference between the size
3198         for content and the actual layout rect (if supported) by
3199         reporting back the layout rect to WebKit for page layout,
3200         and then inflating the rect we actually paint to.
3201
3202         * platform/qt/RenderThemeQt.cpp:
3203         (WebCore::StylePainter::StylePainter):
3204         (WebCore::StylePainter::~StylePainter):
3205         (WebCore::RenderThemeQt::RenderThemeQt):
3206         (WebCore::inflateButtonRect):
3207         (WebCore::RenderThemeQt::adjustRepaintRect):
3208         (WebCore::RenderThemeQt::isControlStyled):
3209         (WebCore::computeSizeBasedOnStyle):
3210         (WebCore::RenderThemeQt::setCheckboxSize):
3211         (WebCore::RenderThemeQt::paintCheckbox):
3212         (WebCore::RenderThemeQt::setRadioSize):
3213         (WebCore::RenderThemeQt::adjustButtonStyle):
3214         (WebCore::RenderThemeQt::setButtonSize):
3215         (WebCore::RenderThemeQt::setButtonPadding):
3216         (WebCore::RenderThemeQt::paintButton):
3217         (WebCore::RenderThemeQt::adjustMenuListStyle):
3218         (WebCore::RenderThemeQt::setPopupPadding):
3219         (WebCore::RenderThemeQt::paintMenuList):
3220         * platform/qt/RenderThemeQt.h:
3221
3222 2008-04-25  Benjamin Meyer  <bmeyer@trolltech.com>
3223
3224         Reviewed by Holger.
3225
3226         Fixes: Valgrind warnings about uninitilized variables used in jumps
3227
3228         * rendering/RenderText.cpp:
3229         (WebCore::RenderText::trimmedPrefWidths):
3230
3231 2008-04-25  Warwick Allison  <warwick@trolltech.com>
3232
3233         Reviewed by Simon.
3234
3235         Added simple getter function to PlatformScrollBar to return the
3236         maximum value. Needed in the WebKit/qt API.
3237
3238         * platform/qt/PlatformScrollBar.h:
3239
3240 2008-04-25  Benjamin Meyer  <bmeyer@trolltech.com>
3241
3242         Reviewed by Holger, Simon.
3243
3244         Implement NoDrop, ZoomIn, and ZoomOut cursors
3245
3246         * Resources/WebKitResources.qrc:
3247         * platform/qt/CursorQt.cpp:
3248         (WebCore::noDropCursor):
3249         (WebCore::notAllowedCursor):
3250         (WebCore::zoomInCursor):
3251         (WebCore::zoomOutCursor):
3252
3253 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
3254
3255         Reviewed by Simon.
3256
3257         Handle the ListboxAppearance as 'TextField' as well. We are mainly interested in the background.
3258
3259         RenderBox will call us to paint the outline/background, it is handled the same as a
3260         TextAreaAppearance in RenderTheme, handle it the same in the RenderThemeQt
3261
3262         * platform/qt/RenderThemeQt.cpp:
3263         (WebCore::RenderThemeQt::paintTextField):
3264
3265 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
3266
3267         Reviewed by Simon.
3268
3269         No reason to exit the application when we can not paint something. Replace the Q_ASSERT
3270         with a runtime check. Return true to indicate that we did not handle the painting
3271         of this element.
3272
3273         * platform/qt/RenderThemeQt.cpp:
3274         (WebCore::RenderThemeQt::paintTextField):
3275
3276 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
3277
3278         Reviewed by Simon.
3279
3280         Correct the comment. We are in painTextField and don't paint a button.
3281
3282         * platform/qt/RenderThemeQt.cpp:
3283         (WebCore::RenderThemeQt::paintTextField):
3284
3285 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
3286
3287         Reviewed by Simon.
3288
3289         Allow ListboxAppearance to take focus as well. Stolen from Tor Arne
3290
3291         * platform/qt/RenderThemeQt.cpp:
3292         (WebCore::RenderThemeQt::supportsFocus):
3293
3294 2008-04-25  Simon Hausmann  <hausmann@webkit.org>
3295
3296         Reviewed by Holger.
3297
3298         Remove debug output.
3299
3300         * platform/network/qt/ResourceHandleQt.cpp:
3301         (WebCore::ResourceHandle::loadResourceSynchronously):
3302
3303 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
3304
3305         Reviewed by Simon.
3306
3307         Change the string for searchableIndexIntroduction() to match the mac
3308         and pass http/tests/misc/isindex-formdata.html
3309
3310         * platform/qt/Localizations.cpp:
3311
3312 2008-04-25  Simon Hausmann  <hausmann@webkit.org>
3313
3314         Reviewed by Holger.
3315
3316         When we encounter a new/unknown HTTP request type report it back to WebCore as loading error.
3317
3318         * platform/network/qt/QNetworkReplyHandler.cpp:
3319         (WebCore::QNetworkReplyHandler::start):
3320
3321 2008-04-25  Benjamin Meyer  <bmeyer@trolltech.com>
3322
3323         Reviewed by Simon.
3324
3325         Fix crash in the networking layer.
3326
3327         Set the m_reply to null right after calling deleteLater().
3328
3329         * platform/network/qt/QNetworkReplyHandler.cpp:
3330         (WebCore::QNetworkReplyHandler::finish):
3331
3332 2008-04-24  Mark Rowe  <mrowe@apple.com>
3333
3334         Rubber-stamped by Oliver Hunt.
3335
3336         * WebCore.base.exp: Remove two symbols from the export list that don't need to be exported.
3337
3338 2008-04-24  Dan Bernstein  <mitz@apple.com>
3339
3340         Reviewed by Dave Hyatt.
3341
3342         - fix https://bugs.webkit.org/show_bug.cgi?id=18722
3343           <rdar://problem/5888360> REGRESSION (3.1 -> TOT): Webkit Nightly Build crashes when visiting i has a hotdog
3344
3345         Test: fast/dynamic/float-remove-above-line.html
3346
3347         * rendering/bidi.cpp:
3348         (WebCore::RenderBlock::layoutInlineChildren): Avoid adding floats that
3349         do not intrude into the line to its floats vector. When such floats go
3350         away, they do not dirty the line (because they do not intersect with it)
3351         and having it keep them in its floats vector is what caused the crash.
3352
3353 2008-04-24  Justin Garcia  <justin.garcia@apple.com>
3354
3355         Reviewed by John Sullivan.
3356         
3357         It is possible, despite our safeguards, for createMarkup to iterate past the end of the Range
3358         that is passed to it.  Added a null check to prevent crashes in this situation (we won't crash but
3359         we will create too much markup), and added an ASSERT to hopefully catch the scenario in a debugger 
3360         and help us understand what's going on.
3361
3362         * editing/markup.cpp:
3363         (WebCore::createMarkup):
3364
3365 2008-04-24  Mark Rowe  <mrowe@apple.com>
3366
3367         Reviewed by Sam Weinig.
3368
3369         Remove code for calculating the glyph cache size.
3370
3371         * WebCore.base.exp: Remove unused symbol.
3372         * platform/graphics/mac/FontCacheMac.mm: Remove code that is unused now that we do not compute the glyph cache size.
3373         * platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
3374         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3375
3376 2008-04-24  Mark Rowe  <mrowe@apple.com>
3377
3378         Reviewed by Sam Weinig.
3379
3380         Add a definition of BUILDING_ON_LEOPARD to complement BUILDING_ON_TIGER.
3381
3382         * WebCorePrefix.h:
3383
3384 2008-04-24  Cameron McCormack  <cam@mcc.id.au>
3385
3386         Reviewed by Maciej Stachowiak.
3387
3388         Ensure that changes to rx="" and ry="" attributes on an SVG <rect>
3389         element cause a relayout.
3390
3391         Test: svg/dom/SVGRectElement/rect-modify-rx.svg
3392
3393         * svg/SVGRectElement.cpp:
3394         (WebCore::SVGRectElement::svgAttributeChanged): Call needsLayout()
3395         when the attribute is rx or ry.
3396         (WebCore::SVGRectElement::hasRelativeValues): Return true when the
3397         attribute is rx or ry, since they also can have relative values.
3398
3399 2008-04-24  Adam Barth  <hk9565@gmail.com>
3400
3401         Reviewed by Sam Weinig.
3402
3403         Update the XMLHttpRequest header black list to match the spec.
3404
3405         * xml/XMLHttpRequest.cpp:
3406         (WebCore::isSafeRequestHeader):
3407
3408 2008-04-22  Feng Qian  <ian.eng.webkit@gmail.com>
3409
3410         Reviewed by Geoff Garen.
3411
3412         Fix https://bugs.webkit.org/show_bug.cgi?id=18677
3413         Bug 18677: Synchronous event dispatch confuses the popup blocker into incorrectly blocking chat popups in gmail.com.
3414
3415         Test: fast/events/nested-window-event.html
3416
3417         * bindings/js/kjs_events.cpp:
3418         (WebCore::JSAbstractEventListener::handleEvent): Save and restore the current event around the event dispatch.
3419
3420 2008-04-24  Brady Eidson  <beidson@apple.com>
3421
3422         Reviewed by Teh Mitzpettel
3423
3424         Make it so PageGroups know what their own name is.
3425
3426         * WebCore.base.exp:
3427
3428         * page/Page.cpp:
3429         (WebCore::Page::setGroupName):
3430         (WebCore::Page::groupName):
3431         * page/Page.h:
3432
3433         * page/PageGroup.cpp: Move the PageGroupMap into the PageGroup class.
3434         (WebCore::PageGroup::PageGroup): Added a c'tor that takes the group name as an argument instead of
3435           the initial Page.
3436         (WebCore::PageGroup::pageGroup): Handles creating and mapping names to groups
3437         * page/PageGroup.h:
3438         (WebCore::PageGroup::name):
3439
3440 2008-04-24  Adele Peterson  <adele@apple.com>
3441
3442         Reviewed by Darin.
3443
3444         Consolidate two versions of pathGetFileName.
3445
3446         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData): Call FileSystem.h version of pathGetFileName and removed the static helper function.
3447         * platform/posix/FileSystemPOSIX.cpp: (WebCore::pathGetFileName): Moved general case from HTMLFormElement version here.
3448           If other platforms relied on that default they should implement this function for their platform specific version of FileSystem.cpp
3449         * platform/win/FileSystemWin.cpp: (WebCore::pathGetFileName): Moved win implementation from HTMLFormElement here.
3450         * platform/wx/FileSystemWx.cpp: (WebCore::pathGetFileName): Moved wx implementation from HTMLFormElement here.
3451
3452 2008-04-24  Anders Carlsson  <andersca@apple.com>
3453
3454         Windows build fix.
3455         
3456         * html/HTMLFormElement.cpp:
3457         (WebCore::pathGetFilename):
3458
3459 2008-04-24  Anders Carlsson  <andersca@apple.com>
3460
3461         Don't crash when the string is empty.
3462         
3463         * html/HTMLMediaElement.cpp:
3464         (WebCore::parseTimeOffset):
3465
3466 2008-04-24  Dan Bernstein  <mitz@apple.com>
3467
3468         Reviewed by Darin Adler.
3469
3470         - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729
3471           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
3472
3473         The three main changes in this patch are:
3474
3475         1) Making all inline boxes know their bidi level, instead of just text
3476            boxes knowing whether their bidi level is odd or even. This is
3477            required for the next change.
3478
3479         2) Replacing RenderObject::inlineBox() with
3480            Position::getInlineBoxAndOffset() in recognition of the fact that the
3481            inline box containing the primary caret for a position in a given
3482            node may belong to a different node's renderer.
3483
3484         3) Changing RenderObject::caretRect() to take an InlineBox parameter,
3485            and changing callers to call VisiblePosition::caretRect(), which
3486            locates the inline box, then calls caretRect() on the renderer for
3487            that box. This, combined with the previous change, ensures that the
3488            primary caret is rendered at the right place for positions that
3489            lie on a directionality boundary.
3490
3491         Test: platform/mac/editing/input/caret-primary-bidi.html
3492
3493         * WebCore.base.exp: Added the VisiblePosition(Node*, int, EAffinity)
3494         constructor and VisiblePosition::caretRect(), and sorted.
3495
3496         * dom/Position.cpp:
3497         (WebCore::nextRenderedEditable): Adjusted for the removal of
3498         RenderObject::inlineBox().
3499         (WebCore::previousRenderedEditable): Ditto.
3500         (WebCore::Position::rendersInDifferentPosition): Ditto.
3501         (WebCore::Position::getInlineBoxAndOffset): Added. Gets the inline box
3502         and the offset within that box at which the primary caret for this
3503         position should render.
3504
3505         * dom/Position.h:
3506
3507         * editing/DeleteSelectionCommand.cpp:
3508         (WebCore::DeleteSelectionCommand::mergeParagraphs): Changed to call
3509         VisiblePosition::caretRect() instead of calling the RenderObject method.
3510
3511         * editing/SelectionController.cpp:
3512         (WebCore::caretY): Ditto.
3513         (WebCore::SelectionController::xPosForVerticalArrowNavigation): Ditto.
3514         (WebCore::SelectionController::layout): Ditto.
3515
3516         * editing/VisiblePosition.cpp:
3517         (WebCore::VisiblePosition::caretRect): Changed to call
3518         getInlineBoxAndOffset() to get the correct inline box and call the
3519         renderer for that box.
3520
3521         * editing/VisiblePosition.h:
3522         (WebCore::VisiblePosition::getInlineBoxAndOffset): Added convenience
3523         methods for getting the inline box and caret offset for a visible
3524         position, accounting for its affinity.
3525
3526         * editing/visible_units.cpp:
3527         (WebCore::rootBoxForLine): Changed to use getInlineBoxAndOffset()
3528         instead of RenderObject::inlineBox().
3529         (WebCore::startPositionForLine):
3530         (WebCore::endPositionForLine):
3531         (WebCore::previousLinePosition): Ditto.
3532         (WebCore::nextLinePosition): Ditto.
3533
3534         * page/AccessibilityObject.cpp:
3535         (WebCore::updateAXLineStartForVisiblePosition): Ditto.
3536
3537         * page/Frame.cpp:
3538         (WebCore::Frame::firstRectForRange): Ditto.
3539
3540         * rendering/InlineBox.cpp:
3541         (WebCore::InlineBox::caretMinOffset): Changed to forward to the
3542         renderer.
3543         (WebCore::InlineBox::caretMaxOffset): Ditto.
3544         * rendering/InlineBox.h: Replaced the m_reversed bit, intended for use
3545         in InlineTextBox only, with six bits of the bidi level of the box,
3546         intended for use in all leaf inline boxes.
3547         (WebCore::InlineBox::InlineBox): Added missing initializer for
3548         m_dirOverride and initialized the bidi level.
3549         (WebCore::InlineBox::bidiLevel): Added this accessor.
3550         (WebCore::InlineBox::setBidiLevel): Ditto.
3551         (WebCore::InlineBox::direction): Ditto.
3552         (WebCore::InlineBox::caretLeftmostOffset): Added this convenience
3553         method.
3554         (WebCore::InlineBox::caretRightmostOffset): Ditto.
3555
3556         * rendering/InlineTextBox.cpp: Replaced all references to m_reversed
3557         with checking of direction().
3558         (WebCore::InlineTextBox::selectionRect):
3559         (WebCore::InlineTextBox::placeEllipsisBox):
3560         (WebCore::InlineTextBox::paint):
3561         (WebCore::InlineTextBox::paintSelection):
3562         (WebCore::InlineTextBox::paintCompositionBackground):
3563         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
3564         (WebCore::InlineTextBox::paintTextMatchMarker):
3565         (WebCore::InlineTextBox::textPos):
3566         (WebCore::InlineTextBox::offsetForPosition):
3567         (WebCore::InlineTextBox::positionForOffset):
3568
3569         * rendering/RenderBR.cpp: Removed inlineBox().
3570         * rendering/RenderBR.h: Ditto.
3571
3572         * rendering/RenderBox.cpp:
3573         (WebCore::RenderBox::caretRect): Changed to take an inline box and
3574         account for the direction of the box (or the renderer) in positioning
3575         the caret: in right-to-left boxes, the "before" position is to the right
3576         while "after" is to the left.
3577         * rendering/RenderBox.h:
3578
3579         * rendering/RenderFlow.cpp:
3580         (WebCore::RenderFlow::caretRect): Updated the signature.
3581         * rendering/RenderFlow.h:
3582
3583         * rendering/RenderObject.cpp:
3584         (WebCore::RenderObject::caretRect): Updated the signature.
3585         (WebCore::RenderObject::caretMaxOffset): Changed to return the child
3586         node count (or 1 if there are no children) for replaced elements, such
3587         as <select>s.
3588         * rendering/RenderObject.h:
3589
3590         * rendering/RenderReplaced.cpp: Removed caretMinOffset() and
3591         caretMaxOffset() because the base class implementation does the right
3592         thing for replaced objects now.
3593         * rendering/RenderReplaced.h:
3594
3595         * rendering/RenderSVGInlineText.cpp:
3596         (WebCore::RenderSVGInlineText::caretRect): Updated the signature.
3597         (WebCore::RenderSVGInlineText::positionForCoordinates): Updated for
3598         the change from m_reversed to direction().
3599         * rendering/RenderSVGInlineText.h:
3600
3601         * rendering/RenderText.cpp:
3602         (WebCore::RenderText::caretRect): Changed to take an inline box and
3603         removed the code that used to find the inline for the given position.
3604         Changed use of m_reversed to use direction().
3605         (WebCore::RenderText::position): Changed use of m_reversed to use
3606         direction().
3607         * rendering/RenderText.h:
3608
3609         * rendering/RenderTextControl.cpp:
3610         (WebCore::RenderTextControl::textWithHardLineBreaks): Adjusted for the