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