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