Reviewed by Tim Hatcher.
[WebKit-https.git] / WebCore / ChangeLog
1 2007-06-24  Matt Lilek  <pewtermoose@gmail.com>
2
3         Reviewed by Tim Hatcher.
4
5         Bug 14265: Cannot resize columns in webinspector
6         http://bugs.webkit.org/show_bug.cgi?id=14265
7
8         * page/inspector/inspector.css:
9         * page/inspector/inspector.html:
10         * page/inspector/inspector.js:
11
12 2007-06-23  Adam Roben  <aroben@apple.com>
13
14         Silence a build warning about not finding `num-cpus`
15
16         Reviewed by Mark Rowe.
17
18         * WebCore.vcproj/build-generated-files.sh: Look for num-cpus in its new
19         location.
20
21 2007-06-22  Anders Carlsson  <andersca@apple.com>
22
23         Reviewed by Darin.
24
25         * plugins/win/PluginStreamWin.cpp:
26         (WebCore::PluginStreamWin::didFinishLoading):
27         No need to fetch the size from resourceData.
28
29 2007-06-22  Anders Carlsson  <andersca@apple.com>
30
31         Reviewed by Darin.
32
33         <rdar://problem/5288617>
34         Crash playing a very large QuickTime movie inside Safari.
35
36         Get rid of m_completeDeliveryData and use the loader's resource data instead. This reduces the memory usage for 
37         plug-ins which loads large files and use a transfer mode of NP_ASFILE or NP_ASFILEONLY.
38         
39         * plugins/win/PluginStreamWin.cpp:
40         (WebCore::PluginStreamWin::PluginStreamWin):
41         (WebCore::PluginStreamWin::~PluginStreamWin):
42         (WebCore::PluginStreamWin::didReceiveData):
43         (WebCore::PluginStreamWin::didFinishLoading):
44         * plugins/win/PluginStreamWin.h:
45
46 2007-06-22  Beth Dakin  <bdakin@apple.com>
47
48         Reviewed by Oliver and Darin.
49
50         Fix for <rdar://problem/5266999> Loading page from MangleMe fuzz 
51         tester crashes in RenderTableRow::addChild (giant ROWSPAN)
52
53         We already have code that tries to prevent allocating too-large 
54         rowspans. The rowspan in this test, however, was small enough that 
55         we thought it was okay in that code, even though clearly it was 
56         still too large. I did a bunch of testing in Firefox, and it seems 
57         that they set a hard limit on the maximum rowspan right in the DOM 
58         -- 8k. So that is what this patch implements. 
59
60         * html/HTMLTableCellElement.cpp:
61         (WebCore::HTMLTableCellElement::parseMappedAttribute):
62
63 2007-06-22  Justin Garcia  <justin.garcia@apple.com>
64
65         Reviewed by Darin.
66         
67         <rdar://problem/5272440> Adding To Do via Note received in e-mail adds newlines on delete
68         
69         Deletion inserts a placeholder after it removes full paragraphs if
70         one doesn't already exist.  The code that looked for a pre-existing
71         placeholder didn't work because of a bug in enclosingNodeOfType.
72
73         * editing/htmlediting.cpp:
74         (WebCore::enclosingNodeOfType): We start looking at node->parentNode(),
75         but don't go above an editing root.
76
77 2007-06-22  Anders Carlsson  <andersca@apple.com>
78
79         Reviewed by Maciej and Geoff.
80
81         <rdar://problem/5244734>
82         WebKit shouldn't send delegate resource load methods for the user stylesheet (doing so causes assertions in Safari)
83         
84         Add a sendResourceLoadCallbacks argument to the ResourceLoader and only send resource load callbacks if it's true. Make it so that
85         loading the user style sheet creates a resource loader with sendResourceLoadCallbacks set to false (done by adding a sendResourceLoadCallbacks 
86         argument to a bunch of classes).
87         
88         * loader/Cache.cpp:
89         (WebCore::createResource):
90         (WebCore::Cache::requestResource):
91         * loader/Cache.h:
92         * loader/CachedCSSStyleSheet.cpp:
93         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
94         * loader/CachedCSSStyleSheet.h:
95         * loader/CachedResource.cpp:
96         (WebCore::CachedResource::CachedResource):
97         * loader/CachedResource.h:
98         (WebCore::CachedResource::sendResourceLoadCallbacks):
99         * loader/DocLoader.cpp:
100         (WebCore::DocLoader::requestCSSStyleSheet):
101         (WebCore::DocLoader::requestResource):
102         (WebCore::DocLoader::checkCacheObjectStatus):
103         * loader/DocLoader.h:
104         * loader/MainResourceLoader.cpp:
105         (WebCore::MainResourceLoader::MainResourceLoader):
106         * loader/Request.cpp:
107         (WebCore::Request::Request):
108         * loader/Request.h:
109         (WebCore::Request::sendResourceLoadCallbacks):
110         * loader/ResourceLoader.cpp:
111         (WebCore::ResourceLoader::ResourceLoader):
112         (WebCore::ResourceLoader::willSendRequest):
113         (WebCore::ResourceLoader::didReceiveResponse):
114         (WebCore::ResourceLoader::didReceiveData):
115         (WebCore::ResourceLoader::didFinishLoadingOnePart):
116         (WebCore::ResourceLoader::didFail):
117         (WebCore::ResourceLoader::didCancel):
118         * loader/ResourceLoader.h:
119         (WebCore::ResourceLoader::sendResourceLoadCallbacks):
120         * loader/SubresourceLoader.cpp:
121         (WebCore::SubresourceLoader::SubresourceLoader):
122         (WebCore::SubresourceLoader::create):
123         * loader/SubresourceLoader.h:
124         * loader/loader.cpp:
125         (WebCore::Loader::load):
126         (WebCore::Loader::servePendingRequests):
127         * loader/loader.h:
128         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
129         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
130
131 2007-06-21  Richard Connamacher  <rich@indieimage.com>
132
133         Reviewed by Tim Hatcher.
134
135         Bug 14305: Web Inspector marks local files with server-side compression tip
136         http://bugs.webkit.org/show_bug.cgi?id=14305
137
138         * page/inspector/Resource.js:
139         (WebInspector.Resource._shouldCompress): Prevent server-side compression tip
140         from being given to local files
141
142 2007-06-21  Mark Rowe  <mrowe@apple.com>
143
144         Reviewed by Darin.
145
146         Fix for <rdar://problem/5266928> REGRESSION: crash/assert failure beneath RenderFrameSet::layOutAxis when loading
147
148         * platform/StringImpl.cpp:
149         (WebCore::StringImpl::toLengthArray): Simplify whitespace before checking for an empty string.  This avoids returning
150         a length of zero when the string is collapsed to empty by whitespace simplification.
151
152 2007-06-21  Dave Hyatt  <hyatt@apple.com>
153
154         Fix for <rdar://problem/5286978>, large font sizes crash Windows.
155         
156         Limit the maximum font size to 1,000,000 to avoid crashes and issues with platforms that
157         start failing to do anything useful if the font size is too big.
158         
159         Reviewed by olliej
160
161         * css/cssstyleselector.cpp:
162         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
163         
164 2007-06-21  Andrew Wellington  <proton@wiretapped.net>
165
166         Reviewed by Timothy.
167
168         Stop shift+scroll wheel performing a horizontal scroll in Web Inspector
169
170         * page/inspector/inspector.css: Set body margin to 0
171
172 2007-06-21  Adam Treat  <adam@staikos.net>
173
174         Reviewed by George Staikos.
175
176         Implement the default resources on Qt.
177
178         * platform/graphics/BitmapImage.h:
179         * platform/graphics/Image.h:
180         * platform/graphics/qt/ImageQt.cpp:
181         (WebCore::Image::loadPlatformResource):
182         (WebCore::BitmapImage::BitmapImage):
183         (WebCore::BitmapImage::initPlatformData):
184         (WebCore::BitmapImage::invalidatePlatformData):
185         (WebCore::BitmapImage::getPixmap):
186         * platform/qt/TemporaryLinkStubs.cpp:
187
188 2007-06-21  Oliver Hunt  <oliver@apple.com>
189
190         Reviewed by Darin.
191
192         Use RetainPtr for holding currentEvent.  This removes explicit HardRetain/Release calls
193         and makes reference handling simpler in advance of IME refactoring.
194
195         * WebCore.xcodeproj/project.pbxproj:
196         * page/mac/EventHandlerMac.mm:
197         (WebCore::currentEvent):
198         (WebCore::EventHandler::currentNSEvent):
199         (WebCore::EventHandler::wheelEvent):
200         (WebCore::EventHandler::keyEvent):
201         (WebCore::lastEventIsMouseUp):
202         (WebCore::EventHandler::passMouseDownEventToWidget):
203         (WebCore::EventHandler::eventLoopHandleMouseDragged):
204         (WebCore::EventHandler::eventLoopHandleMouseUp):
205         (WebCore::EventHandler::passSubframeEventToSubframe):
206         (WebCore::EventHandler::passWheelEventToWidget):
207         (WebCore::EventHandler::mouseDown):
208         (WebCore::EventHandler::mouseDragged):
209         (WebCore::EventHandler::mouseUp):
210         (WebCore::EventHandler::mouseMoved):
211
212 2007-06-21  George Staikos  <staikos@kde.org>
213
214         Reviewed by George & Marius.
215
216         Patch by me, revision by Marius, minor rev by me.  Adds rendered
217         and stylable scrollbars.
218
219         * page/qt/EventHandlerQt.cpp:
220         (WebCore::EventHandler::passMousePressEventToScrollbar):
221         * platform/Widget.h:
222         * platform/qt/PlatformScrollBar.h:
223         (WebCore::PlatformScrollbar::isWidget):
224         * platform/qt/PlatformScrollBarQt.cpp:
225         (WebCore::PlatformScrollbar::PlatformScrollbar):
226         (WebCore::PlatformScrollbar::~PlatformScrollbar):
227         (WebCore::PlatformScrollbar::updateThumbPosition):
228         (WebCore::PlatformScrollbar::updateThumbProportion):
229         (WebCore::PlatformScrollbar::width):
230         (WebCore::PlatformScrollbar::height):
231         (WebCore::PlatformScrollbar::setRect):
232         (WebCore::PlatformScrollbar::isEnabled):
233         (WebCore::PlatformScrollbar::setEnabled):
234         (WebCore::PlatformScrollbar::paint):
235         (WebCore::PlatformScrollbar::thumbPosition):
236         (WebCore::PlatformScrollbar::thumbLength):
237         (WebCore::PlatformScrollbar::trackLength):
238         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
239         (WebCore::PlatformScrollbar::handleMouseOutEvent):
240         (WebCore::PlatformScrollbar::handleMousePressEvent):
241         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
242         (WebCore::PlatformScrollbar::startTimerIfNeeded):
243         (WebCore::PlatformScrollbar::stopTimerIfNeeded):
244         (WebCore::PlatformScrollbar::autoscrollPressedPart):
245         (WebCore::PlatformScrollbar::autoscrollTimerFired):
246         (WebCore::PlatformScrollbar::pressedPartScrollDirection):
247         (WebCore::PlatformScrollbar::pressedPartScrollGranularity):
248         (WebCore::PlatformScrollbar::thumbUnderMouse):
249         (WebCore::PlatformScrollbar::horizontalScrollbarHeight):
250         (WebCore::PlatformScrollbar::verticalScrollbarWidth):
251         (WebCore::PlatformScrollbar::windowClipRect):
252         * platform/qt/ScrollViewQt.cpp:
253         (WebCore::ScrollView::addChild):
254         (WebCore::ScrollView::removeChild):
255         * platform/qt/WidgetQt.cpp:
256         (WebCore::WidgetPrivate::WidgetPrivate):
257         (WebCore::Widget::setQWidget):
258         (WebCore::Widget::invalidate):
259         (WebCore::Widget::invalidateRect):
260         (WebCore::Widget::setParent):
261         (WebCore::Widget::parent):
262
263 2007-06-21  Geoffrey Garen  <ggaren@apple.com>
264
265         Reviewed by Dave Hyatt.
266         
267         Fixed <rdar://problem/4977124> | http://bugs.webkit.org/show_bug.cgi?id=12646
268         REGRESSION: RapidWeaver's "Hello" HTML page doesn't display any DHTML 
269         effects when clicking on its links (12646)
270         
271         I'm rolling our r7703 for these reasons:
272
273         1. It broke RapidWeaver.
274         
275         2. WebKit is now orders of magnitude faster when handling deep nesting
276         (5 seconds vs 3 minutes on my MBP in this particular case).
277
278         3. Firefox, IE, and HTML5 all allow nested heading tags.
279         
280         4. Hyatt said so.
281
282         * html/HTMLParser.cpp:
283         (WebCore::HTMLParser::parseToken):
284
285 2007-06-21  Sam Weinig  <sam@webkit.org>
286
287         Reviewed by Tim Hatcher.
288
289         http://bugs.webkit.org/show_bug.cgi?id=14260
290         ASSERTION FAILED: m_mainResource->loader == loader going back in history on any page
291
292         Remove assert for now as it is causing the back button to not
293         work in debug builds.
294
295         * page/InspectorController.cpp:
296         (WebCore::InspectorController::didCommitLoad):
297
298 2007-06-21  Lars Knoll <lars@trolltech.com>
299
300         Remove some debug output.
301
302         * platform/qt/FontQt.cpp:
303         (WebCore::generateComponents):
304         (WebCore::Font::width):
305
306 2007-06-21  George Staikos  <staikos@kde.org>
307
308         Repair Qt/Mac OS X build.
309
310         * WebCore.pro:
311
312 2007-06-21  Alexey Proskuryakov  <ap@webkit.org>
313
314         Reviewed by Anders.
315
316         http://bugs.webkit.org/show_bug.cgi?id=13905
317         REGRESSION: A Chinese dictionary widget has a problem with XMLHttpRequest response encoding
318
319         Tiger WebKit accidentally looked at HTML Http-Equiv META to determine the response encoding
320         (regardless of the actual response MIME type). This was corrected a while ago to match other 
321         browsers and the draft XHR spec.
322
323         Now restoring this functionality for "text/html", with spec editor's blessing.
324
325         * xml/xmlhttprequest.cpp:
326         (WebCore::XMLHttpRequest::responseMIMEType):
327         (WebCore::XMLHttpRequest::responseIsXML):
328         (WebCore::XMLHttpRequest::didReceiveData):
329         * xml/xmlhttprequest.h:
330
331 2007-06-21  Andrew Wellington  <proton@wiretapped.net>
332
333         Mac build fix.
334
335         * platform/Font.h:
336
337 2007-06-21  Lars Knoll  <lars@trolltech.com>
338
339         Reviewed by Simon.
340
341         another small fix for letter spacing
342
343         * platform/qt/FontQt.cpp:
344         (WebCore::generateComponents):
345
346 2007-06-21  Lars Knoll  <lars@trolltech.com>
347
348         Reviewed by Simon.
349
350         fix word-spacing
351
352         * platform/qt/FontQt.cpp:
353         (WebCore::generateComponents):
354         (WebCore::Font::width):
355
356 2007-06-21  Lars Knoll  <lars@trolltech.com>
357
358         Reviewed by Simon.
359
360         fix letterspacing and small caps.
361
362         * platform/Font.h:
363         * platform/graphics/qt/GraphicsContextQt.cpp:
364         (WebCore::GraphicsContext::setPlatformFont):
365         * platform/qt/FileChooserQt.cpp:
366         * platform/qt/FontQt.cpp:
367         (WebCore::TextRunComponent::TextRunComponent):
368         (WebCore::Font::Font):
369         (WebCore::Font::operator=):
370         (WebCore::Font::update):
371         (WebCore::generateComponents):
372         (WebCore::Font::selectionRectForText):
373         * platform/qt/RenderThemeQt.cpp:
374
375 2007-06-21  Lars Knoll  <lars@trolltech.com>
376
377         Reviewed by Simon.
378
379         store the metrics and space width in the Font object
380
381         * platform/Font.h:
382         * platform/qt/FontQt.cpp:
383         (WebCore::Font::Font):
384         (WebCore::Font::drawText):
385         (WebCore::Font::width):
386         (WebCore::Font::isFixedPitch):
387         (WebCore::Font::ascent):
388         (WebCore::Font::descent):
389         (WebCore::Font::lineSpacing):
390
391 2007-06-21  Lars Knoll  <lars@trolltech.com>
392
393         Reviewed by Simon.
394
395         simplify some codepaths
396
397         * platform/qt/FontQt.cpp:
398         (WebCore::Font::drawText):
399         (WebCore::Font::width):
400
401 2007-06-21  Lars Knoll  <lars@trolltech.com>
402
403         Reviewed by Simon.
404
405         fix copyright header
406
407         * platform/qt/FontQt.cpp:
408
409 2007-06-21  Lars Knoll  <lars@trolltech.com>
410
411         Reviewed by Simon.
412
413         correctly load fonts when a list of font families is given
414
415         * platform/qt/FontQt.cpp:
416         (WebCore::Font::Font):
417
418 2007-06-21  Lars Knoll  <lars@trolltech.com>
419
420         Reviewed by Simon.
421
422         fix some more of the font support
423
424         * platform/qt/FontQt.cpp:
425         (WebCore::Font::drawText):
426         (WebCore::Font::width):
427
428 2007-06-21  Lars Knoll  <lars@trolltech.com>
429
430         Reviewed by Simon.
431
432         Compile fixes
433
434         * platform/Font.h:
435         (WebCore::Font::isRoundingHackCharacter):
436         * platform/qt/FontQt.cpp:
437         (WebCore::Font::drawText):
438
439 2007-06-21  Lars Knoll  <lars@trolltech.com>
440
441         Reviewed by Simon.
442
443         Some more work on the implementation of FontQt.
444
445         * platform/qt/FontQt.cpp:
446         (WebCore::Font::Font):
447         (WebCore::Font::~Font):
448         (WebCore::Font::operator=):
449
450 2007-06-21  Lars Knoll  <lars@trolltech.com>
451
452         Reviewed by Simon.
453
454         Started work on the new font infrastructure for the Qt port.
455
456         * WebCore.pro:
457         * editing/Editor.cpp:
458         (WebCore::Editor::fontForSelection):
459         * platform/Font.h:
460         (WebCore::Font::treatAsSpace):
461         (WebCore::Font::treatAsZeroWidthSpace):
462         (WebCore::Font::isRoundingHackCharacter):
463         * platform/qt/FontQt.cpp:
464         (WebCore::Font::operator QFont):
465         * platform/qt/TemporaryLinkStubs.cpp:
466
467 2007-06-21  Adam Roben  <aroben@apple.com>
468
469         More Gdk build fixes.
470
471         * page/gdk/ContextMenuClientGdk.cpp:
472         (WebCore::ContextMenuClientGdk::shouldIncludeInspectElementItem):
473         * page/gdk/ContextMenuClientGdk.h:
474         * platform/gdk/TemporaryLinkStubs.cpp:
475
476 2007-06-21  Adam Roben  <aroben@apple.com>
477
478         Speculative Gdk build fix.
479
480         * page/InspectorController.h: Only include the JS headers we really
481         need to avoid pulling in ones like JSStringRefCF.h.
482
483 2007-06-20  Adam Roben  <aroben@apple.com>
484
485         Speculative Gdk build fix.
486
487         * WebCore.pro: Don't try to build WebKitQt/Plugins on Gdk.
488
489 2007-06-20  Adam Roben  <aroben@apple.com>
490
491         Windows build fix.
492
493         * WebCore.vcproj/WebCore.vcproj: Include ForwardingHeaders after
494         everything but $WebKitLibrariesDir so that we will pick up
495         JavaScriptCore headers directly.
496
497 2007-06-15  George Staikos  <staikos@kde.org>
498
499         Add missing symbol.
500
501         * platform/qt/TemporaryLinkStubs.cpp:
502         (WebCore::contextMenuItemTagInspectElement):
503
504 2007-06-20  Steve Falkenburg  <sfalken@apple.com>
505
506         Reviewed by Maciej, Anders.
507         
508         <rdar://problem/5283789> Crash after dismissing JavaScript alert at end of test on http://lcamtuf.coredump.cx/ierace/
509
510         Keep a reference to the Page (via the main frame) for the
511         load deferred pages.
512         
513         Reference is held via the frame since Page isn't refcounted.
514
515         * page/Chrome.cpp:
516         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
517         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
518
519 2007-06-15  Adam Treat <adam@staikos.net>
520
521         Reviewed by George Staikos.
522
523         Add ICO support to the Qt build.
524
525         * WebCore.pro:
526         * platform/graphics/qt/ImageDecoderQt.cpp:
527         (Q_IMPORT_PLUGIN):
528
529 2007-06-15  George Staikos  <staikos@kde.org>
530
531         Fixing Qt build.
532
533         * ForwardingHeaders/JavaScriptCore/APICast.h: Added.
534         * WebCore.pro:
535         * page/InspectorController.h:
536
537 2007-06-20  Adam Roben  <aroben@apple.com>
538
539         More speculative Qt/Gdk build fixes.
540
541         * WebCore.pro: Add new files.
542
543 2007-06-20  Adam Roben  <aroben@apple.com>
544
545         Speculative Qt/Gdk build fix.
546
547         Added forwarding headers for JavaScriptCore. We may eventually move
548         InspectorController off of the JSC API, but for now this is the
549         quickest way to a working build.
550
551         * ForwardingHeaders/JavaScriptCore/JSBase.h: Added.
552         * ForwardingHeaders/JavaScriptCore/JSContextRef.h: Added.
553         * ForwardingHeaders/JavaScriptCore/JSObjectRef.h: Added.
554         * ForwardingHeaders/JavaScriptCore/JSStringRef.h: Added.
555         * ForwardingHeaders/JavaScriptCore/JSStringRefCF.h: Added.
556         * ForwardingHeaders/JavaScriptCore/JSValueRef.h: Added.
557         * ForwardingHeaders/JavaScriptCore/JavaScriptCore.h: Added.
558
559 2007-06-20  Sam Weinig  <sam@webkit.org>
560
561         Rubber stamped by Adam Roben.
562
563         Add licenses.
564
565         * page/inspector/ConsolePanel.js:
566         * page/inspector/NetworkPanel.js:
567         * page/inspector/Resource.js:
568         * page/inspector/ResourceCategory.js:
569         * page/inspector/ResourcePanel.js:
570
571 2007-06-20  Mark Rowe  <mrowe@apple.com>
572
573         Reviewed by Adam.
574
575         * WebCore.exp: Export InspectorController::inspect so WebKit can see it.
576
577 2007-06-20  Geoffrey Garen  <ggaren@apple.com>
578
579         Reviewed by Adele Peterson, Oliver Hunt, Anders Carlsson.
580
581         Fixed <rdar://problem/5222911> Leopard9A446 : VitalSource Bookshelf 4.5: 
582         Crashes when you click on sign in (stringByEvaluatingJavaScriptFromString 
583         returning nil instead of "")
584
585         I'm basically rolling out the change for <rdar://problem/4782422> because
586         my testing shows that it was backwards.
587         
588         * html/HTMLElement.cpp:
589         (dumpInnerHTML): New debug-only function to work around gdb being 
590         perpetually suck-tastic.
591
592         * page/mac/WebCoreFrameBridge.mm:
593         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
594         
595         Return "", not nil. This function never used to return nil, so let's not
596         start now. I've filed <rdar://problem/5283271> to cover the documentation bug,
597
598 2007-06-20  Adam Roben  <aroben@apple.com>
599
600         Addressed some of Geoff's comments.
601
602         * page/ContextMenuController.cpp:
603         (WebCore::ContextMenuController::handleContextMenuEvent): Added a
604         FIXME.
605         * platform/ContextMenu.cpp:
606         (WebCore::ContextMenu::addInspectElementItem): Null-check
607         frame->page().
608
609 2007-06-20  Adam Roben  <aroben@apple.com>
610
611         Fix crash in fast/dom/dir-no-body.html
612
613         Reviewed by Mark.
614
615         * html/HTMLDocument.cpp:
616         (WebCore::HTMLDocument::createTokenizer): Don't assume we have a
617         Frame, since we won't if someone creates an HTMLDocument from JS.
618
619 2007-06-20  Adam Roben  <aroben@apple.com>
620
621         Land the new Inspector.
622
623         Co-written with Tim Hatcher.
624
625         Reviewed by Anders, Adele, Hyatt, and Sam.
626
627         No regression tests possible.
628
629         Add a new InspectorController that is in charge of the Inspector. It
630         has an InspectorClient that controls the Inspector's window and node
631         highlight.
632
633         * page/InspectorClient.h: Added.
634         (WebCore::InspectorClient::~InspectorClient):
635         * page/InspectorController.cpp: Added.
636         (WebCore::ConsoleMessage::ConsoleMessage):
637         (WebCore::InspectorResource::): Represents a single resource that the
638         Inspector knows about.
639         (WebCore::InspectorResource::InspectorResource):
640         (WebCore::InspectorResource::~InspectorResource):
641         (WebCore::InspectorResource::type):
642         (WebCore::InspectorResource::setScriptObject):
643         (WebCore::addSourceToFrame): Callback available from JS.
644         (WebCore::getResourceDocumentNode): Ditto.
645         (WebCore::highlightDOMNode): Ditto.
646         (WebCore::hideDOMNodeHighlight): Ditto.
647         (WebCore::loaded): Ditto.
648         (WebCore::unloading): Ditto.
649         (WebCore::attach): Ditto.
650         (WebCore::detach): Ditto.
651         (WebCore::log): Ditto.
652         (WebCore::search): Ditto.
653         (WebCore::inspectedWindow): Ditto.
654         (WebCore::InspectorController::InspectorController):
655         (WebCore::InspectorController::~InspectorController):
656         (WebCore::InspectorController::inspect): Called by
657         ContextMenuController to inspect a node.
658         (WebCore::InspectorController::focusNode):
659         (WebCore::InspectorController::highlight):
660         (WebCore::InspectorController::hideHighlight):
661         (WebCore::InspectorController::windowVisible):
662         (WebCore::InspectorController::setWindowVisible):
663         (WebCore::InspectorController::addMessageToConsole):
664         (WebCore::InspectorController::attachWindow):
665         (WebCore::InspectorController::detachWindow):
666         (WebCore::InspectorController::windowScriptObjectAvailable):
667         (WebCore::InspectorController::scriptObjectReady):
668         (WebCore::InspectorController::windowUnloading):
669         (WebCore::addHeaders): Static helper function.
670         (WebCore::objectForRequest): Ditto.
671         (WebCore::objectForResponse): Ditto.
672         (WebCore::InspectorController::addScriptResource):
673         (WebCore::InspectorController::addAndUpdateScriptResource):
674         (WebCore::InspectorController::removeScriptResource):
675         (WebCore::InspectorController::updateScriptResource):
676         (WebCore::InspectorController::populateScriptResources):
677         (WebCore::InspectorController::addScriptConsoleMessage):
678         (WebCore::callClearFunction): Static helper function.
679         (WebCore::InspectorController::clearScriptResources):
680         (WebCore::InspectorController::clearScriptConsoleMessages):
681         (WebCore::InspectorController::clearNetworkTimeline):
682         (WebCore::InspectorController::pruneResources):
683         (WebCore::InspectorController::didCommitLoad): Callback from
684         FrameLoader.
685         (WebCore::InspectorController::frameDetachedFromParent): Ditto.
686         (WebCore::InspectorController::addResource): Ditto.
687         (WebCore::InspectorController::removeResource): Ditto.
688         (WebCore::InspectorController::didLoadResourceFromMemoryCache): Ditto.
689         (WebCore::InspectorController::identifierForInitialRequest): Ditto.
690         (WebCore::InspectorController::willSendRequest): Ditto.
691         (WebCore::InspectorController::didReceiveResponse): Ditto.
692         (WebCore::InspectorController::didReceiveContentLength): Ditto.
693         (WebCore::InspectorController::didFinishLoading): Ditto.
694         (WebCore::InspectorController::didFailLoading): Ditto.
695         * page/InspectorController.h: Added.
696         (WebCore::InspectorController::inspectedPage):
697         (WebCore::InspectorController::scriptContext):
698         (WebCore::InspectorController::setScriptContext):
699         (WebCore::InspectorController::resources):
700         (WebCore::InspectorController::removeAllResources):
701
702         Add the JavaScript that defines most of the behavior of the Inspector.
703         
704         * page/inspector/ConsolePanel.js: Added.
705         * page/inspector/NetworkPanel.js: Added.
706         * page/inspector/Resource.js: Added.
707         * page/inspector/ResourceCategory.js: Added.
708         * page/inspector/ResourcePanel.js: Added.
709         * page/inspector/inspector.js: Added.
710         * page/inspector/treeoutline.js: Renamed from WebKit/WebInspector/webInspector/treeoutline.js.
711         * page/inspector/utilities.js: Added.
712
713         Add the Inspector's CSS and HTML.
714
715         * page/inspector/inspector.css: Added.
716         * page/inspector/inspector.html: Added.
717
718         Hang the InspectorController off of Page. We only create an
719         InspectorController if an InspectorClient is given to the Page.
720
721         * page/Page.cpp:
722         (WebCore::Page::Page):
723         * page/Page.h:
724         (WebCore::Page::inspectorController):
725
726         Use FrameLoader to notify the InspectorController of resource loads.
727
728         * loader/FrameLoader.cpp:
729         (WebCore::FrameLoader::begin):
730         (WebCore::FrameLoader::transitionToCommitted):
731         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
732         (WebCore::FrameLoader::detachFromParent):
733         (WebCore::FrameLoader::assignIdentifierToInitialRequest):
734         (WebCore::FrameLoader::willSendRequest):
735         (WebCore::FrameLoader::didReceiveResponse):
736         (WebCore::FrameLoader::didReceiveData):
737         (WebCore::FrameLoader::sendRemainingDelegateMessages):
738         (WebCore::FrameLoader::requestFromDelegate):
739         (WebCore::FrameLoader::didFinishLoad):
740         (WebCore::FrameLoader::dispatchWindowObjectAvailable):
741         (WebCore::FrameLoader::dispatchDidCommitLoad):
742         (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest):
743         (WebCore::FrameLoader::dispatchWillSendRequest):
744         (WebCore::FrameLoader::dispatchDidReceiveResponse):
745         (WebCore::FrameLoader::dispatchDidReceiveContentLength):
746         (WebCore::FrameLoader::dispatchDidFinishLoading):
747         (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache):
748         * loader/FrameLoader.h:
749
750         Send console messages to the InspectorController.
751
752         * page/Chrome.cpp:
753         (WebCore::Chrome::addMessageToConsole): Send all console messages to
754         the InspectorController.
755         * page/Chrome.h: Add a new MessageLevel and MessageSource that are
756         used in the Inspector JS.
757
758         Report HTML errors when the Inspector window is open.
759         We don't report errors when the window is closed because we don't want
760         to slow down the HTMLTokenizer.
761
762         * html/HTMLDocument.cpp:
763         (WebCore::HTMLDocument::createTokenizer):
764         * html/HTMLParser.cpp:
765         (WebCore::HTMLParser::HTMLParser):
766         * html/HTMLParser.h:
767         * html/HTMLTokenizer.cpp:
768         (WebCore::HTMLTokenizer::HTMLTokenizer):
769         * html/HTMLTokenizer.h:
770
771         Append the "Inspect Element" context menu item after passing the
772         context menu to the ContextMenuClient. This work used to be done in
773         WebKit.
774
775         * page/ContextMenuClient.h:
776         * page/ContextMenuController.cpp:
777         (WebCore::ContextMenuController::handleContextMenuEvent): Add the
778         "Inspect Element" item.
779         (WebCore::ContextMenuController::contextMenuItemSelected): Handle the
780         "Inspect Element" item.
781         * platform/ContextMenu.cpp:
782         (WebCore::ContextMenu::addInspectElementItem):
783         (WebCore::ContextMenu::checkOrEnableIfNeeded): Updated for "Inspect
784         Element" item.
785         * platform/ContextMenu.h:
786         * platform/ContextMenuItem.h:
787         (WebCore::): Add ContextMenuItemTagInspectElement.
788         * platform/graphics/svg/SVGImageEmptyClients.h:
789         * page/mac/WebCoreViewFactory.h: Add the "Inspect Element" localized
790         string.
791         * platform/LocalizedStrings.h: Ditto.
792         * platform/mac/LocalizedStringsMac.mm:
793         (WebCore::contextMenuItemTagInspectElement): Ditto.
794
795         Miscellaneous changes:
796
797         * css/view-source.css: Add message bubble styles.
798         * loader/DocumentLoader.h: Add a frame getter.
799         * platform/win/ScrollViewWin.cpp:
800         (WebCore::ScrollView::updateScrollbars): Respect
801         Frame::prohibitsScrolling.
802
803         Add new images needed for the Inspector.
804
805         * page/inspector/Images/attachedShadow.png: Added.
806         * page/inspector/Images/bottomShadow.png: Added.
807         * page/inspector/Images/breadcrumbBackground.png: Added.
808         * page/inspector/Images/checker.png: Added.
809         * page/inspector/Images/console.png: Added.
810         * page/inspector/Images/darkShadow.png: Added.
811         * page/inspector/Images/disclosureDownPressed.png: Added.
812         * page/inspector/Images/disclosureRightDown.png: Added.
813         * page/inspector/Images/disclosureRightPressed.png: Added.
814         * page/inspector/Images/document.png: Added.
815         * page/inspector/Images/domViewButton.png: Added.
816         * page/inspector/Images/domViewButtonSelected.png: Added.
817         * page/inspector/Images/downTriangle.png: Added.
818         * page/inspector/Images/errorIcon.png: Added.
819         * page/inspector/Images/errorMediumIcon.png: Added.
820         * page/inspector/Images/folder.png: Added.
821         * page/inspector/Images/goArrow.png: Added.
822         * page/inspector/Images/gradient.png: Added.
823         * page/inspector/Images/gradientHighlight.png: Added.
824         * page/inspector/Images/gradientHighlightBottom.png: Added.
825         * page/inspector/Images/hideStatusWidget.png: Added.
826         * page/inspector/Images/hideStatusWidgetPressed.png: Added.
827         * page/inspector/Images/network.png: Added.
828         * page/inspector/Images/paneBottomGrow.png: Added.
829         * page/inspector/Images/paneBottomGrowActive.png: Added.
830         * page/inspector/Images/paneGrowHandleLine.png: Added.
831         * page/inspector/Images/paneHeader.png: Added.
832         * page/inspector/Images/paneHeaderActive.png: Added.
833         * page/inspector/Images/plainDocument.png: Added.
834         * page/inspector/Images/popupArrows.png: Added.
835         * page/inspector/Images/rightTriangle.png: Added.
836         * page/inspector/Images/segment.png: Added.
837         * page/inspector/Images/segmentEnd.png: Added.
838         * page/inspector/Images/segmentHover.png: Added.
839         * page/inspector/Images/segmentHoverEnd.png: Added.
840         * page/inspector/Images/segmentSelected.png: Added.
841         * page/inspector/Images/segmentSelectedEnd.png: Added.
842         * page/inspector/Images/showStatusWidget.png: Added.
843         * page/inspector/Images/showStatusWidgetPressed.png: Added.
844         * page/inspector/Images/sidbarItemBackground.png: Added.
845         * page/inspector/Images/sidebarActionWidget.png: Added.
846         * page/inspector/Images/sidebarActionWidgetPressed.png: Added.
847         * page/inspector/Images/sidebarAttachWidget.png: Added.
848         * page/inspector/Images/sidebarAttachWidgetPressed.png: Added.
849         * page/inspector/Images/sidebarDetachWidget.png: Added.
850         * page/inspector/Images/sidebarDetachWidgetPressed.png: Added.
851         * page/inspector/Images/sidebarResizeWidget.png: Added.
852         * page/inspector/Images/sidebarSelection.png: Added.
853         * page/inspector/Images/sidebarSelectionBlurred.png: Added.
854         * page/inspector/Images/sidebarSelectionBlurredTall.png: Added.
855         * page/inspector/Images/sidebarSelectionGray.png: Added.
856         * page/inspector/Images/sidebarSelectionGrayTall.png: Added.
857         * page/inspector/Images/sidebarSelectionTall.png: Added.
858         * page/inspector/Images/sidebarStatusAreaBackground.png: Added.
859         * page/inspector/Images/sourceViewButton.png: Added.
860         * page/inspector/Images/sourceViewButtonSelected.png: Added.
861         * page/inspector/Images/splitviewDimple.png: Added.
862         * page/inspector/Images/splitviewDividerBackground.png: Added.
863         * page/inspector/Images/tab.png: Added.
864         * page/inspector/Images/tabSelected.png: Added.
865         * page/inspector/Images/timelinePillBlue.png: Added.
866         * page/inspector/Images/timelinePillGray.png: Added.
867         * page/inspector/Images/timelinePillGreen.png: Added.
868         * page/inspector/Images/timelinePillOrange.png: Added.
869         * page/inspector/Images/timelinePillPurple.png: Added.
870         * page/inspector/Images/timelinePillRed.png: Added.
871         * page/inspector/Images/timelinePillYellow.png: Added.
872         * page/inspector/Images/tipBalloon.png: Added.
873         * page/inspector/Images/tipBalloonBottom.png: Added.
874         * page/inspector/Images/tipIcon.png: Added.
875         * page/inspector/Images/tipIconPressed.png: Added.
876         * page/inspector/Images/toggleDown.png: Added.
877         * page/inspector/Images/toggleUp.png: Added.
878         * page/inspector/Images/toolbarBackground.png: Added.
879         * page/inspector/Images/toolbarBackgroundInactive.png: Added.
880         * page/inspector/Images/toolbarButton.png: Added.
881         * page/inspector/Images/toolbarButtonInactive.png: Added.
882         * page/inspector/Images/toolbarButtonPressed.png: Added.
883         * page/inspector/Images/toolbarButtonPressedInactive.png: Added.
884         * page/inspector/Images/toolbarSplitButtonDivider.png: Added.
885         * page/inspector/Images/toolbarSplitButtonDividerInactive.png: Added.
886         * page/inspector/Images/treeDownTriangleBlack.png: Added.
887         * page/inspector/Images/treeDownTriangleWhite.png: Added.
888         * page/inspector/Images/treeLeftTriangleBlack.png: Added.
889         * page/inspector/Images/treeRightTriangleBlack.png: Added.
890         * page/inspector/Images/treeRightTriangleWhite.png: Added.
891         * page/inspector/Images/warningIcon.png: Added.
892         * page/inspector/Images/warningMediumIcon.png: Added.
893         * page/inspector/Images/warningsErrors.png: Added.
894
895         Build-fu:
896
897         * WebCore.exp: Added new symbols.
898         * WebCore.xcodeproj/project.pbxproj: Added new source files and
899         resources.
900         * WebCore.vcproj/WebCore.vcproj: Ditto, and copy the resources to
901         $WebKitOutputDir.
902
903         Windows build fixes:
904
905         * history/HistoryItem.h: ResourceRequest is a struct.
906         * loader/FrameLoaderClient.h: Ditto.
907
908 2007-06-20  Mitz Pettel  <mitz@webkit.org>
909
910         Reviewed by Beth.
911
912         - fix http://bugs.webkit.org/show_bug.cgi?id=14056
913           REGRESSION (r21113-21143): TR background not repainted via style class change
914
915         Test: fast/repaint/table-row.html
916
917         * rendering/RenderTableRow.cpp:
918         (WebCore::RenderTableRow::layout): Added a repaint to make up for the case where the
919         table row also needs layout, so it doesn't get a repaint in setStyle().
920
921 2007-06-20  Mitz Pettel  <mitz@webkit.org>
922
923         Reviewed by Adele.
924
925         - fix http://bugs.webkit.org/show_bug.cgi?id=14040
926           Top and bottom border images flipped when using -webkit-border-image when border end up tiled
927
928         Test: fast/borders/border-image-01.html
929
930         Correctly account for the fact that "pattern space" is flipped.
931
932         * platform/graphics/Image.cpp: (WebCore::Image::drawTiled):
933         * platform/graphics/cg/ImageCG.cpp:
934         (WebCore::Image::drawPatternCallback):
935         (WebCore::Image::drawPattern):
936
937 2007-06-20  Anders Carlsson  <andersca@apple.com>
938
939         Reviewed by Darin.
940
941         <rdar://problem/5245555> REGRESSION: HTTP header injection in XMLHttpRequest.setRequestHeader
942         
943         Check for either '\r' or '\n' in the header value.
944         
945         * xml/xmlhttprequest.cpp:
946         (WebCore::isValidHeaderValue):
947
948 2007-06-20  Patti Hoa  <patti@apple.com>
949
950         Reviewed by Geoffrey Garen.
951
952         <rdar://problem/4882527> VO should speak URL of image links that lack tags
953         Add additional change from review
954         
955         * bridge/mac/WebCoreAXObject.mm:
956         (-[WebCoreAXObject accessibilityAttributeValue:]):
957         Check if the element has imgTag before asking for its url
958         
959 2007-06-20  Patti Hoa  <patti@apple.com>
960
961         Reviewed by Tristan O'Tierney.
962
963         <rdar://problem/4882527> VO should speak URL of image links that lack tags
964         
965         * bridge/mac/WebCoreAXObject.mm:
966         (-[WebCoreAXObject accessibilityAttributeNames]):
967         (-[WebCoreAXObject accessibilityAttributeValue:]):
968         Return the url of images.
969
970 2007-06-19  Anders Carlsson  <andersca@apple.com>
971
972         Reviewed by Kevin Decker.
973
974         <rdar://problem/5266289> REGRESSION (Safari 3 Beta 1): Incoming iChat messages are delayed
975         
976         Add a new m_deferMainResourceDataLoad that can be used to control whether a data load should be deferred using a timer or not.
977         
978         * loader/DocumentLoader.cpp:
979         (WebCore::DocumentLoader::DocumentLoader):
980         * loader/DocumentLoader.h:
981         (WebCore::DocumentLoader::deferMainResourceDataLoad):
982         * loader/MainResourceLoader.cpp:
983         (WebCore::MainResourceLoader::handleDataLoadSoon):
984         (WebCore::MainResourceLoader::loadNow):
985         (WebCore::MainResourceLoader::setDefersLoading):
986
987 2007-06-19  Patti Hoa <patti@apple.com>
988
989         Reviewed by Justin Garcia.
990         
991         <rdar://problem/5237325> Incorrect AXLeftLineTextMarkerRangeForTextMarker/AXPreviousLineStartTextMarkerForTextMarker for non-editable text
992         
993         * editing/visible_units.cpp:
994         (WebCore::startPositionForLine):
995         (WebCore::startOfLine):
996         (WebCore::endPositionForLine):
997         (WebCore::endOfLine):
998         Break down the line routines to allow another try to ask for start/end of line if the returned position is not valid.
999         An example would be when lineStart/lineEnd at different line than the input position.
1000         This can happen if the input position is before the space character at the end of a soft-wrapped non-editable line, 
1001         specifically a line without webkit-line-break:after-white-space style.
1002
1003 2007-06-19  Patti Hoa  <patti@apple.com>
1004
1005         Reviewed by Justin Garcia.
1006         
1007         <rdar://problem/3992645> VO view bounds misplaced when reading text after a line wrap
1008         
1009         * bridge/mac/WebCoreAXObject.mm:
1010         (-[WebCoreAXObject doAXBoundsForTextMarkerRange:]):
1011         Improve the accuracy of the bounds for a given range
1012         
1013 2007-06-19  Anders Carlsson  <andersca@apple.com>
1014
1015         Reviewed by Darin.
1016
1017         <rdar://problem/5130630>
1018         XPath fails LayoutTests on Windows
1019         
1020         * xml/XPathPredicate.cpp:
1021         Include MathExtras.h here so we get a version of fmod that works around a bug in the Microsoft CRT.
1022         
1023         * xml/XPathValue.cpp:
1024         (WebCore::XPath::Value::toNumber):
1025         Instead of using NAN, which isn't really the NaN value on Windows, use numeric_limits.
1026         
1027 2007-06-19  Geoffrey Garen  <ggaren@apple.com>
1028
1029         Reviewed by Darin Adler.
1030
1031         Fixed cross-frame access. <rdar://problem/5251309>. 
1032
1033         * bindings/js/kjs_window.cpp:
1034         (KJS::Window::getValueProperty):
1035         * bindings/scripts/CodeGeneratorJS.pm:
1036         * page/DOMWindow.idl:
1037
1038 2007-06-19  Anders Carlsson  <andersca@apple.com>
1039
1040         Build fix.
1041         
1042         * platform/win/PopupMenuWin.cpp:
1043
1044 2007-06-19  Lars Knoll <lars@trolltech.com>
1045
1046         Reviewed by Zack
1047
1048         Implement these methods correctly.
1049
1050         * platform/qt/PlatformScreenQt.cpp:
1051         (WebCore::screenRect):
1052         (WebCore::screenAvailableRect):
1053
1054 2007-06-19  Sam Weinig  <sam@webkit.org>
1055
1056         Reviewed by Geoff.
1057
1058         Patch for http://bugs.webkit.org/show_bug.cgi?id=14226
1059         Move the History object out of the JS bindings
1060
1061         - Autogenerate JSHistory.
1062
1063         * DerivedSources.make:
1064         * WebCore.pro:
1065         * WebCore.vcproj/WebCore.vcproj:
1066         * WebCore.xcodeproj/project.pbxproj:
1067         * bindings/js/kjs_window.cpp:
1068         (KJS::WindowPrivate::WindowPrivate):
1069         (KJS::Window::mark):
1070         (KJS::Window::getValueProperty):
1071         (KJS::Window::clearHelperObjectProperties):
1072         (KJS::Window::disconnectFrame):
1073         * bindings/js/kjs_window.h:
1074         (KJS::Window::):
1075         * bridge/GlobalHistory.h: Copied from WebCore/bridge/History.h.
1076         * bridge/History.h: Removed.
1077         * bridge/mac/GlobalHistoryMac.mm: Copied from WebCore/bridge/mac/HistoryMac.mm.
1078         * bridge/mac/HistoryMac.mm: Removed.
1079         * bridge/win/GlobalHistoryWin.cpp: Copied from WebCore/bridge/win/HistoryWin.cpp.
1080         * bridge/win/HistoryWin.cpp: Removed.
1081         * css/cssstyleselector.cpp:
1082         * page/DOMWindow.cpp:
1083         (WebCore::DOMWindow::disconnectFrame):
1084         (WebCore::DOMWindow::history):
1085         * page/DOMWindow.h:
1086         * page/DOMWindow.idl:
1087         * page/History.cpp: Added.
1088         (WebCore::History::History):
1089         (WebCore::History::frame):
1090         (WebCore::History::disconnectFrame):
1091         (WebCore::History::length):
1092         (WebCore::History::back):
1093         (WebCore::History::forward):
1094         (WebCore::History::go):
1095         * page/History.h: Added.
1096         * page/History.idl: Added.
1097         * platform/gdk/TemporaryLinkStubs.cpp:
1098         * platform/qt/TemporaryLinkStubs.cpp:
1099         * platform/wx/TemporaryLinkStubs.cpp:
1100
1101 2007-06-18  Sam Weinig  <sam@webkit.org>
1102
1103         Qt build fix.
1104
1105         * platform/qt/PlatformScreenQt.cpp:
1106         (WebCore::screenDepth):
1107         (WebCore::screenDepthPerComponent):
1108         (WebCore::screenIsMonochrome):
1109         (WebCore::screenRect):
1110         (WebCore::screenAvailableRect):
1111
1112 2007-06-18  Sam Weinig  <sam@webkit.org>
1113
1114         Reviewed by Beth.
1115
1116         Fix build and update licenses. 
1117
1118         * WebCore.xcodeproj/project.pbxproj:
1119         * page/BarInfo.cpp:
1120         * page/BarInfo.h:
1121         * page/BarInfo.idl:
1122         * page/Screen.cpp:
1123         (WebCore::Screen::height):
1124         (WebCore::Screen::width):
1125         (WebCore::Screen::colorDepth):
1126         (WebCore::Screen::pixelDepth):
1127         (WebCore::Screen::availLeft):
1128         (WebCore::Screen::availTop):
1129         (WebCore::Screen::availHeight):
1130         (WebCore::Screen::availWidth):
1131         * page/Screen.h:
1132         * page/Screen.idl:
1133
1134 2007-06-18  Anders Carlsson  <andersca@apple.com>
1135
1136         Reviewed by John Sullivan.
1137
1138         <rdar://problem/5277008> Assertion in [LocationChangeHandler finishedLoadingFrame:]
1139         
1140         Don't send any frame load callbacks if the document load hasn't been
1141         committed for real.
1142         
1143         * loader/FrameLoader.cpp:
1144         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1145
1146 2007-06-18  Sam Weinig  <sam@webkit.org>
1147
1148         Reviewed by Geoff.
1149
1150         Patch for http://bugs.webkit.org/show_bug.cgi?id=14193
1151         Move the Screen object out of the JS bindings
1152
1153         - Renames Screen.h to PlatformScreen.h to accommodate new class.
1154         - Autogenerates JSScreen.
1155
1156         * DerivedSources.make:
1157         * WebCore.pro:
1158         * WebCore.vcproj/WebCore.vcproj:
1159         * WebCore.xcodeproj/project.pbxproj:
1160         * bindings/js/kjs_window.cpp:
1161         (KJS::WindowPrivate::WindowPrivate):
1162         (KJS::Window::mark):
1163         (KJS::Window::getValueProperty):
1164         (KJS::Window::clearHelperObjectProperties):
1165         * bindings/js/kjs_window.h:
1166         (KJS::Window::):
1167         * css/MediaQueryEvaluator.cpp:
1168         * page/DOMWindow.cpp:
1169         (WebCore::DOMWindow::DOMWindow):
1170         (WebCore::DOMWindow::~DOMWindow):
1171         (WebCore::DOMWindow::frame):
1172         (WebCore::DOMWindow::disconnectFrame):
1173         (WebCore::DOMWindow::screen):
1174         * page/DOMWindow.h:
1175         * page/DOMWindow.idl:
1176         * page/Screen.cpp: Added.
1177         (WebCore::Screen::Screen):
1178         (WebCore::Screen::disconnectFrame):
1179         (WebCore::Screen::height):
1180         (WebCore::Screen::width):
1181         (WebCore::Screen::colorDepth):
1182         (WebCore::Screen::pixelDepth):
1183         (WebCore::Screen::availLeft):
1184         (WebCore::Screen::availTop):
1185         (WebCore::Screen::availHeight):
1186         (WebCore::Screen::availWidth):
1187         * page/Screen.h: Added.
1188         * page/Screen.idl: Added.
1189         * page/mac/WebCoreFrameBridge.mm:
1190         * platform/PlatformScreen.h: Copied from WebCore/platform/Screen.h.
1191         * platform/Screen.h: Removed.
1192         * platform/gdk/PlatformScreenGdk.cpp: Copied from WebCore/platform/gdk/ScreenGdk.cpp.
1193         * platform/gdk/ScreenGdk.cpp: Removed.
1194         * platform/mac/PlatformMouseEventMac.mm:
1195         * platform/mac/PlatformScreenMac.mm: Copied from WebCore/platform/mac/ScreenMac.mm.
1196         * platform/mac/ScreenMac.mm: Removed.
1197         * platform/qt/PlatformScreenQt.cpp: Added.
1198         (WebCore::WebCore::screenDepth):
1199         (WebCore::WebCore::screenDepthPerComponent):
1200         (WebCore::WebCore::screenIsMonochrome):
1201         (WebCore::WebCore::screenRect):
1202         (WebCore::WebCore::screenAvailableRect):
1203         * platform/qt/TemporaryLinkStubs.cpp:
1204         * platform/win/PlatformScreenWin.cpp: Copied from WebCore/platform/win/ScreenWin.cpp.
1205         * platform/win/ScreenWin.cpp: Removed.
1206         * rendering/RenderObject.cpp:
1207
1208 2007-06-18  Sam Weinig  <sam@webkit.org>
1209
1210         Reviewed by Geoff.
1211
1212         Patch for http://bugs.webkit.org/show_bug.cgi?id=14211
1213         Move the BarInfo object out of the JS bindings
1214
1215         * DerivedSources.make:
1216         * WebCore.pro:
1217         * WebCore.vcproj/WebCore.vcproj:
1218         * WebCore.xcodeproj/project.pbxproj:
1219         * bindings/js/kjs_window.cpp:
1220         (KJS::WindowPrivate::WindowPrivate):
1221         (KJS::Window::mark):
1222         (KJS::Window::getValueProperty):
1223         (KJS::Window::clearHelperObjectProperties):
1224         (KJS::Window::disconnectFrame):
1225         * bindings/js/kjs_window.h:
1226         (KJS::Window::):
1227         * page/BarInfo.cpp: Added.
1228         (WebCore::BarInfo::BarInfo):
1229         (WebCore::BarInfo::disconnectFrame):
1230         (WebCore::BarInfo::visible):
1231         * page/BarInfo.h: Added.
1232         (WebCore::BarInfo::):
1233         * page/BarInfo.idl: Added.
1234         * page/DOMWindow.cpp:
1235         (WebCore::DOMWindow::~DOMWindow):
1236         (WebCore::DOMWindow::disconnectFrame):
1237         (WebCore::DOMWindow::locationbar):
1238         (WebCore::DOMWindow::menubar):
1239         (WebCore::DOMWindow::personalbar):
1240         (WebCore::DOMWindow::scrollbars):
1241         (WebCore::DOMWindow::statusbar):
1242         (WebCore::DOMWindow::toolbar):
1243         * page/DOMWindow.h:
1244         * page/DOMWindow.idl:
1245
1246 2007-06-18  Sam Weinig  <sam@webkit.org>
1247
1248         Reviewed by Darin.
1249
1250         Remove the FrameArray class and instead make window.frames another
1251         self-reference for window (like window.window, window.self, etc).
1252         This is what Firefox and what the HTML5 dictates.
1253
1254         * bindings/js/kjs_window.cpp:
1255         (KJS::WindowPrivate::WindowPrivate):
1256         (KJS::Window::mark):
1257         (KJS::Window::getValueProperty):
1258         (KJS::Window::clearHelperObjectProperties):
1259         (KJS::Window::disconnectFrame):
1260         * bindings/js/kjs_window.h:
1261
1262 2007-06-18  Mitz Pettel  <mitz@webkit.org>
1263
1264         Reviewed by Adele.
1265
1266         - fix http://bugs.webkit.org/show_bug.cgi?id=13413
1267           Failed assertion in RenderTextControl::setSelectionRange in Google Spreadsheets
1268
1269         Test: fast/forms/input-zero-height-focus.html
1270
1271         * rendering/RenderTextControl.cpp:
1272         (WebCore::RenderTextControl::setSelectionRange): Avoid setting the
1273         selection in a zero-height text control.
1274
1275 2007-06-18  Alp Toker  <alp.toker@collabora.co.uk>
1276
1277         Reviewed by Sam Weinig.
1278
1279         http://bugs.webkit.org/show_bug.cgi?id=14052
1280         Implement SoundGdk
1281
1282         * WebCore.pro:
1283         * platform/gdk/SoundGdk.cpp: Added.
1284         (WebCore::systemBeep):
1285         * platform/gdk/TemporaryLinkStubs.cpp:
1286         (WebCore::systemBeep):
1287
1288 2007-06-18  Dave Hyatt  <hyatt@apple.com>
1289
1290         Add support for horizontal mouse wheeling on Windows.
1291         
1292         Reviewed by aroben
1293
1294         * platform/PlatformWheelEvent.h:
1295         * platform/win/WheelEventWin.cpp:
1296         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1297
1298 2007-06-17  Sam Weinig  <sam@webkit.org>
1299
1300         Win32 build fix.
1301
1302         * WebCore.vcproj/WebCore.vcproj:
1303
1304 2007-06-15  David Hyatt  <hyatt@apple.com>
1305
1306         Fix for bugzilla bugs 14183 and 14184, 'repeat' regressed in border-image
1307         because of a botched 'round' support removal.  Also update for a change in
1308         the spec that has the second stretch/round/repeat keyword match the first
1309         if omitted.
1310         
1311         Reviewed by olliej
1312
1313         * css/cssparser.cpp:
1314         (WebCore::BorderImageParseContext::commitBorderImage):
1315         * platform/graphics/Image.cpp:
1316         (WebCore::Image::drawTiled):
1317         * platform/graphics/Image.h:
1318         (WebCore::Image::):
1319
1320 2007-06-15  Sam Weinig  <sam@webkit.org>
1321
1322         Reviewed by Darin.
1323
1324         Patch for http://bugs.webkit.org/show_bug.cgi?id=14053
1325         Autogenerate JS binding for Rect
1326
1327         - Renames RectImpl to Rect, DOMStyleSheetList to JSStyleSheetList 
1328           and DOMRGBColor to JSRGBColor
1329         - Moves JSStyleSheetList and JSRGBColor into the WebCore namespace.
1330
1331         * DerivedSources.make:
1332         * WebCore.pro:
1333         * WebCore.xcodeproj/project.pbxproj:
1334         * bindings/js/kjs_css.cpp:
1335         (WebCore::):
1336         (WebCore::JSStyleSheetList::JSStyleSheetList):
1337         (WebCore::JSStyleSheetList::~JSStyleSheetList):
1338         (WebCore::JSStyleSheetList::getValueProperty):
1339         (WebCore::JSStyleSheetList::indexGetter):
1340         (WebCore::JSStyleSheetList::nameGetter):
1341         (WebCore::JSStyleSheetList::getOwnPropertySlot):
1342         (WebCore::toJS):
1343         (WebCore::JSStyleSheetListFunc::callAsFunction):
1344         (WebCore::JSRGBColor::JSRGBColor):
1345         (WebCore::JSRGBColor::~JSRGBColor):
1346         (WebCore::JSRGBColor::getOwnPropertySlot):
1347         (WebCore::JSRGBColor::getValueProperty):
1348         (WebCore::getJSRGBColor):
1349         * bindings/js/kjs_css.h:
1350         (WebCore::JSStyleSheetList::classInfo):
1351         (WebCore::JSStyleSheetList::):
1352         (WebCore::JSStyleSheetList::impl):
1353         (WebCore::JSRGBColor::classInfo):
1354         (WebCore::JSRGBColor::):
1355         (WebCore::JSRGBColor::impl):
1356         * bindings/objc/DOMUtility.mm:
1357         (KJS::createDOMWrapper):
1358         * bindings/scripts/CodeGeneratorJS.pm:
1359         * bindings/scripts/CodeGeneratorObjC.pm:
1360         * css/CSSBorderImageValue.cpp:
1361         (WebCore::CSSBorderImageValue::CSSBorderImageValue):
1362         * css/CSSBorderImageValue.h:
1363         * css/CSSPrimitiveValue.cpp:
1364         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1365         (WebCore::CSSPrimitiveValue::cssText):
1366         * css/CSSPrimitiveValue.h:
1367         (WebCore::CSSPrimitiveValue::getRectValue):
1368         (WebCore::CSSPrimitiveValue::):
1369         * css/DashboardRegion.h:
1370         * css/Rect.h: Copied from css/RectImpl.h.
1371         (WebCore::Rect::~Rect):
1372         (WebCore::Rect::top):
1373         (WebCore::Rect::right):
1374         (WebCore::Rect::bottom):
1375         (WebCore::Rect::left):
1376         (WebCore::Rect::setTop):
1377         (WebCore::Rect::setRight):
1378         (WebCore::Rect::setBottom):
1379         (WebCore::Rect::setLeft):
1380         * css/Rect.idl:
1381         * css/RectImpl.h: Removed.
1382         * css/cssparser.cpp:
1383         (WebCore::CSSParser::parseShape):
1384         (WebCore::BorderImageParseContext::commitBorderImage):
1385         * css/cssstyleselector.cpp:
1386         (WebCore::CSSStyleSelector::applyProperty):
1387         * page/DOMWindow.idl:
1388
1389 2007-06-14  George Staikos  <staikos@kde.org>
1390
1391         Reviewed by Lars.
1392
1393         Implement missing tab support and a slight refactor.
1394
1395         * platform/qt/PlatformKeyboardEventQt.cpp:
1396         (WebCore::keyIdentifierForQtKeyCode):
1397         (WebCore::windowsKeyCodeForKeyEvent):
1398         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1399
1400 2007-06-14  Dave Hyatt  <hyatt@apple.com>
1401
1402         Fix for Bugzilla bug 14806, missing text for bold/italic fonts in non-English Windows installs.
1403         
1404         This patch adds an additional step after the lookup by full name fails.  It will then look up
1405         a PostScript name in a (localized full name) -> (PostScript name) cache.  If the name is not
1406         found, then the font's name table is obtained and searched for a PostScript name (and the
1407         result is cached).
1408         
1409         If lookup on PostScript name fails too, then we now properly fall back to the next font in the
1410         list (so text should never be missing).
1411
1412         Reviewed by Darin (thoroughly reviewed, super reviewed even)
1413
1414         * platform/win/FontCacheWin.cpp:
1415         * platform/win/FontPlatformDataWin.cpp:
1416
1417 2007-06-14  Anders Carlsson  <andersca@apple.com>
1418
1419         Reviewed by Geoff.
1420
1421         Add Frame::cleanupScriptObjectsForPlugin which will invalidate the root object
1422         for a given plug-in.
1423
1424         * WebCore.exp:
1425         * page/Frame.cpp:
1426         (WebCore::Frame::cleanupScriptObjectsForPlugin):
1427         * page/Frame.h:
1428
1429 2007-06-14  Anders Carlsson  <andersca@apple.com>
1430
1431         Reviewed by Geoff.
1432
1433         <rdar://problem/5211677>
1434         -[WebPreferences setJavaEnabled:] only disables java inside <applet>, not <object>
1435         
1436         * loader/FrameLoader.cpp:
1437         (WebCore::FrameLoader::requestObject):
1438         If the object is a Java MIME type and Java is disabled, don't load the plug-in.
1439         
1440         * platform/MimeTypeRegistry.cpp:
1441         (WebCore::MimeTypeRegistry::isJavaAppletMIMEType):
1442         Clean this up and add another applet MIME type.
1443
1444 2007-06-14  George Staikos  <staikos@kde.org>
1445
1446         Reviewed by Lars.
1447
1448         Implement the file chooser for Qt.
1449
1450         * platform/qt/FileChooserQt.cpp:
1451         (WebCore::FileChooser::openFileChooser):
1452         (WebCore::FileChooser::basenameForWidth):
1453
1454 2007-06-14  George Staikos  <staikos@kde.org>
1455
1456         Reviewed by Lars.
1457
1458         Add missing initialization of pointer.
1459
1460         * platform/qt/ContextMenuQt.cpp:
1461         (WebCore::ContextMenu::ContextMenu):
1462
1463 2007-06-14  Anders Carlsson  <andersca@apple.com>
1464
1465         Reviewed by Mitz.
1466
1467         <rdar://problem/5244948>
1468         Safari keeps on complaining about slow script playing NBC TV video (14133)
1469
1470         http://bugs.webkit.org/show_bug.cgi?id=14133
1471         Runaway JavaScript timer fires when spinning around in Google Maps street view
1472
1473         Make sure to start and stop the timeout checker around calls to JS.
1474
1475         * bindings/objc/WebScriptObject.mm:
1476         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1477         (-[WebScriptObject evaluateWebScript:]):
1478
1479 2007-06-14  George Staikos  <staikos@kde.org>
1480
1481         Reviewed by Maciej.
1482
1483         Keypress causes typeahead crash on empty selects due to modulo 0.
1484
1485         * html/HTMLSelectElement.cpp:
1486         (WebCore::HTMLSelectElement::typeAheadFind):
1487
1488 2007-06-13  George Staikos  <staikos@kde.org>
1489
1490         Reviewed by Lars.
1491
1492         Compile without self-linking.
1493
1494         * WebCore.pro:
1495
1496 2007-06-13  Darin Adler  <darin@apple.com>
1497
1498         Reviewed by Kevin Decker.
1499
1500         - fix <rdar://problem/5264923> Safari frequently "stalls" beneath
1501           +[NSFont fontWithName:size:] while loading a web page (searching on disk for the font)
1502
1503         * platform/mac/WebFontCache.mm:
1504         (+[WebFontCache internalFontWithFamily:traits:size:]): Renamed from fontWithFamily.
1505         Took out the auto-activation code.
1506         (+[WebFontCache fontWithFamily:traits:size:]): Added. Calls internalFontWithFamily,
1507         then calls NSFont to trigger activation if that returned nil, then calls
1508         internalFontWithFamily again.
1509
1510 2007-06-13  Anders Carlsson  <andersca@apple.com>
1511
1512         Reviewed by Geoff.
1513
1514         Pass the root object to methods that end up creating new ObjcInstance objects.
1515         
1516         * bindings/objc/WebScriptObject.mm:
1517         (listFromNSArray):
1518         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1519         (-[WebScriptObject evaluateWebScript:]):
1520         (-[WebScriptObject setValue:forKey:]):
1521         (-[WebScriptObject valueForKey:]):
1522         (-[WebScriptObject removeWebScriptKey:]):
1523         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
1524
1525 2007-06-13  Anders Carlsson  <andersca@apple.com>
1526
1527         Reviewed by Darin.
1528
1529         <rdar://problem/5267992>
1530         Make sure an alert doesn't allow loading to continue inside a script.
1531         
1532         Make sure to defer all loads where it's possible for a second main loop to be running.
1533         
1534         * page/Chrome.cpp:
1535         (WebCore::Chrome::runModal):
1536         (WebCore::Chrome::runBeforeUnloadConfirmPanel):
1537         (WebCore::Chrome::runJavaScriptAlert):
1538         (WebCore::Chrome::runJavaScriptConfirm):
1539         (WebCore::Chrome::runJavaScriptPrompt):
1540         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
1541         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
1542         
1543         * platform/network/cf/ResourceHandleCFNet.cpp:
1544         (WebCore::ResourceHandle::setDefersLoading):
1545         Implement this.
1546
1547 2007-06-13  Alp Toker  <alp.toker@collabora.co.uk>
1548
1549         Reviewed by Rob.
1550
1551         http://bugs.webkit.org/show_bug.cgi?id=14060
1552         Cairo SVG support
1553
1554         * WebCore.pro: Add new files to the build.
1555         * platform/graphics/svg/SVGPaintServerPattern.h:
1556         * platform/graphics/svg/SVGPaintServerSolid.h:
1557         * platform/graphics/svg/cairo: Added.
1558         * platform/graphics/svg/cairo/RenderPathCairo.cpp: Added.
1559         (WebCore::RenderPath::strokeContains):
1560         (WebCore::RenderPath::strokeBBox):
1561         * platform/graphics/svg/cairo/SVGPaintServerCairo.cpp: Added.
1562         (WebCore::SVGPaintServer::draw):
1563         (WebCore::SVGPaintServer::teardown):
1564         (WebCore::SVGPaintServer::renderPath):
1565         * platform/graphics/svg/cairo/SVGPaintServerGradientCairo.cpp: Added.
1566         (WebCore::SVGPaintServerGradient::setup):
1567         * platform/graphics/svg/cairo/SVGPaintServerPatternCairo.cpp: Added.
1568         (WebCore::SVGPaintServerPattern::setup):
1569         * platform/graphics/svg/cairo/SVGPaintServerSolidCairo.cpp: Added.
1570         (WebCore::SVGPaintServerSolid::setup):
1571         * platform/graphics/svg/cairo/SVGResourceClipperCairo.cpp: Added.
1572         (WebCore::SVGResourceClipper::applyClip):
1573         * platform/graphics/svg/cairo/SVGResourceMaskerCairo.cpp: Added.
1574         (WebCore::SVGResourceMasker::applyMask):
1575
1576 2007-06-13  Simon Hausmann  <hausmann@kde.org>
1577
1578         Reviewed by Lars.
1579
1580         Added a make install target that installs the Qt port and renamed
1581         WebKitQt to QtWebKit
1582
1583         * WebCore.pro:
1584
1585 2007-06-13  Adam Roben  <aroben@apple.com>
1586
1587         Fix one more BITMAPINFO/BITMAPINFOHEADER typo.
1588
1589         Rubberstamped by Oliver.
1590
1591         * platform/win/DragImageWin.cpp:
1592         (WebCore::allocImage):
1593
1594 2007-06-12  Oliver Hunt  <oliver@apple.com>
1595
1596         Reviewed by Darin.
1597
1598         Use correct size for BITMAPINFOHEADER -- whoops.
1599
1600         * platform/win/CursorWin.cpp:
1601         (WebCore::Cursor::Cursor):
1602         * platform/win/PasteboardWin.cpp:
1603         (WebCore::Pasteboard::writeImage):
1604
1605 2007-06-12  Sam Weinig  <sam@webkit.org>
1606
1607         Reviewed by Oliver.
1608
1609         Patch for http://bugs.webkit.org/show_bug.cgi?id=14109
1610         Cleanup JSEvent and JSClipboard in preperation for autogeneration
1611
1612         * bindings/js/kjs_events.cpp:
1613         (KJS::DOMEvent::DOMEvent):
1614         (KJS::DOMEvent::getValueProperty):
1615         (KJS::DOMEvent::put):
1616         (KJS::DOMEvent::putValueProperty):
1617         (KJS::DOMEventPrototypeFunction::callAsFunction):
1618         (KJS::toJS):
1619         (KJS::toEvent):
1620         (KJS::):
1621         (KJS::JSClipboard::JSClipboard):
1622         (KJS::JSClipboard::~JSClipboard):
1623         (KJS::JSClipboard::getOwnPropertySlot):
1624         (KJS::JSClipboard::getValueProperty):
1625         (KJS::JSClipboard::put):
1626         (KJS::JSClipboard::putValueProperty):
1627         (KJS::JSClipboardPrototypeFunction::callAsFunction):
1628         (KJS::toClipboard):
1629         * bindings/js/kjs_events.h:
1630         (KJS::DOMEvent::):
1631         (KJS::DOMEvent::impl):
1632         (KJS::JSClipboard::impl):
1633         * dom/ClipboardEvent.h:
1634         * dom/Event.h:
1635         (WebCore::Event::srcElement):
1636         (WebCore::Event::returnValue):
1637         (WebCore::Event::clipboardData):
1638         (WebCore::Event::dataTransfer):
1639         (WebCore::Event::clipboard):
1640         * dom/MouseEvent.h:
1641
1642 2007-06-13  Lars Knoll <lars@trolltech.com>
1643
1644         Reviewed by Niko.
1645
1646         Small cleanup
1647
1648         * platform/qt/PlugInInfoStoreQt.cpp:
1649         (WebCore::PlugInInfoStore::supportsMIMEType):
1650
1651 2007-06-13  Lars Knoll <lars@trolltech.com>
1652
1653         Reviewed by Niko
1654
1655         Implement the parts required for the JS bridge
1656         to know about the plugins.
1657
1658         * WebCore.pro:
1659         * platform/qt/PlugInInfoStoreQt.cpp: Added.
1660         (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
1661         (WebCore::PlugInInfoStore::pluginCount):
1662         (WebCore::PlugInInfoStore::supportsMIMEType):
1663         (WebCore::refreshPlugins):
1664         * platform/qt/TemporaryLinkStubs.cpp:
1665
1666 2007-06-10  Holger Hans Peter Freyther  <zecke@selfish.org>
1667
1668          Reviewed by Maciej.
1669  
1670          Disable whole-view editing for the Gdk port in order to improve the browsing experience.
1671  
1672          * platform/gdk/EditorClientGdk.cpp:
1673          (WebCore::EditorClientGdk::isEditable): Return false to disable whole-view editing
1674  
1675 2007-06-08  Sam Weinig  <sam@webkit.org>
1676
1677         Reviewed by Oliver.
1678
1679         Patch for http://bugs.webkit.org/show_bug.cgi?id=14044
1680         Autogenerate the JS bindings for HTMLCollection
1681
1682         - also moves JSHTMLAllCollection into it's own file.
1683
1684         * DerivedSources.make:
1685         * WebCore.pro:
1686         * WebCore.xcodeproj/project.pbxproj:
1687         * bindings/js/JSHTMLAllCollection.h: Added.
1688         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
1689         (WebCore::JSHTMLAllCollection::toBoolean):
1690         (WebCore::JSHTMLAllCollection::masqueradeAsUndefined):
1691         * bindings/js/JSHTMLCollectionCustom.cpp: Added.
1692         (WebCore::getNamedItems):
1693         (WebCore::JSHTMLCollection::callAsFunction):
1694         (WebCore::JSHTMLCollection::implementsCall):
1695         (WebCore::JSHTMLCollection::canGetItemsForName):
1696         (WebCore::JSHTMLCollection::nameGetter):
1697         (WebCore::JSHTMLCollection::item):
1698         (WebCore::JSHTMLCollection::namedItem):
1699         (WebCore::toJS):
1700         * bindings/js/JSHTMLDocumentCustom.cpp:
1701         (WebCore::JSHTMLDocument::nameGetter):
1702         (WebCore::JSHTMLDocument::all):
1703         * bindings/js/JSXMLHttpRequest.cpp:
1704         * bindings/js/kjs_html.cpp:
1705         (WebCore::ImageConstructorImp::ImageConstructorImp):
1706         (WebCore::ImageConstructorImp::construct):
1707         * bindings/js/kjs_html.h:
1708         (WebCore::ImageConstructorImp::implementsConstruct):
1709         * bindings/js/kjs_window.cpp:
1710         (KJS::Window::namedItemGetter):
1711         * bindings/objc/DOMUtility.mm:
1712         (KJS::createDOMWrapper):
1713         * bindings/scripts/CodeGeneratorJS.pm:
1714         * html/HTMLCollection.cpp:
1715         (WebCore::HTMLCollection::tags):
1716         * html/HTMLCollection.h:
1717         (WebCore::HTMLCollection::collectionType):
1718         * html/HTMLCollection.idl:
1719         * html/HTMLOptionsCollection.idl:
1720
1721 2007-06-08  Justin Garcia  <justin.garcia@apple.com>
1722
1723         Reviewed by John.
1724         
1725         <rdar://problem/5232159> REGRESSION: Cannot select text in RSS view
1726
1727         The selection is updated both on mouse movement and
1728         when the autoscroll timer fires.  The autoscroll
1729         code wasn't converting mouse coordinates to layer
1730         coordinates correctly, and was then using those
1731         coordinates to create a bad selection.
1732
1733         * rendering/RenderLayer.cpp:
1734         (WebCore::RenderLayer::autoscroll): Use convertToLayerCoordinates.
1735
1736 2007-06-08  Anders Carlsson  <andersca@apple.com>
1737
1738         Reviewed by Geoff.
1739
1740         Store the root object in a hash set, keyed by the plugin view. This is in preparation for 
1741         letting plugins invalidate the root object upon destruction
1742
1743         * page/Frame.cpp:
1744         (WebCore::Frame::createRootObject):
1745         (WebCore::Frame::cleanupScriptObjects):
1746         * page/FramePrivate.h:
1747
1748 2007-06-08  Lars Knoll <lars@trolltech.com>
1749
1750         Reviewed by Zack.
1751
1752         Add qwebobjectpluginconnector to the build.
1753
1754         * WebCore.pro:
1755
1756 2007-06-07  Justin Garcia  <justin.garcia@apple.com>
1757
1758         Reviewed by Tristan.
1759         
1760         <rdar://problem/5250997> A crash occurs when selecting Undo Typing for a page that has been closed in tab
1761
1762         * WebCore.exp: Added clearUndoRedoOperations.
1763         * page/Page.cpp:
1764         (WebCore::Page::clearUndoRedoOperations): Added.
1765         * page/Page.h:
1766         
1767 2007-06-07  David Hyatt  <hyatt@apple.com>
1768
1769         Fix crash.  Null check layer.  Bug 13984.
1770
1771         Reviewed by andersca
1772
1773         * WebCore.xcodeproj/project.pbxproj:
1774         * page/FrameView.cpp:
1775         (WebCore::FrameView::windowClipRectForLayer):
1776
1777 2007-06-07  Oliver Hunt  <oliver@apple.com>
1778
1779         Reviewed by Justin.
1780
1781         Remove incorrect assertions.
1782         
1783         These assertions were made on the assumption that 
1784         TSM would always call with a range that was contained 
1785         by an editable region.
1786         
1787         TSM may call -[WebHTMLView characterIndexForPoint:] on a mouse
1788         event that is otherwise unrelated to editing, which may
1789         be outside the current editing region, triggering these 
1790         assertions.
1791
1792         * page/mac/WebCoreFrameBridge.mm:
1793         (-[WebCoreFrameBridge convertToNSRange:]):
1794
1795 2007-06-07  Justin Garcia  <justin.garcia@apple.com>
1796
1797         Reviewed by John.
1798         
1799         <rdar://problem/5237074> REGRESSION: editing/unsupported-content/table-delete-003 is failing (13931)
1800         
1801         * editing/DeleteSelectionCommand.cpp:
1802         (WebCore::DeleteSelectionCommand::initializeStartEnd):
1803         We wouldn't expand the selection to include a special element 
1804         at the start of the selection unless the end of the selection 
1805         was at the end of a special element. Avoid a special 
1806         element at the start as long as it's fully selected. Ditto for 
1807         the end.
1808         * editing/htmlediting.cpp:
1809         (WebCore::positionBeforeContainingSpecialElement):
1810         (WebCore::positionAfterContainingSpecialElement):
1811
1812 2007-06-07  Sam Weinig  <sam@webkit.org>
1813
1814         Reviewed by Anders.
1815
1816         Patch for  http://bugs.webkit.org/show_bug.cgi?id=14028
1817         Finish autogenerating the JS bindings for Node
1818
1819         * DerivedSources.make:
1820         * WebCore.pro:
1821         * WebCore.xcodeproj/project.pbxproj:
1822         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1823         (WebCore::createJSHTMLWrapper):
1824         * bindings/js/JSHTMLElementWrapperFactory.h:
1825         * bindings/js/JSHTMLOptionElementConstructor.cpp:
1826         * bindings/js/JSNamedNodeMapCustom.cpp:
1827         * bindings/js/JSNodeCustom.cpp:
1828         (WebCore::JSNode::insertBefore):
1829         (WebCore::JSNode::replaceChild):
1830         (WebCore::JSNode::removeChild):
1831         (WebCore::JSNode::appendChild):
1832         (WebCore::JSNode::mark):
1833         (WebCore::toJS):
1834         * bindings/js/JSSVGElementWrapperFactory.cpp:
1835         (WebCore::createJSSVGWrapper):
1836         * bindings/js/JSSVGElementWrapperFactory.h:
1837         * bindings/js/JSXSLTProcessor.cpp:
1838         (KJS::XSLTProcessorPrototypeFunction::callAsFunction):
1839         * bindings/js/kjs_binding.cpp:
1840         (KJS::ScriptInterpreter::getDOMNodeForDocument):
1841         (KJS::ScriptInterpreter::putDOMNodeForDocument):
1842         (KJS::ScriptInterpreter::markDOMNodesForDocument):
1843         (KJS::ScriptInterpreter::updateDOMNodeDocument):
1844         * bindings/js/kjs_binding.h:
1845         * bindings/js/kjs_dom.cpp:
1846         (WebCore::toAttr):
1847         * bindings/js/kjs_dom.h:
1848         * bindings/js/kjs_domnode.h: Removed.
1849         * bindings/objc/DOMUtility.mm:
1850         (KJS::createDOMWrapper):
1851         * bindings/scripts/CodeGeneratorJS.pm:
1852         * dom/Node.h:
1853         (WebCore::Node::parentElement):
1854         * dom/Node.idl:
1855
1856 2007-06-07  Sam Weinig  <sam@webkit.org>
1857
1858         Another Gdk and Qt build fix.
1859
1860         * WebCore.pro:
1861
1862 2007-06-07  Sam Weinig  <sam@webkit.org>
1863
1864         Gdk and Qt build fix.
1865
1866         * WebCore.pro:
1867
1868 2007-06-06  Sam Weinig  <sam@webkit.org>
1869
1870         Reviewed by Hyatt.
1871
1872         Patch for http://bugs.webkit.org/show_bug.cgi?id=13973
1873         Autogenerate most of the rest of kjs_dom.h/cpp
1874
1875         - Autogenerate JSNodeList and JSNamedNodeMap.
1876         - Move JSEventTargetNode, JSNamedNodesCollection, and JSDOMExceptionConstructor 
1877           into their own files.
1878         - Rename KJS::DOMEventTargeNode to WebCore::JSEventTargetNode to adhere
1879           to convention and allow easier code generation.
1880         - Add JS constructors for JSNodeList and JSNamedNodeMap.
1881         - Moved more toJS methods into the correct (corresponding) header files.
1882         - Cleaned up code in order for changes to work.
1883
1884         * DerivedSources.make:
1885         * WebCore.xcodeproj/project.pbxproj:
1886         * bindings/js/JSDOMExceptionConstructor.cpp: Added.
1887         (WebCore::):
1888         (WebCore::JSDOMExceptionConstructor::JSDOMExceptionConstructor):
1889         (WebCore::JSDOMExceptionConstructor::getOwnPropertySlot):
1890         (WebCore::JSDOMExceptionConstructor::getValueProperty):
1891         (WebCore::getDOMExceptionConstructor):
1892         * bindings/js/JSDOMExceptionConstructor.h: Added.
1893         (WebCore::JSDOMExceptionConstructor::classInfo):
1894         * bindings/js/JSDOMWindowCustom.cpp: Added.
1895         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1896         * bindings/js/JSDocumentCustom.cpp:
1897         (WebCore::JSDocument::mark):
1898         (WebCore::toJS):
1899         * bindings/js/JSEventTargetNode.cpp: Added.
1900         (WebCore::JSEventTargetNode::JSEventTargetNode):
1901         (WebCore::JSEventTargetNode::getOwnPropertySlot):
1902         (WebCore::JSEventTargetNode::getValueProperty):
1903         (WebCore::JSEventTargetNode::put):
1904         (WebCore::JSEventTargetNode::putValueProperty):
1905         (WebCore::JSEventTargetNode::setListener):
1906         (WebCore::JSEventTargetNode::getListener):
1907         (WebCore::JSEventTargetNode::pushEventHandlerScope):
1908         (WebCore::JSEventTargetNodePrototypeFunction::callAsFunction):
1909         (WebCore::toEventTargetNode):
1910         * bindings/js/JSEventTargetNode.h: Added.
1911         (WebCore::JSEventTargetNode::):
1912         * bindings/js/JSHTMLElementCustom.cpp:
1913         * bindings/js/JSHTMLFormElementCustom.cpp:
1914         (WebCore::JSHTMLFormElement::nameGetter):
1915         * bindings/js/JSHTMLOptionElementConstructor.cpp:
1916         * bindings/js/JSNamedNodeMapCustom.cpp: Added.
1917         (WebCore::JSNamedNodeMap::canGetItemsForName):
1918         (WebCore::JSNamedNodeMap::nameGetter):
1919         * bindings/js/JSNamedNodesCollection.cpp: Added.
1920         (WebCore::):
1921         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
1922         (WebCore::JSNamedNodesCollection::lengthGetter):
1923         (WebCore::JSNamedNodesCollection::indexGetter):
1924         (WebCore::JSNamedNodesCollection::getOwnPropertySlot):
1925         * bindings/js/JSNamedNodesCollection.h: Added.
1926         (WebCore::JSNamedNodesCollection::classInfo):
1927         * bindings/js/JSNodeCustom.cpp: Added.
1928         (WebCore::toJS):
1929         * bindings/js/JSNodeListCustom.cpp: Added.
1930         (WebCore::JSNodeList::callAsFunction):
1931         (WebCore::JSNodeList::implementsCall):
1932         (WebCore::JSNodeList::canGetItemsForName):
1933         (WebCore::JSNodeList::nameGetter):
1934         * bindings/js/kjs_dom.cpp:
1935         * bindings/js/kjs_dom.h:
1936         * bindings/js/kjs_domnode.h:
1937         * bindings/js/kjs_events.cpp:
1938         (KJS::JSLazyEventListener::parseCode):
1939         * bindings/js/kjs_html.cpp:
1940         (KJS::JSHTMLCollection::getNamedItems):
1941         * bindings/js/kjs_html.h:
1942         * bindings/js/kjs_window.cpp:
1943         (WebCore::toJS):
1944         * bindings/js/kjs_window.h:
1945         * bindings/objc/DOMInternal.mm:
1946         (-[WebScriptObject _initializeScriptDOMNodeImp]):
1947         * bindings/objc/DOMUtility.mm:
1948         (KJS::createDOMWrapper):
1949         * bindings/scripts/CodeGeneratorJS.pm:
1950         * bridge/mac/WebCoreAXObject.mm:
1951         * dom/Attr.idl:
1952         * dom/CharacterData.idl:
1953         * dom/Document.idl:
1954         * dom/DocumentFragment.idl:
1955         * dom/DocumentType.idl:
1956         * dom/Element.idl:
1957         * dom/NamedNodeMap.idl:
1958         * dom/Node.idl:
1959         * dom/NodeList.idl:
1960         * page/DOMWindow.idl:
1961
1962 2007-06-06  Justin Garcia  <justin.garcia@apple.com>
1963
1964         Reviewed by Oliver.
1965         
1966         <rdar://problem/5245519> CrashTracer: [USER] 457 crashes in Mail at WebCore::CSSComputedStyleDeclaration::copyInheritableProperties()
1967         
1968         If the user pastes something into a region that ends up being
1969         invisible, or if the pasted content contains style spans 
1970         that are render-less, we'll crash when we try to remove
1971         redundant styles from style spans.
1972
1973         * css/CSSComputedStyleDeclaration.cpp:
1974         (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties):
1975         Add null checks.
1976
1977 2007-06-06  Justin Garcia  <justin.garcia@apple.com>
1978
1979         Reviewed by Harrison.
1980
1981         <rdar://problem/4889598> Problems with moveDown: and moveUp: in Notes with ToDos
1982         
1983         The caret would disappear when moving from content above or below
1984         a ToDo if that ToDo doesn't have any content in it with the same
1985         x position as the caret. That's because closestLeafChildForXPos
1986         would return non-editable leaves, and which turn into non-editable
1987         VisiblePositions, which are invisible.
1988
1989         * editing/visible_units.cpp:
1990         (WebCore::previousLinePosition): Ask closestLeafForXPos to only
1991         return editable leaves.
1992         (WebCore::nextLinePosition): Ditto.
1993         * rendering/RootInlineBox.cpp:
1994         (WebCore::isEditableLeaf): Added.
1995         (WebCore::RootInlineBox::closestLeafChildForXPos): If requested,
1996         return the closest editable leaf. Removed an early return if the
1997         position is before the first leaf, it's not really much of an
1998         optimization.
1999         * rendering/RootInlineBox.h:
2000
2001 2007-06-06  Sam Weinig  <sam@webkit.org>
2002
2003         Reviewed by Anders.
2004
2005         Fix release build.
2006
2007         * bindings/objc/DOM.mm:
2008         (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]): Add missing null initialization.
2009         (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]): Add missing null initialization.
2010
2011 2007-06-06  Sam Weinig  <sam@webkit.org>
2012
2013         Reviewed by Hyatt.
2014
2015         Patch for http://bugs.webkit.org/show_bug.cgi?id=13947
2016         Finish autogenerating the JS DOM traversal code
2017
2018         - Completely generate JSNodeFilter.
2019         - Move JSNodeFilterCondition into its own file
2020
2021         * DerivedSources.make:
2022         * WebCore.pro:
2023         * WebCore.xcodeproj/project.pbxproj:
2024         * bindings/js/JSNodeFilterCondition.cpp: Copied from WebCore/bindings/js/kjs_traversal.cpp.
2025         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
2026         (WebCore::JSNodeFilterCondition::mark):
2027         (WebCore::JSNodeFilterCondition::acceptNode):
2028         * bindings/js/JSNodeFilterCondition.h: Copied from WebCore/bindings/js/kjs_traversal.h.
2029         * bindings/js/JSNodeFilterCustom.cpp: Added.
2030         (WebCore::JSNodeFilter::mark):
2031         (WebCore::toNodeFilter):
2032         * bindings/js/kjs_dom.cpp:
2033         * bindings/js/kjs_traversal.cpp: Removed.
2034         * bindings/js/kjs_traversal.h: Removed.
2035         * bindings/js/kjs_window.cpp:
2036         * bindings/objc/DOM.mm:
2037         (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
2038         (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
2039         * bindings/scripts/CodeGeneratorJS.pm:
2040         * dom/Document.cpp:
2041         (WebCore::Document::createNodeIterator):
2042         (WebCore::Document::createTreeWalker):
2043         * dom/Document.h:
2044         * dom/NodeFilter.idl:
2045
2046 2007-06-06  Alp Toker  <alp.toker@collabora.co.uk>
2047
2048         Reviewed by Eric Seidel.
2049
2050         http://bugs.webkit.org/show_bug.cgi?id=14017
2051         Cairo: Unwanted gradient effect for small stretched images
2052
2053         * platform/graphics/cairo/ImageCairo.cpp: Use CAIRO_FILTER_NEAREST to
2054         work around the issue.
2055         (WebCore::BitmapImage::draw):
2056         (WebCore::Image::drawPattern):
2057
2058 2007-06-06  Lars Knoll <lars@trolltech.com>
2059
2060         Reviewed by Zack
2061
2062         Add an API to create and load plugins.
2063         Don't include moc files by hand anymore, rather let
2064         qmake handle them.
2065
2066         * WebCore.pro:
2067         * platform/qt/MimeTypeRegistryQt.cpp:
2068         (WebCore::):
2069         (WebCore::MimeTypeRegistry::getMIMETypeForExtension):
2070         * platform/qt/QWebPopup.cpp:
2071         * platform/qt/SharedTimerQt.cpp:
2072
2073 2007-06-06  Mark Rowe  <mrowe@apple.com>
2074
2075         Qt build fix.
2076
2077         * rendering/RenderTextControl.cpp: Fix case of #include filename.
2078
2079 2007-06-06  Lars Knoll  <lars@trolltech.com>
2080
2081         Reviewed by Maciej.
2082
2083         Define WTF_USE_NPOBJECT for Qt. Fix includes
2084         in HTMLPluginElement and add proper forwarding headers
2085         from JavaScriptCore.
2086
2087         * ForwardingHeaders/bindings/npruntime.h: Added.
2088         * ForwardingHeaders/bindings/runtime.h: Added.
2089         * config.h:
2090         * html/HTMLPlugInElement.cpp:
2091         * html/HTMLPlugInElement.h:
2092
2093 2007-06-06  David Hyatt  <hyatt@apple.com>
2094
2095         Bulletproof windowClipRect, since it can be called at crazy times.
2096         Part of fix for 13972.
2097
2098         Reviewed by olliej
2099
2100         * bindings/objc/DOM.mm:
2101         (-[DOMElement _windowClipRect]):
2102
2103 2007-06-05  MorganL  <morganl.webkit@yahoo.com>
2104
2105         Reviewed by Dave Hyatt.
2106
2107         Fixes http://bugs.webkit.org/show_bug.cgi?id=14008
2108
2109         * rendering/RenderTextControl.cpp:
2110         (WebCore::RenderTextControl::calcHeight):
2111         (WebCore::RenderTextControl::calcPrefWidths):
2112
2113 2007-06-05  Kevin McCullough  <kmccullough@apple.com>
2114
2115         - Respelling Oliver's name right.
2116
2117 2007-06-05  Kevin McCullough  <kmccullough@apple.com>
2118
2119         Reviewed by Mark and Oliver.
2120
2121         - http://bugs.webkit.org/show_bug.cgi?id=13352  REGRESSION: Gmail hangs on send message.
2122         - Now we don't hang, but we do so by avoiding certain legitimate characters, the evangelism bug for this is: <rdar://problem/5252577> gmail does not accept legal characters in the form boundary
2123
2124         * html/HTMLFormElement.cpp:
2125         (WebCore::getUniqueBoundaryString):
2126
2127 2007-06-05  Anders Carlsson  <andersca@apple.com>
2128
2129         Build fix.
2130         
2131         * xml/xmlhttprequest.cpp:
2132         (WebCore::isValidToken):
2133
2134 2007-06-05  Anders Carlsson  <andersca@apple.com>
2135
2136         Reviewed by Geoff.
2137
2138         <rdar://problem/5245555> REGRESSION: HTTP header injection in XMLHttpRequest.setRequestHeader
2139         <rdar://problem/5246208> HTTP injection in XMLHttpRequest.open method parameter
2140         <rdar://problem/5246242> HTTP header injection in HXMLHttpRequest.setRequestHeader header parameter
2141         
2142         Check method names, header names and header values and throw exceptions if any of them are
2143         invalid. This is what the new XMLHttpRequest spec states that we should do.
2144         
2145         * xml/xmlhttprequest.cpp:
2146         (WebCore::isValidToken):
2147         (WebCore::isValidHeaderValue):
2148         (WebCore::XMLHttpRequest::open):
2149         (WebCore::XMLHttpRequest::setRequestHeader):
2150
2151 2007-06-05  Sam Weinig  <sam@webkit.org>
2152
2153         Reviewed by Geoff.
2154
2155         Optimize JSCSSStyleDeclaration after performance regression in r21854.
2156
2157         - Check static table before name getter in JSCSSStyleDeclaration::getOwnPropertySlot()
2158         - Get rid of a string allocation by keeping string as KJS::Identifier for canGetItemsForName()
2159           functions.
2160
2161         * WebCore.xcodeproj/project.pbxproj:
2162         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2163         (WebCore::JSCSSStyleDeclaration::canGetItemsForName):
2164         * bindings/js/JSHTMLAppletElementCustom.cpp:
2165         (WebCore::JSHTMLAppletElement::canGetItemsForName):
2166         * bindings/js/JSHTMLDocumentCustom.cpp:
2167         (WebCore::JSHTMLDocument::canGetItemsForName):
2168         * bindings/js/JSHTMLEmbedElementCustom.cpp:
2169         (WebCore::JSHTMLEmbedElement::canGetItemsForName):
2170         * bindings/js/JSHTMLFormElementCustom.cpp:
2171         (WebCore::JSHTMLFormElement::canGetItemsForName):
2172         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
2173         (WebCore::JSHTMLFrameSetElement::canGetItemsForName):
2174         * bindings/js/JSHTMLObjectElementCustom.cpp:
2175         (WebCore::JSHTMLObjectElement::canGetItemsForName):
2176         * bindings/scripts/CodeGeneratorJS.pm:
2177         * css/CSSStyleDeclaration.idl:
2178
2179 2007-06-04  Sam Weinig  <sam@webkit.org>
2180
2181         Reviewed, tweaked and landed by Anders.
2182
2183         <rdar://problem/5247178> REGRESSION: With CSS Edit 2.5, a crash occurs at WebCore::DeprecatedString::DeprecatedString when page fails to be extracted
2184         
2185         Null check the provisional document loader. If an application stops the load 
2186         inside of the didFailProvisionalLoad delegate method, the provisional document loader will be nulled out.
2187
2188         * loader/FrameLoader.cpp:
2189         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2190
2191 2007-06-04  Alp Toker  <alp.toker@collabora.co.uk>
2192
2193         Reviewed by Anders.
2194
2195         http://bugs.webkit.org/show_bug.cgi?id=13986
2196         Cairo graphics fixes and cleanups
2197
2198         * platform/graphics/ImageBuffer.h:
2199         * platform/graphics/cairo/ImageBufferCairo.cpp:
2200         (WebCore::ImageBuffer::surface): Provide surface() accessor.
2201         * platform/graphics/cairo/AffineTransformCairo.cpp:
2202         (WebCore::AffineTransform::rotate): Convert from degrees to radians to
2203         fix rotation.
2204         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2205         (WebCore::GraphicsContext::drawRect): Add save/restore.
2206         (WebCore::GraphicsContext::rotate): Rename parameter to "radians" to
2207         avoid further confusion.
2208         * platform/graphics/cairo/PathCairo.cpp:
2209         (WebCore::Path::boundingRect): The cairo_fill_extents() parameters do
2210         not describe a point/size but rather the two control points of the
2211         rectangular region.
2212         (WebCore::Path::contains): Remove needless casts.
2213
2214 2007-06-04  Sam Weinig  <sam@webkit.org>
2215
2216         Reviewed by Adam Roben.
2217
2218         Fix the buildbot.
2219
2220         * rendering/RenderSVGContainer.cpp:
2221         (WebCore::RenderSVGContainer::layout):
2222
2223 2007-06-04  Justin Garcia  <justin.garcia@apple.com>
2224
2225         Reviewed by Kimon Tsinteris.
2226
2227         <rdar://problem/5241148> REGRESSION: ActivEdit can't perform operations on certain selections
2228         
2229         Return valid equivalents from these methods (no [img, 1] for 
2230         example). ActivEdit was using positions returned from these
2231         methods to create new DOM Ranges.
2232         
2233         * editing/SelectionController.cpp:
2234         (WebCore::SelectionController::baseNode):
2235         (WebCore::SelectionController::baseOffset):
2236         (WebCore::SelectionController::extentNode):
2237         (WebCore::SelectionController::extentOffset):
2238         (WebCore::SelectionController::anchorNode):
2239         (WebCore::SelectionController::anchorOffset):
2240         (WebCore::SelectionController::focusNode):
2241         (WebCore::SelectionController::focusOffset):
2242         * editing/SelectionController.h:
2243
2244 2007-06-04  Rob Buis  <buis@kde.org>
2245
2246         Fix the svg experimental build.
2247
2248         * ksvg2/svg/SVGFEFloodElement.cpp:
2249
2250 2007-06-04  Rob Buis  <buis@kde.org>
2251
2252         Reviewed by Hyatt.
2253
2254         http://bugs.webkit.org/show_bug.cgi?id=6170
2255         CSS1: Properties for :first-letter aren't recalculated on color change
2256
2257         Mark styles with first-letter as unique.
2258
2259         * css/cssstyleselector.cpp:
2260         (WebCore::CSSStyleSelector::styleForElement):
2261
2262 2007-06-01  Anders Carlsson  <acarlsson@apple.com>
2263
2264         Reviewed by David Harrison.
2265
2266         <rdar://problem/5236843> 
2267         CrashTracer: [USER] 3 crashes in Mail at WebCore::Loader::didReceiveResponse(WebCore::SubresourceLoader*, WebCore::ResourceResponse const&)
2268
2269         This is by no means the best solution for handling user style sheets. I've filed <rdar://problem/5244734> 
2270         for tracking that.
2271         
2272         * loader/loader.cpp:
2273         (WebCore::Loader::didReceiveResponse):
2274         If a load starts while the frame is still in the provisional state 
2275         (this can be the case when loading the user style sheet), committing the load then causes all
2276         requests to be removed from the m_requestsLoading map. This means that req might be null here.
2277         In that case we just return early. 
2278         
2279 2007-06-01  Mitz Pettel  <mitz@webkit.org>
2280
2281         Reviewed by Adele.
2282
2283         - fix http://bugs.webkit.org/show_bug.cgi?id=13958
2284           REGRESSION: Form select menu in iframe destroys form select menu on page
2285
2286         * page/mac/EventHandlerMac.mm:
2287         (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking): Instead of calling
2288         the event handler methods directly, post the fake event on the application event
2289         queue. This ensures that the fake event is handled only after handling of the
2290         initiating event has ended, and is seen by ancestor frames' event handlers.
2291
2292 2007-06-01  George Staikos  <staikos@kde.org>
2293
2294         Reviewed by bdash.
2295
2296         Redo the build fix again after it was backed out
2297
2298         * WebCore.pro: add an include guard around CSSGrammar.h
2299
2300 2007-05-31  Geoffrey Garen  <ggaren@apple.com>
2301
2302         Reviewed by Beth Dakin.
2303
2304         Fixed <rdar://problem/5238177> Continuing after hitting breakpoint doesn't 
2305         execute the next step.
2306         
2307         No test because the only code affected is the debugger, and none of the
2308         relevant API is exported.
2309         
2310         Reverted an accidental change in 21324 that caused originRootObject for
2311         the window object always to be 0. We could probably just remove the debugger's
2312         dependency on originRootObject, but I wanted to be safe.
2313
2314         * page/mac/FrameMac.mm:
2315         (WebCore::Frame::windowScriptObject):
2316
2317 2007-05-31  David Hyatt  <hyatt@apple.com>
2318
2319         Fix for 11768, Flash plugin does not respect clips set via CSS.
2320
2321         Reviewed by olliej
2322
2323         * bindings/objc/DOM.mm:
2324         (-[DOMElement _windowClipRect]):
2325         * bindings/objc/DOMPrivate.h:
2326         * page/FrameView.cpp:
2327         (WebCore::FrameView::windowClipRect):
2328         (WebCore::FrameView::windowClipRectForLayer):
2329         * platform/ScrollView.h:
2330         (WebCore::ScrollView::contentsToWindow):
2331         (WebCore::ScrollView::windowToContents):
2332         * platform/mac/ScrollViewMac.mm:
2333         (WebCore::ScrollView::contentsToWindow):
2334         (WebCore::ScrollView::windowToContents):
2335
2336 2007-05-31  Sam Weinig  <sam@webkit.org>
2337
2338         Reviewed by Adam.
2339
2340         Fix build bot.
2341
2342         * ksvg2/svg/SVGSVGElement.cpp:
2343         (WebCore::SVGSVGElement::setCurrentScale):
2344
2345 2007-05-31  Sam Weinig  <sam@webkit.org>
2346
2347         Fix Qt and Gdk builds.
2348
2349         * WebCore.pro: remove bindings/js/JSHTMLAnchorElementCustom.cpp
2350
2351 2007-05-31  Sam Weinig  <sam@webkit.org>
2352
2353         Reviewed by Geoff.
2354
2355         Patch for http://bugs.webkit.org/show_bug.cgi?id=10782
2356         Classes should not override JSObject::toString(ExecState *)
2357
2358         Remove all overrides of JSObject::toString and JSObject::toPrimitive
2359         which is a bad practice.  Instead, if an object, like the 
2360         HTMLAnchorElement, needs to override to toString, it should add
2361         a function to the JS object which will be called when needed.  This
2362         also allows developers to override toString and valueOf from within JS.
2363
2364         Test: fast/js/toString-and-valueOf-override.html
2365
2366         * WebCore.xcodeproj/project.pbxproj:
2367         * bindings/js/JSHTMLAnchorElementCustom.cpp: Removed.
2368         * bindings/js/kjs_binding.cpp:
2369         * bindings/js/kjs_binding.h:
2370         * bindings/js/kjs_dom.cpp:
2371         * bindings/js/kjs_dom.h:
2372         * bindings/js/kjs_domnode.h:
2373         * bindings/js/kjs_window.cpp:
2374         (KJS::History::):
2375         (KJS::LocationFunc::callAsFunction):
2376         (KJS::SelectionFunc::callAsFunction):
2377         * bindings/js/kjs_window.h:
2378         * bindings/scripts/CodeGeneratorJS.pm:
2379         * html/HTMLAnchorElement.cpp:
2380         (WebCore::HTMLAnchorElement::toString):
2381         * html/HTMLAnchorElement.h:
2382         * html/HTMLAnchorElement.idl:
2383
2384 2007-05-31  Rob Buis  <buis@kde.org>
2385
2386         Reviewed by Darin.
2387
2388         http://bugs.webkit.org/show_bug.cgi?id=11272
2389         Implement currentScale(), setCurrentScale() and currentTranslate() in SVGSVGElement
2390
2391         Allow zooming and panning, thereby implementing the above methods.
2392
2393         * ksvg2/svg/SVGDocument.cpp:
2394         (WebCore::SVGDocument::zoomEnabled):
2395         (WebCore::SVGDocument::startPan):
2396         (WebCore::SVGDocument::updatePan):
2397         * ksvg2/svg/SVGDocument.h:
2398         * ksvg2/svg/SVGSVGElement.cpp:
2399         (WebCore::SVGSVGElement::currentScale):
2400         (WebCore::SVGSVGElement::setCurrentScale):
2401         (WebCore::SVGSVGElement::currentTranslate):
2402         (WebCore::SVGSVGElement::setCurrentTranslate):
2403         * ksvg2/svg/SVGSVGElement.h:
2404         * page/EventHandler.cpp:
2405         (WebCore::EventHandler::EventHandler):
2406         (WebCore::EventHandler::handleMousePressEvent):
2407         (WebCore::EventHandler::handleMouseMoveEvent):
2408         (WebCore::EventHandler::handleMouseReleaseEvent):
2409         * page/EventHandler.h:
2410         * page/Frame.cpp:
2411         (WebCore::Frame::setZoomFactor):
2412         * rendering/RenderSVGContainer.cpp:
2413         (WebCore::RenderSVGContainer::layout):
2414         (WebCore::RenderSVGContainer::paint):
2415         (WebCore::RenderSVGContainer::absoluteTransform):
2416         * rendering/RenderSVGContainer.h:
2417
2418 2007-05-31  Eric Seidel  <eric@webkit.org>
2419
2420         Reviewed by Niko.
2421
2422         Links are activated based on mouse down events instead of click events
2423         http://bugs.webkit.org/show_bug.cgi?id=12570
2424         
2425         Test: svg/custom/prevent-default.svg
2426
2427         * html/HTMLAnchorElement.cpp: use MiddleButton and RightButton instead of 1 and 2
2428         (WebCore::HTMLAnchorElement::defaultEventHandler):
2429         * ksvg2/svg/SVGAElement.cpp:
2430         (WebCore::SVGAElement::defaultEventHandler): make it function more like the HTML side
2431
2432 2007-05-30  Maciej Stachowiak  <mjs@apple.com>
2433
2434         Reviewed by Hyatt.
2435
2436         - fix layout test editing/style/table-selection.html
2437         
2438         This was broken by the change to keep whitespace text nodes in tables. They safely didn't render,
2439         but the font delta style change command would wrap them in spans, creating extra anonymous table
2440         cells.
2441
2442         * editing/ApplyStyleCommand.cpp:
2443         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Don't wrap in a span if the text node
2444         is not rendered.
2445
2446 2007-05-31  Alp Toker  <alp.toker@collabora.co.uk>
2447
2448         Reviewed by Eric Seidel.
2449
2450         http://bugs.webkit.org/show_bug.cgi?id=13941
2451         Rename WebCore/platform/network/gdk to WebCore/platform/network/curl
2452
2453         * WebCore.pro:
2454
2455 2007-05-31  Alp Toker  <alp.toker@collabora.co.uk>
2456
2457         Reviewed by Niko.
2458
2459         Patch for http://bugs.webkit.org/show_bug.cgi?id=13945
2460         GraphicsContextCairo enhancements necessary for SVG support
2461
2462         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2463         (WebCore::GraphicsContext::concatCTM):
2464         (WebCore::GraphicsContext::beginPath):
2465         (WebCore::GraphicsContext::addPath):
2466
2467 2007-05-31  Patti Hoa <patti@apple.com>
2468
2469         Reviewed by Darin.
2470         
2471         <rdar://problem/5221920> AXLink is returning a CFString instead of a CFURL for AXURL
2472
2473         * bridge/mac/WebCoreAXObject.mm:
2474         (-[WebCoreAXObject accessibilityAttributeValue:]):
2475         Convert the url string to an NSURL before returning as the AXURLAttribute
2476
2477 2007-05-30  Sam Weinig  <sam@webkit.org>
2478
2479         Reviewed by Oliver.
2480
2481         Patch for http://bugs.webkit.org/show_bug.cgi?id=13943
2482         Autogenerate the JS bindings for the CSSStyleSheet
2483
2484         * DerivedSources.make:
2485         * WebCore.pro:
2486         * WebCore.xcodeproj/project.pbxproj:
2487         * bindings/js/JSStyleSheetCustom.cpp:
2488         (WebCore::toJS):
2489         * bindings/js/kjs_css.cpp:
2490         * bindings/js/kjs_css.h:
2491         * bindings/scripts/CodeGeneratorJS.pm:
2492         * css/CSSStyleSheet.cpp:
2493         (WebCore::CSSStyleSheet::addRule):
2494         (WebCore::CSSStyleSheet::cssRules):
2495         * css/CSSStyleSheet.h:
2496         (WebCore::CSSStyleSheet::rules):
2497         (WebCore::CSSStyleSheet::removeRule):
2498         * css/CSSStyleSheet.idl:
2499         * page/DOMWindow.idl:
2500
2501 2007-05-30  Sam Weinig  <sam@webkit.org>
2502
2503         Reviewed by Oliver.
2504
2505         Patch for http://bugs.webkit.org/show_bug.cgi?id=13937
2506         Autogenerate the JS bindings for the CSSValue
2507
2508         * WebCore.pro:
2509         * WebCore.xcodeproj/project.pbxproj:
2510         * bindings/js/JSCSSValueCustom.cpp: Added.
2511         (WebCore::toJS):
2512         * bindings/js/kjs_css.cpp:
2513         * bindings/js/kjs_css.h:
2514         * bindings/objc/DOMUtility.mm:
2515         (KJS::createDOMWrapper):
2516         * bindings/scripts/CodeGeneratorJS.pm:
2517         * css/CSSValue.h:
2518         (WebCore::CSSValue::setCssText):
2519         * css/CSSValue.idl:
2520
2521 2007-05-30  Sam Weinig  <sam@webkit.org>
2522
2523         Reviewed by Oliver the Hun.
2524
2525         Patch for http://bugs.webkit.org/show_bug.cgi?id=13944
2526         Generate and add missing JS constructors
2527
2528         * css/CSSRuleList.idl:
2529         * css/CSSValueList.idl:
2530         * css/Counter.idl:
2531         * page/DOMWindow.idl:
2532
2533 2007-05-30  Justin Garcia  <justin.garcia@apple.com>
2534  
2535         Reviewed by Darin.
2536  
2537         http://bugs.webkit.org/show_bug.cgi?id=13915
2538         REGRESSION(r21687): editing/inserting/paragraph-separator-* failing pixel test (misspelling markers)
2539
2540         After r21687, SimplifiedBackwardsTextIterator was no longer 
2541         emitting a '\n' as it left the first block of a range ending 
2542         at [block, 0]. So, foo<div>^<br></div> looked like foo^ to
2543         spell checking (foo wasn't marked as misspelled).
2544
2545         After r21687, SBTI stopped emitting '\n's in the above case 
2546         because 1) we stopped incorrectly emitting '\n's for nodes as 
2547         we entered them and 2) we were and still are incorrectly calling 
2548         code that should only be called when entering nodes as we leave 
2549         them and 3) we don't call exitNode(), which is responsible 
2550         for emitting the '\n' in the above testcase, when we should.
2551
2552         Before and after r21687, we'd call exitNode() for a node as 
2553         we traversed in reverse pre-order from its first descendant 
2554         out to its sibling or one of its ancestors' siblings.  We 
2555         weren't calling it a) after we'd enter a node that could 
2556         have children but had none and b) when leaving a container 
2557         that contained the end of the range used to create the iterator.
2558
2559         * editing/TextIterator.cpp:
2560         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
2561         (WebCore::SimplifiedBackwardsTextIterator::advance): Call exitNode() as we
2562         leave a childless container node and a node where the range ended.
2563         * editing/TextIterator.h: Track the end of the range used to create
2564         the SimplifiedBackwardsTextIterator.
2565
2566 2007-05-30  Alp Toker  <alp.toker@collabora.co.uk>
2567
2568         Reviewed by Brady.
2569
2570         Enable logging in the Gdk port.
2571         http://bugs.webkit.org/show_bug.cgi?id=13936
2572
2573         * WebCore.pro:
2574         * platform/NotImplemented.h: Changed to use WTFLogVerbose.
2575         * platform/gdk/LoggingGdk.cpp: Added.
2576         (WebCore::InitializeLoggingChannelsIfNecessary):
2577
2578 2007-05-30  Beth Dakin  <bdakin@apple.com>
2579
2580         Reviewed by Hyatt.
2581
2582         Fix for <rdar://problem/5198882> CrashTracer: [USER] 7 crashes in 
2583         Safari at com.apple.WebCore: WebCore::RenderBlock::layoutBlock + 
2584         2360
2585
2586         The problem is that we are re-entering layout when we should not. 
2587         http://trac.webkit.org/projects/webkit/changeset/21778 actually 
2588         fixed this crash, but we have been inspired to add the same guard 
2589         in two other possibly-dangerous places.
2590
2591         * page/FrameView.cpp:
2592         (WebCore::FrameView::layout): Add the guard in two more places.
2593
2594 2007-05-30  Justin Garcia  <justin.garcia@apple.com>
2595
2596         Reviewed by Oliver.
2597
2598         <rdar://problem/5096134> VO gets stuck on Howto.apple.com
2599         http://bugs.webkit.org/show_bug.cgi?id=8622
2600         VisiblePositions aren't canonicalized in some cases
2601         
2602         No new test cases added: can't write automated tests 
2603         for VO.
2604
2605         * editing/IndentOutdentCommand.cpp:
2606         (WebCore::IndentOutdentCommand::outdentParagraph):
2607         VisiblePositions must be recomputed after nodes that
2608         may have effected their canonicalization are removed.
2609         * editing/VisiblePosition.cpp:
2610         (WebCore::canonicalizeCandidate): Added.
2611         (WebCore::VisiblePosition::canonicalPosition): Canonicalize
2612         the candidates returned by next/previousCandidate before
2613         returning them.
2614         * editing/VisiblePosition.h:
2615         (WebCore::operator==): Remove the workaround for 8622.
2616         * editing/visible_units.cpp:
2617         (WebCore::startOfParagraph): Ditto.
2618
2619 2007-05-30  Sam Weinig  <sam@webkit.org>
2620
2621         Reviewed by Dr. Harrison.
2622
2623         Patch for http://bugs.webkit.org/show_bug.cgi?id=13868
2624         REGRESSION: crash on accessing a new iframe's contentWindow property
2625
2626         Adds a null check in for the contentWindow property for HTMLIFrameElement
2627         and HTMLFrameElement.
2628
2629         * bindings/scripts/CodeGeneratorJS.pm:
2630         * html/HTMLFrameElement.idl:
2631         * html/HTMLIFrameElement.idl:
2632
2633 2007-05-30  Mitz Pettel  <mitz@webkit.org>
2634
2635         Reviewed by Darin.
2636
2637         - fix http://bugs.webkit.org/show_bug.cgi?id=13775
2638           REGRESSION: Popup button text should use "natural" directionality to match the items in the popup menu
2639
2640         Test: fast/forms/select-writing-direction-natural.html
2641
2642         * platform/PopupMenu.h: Added the static method itemWritingDirectionIsNatural
2643         which says whether items in the popup ignore the CSS text-align and direction
2644         properties and instead are left-aligned and use natural writing direction.
2645         * platform/gdk/PopupMenuGdk.cpp:
2646         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
2647         * platform/mac/PopupMenuMac.mm:
2648         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
2649         * platform/qt/PopupMenuQt.cpp:
2650         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
2651         * platform/win/TemporaryLinkStubs.cpp:
2652         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
2653         * platform/wx/TemporaryLinkStubs.cpp:
2654         (PopupMenu::itemWritingDirectionIsNatural):
2655         * rendering/RenderMenuList.cpp:
2656         (WebCore::textDirectionForParagraph): Added this helper function that uses
2657         the Unicode Bidi Algorithm rules P2 and P3 to determine the writing direction
2658         of text.
2659         (WebCore::RenderMenuList::adjustInnerStyle): Made the alignment and direction
2660         adjustment conditional on the popup implementation.
2661         (WebCore::RenderMenuList::setText): Added call to adjustInnerStyle() since
2662         the style depends on the text when natural writing direction is used.
2663
2664 2007-05-30  Timothy Hatcher  <timothy@apple.com>
2665
2666         Reviewed by Darin.
2667
2668         <rdar://problem/5200795> REGRESSION (r21057): lineBoxRects doesn't match actual text when wrapping occurs
2669
2670         Use box->end() instead of box->len().
2671
2672         * rendering/RenderText.cpp:
2673         (WebCore::RenderText::addLineBoxRects):
2674
2675 2007-05-30  Sam Weinig  <sam@webkit.org>
2676
2677         Reviewed by Darin.
2678
2679         Patch for http://bugs.webkit.org/show_bug.cgi?id=13919
2680         Autogenerate the JS bindings for the CSSRule and its subclasses
2681
2682         - subclasses generated are CSSCharsetRule, CSSFontFaceRule, CSSImportRule
2683           CSSMediaRule, CSSPageRule and CSSStyleRule.
2684
2685         * DerivedSources.make:
2686         * WebCore.pro:
2687         * WebCore.xcodeproj/project.pbxproj:
2688         * bindings/js/JSCSSRuleCustom.cpp: Added.
2689         (WebCore::toJS):
2690         * bindings/js/kjs_css.cpp:
2691         * bindings/js/kjs_css.h:
2692         * bindings/objc/DOMUtility.mm:
2693         (KJS::createDOMWrapper):
2694         * bindings/scripts/CodeGeneratorJS.pm:
2695         * css/CSSCharsetRule.h:
2696         (WebCore::CSSCharsetRule::setEncoding):
2697         * css/CSSCharsetRule.idl:
2698         * css/CSSFontFaceRule.idl:
2699         * css/CSSImportRule.idl:
2700         * css/CSSMediaRule.idl:
2701         * css/CSSPageRule.cpp:
2702         (WebCore::CSSPageRule::setSelectorText):
2703         * css/CSSPageRule.h:
2704         * css/CSSPageRule.idl:
2705         * css/CSSRule.cpp:
2706         (WebCore::CSSRule::setCssText):
2707         * css/CSSRule.h:
2708         * css/CSSRule.idl:
2709         * css/CSSStyleRule.cpp:
2710         (WebCore::CSSStyleRule::setSelectorText):
2711         * css/CSSStyleRule.h:
2712         * css/CSSStyleRule.idl:
2713         * page/DOMWindow.idl: add new constructors.
2714
2715 2007-05-30  Mark Rowe  <mrowe@apple.com>
2716
2717         Build fixes after r21889.  Add missing #includes.
2718
2719         * ForwardingHeaders/kjs/function.h: Added.
2720         * bindings/js/kjs_binding.h:
2721         * bindings/js/kjs_dom.h:
2722         * bindings/js/kjs_window.h:
2723
2724 2007-05-30  Mark Rowe  <mrowe@apple.com>
2725
2726         Gdk build fix.  Update WidgetGdk to use NotImplemented.h.
2727
2728         * platform/gdk/WidgetGdk.cpp:
2729         (WebCore::Widget::setEnabled):
2730         (WebCore::Widget::isEnabled):
2731         (WebCore::Widget::removeFromParent):
2732         (WebCore::Widget::paint):
2733         (WebCore::Widget::setIsSelected):
2734
2735 2007-05-29  Holger Freyther  <zecke@selfish.org>
2736
2737         Reviewed by Anders.
2738
2739         Make ScrollView use a GtkLayout. This class matches QScrollView the most and promises
2740         to ease the implementation of ScrollView::addChild. GtkLayout should be resource friendly
2741         even with huge width and heights of frames.
2742         Make Widget aware of GtkLayout to use the right GdkWindow as drawable. For GtkLayout one must
2743         draw on the bin_window.
2744         Remove the layer violation from FrameGdk.cpp and ScrollView. FrameGdk is no longer responsible to
2745         implement scrolling on keyboard events. ScrollView is no longer required to know that it could be
2746         a FrameView and handles scrolling of Frames magically.
2747
2748         * platform/ScrollView.h:
2749         * platform/gdk/FrameGdk.cpp:
2750         (WebCore::FrameGdk::keyPress):
2751         (WebCore::FrameGdk::handleGdkEvent):
2752         * platform/gdk/ScrollViewGdk.cpp:
2753         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
2754         (WebCore::ScrollView::updateContents):
2755         (WebCore::ScrollView::visibleWidth):
2756         (WebCore::ScrollView::visibleHeight):
2757         (WebCore::ScrollView::visibleContentRect):
2758         (WebCore::ScrollView::resizeContents):
2759         (WebCore::ScrollView::contentsX):
2760         (WebCore::ScrollView::contentsY):
2761         (WebCore::ScrollView::scrollOffset):
2762         (WebCore::ScrollView::scrollBy):
2763         (WebCore::ScrollView::setFrameGeometry):
2764         (WebCore::ScrollView::updateGeometry):
2765         (WebCore::ScrollView::setGtkWidget):
2766         (WebCore::ScrollView::updateScrollbars):
2767         (WebCore::ScrollView::windowToContents):
2768         (WebCore::ScrollView::contentsToWindow):
2769         (WebCore::ScrollView::scrollbarUnderMouse):
2770         * platform/gdk/TemporaryLinkStubs.cpp: Move Widget methods to WidgetGdk.cpp
2771         * platform/gdk/WidgetGdk.cpp:
2772         (WebCore::Widget::setGtkWidget):
2773         (WebCore::Widget::setFrameGeometry):
2774         (WebCore::Widget::setEnabled):
2775         (WebCore::Widget::isEnabled):
2776         (WebCore::Widget::removeFromParent):
2777         (WebCore::Widget::paint):
2778         (WebCore::Widget::setIsSelected):
2779         (WebCore::Widget::invalidate):
2780         (WebCore::Widget::invalidateRect):
2781
2782 2007-05-29  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2783
2784         Reviewed by Maciej.
2785
2786         Curl (linux/gdk) networking improvements: 
2787         a) POST support
2788         b) don't use CURL in a re-entrant way.
2789         c) turn on curl's internal debugging support in a debug build if the DEBUG_CURL environment variable is set.
2790
2791         * platform/network/ResourceHandleInternal.h:
2792         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2793         * platform/network/gdk/ResourceHandleCurl.cpp:
2794         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2795         * platform/network/gdk/ResourceHandleManager.cpp:
2796         (WebCore::ResourceHandleManager::ResourceHandleManager):
2797         (WebCore::writeCallback):
2798         (WebCore::ResourceHandleManager::downloadTimerCallback):
2799         (WebCore::ResourceHandleManager::setupPOST):
2800         (WebCore::ResourceHandleManager::add):
2801         (WebCore::ResourceHandleManager::removeScheduledJob):
2802         (WebCore::ResourceHandleManager::startScheduledJobs):
2803         (WebCore::ResourceHandleManager::startJob):
2804         (WebCore::ResourceHandleManager::cancel):
2805         * platform/network/gdk/ResourceHandleManager.h:
2806         (WebCore::ResourceHandleList::ResourceHandleList):
2807         (WebCore::ResourceHandleList::next):
2808         (WebCore::ResourceHandleList::job):
2809         (WebCore::ResourceHandleList::setRemoved):
2810         (WebCore::ResourceHandleList::removed):
2811
2812 2007-05-29  Sam Weinig  <sam@webkit.org>
2813
2814         Fix the Qt and Gdk builds.
2815
2816         * WebCore.pro:
2817
2818 2007-05-29  Adele Peterson  <adele@apple.com>
2819
2820         Reviewed by Adam.
2821
2822         Fix for <rdar://problem/5109711> REGRESSION: Focus ring artifacts appear around a widget's search field at times (Address Book, Dictionary)
2823
2824         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSearchField):
2825           We only need this hack for drawing the search field focus ring on Tiger.  On Leopard, drawWithFrame correctly draws the cell's focus ring.
2826
2827 2007-05-29  Alp Toker  <alp.toker@collabora.co.uk>
2828
2829         Reviewed by Mitz.
2830
2831         Patch for http://bugs.webkit.org/show_bug.cgi?id=13899
2832
2833         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2834         (WebCore::GraphicsContext::strokeArc): Use cairo_arc_negative() to fix
2835         CSS rounded borders.
2836         (WebCore::GraphicsContext::beginTransparencyLayer):
2837         (WebCore::GraphicsContext::endTransparencyLayer): save/restore is
2838         redundant. push/pop group does this implicitly.
2839
2840 2007-05-29  Sam Weinig  <sam@webkit.org>
2841
2842         Reviewed by Oliver.
2843
2844         Patch for http://bugs.webkit.org/show_bug.cgi?id=13912
2845         Autogenerate the JS bindings for the MediaList
2846
2847         * DerivedSources.make:
2848         * WebCore.xcodeproj/project.pbxproj:
2849         * bindings/js/kjs_css.cpp:
2850         * bindings/js/kjs_css.h:
2851         * bindings/objc/DOMUtility.mm:
2852         (KJS::createDOMWrapper):
2853         * bindings/scripts/CodeGeneratorJS.pm:
2854         * css/MediaList.idl:
2855         * page/DOMWindow.idl: Add constructor.
2856
2857 2007-05-29  Matt Perry  <mpComplete@gmail.com>
2858
2859         Reviewed by Maciej.
2860
2861         Fixed some rendering issues for <select>s on Windows.
2862
2863         * rendering/RenderThemeWin.cpp:
2864         (WebCore::RenderThemeWin::adjustMenuListStyle):
2865         (WebCore::RenderThemeWin::paintMenuList):
2866         * rendering/RenderThemeWin.h:
2867
2868 2007-05-29  David Hyatt  <hyatt@apple.com>
2869
2870         Fold the invalidateVerticalPositions crawl into the bidi iteration.
2871         This makes it more correct (since we won't drill into elements that
2872         did not need to be reset) and cuts out an extra walk of all our children.
2873         We're still O(n^2) as new content streams in, but this at least cuts
2874         out one separate O(n^2) crawl.
2875
2876         Reviewed by olliej
2877
2878         * rendering/RenderObject.cpp:
2879         * rendering/RenderObject.h:
2880         (WebCore::RenderObject::invalidateVerticalPosition):
2881         * rendering/bidi.cpp:
2882         (WebCore::RenderBlock::layoutInlineChildren):
2883
2884 2007-05-29  Sam Weinig  <sam@webkit.org>
2885
2886         Reviewed by Oliver.
2887
2888         Patch for http://bugs.webkit.org/show_bug.cgi?id=13908
2889         Autogenerate the JS bindings for the StyleSheet
2890
2891         * DerivedSources.make:
2892         * WebCore.xcodeproj/project.pbxproj:
2893         * bindings/js/JSStyleSheetCustom.cpp: Added.
2894         (WebCore::toJS):
2895         (WebCore::JSStyleSheet::toBoolean):
2896         * bindings/js/kjs_css.cpp:
2897         (KJS::):
2898         (KJS::DOMCSSStyleSheet::DOMCSSStyleSheet):
2899         (KJS::DOMCSSStyleSheet::getOwnPropertySlot):
2900         * bindings/js/kjs_css.h:
2901         * bindings/objc/DOMUtility.mm:
2902         (KJS::createDOMWrapper):
2903         * bindings/scripts/CodeGeneratorJS.pm:
2904         * css/StyleSheet.idl:
2905         * page/DOMWindow.idl: Add new constructor.
2906
2907 2007-05-29  David Hyatt  <hyatt@apple.com>
2908
2909         Make sure <embed> does not allow an end tag.
2910
2911         Reviewed by olliej
2912
2913         * html/HTMLEmbedElement.h:
2914         (WebCore::HTMLEmbedElement::endTagRequirement):
2915
2916 2007-05-29  Adele Peterson  <adele@apple.com>
2917
2918         Reviewed by Brady.
2919
2920         Fix for <rdar://problem/5213039> REGRESSION: Wells Fargo registration page returns blank
2921
2922         Roll out updated fix for 11866 that tried to make reset work for hidden inputs.  Since
2923         all browsers update the value attribute when setting the value, it doesn't really make sense to reset.
2924         Its true that IE does support resetting these controls, but in this case, it doesn't really make sense to have
2925         another place to store an alternate version of the value.
2926
2927         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::reset):
2928         * html/HTMLInputElement.h:
2929
2930 2007-05-29  Darin Adler  <darin@apple.com>
2931
2932         Reviewed by Anders.
2933
2934         - removed the general case optimization for innerHTML because some sites
2935           rely on setting innerHTML to trigger loading plug-ins for example; we
2936           could consider bringing it back some day, perhaps with a list of element
2937           types to exclude
2938
2939         * dom/CharacterData.cpp: (WebCore::CharacterData::setData):
2940         Do nothing if the old data is identical to the new data.
2941
2942         * html/HTMLElement.cpp:
2943         (WebCore::replaceChildrenWithFragment): Remove childrenAreEqual optimization.
2944         (WebCore::replaceChildrenWithText): Remove optimization for cases where the
2945         text data is identical to the new data, since CharacterData handles that now.
2946         (WebCore::HTMLElement::setOuterHTML): Remove childrenAreEqual optimization.
2947
2948 2007-05-29  Mitz Pettel  <mitz@webkit.org>
2949
2950         Reviewed by Maciej.
2951
2952         - fix http://bugs.webkit.org/show_bug.cgi?id=13904
2953           REGRESSION: Search fields with a results popup do not always draw the popup arrow
2954
2955         Covered by fast/forms/box-shadow-override.html
2956
2957         The search button draws a popup arrow depending on whether the
2958         search menu template is set, rather than on the maximum number of recent
2959         search strings.
2960
2961         * rendering/RenderThemeMac.h:
2962         * rendering/RenderThemeMac.mm:
2963         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Removed the
2964         call to -setMaxmiumRecents:.
2965         (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Replaced calling
2966         -setMaximumRecents: with setting the search menu template.
2967         (WebCore::RenderThemeMac::search): Removed initialization of the menu.
2968         (WebCore::RenderThemeMac::searchMenuTemplate): Added. Returns an empty
2969         NSMenu to be used as the search menu template.
2970
2971 2007-05-29  David Hyatt  <hyatt@apple.com>
2972
2973         Fix for bug 13907, <noscript> should be allowed inside <head> when
2974         scripting is enabled.
2975
2976         Reviewed by aroben
2977
2978         * html/HTMLHeadElement.cpp:
2979         (WebCore::HTMLHeadElement::checkDTD):
2980         * html/HTMLParser.cpp:
2981         (WebCore::HTMLParser::handleError):
2982         * html/HTMLParserErrorCodes.cpp:
2983         (WebCore::htmlParserErrorMessageTemplate):
2984         * html/HTMLParserErrorCodes.h:
2985
2986 2007-05-29  Mitz Pettel  <mitz@webkit.org>
2987
2988         Reviewed by Maciej.
2989
2990         - fix crash in http://bugs.webkit.org/show_bug.cgi?id=13792
2991           REGRESSION: WebKit doesn't show this javascript screenshot page (and crashes after click on its "hidden link")
2992
2993         Test: fast/frames/removal-before-attach-crash.html
2994
2995         Delayed the queueing of the post-attach callback until attach().
2996
2997         * html/HTMLFrameElementBase.cpp:
2998         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
2999         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Replaced call to the
3000         HTMLElement implementation with a call to the HTMLFrameOwnerElement
3001         implementation, as the latter is the parent class.
3002         (WebCore::HTMLFrameElementBase::insertedIntoDocument): Instead of queueing
3003         the post-attach callback here, just set a flag telling us to do so
3004         at the beginning of attach().
3005         (WebCore::HTMLFrameElementBase::removedFromDocument): Reset the above flag.
3006         (WebCore::HTMLFrameElementBase::attach): If this is the first attach() after
3007         being inserted into the document, queue a post-attach callback to load the
3008         frame.
3009         (WebCore::HTMLFrameElementBase::willRemove): Changed to call up to the correct
3010         parent class.
3011         (WebCore::HTMLFrameElementBase::setFocus): Ditto.
3012         * html/HTMLFrameElementBase.h:
3013         * html/HTMLPlugInElement.cpp:
3014         (WebCore::HTMLPlugInElement::mapToEntry): Replaced call to the HTMLElement
3015         implementation with a call to the HTMLFrameOwnerElement implementation,
3016         as the latter is the parent class.
3017         (WebCore::HTMLPlugInElement::parseMappedAttribute): Ditto.
3018         (WebCore::HTMLPlugInElement::checkDTD): Ditto.
3019         (WebCore::HTMLPlugInElement::detach): Ditto.
3020
3021 2007-05-29  Darin Adler  <darin@apple.com>
3022
3023         Reviewed by Maciej.
3024
3025         - fix http://bugs.webkit.org/show_bug.cgi?id=13602
3026           Amazon product pages keep repainting over and over again
3027
3028         - fix first-letter when the text of the affected text node is changed
3029
3030         Optimize setInnerHTML, setOuterHTML, and setInnerText so they don't change the DOM at all
3031         if they don't need to.
3032
3033         Test: fast/dom/HTMLElement/set-inner-outer-optimization.html
3034         Test: fast/css/first-letter-detach.html
3035
3036         * html/HTMLElement.cpp:
3037         (WebCore::equal): Added. Helper function that compares two Text nodes or two NamedAttrMap
3038         attribute maps.
3039         (WebCore::shallowEqual): Added. Helper function that compares two Element nodes or two
3040         arbitrary nodes.
3041         (WebCore::childrenAreEqual): Added. Helper functions that compare children of nodes.
3042         (WebCore::hasOneChild): Added. Helper function.
3043         (WebCore::hasOneTextChild): Added. Helper function.
3044         (WebCore::replaceChildrenWithFragment): Added. Helper function used by setInnerHTML and
3045         setInnerText. Optimizes the cases where all the nodes are the same, where both the current
3046         and the new content are single text nodes, and where the current content is a single node
3047         that can be replaced with replaceChild.
3048         (WebCore::replaceChildrenWithText): Added. Helper function used by setInnerText. Optimizes
3049         the case where the current content is a single text node or a single node that can be
3050         replaced with replaceChild.
3051         (WebCore::HTMLElement::setInnerHTML): Changed to call replaceChildrenWithFragment.
3052         (WebCore::HTMLElement::setOuterHTML): Added special case to optimize when the new content
3053         exactly matches the current node.
3054         (WebCore::HTMLElement::setInnerText): Changed to call replaceChildrenWithText in a few
3055         cases instead of doing removeChildren/appendChild. Changed code that was using
3056         DeprecatedString to instead use String. Changed general case to use a document fragment
3057         and replaceChildrenWithFragment.
3058
3059         * dom/CharacterData.cpp: (WebCore::CharacterData::dispatchModifiedEvent):
3060         Fixed bug where we would not dispatch the DOMSubtreeModified event unless someone
3061         was registered for the DOMCharacterDataModified event. Caused trouble in the test.
3062
3063         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): Set first-letter
3064         after the setStyle call so calls to setTextInternal inside setStyle don't clear it.
3065
3066         * rendering/RenderText.h: Made setTextInternal virtual so that RenderTextFragment can do
3067         appropriate work when the text changes.
3068
3069         * rendering/RenderTextFragment.h: Added an override of setTextInternal. Removed the
3070         firstLetter parameter to the constructor and made it a separate setter. Also changed
3071         m_generatedContentStr to m_contentString to match the getter function.
3072         * rendering/RenderTextFragment.cpp:
3073         (WebCore::RenderTextFragment::RenderTextFragment): Removed firstLetter parameter.
3074         (WebCore::RenderTextFragment::setTextInternal): When the text changes, destroy the
3075         first-letter node and reset the fragment values so that RenderBlock::updateFirstLetter,
3076         which will run during layout, will create a new first-letter child. Otherwise we end up
3077         with the first letter of the old text.
3078
3079 2007-05-29  Sam Weinig  <sam@webkit.org>
3080
3081         Fix Qt build.
3082
3083         * platform/NotImplemented.h:
3084
3085 2007-05-29  Sam Weinig  <sam@webkit.org>
3086
3087         Reviewed by Adam Roben.
3088
3089         Consolidate platform dependent notImplemented() macros
3090         into one platform independent macro that uses WTFLog.
3091
3092         * platform/NotImplemented.h:
3093
3094 2007-05-29  Darin Adler  <darin@apple.com>
3095
3096         Reviewed by Sam.
3097
3098         - a clean-up pass on form-related aspects of the recent JSHTMLElement patch
3099
3100         * bindings/js/JSHTMLElementCustom.cpp: (WebCore::JSHTMLElement::pushEventHandlerScope):
3101         Replace the call to formForEventHandlerScope() with a call to the new form() function.
3102         And removed the now-uneeded code to search for a form ancestor.
3103
3104         * html/HTMLElement.h: Added a general-purpose form() function. The intent is to return
3105         the form ancestor if any, but return the associated form for a form control, which isn't
3106         always an ancestor of the control. To keep form() efficient for form controls, it's an
3107         inline that calls a virtual, allowing a derived class to override it with an inline.
3108         This replaces formForEventHandlerScope(). Also added findFormAncestor() to use here and
3109         to replace the multiple loops found elsewhere to search for the nearest form ancestor.
3110         * html/HTMLElement.cpp:
3111         (WebCore::HTMLElement::findFormAncestor): Added.
3112         (WebCore::HTMLElement::virtualForm): Added. Calls findFormAncestor().
3113
3114         * html/HTMLGenericFormElement.h: Suggested name change to HTMLFormControlElement.
3115         Removed the confusing getForm() function, which is superceded by findFormAncestor.
3116         Removed the unused onSelect() function. Removed the override of formForEventHandlerScope(),
3117         replacing it with an override of virtualForm().
3118         * html/HTMLGenericFormElement.cpp:
3119         (WebCore::HTMLGenericFormElement::HTMLGenericFormElement): Use findFormAncestor
3120         instead of getForm.
3121         (WebCore::HTMLGenericFormElement::insertedIntoTree): Ditto.
3122         (WebCore::HTMLGenericFormElement::virtualForm): Added.
3123
3124         * html/HTMLLabelElement.h: Removed now-unneeded form() and formForEventHandlerScope()
3125         functions, since base class behavior is now good enough. Renamed formElement() to
3126         correspondingControl(), since that's the terminology used elsewhere in the code,
3127         and the old name was unnecessarily confusing.
3128         * html/HTMLLabelElement.cpp:
3129         (WebCore::HTMLLabelElement::correspondingControl): Renamed. Removed unnecessary
3130         special case for empty ID, since getElementById already returns 0 for that case.
3131         (WebCore::HTMLLabelElement::setActive): Updated for name change.
3132         (WebCore::HTMLLabelElement::setHovered): Ditto.
3133         (WebCore::HTMLLabelElement::defaultEventHandler): Ditto.
3134         (WebCore::HTMLLabelElement::focus): Ditto.
3135         (WebCore::HTMLLabelElement::accessKeyAction): Ditto.
3136
3137         * html/HTMLObjectElement.h: Removed now-unneeded form() and formForEventHandlerScope()
3138         functions, since base class behavior is now good enough. Also removed forward
3139         declaration of KJS::Bindings::Instance -- since the type is the return value of a
3140         function from the base class, it's guaranteed to be declared in the base class header.
3141         * html/HTMLObjectElement.cpp: Ditto.
3142
3143         * bridge/mac/WebCoreAXObject.mm: (labelForElement): Updated for name change.
3144
3145 2007-05-29  Zack Rusin  <zrusin@trolltech.com>
3146
3147         Reviewed by George and Niko
3148
3149         Making the convenience method notImplemented convenient
3150         for the Qt port.
3151
3152         * platform/NotImplemented.h:
3153
3154 2007-05-28  Sam Weinig  <sam@webkit.org>
3155
3156         Reviewed by Geoff.
3157
3158         - Patch for http://bugs.webkit.org/show_bug.cgi?id=13902
3159           Autogenerate the JS bindings for the CSSStyleDeclaration
3160
3161         * WebCore.pro:
3162         * WebCore.xcodeproj/project.pbxproj:
3163         * bindings/js/JSCSSStyleDeclarationCustom.cpp: Added.
3164         (WebCore::cssPropertyName):
3165         (WebCore::isCSSPropertyName):
3166         (WebCore::JSCSSStyleDeclaration::canGetItemsForName):
3167         (WebCore::JSCSSStyleDeclaration::nameGetter):
3168         (WebCore::JSCSSStyleDeclaration::customPut):
3169         * bindings/js/kjs_binding.h:
3170         * bindings/js/kjs_css.cpp:
3171         * bindings/js/kjs_css.h:
3172         * bindings/objc/DOMUtility.mm:
3173         (KJS::createDOMWrapper):
3174         * bindings/scripts/CodeGeneratorJS.pm:
3175         * css/CSSStyleDeclaration.idl:
3176
3177 2007-05-28  Mitz Pettel  <mitz@webkit.org>
3178
3179         Reviewed by Darin.
3180
3181         - fix http://bugs.webkit.org/show_bug.cgi?id=13896
3182           REGRESSION (NativePopup): Reproductible crasher on Google Coop control panel
3183
3184         Test: fast/forms/select-display-none-style-resolve.html
3185
3186         * html/HTMLOptGroupElement.cpp:
3187         (WebCore::HTMLOptGroupElement::attach): Do not compute style if the parent
3188         does not have style.
3189         * html/HTMLOptionElement.cpp:
3190         (WebCore::HTMLOptionElement::attach): Ditto.
3191
3192 2007-05-28  Sam Weinig  <sam@webkit.org>
3193
3194         Fix Gdk and Qt builds.
3195
3196         * WebCore.pro:
3197
3198 2007-05-28  Sam Weinig  <sam@webkit.org>
3199
3200         Reviewed by Darin.
3201
3202         Patch for http://bugs.webkit.org/show_bug.cgi?id=13894
3203         Remove the legacy class KJS::JSHTMLElement
3204
3205         - Now that all of the subclasses of JSHTMLElement are
3206           autogenerated and no longer rely on the legacy parent,
3207           we can remove it and update all the HTML idl files to
3208           reflect so.
3209
3210         - Also adds JSHTMLBlockquoteElement's JS constructor which
3211           was mistakingly missing.
3212
3213         * WebCore.xcodeproj/project.pbxproj:
3214         * bindings/js/JSHTMLAnchorElementCustom.cpp:
3215         (WebCore::JSHTMLAnchorElement::toString):
3216         * bindings/js/JSHTMLElementCustom.cpp: Added.
3217         (WebCore::JSHTMLElement::pushEventHandlerScope):
3218         * bindings/js/JSHTMLElementWrapperFactory.cpp:
3219         (WebCore::createJSHTMLWrapper):
3220         * bindings/js/JSHTMLInputElementBase.cpp:
3221         (WebCore::):
3222         (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
3223         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
3224         (WebCore::JSHTMLInputElementBase::put):
3225         * bindings/js/JSHTMLInputElementBase.h:
3226         * bindings/js/JSHTMLSelectElementCustom.cpp:
3227         * bindings/js/kjs_html.cpp:
3228         (KJS::runtimeObjectCustomGetOwnPropertySlot):
3229         * bindings/js/kjs_html.h:
3230         * bindings/scripts/CodeGeneratorJS.pm:
3231         * html/HTMLAnchorElement.idl:
3232         * html/HTMLAppletElement.idl:
3233         * html/HTMLAreaElement.idl:
3234         * html/HTMLBRElement.idl:
3235         * html/HTMLBaseElement.idl:
3236         * html/HTMLBaseFontElement.idl:
3237         * html/HTMLBlockquoteElement.idl:
3238         * html/HTMLBodyElement.idl:
3239         * html/HTMLButtonElement.idl:
3240         * html/HTMLCanvasElement.idl:
3241         * html/HTMLDListElement.idl:
3242         * html/HTMLDirectoryElement.idl:
3243         * html/HTMLDivElement.idl:
3244         * html/HTMLElement.cpp:
3245         (WebCore::HTMLElement::formForEventHandlerScope):
3246         * html/HTMLElement.h:
3247         * html/HTMLElement.idl:
3248         * html/HTMLEmbedElement.idl:
3249         * html/HTMLFieldSetElement.idl:
3250         * html/HTMLFontElement.idl:
3251         * html/HTMLFormElement.idl:
3252         * html/HTMLFrameElement.idl:
3253         * html/HTMLFrameSetElement.idl:
3254         * html/HTMLGenericFormElement.cpp:
3255         (WebCore::HTMLGenericFormElement::formForEventHandlerScope):
3256         * html/HTMLGenericFormElement.h:
3257         * html/HTMLHRElement.idl:
3258         * html/HTMLHeadElement.idl:
3259         * html/HTMLHeadingElement.idl:
3260         * html/HTMLHtmlElement.idl:
3261         * html/HTMLIFrameElement.idl:
3262         * html/HTMLImageElement.idl:
3263         * html/HTMLIsIndexElement.idl:
3264         * html/HTMLLIElement.idl:
3265         * html/HTMLLabelElement.cpp:
3266         (WebCore::HTMLLabelElement::form):
3267         (WebCore::HTMLLabelElement::formForEventHandlerScope):
3268         * html/HTMLLabelElement.h:
3269         * html/HTMLLabelElement.idl:
3270         * html/HTMLLegendElement.idl:
3271         * html/HTMLLinkElement.idl:
3272         * html/HTMLMapElement.idl:
3273         * html/HTMLMarqueeElement.idl:
3274         * html/HTMLMenuElement.idl:
3275         * html/HTMLMetaElement.idl:
3276         * html/HTMLModElement.idl:
3277         * html/HTMLOListElement.idl:
3278         * html/HTMLObjectElement.cpp:
3279         (WebCore::HTMLObjectElement::formForEventHandlerScope):
3280         * html/HTMLObjectElement.h:
3281         * html/HTMLObjectElement.idl:
3282         * html/HTMLOptGroupElement.idl:
3283         * html/HTMLOptionElement.idl:
3284         * html/HTMLParagraphElement.idl:
3285         * html/HTMLParamElement.idl:
3286         * html/HTMLPreElement.idl:
3287         * html/HTMLQuoteElement.idl:
3288         * html/HTMLScriptElement.idl:
3289         * html/HTMLSelectElement.idl:
3290         * html/HTMLStyleElement.idl:
3291         * html/HTMLTableCaptionElement.idl:
3292         * html/HTMLTableCellElement.idl:
3293         * html/HTMLTableColElement.idl:
3294         * html/HTMLTableElement.idl:
3295         * html/HTMLTableRowElement.idl:
3296         * html/HTMLTableSectionElement.idl:
3297         * html/HTMLTextAreaElement.idl:
3298         * html/HTMLTitleElement.idl:
3299         * html/HTMLUListElement.idl:
3300         * page/DOMWindow.idl:
3301
3302 2007-05-28  Zack Rusin  <zrusin@trolltech.com>
3303
3304         Reviewed by andersca
3305
3306         Adding Qt related constructor/casting operators
3307         to the AtomicString and updating the project
3308         file for new Qt settings api using those.
3309
3310         * WebCore.pro:
3311         * platform/AtomicString.h:
3312
3313 2007-05-27  Sam Weinig  <sam@webkit.org>
3314
3315         Qt and Gdk build fix.
3316
3317         * WebCore.pro:
3318
3319 2007-05-27  Sam Weinig  <sam@webkit.org>
3320
3321         Reviewed by Hyatt.
3322
3323         Patch for http://bugs.webkit.org/show_bug.cgi?id=13893
3324         Autogenerate the JS bindings for the HTMLObjectElement, 
3325         HTMLEmbedElement and HTMLAppletElement
3326
3327         * DerivedSources.make:
3328         * WebCore.xcodeproj/project.pbxproj:
3329         * bindings/js/JSHTMLAppletElementCustom.cpp: Added.
3330         (WebCore::JSHTMLAppletElement::customGetOwnPropertySlot):
3331         (WebCore::JSHTMLAppletElement::customPut):
3332         (WebCore::JSHTMLAppletElement::implementsCall):
3333         (WebCore::JSHTMLAppletElement::callAsFunction):
3334         (WebCore::JSHTMLAppletElement::canGetItemsForName):
3335         (WebCore::JSHTMLAppletElement::nameGetter):
3336         * bindings/js/JSHTMLElementWrapperFactory.cpp:
3337         * bindings/js/JSHTMLEmbedElementCustom.cpp: Added.
3338         (WebCore::JSHTMLEmbedElement::customGetOwnPropertySlot):
3339         (WebCore::JSHTMLEmbedElement::customPut):
3340         (WebCore::JSHTMLEmbedElement::implementsCall):
3341         (WebCore::JSHTMLEmbedElement::callAsFunction):
3342         (WebCore::JSHTMLEmbedElement::canGetItemsForName):
3343         (WebCore::JSHTMLEmbedElement::nameGetter):
3344         * bindings/js/JSHTMLObjectElementCustom.cpp: Added.
3345         (WebCore::JSHTMLObjectElement::customGetOwnPropertySlot):
3346         (WebCore::JSHTMLObjectElement::customPut):
3347         (WebCore::JSHTMLObjectElement::implementsCall):
3348         (WebCore::JSHTMLObjectElement::callAsFunction):
3349         (WebCore::JSHTMLObjectElement::canGetItemsForName):
3350         (WebCore::JSHTMLObjectElement::nameGetter):
3351         * bindings/js/kjs_html.cpp:
3352         (KJS::):
3353         (KJS::JSHTMLElement::toString):
3354         (KJS::JSHTMLElement::pushEventHandlerScope):
3355         (KJS::runtimeObjectGetter):
3356         (KJS::runtimeObjectPropertyGetter):
3357         (KJS::runtimeObjectCustomGetOwnPropertySlot):
3358         (KJS::runtimeObjectCustomPut):
3359         (KJS::runtimeObjectImplementsCall):
3360         (KJS::runtimeObjectCallAsFunction):
3361         * bindings/js/kjs_html.h:
3362         (KJS::JSHTMLElement::classInfo):
3363         * bindings/scripts/CodeGeneratorJS.pm: Add support for 
3364         CustomGetOwnPropertySlot, CustomPutFunction, CustomCall,
3365         and SVGCheckSecurityDocument properties.
3366         * html/HTMLAppletElement.idl:
3367         * html/HTMLEmbedElement.idl:
3368         * html/HTMLObjectElement.idl:
3369         * page/DOMWindow.idl: Uncomment constructors.
3370
3371 2007-05-27  Sam Weinig  <sam@webkit.org>
3372
3373         Reviewed by Oliver.
3374
3375         Gdk build fix.
3376
3377         * platform/graphics/Path.h:
3378
3379 2007-05-27  Sam Weinig  <sam@webkit.org>
3380
3381         Gdk build fix.  Forgot to update a few instances of notImplementedGdk() to notImplemented().
3382
3383         * page/gdk/EventHandlerGdk.cpp:
3384         (WebCore::EventHandler::passMousePressEventToScrollbar):
3385         * platform/gdk/EditorClientGdk.cpp:
3386         (WebCore::EditorClientGdk::ignoreWordInSpellDocument):
3387         (WebCore::EditorClientGdk::learnWord):
3388         (WebCore::EditorClientGdk::checkSpellingOfString):
3389         (WebCore::EditorClientGdk::checkGrammarOfString):
3390         (WebCore::EditorClientGdk::updateSpellingUIWithGrammarString):
3391         (WebCore::EditorClientGdk::updateSpellingUIWithMisspelledWord):
3392         (WebCore::EditorClientGdk::showSpellingUI):
3393         (WebCore::EditorClientGdk::spellingUIIsShowing):
3394         (WebCore::EditorClientGdk::getGuessesForWord):
3395         * platform/gdk/FrameGdk.cpp:
3396         (WebCore::Frame::dashboardRegionsChanged):
3397         * platform/gdk/PlatformScrollBarGdk.cpp:
3398         (PlatformScrollbar::paint):
3399         (PlatformScrollbar::updateThumbPosition):
3400         (PlatformScrollbar::updateThumbProportion):
3401         * platform/gdk/TemporaryLinkStubs.cpp:
3402         (Widget::setEnabled):
3403         (Widget::isEnabled):
3404         (Widget::removeFromParent):
3405         (Widget::paint):
3406         (Widget::setIsSelected):
3407         (Widget::invalidate):
3408         (Widget::invalidateRect):
3409
3410 2007-05-27  Alp Toker  <alp.toker@collabora.co.uk>
3411
3412         Reviewed by Sam and Oliver.
3413
3414         Implement PathCairo. This patch is based on changes in Mike Emmel's
3415         WebKit fork with some additional clean-ups and updates.
3416
3417         * platform/graphics/Path.h:
3418         * platform/graphics/cairo/CairoPath.h: Added.
3419         (CairoPath::CairoPath):
3420         (CairoPath::~CairoPath):
3421         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3422         (WebCore::GraphicsContext::clip):
3423         * platform/graphics/cairo/PathCairo.cpp:
3424         (WebCore::Path::Path):
3425         (WebCore::Path::~Path):
3426         (WebCore::Path::operator=):
3427         (WebCore::Path::clear):
3428         (WebCore::Path::isEmpty):
3429         (WebCore::Path::translate):
3430         (WebCore::Path::moveTo):
3431         (WebCore::Path::addLineTo):
3432         (WebCore::Path::addRect):
3433         (WebCore::Path::addQuadCurveTo):
3434         (WebCore::Path::addBezierCurveTo):
3435         (WebCore::Path::addArc):
3436         (WebCore::Path::addArcTo):
3437         (WebCore::Path::addEllipse):
3438         (WebCore::Path::closeSubpath):
3439         (WebCore::Path::boundingRect):
3440         (WebCore::Path::contains):
3441         (WebCore::Path::apply):
3442         (WebCore::Path::transform):
3443         (WebCore::Path::debugString):
3444
3445 2007-05-27  Kevin Ollivier  <kevino@theolliviers.com>
3446
3447         Reviewed by Sam Weinig.
3448
3449         Consolidate all notImplemented() macro definitions into
3450         one header file for all platforms.
3451
3452         * loader/gdk/DocumentLoaderGdk.cpp:
3453         (WebCore::DocumentLoader::getResponseModifiedHeader):
3454         * loader/gdk/FrameLoaderClientGdk.cpp:
3455         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveAuthenticationChallenge):
3456         (WebCore::FrameLoaderClientGdk::dispatchDidCancelAuthenticationChallenge):
3457         (WebCore::FrameLoaderClientGdk::dispatchWillSendRequest):
3458         (WebCore::FrameLoaderClientGdk::assignIdentifierToInitialRequest):
3459         (WebCore::FrameLoaderClientGdk::createPlugin):
3460         (WebCore::FrameLoaderClientGdk::createFrame):
3461         (WebCore::FrameLoaderClientGdk::redirectDataToPlugin):
3462         (WebCore::FrameLoaderClientGdk::createJavaAppletWidget):
3463         (WebCore::FrameLoaderClientGdk::objectContentType):
3464         (WebCore::FrameLoaderClientGdk::overrideMediaType):
3465         (WebCore::FrameLoaderClientGdk::windowObjectCleared):
3466         (WebCore::FrameLoaderClientGdk::hasWebView):
3467         (WebCore::FrameLoaderClientGdk::hasFrameView):
3468         (WebCore::FrameLoaderClientGdk::frameLoadCompleted):
3469         (WebCore::FrameLoaderClientGdk::saveViewStateToItem):
3470         (WebCore::FrameLoaderClientGdk::restoreViewState):
3471         (WebCore::FrameLoaderClientGdk::privateBrowsingEnabled):
3472         (WebCore::FrameLoaderClientGdk::makeDocumentView):
3473         (WebCore::FrameLoaderClientGdk::makeRepresentation):
3474         (WebCore::FrameLoaderClientGdk::forceLayout):
3475         (WebCore::FrameLoaderClientGdk::forceLayoutForNonHTML):
3476         (WebCore::FrameLoaderClientGdk::setCopiesOnScroll):
3477         (WebCore::FrameLoaderClientGdk::detachedFromParent1):
3478         (WebCore::FrameLoaderClientGdk::detachedFromParent2):
3479         (WebCore::FrameLoaderClientGdk::detachedFromParent3):
3480         (WebCore::FrameLoaderClientGdk::detachedFromParent4):
3481         (WebCore::FrameLoaderClientGdk::loadedFromCachedPage):
3482         (WebCore::FrameLoaderClientGdk::dispatchDidHandleOnloadEvents):
3483         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveServerRedirectForProvisionalLoad):
3484         (WebCore::FrameLoaderClientGdk::dispatchDidCancelClientRedirect):
3485         (WebCore::FrameLoaderClientGdk::dispatchWillPerformClientRedirect):
3486         (WebCore::FrameLoaderClientGdk::dispatchDidChangeLocationWithinPage):
3487         (WebCore::FrameLoaderClientGdk::dispatchWillClose):
3488         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveIcon):
3489         (WebCore::FrameLoaderClientGdk::dispatchDidStartProvisionalLoad):
3490         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveTitle):
3491         (WebCore::FrameLoaderClientGdk::dispatchDidCommitLoad):
3492         (WebCore::FrameLoaderClientGdk::dispatchDidFinishDocumentLoad):
3493         (WebCore::FrameLoaderClientGdk::dispatchDidFirstLayout):
3494         (WebCore::FrameLoaderClientGdk::dispatchShow):
3495         (WebCore::FrameLoaderClientGdk::cancelPolicyCheck):
3496         (WebCore::FrameLoaderClientGdk::dispatchDidLoadMainResource):
3497         (WebCore::FrameLoaderClientGdk::revertToProvisionalState):
3498         (WebCore::FrameLoaderClientGdk::clearUnarchivingState):
3499         (WebCore::FrameLoaderClientGdk::willChangeTitle):
3500         (WebCore::FrameLoaderClientGdk::finishedLoading):
3501         (WebCore::FrameLoaderClientGdk::finalSetupForReplace):
3502         (WebCore::FrameLoaderClientGdk::setDefersLoading):
3503         (WebCore::FrameLoaderClientGdk::isArchiveLoadPending):
3504         (WebCore::FrameLoaderClientGdk::cancelPendingArchiveLoad):
3505         (WebCore::FrameLoaderClientGdk::clearArchivedResources):
3506         (WebCore::FrameLoaderClientGdk::canHandleRequest):
3507         (WebCore::FrameLoaderClientGdk::canShowMIMEType):
3508         (WebCore::FrameLoaderClientGdk::representationExistsForURLScheme):
3509         (WebCore::FrameLoaderClientGdk::generatedMIMETypeForURLScheme):
3510         (WebCore::FrameLoaderClientGdk::provisionalLoadStarted):
3511         (WebCore::FrameLoaderClientGdk::didFinishLoad):
3512         (WebCore::FrameLoaderClientGdk::prepareForDataSourceReplacement):
3513         (WebCore::FrameLoaderClientGdk::setTitle):
3514         (WebCore::FrameLoaderClientGdk::setDocumentViewFromCachedPage):
3515         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveContentLength):
3516         (WebCore::FrameLoaderClientGdk::dispatchDidFinishLoading):
3517         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoading):
3518         (WebCore::FrameLoaderClientGdk::dispatchDidLoadResourceFromMemoryCache):
3519         (WebCore::FrameLoaderClientGdk::dispatchDidFailProvisionalLoad):
3520         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoad):
3521         (WebCore::FrameLoaderClientGdk::download):
3522         (WebCore::FrameLoaderClientGdk::cancelledError):
3523         (WebCore::FrameLoaderClientGdk::blockedError):
3524         (WebCore::FrameLoaderClientGdk::cannotShowURLError):
3525         (WebCore::FrameLoaderClientGdk::interruptForPolicyChangeError):
3526         (WebCore::FrameLoaderClientGdk::cannotShowMIMETypeError):
3527         (WebCore::FrameLoaderClientGdk::fileDoesNotExistError):
3528         (WebCore::FrameLoaderClientGdk::shouldFallBack):
3529         (WebCore::FrameLoaderClientGdk::willUseArchive):
3530         (WebCore::FrameLoaderClientGdk::saveDocumentViewToCachedPage):
3531         (WebCore::FrameLoaderClientGdk::canCachePage):
3532         (WebCore::FrameLoaderClientGdk::dispatchCreatePage):
3533         (WebCore::FrameLoaderClientGdk::dispatchUnableToImplementPolicy):
3534         (WebCore::FrameLoaderClientGdk::setMainDocumentError):
3535         (WebCore::FrameLoaderClientGdk::startDownload):
3536         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForStandardLoad):
3537         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForReload):
3538         * loader/qt/DocumentLoaderQt.cpp:
3539         * page/gdk/ContextMenuClientGdk.cpp:
3540         (WebCore::ContextMenuClientGdk::contextMenuDestroyed):
3541         (WebCore::ContextMenuClientGdk::getCustomMenuFromDefaultItems):
3542         (WebCore::ContextMenuClientGdk::contextMenuItemSelected):
3543         (WebCore::ContextMenuClientGdk::downloadURL):
3544         (WebCore::ContextMenuClientGdk::copyImageToClipboard):
3545         (WebCore::ContextMenuClientGdk::searchWithGoogle):
3546         (WebCore::ContextMenuClientGdk::lookUpInDictionary):
3547         (WebCore::ContextMenuClientGdk::speak):
3548         (WebCore::ContextMenuClientGdk::stopSpeaking):
3549         * page/gdk/EventHandlerGdk.cpp:
3550         (WebCore::EventHandler::passMouseDownEventToWidget):
3551         (WebCore::EventHandler::eventActivatedView):
3552         (WebCore::EventHandler::passSubframeEventToSubframe):
3553         (WebCore::EventHandler::passWheelEventToWidget):
3554         (WebCore::EventHandler::createDraggingClipboard):
3555         * page/qt/EventHandlerQt.cpp:
3556         * page/qt/FrameQt.cpp:
3557         * platform/NotImplemented.h: Added.
3558         * platform/gdk/CursorGdk.cpp:
3559         (WebCore::Cursor::Cursor):
3560         * platform/gdk/EditorClientGdk.cpp:
3561         (WebCore::EditorClientGdk::shouldDeleteRange):
3562         (WebCore::EditorClientGdk::isContinuousSpellCheckingEnabled):
3563         (WebCore::EditorClientGdk::isGrammarCheckingEnabled):
3564         (WebCore::EditorClientGdk::spellCheckerDocumentTag):
3565         (WebCore::EditorClientGdk::shouldBeginEditing):
3566         (WebCore::EditorClientGdk::shouldEndEditing):
3567         (WebCore::EditorClientGdk::shouldInsertText):
3568         (WebCore::EditorClientGdk::shouldChangeSelectedRange):
3569         (WebCore::EditorClientGdk::shouldApplyStyle):
3570         (WebCore::EditorClientGdk::didBeginEditing):
3571         (WebCore::EditorClientGdk::respondToChangedContents):
3572         (WebCore::EditorClientGdk::respondToChangedSelection):
3573         (WebCore::EditorClientGdk::didEndEditing):
3574         (WebCore::EditorClientGdk::didWriteSelectionToPasteboard):
3575         (WebCore::EditorClientGdk::didSetSelectionTypesForPasteboard):
3576         (WebCore::EditorClientGdk::selectWordBeforeMenuEvent):
3577         (WebCore::EditorClientGdk::isEditable):
3578         (WebCore::EditorClientGdk::registerCommandForUndo):
3579         (WebCore::EditorClientGdk::registerCommandForRedo):
3580         (WebCore::EditorClientGdk::clearUndoRedoOperations):
3581         (WebCore::EditorClientGdk::canUndo):
3582         (WebCore::EditorClientGdk::canRedo):
3583         (WebCore::EditorClientGdk::undo):
3584         (WebCore::EditorClientGdk::redo):
3585         (WebCore::EditorClientGdk::shouldInsertNode):
3586         (WebCore::EditorClientGdk::pageDestroyed):
3587         (WebCore::EditorClientGdk::smartInsertDeleteEnabled):
3588         (WebCore::EditorClientGdk::toggleContinuousSpellChecking):
3589         (WebCore::EditorClientGdk::handleInputMethodKeypress):
3590         (WebCore::EditorClientGdk::textFieldDidBeginEditing):
3591         (WebCore::EditorClientGdk::textFieldDidEndEditing):
3592         (WebCore::EditorClientGdk::textDidChangeInTextField):
3593         (WebCore::EditorClientGdk::doTextFieldCommandFromEvent):
3594         (WebCore::EditorClientGdk::textWillBeDeletedInTextField):
3595         (WebCore::EditorClientGdk::textDidChangeInTextArea):
3596         * platform/gdk/FrameGdk.cpp:
3597         (WebCore::Frame::print):
3598         (WebCore::Frame::issueTransposeCommand):
3599         (WebCore::Frame::cleanupPlatformScriptObjects):
3600         (WebCore::Frame::dragImageForSelection):
3601         * platform/gdk/NotImplementedGdk.h: Removed.
3602         * platform/gdk/PopupMenuGdk.cpp:
3603         (WebCore::PopupMenu::PopupMenu):
3604         (WebCore::PopupMenu::~PopupMenu):
3605         (WebCore::PopupMenu::show):
3606         (WebCore::PopupMenu::hide):
3607         (WebCore::PopupMenu::updateFromElement):
3608         * platform/gdk/RenderThemeGdk.cpp:
3609         (WebCore::RenderThemeGdk::setCheckboxSize):
3610         (WebCore::RenderThemeGdk::setRadioSize):
3611         (WebCore::RenderThemeGdk::adjustTextFieldStyle):
3612         * platform/gdk/ScreenGdk.cpp:
3613         (WebCore::screenDepthPerComponent):
3614         (WebCore::screenIsMonochrome):
3615         (WebCore::screenRect):
3616         (WebCore::screenAvailableRect):
3617         * platform/gdk/ScrollViewGdk.cpp:
3618         (WebCore::ScrollView::update):
3619         (WebCore::ScrollView::addChild):
3620         (WebCore::ScrollView::removeChild):
3621         (WebCore::ScrollView::scrollRectIntoViewRecursively):
3622         (WebCore::ScrollView::inWindow):
3623         (WebCore::ScrollView::wheelEvent):
3624         (WebCore::ScrollView::updateScrollbars):
3625         (WebCore: