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