2007-07-16 Holger Hans Peter Freyther <zecke@selfish.org>
[WebKit-https.git] / WebCore / ChangeLog
1 2007-07-16  Holger Hans Peter Freyther  <zecke@selfish.org>
2
3         Reviewed by Maciej.
4
5         Lazily update the scrollbars (e.g. on loading a page) to
6         generate less expose events, which will lead to laying out less often
7          and will fix http://bugs.webkit.org/show_bug.cgi?id=14020.
8
9         * platform/gdk/ScrollViewGdk.cpp:
10         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
11         (WebCore::ScrollView::update):
12         (WebCore::ScrollView::resizeContents):
13         (WebCore::ScrollView::updateScrollbars):
14
15 2007-07-16  Rob Buis  <buis@kde.org>
16
17         Reviewed by Maciej.
18
19         http://bugs.webkit.org/show_bug.cgi?id=14462
20         non empty <style> element doesn't work
21
22         Return an empty sheet for empty <style> elements
23         instead of a null sheet. Clean up StyleElement a bit.
24
25         * dom/StyleElement.cpp:
26         (WebCore::StyleElement::StyleElement):
27         (WebCore::StyleElement::sheet):
28         (WebCore::StyleElement::childrenChanged):
29         (WebCore::StyleElement::createSheet):
30         * dom/StyleElement.h:
31         (WebCore::StyleElement::setLoading):
32         * html/HTMLStyleElement.cpp:
33         (WebCore::HTMLStyleElement::HTMLStyleElement):
34         (WebCore::HTMLStyleElement::sheet):
35         * html/HTMLStyleElement.h:
36         (WebCore::HTMLStyleElement::setLoading):
37         * ksvg2/svg/SVGStyleElement.cpp:
38         (WebCore::SVGStyleElement::sheet):
39         (WebCore::SVGStyleElement::sheetLoaded):
40         * ksvg2/svg/SVGStyleElement.h:
41
42 2007-07-15  Oliver Hunt  <oliver@apple.com>
43
44         Reviewed by Adam.
45
46         Fix for fix for <rdar://problem/5336602> REGRESSION: tab characters
47                         cannot be entered into text fields
48                         http://bugs.webkit.org/show_bug.cgi?id=14032
49
50         Need to use UChar not char.
51
52         * html/HTMLInputElement.cpp:
53         (WebCore::HTMLInputElement::constrainValue):
54
55 2007-07-15  Sam Weinig  <sam@webkit.org>
56
57         Reviewed by Geoff Garen.
58
59         Remove redundant calls to isSafeScript()
60
61         * bindings/js/JSDOMWindowCustom.cpp:
62         (WebCore::JSDOMWindow::customPut):
63         * bindings/js/kjs_window.cpp:
64         (KJS::Window::put):
65
66 2007-07-15  Geoffrey Garen  <ggaren@apple.com>
67
68         Reviewed by Maciej Stachowiak.
69         
70         Removed incorrect error log, seen while running layout tests.
71         
72         Perhaps at some point FrameLoadTypeInteral had a specific meaning
73         that prevented it from being used in non-child frame, non-redirect
74         situations. However, that meaning has been lost and nobody remembers
75         how to get it back.
76         
77         We currently use FrameLoadTypeInternal for any load that is not
78         initiated by a user gesture, so it's trivial to produce this error
79         log, even though nothing has gone wrong.
80
81         * loader/FrameLoader.cpp:
82         (WebCore::FrameLoader::updateHistoryForInternalLoad):
83
84 2007-07-15  Oliver Hunt  <oliver@apple.com>
85
86         Reviewed by Maciej
87
88         Fix for <rdar://problem/5336602> REGRESSION: tab characters cannot be entered into text fields
89                 http://bugs.webkit.org/show_bug.cgi?id=14032
90
91         constrainValue attempted to block control characters from being inserted 
92         by a simple less than ' ' check, which prevent tab characters from being
93         inserted.  This patch adds an additional check to allow the tab character 
94         again
95
96         * html/HTMLInputElement.cpp:
97         (WebCore::HTMLInputElement::constrainValue):
98
99 2007-07-14  Brady Eidson  <beidson@apple.com>
100
101         Third shot at blind Qt/GDK build fix
102
103         * platform/gdk/TemporaryLinkStubs.cpp:
104         (FTPDirectoryDocument::createTokenizer):
105         * platform/qt/TemporaryLinkStubs.cpp:
106         (FTPDirectoryDocument::createTokenizer):
107
108 2007-07-14  Brady Eidson  <beidson@apple.com>
109
110         Reviewed by Sam
111
112         Windows build fix
113
114         * WebCore.vcproj/WebCore.vcproj:
115
116 2007-07-14  Sam Weinig  <sam@webkit.org>
117
118         Fix Tiger build.
119
120         * config.h:
121
122 2007-07-14  Brady Eidson  <beidson@apple.com>
123
124         Blind attempt at (hopefully) fixing the Qt and GDK builds
125
126         * platform/gdk/TemporaryLinkStubs.cpp:
127         (FTPDirectoryDocument::FTPDirectoryDocument):
128         * platform/qt/TemporaryLinkStubs.cpp:
129         (FTPDirectoryDocument::FTPDirectoryDocument):
130
131 2007-07-14  Brady Eidson  <beidson@apple.com>
132
133         Reviewed by Sam Weinig
134
135         Initial check-in for <rdar://problem/3154486> - Supporting FTP directory listings in the browser
136
137         Development has taken place on both Leopard and Windows (windows enabling patch will follow shortly)
138         Support will only exist on platforms whose network layers (ie, ResourceHandle) support piping the raw
139         FTP Directory data into the engine.  
140
141         This is known to include Leopard, Windows, and CURL based platforms - probably others
142         Known incompatible platforms include Tiger.
143
144         The FTP listing page is built in HTML.  An external HTML document can be provided as a template for the 
145         directory listing.  This document is parsed, and expected to have a <table> with a certain class in it.
146         As FTP directory listings come in, each entry is added to this table as a row.
147
148         If no HTML template is provided to work with, a very basic empty document is hard coded that contains only 
149         this special table.
150
151         Upgrades to the look and feel of the directory listings can take place largely in this HTML template which,
152         admittedly, is conspicuously absent in this initial checkin
153
154         * WebCore.exp: New Settings symbols for WebKit
155         * WebCore.xcodeproj/project.pbxproj:
156
157         * config.h: If BUILDING_ON_TIGER, disable FTP directory listing support
158
159         * dom/DOMImplementation.cpp:
160         (WebCore::DOMImplementation::createDocument): Create an FTPDirectoryDocument if the mime type is 
161           "application/x-ftp-directory"
162
163         * loader/FTPDirectoryDocument.cpp: Added.
164         (WebCore::FTPDirectoryTokenizer::isWaitingForScripts):
165         (WebCore::FTPDirectoryTokenizer::checkBuffer):
166         (WebCore::FTPDirectoryTokenizer::FTPDirectoryTokenizer): Building on HTML tokenizer, this facilitates 
167           parsing FTP Directory listings in the engine
168         (WebCore::FTPDirectoryTokenizer::appendEntry): Add a table row for a directory listing to the document
169         (WebCore::FTPDirectoryTokenizer::createTDForFilename): Create the TD for the filename with the anchor in it
170
171         (WebCore::processFilesizeString): Prettify the filesize
172         (WebCore::wasLastDayOfMonth):
173         (WebCore::processFileDateString): Prettify the date
174         (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine):
175         (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate): Loads the HTML template that FTP directory listings
176           can build on top of
177         (WebCore::FTPDirectoryTokenizer::createBasicDocument): Creates a most basic document (body and one table) to
178           append the rows to in case the document template is not loaded and parsed
179         (WebCore::FTPDirectoryTokenizer::write): Add the FTP listing to the buffer and parse entries out of it
180         (WebCore::FTPDirectoryTokenizer::finish): 
181
182         (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): Special document-type for FTP directory listings
183         (WebCore::FTPDirectoryDocument::createTokenizer):
184         * loader/FTPDirectoryDocument.h: Added.
185         (WebCore::FTPDirectoryDocument::isImageDocument):
186         
187         * loader/FTPDirectoryParser.cpp: Added.
188         (WebCore::parseOneFTPLine): Adapted from ParseFTPList.cpp from Firefox - parses most known
189           FTP directory listing styles into discrete FTP directory entries
190         * loader/FTPDirectoryParser.h: Added.
191         (WebCore::ListState::ListState): Maintains FTP Parser state
192         (WebCore::ListResult::ListResult): Represents one FTP directory listing
193         (WebCore::ListResult::clear):
194
195         * loader/FrameLoader.cpp:
196         (WebCore::FrameLoader::checkContentPolicy): If the Settings say to bypass the policy check for 
197           "application/x-ftp-directory", skip it.  This will allow people to test this feature even if their 
198           browser/WebKit app would otherwise not allow it
199
200         * page/Settings.cpp:
201         (WebCore::Settings::Settings):
202         (WebCore::Settings::setFTPDirectoryTemplatePath): Set the path to the FTP listing document template
203         (WebCore::Settings::setForceFTPDirectoryListings): Set to bypass the policy delegate check for mime type
204           "application/x-ftp-directory"
205         * page/Settings.h:
206         (WebCore::Settings::ftpDirectoryTemplatePath):
207         (WebCore::Settings::forceFTPDirectoryListings):
208
209         * platform/Logging.cpp: Add an "LogFTP" logging channel
210         * platform/Logging.h:
211         * platform/mac/LoggingMac.mm:
212         (WebCore::InitializeLoggingChannelsIfNecessary):
213
214         * platform/MimeTypeRegistry.cpp:
215         (WebCore::initialiseSupportedNonImageMimeTypes): Add "application/x-ftp-directory"
216
217         * platform/SharedBuffer.cpp:
218         (WebCore::SharedBuffer::createWithContentsOfFile): Stub for now
219         * platform/SharedBuffer.h:
220
221         * platform/mac/SharedBufferMac.mm:
222         (WebCore::SharedBuffer::createWithContentsOfFile): Load contents of the file into an NSData, then
223           wrap that NSData
224
225 2007-07-14  Alexey Proskuryakov  <ap@webkit.org>
226
227         Reviewed by Darin.
228
229         http://bugs.webkit.org/show_bug.cgi?id=14618
230         REGRESSION(13464): drivehq.com login form doesn't work
231
232         Test: http/tests/misc/post-submit-button.html
233
234         * html/HTMLInputElement.cpp:
235         (WebCore::HTMLInputElement::appendFormData): Append a submit even if its value is empty.
236
237 2007-07-13  Oliver Hunt  <oliver@apple.com>
238
239         Reviewed by Sam.
240
241         Fix for 
242             <rdar://problem/5335265> REGRESSION: WebCore::DragController crashes if WebDragSourceActionDHTML cleared
243             http://bugs.webkit.org/show_bug.cgi?id=13652
244
245         Reorder logic for drag initiation: we can always preflight the clipboard, regardless as to whether 
246         we are performing any dhtml drag handling    
247
248         * page/EventHandler.cpp:
249         (WebCore::EventHandler::handleDrag):
250
251 2007-07-13  Matt Lilek  <pewtermoose@gmail.com>
252
253         Reviewed by Tim Hatcher.
254
255         Bug 14401: Semi-regression: Can no longer copy anything from the inspector
256         http://bugs.webkit.org/show_bug.cgi?id=14401
257
258         * page/inspector/inspector.css:
259
260 2007-07-13  Beth Dakin  <bdakin@apple.com>
261
262         Reviewed by Hyatt.
263
264         Fix for <rdar://problem/5304742> A hang occurs when attempting to 
265         display web clip banner at http://www.signonsandiego.com/sports/
266         chargers/index.html
267
268         Here is the actual fix. 
269         * rendering/RenderInline.cpp:
270         (WebCore::RenderInline::absoluteRects): Set topLevel to 
271         false when we recurse to get our children's absoluteRects.
272         * rendering/RenderInline.h: New boolean parameter 
273         topLevel that defaults to true.
274         * rendering/RenderObject.cpp:
275         (WebCore::RenderObject::absoluteRects):
276         * rendering/RenderObject.h:
277
278         And these are just other implementations/declarations of this 
279         (virtual) function that have to add the parameter. No behavior 
280         change here.
281         * rendering/RenderPath.cpp:
282         (WebCore::RenderPath::absoluteRects):
283         * rendering/RenderPath.h:
284         * rendering/RenderSVGContainer.cpp:
285         (WebCore::RenderSVGContainer::absoluteRects):
286         * rendering/RenderSVGContainer.h:
287         * rendering/RenderSVGHiddenContainer.cpp:
288         (WebCore::RenderSVGHiddenContainer::absoluteRects):
289         * rendering/RenderSVGHiddenContainer.h:
290         * rendering/RenderSVGImage.cpp:
291         (WebCore::RenderSVGImage::absoluteRects):
292         * rendering/RenderSVGImage.h:
293         * rendering/RenderSVGInlineText.cpp:
294         (WebCore::RenderSVGInlineText::absoluteRects):
295         * rendering/RenderSVGInlineText.h:
296         * rendering/RenderSVGTSpan.cpp:
297         (WebCore::RenderSVGTSpan::absoluteRects):
298         * rendering/RenderSVGTSpan.h:
299         * rendering/RenderSVGText.cpp:
300         (WebCore::RenderSVGText::absoluteRects):
301         * rendering/RenderSVGText.h:
302         * rendering/RenderText.cpp:
303         (WebCore::RenderText::absoluteRects):
304         * rendering/RenderText.h:
305         * rendering/RenderView.cpp:
306         (WebCore::RenderView::absoluteRects):
307         * rendering/RenderView.h:
308
309 2007-07-13  Mitz Pettel  <mitz@webkit.org>
310
311         Reviewed by Hyatt.
312
313         - fix http://bugs.webkit.org/show_bug.cgi?id=13438 <rdar://problem/5153030>
314               Run rounding makes word-break:break-all/word not functional
315
316         Test: fast/text/word-break-run-rounding.html
317
318         * rendering/RenderText.cpp:
319         (WebCore::RenderText::calcPrefWidths): Update the maximum width only on word
320         boundaries to avoid rounding errors.
321         * rendering/bidi.cpp:
322         (WebCore::RenderBlock::findNextLineBreak): Integrated breakAll with the
323         midWordBreak/wrapW mechanism. Also made the wrapW upper bound more accurate
324         by resetting it when tmpW is committed.
325
326 2007-07-13  Sam Weinig  <sam@webkit.org>
327
328         Reviewed by Geoff Garen.
329
330         Patch for <rdar://problem/5318394>
331         http site can read/write content of https site in same domain
332
333         Add protocol and port checks in isSafeScript.
334
335         * bindings/js/kjs_window.cpp:
336         (KJS::Window::isSafeScript):
337
338 2007-07-13  Anders Carlsson  <andersca@apple.com>
339
340         Reviewed by Mitz Pettel.
341
342         <rdar://problem/5298870> 
343         REGRESSION: In Yahoo Mail modal dialog, OK and Cancel buttons do not work, and descriptive text is missing (14327)
344         
345         http://bugs.webkit.org/show_bug.cgi?id=14327
346         REGRESSION (r21367): dialogArguments not set in window generated by showModalDialog
347
348         When creating popup windows/dialogs, prevent the window properties from being cleared by the initial frame load.
349         
350         * loader/FrameLoader.cpp:
351         (WebCore::FrameLoader::FrameLoader):
352         (WebCore::FrameLoader::createWindow):
353         (WebCore::FrameLoader::clear):
354         (WebCore::FrameLoader::begin):
355         (WebCore::FrameLoader::open):
356         * loader/FrameLoader.h:
357         (WebCore::FrameLoader::setShouldClearWindowProperties):
358         * manual-tests/modal-dialog-arguments.html: Added.
359
360 2007-07-13  Steve Falkenburg  <sfalken@apple.com>
361
362         Update ResourceError related code to account for changes in CF interfaces.
363
364         Reviewed by Darin, Ada.
365
366         * platform/network/ResourceError.h: Change Mac conditionals to CF to share more code.
367         * platform/network/cf/ResourceErrorCF.cpp:
368         (WebCore::ResourceError::ResourceError): Modified based on CFErrorRef changes
369         (WebCore::ResourceError::unpackPlatformError): Ported from ResourceErrorMac.mm.
370         (WebCore::ResourceError::operator CFErrorRef): Ported from ResourceErrorMac.mm.
371         (WebCore::ResourceError::operator CFStreamError): Modified based on CFErrorRef changes.
372
373 2007-07-13  Antti Koivisto  <antti@apple.com>
374
375         Reviewed by Adele.
376         
377         Fix <rdar://problem/5192256>
378         click() in onchange handler causes another change event (causes hang at http://forums.whirlpool.net.au/)
379         
380         Guard against generating a simulated event from within a simulated event in the same node. Try to
381         match Firefox behavior.
382
383         * dom/EventTargetNode.cpp:
384         (WebCore::EventTargetNode::dispatchSimulatedMouseEvent):
385         (WebCore::EventTargetNode::dispatchSimulatedClick):
386         * dom/Node.cpp:
387         (WebCore::Node::Node):
388         * dom/Node.h:
389
390 2007-07-13  Antti Koivisto  <antti@apple.com>
391
392         Reviewed by Darin.
393         
394         Fix <rdar://problem/5333387>
395         Combination of selection and click() on checkbox crashes
396         
397         Ensure there is no pending style update before doing synchronous paint. Under certain
398         circumstances this ends up doing style recalc in middle of paint() which may
399         for example tear down the rendering tree being painted, with bad results.
400
401         * dom/ContainerNode.cpp:
402         (WebCore::ContainerNode::setActive):
403
404 2007-07-13  Antti Koivisto  <antti@apple.com>
405
406         Reviewed by Adele.
407         
408         Fix <rdar://problem/5333365>
409         Calling click() is very slow
410         
411         There is a 100ms delay in ContainerNode::setActive() to do an activation effect. It is used for
412         simulated mouse activations (using keyboard for example). However, it shouldn't be done when calling from javascript 
413         (through click() interface) since it hangs script execution.
414
415         * html/HTMLElement.cpp:
416         (WebCore::HTMLElement::click):
417
418 2007-07-13  Mitz Pettel  <mitz@webkit.org>
419
420         Reviewed by Dave Hyatt.
421
422         - fix http://bugs.webkit.org/show_bug.cgi?id=13873
423           Incomplete repaint of replaced element's box shadow
424
425         Tests: fast/repaint/box-shadow-h.html
426                fast/repaint/box-shadow-v.html
427
428         * rendering/RenderHTMLCanvas.cpp:
429         (WebCore::RenderHTMLCanvas::layout): Added a call to adjustOverflowForBoxShadow().
430         * rendering/RenderImage.cpp:
431         (WebCore::RenderImage::layout): Ditto.
432         * rendering/RenderPartObject.cpp:
433         (WebCore::RenderPartObject::layout): Ditto.
434         * rendering/RenderReplaced.cpp:
435         (WebCore::RenderReplaced::RenderReplaced): Initialize m_hasOverflow.
436         (WebCore::RenderReplaced::~RenderReplaced): Added. Removes this object from the
437         overflow rect map if it has overflow.
438         (WebCore::RenderReplaced::shouldPaint): Account for overflow.
439         (WebCore::RenderReplaced::adjustOverflowForBoxShadow): Added. Creates or
440         removes an entry for this object in the global overflow rect map.
441         (WebCore::RenderReplaced::overflowHeight): Added.
442         (WebCore::RenderReplaced::overflowWidth): Added.
443         (WebCore::RenderReplaced::overflowLeft): Added.
444         (WebCore::RenderReplaced::overflowTop): Added.
445         (WebCore::RenderReplaced::overflowRect): Added.
446         * rendering/RenderReplaced.h:
447
448 2007-07-13  Mitz Pettel  <mitz@webkit.org>
449
450         Reviewed by Dave Hyatt.
451
452         - fix http://bugs.webkit.org/show_bug.cgi?id=14395
453           When a <p> is inside <li> two <BR>s are rendered
454
455         Test: fast/lists/marker-before-empty-inline.html
456
457         * rendering/RenderBlock.h:
458         * rendering/RenderListItem.cpp:
459         (WebCore::getParentOfFirstLineBox): Changed to skip empty inline flows that
460         do not actually generate any line boxes. Limited the nested lists quirk to
461         the case where the list is a child of the list item, to match Firefox.
462         * rendering/bidi.cpp:
463         (WebCore::requiresLineBox): Added. Factored out of skipWhitespace.
464         (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Added. Checkes
465         whether the child or any of its siblings following it will generate a line
466         box in the flow.
467         (WebCore::RenderBlock::skipWhitespace):
468
469 2007-07-13  Holger Hans Peter Freyther  <zecke@selfish.org>
470
471         Reviewed by Alexey.
472
473         Move HTTP methods to parse Content-Type from xmlhttprequest.cpp
474         which is LGPL to HTTPParsers.cpp. As both files were written by the
475         same author and the advice to move them came from him I think this move
476         is what is meant to be done.
477
478         Move filenameFromHTTPContentDisposition to HTTPParsers as well. This parse
479         function uses Vector<String>::split and doesn't honor quoting. This needs
480         to be fixed in later versions.
481
482         http://bugs.webkit.org/show_bug.cgi?id=5954 and http://bugs.webkit.org/show_bug.cgi?id=14059
483         benefit from this change.
484
485         * platform/network/HTTPParsers.cpp:
486         (WebCore::filenameFromHTTPContentDisposition):
487         (WebCore::extractMIMETypeFromMediaType):
488         (WebCore::extractCharsetFromMediaType):
489         * platform/network/HTTPParsers.h:
490         * platform/network/cf/ResourceResponseCFNet.cpp:
491         * xml/xmlhttprequest.cpp:
492         (WebCore::XMLHttpRequest::responseMIMEType):
493         (WebCore::XMLHttpRequest::didReceiveResponse):
494
495 2007-07-13  Mark Rowe  <mrowe@apple.com>
496
497         Reviewed by Mitz.
498
499         Build fix.  Stub out ChromeClientGdk::print and SVGEmptyChromeClient::print.
500
501         * platform/gdk/ChromeClientGdk.h:
502         * platform/gdk/TemporaryLinkStubs.cpp:
503         (ChromeClientGdk::print):
504         * platform/graphics/svg/SVGImageEmptyClients.h:
505         (WebCore::SVGEmptyChromeClient::print):
506
507 2007-07-12  Alice Liu  <alice.liu@apple.com>
508
509         Reviewed by Maciej and Steve.
510
511         fixed <rdar://4982432> window.print() needs to be implemented
512
513         * bridge/win/FrameWin.cpp:
514         (WebCore::Frame::print):
515         * page/Chrome.cpp:
516         (WebCore::Chrome::print):
517         * page/Chrome.h:
518         * page/ChromeClient.h:
519         * platform/win/TemporaryLinkStubs.cpp:
520
521 2007-07-11  Justin Garcia  <justin.garcia@apple.com>
522
523         Reviewed by Harrison.
524         
525         <rdar://problem/5300379> Mail hung on option-delete
526         
527         We were starting backward iteration at [container, 0] and
528         emitting for container over and over.
529
530         * editing/TextIterator.cpp:
531         (WebCore::SimplifiedBackwardsTextIterator::advance): Don't 
532         emit characters for a node if we're starting iteration at 
533         [container, 0].  Don't emit characters for exiting containers
534         if we've already done so.
535
536 2007-07-12  Kevin Decker  <kdecker@apple.com>
537
538         Reviewed by Mark Rowe.
539
540         <rdar://problem/5039463> find a good gray that works well for full frame plug-ins; consistent look for plugins
541
542         * loader/PluginDocument.cpp:
543         (WebCore::PluginTokenizer::createDocumentStructure): Changed values to a darker gray, per request from the HI team.
544
545 2007-07-11  Sam Weinig  <sam@webkit.org>
546
547         Reviewed by Maciej.
548
549         Patch for <rdar://problem/5329841>
550         Calling window.closed on a closed window causes Safari to crash
551
552         - Replaces the Frame member variable in KJS::Window for more appropriate DOMWindow
553         - Adds additional new null checks as necessary
554         - Removes bogus toBoolean method
555         - Removes unused scheduleClose method
556
557         Test: fast/dom/Window/window-closed-crash.html
558
559         * bindings/js/JSCustomXPathNSResolver.cpp:
560         (WebCore::JSCustomXPathNSResolver::create):
561         * bindings/js/JSDOMWindowCustom.cpp:
562         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
563         (WebCore::JSDOMWindow::customPut):
564         * bindings/js/JSXMLHttpRequest.cpp:
565         (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction):
566         * bindings/js/kjs_events.cpp:
567         (WebCore::JSAbstractEventListener::handleEvent):
568         (WebCore::JSLazyEventListener::parseCode):
569         * bindings/js/kjs_window.cpp:
570         (KJS::Window::Window):
571         (KJS::Window::impl):
572         (KJS::Window::interpreter):
573         (KJS::Window::location):
574         (KJS::Window::find):
575         (KJS::allowPopUp):
576         (KJS::createWindow):
577         (KJS::canShowModalDialog):
578         (KJS::canShowModalDialogNow):
579         (KJS::showModalDialog):
580         (KJS::Window::getValueProperty):
581         (KJS::Window::childFrameGetter):
582         (KJS::Window::indexGetter):
583         (KJS::Window::namedItemGetter):
584         (KJS::Window::getOwnPropertySlot):
585         (KJS::Window::put):
586         (KJS::Window::isSafeScript):
587         (KJS::Window::setListener):
588         (KJS::Window::getListener):
589         (KJS::Window::clear):
590         (KJS::WindowFunc::callAsFunction):
591         (KJS::Window::updateLayout):
592         (KJS::ScheduledAction::execute):
593         (KJS::Window::disconnectFrame):
594         (KJS::Location::put):
595         (KJS::LocationFunc::callAsFunction):
596         * bindings/js/kjs_window.h:
597         * page/mac/WebCoreFrameBridge.mm:
598         (updateRenderingForBindings):
599
600 2007-07-12  Mark Rowe  <mrowe@apple.com>
601
602         Reviewed by Ada.
603
604         <rdar://problem/5329877> REGRESSION: Document::setTransformSource leaks an xmlDocPtr if called more than once per document
605
606         * dom/Document.cpp:
607         (WebCore::Document::setTransformSource): Free any existing m_transformSource before overwriting it, rather than simply leaking it.
608         * dom/Document.h:
609
610 2007-07-12  Holger Hans Peter Freyther  <zecke@selfish.org>
611
612         Reviewed by Mark Rowe.
613
614         Fix compilation of the CURL backend after the removing of accessors from ResourceHandle in r24202
615
616         * platform/network/curl/ResourceHandleManager.cpp:
617         (WebCore::ResourceHandleManager::setupPOST):
618         (WebCore::ResourceHandleManager::startJob):
619
620 2007-07-12  Mark Rowe  <mrowe@apple.com>
621
622         Reviewed by Darin.
623
624         <rdar://problem/5327189> Logic error in DeprecatedString::to{,U}Int{,64} can lead to reading past end of buffer
625
626         The fix for reading past the end of the buffer is to verify we are not at the end of the string before checking
627         for a leading '+' character.  Rather than fixing the logic error in four nearly-identical functions I chose to
628         extract the common functionality into the toIntegralType helper function which the four functions call through to.
629
630         * platform/DeprecatedString.cpp:
631         (WebCore::isCharacterAllowedInBase):
632         (WebCore::toIntegralType):
633         (WebCore::DeprecatedString::toInt):
634         (WebCore::DeprecatedString::toInt64):
635         (WebCore::DeprecatedString::toUInt):
636         (WebCore::DeprecatedString::toUInt64):
637
638 2007-07-12  George Staikos  <staikos@kde.org>
639
640         Reviewed by Alexey.
641
642         Remove unused variables and fix rendering of comoboxes.
643
644         * platform/graphics/qt/ImageQt.cpp:
645         (WebCore::BitmapImage::draw):
646         * platform/qt/RenderThemeQt.cpp:
647         (WebCore::RenderThemeQt::paintMenuList):
648
649 2007-07-11  Oliver Hunt  <oliver@apple.com>
650
651         Reviewed by Maciej
652
653         Fix for <rdar://problem/5329712> GMail crash when trying to compose new message
654
655         * platform/win/FontDataWin.cpp:
656         (WebCore::FontData::containsCharacters):
657
658 2007-07-11  Alexey Proskuryakov  <ap@webkit.org>
659
660         Reviewed by Darin.
661
662         http://bugs.webkit.org/show_bug.cgi?id=14584
663         XMLHttpRequest treats null login/password incorrectly
664
665         Test: http/tests/xmlhttprequest/null-auth.php
666
667         * xml/xmlhttprequest.cpp:
668         (WebCore::XMLHttpRequest::open):
669         * xml/xmlhttprequest.h:
670         Split the open() method into three to distinguish between missing and null credentials.
671
672         * bindings/js/JSXMLHttpRequest.cpp:
673         (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction): Call the appropriate open().
674
675 2007-07-11  Oliver Hunt  <oliver@apple.com>
676
677         Build fix for windows
678
679         * page/Frame.cpp:
680         (WebCore::Frame::firstRectForRange):
681
682 2007-07-11  Oliver Hunt  <oliver@apple.com>
683
684         Reviewed by Maciej.
685
686         Fix <rdar://problem/5329481> Character range rect code for IME support needs to be crossplatform
687
688         Move -[WebCoreFrameBridge firstRectForDOMRange:] to Frame::firstRectForRange
689
690         * page/Frame.cpp:
691         (WebCore::Frame::firstRectForRange):
692         * page/Frame.h:
693         * page/mac/WebCoreFrameBridge.mm:
694         (-[WebCoreFrameBridge firstRectForDOMRange:]):
695
696 2007-07-11  Steve Falkenburg  <sfalken@apple.com>
697
698         Static analysis build fix.
699         
700         Only specify /analyze (PREfast) if it is available.
701         Prevents entire project from rebuilding each time.        
702
703         Reviewed by Hyatt.
704
705         * WebCore.vcproj/WebCore.vcproj:
706
707 2007-07-11  George Staikos  <staikos@kde.org>
708
709         Reviewed by Olliej.
710
711         Make comboboxes update when the current item is changed.
712
713         * platform/qt/PopupMenuQt.cpp:
714         (WebCore::PopupMenu::updateFromElement):
715         * platform/qt/QWebPopup.cpp:
716         (WebCore::QWebPopup::activeChanged):
717
718 2007-07-11  George Staikos  <staikos@kde.org>
719
720         Reviewed by Brady.
721
722         Add a destructor to cleanup the SQL handle.
723
724         * loader/icon/SQLDatabase.h:
725         (WebCore::SQLDatabase::~SQLDatabase):
726
727 2007-07-11  Holger Hans Peter Freyther  <zecke@selfish.org>
728
729         Reviewed by Darin.
730
731         As of http://bugs.webkit.org/show_bug.cgi?id=14527 move the
732         WebCore/ForwardingHeader/JavaScriptCore to JavaScriptCore
733
734         * ForwardingHeaders/JavaScriptCore: Removed.
735         * ForwardingHeaders/JavaScriptCore/APICast.h: Removed.
736         * ForwardingHeaders/JavaScriptCore/JSBase.h: Removed.
737         * ForwardingHeaders/JavaScriptCore/JSContextRef.h: Removed.
738         * ForwardingHeaders/JavaScriptCore/JSLock.h: Removed.
739         * ForwardingHeaders/JavaScriptCore/JSObjectRef.h: Removed.
740         * ForwardingHeaders/JavaScriptCore/JSStringRef.h: Removed.
741         * ForwardingHeaders/JavaScriptCore/JSStringRefCF.h: Removed.
742         * ForwardingHeaders/JavaScriptCore/JSValueRef.h: Removed.
743         * ForwardingHeaders/JavaScriptCore/JavaScriptCore.h: Removed.
744
745 2007-07-11  Anders Carlsson  <andersca@apple.com>
746
747         Fix build.
748         
749         * platform/network/cf/ResourceHandleCFNet.cpp:
750         (WebCore::willSendRequest):
751         (WebCore::didReceiveResponse):
752         (WebCore::didReceiveData):
753         (WebCore::didFinishLoading):
754         (WebCore::didFail):
755         (WebCore::didReceiveChallenge):
756
757 2007-07-11  George Staikos  <staikos@kde.org>
758
759         Repair the build.
760
761         * platform/network/qt/ResourceHandleQt.cpp:
762         (WebCore::ResourceHandle::start):
763
764 2007-07-11  Adele Peterson  <adele@apple.com>
765
766         Reviewed by Darin.
767
768         Fix for <rdar://problem/5230188> REGRESSION: Active/inactive marked text is not distinguished in textfields and textareas
769
770         We were previously trying to leave room for 1px of space between the text and the underline.
771         This change removes that requirement so that if we don't have room for the extra space, we still draw the thick underline
772         touching the text.
773
774         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintMarkedTextUnderline):
775
776 2007-07-11  Anders Carlsson  <andersca@apple.com>
777
778         Reviewed by Darin and Geoff.
779
780         <rdar://problem/5313508>
781         REGRESSION (Leopard): http/tests/xmlhttprequest/basic-auth.html hangs
782         
783         Leopard Foundation now ignores credentials passed in as part of the URL so we need to pass them ourselves.
784         
785         For the asynchronous case, we simply keep track of the URL and if it has a user name and password, we
786         pass those if we're asked to authenticate.
787                 
788         For the synchronous case, implement a new connection delegate and run it in a separate mode so 
789         no other sources will fire.
790
791         * platform/network/mac/ResourceHandleMac.mm:
792         (WebCore::ResourceHandle::loadResourceSynchronously):
793         (-[WebCoreResourceHandleAsDelegate dealloc]):
794         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
795         (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
796         (-[WebCoreSynchronousLoader _isDone]):
797         (-[WebCoreSynchronousLoader dealloc]):
798         (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]):
799         (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]):
800         (-[WebCoreSynchronousLoader connection:didReceiveResponse:]):
801         (-[WebCoreSynchronousLoader connection:didReceiveData:]):
802         (-[WebCoreSynchronousLoader connectionDidFinishLoading:]):
803         (-[WebCoreSynchronousLoader connection:didFailWithError:]):
804         (-[WebCoreSynchronousLoader _data]):
805         (-[WebCoreSynchronousLoader _response]):
806         (-[WebCoreSynchronousLoader _error]):
807         (+[WebCoreSynchronousLoader loadRequest:returningResponse:error:]):
808
809 2007-07-11  Darin Adler  <darin@apple.com>
810
811         Reviewed by Sam Weinig.
812
813         - fix <rdar://problem/5315265> REGRESSION: Leopard launch time -
814           there are about 190 stats of icudt36b files during launch
815
816         * platform/TextEncodingRegistry.cpp: (WebCore::atomicCanonicalTextEncodingName):
817         Add a special case for the empty string so we don't load the extended text
818         encodings just so we can return 0 for that case.
819
820 2007-07-11  Anders Carlsson  <andersca@apple.com>
821
822         Reviewed by Darin.
823
824         Remove a bunch of unneeded accessors from ResourceHandle.
825         
826         * loader/icon/IconLoader.cpp:
827         (WebCore::IconLoader::didReceiveResponse):
828         (WebCore::IconLoader::didFail):
829         (WebCore::IconLoader::didFinishLoading):
830         * platform/network/ResourceHandle.cpp:
831         * platform/network/ResourceHandle.h:
832
833 2007-07-09  Justin Garcia  <justin.garcia@apple.com>
834
835         Reviewed by Darin.
836         
837         <rdar://problem/5234383> REGRESSION: Sentence breaker method returning entire document length
838         
839         The functions for moving the caret to the next/previous sentence boundary
840         were in many cases moving to the beginning/end of the document.  The functions that 
841         should move the caret to an equivalent position in the next/previous sentence behaved
842         like the aforementioned functions ought to.  Put the code from the second two functions
843         in the first and made sure that the second two are properly FIXMEd.  They're rarely 
844         used (filed 5323691).
845         
846         * editing/SelectionController.cpp:
847         (WebCore::SelectionController::modify): Added an option for sentenceBoundary granularity,
848         so that we can test the functions that were broken from JS.
849         * editing/visible_units.cpp:
850         (WebCore::startOfSentence): Removed the FIXME about 5234383.
851         (WebCore::endSentenceBoundary): Make this function do what nextSentencePositionBoundary
852         current does.
853         (WebCore::endOfSentence): Removed the FIXME about 5234383.
854         (WebCore::previousSentencePosition): Removed an incorrect FIXME.
855         (WebCore::nextSentencePositionBoundary): Tweaked FIXME.  This function is
856         identical, not close to endSentenceBoundary.
857         (WebCore::nextSentencePosition): Removed an incorrect FIXME.
858
859 2007-07-11  Rob Buis  <buis@kde.org>
860
861         Reviewed by Darin.
862
863         http://bugs.webkit.org/show_bug.cgi?id=14453
864         REGRESSION: www.nzherald.co.nz almost all the formating is gone
865  
866         Be less strict for the hex color definition.
867
868         * css/CSSGrammar.y:
869         * css/cssparser.cpp:
870         (WebCore::CSSParser::lex):
871         (WebCore::CSSParser::text):
872         * css/tokenizer.flex:
873
874 2007-07-11  Rob Buis  <buis@kde.org>
875
876         Reviewed by Oliver.
877
878         Forgot to commit this as part of commit r24146. Now we are sure
879         createElement creates elements in the xhtml namespace only.
880
881         * ksvg2/svg/SVGDocument.cpp:
882         * ksvg2/svg/SVGDocument.h:
883
884 2007-07-10  Sam Weinig  <sam@webkit.org>
885
886         Reviewed by Oliver.
887
888         Move more attributes from the pure JS bindings in KJS::Window
889         to the implementation in DOMWindow and autogenerate the new bindings
890
891         Test: fast/dom/Window/get-set-properties.html
892
893         * bindings/js/JSDOMWindowCustom.cpp:
894         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Change to use propHashTable in
895         JSDOMWindow instead of KJS::Window
896         * bindings/js/kjs_window.cpp:
897         (KJS::Window::getValueProperty):
898         (KJS::Window::put):
899         * bindings/js/kjs_window.h:
900         (KJS::Window::):
901         * bindings/scripts/CodeGeneratorJS.pm: Cleanup getValueProperty and put generation
902         to reduce code duplication. 
903         * page/DOMWindow.cpp:
904         (WebCore::DOMWindow::closed):
905         (WebCore::DOMWindow::length):
906         (WebCore::DOMWindow::name):
907         (WebCore::DOMWindow::setName):
908         (WebCore::DOMWindow::status):
909         (WebCore::DOMWindow::setStatus):
910         (WebCore::DOMWindow::defaultStatus):
911         (WebCore::DOMWindow::setDefaultStatus):
912         * page/DOMWindow.h:
913         (WebCore::DOMWindow::defaultstatus):
914         (WebCore::DOMWindow::setDefaultstatus):
915         * page/DOMWindow.idl:
916
917 2007-07-10  Sam Weinig  <sam@webkit.org>
918
919         Reviewed by Geoff.
920
921         Fix for <rdar://problem/5326791> XSS vulnerability: ability to set window.defaultStatus,
922         window.defaultstatus and window.status cross domains
923
924         Test: http/tests/security/cross-frame-access-put.html
925
926         * bindings/js/kjs_window.cpp:
927         (KJS::Window::put): Adds isSafeScript check for defaultStatus,
928         defaultstatus and status cases.
929
930 2007-07-10  Sam Weinig  <sam@webkit.org>
931
932         Fix build for BuildBot.
933
934         * page/DOMWindow.cpp:
935         (WebCore::DOMWindow::outerHeight):
936         (WebCore::DOMWindow::outerWidth):
937         (WebCore::DOMWindow::screenX):
938         (WebCore::DOMWindow::screenY):
939
940 2007-07-10  Brady Eidson  <beidson@apple.com>
941
942         Reviewed by Sam
943
944         <rdar://problem/5326653> - REGRESSION: [WebBackForwardList forwardListCount] might return incorrect result
945
946         No layout test because this is an API issue that can't be tested in DRT or the browser
947
948         * history/BackForwardList.cpp:
949         (WebCore::BackForwardList::forwardListCount): If the index is NoCurrentItemIndex, return 0
950
951 2007-07-10  Sam Weinig  <sam@webkit.org>
952
953         Reviewed by Darin.
954
955         Move more readonly attributes from pure JS bindings in KJS::Window
956         to the implementation in DOMWindow and autogenerate the new bindings.
957
958         * bindings/js/kjs_window.cpp:
959         (KJS::Window::getValueProperty):  Sort the hashmap comment into categories
960         to make further migration easier.
961         * bindings/js/kjs_window.h: Sort the enum into categories to make further
962         migration easier.
963         (KJS::Window::):
964         * page/DOMWindow.cpp: Add new methods.
965         (WebCore::DOMWindow::focus):
966         (WebCore::DOMWindow::blur):
967         (WebCore::DOMWindow::offscreenBuffering):
968         (WebCore::DOMWindow::outerHeight):
969         (WebCore::DOMWindow::outerWidth):
970         (WebCore::DOMWindow::innerHeight):
971         (WebCore::DOMWindow::innerWidth):
972         (WebCore::DOMWindow::screenX):
973         (WebCore::DOMWindow::screenY):
974         (WebCore::DOMWindow::scrollX):
975         (WebCore::DOMWindow::scrollY):
976         (WebCore::DOMWindow::getComputedStyle):
977         (WebCore::DOMWindow::getMatchedCSSRules): Add null Document assertion.
978         (WebCore::DOMWindow::devicePixelRatio): Add null Frame and Page checks.
979         * page/DOMWindow.h:
980         (WebCore::DOMWindow::screenLeft):
981         (WebCore::DOMWindow::screenTop):
982         (WebCore::DOMWindow::pageXOffset):
983         (WebCore::DOMWindow::pageYOffset):
984         * page/DOMWindow.idl:
985
986 2007-07-10  Oliver Hunt  <oliver@apple.com>
987
988         Reviewed by Maciej.
989
990         Fix for <rdar://problem/5326417> Editor::unmarkText needs to be crossplatform
991
992         Missed this in earlier patch to make text marking platform independent.
993
994         * editing/Editor.cpp:
995         (WebCore::Editor::unmarkText):
996            Add platform independent impl
997         * editing/mac/EditorMac.mm:
998            Remove the old mac path.
999
1000 2007-07-10  Geoffrey Garen  <ggaren@apple.com>
1001
1002         Reviewed by Tim Hatcher.
1003
1004         Added a Page counter. This helped me while investigating 
1005         <rdar://problem/5314463> 40MB of WebKit memory still allocated after 
1006         closing large email in Mail
1007
1008         * WebCore.xcodeproj/project.pbxproj:
1009         * page/Page.cpp:
1010         (WebCore::):
1011         (WebCore::PageCounter::~PageCounter):
1012         (WebCore::Page::Page):
1013         (WebCore::Page::~Page):
1014
1015 2007-07-10  Timothy Hatcher  <timothy@apple.com>
1016
1017         Reviewed by Geoff.
1018
1019         <rdar://problem/5326126> InspectorResource holds onto more data than it needs
1020
1021         Reduces the fixed size of InspectorResource from 630 bytes to 224 bytes. Now
1022         selectively pick out parts of the ResourceRequest and ResourceResponse objects
1023         for the info needed and store that directly in InspectorResource.
1024
1025         The ResourceRequest and ResourceResponse objects hold a reference to the original
1026         NSURL object, so almost double the data was being kept around. So the struct size
1027         reduction is just the tip of the ice burg on what this really saves.
1028
1029         In a test of 100,000 XMLHTTPRequests using a 85 byte long data URL, I see ~21 MB less
1030         RSIZE compared to Safari running without this change.
1031
1032         * page/InspectorController.cpp:
1033         (WebCore::InspectorResource::InspectorResource):
1034         (WebCore::InspectorResource::type):
1035         (WebCore::addSourceToFrame):
1036         (WebCore::scriptObjectForRequest):
1037         (WebCore::scriptObjectForResponse):
1038         (WebCore::InspectorController::addScriptResource):
1039         (WebCore::InspectorController::addAndUpdateScriptResource):
1040         (WebCore::updateResourceRequest):
1041         (WebCore::updateResourceResponse):
1042         (WebCore::InspectorController::updateScriptResourceRequest):
1043         (WebCore::InspectorController::updateScriptResourceResponse):
1044         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
1045         (WebCore::InspectorController::identifierForInitialRequest):
1046         (WebCore::InspectorController::willSendRequest):
1047         (WebCore::InspectorController::didReceiveResponse):
1048         (WebCore::InspectorController::didFailLoading):
1049         * page/InspectorController.h:
1050
1051 2007-07-10  Darin Adler  <darin@apple.com>
1052
1053         Reviewed by Brady.
1054
1055         - fix crash introduced by my patch for 5318732, only seen in release builds
1056
1057         * page/Page.cpp: (WebCore::Page::~Page): Added a missing null check.
1058
1059 2007-07-10  Andrea Cavalli  <amc82@cam.ac.uk>
1060
1061         Reviewed by George Staikos.
1062
1063         Fixed render theme for text field.
1064
1065         * platform/qt/RenderThemeQt.cpp:
1066         (WebCore::RenderThemeQt::paintTextField):
1067
1068 2007-07-10  Qing Zhao  <qing@staikos.net>
1069
1070         Reviewed by George Staikos.
1071
1072         Draw focus rings for nodes that are not rendered by QStyle.
1073
1074         * platform/graphics/qt/GraphicsContextQt.cpp:
1075         (WebCore::focusRingColor):
1076         (WebCore::GraphicsContext::drawFocusRing):
1077         * platform/qt/RenderThemeQt.cpp:
1078         (WebCore::RenderThemeQt::supportsFocusRing):
1079         (WebCore::RenderThemeQt::supportsFocus):
1080
1081 2007-07-10  Nikolas Zimmermann  <zimmermann@kde.org>
1082
1083         Reviewed by Geoff.
1084
1085         Fix 'unsigned int' overflow in CodeGeneratorJS.pm.
1086         This fixes hashing of "SVG_FEBLEND_MODE_NORMAL". Its hashvalue exceeded 2^32, which
1087         is no problem in perl but in the cpp code. Emulate C/C++ behaviour by using "% 2^32" in
1088         the perl code. Testcase available in feature-branch soon (js-svg-constructors.svg).
1089
1090         * bindings/scripts/CodeGeneratorJS.pm:
1091
1092 2007-07-10  Geoffrey Garen  <ggaren@apple.com>
1093
1094         Reviewed by Maciej Stachowiak.
1095
1096         Disabled Arena recycling in RenderArena. PLT shows no regression 
1097         (possibly a small speedup), and this can reduce allocated memory in 
1098         WebKit clients by about 120K (4K per Arena * 30 Arenas).
1099         
1100         I happened upon this optimization while investigating 
1101         <rdar://problem/5314463> WebKit hangs on to 40MB RAM after closing 
1102         large email in Mail (appears to be render tree arena allocator), 
1103         although I don't think it will come close to fixing that bug 
1104         completely.
1105
1106         * rendering/RenderArena.cpp:
1107         (WebCore::RenderArena::~RenderArena): Use FinishArenaPool, which frees
1108         the ArenaPool's Arenas immediately.
1109
1110 2007-07-10  Mitz Pettel  <mitz@webkit.org>
1111
1112         Reviewed by Hyatt.
1113
1114         - fix http://bugs.webkit.org/show_bug.cgi?id=14449
1115           REGRESSION (r14345-r14375): Absolutely positioned image does not scale to containing element's height
1116
1117         Test: fast/replaced/absolute-position-percentage-height.html
1118
1119         * rendering/RenderBox.cpp:
1120         (WebCore::RenderBox::calcReplacedHeightUsing): For positioned elements, evaluate
1121         the percentage with respect to the container's final height.
1122
1123 2007-07-10  Brady Eidson  <beidson@apple.com>
1124
1125         Reviewed by Mark Rowe
1126
1127         Add 64-bit integer converters to our string classes for future work
1128
1129         * platform/DeprecatedString.cpp:
1130         (WebCore::DeprecatedString::toInt64):
1131         (WebCore::DeprecatedString::toUInt64):
1132         * platform/DeprecatedString.h:
1133
1134         * platform/PlatformString.h:
1135         * platform/String.cpp:
1136         (WebCore::String::toInt64):
1137         (WebCore::String::toUInt64):
1138
1139         * platform/StringImpl.cpp:
1140         (WebCore::StringImpl::toInt64):
1141         (WebCore::StringImpl::toUInt64):
1142         * platform/StringImpl.h:
1143
1144 2007-07-10  Darin Adler  <darin@apple.com>
1145
1146         Reviewed by Anders.
1147
1148         - fix <rdar://problem/5318732> REGRESSION: In Mail, a crash occurs when attempting to send
1149           a HTML based message (nytimes.com, washingtonpost.com, latimes.com)
1150
1151         Did an audit of calls to get the inspector and most other uses of Page* and added null
1152         checks since Frame* can outlast its Page*.
1153
1154         * loader/FrameLoader.cpp:
1155         (WebCore::FrameLoader::createWindow): Added null check.
1156         (WebCore::FrameLoader::loadSubframe): Ditto.
1157         (WebCore::FrameLoader::load): Ditto.
1158         (WebCore::FrameLoader::transitionToCommitted): Ditto.
1159         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto.
1160         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Ditto.
1161         (WebCore::FrameLoader::addExtraFieldsToRequest): Ditto.
1162         (WebCore::FrameLoader::loadResourceSynchronously): Ditto.
1163         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto.
1164         (WebCore::FrameLoader::requestFromDelegate): Ditto.
1165         (WebCore::FrameLoader::canGoBackOrForward): Ditto.
1166         (WebCore::FrameLoader::getHistoryLength): Ditto.
1167         (WebCore::FrameLoader::historyURL): Ditto.
1168         (WebCore::FrameLoader::cachePageForHistoryItem): Ditto.
1169         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Ditto.
1170         (WebCore::FrameLoader::goToItem): Ditto.
1171         (WebCore::FrameLoader::dispatchWindowObjectAvailable): Ditto.
1172         (WebCore::FrameLoader::dispatchDidCommitLoad): Ditto.
1173         (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest): Ditto.
1174         (WebCore::FrameLoader::dispatchWillSendRequest): Ditto.
1175         (WebCore::FrameLoader::dispatchDidReceiveResponse): Ditto.
1176         (WebCore::FrameLoader::dispatchDidReceiveContentLength): Ditto.
1177         (WebCore::FrameLoader::dispatchDidFinishLoading): Ditto.
1178         (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Ditto.
1179
1180         * page/ContextMenuController.h:
1181         * page/ContextMenuController.cpp:
1182         (WebCore::ContextMenuController::ContextMenuController): Removed unneeded and
1183         unused Page* parameter.
1184         (WebCore::openNewWindow): Added null check.
1185         (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
1186
1187         * page/InspectorController.h:
1188         (WebCore::InspectorController::pageDestroyed): Added. Since this object is
1189         owned by the Page and has a back-pointer to it, it needs an explicit disconnect.
1190         There's already a higher-level one, but this is more reliable than that.
1191         * page/InspectorController.cpp:
1192         (WebCore::InspectorController::windowScriptObjectAvailable): Added null check.
1193         (WebCore::InspectorController::windowUnloading): Ditto.
1194
1195         * page/Page.cpp:
1196         (WebCore::Page::Page): Updated for change in parameters of ContextMenuController 
1197         constructor.
1198         (WebCore::Page::~Page): Added call to InspectorController pageDestroyed().
1199
1200         * page/Chrome.cpp: Updated includes.
1201         * page/DragController.cpp: Ditto.
1202
1203 2007-07-10  Adam Treat  <adam@staikos.net>
1204
1205         Reviewed by George Staikos.
1206
1207         Bring scroll wheel out of Ludicrous Speed.
1208
1209         * platform/qt/WheelEventQt.cpp:
1210         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1211
1212 2007-07-09  Geoffrey Garen  <ggaren@apple.com>
1213
1214         Reviewed by Maciej Stachowiak.
1215
1216         Fixed http://bugs.webkit.org/show_bug.cgi?id=13241 | <rdar://problem/5126396>
1217         onload fires before content is finished loading (woot.com)
1218         
1219         * dom/Document.cpp:
1220         (WebCore::Document::close): Try to go through the normal "Am I done loading?"
1221         machinery before dispatching the load event. As the comment indicates, 
1222         we can't do this in all cases, so the fix isn't perfect. However, a perfect 
1223         solution would require much riskier sweeping changes to the loader, which 
1224         are best left for later, I think.
1225
1226         * xml/XSLTProcessor.cpp:
1227         (WebCore::XSLTProcessor::createDocumentFromSource): Removed a slightly
1228         worse solution to the same problem.
1229
1230 2007-07-10  Rob Buis  <buis@kde.org>
1231
1232         Reviewed by Maciej.
1233
1234         http://bugs.webkit.org/show_bug.cgi?id=8007
1235         createElement() and XHTML (A dynamically created table not rendered as such)
1236
1237         Follow the HTML5 rules of making the name lowercase and then
1238         creating the element in the xhtml namespace.
1239
1240         * dom/Document.cpp:
1241         (WebCore::Document::createElement):
1242         * dom/Document.h:
1243         * html/HTMLDocument.cpp:
1244         * html/HTMLDocument.h:
1245
1246 2007-07-09  Qing Zhao  <qing@staikos.net>
1247
1248         Reviewed by George Staikos.
1249
1250         Add qt context menu support.
1251
1252         * WebCore.pro:
1253         * platform/ContextMenu.h:
1254         * platform/ContextMenuItem.h:
1255         (WebCore::PlatformMenuItemDescriptionType::PlatformMenuItemDescriptionType):
1256         * platform/qt/ContextMenuItemQt.cpp:
1257         (WebCore::ContextMenuItem::ContextMenuItem):
1258         (WebCore::ContextMenuItem::~ContextMenuItem):
1259         (WebCore::ContextMenuItem::releasePlatformDescription):
1260         (WebCore::ContextMenuItem::type):
1261         (WebCore::ContextMenuItem::setType):
1262         (WebCore::ContextMenuItem::action):
1263         (WebCore::ContextMenuItem::setAction):
1264         (WebCore::ContextMenuItem::title):
1265         (WebCore::ContextMenuItem::setTitle):
1266         (WebCore::ContextMenuItem::platformSubMenu):
1267         (WebCore::ContextMenuItem::setSubMenu):
1268         (WebCore::ContextMenuItem::setChecked):
1269         (WebCore::ContextMenuItem::setEnabled):
1270         (WebCore::ContextMenuItem::enabled):
1271         * platform/qt/ContextMenuQt.cpp:
1272         (WebCore::ContextMenu::ContextMenu):
1273         (WebCore::ContextMenu::~ContextMenu):
1274         (WebCore::ContextMenu::appendItem):
1275         (WebCore::ContextMenu::itemCount):
1276         (WebCore::ContextMenu::insertItem):
1277         (WebCore::ContextMenu::setPlatformDescription):
1278         (WebCore::ContextMenu::platformDescription):
1279
1280 2007-07-09  Anders Carlsson  <andersca@apple.com>
1281
1282         Build fix.
1283         
1284         * plugins/win/PluginViewWin.cpp:
1285         (WebCore::PluginViewWin::performRequest):
1286
1287 2007-07-09  Anders Carlsson  <andersca@apple.com>
1288
1289         Reviewed by Geoff.
1290
1291         Get rid of the node argument in our various script execution functions.
1292         
1293         * bindings/js/kjs_proxy.cpp:
1294         (WebCore::KJSProxy::evaluate):
1295         * bindings/js/kjs_proxy.h:
1296         * bindings/js/kjs_window.cpp:
1297         (KJS::ScheduledAction::execute):
1298         * dom/XMLTokenizer.cpp:
1299         (WebCore::XMLTokenizer::endElementNs):
1300         (WebCore::XMLTokenizer::notifyFinished):
1301         * html/HTMLScriptElement.cpp:
1302         (WebCore::HTMLScriptElement::evaluateScript):
1303         * html/HTMLTokenizer.cpp:
1304         (WebCore::HTMLTokenizer::scriptExecution):
1305         * loader/FrameLoader.cpp:
1306         (WebCore::FrameLoader::changeLocation):
1307         (WebCore::FrameLoader::urlSelected):
1308         (WebCore::FrameLoader::submitForm):
1309         (WebCore::FrameLoader::replaceContentsWithScriptResult):
1310         (WebCore::FrameLoader::executeScript):
1311         * loader/FrameLoader.h:
1312         * page/mac/WebCoreFrameBridge.mm:
1313         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
1314         (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]):
1315
1316 2007-07-09  Justin Garcia  <justin.garcia@apple.com>
1317
1318         Rolling the fix for 5290534 back in now that 5310404 has been fixed in Mail.
1319
1320         * editing/DeleteSelectionCommand.cpp:
1321         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1322
1323 2007-07-09  Geoffrey Garen  <ggaren@apple.com>
1324
1325         Reviewed by Anders Carlsson.
1326
1327         A little more FrameLoader cleanup while working on <rdar://problem/5126396>.
1328         
1329         Rename: "checkEmitLoadEvent" => "checkCallImplicitClose" because the function
1330         doesn't emit the load event; it just calls implicitClose.
1331         
1332         Rename: "m_wasLoadEventEmitted" => "m_didCallImplicitClose" because the variable
1333         tracks whether implicitClose was called.
1334
1335         * dom/Document.cpp:
1336         (WebCore::Document::implicitClose): Turned 12 lines of code into 6, adding ASSERT.
1337         * loader/FrameLoader.h: Removed bogus declaration of non-existent emitLoadEvent().
1338
1339 2007-07-09  Justin Garcia  <justin.garcia@apple.com>
1340
1341         Reviewed by John.
1342         
1343         REGRESSION: Crash when deleting table content in Leopard Mail
1344
1345         * editing/DeleteSelectionCommand.cpp:
1346         (WebCore::DeleteSelectionCommand::handleGeneralDelete): Use a RefPtr
1347         for the next node to delete, in case it is destroyed when the
1348         current node is deleted.  In the crash reported in the radar, we
1349         crash because the next node is the div that holds the delete button
1350         and it's destroyed when the node that contains the selection is removed.
1351
1352 2007-07-09  Adam Treat  <adam@staikos.net>
1353
1354         Reviewed by George Staikos.
1355
1356         Convert QWebFrame from a QFrame to a pure QObject to eliminate all
1357         traces of widgets.
1358
1359         * page/qt/EventHandlerQt.cpp:
1360         (WebCore::EventHandler::passSubframeEventToSubframe):
1361         * platform/ScrollView.h:
1362         * platform/Widget.h:
1363         * platform/qt/PlatformScrollBarQt.cpp:
1364         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
1365         (WebCore::PlatformScrollbar::handleMousePressEvent):
1366         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
1367         * platform/qt/PopupMenuQt.cpp:
1368         (WebCore::PopupMenu::show):
1369         * platform/qt/ScrollViewQt.cpp:
1370         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
1371         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
1372         (WebCore::ScrollView::ScrollViewPrivate::windowClipRect):
1373         (WebCore::ScrollView::updateContents):
1374         (WebCore::ScrollView::update):
1375         (WebCore::ScrollView::geometryChanged):
1376         (WebCore::ScrollView::windowToContents):
1377         (WebCore::ScrollView::contentsToWindow):
1378         (WebCore::ScrollView::convertChildToSelf):
1379         (WebCore::ScrollView::convertSelfToChild):
1380         (WebCore::ScrollView::scrollbarUnderMouse):
1381         (WebCore::ScrollView::addChild):
1382         (WebCore::ScrollView::paint):
1383         * platform/qt/WidgetQt.cpp:
1384         (WebCore::WidgetPrivate::WidgetPrivate):
1385         (WebCore::WidgetPrivate::~WidgetPrivate):
1386         (WebCore::WidgetPrivate::setGeometry):
1387         (WebCore::WidgetPrivate::geometry):
1388         (WebCore::Widget::frameGeometry):
1389         (WebCore::Widget::setFocus):
1390         (WebCore::Widget::setCursor):
1391         (WebCore::Widget::show):
1392         (WebCore::Widget::hide):
1393         (WebCore::Widget::qwebframe):
1394         (WebCore::Widget::setQWebFrame):
1395         (WebCore::Widget::qwidget):
1396         (WebCore::Widget::setQWidget):
1397         (WebCore::Widget::setFrameGeometry):
1398         (WebCore::Widget::isEnabled):
1399         (WebCore::Widget::setEnabled):
1400         (WebCore::Widget::setIsSelected):
1401         (WebCore::Widget::invalidate):
1402         (WebCore::Widget::invalidateRect):
1403         (WebCore::Widget::removeFromParent):
1404         (WebCore::Widget::geometryChanged):
1405         (WebCore::Widget::convertToContainingWindow):
1406         (WebCore::Widget::convertFromContainingWindow):
1407         (WebCore::Widget::convertChildToSelf):
1408         (WebCore::Widget::convertSelfToChild):
1409         (WebCore::Widget::containingWindow):
1410
1411 2007-07-09  Anders Carlsson  <andersca@apple.com>
1412
1413         Reviewed by Oliver.
1414
1415         Add DocumentLoader::isLoadingMainResource.
1416
1417         * WebCore.exp:
1418
1419 2007-07-09  John Sullivan  <sullivan@apple.com>
1420
1421         Reviewed by Darin
1422
1423         * WebCore.exp:
1424         * WebCore.xcodeproj/project.pbxproj:
1425         exported String::createCFString, needed for <rdar://problem/5320208>
1426
1427 2007-07-09  Mitz Pettel  <mitz@webkit.org>
1428
1429         Reviewed by Maciej.
1430
1431         Test case for the bug below, which is http://bugs.webkit.org/show_bug.cgi?id=14207
1432
1433         * manual-tests/flash-unload-tab.html: Added.
1434
1435 2007-07-09  Maciej Stachowiak  <mjs@apple.com>
1436
1437         Reviewed by Oliver.
1438
1439         <rdar://problem/5295734> Repro crash closing tab/window @ maps.google.com in
1440         WTF::HashSet<KJS::RuntimeObjectImp*, WTF::PtrHash<KJS::RuntimeObjectImp*>,
1441         WTF::HashTraits<KJS::RuntimeObjectImp*> >::add + 11
1442         
1443         Automated test case is not possible. Did not bother with manual test this time.
1444
1445         * bindings/js/kjs_dom.cpp:
1446         (WebCore::getRuntimeObject): Check that runtime root isn't null, as well as instance;
1447         this should cover the case where the plugin is already shut down and onunload time.
1448
1449 2007-07-08  Maciej Stachowiak  <mjs@apple.com>
1450
1451         Reviewed by Sam.
1452
1453         - fixed <rdar://problem/5220706> REGRESSION (TOT): repro crash in -[WebView(WebViewInternal) _addObject:forIdentifier:] [14425]
1454         http://bugs.webkit.org/show_bug.cgi?id=14425
1455
1456         * bindings/js/kjs_window.cpp:
1457         (KJS::createWindow): No longer take an immediate argument - always do immediate loads
1458         on a newly created Window. Also, do a load of "" to make sure that the right info makes
1459         it to the app.
1460         (KJS::showModalDialog): Updated for above.
1461         (KJS::WindowFunc::callAsFunction): Updated for above.
1462         * dom/Document.cpp:
1463         (WebCore::Document::shouldBeAllowedToLoadLocalResources): If our URL is about:blank,
1464         we're allowed if our opener is (since the opener must have written the contents).
1465         * loader/FrameLoader.cpp:
1466         (WebCore::FrameLoader::changeLocation): Add a variant which takes a KURL, which it
1467         expects to be pre-completed. This is to avoid completing "" to the opener URL.
1468         (WebCore::FrameLoader::urlSelected): Allow loading empty URLs.
1469         * loader/FrameLoader.h:
1470         
1471         Test case is manual only, since it takes particular app behavior to reproduce:
1472         
1473         * manual-tests/new-window-subresource-crash.html: Added.
1474
1475 2007-07-08  Mitz Pettel  <mitz@webkit.org>
1476
1477         Reviewed by Maciej.
1478
1479         - fix leaks introduced in r24099
1480
1481         * dom/Element.cpp:
1482         (WebCore::Element::~Element): Do not delete the cached computed style here.
1483         (WebCore::Element::detach): Delete the computed style here instead.
1484         (WebCore::Element::computedStyle): Removed a redundant ref() which was
1485         causing the leak. Changed to return 0 if the element is not attached,
1486         because in that case there is currently no way to tell when to delete the computed
1487         style.
1488
1489 2007-07-08  Mitz Pettel  <mitz@webkit.org>
1490
1491         Reviewed by Darin.
1492
1493         - fix http://bugs.webkit.org/show_bug.cgi?id=12384
1494           getComputedStyle with td.style.display='none' reports '' for all properties except display
1495
1496         Test: fast/css/computed-style-without-renderer.html
1497
1498         Implement rich computed style for elements that do not have a renderer.
1499
1500         * css/CSSComputedStyleDeclaration.cpp:
1501         (WebCore::getPositionOffsetValue): Changed to take a RenderStyle instead of
1502         a RenderObject.
1503         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed to
1504         use the computed style returned by the node instead of going through the
1505         renderer. Changed properties that compute by measuring the renderer to
1506         fall back on returning the length from the RenderStyle if a renderer does
1507         not exist.
1508         (WebCore::CSSComputedStyleDeclaration::length): Changed to return the number
1509         of properties we can compute even if the element has no renderer.
1510         (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties): Changed
1511         to use the computed style returned by the node instead of going through the
1512         renderer.
1513         * dom/Element.cpp:
1514         (WebCore::ElementRareData::ElementRareData): Added a computed style member,
1515         used to cache computed style for elements that do not have a renderer.
1516         (WebCore::ElementRareData::resetComputedStyle): Added.
1517         (WebCore::Element::~Element): Delete the cached computed style.
1518         (WebCore::Element::recalcStyle): Added code to delete the cached computed
1519         style when necessary.
1520         (WebCore::Element::computedStyle): Added. Returns the style used in rendering
1521         the element, if available. Otherwise uses the style selector to compute style
1522         for the element.
1523         * dom/Element.h:
1524         * dom/Node.cpp:
1525         (WebCore::Node::computedStyle): Added. This method returns either the style
1526         used in rendering the node, or the style that would be used if the node
1527         had a renderer.
1528         * dom/Node.h:
1529
1530 2007-07-08  Mitz Pettel  <mitz@webkit.org>
1531
1532         Reviewed by Darin.
1533
1534         - fix http://bugs.webkit.org/show_bug.cgi?id=14544
1535           Scroll wheel events are ignored when the cursor is over an iframe's border
1536
1537         * page/mac/EventHandlerMac.mm:
1538         (WebCore::EventHandler::passWheelEventToWidget): Changed to return false if
1539         the event coordinates are not inside the widget's NSView hierarchy.
1540
1541 2007-07-08  Rob Buis  <buis@kde.org>
1542
1543         Reviewed by Mitz.
1544
1545         http://bugs.webkit.org/show_bug.cgi?id=10752
1546         The inspector should not respond to Make Text Smaller/Bigger commands
1547
1548         Use the -webkit-text-size-adjust property to ignore text sizing        
1549         and do not take the zoom factor into account for line height when
1550         -webkit-text-size-adjust is set to none.
1551
1552         * css/cssstyleselector.cpp:
1553         (WebCore::CSSStyleSelector::applyProperty):
1554         * page/inspector/inspector.css:
1555
1556 2007-07-08  Darin Adler  <darin@apple.com>
1557
1558         Reviewed by Maciej.
1559
1560         - fix <rdar://problem/5318994> Integer overflow in WebCore's Base64.cpp:base64Encode
1561
1562         * platform/Base64.cpp:
1563         (WebCore::base64Encode): Check against a maximum size.
1564         (WebCore::base64Decode): Ditto.
1565
1566 2007-07-08  Darin Adler  <darin@apple.com>
1567
1568         Reviewed by Maciej.
1569
1570         - fix <rdar://problem/5124665> WebCore secondary-thread assertion should use linked-on-or-after check instead of building on Tiger check
1571
1572         * platform/ThreadCheck.h: Renamed _WebCoreThreadViolationCheck to reportThreadViolation
1573         since it's in the WebCore namespace and also we shouldn't use leading underscores since
1574         those are reserved for the compiler and standard library. Added a new function named
1575         setDefaultThreadViolationBehavior and an enum for the parameter. Removed the
1576         threadViolationIsException parameter from WebCoreReportThreadViolation since we use
1577         a global variable for it now. Got rid of the unnecessary use of do while (0) in the
1578         WebCoreThreadViolationCheck macro -- since it's only a single function call it's already
1579         a statement and doesn't need to be turned into one with the do while (0) trick.
1580
1581         * platform/mac/ThreadCheck.mm:
1582         (WebCore::readThreadViolationBehaviorFromUserDefaults): Moved the code to read from
1583         NSUserDefaults into this helper function. Changed it to use stringForKey instead of
1584         objectForKey so we don't get a "method not found" if someone puts something other than
1585         a string in there. Updated to use the new globals.
1586         (WebCore::setDefaultThreadViolationBehavior): Added.
1587         (WebCore::reportThreadViolation): Simplified, now that most of the work is in the
1588         readThreadViolationBehaviorFromUserDefaults function.
1589         (WebCoreReportThreadViolation): Changed to use a global variable instead of parameter
1590         to determine how to report a violation. Added LogOnFirstThreadViolation, which will
1591         log only once for each function that violates.
1592
1593         * WebCore.exp: Updated for above changes.
1594
1595 2007-07-08  Mitz Pettel  <mitz@webkit.org>
1596
1597         Reviewed by Darin.
1598
1599         - fix http://bugs.webkit.org/show_bug.cgi?id=14221
1600           Repro crash (ASSERTION FAILED: oldText in RenderBlock::updateFirstLetter() during relayout of :before content with first-letter style)
1601
1602         Test: fast/css-generated-content/before-with-first-letter.html
1603
1604         * rendering/RenderContainer.cpp:
1605         (WebCore::RenderContainer::updateBeforeAfterContentForContainer): If a child
1606         of the existing 'before' container is not text, do not assume that it is an
1607         image, since it can also be an inline wrapping a first-letter. In that case,
1608         do not update its style (so in particular, keep it a FIRST_LETTER type style)
1609         and leave it to updateFirstLetter() to take care of.
1610
1611 2007-07-07  Sam Weinig  <sam@webkit.org>
1612
1613         Reviewed by Oliver Hunt.
1614
1615         Bailout early in Window::put() if attribute is readonly to avoid
1616         extra calls to isSafeScript().
1617
1618         * bindings/js/kjs_window.cpp:
1619         (KJS::Window::put):
1620
1621 2007-07-07  Darin Adler  <darin@apple.com>
1622
1623         Reviewed by Oliver Hunt.
1624
1625         - fix <rdar://problem/5292364> REGRESSION: ZX Spectrum 3.0 widget - graphic anomalies in widget window frame
1626
1627         Updated Dashboard quirk so it affects fill, stroke, and clip, rather than just stroke.
1628
1629         Test: fast/canvas/fill-stroke-clip-reset-path.html
1630
1631         * html/CanvasRenderingContext2D.h: Added clearPathForDashboardBackwardCompatibilityMode.
1632         * html/CanvasRenderingContext2D.cpp:
1633         (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode): Added.
1634         (WebCore::CanvasRenderingContext2D::fill): Call the new function.
1635         (WebCore::CanvasRenderingContext2D::stroke): Replaced in-line code with a call to the new function.
1636         (WebCore::CanvasRenderingContext2D::clip): Call the new function.
1637
1638 2007-07-07  Rob Buis  <buis@kde.org>
1639
1640         Reviewed and tweaked by Darin.
1641
1642         http://bugs.webkit.org/show_bug.cgi?id=8994
1643         Canvas doesn't reset on resize
1644
1645         Also reset the rendering context when resetting the canvas.
1646
1647         * html/HTMLCanvasElement.cpp:
1648         (WebCore::HTMLCanvasElement::reset):
1649         (WebCore::HTMLCanvasElement::drawingContext):
1650
1651 2007-07-07  Alexey Proskuryakov  <ap@webkit.org>
1652
1653         Reviewed by Maciej.
1654
1655         http://bugs.webkit.org/show_bug.cgi?id=14525
1656         Support exslt:node-set()
1657
1658         Test: fast/xsl/exslt-node-set.xml
1659
1660         * xml/XSLTExtensions.cpp: Added.
1661         (WebCore::exsltNodeSetFunction): A copy of exslt:node-set() implementation
1662         from libexslt 1.1.11 (shipped with Tiger).
1663         (WebCore::registerXSLTExtensions): This function registers any WebCore-provided
1664         extensions on a context. Currently, the only extension is exslt:node-set().
1665         * xml/XSLTExtensions.h: Added.
1666
1667         * xml/XSLTProcessor.cpp:
1668         (WebCore::XSLTProcessor::transformToString):
1669         Register extensions when creating a context.
1670
1671         * WebCore.pro:
1672         * WebCore.vcproj/WebCore.vcproj:
1673         * WebCore.xcodeproj/project.pbxproj:
1674         * WebCoreSources.bkl:
1675         Add XSLTExtensions.{h,cpp} to projects.
1676
1677 2007-07-06  Maciej Stachowiak  <mjs@apple.com>
1678
1679         Reviewed by Oliver.
1680
1681         - fixed <rdar://problem/5133420> ASSERT in WebDocumentLoaderMac::decreaseLoadCount() un-discarding Gmail message
1682         
1683         test case: fast/loader/early-load-cancel.html
1684
1685         * loader/ResourceLoader.cpp:
1686         (WebCore::ResourceLoader::didCancel): Don't send cancel-related client callbacks
1687         if we never even sent willSendRequest because we were deferred.
1688
1689 2007-07-06  Oliver Hunt  <oliver@apple.com>
1690
1691         Reviewed by Maciej.
1692
1693         Pulled a number of methods from WebKit and WebCoreFrameBridge into 
1694         C++ objects.
1695
1696         * WebCore.exp:
1697         * WebCore.xcodeproj/project.pbxproj:
1698         * editing/Editor.cpp:
1699         (WebCore::Editor::replaceMarkedText):
1700             From -[WebCoreFrameBridge replaceMarkedTextWithText:]
1701         * editing/Editor.h:
1702         * page/Frame.cpp:
1703         (WebCore::Frame::setMarkedTextRange):
1704             Pulled platform independent logic from Mac specific implementation
1705         (WebCore::Frame::selectRangeInMarkedText):
1706             Converted from -[WebHTMLView _selectRangeInMarkedText:]
1707         * page/Frame.h:
1708         * page/mac/FrameMac.mm:
1709         (WebCore::Frame::setMarkedTextRange):
1710             Now only does Mac specific logic when manipulating initial
1711             NSAttributedString
1712         * page/mac/WebCoreFrameBridge.h:
1713         * page/mac/WebCoreFrameBridge.mm:
1714             Removed -[WebCoreFrameBridge replaceMarkedTextWithText:]
1715
1716 2007-07-06  Mitz Pettel  <mitz@webkit.org>
1717
1718         Reviewed by Darin.
1719
1720         - fix http://bugs.webkit.org/show_bug.cgi?id=14545
1721           REGRESSION (r21854-r21869): Repro crash in RenderBlock::updateFirstLetter @ nola.com/rose/
1722
1723         Test: fast/css/first-letter-capitalized.html
1724
1725         * rendering/RenderBlock.cpp:
1726         (WebCore::RenderBlock::updateFirstLetter): Moved the call to setFirstLetter
1727         further down so that the first letter is not destroyed if a text transform
1728         is applied to the remaining text fragment when it is add to the render tree.
1729         * rendering/RenderText.cpp:
1730         (WebCore::RenderText::previousCharacter): Factored out of setTextInternal.
1731         (WebCore::RenderText::setTextInternal): Changed to call previousCharacter().
1732         * rendering/RenderText.h:
1733         * rendering/RenderTextFragment.cpp:
1734         (WebCore::RenderTextFragment::previousCharacter): Override to return the
1735         character in the original string before the start of the fragment. 
1736         * rendering/RenderTextFragment.h:
1737
1738 2007-07-06  Mitz Pettel  <mitz@webkit.org>
1739
1740         Reviewed by Beth.
1741
1742         - fix http://bugs.webkit.org/show_bug.cgi?id=14536
1743           Unnecessary layout done when mousing down in text field
1744
1745         No test possible because there is no change in functionality.
1746
1747         * rendering/RenderTextControl.cpp:
1748         (WebCore::RenderTextControl::setStyle): Reset the height and the width in
1749         the old style to avoid getting a layout hint as a result of having mutated
1750         the old style during layout.
1751         (WebCore::RenderTextControl::layout): Update children's layout if an inner
1752         block's dimensions should change. This need for layout was previously masked
1753         by the bug.
1754
1755 2007-07-06  Brady Eidson  <beidson@apple.com>
1756
1757         Fix builds that use IconDatabaseNone.cpp - better, this time
1758
1759         * loader/icon/IconDatabaseNone.cpp:
1760         (WebCore::IconDatabase::isOpen):
1761
1762 2007-07-06  Brady Eidson  <beidson@apple.com>
1763
1764         Fix builds that use IconDatabaseNone.cpp
1765
1766         * loader/icon/IconDatabaseNone.cpp:
1767         (WebCore::IconDatabase::databasePath): 
1768
1769 2007-07-06  John Sullivan  <sullivan@apple.com>
1770
1771         Reviewed by Brady
1772         
1773         - WebCore part of fix for: 
1774           <rdar://problem/5310739> Time Machine shouldn't back up WebKit's icon database files
1775         
1776         * loader/icon/IconDatabase.h:
1777         * loader/icon/IconDatabase.cpp:
1778         (WebCore::IconDatabase::isOpen): 
1779         made this method const (necessary to make IconDatabase::databasePath const)
1780         (WebCore::IconDatabase::databasePath): 
1781         new method, returns SQLDatabase's path if open, otherwise empty string
1782         
1783         * loader/icon/SQLDatabase.cpp:
1784         (WebCore::SQLDatabase::open):
1785         don't append a null character to the m_path ivar. The appended null character was making the path()
1786         method return a String with a trailing null, which is bad. However, there were no callers to the
1787         path() method until now. Instead of appending a null character to the ivar, use charactersWithNullTermination()
1788         instead of characters() when opening the database.
1789         
1790         * loader/icon/SQLDatabase.h:
1791         (WebCore::SQLDatabase::isOpen):
1792         made this method const (necessary to make IconDatabase::databasePath const)
1793         (WebCore::SQLDatabase::path):
1794         made this method const (not required for these changes, but seemed worth doing at the same time)
1795
1796         * WebCore.exp:
1797         added symbol for IconDatabase::databasePath
1798
1799 2007-07-06  George Staikos  <staikos@kde.org>
1800
1801         No real functional change - just move the localizations out and
1802         stick some placeholder text in.
1803
1804         * platform/qt/Localizations.cpp: Added.
1805         (WebCore::submitButtonDefaultLabel):
1806         (WebCore::inputElementAltText):
1807         (WebCore::resetButtonDefaultLabel):
1808         (WebCore::defaultLanguage):
1809         (WebCore::searchableIndexIntroduction):
1810         (WebCore::fileButtonChooseFileLabel):
1811         (WebCore::fileButtonNoFileSelectedLabel):
1812         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
1813         (WebCore::contextMenuItemTagDownloadLinkToDisk):
1814         (WebCore::contextMenuItemTagCopyLinkToClipboard):
1815         (WebCore::contextMenuItemTagOpenImageInNewWindow):
1816         (WebCore::contextMenuItemTagDownloadImageToDisk):
1817         (WebCore::contextMenuItemTagCopyImageToClipboard):
1818         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
1819         (WebCore::contextMenuItemTagCopy):
1820         (WebCore::contextMenuItemTagGoBack):
1821         (WebCore::contextMenuItemTagGoForward):
1822         (WebCore::contextMenuItemTagStop):
1823         (WebCore::contextMenuItemTagReload):
1824         (WebCore::contextMenuItemTagCut):
1825         (WebCore::contextMenuItemTagPaste):
1826         (WebCore::contextMenuItemTagNoGuessesFound):
1827         (WebCore::contextMenuItemTagIgnoreSpelling):
1828         (WebCore::contextMenuItemTagLearnSpelling):
1829         (WebCore::contextMenuItemTagSearchWeb):
1830         (WebCore::contextMenuItemTagLookUpInDictionary):
1831         (WebCore::contextMenuItemTagOpenLink):
1832         (WebCore::contextMenuItemTagIgnoreGrammar):
1833         (WebCore::contextMenuItemTagSpellingMenu):
1834         (WebCore::contextMenuItemTagShowSpellingPanel):
1835         (WebCore::contextMenuItemTagCheckSpelling):
1836         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
1837         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
1838         (WebCore::contextMenuItemTagFontMenu):
1839         (WebCore::contextMenuItemTagBold):
1840         (WebCore::contextMenuItemTagItalic):
1841         (WebCore::contextMenuItemTagUnderline):
1842         (WebCore::contextMenuItemTagOutline):
1843         (WebCore::contextMenuItemTagWritingDirectionMenu):
1844         (WebCore::contextMenuItemTagDefaultDirection):
1845         (WebCore::contextMenuItemTagLeftToRight):
1846         (WebCore::contextMenuItemTagRightToLeft):
1847         (WebCore::contextMenuItemTagInspectElement):
1848         (WebCore::searchMenuNoRecentSearchesText):
1849         (WebCore::searchMenuRecentSearchesText):
1850         (WebCore::searchMenuClearRecentSearchesText):
1851         (WebCore::AXWebAreaText):
1852         (WebCore::AXLinkText):
1853         (WebCore::AXListMarkerText):
1854         (WebCore::AXImageMapText):
1855         (WebCore::AXHeadingText):
1856         * platform/qt/TemporaryLinkStubs.cpp:
1857
1858 2007-07-06  Geoffrey Garen  <ggaren@apple.com>
1859
1860         Reviewed by Anders Carlsson.
1861
1862         A little more FrameLoader cleanup while working on <rdar://problem/5126396>.
1863         
1864         Moved url() and URL() methods next to each other to highlight their subtlety.
1865
1866         * loader/FrameLoader.cpp:
1867         (WebCore::FrameLoader::url):
1868         * loader/FrameLoader.h:
1869
1870 2007-07-06  Geoffrey Garen  <ggaren@apple.com>
1871
1872         Reviewed by Anders Carlsson.
1873
1874         A little FrameLoader cleanup while working on <rdar://problem/5126396>.
1875         
1876         Renamed endIfNotLoading() to endIfNotLoadingMainResource() because "loading"
1877         and "loadingMainResource" have distinct meanings and this function
1878         honors the latter.
1879
1880         (WebCore::FrameLoader::endIfNotLoadingMainResource): Protect after the
1881         early return to avoid ref count churn.
1882         * loader/FrameLoader.h:
1883         (WebCore::FrameLoader::isLoadingMainResource): Inlined this function.
1884
1885 2007-07-06  Adam Treat  <adam@staikos.net>
1886
1887         Reviewed by George Staikos.
1888
1889         Convert QWebFrame to a QFrame from a scroll area.
1890
1891         * page/qt/EventHandlerQt.cpp:
1892         (WebCore::EventHandler::passSubframeEventToSubframe):
1893         (WebCore::EventHandler::passWheelEventToWidget):
1894         (WebCore::EventHandler::createDraggingClipboard):
1895         (WebCore::EventHandler::passMousePressEventToScrollbar):
1896         * platform/ScrollView.h:
1897         * platform/Widget.h:
1898         * platform/qt/PlatformScrollBar.h:
1899         * platform/qt/PlatformScrollBarQt.cpp:
1900         (WebCore::PlatformScrollbar::setRect):
1901         (WebCore::PlatformScrollbar::frameGeometry):
1902         (WebCore::PlatformScrollbar::setFrameGeometry):
1903         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
1904         (WebCore::PlatformScrollbar::handleMousePressEvent):
1905         (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
1906         * platform/qt/ScrollViewQt.cpp:
1907         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
1908         (WebCore::ScrollView::ScrollViewPrivate::~ScrollViewPrivate):
1909         (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
1910         (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
1911         (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
1912         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
1913         (WebCore::ScrollView::ScrollViewPrivate::windowClipRect):
1914         (WebCore::ScrollView::ScrollView):
1915         (WebCore::ScrollView::~ScrollView):
1916         (WebCore::ScrollView::setScrollArea):
1917         (WebCore::ScrollView::horizontalScrollBar):
1918         (WebCore::ScrollView::verticalScrollBar):
1919         (WebCore::ScrollView::updateContents):
1920         (WebCore::ScrollView::update):
1921         (WebCore::ScrollView::visibleWidth):
1922         (WebCore::ScrollView::visibleHeight):
1923         (WebCore::ScrollView::visibleContentRect):
1924         (WebCore::ScrollView::setContentsPos):
1925         (WebCore::ScrollView::resizeContents):
1926         (WebCore::ScrollView::setFrameGeometry):
1927         (WebCore::ScrollView::geometryChanged):
1928         (WebCore::ScrollView::contentsX):
1929         (WebCore::ScrollView::contentsY):
1930         (WebCore::ScrollView::contentsWidth):
1931         (WebCore::ScrollView::contentsHeight):
1932         (WebCore::ScrollView::windowToContents):
1933         (WebCore::ScrollView::contentsToWindow):
1934         (WebCore::ScrollView::scrollOffset):
1935         (WebCore::ScrollView::maximumScroll):
1936         (WebCore::ScrollView::scrollBy):
1937         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1938         (WebCore::ScrollView::hScrollbarMode):
1939         (WebCore::ScrollView::vScrollbarMode):
1940         (WebCore::ScrollView::suppressScrollbars):
1941         (WebCore::ScrollView::setHScrollbarMode):
1942         (WebCore::ScrollView::setVScrollbarMode):
1943         (WebCore::ScrollView::setScrollbarsMode):
1944         (WebCore::ScrollView::setStaticBackground):
1945         (WebCore::ScrollView::inWindow):
1946         (WebCore::ScrollView::updateScrollbars):
1947         (WebCore::ScrollView::scrollbarUnderMouse):
1948         (WebCore::ScrollView::addChild):
1949         (WebCore::ScrollView::removeChild):
1950         (WebCore::ScrollView::paint):
1951         (WebCore::ScrollView::wheelEvent):
1952         (WebCore::ScrollView::scroll):
1953         (WebCore::ScrollView::windowResizerRect):
1954         (WebCore::ScrollView::resizerOverlapsContent):
1955         (WebCore::ScrollView::adjustOverlappingScrollbarCount):
1956         (WebCore::ScrollView::setParent):
1957         (WebCore::ScrollView::addToDirtyRegion):
1958         (WebCore::ScrollView::scrollBackingStore):
1959         (WebCore::ScrollView::updateBackingStore):
1960         * platform/qt/WidgetQt.cpp:
1961         (WebCore::WidgetPrivate::canvas):
1962         (WebCore::WidgetPrivate::setGeometry):
1963         (WebCore::WidgetPrivate::geometry):
1964         (WebCore::Widget::setQWidget):
1965         (WebCore::Widget::paint):
1966         (WebCore::Widget::originalGeometry):
1967         (WebCore::Widget::geometryChanged):
1968
1969 2007-07-06  Anders Carlsson  <andersca@apple.com>
1970
1971         Reviewed by Mitz.
1972
1973         <rdar://problem/5280532> 
1974         REGRESSION: Can't access nested embed by document.name if object is not immediate parent
1975         
1976         Traverse up the tree looking for an object element.
1977         
1978         * html/HTMLEmbedElement.cpp:
1979         (WebCore::HTMLEmbedElement::getInstance):
1980
1981 2007-07-06  George Staikos  <staikos@kde.org>
1982
1983         Qt build fix: Don't clobber qmake variables that are already set.
1984
1985         * WebCore.pro:
1986
1987 2007-07-05  Maciej Stachowiak  <mjs@apple.com>
1988
1989         Reviewed by Antti.
1990
1991         - <rdar://problem/5311093> JavaScriptCore fails to build with strict-aliasing warnings
1992
1993         * platform/StringHash.h:
1994         (WTF::): Adapt to newer way to do storage types.
1995
1996 2007-07-06  Bernhard Rosenkraenzer  <bero@arklinux.org>
1997
1998         Reviewed by Sam.
1999
2000         Fix for http://bugs.webkit.org/show_bug.cgi?id=13985
2001         Bug 13985: WebCore/rendering/RenderTable.cpp fails to compile with gcc 4.2.x
2002
2003         * rendering/RenderTable.cpp:
2004         (WebKit::RenderTable::calcBorderLeft)
2005         (WebKit::RenderTable::calcBorderRight)
2006
2007 2007-07-06  Maxime Britto  <mbritto@pleyo.com>
2008
2009         Reviewed by Maciej.
2010
2011         Fix http://bugs.webkit.org/show_bug.cgi?id=13038
2012         Bug 13038: ASSERTION FAILED: item->target().isEmpty() || m_mainFrame->tree()->find(item->target()) == m_mainFrame
2013
2014         Modify an ASSERT in goToItem related to going back/forward in history.  We don't need to check the frameset if the target is _blank.
2015         The attached test case is a manual one since it relies on having pages opened in tabs in Safari.
2016
2017         * manual-tests/goBack-blank-tab-page.html: Added.
2018         * manual-tests/resources/before-go-back.html: Added.
2019         * manual-tests/resources/will-go-back.html: Added.
2020         * page/Page.cpp:
2021         (WebCore::Page::goToItem):
2022
2023 2007-07-06  Mitz Pettel  <mitz@webkit.org>
2024
2025         Reviewed by Maciej.
2026
2027         - fix http://bugs.webkit.org/show_bug.cgi?id=14400
2028           Assertion failure (SHOULD NEVER BE REACHED) going back on YouTube
2029
2030         Test: fast/forms/button-state-restore.html
2031
2032         * dom/Document.h:
2033         (WebCore::Document::isFormElementRegistered): Added.
2034         * html/HTMLGenericFormElement.cpp:
2035         (WebCore::HTMLGenericFormElement::closeRenderer): Restore saved form
2036         element state only if the element is registered with the document to
2037         have its state saved.
2038
2039 2007-07-06  Mitz Pettel  <mitz@webkit.org>
2040
2041         Reviewed by Maciej.
2042
2043         - fix http://bugs.webkit.org/show_bug.cgi?id=14487
2044           Incomplete repaint of background and border of boxes with -webkit-border-fit:lines
2045
2046         Test: fast/repaint/border-fit-lines.html
2047
2048         * rendering/RenderObject.cpp:
2049         (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Do a full repaint if
2050         -webkit-border-fit:lines was specified.
2051
2052 2007-07-06  Tony Chang  <idealisms@gmail.com>
2053
2054         Reviewed by Maciej.
2055
2056         http://bugs.webkit.org/show_bug.cgi?id=14516
2057         Bug 14516: crash loading multipart/x-mixed-replace data on windows safari
2058
2059         NULL check m_resourceData to prevent a crash in Safari on Windows.
2060
2061         * loader/ResourceLoader.cpp:
2062         (WebCore::ResourceLoader::clearResourceData):
2063
2064 2007-07-06  Jungshik Shin  <jungshik.shin@gmail.com>
2065
2066         Reviewed by Alexey.
2067
2068         - Add UTF-32 encoding support 
2069           http://bugs.webkit.org/show_bug.cgi?id=13415
2070
2071         Test:
2072          - fast/encoding/utf-32-big-endian-bom.html
2073          - fast/encoding/utf-32-big-endian-nobom.xml
2074          - fast/encoding/utf-32-little-endian-bom.html
2075          - fast/encoding/utf-32-little-endian-nobom.xml
2076
2077         * loader/TextResourceDecoder.cpp:
2078         (WebCore::TextResourceDecoder::checkForBOM):
2079         (WebCore::TextResourceDecoder::checkForHeadCharset):
2080         * platform/TextDecoder.cpp:
2081         (WebCore::TextDecoder::checkForBOM):
2082         * platform/TextDecoder.h:
2083         * platform/TextEncoding.cpp:
2084         (WebCore::UTF32BigEndianEncoding):
2085         (WebCore::UTF32LittleEndianEncoding):
2086         * platform/TextEncoding.h:
2087
2088 2007-07-06  Holger Hans Peter Freyther  <zecke@selfish.org>
2089
2090         Reviewed by Maciej.
2091
2092         Start implementening RenderThemeGdk/Gtk using GtkStyle. The approach is
2093         to allocate one native control for each widget type. And use margins, spacing,
2094         style properties from the Widget. And for drawing use GtkStyle on the rect supplied.
2095
2096         This should allow nice integration and be relative resource friendly. Mozilla is using
2097         a similiar approach. They seem to share the GdkPixmap among several operations and this
2098         will be an obvious candidate for improvements. Create a normally big enough GdkPixmap and
2099         use that for drawing and then set clip regions for cairo to make sure to not go beyond the
2100         width and height.
2101
2102         The next steps will be to introduce states for the widgets, add more widgets, handle focus,
2103         and various other style attributes, honor the size and margin and use that to propagate this
2104         back to RenderStyle*.
2105
2106         * platform/gdk/RenderThemeGdk.cpp:
2107         (WebCore::RenderThemeGdk::RenderThemeGdk):
2108         (WebCore::RenderThemeGdk::setCheckboxSize):
2109         (WebCore::RenderThemeGdk::paintCheckbox):
2110         (WebCore::RenderThemeGdk::setRadioSize):
2111         (WebCore::RenderThemeGdk::paintRadio):
2112         (WebCore::RenderThemeGdk::paintButton):
2113         (WebCore::RenderThemeGdk::copyToContext):
2114         (WebCore::RenderThemeGdk::gtkButton):
2115         (WebCore::RenderThemeGdk::gtkCheckbox):
2116         (WebCore::RenderThemeGdk::gtkRadioButton):
2117         (WebCore::RenderThemeGdk::gtkWindowContainer):
2118         * platform/gdk/RenderThemeGdk.h:
2119
2120 2007-07-06  Rob Buis  <buis@kde.org>
2121
2122         Reviewed by Adam.
2123
2124         http://bugs.webkit.org/show_bug.cgi?id=14442
2125         Adding a stop with value 1.0 to a gradient that has already been used has no effect
2126
2127         Implement start and end stop handling differently so they are not
2128         in the color stop array.
2129
2130         * html/CanvasGradient.cpp:
2131         (WebCore::compareStops):
2132         (WebCore::CanvasGradient::getColor):
2133         (WebCore::CanvasGradient::findStop):
2134
2135 2007-07-06  Adam Roben  <aroben@apple.com>
2136
2137         Fix <rdar://problem/5301994> Garbled text still showing on some sites
2138
2139         Replace calls to GetGlyphIndices with wkGetGlyphs.
2140
2141         Reviewed by Alice.
2142
2143         * platform/win/GlyphPageTreeNodeWin.cpp:
2144         (WebCore::GlyphPage::fill): Use wkGetGlyphs.
2145         * platform/win/FontDataWin.cpp:
2146         (WebCore::FontData::containsCharacters):
2147
2148 2007-07-06  Matt Lilek  <pewtermoose@gmail.com>
2149
2150         Not reviewed - Windows build fix.
2151
2152         * bridge/win/FrameWin.cpp:
2153         (WebCore::imageFromSelection):
2154
2155 2007-07-06  George Staikos  <staikos@kde.org>
2156
2157         Reviewed by Maciej.
2158
2159         Switch USE(ICONDATABASE) to ENABLE(ICONDATABASE) and activate the
2160         flag via the .pro file
2161
2162         * WebCore.pro:
2163         * loader/icon/IconDatabase.h:
2164
2165 2007-07-05  John Sullivan  <sullivan@apple.com>
2166
2167         Reviewed by Adam
2168
2169         - WebCore part of fix for <rdar://problem/5315033>
2170
2171         * rendering/RenderObject.h:
2172         replaced PaintRestrictionSelectionOnlyWhiteText with PaintRestrictionSelectionOnlyBlackText
2173         (WebCore::RenderObject::PaintInfo::PaintInfo):
2174         replaced forceWhiteText with forceBlackText
2175
2176         * rendering/RenderObject.cpp:
2177         (WebCore::RenderObject::addLineBoxRects):
2178         added a useSelectionHeight parameter, which defaults to false; this method is unimplemented
2179         at this level so this has no effect.
2180
2181         * rendering/RenderText.h:
2182         * rendering/RenderText.cpp:
2183         (WebCore::RenderText::addLineBoxRects):
2184         added a useSelectionHeight parameter, which defaults to false. If true, use the vertical position
2185         and height returned by selectionRect rather than replacing it with the more tight-fitting position
2186         and height of the line box.
2187
2188         * dom/Range.h:
2189         * dom/Range.cpp:
2190         (WebCore::Range::addLineBoxRects):
2191         added a useSelectionHeight parameter, which defaults to false. Passes this along to RenderObject.        
2192
2193         * page/Frame.h:
2194         renamed parameter to selectionImage
2195         * page/Frame.cpp:
2196         (WebCore::Frame::selectionTextRects):
2197         pass true for addLineBoxRects new useSelectionHeight parameter, so the rects returned by this new
2198         method will match the height that the selection would be painted here
2199         (WebCore::Frame::paint):
2200         updated for white->black name changes
2201         
2202         * page/mac/FrameMac.mm:
2203         (WebCore::Frame::selectionImage):
2204         updated for white->black name changes
2205         
2206         * rendering/InlineFlowBox.cpp:
2207         (WebCore::InlineFlowBox::paintTextDecorations):
2208         updated for white->black name changes
2209
2210         * rendering/RenderLayer.cpp:
2211         (WebCore::RenderLayer::paintLayer):
2212         updated for white->black name changes
2213
2214         * rendering/InlineTextBox.cpp:
2215         (WebCore::InlineTextBox::paint):
2216         updated for white->black name changes, and actually use black instead of white. This was the goal
2217         of all the name changes.
2218
2219 2007-07-05  Anders Carlsson  <andersca@apple.com>
2220
2221         Reviewed by Oliver.
2222
2223         Fix layout test failures.
2224         
2225         * loader/FrameLoader.cpp:
2226         (WebCore::FrameLoader::commitProvisionalLoad):
2227         Don't make a representation if we're creating the initial document.
2228
2229 2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>
2230
2231         Fix Bug 14388: Input in text fields limited to 1024 characters
2232         http://bugs.webkit.org/show_bug.cgi?id=14388
2233
2234         Slightly modified by Adam Roben.
2235
2236         Reviewed by Adele.
2237
2238         Tests: fast/forms/input-implicit-length-limit.html
2239                fast/forms/input-maxlength.html
2240
2241         * html/HTMLInputElement.cpp: Bump limit to 524288.
2242         (WebCore::HTMLInputElement::init):
2243         (WebCore::HTMLInputElement::parseMappedAttribute):
2244         * html/HTMLInputElement.h:
2245
2246 2007-07-05  Anders Carlsson  <andersca@apple.com>
2247
2248         Build fix.
2249         
2250         * loader/FrameLoader.cpp:
2251         (WebCore::FrameLoader::init):
2252
2253 2007-07-05  Sam Weinig  <sam@webkit.org>
2254
2255         Reviewed by Geoff.
2256
2257         Add focus, blur and close functions to DOMWindow implementation class
2258         and move bindings from Window to JSDOMWindow.
2259
2260         * bindings/js/JSDOMWindowCustom.cpp:
2261         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2262         * bindings/js/kjs_window.cpp:
2263         (KJS::Window::getOwnPropertySlot):
2264         (KJS::WindowFunc::callAsFunction):
2265         * bindings/js/kjs_window.h:
2266         (KJS::Window::):
2267         * bindings/scripts/CodeGeneratorJS.pm: Move prototype function declaration from
2268         the implementation to the header.
2269         * page/DOMWindow.cpp:
2270         (WebCore::DOMWindow::focus):
2271         (WebCore::DOMWindow::blur):
2272         (WebCore::DOMWindow::close):
2273         * page/DOMWindow.h:
2274         * page/DOMWindow.idl:
2275
2276 2007-07-05  Justin Garcia  <justin.garcia@apple.com>
2277
2278         Reviewed by Harrison.
2279
2280         <rdar://problem/5279521> REGRESSION: In Mail, a crash occurs at WebCore::Range::startPosition() when attempting to apply alignment to selected image/text in message body
2281
2282         * editing/TextIterator.cpp:
2283         (WebCore::TextIterator::exitNode): Previously emitted content shouldn't have
2284         to come from a text node in order to emit a '\n' as we exit block containers.
2285
2286 2007-07-05  Anders Carlsson  <andersca@apple.com>
2287
2288         Reviewed by Geoff.
2289
2290         <rdar://problem/5315284> REGRESSION: Leopard Launch Time - plugins are being accessed at startup.
2291
2292         Set a response that has a MIME type of "text/html" on the document loader so WebKit won't refresh the 
2293         plugin database looking for a plug-in that can handle the document's MIME type (which will be null anyway).
2294                  
2295         * loader/FrameLoader.cpp:
2296         (WebCore::FrameLoader::init):
2297
2298 2007-07-05  Anders Carlsson  <andersca@apple.com>
2299
2300         Reviewed by Oliver.
2301
2302         <rdar://problem/5106788>
2303         WebKit loads user style sheets too late as seen in Mail (breaks DataDetectors; Mail flashes wrong font)
2304
2305         Let the document know when the user style sheet is loading so that it try not to display anything
2306         until the user style sheet has finished loading.
2307         
2308         * page/Frame.cpp:
2309         (WebCore::UserStyleSheetLoader::UserStyleSheetLoader):
2310         (WebCore::UserStyleSheetLoader::~UserStyleSheetLoader):
2311         (WebCore::UserStyleSheetLoader::setCSSStyleSheet):
2312         (WebCore::Frame::setUserStyleSheetLocation):
2313
2314 2007-07-05  Sam Weinig  <sam@webkit.org>
2315
2316         Reviewed by Darin.
2317
2318         Move JSDOMWindow overriding getOwnPropertySlot logic from KJS::Window
2319         up into JSDOMWindow.  No change in functionality so no testcase required. 
2320
2321         * bindings/js/JSDOMWindowCustom.cpp:
2322         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2323         * bindings/js/kjs_window.cpp:
2324         (KJS::Window::getOwnPropertySlot):
2325         * bindings/js/kjs_window.h:
2326
2327 2007-07-05  Mitz Pettel  <mitz@webkit.org>
2328
2329         Reviewed and Landed by Sam.
2330
2331         - fix bug 14465 for window.showModalDialog
2332
2333         * bindings/js/kjs_window.cpp:
2334         (KJS::parseModalDialogFeatures):
2335         (KJS::showModalDialog):
2336
2337 2007-07-05  Sam Weinig  <sam@webkit.org>
2338
2339         Reviewed by Mitz.
2340
2341         Patch for http://bugs.webkit.org/show_bug.cgi?id=14465
2342         window.open() uses the literal "undefined" as the URL
2343
2344         * bindings/js/kjs_window.cpp:
2345         (KJS::WindowFunc::callAsFunction): add checks for undefined and null values when setting the url.
2346         * manual-tests/open-url-undefined.html: Added.
2347
2348 2007-07-05  Holger Hans Peter Freyther  <zecke@selfish.org>
2349
2350         Reviewed by Rob Buis.
2351
2352         Rework FontData and FontPlatformData for the Gdk work to make valgrind
2353         happy.
2354
2355         Move destroying of FontConfig and Cairo objects held in FontPlatformData
2356         to FontData::platformDestroy. The ownership of these objects is held by
2357         FontData. This is following the Mac and Qt port at least.
2358
2359         Currently it is possible that FontPlatformData will not create cairo resources
2360         in this case at least make sure the variables are initialized to 0.
2361         Initialize x,y of the cairo_glyph_t with zero to avoid extents.x_advance depending
2362         on subtracing with not defined values.
2363
2364         FontPlatformData::hash. Using FontDescription is a bad idea as we don't have a clue
2365         about how it is packed, if holes are present, etc. The FcPattern and the m_fontMatrix
2366         should be good enough to describe the Font. All other objects are created using these
2367         variables
2368
2369         Replace C-style casts with C++ casts, in this case reinterpret_cast.
2370
2371         * platform/gdk/FontDataGdk.cpp:
2372         (WebCore::FontData::platformInit): Don't assert
2373         (WebCore::FontData::platformDestroy): Take over ownership
2374         (WebCore::FontData::platformWidthForGlyph): initialize
2375         (WebCore::FontData::setFont): be paranoid and assert
2376         * platform/gdk/FontPlatformData.h:
2377         (WebCore::FontPlatformData::FontPlatformData): Initialize everything
2378         (WebCore::FontPlatformData::hash): make valgrind happy and don't use m_fontDescription
2379         * platform/gdk/FontPlatformDataGdk.cpp:
2380         (WebCore::FontPlatformData::FontPlatformData):
2381         (WebCore::FontPlatformData::~FontPlatformData): FontData::platformDestroy will do this
2382         (WebCore::FontPlatformData::list): Don't use C-style casts.
2383         (WebCore::FontPlatformData::setFont): m_fontFace, m_fontMatrix, m_options might not be initialized
2384         (WebCore::FontPlatformData::operator==): Don't use C-style casts.
2385
2386 2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>
2387
2388         Reviewed by Mark Rowe.
2389
2390         http://bugs.webkit.org/show_bug.cgi?id=14445
2391         GraphicsContextCairo code style cleanup
2392
2393         Follow the cr naming convention for cairo_t*.
2394         Remove trailing whitespace.
2395         Replace C casts with C++ casts.
2396         Avoid needless casts.
2397
2398         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2399         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2400         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
2401         (WebCore::GraphicsContext::GraphicsContext):
2402         (WebCore::GraphicsContext::platformContext):
2403         (WebCore::GraphicsContext::savePlatformState):
2404         (WebCore::GraphicsContext::restorePlatformState):
2405         (WebCore::GraphicsContext::drawRect):
2406         (WebCore::adjustLineToPixelBoundaries):
2407         (WebCore::GraphicsContext::drawLine):
2408         (WebCore::GraphicsContext::drawEllipse):
2409         (WebCore::GraphicsContext::strokeArc): Save/restore the graphics state.
2410         (WebCore::GraphicsContext::drawConvexPolygon):
2411         (WebCore::GraphicsContext::fillRect):
2412         (WebCore::GraphicsContext::clip):
2413         (WebCore::GraphicsContext::drawFocusRing):
2414         (WebCore::GraphicsContext::roundToDevicePixels):
2415         (WebCore::GraphicsContext::translate):
2416         (WebCore::GraphicsContext::origin):
2417         (WebCore::GraphicsContext::setPlatformStrokeThickness):
2418         (WebCore::GraphicsContext::setPlatformStrokeStyle):
2419         (WebCore::GraphicsContext::setPlatformFont):
2420         (WebCore::GraphicsContext::concatCTM):
2421         (WebCore::GraphicsContext::addInnerRoundedRectClip):
2422         (WebCore::GraphicsContext::beginTransparencyLayer):
2423         (WebCore::GraphicsContext::endTransparencyLayer):
2424         (WebCore::GraphicsContext::clearRect):
2425         (WebCore::GraphicsContext::setLineCap):
2426         (WebCore::GraphicsContext::setLineJoin):
2427         (WebCore::GraphicsContext::setMiterLimit):
2428         (WebCore::GraphicsContext::setCompositeOperation):
2429         (WebCore::GraphicsContext::beginPath):
2430         (WebCore::GraphicsContext::addPath):
2431         (WebCore::GraphicsContext::rotate):
2432         (WebCore::GraphicsContext::scale):
2433         * platform/graphics/cairo/ImageBufferCairo.cpp:
2434         (WebCore::ImageBuffer::ImageBuffer):
2435         * platform/graphics/cairo/ImageCairo.cpp: Avoid the confusing ctxt/context naming scheme.
2436         (WebCore::BitmapImage::draw):
2437         (WebCore::Image::drawPattern):
2438
2439 2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>
2440
2441         Reviewed by Mark Rowe.
2442
2443         http://bugs.webkit.org/show_bug.cgi?id=14531
2444         Cairo SVGImage::nativeImageForCurrentFrame() has no return
2445
2446         Return the Cairo surface from the frame cache.
2447
2448         Also add a fall-through else macro with notImplemented() so that future
2449         ports do not make the same mistake.
2450
2451         * platform/graphics/svg/SVGImage.cpp:
2452         (WebCore::SVGImage::nativeImageForCurrentFrame):
2453
2454 2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>
2455
2456         Reviewed by Mark Rowe.
2457
2458         http://bugs.webkit.org/show_bug.cgi?id=14513
2459         Cairo animated GIF support is broken
2460
2461         Implement ImageSource::frameIsCompleteAtIndex() to enable animated GIFs.
2462
2463         * platform/graphics/cairo/ImageSourceCairo.cpp:
2464         (WebCore::ImageSource::frameIsCompleteAtIndex):
2465
2466 2007-07-04  Matt Perry  <mpComplete@gmail.com>
2467
2468         Reviewed by Adam.
2469
2470         Fix for http://bugs.webkit.org/show_bug.cgi?id=13400
2471         Bug 13400: REGRESSION (r20809-20814): No back entry created for navigations created by assigning to document.location
2472         <rdar://problem/5153025>
2473
2474         Treat userGesture as always true for setLocation, forcing a back/forward
2475         entry to be created.
2476
2477         * bindings/js/JSHTMLDocumentCustom.cpp:
2478         (WebCore::JSHTMLDocument::setLocation):
2479
2480 2007-07-04  Adam Roben  <aroben@apple.com>
2481
2482         Restore MouseEventWithHitTestResults::targetNode's old behavior
2483
2484         Reviewed by Mark.
2485
2486         Fixes fast/images/imagemap-case and fast/replace/image-map.
2487
2488         * page/MouseEventWithHitTestResults.cpp:
2489         (WebCore::MouseEventWithHitTestResults::targetNode): Use the inner
2490         node, not the inner non-shared node.
2491
2492 2007-07-04  Adam Roben  <aroben@apple.com>
2493
2494         Mac, Qt, and Gdk build fixes.
2495
2496         * page/EventHandler.h:
2497         * page/gdk/EventHandlerGdk.cpp:
2498         * page/mac/EventHandlerMac.mm:
2499         (WebCore::EventHandler::passSubframeEventToSubframe):
2500         * page/qt/EventHandlerQt.cpp:
2501
2502 2007-07-04  Adam Roben  <aroben@apple.com>
2503
2504         Fix the Qt/Gdk builds.
2505
2506         * page/gdk/EventHandlerGdk.cpp:
2507         * page/qt/EventHandlerQt.cpp:
2508
2509 2007-07-04  Adam Roben  <aroben@apple.com>
2510
2511         Move tooltip logic down into WebCore so that it can be shared cross-platform
2512
2513         Reviewed by Sam.
2514
2515         * page/Chrome.cpp:
2516         (WebCore::Chrome::setToolTip): Added.
2517         * page/Chrome.h:
2518         * page/ChromeClient.h:
2519         * page/EventHandler.cpp:
2520         (WebCore::EventHandler::mouseMoved): Call Chrome::setToolTip.
2521         * platform/graphics/svg/SVGImageEmptyClients.h:
2522
2523         Added stubs for Gdk:
2524
2525         * platform/gdk/ChromeClientGdk.h:
2526         * platform/gdk/TemporaryLinkStubs.cpp:
2527         (ChromeClientGdk::setToolTip):
2528
2529 2007-07-04  Adam Roben  <aroben@apple.com>
2530
2531         Add Settings::showsURLsInToolTips
2532
2533         Reviewed by Sam.
2534
2535         * WebCore.exp:
2536         * page/Settings.cpp:
2537         (WebCore::Settings::Settings):
2538         * page/Settings.h:
2539
2540 2007-07-04  Adam Roben  <aroben@apple.com>
2541
2542         Move logic for calling mouseDidMoveOverElement into WebCore
2543
2544         Reviewed by Sam.
2545
2546         * page/EventHandler.cpp:
2547         (WebCore::EventHandler::mouseMoved): Added. Calls Chrome::mouseDidMoveOverElement.
2548         (WebCore::EventHandler::handleMouseMoveEvent): Now takes an optional
2549         HitTestResult* parameter which is used to communicate to the caller the
2550         node the mouse is over.
2551         * page/EventHandler.h:
2552         * page/mac/EventHandlerMac.mm:
2553         (WebCore::EventHandler::mouseMoved): Changed to call the overloaded
2554         mouseMoved().
2555         (WebCore::EventHandler::passMouseMoveEventToSubframe): Pass hoveredNode
2556         through to the subframe so we can get the deepest node hovered, not
2557         just the node's parent frame.
2558         * page/win/EventHandlerWin.cpp:
2559         (WebCore::EventHandler::passMouseMoveEventToSubframe): Ditto.
2560
2561 2007-07-04  Adam Roben  <aroben@apple.com>
2562
2563         Add Chrome::mouseDidMoveOverElement
2564
2565         This does the work of calling up to the ChromeClient (which will call
2566         the UI delegate).
2567
2568         Reviewed by Sam.
2569
2570         * page/Chrome.cpp:
2571         (WebCore::Chrome::mouseDidMoveOverElement): Added.
2572         * page/Chrome.h:
2573         * page/ChromeClient.h:
2574         * platform/graphics/svg/SVGImageEmptyClients.h: Updated for change to
2575         ChromeClient.
2576         * platform/gdk/ChromeClientGdk.h:
2577         * platform/gdk/TemporaryLinkStubs.cpp:
2578         (ChromeClientGdk::mouseDidMoveOverElement):
2579
2580 2007-07-04  Adam Roben  <aroben@apple.com>
2581
2582         Changed PlatformMouseEvent to store the modifier flags of the event
2583
2584         Reviewed by Sam.
2585
2586         * platform/PlatformMouseEvent.h:
2587         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2588         * platform/mac/PlatformMouseEventMac.mm:
2589         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2590         * platform/win/PlatformMouseEventWin.cpp:
2591         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2592
2593 2007-07-04  Adam Roben  <aroben@apple.com>
2594
2595         Add HitTestResult::setToNonShadowAncestor
2596
2597         Reviewed by Sam.
2598
2599         * page/EventHandler.cpp:
2600         (WebCore::EventHandler::hitTestResultAtPoint): Moved logic into
2601         HitTestResult::setToNonShadowAncestor.
2602         * rendering/HitTestResult.cpp:
2603         (WebCore::HitTestResult::setToNonShadowAncestor):
2604         * rendering/HitTestResult.h:
2605
2606 2007-07-04  Adam Roben  <aroben@apple.com>
2607
2608         Change MouseEventWithHitTestResults to hold onto a HitTestResult
2609
2610         Reviewed by Sam.
2611
2612         * dom/Document.cpp:
2613         (WebCore::Document::prepareMouseEvent):
2614         * page/MouseEventWithHitTestResults.cpp:
2615         (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
2616         (WebCore::MouseEventWithHitTestResults::targetNode):
2617         (WebCore::MouseEventWithHitTestResults::localPoint):
2618         (WebCore::MouseEventWithHitTestResults::scrollbar):
2619         * page/MouseEventWithHitTestResults.h:
2620         (WebCore::MouseEventWithHitTestResults::event):
2621         (WebCore::MouseEventWithHitTestResults::hitTestResult):
2622
2623 2007-07-04  Matt Lilek  <pewtermoose@gmail.com>
2624
2625         Not reviewed, gdk build fix.
2626
2627         * platform/gdk/FrameGdk.cpp:
2628
2629 2007-07-05  Antti Koivisto  <antti@apple.com>
2630
2631         Reviewed by John.
2632         
2633         Fix Repro crash due to infinite recursion in HTMLParser::handleError @ youos.com
2634         <rdar://problem/5237811>
2635         
2636         It is possible to add table parts (thead etc) without table ancestor to a document fragment. If a new table element
2637         was added to such a part, as in
2638         
2639         div.innerHTML = '<tbody><table>';
2640         
2641         the parser error handling code would try to pop the previous table as normal. However since
2642         the table does not actually exist nothing would happen and parser would go to infinite recursion.
2643         
2644         Solution here is to pop table parts one by one when handling the error inside a fragment instead of trying to pop
2645         the table straight away (as it might not exist).
2646
2647         * html/HTMLParser.cpp:
2648         (WebCore::HTMLParser::handleError):
2649
2650 2007-07-04  Qing Zhao  <qing@staikos.net>
2651
2652         Reviewed by George Staikos.
2653
2654         Draw menulist (comboboxes) without text overlap on the button.
2655
2656         * platform/qt/RenderThemeQt.cpp:
2657         (WebCore::RenderThemeQt::setPopupPadding):
2658
2659 2007-07-04  George Staikos  <staikos@kde.org>
2660
2661         Compile
2662
2663         * page/qt/FrameQt.cpp:
2664         * WebCore.pro:
2665
2666 2007-07-04  Sam Weinig  <sam@webkit.org>
2667
2668         Reviewed by Mitz.
2669
2670         Patch for http://bugs.webkit.org/show_bug.cgi?id=14504
2671         REGRESSION (r23573): Amazon Book Excerpt can not be viewed in recent nightly
2672
2673         - Made it possible (again) to shadow window properties with local variable names.
2674
2675         Test: fast/dom/Window/window-property-shadowing.html
2676
2677         * bindings/js/JSDOMWindowCustom.cpp:
2678         (WebCore::JSDOMWindow::customPut):
2679         * bindings/js/kjs_window.cpp:
2680         (KJS::Window::put):
2681         * bindings/scripts/CodeGeneratorJS.pm:
2682         * page/DOMWindow.idl:
2683
2684 2007-07-03  Alice Liu  <alice.liu@apple.com>
2685
2686         Reviewed by Adam.
2687
2688         Fixed <rdar://problem/5225119> support smart pasting on Windows
2689
2690         * WebCore.vcproj/WebCore.vcproj:
2691         * WebCore.xcodeproj/project.pbxproj:
2692             Added new files
2693         * editing/SmartReplace.cpp: Added.
2694         (WebCore::isCharacterSmartReplaceExempt):
2695             Added non-CF implementation placeholder
2696         * editing/SmartReplace.h: Added.
2697         * editing/SmartReplaceCF.cpp: Added.
2698         (WebCore::getSmartSet):
2699         (WebCore::isCharacterSmartReplaceExempt):
2700             Added new implementation
2701
2702         * bridge/win/FrameWin.cpp:
2703         * page/Frame.h:
2704         * page/mac/FrameMac.mm:
2705             Removed old declaration and implementation
2706
2707         * editing/ReplaceSelectionCommand.cpp:
2708         (WebCore::ReplaceSelectionCommand::doApply):
2709             Changed to call the new function instead of old
2710
2711         * page/mac/WebCoreFrameBridge.h:
2712         * page/mac/WebCoreFrameBridge.mm:
2713             Removed old declaration and implementation
2714         (-[WebCoreFrameBridge smartInsertForString:replacingRange:beforeString:afterString:]):
2715             Changed to call the new function instead of old
2716
2717         * platform/win/PasteboardWin.cpp:
2718         (WebCore::Pasteboard::Pasteboard):
2719             Register new clipboard format
2720         (WebCore::Pasteboard::writeSelection):
2721             Set data for smartpaste format on clipboard
2722         (WebCore::Pasteboard::canSmartReplace):
2723             Added non-stub implementation
2724
2725 2007-07-04  Qing Zhao  <qing@staikos.net>
2726
2727         Reviewed by George Staikos.
2728
2729         Similar to the PlatformScrollbar fixes, adjust the painter to make the
2730         styler draw all subcontrols, and in this case the focus rect, in the
2731         proper location
2732
2733         * platform/qt/RenderThemeQt.cpp:
2734         (WebCore::RenderThemeQt::paintMenuList):
2735
2736 2007-07-04  Mitz Pettel  <mitz@webkit.org>
2737
2738         Reviewed by Maciej.
2739
2740         - fix http://bugs.webkit.org/show_bug.cgi?id=14495
2741           REGRESSION: Wrong cursor is displayed during drag and drop when text is selected
2742           <rdar://problem/5312384>
2743
2744         No test possible because DumpRenderTree cannot query the current cursor.
2745
2746         * page/EventHandler.cpp:
2747         (WebCore::EventHandler::selectCursor): Changed into a member function and
2748         added that if the last mouse down event could not have started a
2749         selection, then the cursor should not change to an I-beam unconditionally.
2750         (WebCore::EventHandler::handleMouseMoveEvent):
2751         * page/EventHandler.h:
2752
2753 2007-07-04  Holger Hans Peter Freyther  <zecke@selfish.org>
2754
2755         Reviewed by Rob Buis.
2756
2757         A little progress in tracking dependencies.
2758
2759         * WebCore.pro: Add DEPENDPATH for the Gdk port.
2760
2761 2007-07-03  Darin Adler  <darin@apple.com>
2762
2763         Reviewed by Tim Hatcher.
2764
2765         - fix <rdar://problem/5221297> Font family name in the cssText for a DOMCSSStyleDeclaration needs quotes
2766
2767         Test: editing/style/font-family-with-space.html
2768
2769         * css/FontFamilyValue.cpp:
2770         (WebCore::isValidCSSIdentifier): Added. Implements the same rule that the CSS lexer does.
2771         (WebCore::quoteStringIfNeeded): Changed to call isValidCSSIdentifier instead of just
2772         checking for a leading "#" character.
2773         * editing/markup.cpp:
2774         (WebCore::escapeTextForMarkup): Changed to take a String parameter for better efficiency.
2775         (WebCore::renderedText): Changed to return a String for better efficiency.
2776         (WebCore::addNamespace): Updated to pass String to escapeTextForMarkup.
2777         (WebCore::startMarkup): Updated to pass String to escapeTextForMarkup. Added missing call
2778         to escapeTextForMarkup in the special case for the style property.
2779         (WebCore::createMarkup): Changed from single quotes to double quotes and also added missing
2780         call to escapeTextForMarkup in two special cases for the style property.
2781
2782 2007-07-03  Sam Weinig  <sam@webkit.org>
2783
2784         Reviewed by Darin.
2785
2786         Twelfth round of fixes for implicit 64-32 bit conversion errors.
2787         <rdar://problem/5292262>
2788
2789         - Add casts and accompanying FIXMEs to avoid remaining compiler errors.
2790
2791         * WebCore.xcodeproj/project.pbxproj:
2792         * loader/FrameLoader.cpp:
2793         (WebCore::FrameLoader::opened):
2794         (WebCore::FrameLoader::sendRemainingDelegateMessages):
2795         * loader/FrameLoader.h:
2796         * loader/ResourceLoader.cpp:
2797         (WebCore::ResourceLoader::didReceiveData):
2798         * platform/network/mac/ResourceHandleMac.mm:
2799         (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
2800         (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
2801         * platform/network/mac/ResourceResponseMac.mm:
2802         (WebCore::ResourceResponse::nsURLResponse):
2803
2804 2007-07-03  Anders Carlsson  <andersca@apple.com>
2805
2806         Reviewed by Adam.
2807
2808         <rdar://problem/5093862>
2809         Nothing shown in plugin area when trying to play content using the DivX plugin
2810         
2811         Defer calling SetWindow for the DivX plugin, just like we do with the WMP plugin.
2812                 
2813         * plugins/win/PluginViewWin.cpp:
2814         (WebCore::PluginViewWin::determineQuirks):
2815
2816 2007-07-03  Sam Weinig  <sam@webkit.org>
2817
2818         Reviewed by Brady Eidson.
2819
2820         Ninth round of fixes for implicit 64-32 bit conversion errors.
2821         <rdar://problem/5292262>
2822
2823         - Fix function signature to use unsigned long instead of unsigned long long.
2824
2825         * loader/ProgressTracker.cpp:
2826         (WebCore::ProgressTracker::completeProgress):
2827         * loader/ProgressTracker.h:
2828
2829 2007-07-03  Sam Weinig  <sam@webkit.org>
2830
2831         Reviewed by Oliver.
2832
2833         Eighth round of fixes for implicit 64-32 bit conversion errors.
2834         <rdar://problem/5292262>
2835
2836         - Convert SVG implementation files to use floats instead of doubles
2837           to match the spec/IDLs.
2838
2839         * bindings/scripts/CodeGeneratorJS.pm:
2840         * ksvg2/svg/SVGAngle.cpp:
2841         * ksvg2/svg/SVGAnimatedTemplate.h:
2842         * ksvg2/svg/SVGAnimationElement.cpp:
2843         (WebCore::SVGAnimationElement::getEndTime):
2844         (WebCore::SVGAnimationElement::getStartTime):
2845         (WebCore::SVGAnimationElement::getCurrentTime):
2846         (WebCore::SVGAnimationElement::getSimpleDuration):
2847         * ksvg2/svg/SVGAnimationElement.h:
2848         * ksvg2/svg/SVGFitToViewBox.cpp:
2849         (WebCore::SVGFitToViewBox::parseViewBox):
2850         * ksvg2/svg/SVGLength.cpp:
2851         (WebCore::SVGLength::setValueAsString):
2852         * ksvg2/svg/SVGLinearGradientElement.cpp:
2853         (WebCore::SVGLinearGradientElement::buildGradient):
2854         * ksvg2/svg/SVGMatrix.idl:
2855         * ksvg2/svg/SVGNumber.idl:
2856         * ksvg2/svg/SVGParserUtilities.cpp:
2857         (WebCore::SVGPathParser::parseSVG):
2858         (WebCore::SVGPathParser::calculateArc):
2859         (WebCore::SVGPathParser::svgLineToHorizontal):
2860         (WebCore::SVGPathParser::svgLineToVertical):
2861         (WebCore::SVGPathParser::svgCurveToCubicSmooth):
2862         (WebCore::SVGPathParser::svgCurveToQuadratic):
2863         (WebCore::SVGPathParser::svgCurveToQuadraticSmooth):
2864         (WebCore::SVGPathParser::svgArcTo):
2865         * ksvg2/svg/SVGParserUtilities.h:
2866         * ksvg2/svg/SVGPathElement.cpp:
2867         (WebCore::SVGPathElement::SVGPathElement):
2868         (WebCore::SVGPathElement::getTotalLength):
2869         (WebCore::SVGPathElement::getPointAtLength):
2870         (WebCore::SVGPathElement::getPathSegAtLength):
2871         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
2872         (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
2873         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
2874         (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
2875         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
2876         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
2877         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
2878         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
2879         (WebCore::SVGPathElement::createSVGPathSegArcAbs):
2880         (WebCore::SVGPathElement::createSVGPathSegArcRel):
2881         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
2882         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
2883         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
2884         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
2885         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
2886         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
2887         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
2888         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
2889         (WebCore::SVGPathElement::svgMoveTo):
2890         (WebCore::SVGPathElement::svgLineTo):
2891         (WebCore::SVGPathElement::svgLineToHorizontal):
2892         (WebCore::SVGPathElement::svgLineToVertical):
2893         (WebCore::SVGPathElement::svgCurveToCubic):
2894         (WebCore::SVGPathElement::svgCurveToCubicSmooth):
2895         (WebCore::SVGPathElement::svgCurveToQuadratic):
2896         (WebCore::SVGPathElement::svgCurveToQuadraticSmooth):
2897         (WebCore::SVGPathElement::svgArcTo):
2898         (WebCore::SVGPathElement::parseMappedAttribute):
2899         * ksvg2/svg/SVGPathElement.h:
2900         * ksvg2/svg/SVGPathSegArc.cpp:
2901         (WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
2902         (WebCore::SVGPathSegArcAbs::setX):
2903         (WebCore::SVGPathSegArcAbs::x):
2904         (WebCore::SVGPathSegArcAbs::setY):
2905         (WebCore::SVGPathSegArcAbs::y):
2906         (WebCore::SVGPathSegArcAbs::setR1):
2907         (WebCore::SVGPathSegArcAbs::r1):
2908         (WebCore::SVGPathSegArcAbs::setR2):
2909         (WebCore::SVGPathSegArcAbs::r2):
2910         (WebCore::SVGPathSegArcAbs::setAngle):
2911         (WebCore::SVGPathSegArcAbs::angle):
2912         (WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
2913         (WebCore::SVGPathSegArcRel::setX):
2914         (WebCore::SVGPathSegArcRel::x):
2915         (WebCore::SVGPathSegArcRel::setY):
2916         (WebCore::SVGPathSegArcRel::y):
2917         (WebCore::SVGPathSegArcRel::setR1):
2918         (WebCore::SVGPathSegArcRel::r1):
2919         (WebCore::SVGPathSegArcRel::setR2):
2920         (WebCore::SVGPathSegArcRel::r2):
2921         (WebCore::SVGPathSegArcRel::setAngle):
2922         (WebCore::SVGPathSegArcRel::angle):
2923         * ksvg2/svg/SVGPathSegArc.h:
2924         * ksvg2/svg/SVGPathSegCurvetoCubic.cpp:
2925         (WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
2926         (WebCore::SVGPathSegCurvetoCubicAbs::setX):
2927         (WebCore::SVGPathSegCurvetoCubicAbs::x):
2928         (WebCore::SVGPathSegCurvetoCubicAbs::setY):
2929         (WebCore::SVGPathSegCurvetoCubicAbs::y):
2930         (WebCore::SVGPathSegCurvetoCubicAbs::setX1):
2931         (WebCore::SVGPathSegCurvetoCubicAbs::x1):
2932         (WebCore::SVGPathSegCurvetoCubicAbs::setY1):
2933         (WebCore::SVGPathSegCurvetoCubicAbs::y1):
2934         (WebCore::SVGPathSegCurvetoCubicAbs::setX2):
2935         (WebCore::SVGPathSegCurvetoCubicAbs::x2):
2936         (WebCore::SVGPathSegCurvetoCubicAbs::setY2):
2937         (WebCore::SVGPathSegCurvetoCubicAbs::y2):
2938         (WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
2939         (WebCore::SVGPathSegCurvetoCubicRel::setX):
2940         (WebCore::SVGPathSegCurvetoCubicRel::x):
2941         (WebCore::SVGPathSegCurvetoCubicRel::setY):
2942         (WebCore::SVGPathSegCurvetoCubicRel::y):
2943         (WebCore::SVGPathSegCurvetoCubicRel::setX1):
2944         (WebCore::SVGPathSegCurvetoCubicRel::x1):
2945         (WebCore::SVGPathSegCurvetoCubicRel::setY1):
2946         (WebCore::SVGPathSegCurvetoCubicRel::y1):
2947         (WebCore::SVGPathSegCurvetoCubicRel::setX2):
2948         (WebCore::SVGPathSegCurvetoCubicRel::x2):
2949         (WebCore::SVGPathSegCurvetoCubicRel::setY2):
2950         (WebCore::SVGPathSegCurvetoCubicRel::y2):
2951         * ksvg2/svg/SVGPathSegCurvetoCubic.h:
2952         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.cpp:
2953         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
2954         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setX):
2955         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::x):
2956         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setY):
2957         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::y):
2958         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setX2):
2959         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::x2):
2960         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setY2):
2961         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::y2):
2962         (WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
2963         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setX):
2964         (WebCore::SVGPathSegCurvetoCubicSmoothRel::x):
2965         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setY):
2966         (WebCore::SVGPathSegCurvetoCubicSmoothRel::y):
2967         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setX2):
2968         (WebCore::SVGPathSegCurvetoCubicSmoothRel::x2):
2969         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setY2):
2970         (WebCore::SVGPathSegCurvetoCubicSmoothRel::y2):
2971         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
2972         * ksvg2/svg/SVGPathSegCurvetoQuadratic.cpp:
2973         (WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
2974         (WebCore::SVGPathSegCurvetoQuadraticAbs::setX):
2975         (WebCore::SVGPathSegCurvetoQuadraticAbs::x):
2976         (WebCore::SVGPathSegCurvetoQuadraticAbs::setY):
2977         (WebCore::SVGPathSegCurvetoQuadraticAbs::y):
2978         (WebCore::SVGPathSegCurvetoQuadraticAbs::setX1):
2979         (WebCore::SVGPathSegCurvetoQuadraticAbs::x1):
2980         (WebCore::SVGPathSegCurvetoQuadraticAbs::setY1):
2981         (WebCore::SVGPathSegCurvetoQuadraticAbs::y1):
2982         (WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
2983         (WebCore::SVGPathSegCurvetoQuadraticRel::setX):
2984         (WebCore::SVGPathSegCurvetoQuadraticRel::x):
2985         (WebCore::SVGPathSegCurvetoQuadraticRel::setY):
2986         (WebCore::SVGPathSegCurvetoQuadraticRel::y):
2987         (WebCore::SVGPathSegCurvetoQuadraticRel::setX1):
2988         (WebCore::SVGPathSegCurvetoQuadraticRel::x1):
2989         (WebCore::SVGPathSegCurvetoQuadraticRel::setY1):
2990         (WebCore::SVGPathSegCurvetoQuadraticRel::y1):
2991         * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
2992         (WebCore::SVGPathSegCurvetoQuadraticRel::toString):
2993         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
2994         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
2995         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::setX):
2996         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::x):
2997         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::setY):
2998         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::y):
2999         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
3000         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::setX):
3001         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::x):
3002         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::setY):
3003         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::y):
3004         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
3005         * ksvg2/svg/SVGPathSegLineto.cpp:
3006         (WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
3007         (WebCore::SVGPathSegLinetoAbs::setX):
3008         (WebCore::SVGPathSegLinetoAbs::x):
3009         (WebCore::SVGPathSegLinetoAbs::setY):
3010         (WebCore::SVGPathSegLinetoAbs::y):
3011         (WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
3012         (WebCore::SVGPathSegLinetoRel::setX):
3013         (WebCore::SVGPathSegLinetoRel::x):
3014         (WebCore::SVGPathSegLinetoRel::setY):
3015         (WebCore::SVGPathSegLinetoRel::y):
3016         * ksvg2/svg/SVGPathSegLineto.h:
3017         * ksvg2/svg/SVGPathSegLinetoHorizontal.cpp:
3018         (WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
3019         (WebCore::SVGPathSegLinetoHorizontalAbs::setX):
3020         (WebCore::SVGPathSegLinetoHorizontalAbs::x):
3021         (WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
3022         (WebCore::SVGPathSegLinetoHorizontalRel::setX):
3023         (WebCore::SVGPathSegLinetoHorizontalRel::x):
3024         * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
3025         * ksvg2/svg/SVGPathSegLinetoVertical.cpp:
3026         (WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
3027         (WebCore::SVGPathSegLinetoVerticalAbs::setY):
3028         (WebCore::SVGPathSegLinetoVerticalAbs::y):
3029         (WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
3030         (WebCore::SVGPathSegLinetoVerticalRel::setY):
3031         (WebCore::SVGPathSegLinetoVerticalRel::y):
3032         * ksvg2/svg/SVGPathSegLinetoVertical.h:
3033         * ksvg2/svg/SVGPathSegList.cpp:
3034         (WebCore::SVGPathSegList::getPathSegAtLength):
3035         * ksvg2/svg/SVGPathSegList.h:
3036         * ksvg2/svg/SVGPathSegMoveto.cpp:
3037         (WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
3038         (WebCore::SVGPathSegMovetoAbs::setX):
3039         (WebCore::SVGPathSegMovetoAbs::x):
3040         (WebCore::SVGPathSegMovetoAbs::setY):
3041         (WebCore::SVGPathSegMovetoAbs::y):
3042         (WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
3043         (WebCore::SVGPathSegMovetoRel::setX):
3044         (WebCore::SVGPathSegMovetoRel::x):
3045         (WebCore::SVGPathSegMovetoRel::setY):
3046         (WebCore::SVGPathSegMovetoRel::y):
3047         * ksvg2/svg/SVGPathSegMoveto.h:
3048         * ksvg2/svg/SVGPolyElement.cpp:
3049         (WebCore::SVGPolyElement::svgPolyTo):
3050         * ksvg2/svg/SVGRadialGradientElement.cpp:
3051         (WebCore::SVGRadialGradientElement::buildGradient):
3052         * ksvg2/svg/SVGSVGElement.cpp:
3053         (WebCore::SVGSVGElement::viewport):
3054         (WebCore::SVGSVGElement::getCurrentTime):
3055         * ksvg2/svg/SVGStopElement.cpp:
3056         (WebCore::SVGStopElement::SVGStopElement):
3057         (WebCore::SVGStopElement::parseMappedAttribute):
3058         * ksvg2/svg/SVGStopElement.h:
3059         * ksvg2/svg/SVGTransform.cpp:
3060         (SVGTransform::translate):
3061         (SVGTransform::scale):
3062         * ksvg2/svg/SVGTransformDistance.cpp:
3063         (WebCore::SVGTransformDistance::addToSVGTransform):
3064         (WebCore::SVGTransformDistance::distance):
3065         * ksvg2/svg/SVGTransformable.cpp:
3066         (WebCore::SVGTransformable::parseTransformAttribute):
3067
3068 2007-07-03  Anders Carlsson  <andersca@apple.com>
3069
3070         Reviewed by Darin.
3071
3072         <rdar://problem/5289718>
3073         http://bugs.webkit.org/show_bug.cgi?id=14437
3074         CrashTracer: [REGRESSION] 76 crashes in Safari at com.apple.WebCore: WebCore::Frame::settings const + 6 (14437)
3075         
3076         Based on a patch from Maxime Britto.
3077         
3078         * page/mac/WebCoreFrameBridge.mm:
3079         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
3080         If the script caused the frame to go away, return nil. This can only happen if a plugin in a subframe destroys
3081         its frame.
3082
3083         (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]):
3084         ASSERT that this is only called on the main frame.
3085
3086 2007-07-03  John Sullivan  <sullivan@apple.com>
3087
3088         Written by Darin, reviewed by me
3089         
3090         - fixed <rdar://problem/5249730> REGRESSION (Leopard, around 9A464): Safari opens the same local 
3091           documents more than once due to canonicalization change
3092
3093         * loader/mac/LoaderNSURLExtras.m:
3094         (canonicalURL):
3095         pass URL through KURL so we get KURL's version of canonicalization as well as
3096         NSURLProtocol's version of canonicalization
3097
3098 2007-07-03  Sam Weinig  <sam@webkit.org>
3099
3100         Reviewed by Darin.
3101
3102         Seventh round of fixes for implicit 64-32 bit conversion errors.
3103         <rdar://problem/5292262>
3104
3105         - Adds more narrowPrecision functions to FloatPoint, FloatSize and FloatRect.
3106         - Changes over more implicit conversions to use new functions.
3107
3108         * bindings/js/kjs_window.cpp:
3109         (KJS::WindowFunc::callAsFunction):
3110         * platform/graphics/FloatPoint.cpp:
3111         (WebCore::FloatPoint::matrixTransform):
3112         (WebCore::FloatPoint::narrowPrecision):
3113         * platform/graphics/FloatPoint.h:
3114         * platform/graphics/FloatRect.cpp:
3115         (WebCore::FloatRect::narrowPrecision):
3116         * platform/graphics/FloatRect.h:
3117         * platform/graphics/FloatSize.cpp:
3118         (WebCore::FloatSize::narrowPrecision):
3119         * platform/graphics/FloatSize.h:
3120         * platform/graphics/Path.cpp:
3121         (WebCore::Path::createRoundedRectangle):
3122         (WebCore::Path::createRectangle):
3123         (WebCore::Path::createEllipse):
3124         * platform/graphics/mac/ColorMac.mm:
3125         (WebCore::nsColor):
3126         * platform/graphics/mac/IconMac.mm:
3127         (WebCore::Icon::paint):
3128         * platform/graphics/svg/cg/CgSupport.cpp:
3129         (WebCore::applyStrokeStyleToContext):
3130         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
3131         (WebCore::CGShadingRefForRadialGradient):
3132         (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
3133         (WebCore::SVGPaintServerGradient::handleBoundingBoxModeAndGradientTransformation):
3134         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
3135         (WebCore::applyLuminanceToAlphaFilter):
3136         (WebCore::applyExpandAlphatoGrayscaleFilter):
3137         (WebCore::transformImageIntoGrayscaleMask):
3138         * platform/mac/WebCoreTextRenderer.mm:
3139         (WebCoreDrawTextAtPoint):
3140         * rendering/RenderPath.cpp:
3141         (WebCore::RenderPath::mapAbsolutePointToLocal):
3142         * rendering/RenderSVGContainer.cpp:
3143         (WebCore::RenderSVGContainer::calcViewport):
3144         * rendering/RenderSVGImage.cpp:
3145         (WebCore::RenderSVGImage::nodeAtPoint):
3146         * rendering/RenderSVGText.cpp:
3147         (WebCore::RenderSVGText::relativeBBox):
3148
3149 2007-07-03  Anders Carlsson  <andersca@apple.com>
3150
3151         Reviewed by Adam.
3152
3153         <rdar://problem/5261523>
3154         Crash playing MP11 on cnbc.com
3155         
3156         The WMP Netscape plugin still creates a window even when windowless mode is turned on. Work around this by
3157         always removing the "windowlessvideo" parameter before passing it to the plugin.
3158         According to http://msdn2.microsoft.com/en-us/library/bb249373.aspx, "The windowlessVideo property is not 
3159         supported for Netscape Navigator. Setting a value for this property in Navigator may yield unexpected results."
3160         
3161         * plugins/win/PluginViewWin.cpp:
3162         (WebCore::PluginViewWndProc):
3163         (WebCore::PluginViewWin::paint):
3164         (WebCore::PluginViewWin::invalidateRect):
3165         (WebCore::PluginViewWin::determineQuirks):
3166         (WebCore::PluginViewWin::setParameters):
3167         (WebCore::PluginViewWin::PluginViewWin):
3168         (WebCore::PluginViewWin::init):
3169         * plugins/win/PluginViewWin.h:
3170         (WebCore::):
3171
3172 2007-07-03  Qing Zhao  <qing@staikos.net>
3173
3174         Reviewed by George Staikos.
3175
3176         Only draw sunken state for appropriate widgets. Not, for example, for
3177         lineedits.
3178
3179         * platform/qt/RenderThemeQt.cpp:
3180         (WebCore::RenderThemeQt::applyTheme):
3181
3182 2007-07-03  Antti Koivisto  <antti@apple.com>
3183
3184         Reviewed by Maciej.
3185         
3186         REGRESSION: misplaced selection ring remains after link is no longer focused.
3187         <rdar://problem/5205580>
3188         
3189         Fix placement of selection ring when part of the ring is in a different layer.
3190
3191         * rendering/RenderFlow.cpp:
3192         (WebCore::RenderFlow::addFocusRingRects): Get coordinates right when moving to a different layer.
3193         * rendering/RenderObject.cpp:
3194         (WebCore::RenderObject::setStyle): 
3195         Don't reset state variables when not necessary.  When repaint() was called at the end of setSyle() it would
3196         get repaint rects wrong in some cases.
3197
3198 2007-07-03  Antti Koivisto  <antti@apple.com>
3199
3200         Reviewed by Maciej.
3201
3202         Blind fix for CrashTracer: [USER] 25 crashes in Safari at com.apple.WebCore: WebCore::Frame::document const + 6
3203         <rdar://problem/5263939>
3204         
3205         No one has managed to reproduce this but it looks like null check is needed here. There are plausible ways
3206         m_frame could be null for a live FrameView object.
3207
3208         * page/FrameView.cpp:
3209         (WebCore::FrameView::needsLayout):
3210
3211 2007-07-02  Oliver Hunt  <oliver@apple.com>
3212
3213         Reviewed by Darin.
3214
3215         Fix for <rdar://problem/5098378> single-pixel image optimization needs to be rewritten to not depend on floating point bitmap
3216         Tested by fast/replaced/image-solid-color-with-alpha.html
3217
3218         Switch from float to byte based bitmap when pulling the color from 1x1 pixel images so
3219         that we can use the single pixel image optimisation in WebKit/win.
3220
3221         * platform/graphics/cg/ImageCG.cpp:
3222         (WebCore::BitmapImage::checkForSolidColor):
3223
3224 2007-07-02  Adam Roben  <aroben@apple.com>
3225
3226         Fix Bug 14498: RenderContainer::positionForCoordinates contains an order of operations error
3227         http://bugs.webkit.org/show_bug.cgi?id=14498
3228
3229         There were two bugs:
3230         1) xPos/yPos were flipped
3231         2) + binds tighter than ?:, so the order of operations was incorrect
3232
3233         Reviewed by Darin.
3234
3235         Test: fast/inline-block/14498-positionForCoordinates.html
3236
3237         * rendering/RenderContainer.cpp:
3238         (WebCore::RenderContainer::positionForCoordinates):
3239
3240 2007-07-02  Darin Adler  <darin@apple.com>
3241
3242         Reviewed by Kevin Decker and Tim Hatcher.
3243
3244         - fix <rdar://problem/5307906> some classes need finalize methods because
3245           of non-trivial work done in dealloc methods
3246
3247         * bindings/objc/DOMRGBColor.mm:
3248         (+[DOMRGBColor initialize]): Added. Tells finalizer to run on main thread,
3249         which is needed because we are sharing a CFDictionary here with no locking.
3250
3251         * bridge/mac/WebCoreAXObject.mm:
3252         (+[WebCoreAXObject initialize]): Added. Tells finalizer to run on main thread.
3253         (-[WebCoreAXObject finalize]): Added. Calls detach.
3254
3255         * WebCore.xcodeproj/project.pbxproj: Let Xcode do what it wants to do.
3256
3257 2007-07-02  Sam Weinig  <sam@webkit.org>
3258
3259         Reviewed by Darin.
3260
3261         Sixth round of fixes for implicit 64-32 bit conversion errors.
3262         <rdar://problem/5292262>
3263
3264         Use new narrowPrecisionToFloat() and narrowPrecisionToCGFloat() where
3265         appropriate.
3266
3267         * html/CanvasRenderingContext2D.cpp:
3268         (WebCore::CanvasRenderingContext2D::setShadow):
3269         (WebCore::CanvasRenderingContext2D::applyShadow):
3270         * html/CanvasStyle.cpp:
3271         (WebCore::CanvasStyle::applyStrokeColor):
3272         (WebCore::CanvasStyle::applyFillColor):
3273         * ksvg2/svg/SVGAngle.cpp:
3274         * ksvg2/svg/SVGAnimationElement.cpp:
3275         (WebCore::SVGAnimationElement::parseKeyNumbers):
3276         (WebCore::parseKeySplines):
3277         (WebCore::SVGAnimationElement::handleTimerEvent):
3278         (WebCore::SVGAnimationElement::updateAnimatedValueForElapsedSeconds):
3279         * ksvg2/svg/SVGPatternElement.cpp:
3280         (WebCore::SVGPatternElement::buildPattern):
3281         * ksvg2/svg/SVGRadialGradientElement.cpp:
3282         (WebCore::SVGRadialGradientElement::buildGradient):
3283         * platform/graphics/cg/AffineTransformCG.cpp:
3284         (WebCore::AffineTransform::AffineTransform):
3285         (WebCore::AffineTransform::setMatrix):
3286         (WebCore::AffineTransform::map):
3287         (WebCore::AffineTransform::setA):
3288         (WebCore::AffineTransform::setB):
3289         (WebCore::AffineTransform::setC):
3290         (WebCore::AffineTransform::setD):
3291         (WebCore::AffineTransform::setE):
3292         (WebCore::AffineTransform::setF):
3293         (WebCore::AffineTransform::scale):
3294         (WebCore::AffineTransform::rotate):
3295         (WebCore::AffineTransform::translate):
3296         (WebCore::AffineTransform::shear):
3297
3298 2007-07-02  John Sullivan  <sullivan@apple.com>
3299
3300         * page/mac/WebCoreFrameBridge.mm:
3301         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
3302         added a comment
3303
3304 2007-07-02  Sam Weinig  <sam@webkit.org>
3305
3306         Rubberstamped by Darin.
3307
3308         Rename FloatConversionUtilities.h to FloatConversion.h.
3309         Fix Win32 build.
3310
3311         * WebCore.vcproj/WebCore.vcproj:
3312         * WebCore.xcodeproj/project.pbxproj:
3313         * platform/DeprecatedString.cpp:
3314         * platform/FloatConversion.h: Copied from platform/FloatConversionUtilities.h.
3315         * platform/FloatConversionUtilities.h: Removed.
3316         * platform/StringImpl.cpp:
3317
3318 2007-07-02  Sam Weinig  <sam@webkit.org>
3319
3320         Reviewed by Darin.
3321
3322         Fifth round of fixes for implicit 64-32 bit conversion errors.
3323         <rdar://problem/5292262>
3324
3325         Add toFloat() method to string classes and use it where appropriate.
3326
3327         * WebCore.xcodeproj/project.pbxproj:
3328         * css/cssparser.cpp:
3329         (WebCore::CSSParser::lex):
3330         * ksvg2/svg/SVGAngle.cpp:
3331         (WebCore::SVGAngle::setValueAsString):
3332         * platform/AtomicString.h:
3333         (WebCore::AtomicString::toFloat):
3334         * platform/DeprecatedString.cpp:
3335         (WebCore::DeprecatedString::toFloat):
3336         * platform/DeprecatedString.h:
3337         * platform/FloatConversionUtilities.h: Added.
3338         (WebCore::narrowPrecisionToFloat):
3339         (WebCore::narrowPrecisionToCGFloat):
3340         * platform/PlatformString.h:
3341         * platform/String.cpp:
3342         (WebCore::String::toFloat):
3343         * platform/StringImpl.cpp:
3344         (WebCore::StringImpl::toFloat):
3345         * platform/StringImpl.h:
3346
3347 2007-07-02  Sam Weinig  <sam@webkit.org>
3348
3349         Reviewed by Kevin McCullough.
3350
3351         Fourth round of fixes for implicit 64-32 bit conversion errors.
3352         <rdar://problem/5292262>
3353
3354         Use new piDouble and piFloat constants instead of M_PI.
3355
3356         * html/CanvasRenderingContext2D.cpp:
3357         (WebCore::CanvasRenderingContext2D::rotate):
3358         * ksvg2/svg/SVGParserUtilities.cpp:
3359         (WebCore::SVGPathParser::calculateArc):
3360         * platform/graphics/Path.cpp:
3361         (WebCore::pathLengthApplierFunction):
3362         (WebCore::Path::createEllipse):
3363         * platform/graphics/cg/GraphicsContextCG.cpp:
3364         (WebCore::GraphicsContext::drawEllipse):
3365         (WebCore::GraphicsContext::strokeArc):
3366         * platform/graphics/cg/PDFDocumentImage.cpp:
3367         (WebCore::PDFDocumentImage::setCurrentPage):
3368         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
3369         * rendering/RenderPath.cpp:
3370         (WebCore::drawMarkerWithData):
3371
3372 2007-07-01  Adam Roben  <aroben@apple.com>
3373
3374         Clarify/fix {Shadow,BorderImage}ParseContext's memory management
3375
3376         Prefast emitted warnings that drew my attention to
3377         {Shadow,BorderImage}ParseContext::failed().  It turned out that these
3378         methods were actually correct, but rather confusing. "failed" really
3379         meant "abort and clean up" rather than "did you fail?", which was
3380         unclear. However, once I figured that out, the "and clean up" part was
3381         still a bit confusing, because all failed() did was to set a flag that
3382         would later cause the ParseContext's members to be deleted in the
3383         destructor. To clear this up, I've gotten rid of the failed() method
3384         altogether. It always returned false, so I've replaced all calls to
3385         it with the value false.
3386
3387         I also noticed that the lifetime management of the ParseContexts'
3388         members was in all cases confusing, and in some cases wrong. The
3389         m_border{Top,Right,Bottom,Left} members of BorderImageParseContext
3390         were leaked whenever a border-image property was successfully parsed.
3391         I fixed that by holding these members in OwnPtrs. The
3392         CSSPrimitiveValue members of {Shadow,BorderImage}ParseContext, which
3393         inherit from Shared, were being explicitly deleted, which is not a
3394         safe way to manage the lifetime of objects that inherit from Shared.
3395         To fix this, I put those members inside RefPtrs. These two changes
3396         allowed me to remove the destructors entirely.
3397
3398         Reviewed by Darin.
3399
3400         All regression tests pass.
3401
3402         * css/cssparser.cpp:
3403         (WebCore::ShadowParseContext::commitValue): Use .release() to avoid
3404         ref-count churn.
3405         (WebCore::ShadowParseContext::commitLength): Use a RefPtr for the new
3406         value to avoid a leak.
3407         (WebCore::CSSParser::parseShadow): Use 'false' instead of
3408         'context.failed()', and use .release() to avoid ref-count churn.
3409         (WebCore::BorderImageParseContext::commitWidth): Updated to use
3410         OwnPtr.
3411         (WebCore::CSSParser::parseBorderImage): Use 'false' instead of
3412         'context.failed'.
3413
3414 2007-07-01  Anders Carlsson  <andersca@apple.com>
3415
3416         Reviewed by John Sullivan.
3417
3418         <rdar://problem/5297146>
3419         Crash in Mail at WebCore::Frame::setUserStyleSheetLocation (reproducible w/ particular message)
3420         
3421         * loader/Cache.cpp:
3422         (WebCore::Cache::requestResource):
3423         Only insert the resource in the LRU list if the cache is enabled.
3424         
3425         (WebCore::Cache::insertInLRUList):
3426         (WebCore::Cache::resourceAccessed):
3427         Assert that the resource is in the cache.
3428
3429 2007-07-01  Darin Adler  <darin@apple.com>
3430
3431         * css/tokenizer.flex: Rolled out the fix for 14453.
3432         The layout test wasn't passing. We'll try again.
3433
3434 2007-07-01  Adam Roben  <aroben@apple.com>
3435
3436         Fix a crash in ~PluginViewWin()
3437
3438         This crash was introduced in r23827.
3439
3440         Reviewed by Anders.
3441
3442         Fixes dom/html/level2/html/HTMLAnchorElement01.html
3443
3444         * plugins/win/PluginViewWin.cpp:
3445         (WebCore::PluginViewWin::~PluginViewWin): Allow m_plugin to be null.
3446
3447 2007-07-01  Rob Buis  <buis@kde.org>
3448
3449         Reviewed by Darin.
3450
3451         http://bugs.webkit.org/show_bug.cgi?id=14453
3452         REGRESSION: www.nzherald.co.nz almost all the formating is gone
3453  
3454         * css/tokenizer.flex: Allow hex colors with 2, 4, or 5 hex digits.
3455
3456 2007-07-01  Sam Weinig  <sam@webkit.org>
3457
3458         Reviewed by Oliver.
3459
3460         Third round of implicit 64-32 bit conversion errors fixes.
3461         <rdar://problem/5292262>
3462
3463         - Use new CSSPrimitiveValue::getDoubleValue() and CSSPrimitiveValue::getIntValue()
3464           methods instead of CSSPrimitiveValue::getFloatValue() where appropriate.
3465
3466         * css/CSSPrimitiveValue.cpp:
3467         (WebCore::CSSPrimitiveValue::computeLengthInt):
3468         (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
3469         (WebCore::CSSPrimitiveValue::computeLengthShort):
3470         (WebCore::CSSPrimitiveValue::computeLengthFloat):
3471         (WebCore::CSSPrimitiveValue::computeLengthDouble):
3472         (WebCore::CSSPrimitiveValue::getDoubleValue):
3473         * css/CSSPrimitiveValue.h:
3474         (WebCore::CSSPrimitiveValue::getDoubleValue):
3475         (WebCore::CSSPrimitiveValue::getFloatValue):
3476         (WebCore::CSSPrimitiveValue::getIntValue):
3477         * css/Counter.h:
3478         (WebCore::Counter::listStyleNumber):
3479         * css/MediaQueryEvaluator.cpp:
3480         (WebCore::parseAspectRatio):
3481         * css/cssparser.cpp:
3482         (WebCore::BorderImageParseContext::commitBorderImage):
3483         * css/cssstyleselector.cpp:
3484         (WebCore::convertToLength):
3485         (WebCore::applyCounterList):
3486         (WebCore::CSSStyleSelector::applyProperty):
3487         (WebCore::CSSStyleSelector::mapBackgroundSize):
3488         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
3489         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
3490         * html/HTMLTableElement.cpp:
3491         (WebCore::HTMLTableElement::parseMappedAttribute):
3492         * ksvg2/css/SVGCSSStyleSelector.cpp:
3493         (WebCore::CSSStyleSelector::applySVGProperty):
3494         * ksvg2/misc/KCanvasRenderingStyle.cpp:
3495         (WebCore::KSVGPainterFactory::cssPrimitiveToLength):
3496         (WebCore::KSVGPainterFactory::dashArrayFromRenderingStyle):
3497
3498 2007-07-01  Pamela Greene  <pamg.bugs@gmail.com>
3499
3500         Reviewed by Darin.
3501
3502         Fix for <http://bugs.webkit.org/show_bug.cgi?id=14320>
3503         Bug 14320: <canvas> gradient stops at identical offsets are applied in the wrong order
3504         <rdar://problem/5290084>
3505
3506         Use std::stable_sort() instead of qsort() to sort gradient stops.
3507         Adjust the comparison function accordingly.
3508
3509         * html/CanvasGradient.cpp:
3510         (WebCore::compareStops):
3511         (WebCore::CanvasGradient::findStop):
3512
3513 2007-07-01  Holger Hans Peter Freyther  <zecke@selfish.org>
3514
3515         Reviewed by Darin.
3516
3517         m_usesPageCache was not initialized. As the b/f cache is only
3518         implemented in the Mac port and WebView.mm is taking care of calling
3519         Settings::setUsesPageCache I decided to make it false by default.
3520
3521         * page/Settings.cpp:
3522         (WebCore::Settings::Settings): m_usesPageCache was not initialized
3523
3524 2007-07-01  Holger Hans Peter Freyther  <zecke@selfish.org>
3525
3526         Reviewed by Darin.
3527
3528         Inherited- and NonInheritedFlags is a bit field. But for comparsion
3529         the other part of the union _iflags/_niflags is used for comparions.
3530         This will compare 5 uninitialized bits of _iflags and 22 of _niflags.
3531         Make sure the unused bits have a specified value.
3532
3533         * ksvg2/css/SVGRenderStyle.h:
3534         (WebCore::SVGRenderStyle::setBitDefaults): Make sure the unused bits
3535         have a value as well.
3536
3537 2007-06-30  Adam Roben  <aroben@apple.com>
3538
3539         Compile WebCore with /W4 on Windows
3540
3541         Some more warnings were disabled globally, including assignment within
3542         a conditional, unused variable, and various warnings related to
3543         inability to instantiate opaque structs.
3544
3545         In addition, the "unreachable code" warning was turned off for
3546         CSSGrammar.cpp and XPathGrammar.cpp.
3547
3548         Reviewed by Oliver.
3549
3550         * WebCore.vcproj/WebCore.vcproj:
3551
3552 2007-06-29  Adam Roben  <aroben@apple.com>
3553
3554         Give CString an equality operator to fix a bug in HTMLFormElement::formData
3555
3556         The bug was spotted by MSVC /W4. The problem was that we were comparing
3557         a CString to a char* using ==, but CString had no equality operator.
3558         The result was that the CString was being cast to a const char* and a
3559         pointer comparison was being done, which would (essentially) always
3560         return false.
3561
3562         There are two parts to the fix: get rid of CString's const char*
3563         casting operator, and add an equality operator. Previous uses of the
3564         casting operator have been changed to use CString::data().
3565
3566         Test: http/misc/isindex-formdata.html
3567
3568         Reviewed by Oliver.
3569
3570         * dom/XMLTokenizer.cpp:
3571         (WebCore::parseXMLDocumentFragment):
3572         * html/HTMLDocument.cpp:
3573         (WebCore::HTMLDocument::determineParseMode):
3574         * html/HTMLFormElement.cpp:
3575         (WebCore::HTMLFormElement::formData):
3576         * loader/TextResourceDecoder.cpp:
3577         (WebCore::TextResourceDecoder::checkForCSSCharset):
3578         * platform/CString.cpp:
3579         (WebCore::operator==):
3580         * platform/CString.h:
3581         * platform/KURL.cpp:
3582         (WebCore::encodeRelativeString):
3583         * platform/StringImpl.cpp:
3584         (WebCore::StringImpl::toDouble):
3585         * platform/network/cf/FormDataStreamCFNet.cpp:
3586         (WebCore::setHTTPBody):
3587         * platform/network/mac/FormDataStreamMac.mm:
3588         (WebCore::setHTTPBody):
3589         * platform/win/ClipboardUtilitiesWin.cpp:
3590         (WebCore::markupToCF_HTML):
3591         * plugins/win/PluginPackageWin.cpp:
3592         (WebCore::splitString):
3593         * plugins/win/PluginStreamWin.cpp:
3594         (WebCore::PluginStreamWin::startStream):
3595         (WebCore::PluginStreamWin::destroyStream):
3596         (WebCore::PluginStreamWin::sendJavaScriptStream):
3597         (WebCore::PluginStre