LayoutTests:
[WebKit-https.git] / WebCore / ChangeLog
1 2007-05-25  Mitz Pettel  <mitz@webkit.org>
2
3         Reviewed by Darin.
4
5         - fix http://bugs.webkit.org/show_bug.cgi?id=13767
6           REGRESSION: Multipart image documents are garbled
7
8         Test: http/tests/multipart/invalid-image-data-standalone.html
9
10         * loader/DocumentLoader.cpp:
11         (WebCore::DocumentLoader::isLoadingMultipartContent): Added.
12         * loader/DocumentLoader.h:
13         * loader/ImageDocument.cpp:
14         (WebCore::ImageTokenizer::finish): If the image is multipart, make a copy
15         of the current part instead of using the resource data, which is going to be
16         overwritten by the next part.
17         * loader/MainResourceLoader.h:
18         (WebCore::MainResourceLoader::isLoadingMultipartContent): Added.
19
20 2007-05-25  Anders Carlsson  <andersca@apple.com>
21
22         Fix no-svg build.
23         
24         * bindings/js/kjs_html.cpp:
25         (KJS::HTMLElementFunction::callAsFunction):
26
27 2007-05-25  Anders Carlsson  <andersca@apple.com>
28
29         Reviewed by Mitz.
30
31         <rdar://problem/5226788> After resizing the window larger than the image, hovering over the image still shows magnify glass
32         
33         One part of the bug was already fixed by my previous commit. This fixes the case where the window is sized so the image fit
34         after it has been zoomed in.
35         
36         * loader/ImageDocument.cpp:
37         (WebCore::ImageDocument::windowSizeChanged):
38
39 2007-05-25  John Sullivan  <sullivan@apple.com>
40
41         Reviewed by Anders and Tim
42
43         - WebCore change for: 
44           <rdar://problem/5226000> REGRESSION: In Gmail and Mail, a hang occurs when attempting to grammar/spellcheck a word in a reply 
45
46         * editing/Editor.cpp:
47         (WebCore::findFirstBadGrammarInRange):
48         Use the more obvious way to check whether a range is empty. In this case the more obvious way
49         would also have caused no problem to occur. Also added an assertion. Though this change is
50         enough to fix the symptom of the bug, the real fix is in WebKit.
51
52 2007-05-25  Anders Carlsson  <andersca@apple.com>
53
54         Reviewed by Darin (Sorta).
55
56         * loader/ImageDocument.cpp:
57         (WebCore::ImageDocument::restoreImageSize):
58         Use removeProperty here.
59
60 2007-05-25  Geoffrey Garen  <ggaren@apple.com>
61
62         Reviewed by Darin Adler.
63
64         Some cleanup to Cache while Fixing <rdar://problem/5055182> The page cache 
65         has no global cap.
66         
67         * loader/Cache.cpp: Removed destructor to help identify this class as a
68         singleton.
69
70         * loader/Cache.h: Made constructor and destructor private to match the
71         singleton model of PageCache.
72         
73         Put structs related to Cache inside its declaration to fix some namespace
74         conflicts I had while writing my patch. (They don't exist anymore, but
75         I figured this might help future development.)
76
77 2007-05-24  Geoffrey Garen  <ggaren@apple.com>
78
79         Reviewed by Darin Adler.
80
81         Fixed a bug with Settings where a number of different objects held bare 
82         Settings* data members, even though the Page owns the Settings object and 
83         deletes it upon destruction.
84
85         Added NULL checks since the Page can be deleted before the frame/document.
86
87         * page/Settings.cpp: Removed reliance on setNeedsReapplyStylesForSettingsChange.
88
89         * css/cssstyleselector.cpp: CSSStyleSelector was the worst offender. It 
90         held a number of back pointers that were not guaranteed. I removed the 
91         Settings*, Frame*, and FrameView* back pointers, but others could probably 
92         go, too. I replaced them with a single Document* pointer, which is guaranteed
93         because the Document owns the CSSStyleSelector.
94
95         * page/Page.cpp: Removed setNeedsReapplyStylesForSettingsChange -- the 
96         Settings object is now a proper subcontroller of Page, so it doesn't need
97         to use a global table to find its page anymore. Also, this function
98         confusingly implied that the Frames in a page can have heterogeneous settings,
99         which is not true.
100
101 2007-05-25  David Hyatt  <hyatt@apple.com>
102
103         Make sure -webkit-border-fit accounts for padding as well as border.
104
105         Reviewed by aroben
106
107         * rendering/RenderBlock.cpp:
108         (WebCore::RenderBlock::borderFitAdjust):
109
110 2007-05-25  David Hyatt  <hyatt@apple.com>
111
112         Rework line numbering (again).  This time I finally think I have
113         it right for all the document.write insanity that can occur.
114
115         Reviewed by aroben
116
117         * html/HTMLParser.cpp:
118         (WebCore::HTMLParser::reportErrorToConsole):
119         * html/HTMLParserErrorCodes.cpp:
120         (WebCore::htmlParserDocumentWriteMessage):
121         * html/HTMLParserErrorCodes.h:
122         * html/HTMLTokenizer.cpp:
123         (WebCore::HTMLTokenizer::write):
124         * html/HTMLTokenizer.h:
125         (WebCore::HTMLTokenizer::lineNumberPtr):
126         (WebCore::HTMLTokenizer::processingContentWrittenByScript):
127         * platform/SegementedSring.cpp
128         (WebCore::SegmentedString::setExcludeLineNumbers):
129         * platform/SegmentedString.h:
130         (WebCore::SegmentedSubstring::SegmentedSubstring):
131         (WebCore::SegmentedSubstring::clear):
132         (WebCore::SegmentedSubstring::excludeLineNumbers):
133         (WebCore::SegmentedSubstring::setExcludeLineNumbers):
134         (WebCore::SegmentedString::excludeLineNumbers):
135         (WebCore::SegmentedString::advance):
136
137 2007-05-24  Geoffrey Garen  <ggaren@apple.com>
138
139         Reviewed by Adam Roben.
140
141         Added a debug-only CachedPage counter. This helped me track down an SVG 
142         timer bug in my recent page cache work.
143                 
144         * history/CachedPage.cpp:
145
146 2007-05-24  David Hyatt  <hyatt@apple.com>
147
148         Improve <form> error reporting to catch <form>s inside table parts.
149         Tweak the wording of some of the error messages to be a bit better.
150
151         Reviewed by olliej
152
153         * html/HTMLParser.cpp:
154         (WebCore::HTMLParser::insertNode):
155         (WebCore::HTMLParser::processCloseTag):
156         (WebCore::HTMLParser::popBlock):
157         * html/HTMLParserErrorCodes.cpp:
158         (WebCore::htmlParserErrorMessageTemplate):
159         * html/HTMLParserErrorCodes.h:
160
161 2007-05-24  Rob Buis  <buis@kde.org>
162
163         Reviewed by Hyatt.
164
165         http://bugs.webkit.org/show_bug.cgi?id=4104
166         first-letter not updating style with hover
167         http://bugs.webkit.org/show_bug.cgi?id=13169
168         css-formatted first letter won't hide dynamically
169
170         Update first letter when RenderBlock::setStyle is called. 
171
172         * css/cssstyleselector.cpp:
173         (WebCore::CSSStyleSelector::checkOneSelector):
174         * dom/Document.cpp:
175         (WebCore::Document::Document):
176         (WebCore::Document::createElement):
177         * dom/Document.h:
178         (WebCore::Document::usesFirstLetterRules):
179         (WebCore::Document::setUsesFirstLetterRules):
180         * rendering/RenderBlock.cpp:
181         (WebCore::RenderBlock::setStyle):
182         (WebCore::RenderBlock::updateFirstLetter):
183
184 2007-05-24  Mitz Pettel  <mitz@webkit.org>
185
186         Reviewed by Darin.
187
188         - fix http://bugs.webkit.org/show_bug.cgi?id=13800
189           REGRESSION: Moving a slider moves another unrelated slider
190
191         Test: fast/forms/slider-thumb-shared-style.html
192
193         RenderSlider mutates the thumb's style, therefore it must not be shared
194         with another slider's thumb, a situation that could occur if the sliders
195         themselves shared style.
196
197         * rendering/RenderSlider.cpp:
198         (WebCore::RenderSlider::createThumbStyle): Always use a private copy for
199         the thumb style.
200
201 2007-05-24  Adele Peterson  <adele@apple.com>
202
203         Reviewed by Darin.
204
205         Fix for <rdar://problem/5211921> Form values sometimes get transposed (iGoogle)
206
207         Test: fast/history/redirect-load-no-form-restoration.html
208
209         * history/HistoryItem.cpp:
210         (WebCore::HistoryItem::setURL): Clear the document state when the url changes for a HistoryItem.
211         (WebCore::HistoryItem::isCurrentDocument): Added. Compares the HistoryItem url to the document's url.  This might not be the best way to do this, but it works for now.
212         * history/HistoryItem.h:
213         * loader/FrameLoader.cpp: (WebCore::FrameLoader::saveDocumentState): Only set the document (and form) state if the document is current for the history item.
214
215 2007-05-24  Mitz Pettel  <mitz@webkit.org>
216
217         Reviewed by Adele.
218
219         - fix http://bugs.webkit.org/show_bug.cgi?id=13857
220           REGRESSION: onChange function applied to select element executes twice when focus is set
221
222         Test: fast/forms/select-double-onchange.html
223
224         * html/HTMLSelectElement.cpp:
225         (WebCore::HTMLSelectElement::menuListOnChange): Changed to update m_lastOnChangeIndex
226         before dispatching the change event to avoid reentrancy.
227
228 2007-05-24  Darin Adler  <darin@apple.com>
229
230         Reviewed by Hyatt.
231
232         - fix <rdar://problem/5226451> REGRESSION (21618): Mail block quotes
233           are missing the lines on the side
234
235         This patch fixes three problems:
236
237         1) makes the "skip canLoad check" boolean also skip the check
238            that prevents any loads while the document is in provisional
239            state; this is the proximate cause of the bug
240
241         * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create):
242         Don't check the frame's state if skipCanLoadCheck is true.
243
244         2) moves the "skip canLoad check" boolean to the Request object;
245            the old implementation would cause that flag to affect the
246            new request we served, which might not be the resource with
247            that flag set
248
249         3) fixes error-handling code path that would leak requests
250
251         * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::updateFromElement):
252         Pass false to the CachedImage constructor to indicate we are not making
253         this object for the cache.
254
255         * loader/Cache.cpp:
256         (WebCore::createResource): Pass true to the CachedImage constructor to
257         indicate we are making this object for the cache.
258         (WebCore::Cache::requestResource): Add new code that assumes the object
259         will already have the inCache bit set, and that will delete the object
260         and return 0 if the cache is disabled and the load failed.
261
262         * loader/CachedImage.h:
263         * loader/CachedImage.cpp: (WebCore::CachedImage::CachedImage):
264         Added a forCache boolean parameter. Always false for the constructor
265         that's only used outside the cache code, and passed in as a boolean
266         for the constructor that's used both in cache and outside cache.
267
268         * loader/CachedResource.h:
269         * loader/CachedResource.cpp:
270         (WebCore::CachedResource::CachedResource): Added a forCache boolean
271         parameter that determines the initial state of the m_inCache flag.
272         This is needed to prevent a resource from being destroyed if an
273         error occurs during the initial load.
274
275         * loader/DocLoader.cpp:
276         (WebCore::DocLoader::requestCSSStyleSheet): Added FIXME.
277         (WebCore::DocLoader::setLoadInProgress): Added null check.
278
279         * loader/Request.h:
280         * loader/Request.cpp: (WebCore::Request::Request):
281         Added a shouldSkipCanLoadCheck boolean here, since we need to track
282         this for each request.
283
284         * loader/loader.h:
285         * loader/loader.cpp:
286         (WebCore::Loader::load): Pass the skipCanLoadCheck boolean to the
287         Request constructor rather than to the servePendingRequests function.
288         (WebCore::Loader::servePendingRequests): Add a loop so we can handle
289         cases where the request fails immediately without leaking the request
290         and thinking that we're loading forever.
291
292 2007-05-24  David Hyatt  <hyatt@apple.com>
293
294         Add error reporting for residual style.
295
296         Reviewed by aroben
297
298         * html/HTMLParser.cpp:
299         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
300         (WebCore::HTMLParser::reopenResidualStyleTags):
301         * html/HTMLParserErrorCodes.cpp:
302         (WebCore::htmlParserErrorMessageTemplate):
303         * html/HTMLParserErrorCodes.h:
304
305 2007-05-24  David Hyatt  <hyatt@apple.com>
306
307         Report <script/> as a warning instead of an error for now, since we
308         actually do close it.  (Sigh.)
309
310         Reviewed by beth
311
312         * html/HTMLParser.cpp:
313         (WebCore::HTMLParser::parseToken):
314         (WebCore::HTMLParser::reportErrorToConsole):
315         * html/HTMLParserErrorCodes.cpp:
316         (WebCore::htmlParserErrorMessageTemplate):
317         (WebCore::isWarning):
318         * html/HTMLParserErrorCodes.h:
319
320 2007-05-24  David Hyatt  <hyatt@apple.com>
321
322         Add error reporting for the </p> -> <p></p> quirk.
323
324         Add error reporting when a stray close tag is encountered with no
325         corresponding open tag.
326
327         Reviewed by adele
328
329         * html/HTMLParser.cpp:
330         (WebCore::HTMLParser::HTMLParser):
331         (WebCore::HTMLParser::processCloseTag):
332         (WebCore::HTMLParser::popBlock):
333         * html/HTMLParser.h:
334         (WebCore::HTMLParser::popBlock):
335         * html/HTMLParserErrorCodes.cpp:
336         (WebCore::htmlParserErrorMessageTemplate):
337         * html/HTMLParserErrorCodes.h:
338
339 2007-05-24  Kevin McCullough  <kmccullough@apple.com>
340
341         Reviewed by.
342
343         - Rolling back change to fix the build until I have a good fix for data: urls.
344
345         * ChangeLog:
346         * loader/FrameLoader.cpp:
347         (WebCore::FrameLoader::load):
348         (WebCore::FrameLoader::open):
349         * platform/String.cpp:
350
351 2007-05-24  David Hyatt  <hyatt@apple.com>
352
353         Add two more error messages to the HTMLParser.
354
355         Report when the </br> -> <br> quirk is triggered.
356
357         Also report whenever the broken XML self-closing tag syntax is used on
358         tags that can actually have an end tag (either optional or required).
359
360         Reviewed by aroben
361
362         * html/HTMLParser.cpp:
363         (WebCore::HTMLParser::parseToken):
364         * html/HTMLParserErrorCodes.cpp:
365         (WebCore::htmlParserErrorMessageTemplate):
366         * html/HTMLParserErrorCodes.h:
367         (WebCore::):
368         * html/HTMLTokenizer.cpp:
369         (WebCore::HTMLTokenizer::parseTag):
370         * html/HTMLTokenizer.h:
371         (WebCore::Token::reset):
372
373 2007-05-24  Sam Weinig  <sam@webkit.org>
374
375         Reviewed by Anders.
376
377         Rename JSHTMLFrameSetCustom.cpp to JSHTMLFrameSetElementCustom.cpp
378         for consistency.
379
380         * WebCore.xcodeproj/project.pbxproj:
381         * bindings/js/JSHTMLFrameSetCustom.cpp: Removed.
382         * bindings/js/JSHTMLFrameSetElementCustom.cpp: Added.
383
384 2007-05-24  David Hyatt  <hyatt@apple.com>
385
386         Fix for <rdar://problem/5208440> (13753)
387
388         REGRESSION: Raw text needs to be pulled outside of tables
389
390         Reviewed by aroben
391
392         * html/HTMLParser.cpp:
393         (WebCore::HTMLParser::handleError):
394         * html/HTMLTableColElement.cpp:
395         (WebCore::HTMLTableColElement::checkDTD):
396         * html/HTMLTableElement.cpp:
397         (WebCore::HTMLTableElement::checkDTD):
398         * html/HTMLTableRowElement.cpp:
399         (WebCore::HTMLTableRowElement::checkDTD):
400         * html/HTMLTableSectionElement.cpp:
401         (WebCore::HTMLTableSectionElement::checkDTD):
402
403 2007-05-24  Mitz Pettel  <mitz@webkit.org>
404
405         Reviewed by Darin.
406
407         - fix http://bugs.webkit.org/show_bug.cgi?id=13837
408           Separator in new <select> widget disappears when block element with border is in document.
409
410         Test: fast/forms/menulist-separator-painting.html
411
412         * platform/graphics/cg/GraphicsContextCG.cpp:
413         (WebCore::GraphicsContext::drawConvexPolygon): Changed this function to
414         actually do both filling and stroking when needed, even though all existing
415         callers set the stroke to none.
416         * rendering/RenderThemeMac.mm:
417         (WebCore::RenderThemeMac::paintMenuListButton): Added calls to set the stroke
418         style and thickness when painting the arrows and the separator.
419
420 2007-05-24  Timothy Hatcher  <timothy@apple.com>
421
422         Reviewed by Sam Weinig.
423
424         Remove the OBJC_NEW_PROPERTIES #ifdef and only export the new @property syntax.
425
426         * bindings/objc/DOMObject.h:
427         * bindings/scripts/CodeGeneratorObjC.pm:
428
429 2007-05-24  Sam Weinig  <sam@webkit.org>
430
431         Reviewed by Anders.
432
433         Uncomment HTMLFramesSetElement constructor now that it exists.
434
435         * page/DOMWindow.idl:
436
437 2007-05-24  Anders Carlsson  <andersca@apple.com>
438
439         Try fixing the buildbot build.
440         
441         * loader/ImageDocument.cpp:
442         (WebCore::ImageDocument::resizeImageToFit):
443         (WebCore::ImageDocument::imageClicked):
444
445 2007-05-24  Sam Weinig  <sam@webkit.org>
446
447         Reviewed by Darin.
448
449         Patch for http://bugs.webkit.org/show_bug.cgi?id=13853
450         Autogenerate the JS bindings for the HTMLFrameSetElement
451
452         * DerivedSources.make:
453         * WebCore.pro:
454         * WebCore.xcodeproj/project.pbxproj:
455         * bindings/js/JSHTMLElementWrapperFactory.cpp:
456         * bindings/js/JSHTMLFrameSetCustom.cpp: Added.
457         (WebCore::JSHTMLFrameSetElement::canGetItemsForName):
458         (WebCore::JSHTMLFrameSetElement::nameGetter):
459         * bindings/js/kjs_html.cpp:
460         (KJS::):
461         (KJS::JSHTMLElement::classInfo):
462         (KJS::JSHTMLElement::accessors):
463         (KJS::JSHTMLElement::getOwnPropertySlot):
464         * bindings/js/kjs_html.h:
465         (KJS::JSHTMLElement::):
466         * html/HTMLFrameSetElement.idl:
467
468 2007-05-24  Zack Rusin  <zrusin@trolltech.com>
469
470         Reviewed by andersca
471
472         Fixing check for incorrent font size - it should
473         check fixed not normal.
474
475         * page/Settings.cpp:
476         (WebCore::Settings::setDefaultFixedFontSize):
477
478 2007-05-24  Mitz Pettel  <mitz@webkit.org>
479
480         Speculative buildbot build fix.
481
482         * css/cssstyleselector.cpp:
483         (WebCore::CSSStyleSelector::applyProperty):
484
485 2007-05-24  Adam Roben  <aroben@apple.com>
486
487         Made Chrome::addMessageToConsole more flexible
488
489         addMessageToConsole now takes two additional parameters to specify the
490         message source (HTML, JS, CSS, XML) and level (error, warning, log). To
491         maintain our old behavior, all current messages were given
492         JSMessageSource and ErrorMessageLevel parameters. Messages matching
493         these characteristics are passed up to the ChromeClient.
494
495         Reviewed by Hyatt.
496
497         * bindings/js/JSCustomXPathNSResolver.cpp:
498         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
499         * bindings/js/kjs_events.cpp:
500         (KJS::JSAbstractEventListener::handleEvent):
501         * bindings/js/kjs_proxy.cpp:
502         (WebCore::KJSProxy::evaluate):
503         * bindings/js/kjs_window.cpp:
504         (KJS::Window::isSafeScript):
505         (KJS::ScheduledAction::execute):
506         * html/HTMLParser.cpp:
507         (WebCore::HTMLParser::reportErrorToConsole):
508         * ksvg2/misc/SVGDocumentExtensions.cpp:
509         (WebCore::SVGDocumentExtensions::reportWarning):
510         (WebCore::SVGDocumentExtensions::reportError):
511         * loader/FrameLoader.cpp:
512         (WebCore::FrameLoader::reportLocalLoadFailed):
513         * page/Chrome.cpp:
514         (WebCore::Chrome::addMessageToConsole):
515         * page/Chrome.h:
516         (WebCore::):
517         * xml/xmlhttprequest.cpp:
518         (WebCore::XMLHttpRequest::setRequestHeader):
519
520 2007-05-24  David Hyatt  <hyatt@apple.com>
521
522         Rework how HTML handles line numbering so that it is not fooled by
523         \r without a following \n and so that document.write doesn't lead
524         to line numbering confusion.
525
526         Reviewed by aroben
527
528         * html/HTMLParser.cpp:
529         (WebCore::HTMLParser::reportErrorToConsole):
530         * html/HTMLTokenizer.cpp:
531         (WebCore::HTMLTokenizer::processListing):
532         (WebCore::HTMLTokenizer::parseSpecial):
533         (WebCore::HTMLTokenizer::parseComment):
534         (WebCore::HTMLTokenizer::parseServer):
535         (WebCore::HTMLTokenizer::parseProcessingInstruction):
536         (WebCore::HTMLTokenizer::parseText):
537         (WebCore::HTMLTokenizer::parseEntity):
538         (WebCore::HTMLTokenizer::parseTag):
539         (WebCore::HTMLTokenizer::write):
540         (WebCore::HTMLTokenizer::processToken):
541         (WebCore::HTMLTokenizer::setSrc):
542         * html/HTMLTokenizer.h:
543         (WebCore::HTMLTokenizer::lineNumberPtr):
544         * html/HTMLViewSourceDocument.cpp:
545         (WebCore::HTMLViewSourceDocument::addLine):
546         * loader/TextDocument.cpp:
547         (WebCore::TextTokenizer::write):
548         * platform/SegmentedString.cpp:
549         (WebCore::SegmentedString::SegmentedString):
550         (WebCore::SegmentedString::operator=):
551         (WebCore::SegmentedString::clear):
552         * platform/SegmentedString.h:
553         (WebCore::SegmentedString::SegmentedString):
554         (WebCore::SegmentedString::advance):
555         (WebCore::SegmentedString::escaped):
556
557 2007-05-23  David Hyatt  <hyatt@apple.com>
558
559         Make the delete/InsertRows/Cells methods as well as the rowIndex method
560         able to work properly even when whitespace or comment nodes are present.
561
562         Reviewed by aroben
563
564         fast/table/rowindex-comment-nodes.html
565
566         * html/HTMLTableRowElement.cpp:
567         (WebCore::HTMLTableRowElement::rowIndex):
568         (WebCore::HTMLTableRowElement::insertCell):
569         (WebCore::HTMLTableRowElement::deleteCell):
570         * html/HTMLTableSectionElement.cpp:
571         (WebCore::HTMLTableSectionElement::insertRow):
572         (WebCore::HTMLTableSectionElement::deleteRow):
573
574 2007-05-23  David Hyatt  <hyatt@apple.com>
575
576         <optgroup> should allow <script> and text nodes inside it, just like
577         <select> does.
578
579         Reviewed by aroben
580
581         fast/forms/stuff-on-my-optgroup.html
582
583         * html/HTMLOptGroupElement.cpp:
584         (WebCore::HTMLOptGroupElement::checkDTD):
585         * html/HTMLSelectElement.cpp:
586         (WebCore::HTMLSelectElement::checkDTD):
587
588 2007-05-23  David Hyatt  <hyatt@apple.com>
589
590         Framesets should allow whitespace text nodes as children.
591
592         Reviewed by aroben
593
594         * html/HTMLFrameSetElement.cpp:
595         (WebCore::HTMLFrameSetElement::checkDTD):
596
597 2007-05-24  Mark Rowe  <mrowe@apple.com>
598
599         Fix the Qt build after r21685.
600
601         * platform/qt/CursorQt.cpp:
602         (WebCore::notAllowedCursor):
603         (WebCore::zoomInCursor):
604         (WebCore::zoomOutCursor):
605
606 2007-05-23  Alp Toker  <alp.toker@collabora.co.uk>
607
608         Reviewed by Adam.
609
610         Fix the gdk build following changes in r21685.
611
612         * platform/gdk/CursorGdk.cpp:
613         (WebCore::zoomInCursor):
614         (WebCore::zoomOutCursor):
615
616 2007-05-23  David Hyatt  <hyatt@apple.com>
617
618         Fix for <rdar://problem/5222611> REGRESSION: Paint ordering problems at
619         http://buymeasoda.com/dev/issues/image_onload/image_onload.html
620
621         Clamp z-index so that values that exceed maxint (or that are below minint)
622         are clamped to those values.
623
624         Reviewed by darin
625
626         * css/cssstyleselector.cpp:
627         (WebCore::CSSStyleSelector::applyProperty):
628
629 2007-05-23  Mitz Pettel  <mitz@webkit.org>
630
631         Reviewed by David Hyatt.
632
633         - fix http://bugs.webkit.org/show_bug.cgi?id=13563
634           REGRESSION: Crash loading message in Yahoo! Mail
635
636         Tests: fast/css/stale-style-selector-crash-1.html
637                fast/css/stale-style-selector-crash-2.html
638
639         * dom/Document.cpp:
640         (WebCore::Document::Document): Initialize the m_didCalculateStyleSelector
641         flag to 'false'.
642         (WebCore::Document::updateStyleSelector): Do not bail out if we have ever
643         calculated a non-trivial style selector, even if at the moment we are
644         pending style sheets. We could have calculated a non-trivial selector
645         already either because at some point there were no pending style sheets
646         (so the currently pending ones were added dynamically) or because we were
647         forced to do a layout ignoring pending style sheets. Either way, once
648         there is a style selector, we need to keep it up to date, otherwise we can
649         crash under recalcStyle() during updateRendering() or simply not recalculate
650         style correctly for dynamic changes.
651         (WebCore::Document::recalcStyleSelector): Set m_didCalculateStyleSelector
652         to 'true' when creating a new style selector.
653         * dom/Document.h:
654
655 2007-05-23  Anders Carlsson  <andersca@apple.com>
656
657         Reviewed by Adam.
658
659         <rdar://problem/5224749> Show a zoom/unzoom cursor for resizable image documents
660         
661         * WebCore.xcodeproj/project.pbxproj:
662         Install the zoom cursors.
663         
664         * loader/ImageDocument.cpp:
665         (WebCore::ImageDocument::resizeImageToFit):
666         Set the cursor to the zoom in cursor.
667         
668         (WebCore::ImageDocument::restoreImageSize):
669         If the image fits, reset the cursor. Otherwise, set it to the zoom in cursor.
670
671 2007-05-23  Darin Adler  <darin@apple.com>
672
673         Reviewed by Hyatt.
674
675         - fix problems where unrendered nodes were affecting on plain text serialization
676
677         * editing/TextIterator.cpp:
678         (WebCore::TextIterator::advance): Don't call handleXXX functions or exitNode for
679         nodes without renderers.
680         (WebCore::shouldEmitNewlineAfterNode): Only consider rendered nodes when deciding
681         if this is the last node in the document.
682
683 2007-05-23  Anders Carlsson  <andersca@apple.com>
684
685         Reviewed by Geoff.
686
687         <rdar://problem/3663808> Resize large images to fit in the browser window
688         
689         * WebCore.exp:
690         Add new settings method.
691         
692         * loader/ImageDocument.cpp:
693         (WebCore::ImageEventListener::ImageEventListener):
694         New class that handles resize events and click events and forwards them to the image document.
695         
696         (WebCore::ImageTokenizer::ImageTokenizer):
697         (WebCore::ImageTokenizer::writeRawData):
698         (WebCore::ImageTokenizer::finish):
699         (WebCore::ImageDocument::ImageDocument):
700         (WebCore::ImageDocument::createDocumentStructure):
701         (WebCore::ImageDocument::cachedImage):
702         Let the ImageDocument class keep track of its document structure.
703         
704         (WebCore::ImageDocument::scale):
705         Returns the scale that should be used when resizing the image.
706         
707         (WebCore::ImageDocument::resizeImage):
708         Update the image size.
709         
710         (WebCore::ImageDocument::imageClicked):
711         Toggle between resized and not resized. When restoring the size, scroll the image so that the area under
712         the mouse stays the same.
713         
714         (WebCore::ImageDocument::imageChanged):
715         When the image size is known, resize the image if needed.
716         
717         (WebCore::ImageDocument::restoreImageSize):
718         Restore the image size.
719         
720         (WebCore::ImageDocument::imageNeedsResizing):
721         Return whether the image is too big for its window or not.
722         
723         (WebCore::ImageDocument::windowSizeChanged):
724         Called when the window's size changes. Determine if the window fits or not and resize it if it doesn't fit.
725         
726         (WebCore::ImageEventListener::handleEvent):
727         Forward events to the image document.
728         
729         * page/Settings.cpp:
730         (WebCore::Settings::Settings):
731         (WebCore::Settings::setEnableAutomaticImageResizing):
732         * page/Settings.h:
733         (WebCore::Settings::enableAutomaticImageResizing):
734         Add new setting.
735         
736 2007-05-23  Anders Carlsson  <andersca@apple.com>
737
738         Reviewed by Darin.
739
740         Add -webkit-zoom-in and -webkit-zoom-out cursors.
741         
742         * Resources/zoomInCursor.png: Added.
743         * Resources/zoomOutCursor.png: Added.
744         * css/CSSComputedStyleDeclaration.cpp:
745         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
746         * css/CSSValueKeywords.in:
747         * page/EventHandler.cpp:
748         (WebCore::selectCursor):
749         * platform/Cursor.h:
750         * platform/mac/CursorMac.mm:
751         (WebCore::zoomInCursor):
752         (WebCore::zoomOutCursor):
753         * rendering/RenderStyle.h:
754         (WebCore::):
755
756 2007-05-23  Sam Weinig  <sam@webkit.org>
757
758         Reviewed by Darin.
759
760         Part one of patch for http://bugs.webkit.org/show_bug.cgi?id=13830
761         Auto-generate JS DOM bindings for HTMLDocument and most of the rest
762         of HTMLElement
763
764         - Just the HTMLElement part.
765
766         * bindings/js/kjs_html.cpp:
767         (KJS::JSHTMLElement::getValueProperty):
768         (KJS::JSHTMLElement::putValueProperty):
769         * bindings/js/kjs_html.h:
770         (KJS::JSHTMLElement::):
771         * html/HTMLElement.idl:
772
773 2007-05-22  Kevin McCullough  <kmccullough@apple.com>
774
775         Reviewed by Darin.
776
777         - rdar://problem/5183523
778         - We now check the document's URL to see if it can load a resource in the case of a URL click, instead of checking the referrer, which is blank for local files.
779
780         * loader/FrameLoader.cpp:
781         (WebCore::FrameLoader::load):
782         (WebCore::FrameLoader::open):
783         * platform/PlatformString.h:
784         (WebCore::debugPrintString):
785
786 2007-05-23  Sam Weinig  <sam@webkit.org>
787
788         Reviewed by Darin.
789
790         Part two of patch for http://bugs.webkit.org/show_bug.cgi?id=13830
791         Auto-generate JS DOM bindings for HTMLDocument and most of the rest
792         of HTMLElement
793
794         - Just the HTMLDocument part.
795
796         * WebCore.pro:
797         * WebCore.xcodeproj/project.pbxproj:
798         * bindings/js/JSHTMLDocumentCustom.cpp: Added.
799         (WebCore::JSHTMLDocument::canGetItemsForName):
800         (WebCore::JSHTMLDocument::nameGetter):
801         (WebCore::JSHTMLDocument::all):
802         (WebCore::JSHTMLDocument::setAll):
803         (WebCore::JSHTMLDocument::location):
804         (WebCore::JSHTMLDocument::setLocation):
805         (WebCore::JSHTMLDocument::open):
806         (WebCore::writeHelper):
807         (WebCore::JSHTMLDocument::write):
808         (WebCore::JSHTMLDocument::writeln):
809         (WebCore::JSHTMLDocument::clear):
810         * bindings/js/kjs_dom.cpp:
811         (KJS::toJS):
812         * bindings/js/kjs_dom.h:
813         * bindings/js/kjs_html.cpp:
814         * bindings/js/kjs_html.h:
815         * bindings/objc/DOMPrivate.h:
816         * bindings/scripts/CodeGeneratorJS.pm: Add [Deletable] property
817         for Document.all and fix HasOverridingNameGetter to allow correct
818         prototype chain
819         * dom/Document.cpp:
820         (WebCore::Document::plugins): adds alias to embeds() for bindings
821         * dom/Document.h:
822         * html/HTMLDocument.cpp:
823         (WebCore::HTMLDocument::width):
824         (WebCore::HTMLDocument::height):
825         (WebCore::HTMLDocument::dir):
826         (WebCore::HTMLDocument::setDir):
827         (WebCore::HTMLDocument::designMode):
828         (WebCore::HTMLDocument::setDesignMode):
829         (WebCore::HTMLDocument::bgColor):
830         (WebCore::HTMLDocument::setBgColor):
831         (WebCore::HTMLDocument::fgColor):
832         (WebCore::HTMLDocument::setFgColor):
833         (WebCore::HTMLDocument::alinkColor):
834         (WebCore::HTMLDocument::setAlinkColor):
835         (WebCore::HTMLDocument::linkColor):
836         (WebCore::HTMLDocument::setLinkColor):
837         (WebCore::HTMLDocument::vlinkColor):
838         (WebCore::HTMLDocument::setVlinkColor):
839         (WebCore::HTMLDocument::captureEvents):
840         (WebCore::HTMLDocument::releaseEvents):
841         * html/HTMLDocument.h:
842         * html/HTMLDocument.idl:
843
844 2007-05-23  David Hyatt  <hyatt@apple.com>
845
846         Fix for <rdar://problem/5221838> REGRESSION (r21581): no content in idisk
847         window at mac.com.
848
849         Back out the change to make self-closed <script/> into a Dashboard quirk
850         only.
851
852         Reviewed by aroben
853
854         * html/HTMLTokenizer.cpp:
855         (WebCore::HTMLTokenizer::parseTag):
856
857 2007-05-23  Patti  <patti@apple.com>
858
859         Reviewed by David Harrison.
860
861         <rdar://problem/5078453> AXNext/PrevLineEndTextMarkerForTextMarker returns kAXErrorNoValue for attachment range
862         
863         Floating objects, such as aligned images, are not included as part of any line.  So when the given 
864         text marker is on the floating object, the returned line edge cannot be found and asserts are fired.
865         In addition, this paints an inconsistent text layout (in the accessibility sense) of where the floating 
866         object resides.  Character/word methods report floating object at the beginning of the text line(s).  Yet
867         line methods never present floating objects anywhere.  
868         To fix this, the ax line methods will now do more checking to ensure floating object nodes are included
869         when determining the line range/position. That way, assistive apps won't get stuck using the line methods 
870         to read line-by-line
871
872         * bridge/mac/WebCoreAXObject.mm:
873         (updateAXLineStartForVisiblePosition):
874         Added a helper method to adjust line start position to account for floating objects
875         (-[WebCoreAXObject doAXLeftLineTextMarkerRangeForTextMarker:]):
876         (-[WebCoreAXObject doAXRightLineTextMarkerRangeForTextMarker:]):
877         (-[WebCoreAXObject doAXNextLineEndTextMarkerForTextMarker:]):
878         (-[WebCoreAXObject doAXPreviousLineStartTextMarkerForTextMarker:]):
879         Fixed up line routines to include floating object nodes in line position calculation.
880         startOfLine/endOLine may return null for position next to a floating position.  So now there's extra checks to prevent
881         returning null line position/ranges back to AX.
882
883
884 2007-05-23  Simon Hausmann  <hausmann@kde.org>
885
886         Reviewed by Zack, discussed also with Lars.
887
888         Make it possible to have per-QWebPage network interface
889         implementations.
890
891         * platform/network/qt/ResourceHandleQt.cpp:
892         (WebCore::ResourceHandle::start): Pass the page's network interface to
893         the network manager.
894
895 2007-05-23  Rob Buis  <buis@kde.org>
896
897         Reviewed by Dave Hyatt.
898
899         http://bugs.webkit.org/show_bug.cgi?id=13174
900         line-height in font shorthand does not override a previously stated line-height property
901
902         Make sure line-height is calculated against definite font-size and
903         uses the last set line-height, ie. directly or through font shorthand.
904
905         * css/cssstyleselector.cpp:
906         (WebCore::CSSStyleSelector::styleForElement):
907         (WebCore::CSSStyleSelector::pseudoStyleForElement):
908         (WebCore::CSSStyleSelector::applyDeclarations):
909         (WebCore::CSSStyleSelector::applyProperty):
910         * css/cssstyleselector.h:
911
912 2007-05-23  Lars Knoll <lars@trolltech.com>
913
914         Reviewed by Zack and Valgrind
915
916         Initialize variable.
917
918         * platform/qt/PlatformMouseEventQt.cpp:
919         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
920
921 2007-05-23  Rob Buis  <buis@kde.org>
922
923         Reviewed by Darin.
924
925         http://bugs.webkit.org/show_bug.cgi?id=13784
926         REGRESSION (r13744-13750): Crash with empty gradient when drawing to canvas
927
928         Fix crash by testing for zero stops, and returning transparent black
929         in this case.
930
931         * html/CanvasGradient.cpp:
932         (WebCore::CanvasGradient::getColor):
933
934 2007-05-23  Rob Buis  <buis@kde.org>
935
936         Reviewed by Darin.
937
938         http://bugs.webkit.org/show_bug.cgi?id=13801
939         Crash when loading nonexisting symbol
940
941         Check for referenced element and when not found just return.
942
943         * ksvg2/svg/SVGUseElement.cpp:
944         (WebCore::SVGUseElement::buildPendingResource):
945
946 2007-05-22  Sam Weinig  <sam@webkit.org>
947
948         Rubber stamped by Adam.
949
950         Fix license.
951
952         * bindings/js/JSHTMLAnchorElementCustom.cpp:
953
954 2007-05-22  Sam Weinig  <sam@webkit.org>
955
956         Reviewed by Adam.
957
958         Patch for http://bugs.webkit.org/show_bug.cgi?id=13833
959         Add ObjC DOM binding for HTMLMarqeeElement
960
961         - Also adds missing DOMHTMLFramePrivate.
962
963         * DerivedSources.make:
964         * WebCore.xcodeproj/project.pbxproj:
965         * bindings/objc/DOM.mm:
966         (WebCore::createElementClassMap):
967         * bindings/objc/DOMHTML.h:
968         * bindings/objc/DOMInternal.h:
969         * bindings/objc/DOMPrivate.h:
970         * bindings/objc/PublicDOMInterfaces.h:
971
972 2007-05-22  Justin Garcia  <justin.garcia@apple.com>
973
974         Reviewed by darin, who found the fix independently.
975
976         http://bugs.webkit.org/show_bug.cgi?id=13804
977         REGRESSION(r21611): Several new layout test pixel failures (misspelling markers)
978         
979         r21611 exposed a bug in the way removeMarkers computes
980         the end of the range to remove markers from.  It also
981         introduced a bug: removeMarkers expects a startOffset
982         and a length, not a startOffset and an endOffset (added 
983         a layout test).
984
985         * dom/Document.cpp:
986         (WebCore::Document::removeMarkers): The other removeMarkers
987         expects a startOffset and a length, not a startOffset and
988         an endOffset.
989         (WebCore::Document::removeMarkers): Fixed the endOffset
990         from length and startOffset calculation.
991
992 2007-05-22  David Hyatt  <hyatt@apple.com>
993
994         Fix for bug 13802, background colors can't be reset to default
995         color.  Fix the value cssText method to do the right thing for background
996         and background-position values.
997
998         Reviewed by beth
999
1000         fast/dom/background-shorthand-csstext.html
1001
1002         * css/CSSInitialValue.h:
1003         (WebCore::CSSInitialValue:::m_implicit):
1004         (WebCore::CSSInitialValue::isImplicitInitialValue):
1005         * css/CSSMutableStyleDeclaration.cpp:
1006         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
1007         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
1008         * css/CSSMutableStyleDeclaration.h:
1009         * css/CSSValue.h:
1010         (WebCore::CSSValue::isImplicitInitialValue):
1011         * css/cssparser.cpp:
1012         (WebCore::CSSParser::parseValue):
1013         (WebCore::CSSParser::parseBackgroundShorthand):
1014         (WebCore::CSSParser::parseShorthand):
1015
1016 2007-05-22  Darin Adler  <darin@apple.com>
1017
1018         Reviewed by Geoff.
1019
1020         - fix <rdar://problem/5215830> REGRESSION: ebay.com layout is wrong
1021
1022         The code on ebay was looking for the "document" property on a iframe.
1023         We changed that to be the ownerDocument rather than the contentDocument,
1024         which was not what ebay was expecting. The best fix seems to be removing
1025         the document property altogether.
1026
1027         Test: fast/dom/iframe-document.html
1028
1029         * bindings/js/kjs_html.h: Remove ElementDocument.
1030         * bindings/js/kjs_html.cpp: (KJS::JSHTMLElement::getValueProperty): Ditto.
1031
1032 2007-05-22  Adele Peterson  <adele@apple.com>
1033
1034         Reviewed by Darin.
1035
1036         A little cleanup from my last checkin.
1037
1038         * page/Chrome.h: Formatting change.
1039         * page/mac/ChromeMac.mm: Fixed copyright.
1040
1041 2007-05-22  Adele Peterson  <adele@apple.com>
1042
1043         Reviewed by Darin.
1044
1045         Fix for http://bugs.webkit.org/show_bug.cgi?id=13796
1046         Crash in [NSInputContext currentInputContext] when you click on this map
1047
1048         This is another case of <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
1049
1050         Test: fast/frames/frame-display-none-focus.html
1051
1052         * WebCore.xcodeproj/project.pbxproj: Added ChromeMac.mm
1053         * page/Chrome.h:
1054         * page/mac/ChromeMac.mm: Added.
1055         (WebCore::Chrome::focusNSView): Moved code from Widget::setFocus so it can be used whenever we need to make a view the first responder.
1056         * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::focusDocumentView): Calls focusNSView.
1057         * platform/mac/WidgetMac.mm: (WebCore::Widget::setFocus): Calls focusNSView.
1058
1059 2007-05-22  Justin Garcia  <justin.garcia@apple.com>
1060
1061         Reviewed by darin
1062         
1063         <rdar://problem/4875189> 
1064         List is deleted when replacing contents with Chinese/Japanese characters
1065
1066         * editing/htmlediting.cpp:
1067         (WebCore::isSpecialElement): Lists are no longer special.
1068         They can be removed by removing their content and then 
1069         then hitting delete inside of the empty list item that's 
1070         left over. Even when that list item is the first thing 
1071         in the editable region.
1072
1073 2007-05-22  Darin Adler  <darin@apple.com>
1074
1075         Reviewed by Tim Hatcher.
1076
1077         - fix <rdar://problem/5206089> REGRESSION: hovering over amazon.com "product categories"
1078           tab makes page content disappear
1079
1080         The contentWindow property was doing a cross-frame security check, but it shouldn't.
1081         Window objects are responsible for protecting themselves from cross-frame activity.
1082         Because contentWindow returned undefined, we then ended up setting visibility on the
1083         body of the main frame to "hidden".
1084
1085         No layout test yet. When we make cross-domain tests, we should include this one.
1086
1087         * html/HTMLFrameElement.idl: Removed CheckFrameSecurity attribute from contentWindow.
1088         * html/HTMLIFrameElement.idl: Ditto.
1089
1090 2007-05-22  Justin Garcia  <justin.garcia@apple.com>
1091
1092         Reviewed by oliver
1093
1094         <rdar://problem/5213963>
1095         REGRESSION(r21467): Active selection remains in text field after clicking on a button
1096
1097         * page/EventHandler.cpp:
1098         (WebCore::EventHandler::dispatchMouseEvent): Call
1099         FocusController::setFocusedNode, because Document::setFocusedNode
1100         no longer clears the selection.
1101         Begin passing the new focused frame to 
1102         FocusController::setFocusedNode, because when the 
1103         new focus node is null, the selection should only be 
1104         cleared if the focused frame isn't changing.
1105         (WebCore::Element::focus): Begin passing the new focused
1106         frame.
1107         (WebCore::Element::blur): Ditto.
1108         * html/HTMLInputElement.cpp:
1109         (WebCore::HTMLInputElement::focus): Ditto.
1110         * html/HTMLTextAreaElement.cpp:
1111         (WebCore::HTMLTextAreaElement::focus): Ditto.
1112         * page/Frame.cpp:
1113         (WebCore::Frame::setFocusedNodeIfNeeded): Ditto.
1114         * page/FocusController.cpp:
1115         (WebCore::clearSelectionIfNeeded): Take in the new
1116         focused frame.  If it's not changing, don't clear the
1117         selection.
1118         (WebCore::FocusController::setFocusedNode): Take
1119         in the new focused frame.
1120         * page/FocusController.h:
1121
1122 2007-05-22  Marius Bugge Monsen  <mbm@trolltech.com>
1123
1124         Reviewed by Zack.
1125
1126         Implement some more functions in ClipboardQt.
1127
1128         * platform/qt/ClipboardQt.cpp:
1129         (WebCore::ClipboardQt::ClipboardQt):
1130         (WebCore::ClipboardQt::getData):
1131         (WebCore::ClipboardQt::setData):
1132         (WebCore::ClipboardQt::types):
1133
1134 2007-05-21  Oliver Hunt  <oliver@apple.com>
1135
1136         Reviewed by Sam.
1137         
1138         Fix for http://bugs.webkit.org/show_bug.cgi?id=13789 
1139         -- SVGLocatable::getScreenCTM() faulty
1140         
1141         Needed to update SVGLength to handle the case where the SVGElement is
1142         not the root document element -- we do this by falling back on the 
1143         renderer for the context.
1144         
1145         For <svg> elements embedded as mixed content in xhtml we consider the
1146         absolutePosition of the parent to be the origin for the <svg> element.
1147
1148         * ksvg2/svg/SVGLength.cpp:
1149         (WebCore::SVGLength::PercentageOfViewport):
1150         * ksvg2/svg/SVGSVGElement.cpp:
1151         (WebCore::SVGSVGElement::getScreenCTM):
1152
1153 2007-05-21  Timothy Hatcher  <timothy@apple.com>
1154
1155         Reviewed by Adam.
1156
1157         <rdar://problem/5084400> -[DOMRange lineBoxRects] returns an empty array when the DOM nodes have just been created
1158
1159         Do a updateLayoutIgnorePendingStylesheets before asking the Node or Range for it's box rects.
1160
1161         * bindings/objc/DOM.mm:
1162         (-[DOMNode boundingBox]):
1163         (-[DOMNode lineBoxRects]):
1164         (-[DOMRange boundingBox]):
1165         (-[DOMRange lineBoxRects]):
1166
1167 2007-05-21  Sam Weinig  <sam@webkit.org>
1168
1169         Reviewed by George Staikos.
1170
1171         Fix Qt build.
1172
1173         * WebCore.pro: add missing IDL files.
1174
1175 2007-05-21  Sam Weinig  <sam@webkit.org>
1176
1177         Reviewed by Darin.
1178
1179         Patch for http://bugs.webkit.org/show_bug.cgi?id=13803
1180         Autogenerate the JS bindings for the HTMLMarqueeElement.
1181
1182         * DerivedSources.make:
1183         * WebCore.xcodeproj/project.pbxproj:
1184         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1185         * bindings/js/kjs_css.cpp:
1186         (KJS::DOMCSSRule::getOwnPropertySlot): Fix possible null pointer issue.
1187         (KJS::DOMCSSRule::put): Fix possible null pointer issue.
1188         * bindings/js/kjs_html.cpp:
1189         (KJS::):
1190         (KJS::JSHTMLElement::classInfo):
1191         (KJS::JSHTMLElement::accessors):
1192         (KJS::JSHTMLElement::getOwnPropertySlot): Fix null pointer issue.
1193         (KJS::HTMLElementFunction::callAsFunction):
1194         (KJS::JSHTMLElement::put):
1195         * bindings/js/kjs_html.h:
1196         (KJS::JSHTMLElement::):
1197         * html/HTMLMarqueeElement.cpp:
1198         (WebCore::HTMLMarqueeElement::start):
1199         (WebCore::HTMLMarqueeElement::stop):
1200         * html/HTMLMarqueeElement.h: Add start() and stop() functions.
1201         * html/HTMLMarqueeElement.idl: Added.
1202         * page/DOMWindow.idl: Add marquee constructor.
1203
1204 2007-05-21  Adele Peterson  <adele@apple.com>
1205
1206         Fix by Darin, reviewed by me.
1207
1208         Fix for <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
1209
1210         * platform/mac/WidgetMac.mm:
1211         (WebCore::safeRemoveFromSuperview): Added. If the view is the window's first responder, then 
1212          set the window's first responder to nil so we don't leave the window pointing to a view that's no longer in it.
1213         (WebCore::Widget::setFocus): Don't attempt to focus the view if it has no window.
1214         (WebCore::Widget::removeFromSuperview): Call safeRemoveFromSuperview.
1215         (WebCore::Widget::afterMouseDown): ditto.
1216
1217 2007-05-21  David Hyatt  <hyatt@apple.com>
1218
1219         Make a line gutter backdrop so that tiny view source docs don't look
1220         bad.
1221
1222         Reviewed by aroben
1223
1224         * css/view-source.css:
1225         * html/HTMLViewSourceDocument.cpp:
1226         (WebCore::HTMLViewSourceDocument::createContainingTable):
1227
1228 2007-05-21  David Hyatt  <hyatt@apple.com>
1229
1230         Make sure to distinguish between links to internal resources and
1231         real links (anchors) in view source mode.
1232
1233         Reviewed by aroben
1234
1235         * css/view-source.css:
1236         * html/HTMLViewSourceDocument.cpp:
1237         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1238         (WebCore::HTMLViewSourceDocument::addLink):
1239         * html/HTMLViewSourceDocument.h:
1240
1241 2007-05-21  Sam Weinig  <sam@webkit.org>
1242
1243         Reviewed by Adam and Darin.
1244
1245         Patch for http://bugs.webkit.org/show_bug.cgi?id=13791
1246         Autogenerate the JS bindings for the HTMLIFrameElement and HTMLFrameElement.
1247
1248         * DerivedSources.make:
1249         * WebCore.xcodeproj/project.pbxproj:
1250         * bindings/js/JSHTMLAnchorElementCustom.cpp:
1251         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1252         * bindings/js/kjs_html.cpp:
1253         (KJS::):
1254         (KJS::JSHTMLElement::classInfo):
1255         (KJS::JSHTMLElement::accessors):
1256         (KJS::HTMLElementFunction::callAsFunction):
1257         * bindings/js/kjs_html.h:
1258         (KJS::JSHTMLElement::):
1259         * bindings/scripts/CodeGeneratorJS.pm:
1260         * html/HTMLFrameElement.idl:
1261         * html/HTMLFrameElementBase.cpp:
1262         (WebCore::HTMLFrameElementBase::location):
1263         * html/HTMLFrameElementBase.h:
1264         * html/HTMLFrameOwnerElement.h:
1265         (WebCore::HTMLFrameOwnerElement::contentWindow):
1266         * html/HTMLIFrameElement.idl:
1267         * page/DOMWindow.idl:
1268
1269 2007-05-21  Lars Knoll <lars@trolltech.com>
1270
1271         Reviewed by Zack.
1272
1273         Remove the ResourceHandleManager class, it is now part of 
1274         QWebNetworkInterface. Adapt ResourceHandle to the new way 
1275         of things.
1276
1277         * WebCore.pro:
1278         * platform/network/ResourceHandleInternal.h:
1279         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1280         * platform/network/qt/ResourceHandleManagerKDE.cpp: Removed.
1281         * platform/network/qt/ResourceHandleManagerKDE.h: Removed.
1282         * platform/network/qt/ResourceHandleManagerQt.cpp: Removed.
1283         * platform/network/qt/ResourceHandleManagerQt.h: Removed.
1284         * platform/network/qt/ResourceHandleQt.cpp:
1285         (WebCore::ResourceHandle::~ResourceHandle):
1286         (WebCore::ResourceHandle::start):
1287         (WebCore::ResourceHandle::cancel):
1288
1289 2007-05-21  David Hyatt  <hyatt@apple.com>
1290
1291         Second half of fix for 13793, make sure rules=groups works properly with
1292         spanning colgroups.
1293
1294         Also make sure colgroups get an actual span of 1 (instead of incorrectly
1295         giving them a span of 0).
1296
1297         Reviewed by mitz
1298
1299         fast/table/colgroup-spanning-groups-rules.html
1300
1301         * html/HTMLTableColElement.cpp:
1302         (WebCore::HTMLTableColElement::HTMLTableColElement):
1303         * rendering/RenderTable.cpp:
1304         (WebCore::RenderTable::colElement):
1305         * rendering/RenderTable.h:
1306         * rendering/RenderTableCell.cpp:
1307         (WebCore::RenderTableCell::collapsedLeftBorder):
1308         (WebCore::RenderTableCell::collapsedRightBorder):
1309
1310 2007-05-20  David Hyatt  <hyatt@apple.com>
1311
1312         Half of a fix for 13793, make sure rules=groups and border behave properly
1313         together.
1314
1315         Reviewed by mitz
1316
1317         No tests added, two Mozilla table tests now pass that failed before.
1318
1319         * html/HTMLTableElement.cpp:
1320         (WebCore::HTMLTableElement::getSharedCellDecl):
1321
1322 2007-05-20  Brady Eidson <beidson@apple.com>
1323
1324         Reviewed by Geoose Garen
1325
1326         <rdar://problem/4758919> - Incorrect favicon shown for URL after going back
1327
1328         When restoring a cached page, we'd try to kick off the icon load for it, which ended up causing 
1329         shenanigans with the icon url -> page url mapping.  
1330
1331         * loader/FrameLoader.cpp:
1332         (WebCore::FrameLoader::endIfNotLoading): Only try an icon load if we're not restoring from the page cache
1333         (WebCore::FrameLoader::startIconLoader): Added helpful logging that helped me track this down
1334         (WebCore::FrameLoader::commitIconURLToIconDatabase): Ditto (and fixed a comment typo)
1335
1336         * loader/icon/IconLoader.cpp:
1337         (WebCore::IconLoader::stopLoading): Don't null out the ResourceLoader here, as clearLoadingState() does that
1338         (WebCore::IconLoader::finishLoading): Added helpful logging that helped me track this down
1339
1340
1341 2007-05-20  Darin Adler  <darin@apple.com>
1342
1343         Reviewed by Oliver Hunt.
1344
1345         - fix <rdar://problem/5193416> REGRESSION: Selection on large pages extremely slow
1346
1347         * dom/Document.cpp: (WebCore::Document::removeMarkers): Added an early exit for the common
1348         case where there are no markers. Changed code to iterate over all the nodes in the range
1349         instead of using TextIterator, which is more efficient.
1350         
1351         * page/Frame.cpp: (WebCore::Frame::respondToChangedSelection): Added checks for editable,
1352         so we don't bother doing work related to spell checking and grammar checking when changing
1353         the selection in non-editable text. Also rearranged the code so we only compute the old
1354         word boundaries and sentence boundaries when actually needed, and don't do the sentence
1355         range checks unless grammar checking is enabled.
1356
1357         * platform/TextBreakIteratorICU.cpp:
1358         (WebCore::setUpIterator): Don't take a locale parameter. Always pass in currentTextBreakLocaleID.
1359         (WebCore::characterBreakIterator): Removed local parameter.
1360         (WebCore::wordBreakIterator): Ditto.
1361         (WebCore::lineBreakIterator): Ditto.
1362         (WebCore::sentenceBreakIterator): Ditto.
1363
1364         * platform/mac/TextBreakIteratorInternalICUMac.mm:
1365         (WebCore::getTextBreakLocale): Broke out the code to actually get the locale.
1366         (WebCore::currentTextBreakLocaleID): This function now handles only the caching and calls
1367         getTextBreakLocale to actually figure it out.
1368
1369         * editing/visible_units.cpp: Added lots of FIXME comments, but no code change.
1370
1371 2007-05-20  Adam Treat  <adam@staikos.net>
1372
1373         Add -f to cp to deal with some obscure build environments.
1374
1375         Reviewed by George Staikos.
1376
1377         * move-js-headers.sh:
1378
1379 2007-05-20  Adam Treat  <adam@staikos.net>
1380
1381         Add missing include for auto_ptr
1382
1383         Reviewed by George Staikos.
1384
1385         * platform/graphics/ImageBuffer.h:
1386
1387 2007-05-19  David Hyatt  <hyatt@apple.com>
1388
1389         Fix for bug 13785, O(n^2) counter creation.
1390
1391         Reviewed by darin
1392
1393         * rendering/RenderCounter.cpp:
1394         (WebCore::findPlaceForCounter):
1395         (WebCore::RenderCounter::originalText):
1396
1397 2007-05-19  Mitz Pettel  <mitz@webkit.org>
1398
1399         Reviewed by Dave Hyatt.
1400
1401         - fix http://bugs.webkit.org/show_bug.cgi?id=12729
1402           box-shadow disappears when scrolling a div that it falls on/under
1403
1404         Tests: fast/repaint/box-shadow-dynamic.html
1405                fast/repaint/box-shadow-h.html
1406                fast/repaint/box-shadow-v.html
1407
1408         * rendering/InlineFlowBox.cpp:
1409         (WebCore::InlineFlowBox::placeBoxesHorizontally): Factor in box shadow.
1410         (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
1411         (WebCore::InlineFlowBox::paint): Account for box shadow when checking if
1412         the damage rect intersects.
1413         * rendering/RenderBlock.cpp:
1414         (WebCore::RenderBlock::overflowHeight): For overflow areas, when asked
1415         for the "exterior" overflow, add box shadow overflow.
1416         (WebCore::RenderBlock::overflowWidth): Ditto.
1417         (WebCore::RenderBlock::overflowLeft): Ditto.
1418         (WebCore::RenderBlock::overflowTop): Ditto.
1419         (WebCore::RenderBlock::overflowRect): Ditto.
1420         (WebCore::RenderBlock::layoutBlock): Factor box shadow into visual overflow.
1421         * rendering/RenderFlexibleBox.cpp:
1422         (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
1423         * rendering/RenderFlow.cpp:
1424         (WebCore::RenderFlow::lowestPosition): For overflow areas, when asked for
1425         the "exterior" extreme position, add box shadow.
1426         (WebCore::RenderFlow::rightmostPosition): Ditto.
1427         (WebCore::RenderFlow::leftmostPosition): Ditto.
1428         * rendering/RenderLayer.cpp:
1429         (WebCore::RenderLayer::calculateRects): Avoid clipping out box shadow.
1430         * rendering/RenderObject.cpp:
1431         (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Make sure to paint
1432         the box shadow when an edge with a shadow moves.
1433         (WebCore::RenderObject::adjustRectForOutlineAndShadow): Helper function
1434         that expands a given rectangle to encompass outline and box shadow.
1435         (WebCore::RenderObject::absoluteOutlineBox): Changed to include box shadow.
1436         * rendering/RenderObject.h:
1437
1438 2007-05-19  Mitz Pettel  <mitz@webkit.org>
1439
1440         Reviewed by Dave Hyatt.
1441
1442         - fix http://bugs.webkit.org/show_bug.cgi?id=13783
1443           REGRESSION (r21120): Frame resizers not repainted properly when dragged
1444
1445         * rendering/RenderFrameSet.cpp:
1446         (WebCore::RenderFrameSet::layout):
1447
1448 2007-05-19  Mitz Pettel  <mitz@webkit.org>
1449
1450         Reviewed by Darin.
1451
1452         - fix http://bugs.webkit.org/show_bug.cgi?id=13774
1453           REGRESSION: Crash emailing blog entry using Google Reader
1454
1455         Test: fast/table/stale-grid-crash.html
1456
1457         * rendering/RenderTable.cpp:
1458         (WebCore::RenderTable::recalcSections): Made const and replaced
1459         setNeedsLayout(true) with an assertion that the table is already
1460         marked for layout.
1461         (WebCore::RenderTable::sectionAbove): Added call to recalcSectionsIfNeeded().
1462         (WebCore::RenderTable::sectionBelow): Ditto.
1463         (WebCore::RenderTable::cellAbove): Ditto.
1464         (WebCore::RenderTable::cellBelow): Ditto.
1465         (WebCore::RenderTable::cellBefore): Ditto.
1466         (WebCore::RenderTable::cellAfter): Ditto.
1467         * rendering/RenderTable.h:
1468         Made some private member variables which are used in section recalc mutable.
1469         (WebCore::RenderTable::setNeedsSectionRecalc): Moved the call to
1470         setNeedsLayout() from recalcSections() into here, because I made
1471         recalcSections() const.
1472         (WebCore::RenderTable::recalcSectionsIfNeeded): Made const.
1473
1474 2007-05-19  Mitz Pettel  <mitz@webkit.org>
1475
1476         Reviewed by Darin.
1477
1478         - http://bugs.webkit.org/show_bug.cgi?id=13320
1479           rounded corners with drop shadows are really slow
1480
1481         Test for a rendering bug fixed by this patch:
1482             fast/box-shadow/border-radius-big.html
1483
1484         No test for the performance ingredient.
1485
1486         * platform/graphics/GraphicsContext.cpp:
1487         (WebCore::GraphicsContext::addRoundedRectClip): Made cross-platform.
1488         Changed to use a single clipping path. If all the radii cannot be
1489         accommodated, clips to a rect.
1490         (WebCore::GraphicsContext::clipOutRoundedRect): Changed to use a single
1491         clipping path. If all the radii cannot be accommodated, clips out a rect.
1492         * platform/graphics/GraphicsContext.h: Added clipOut(const Path&).
1493         * platform/graphics/Path.cpp:
1494         (WebCore::Path::createRoundedRectangle): Added. Returns a rounded rectangle
1495         with the specified radii. If all the radii cannot be accommodated, returns
1496         a rectangular path.
1497         * platform/graphics/Path.h:
1498         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1499         (WebCore::GraphicsContext::clipOut): Added.
1500         * platform/graphics/cg/GraphicsContextCG.cpp:
1501         (WebCore::GraphicsContext::fillRoundedRect): Changed to use a single path.
1502         (WebCore::GraphicsContext::clipOut): Added.
1503         * platform/graphics/qt/GraphicsContextQt.cpp:
1504         (WebCore::GraphicsContext::clipOut): Added.
1505
1506 2007-05-19  Anders Carlsson  <andersca@apple.com>
1507
1508         Reviewed by Mitz.
1509
1510         Test: fast/frames/inline-object-inside-frameset.html
1511         
1512         http://bugs.webkit.org/show_bug.cgi?id=13771
1513         Assertion failure ASSERT(m_layer) when running Hamachi fuzz tester
1514
1515         Don't paint inline objects.
1516         
1517         * rendering/RenderFrameSet.cpp:
1518         (WebCore::RenderFrameSet::paint):
1519
1520 2007-05-19  David Hyatt  <hyatt@apple.com>
1521
1522         Add support for plain text MIME types (CSS/JS/TXT) to view source mode.
1523         CSS/JS will eventually tokenize via their own special tokenizers so that
1524         they can also be syntax-highlighted, but for now just treat them as
1525         plain text.
1526
1527         Reviewed by aroben
1528
1529         * dom/DOMImplementation.cpp:
1530         (WebCore::DOMImplementation::createDocument):
1531         * html/HTMLViewSourceDocument.cpp:
1532         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1533         (WebCore::HTMLViewSourceDocument::createTokenizer):
1534         (WebCore::HTMLViewSourceDocument::createContainingTable):
1535         (WebCore::HTMLViewSourceDocument::addViewSourceText):
1536         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1537         * html/HTMLViewSourceDocument.h:
1538         * loader/TextDocument.cpp:
1539         (WebCore::TextTokenizer::TextTokenizer):
1540         (WebCore::TextTokenizer::write):
1541         * loader/TextDocument.h:
1542         (WebCore::TextTokenizer::checkBuffer):
1543
1544 2007-05-18  David Hyatt  <hyatt@apple.com>
1545
1546         Fix a glitch in view source mode attribute names.
1547
1548         * html/HTMLViewSourceDocument.cpp:
1549         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1550
1551 2007-05-18  David Hyatt  <hyatt@apple.com>
1552
1553         "Linkify" view source mode links.
1554
1555         Reviewed by andersca
1556
1557         * css/view-source.css:
1558         * html/HTMLViewSourceDocument.cpp:
1559         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1560         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1561         (WebCore::HTMLViewSourceDocument::addLink):
1562         * html/HTMLViewSourceDocument.h:
1563
1564 2007-05-18  Oliver Hunt  <oliver@apple.com>
1565
1566         Reviewed by Sam
1567
1568         No longer need to pass HTMLImageElement and HTMLImageLoader on to WebKit
1569         Need to expose CachedResourceClient constructor
1570
1571         * WebCore.exp:
1572         * WebCore.xcodeproj/project.pbxproj:
1573
1574 2007-05-18  David Hyatt  <hyatt@apple.com>
1575
1576         Fix for <rdar://problem/5214338> REGRESSION: / mishandled in 
1577         HTML tokenization (13780).
1578
1579         Reviewed by ggaren
1580
1581         * html/HTMLTokenizer.cpp:
1582         (WebCore::Token::addAttribute):
1583         (WebCore::HTMLTokenizer::parseTag):
1584
1585 2007-05-18  Brady Eidson  <beidson@apple.com>
1586
1587         Reviewed by Maciej
1588
1589         http://bugs.webkit.org/show_bug.cgi?id=12681 and
1590         <rdar://problem/5166149> - window.open() causes server to be hit twice
1591
1592         This regressed in http://trac.webkit.org/projects/webkit/changeset/14637
1593         That patch was to fix broken behavior when opening an already existant window.
1594         The unfortunate side effect was to cause the server to be hit twice.  
1595         Once during the call to frame->loader()->createWindow(), and again via a 
1596         scheduled redirection.
1597
1598         I decided to restore the original de-facto behavior by making the new window
1599         open via a scheduled redirection - there is a FIXME that was already here that
1600         explains the reason why we have to do it this way for now.
1601
1602         Additionally, there were two distinct places that had their own logic to open
1603         a new window - the logic for window.open() and the logic for 
1604         window.showModalDialog().  The logic was almost identical so I condensed them
1605         into one utility function that takes a flag to handle the slight difference.
1606
1607         A layout test is not possible at this time since it would involve capturing 
1608         server logs (the 1st connection does not exist long enough to result in any
1609         delegate callbacks).  That task is documented in 
1610         http://bugs.webkit.org/show_bug.cgi?id=13769
1611
1612         * bindings/js/kjs_window.cpp:
1613         (KJS::createWindow): Merged the two slightly different versions of "creating a window" 
1614           logic here.  For the modal dialog case the load is an immediate call to changeLocation(),
1615           which is triggered by the "immediate" flag, and the other cases load via scheduleLocationChange()
1616         (KJS::showModalDialog): Call createWindow()
1617         (KJS::WindowFunc::callAsFunction): Handle frame targets of _top or _parent immediately and call 
1618           createWindow() for all others
1619
1620 2007-05-18  Sam Weinig  <sam@webkit.org>
1621
1622         Reviewed by Geoff.
1623
1624         Autogenerate the JS bindings for the HTMLTableElement, HTMLTableCaptionElement,
1625         HTMLTableCellElement, HTMLTableColElement, HTMLTableRowElement, HTMLTableSectionElement.
1626
1627         * DerivedSources.make:
1628         * WebCore.pro:
1629         * WebCore.xcodeproj/project.pbxproj:
1630         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1631         (WebCore::createJSHTMLWrapper):
1632         * bindings/js/kjs_html.cpp:
1633         (KJS::):
1634         (KJS::JSHTMLElement::classInfo):
1635         (KJS::JSHTMLElement::accessors):
1636         (KJS::HTMLElementFunction::callAsFunction):
1637         * bindings/js/kjs_html.h:
1638         (KJS::JSHTMLElement::):
1639         * html/HTMLTableCaptionElement.idl:
1640         * html/HTMLTableCellElement.idl:
1641         * html/HTMLTableColElement.idl:
1642         * html/HTMLTableElement.idl:
1643         * html/HTMLTableRowElement.idl:
1644         * html/HTMLTableSectionElement.idl:
1645         * page/DOMWindow.idl:
1646
1647 2007-05-18  Oliver Hunt  <oliver@apple.com>
1648
1649         Reviewed by Sam.
1650
1651         Fix for <rdar://problem/5211122> DRT crash below
1652         SVGTimer::applyAnimations when page cache is enabled 
1653         (SVG animation timers do not properly cancel themselves)
1654
1655         There were still a few paths in the SVG Animation code
1656         that could cause timers to be created and used.  This 
1657         patch inserts addition SVG_EXPERIMENTAL blocks to prevent
1658         these timers from being used.
1659
1660         * ksvg2/misc/SVGDocumentExtensions.cpp:
1661         (WebCore::SVGDocumentExtensions::startAnimations):
1662         * ksvg2/misc/SVGTimer.cpp:
1663         (WebCore::SVGTimer::animationsByElement):
1664         (WebCore::SVGTimer::applyAnimations):
1665         (WebCore::SVGTimer::notifyAll):
1666         (WebCore::SVGTimer::addNotify):
1667         (WebCore::SVGTimer::removeNotify):
1668         * ksvg2/misc/TimeScheduler.cpp:
1669         (WebCore::TimeScheduler::addTimer):
1670         (WebCore::TimeScheduler::connectIntervalTimer):
1671         (WebCore::TimeScheduler::disconnectIntervalTimer):
1672         (WebCore::TimeScheduler::startAnimations):
1673         (WebCore::TimeScheduler::toggleAnimations):
1674         (WebCore::TimeScheduler::timerFired):
1675         * ksvg2/svg/SVGAnimationElement.h:
1676
1677 2007-05-18  Marius Bugge Monsen <mbm@trolltech.com>
1678
1679         Reviewed by Zack Rusin. 
1680
1681         Return a valid pointer to a Clipboard object
1682         from newGeneralClipboard. 
1683
1684         * editing/qt/EditorQt.cpp:
1685         (WebCore::Editor::newGeneralClipboard):
1686
1687 2007-05-18  Mark Rowe  <mrowe@apple.com>
1688
1689         Attempt to fix the Gdk build after r21562.
1690
1691         * platform/gdk/TemporaryLinkStubs.cpp:
1692         (Widget::isEnabled):
1693         * platform/gdk/WidgetGdk.cpp:
1694
1695 2007-05-18  Adam Treat <treat@kde.org>
1696
1697         Reviewed by Lars
1698
1699         Remove dead code.
1700
1701         * platform/Widget.h:
1702         * platform/mac/WidgetMac.mm:
1703         * platform/qt/WidgetQt.cpp:
1704
1705 2007-05-18  Holger Freyther  <zecke@selfish.org>
1706
1707         Reviewed by Maciej.
1708
1709         Return true to make loading of pages working again
1710
1711         * loader/gdk/FrameLoaderClientGdk.cpp:
1712         (WebCore::FrameLoaderClientGdk::canHandleRequest):
1713
1714 2007-05-18  Holger Freyther  <zecke@selfish.org>
1715
1716         Reviewed by Maciej.
1717
1718         Make WebCore::Widget use GtkWidget to fix focus handling.
1719
1720         * WebCore.pro: Add PlatformScrollBar
1721         * platform/ScrollView.h: Gtk stuff
1722         * platform/Widget.h: Take a GtkWidget
1723         * platform/gdk/PlatformScrollBarGdk.cpp: Added.
1724         (PlatformScrollbar::PlatformScrollbar):
1725         (PlatformScrollbar::~PlatformScrollbar):
1726         (PlatformScrollbar::width):
1727         (PlatformScrollbar::height):
1728         (PlatformScrollbar::setEnabled):
1729         (PlatformScrollbar::paint):
1730         (PlatformScrollbar::updateThumbPosition):
1731         (PlatformScrollbar::updateThumbProportion):
1732         (PlatformScrollbar::setRect):
1733         * platform/gdk/ScreenGdk.cpp: Implement depth handling
1734         (WebCore::screenDepth):
1735         * platform/gdk/ScrollViewGdk.cpp: use setGtkWidget, not setDrawable
1736         (WebCore::ScrollView::setGtkWidget):
1737         * platform/gdk/TemporaryLinkStubs.cpp:
1738         * platform/gdk/WidgetGdk.cpp:
1739         (WebCore::Widget::Widget):
1740         (WebCore::Widget::gtkWidget):
1741         (WebCore::Widget::setGtkWidget):
1742         (WebCore::Widget::hasFocus):
1743         (WebCore::Widget::setFocus):
1744
1745 2007-05-18  Lars Knoll  <lars@trolltech.com>
1746
1747         Reviewed by Zack
1748
1749         Correctly implement initialiseSupportedImageMIMETypes.
1750
1751         * platform/MimeTypeRegistry.cpp:
1752         (WebCore::initialiseSupportedImageMIMETypes):
1753         * platform/qt/MimeTypeRegistryQt.cpp:
1754         (WebCore::):
1755
1756 2007-05-18  Holger Hans Peter Freyther  <zecke@selfish.org>
1757
1758         Reviewed by Maciej.
1759
1760         Build fix for non-Qt and non-Mac ports.
1761
1762         * html/HTMLCanvasElement.h:
1763
1764 2007-05-18  Holger Hans Peter Freyther  <zecke@selfish.org>
1765
1766         Reviewed by Mark Rowe.
1767
1768         No test added as this is hard to time.
1769
1770         * platform/gdk/FrameGdk.cpp: Use needsLayout() to decide if layout()
1771         is needed.
1772
1773         (WebCore::FrameGdk::dumpRenderTree):
1774         (WebCore::FrameGdk::handleGdkEvent):
1775
1776 2007-05-18  Simon Hausmann  <hausmann@kde.org>
1777
1778         Reviewed by Lars.
1779
1780         * WebCore.pro: Create a pkg-config file to make it easier to locate
1781         and use WebKitQt.
1782
1783 2007-05-18  Lars Knoll <lars@trolltech.com>
1784
1785         Reviewed by Hyatt.
1786
1787         Remove unused handleMouseEvent methods in the Widget
1788         and derived classes.
1789
1790         * page/EventHandler.cpp:
1791         (WebCore::EventHandler::handleMouseMoveEvent):
1792         * page/FrameView.cpp:
1793         * page/FrameView.h:
1794         * page/mac/EventHandlerMac.mm:
1795         (WebCore::EventHandler::mouseDragged):
1796         (WebCore::EventHandler::mouseMoved):
1797         * platform/ScrollBar.h:
1798         * platform/Widget.h:
1799         * platform/win/PlatformScrollBar.h:
1800         * platform/win/TemporaryLinkStubs.cpp:
1801         (WebCore::PlatformScrollbar::setRect):
1802         * platform/wx/PlatformScrollBar.h:
1803
1804 2007-05-18  George Staikos  <staikos@kde.org>
1805
1806         Reviewed by Lars.
1807
1808         Use the proper clipping algorithm.  Might be a bit slow but we
1809         can optimize it later.
1810
1811         * platform/graphics/qt/GraphicsContextQt.cpp:
1812         (WebCore::GraphicsContext::clip):
1813
1814 2007-05-17  Sam Weinig  <sam@webkit.org>
1815
1816         Reviewed by George Staikos.
1817
1818         Fix Qt build after adding JSHTMLAnchorElementCustom.cpp. 
1819
1820         * WebCore.pro:
1821
1822 2007-05-17  George Staikos  <staikos@kde.org>
1823
1824         Reviewed by hyatt.
1825
1826         Fix preprocessor logic for CG/QT
1827
1828         * html/HTMLCanvasElement.cpp:
1829         (WebCore::HTMLCanvasElement::reset):
1830
1831 2007-05-17  David Hyatt  <hyatt@apple.com>
1832
1833         Add a line gutter to view source mode.  The gutter uses counters, and this exposed the fact
1834         that pseudoStyleForElement was not walking all UA rules properly.
1835
1836         Reviewed by aroben
1837
1838         * css/cssstyleselector.cpp:
1839         (WebCore::CSSStyleSelector::pseudoStyleForElement):
1840         * css/view-source.css:
1841         * html/HTMLViewSourceDocument.cpp:
1842         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1843         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1844         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1845         (WebCore::HTMLViewSourceDocument::addLine):
1846         (WebCore::HTMLViewSourceDocument::addText):
1847         * html/HTMLViewSourceDocument.h:
1848
1849 2007-05-17  Justin Garcia  <justin.garcia@apple.com>
1850
1851         Reviewed by ggaren
1852
1853         <rdar://problem/5209984> REGRESSION: Crash on click after clearing Facebook status
1854         
1855         comparePositions() expects non-null positions.  It's 
1856         given a null position by contains() if the current 
1857         selection is a range selection but contains only invisible 
1858         content *and* visible positions cannot be created from its 
1859         end points.  This can happen when there is a range selection 
1860         inside shadow content (like that inside text fields) that 
1861         is made invisible.
1862
1863         * editing/SelectionController.cpp:
1864         (WebCore::SelectionController::contains): Check for
1865         invisible end points.
1866
1867 2007-05-17  Sam Weinig  <sam@webkit.org>
1868
1869         Reviewed by Adam.
1870
1871         Fix for <rdar://problem/5201423> REGRESSION: Links in 
1872         sidebar don't work on Honda website
1873
1874         Anchor elements need to have the same behavior for implicit and 
1875         explicit toString() calls.
1876
1877         Test: fast/dom/anchor-toString.html
1878
1879         * WebCore.xcodeproj/project.pbxproj:
1880         * bindings/js/JSHTMLAnchorElementCustom.cpp: Added.
1881         (WebCore::JSHTMLAnchorElement::toString):
1882         * html/HTMLAnchorElement.idl:
1883
1884 2007-05-17  Geoffrey Garen  <ggaren@apple.com>
1885         
1886         Build fix.
1887
1888 2007-05-17  Adele Peterson  <adele@apple.com>
1889
1890         Reviewed by Hyatt.
1891
1892         Update RenderMenuList PopupClient methods to consider style of inner block.
1893
1894         * rendering/RenderMenuList.cpp:
1895         (WebCore::RenderMenuList::itemStyle):
1896         (WebCore::RenderMenuList::clientStyle):
1897
1898 2007-05-17  Maciej Stachowiak  <mjs@apple.com>
1899
1900         Not reviewed, emergency test fix.
1901
1902         - avoid crash on layout tests.
1903         
1904         Patched up my last change so that  widgets don't crash.
1905
1906         * loader/FrameLoader.cpp:
1907         (WebCore::FrameLoader::mainReceivedCompleteError):
1908
1909 2007-05-17  Antti Koivisto  <antti@apple.com>
1910
1911         Reviewed by Darin.
1912
1913         Fix for http://bugs.webkit.org/show_bug.cgi?id=13727
1914         REGRESSION: Reproducible hang setting the selection's extent offset to -1
1915         <rdar://problem/5206890>
1916         
1917         Rise INDEX_SIZE_ERR if used selection index is negative. This matches HTML5 for
1918         getRangeAt() and collapse() which are part of the spec (FF throws NS_ERROR_FAILURE). 
1919         
1920         Not throwing exceptions yet for too high offsets (except getRangeAt()) as it is
1921         unclear if WebCore's definition of offsets is the same as other browsers.
1922
1923         * bindings/js/kjs_window.cpp:
1924         * WebCore/editing/SelectionController.cpp:
1925         * WebCore/editing/SelectionController.h:
1926         * WebCore/editing/VisiblePosition.cpp:
1927         
1928 2007-05-17  Adele Peterson  <adele@apple.com>
1929
1930         Reviewed by Mitz.
1931
1932         Fix for <rdar://problem/5096035> REGRESSION: rtl text should be left-aligned in <select>s
1933
1934         Test: fast/text/international/bidi-menulist.html
1935
1936         * rendering/RenderMenuList.cpp:
1937         (WebCore::RenderMenuList::adjustInnerStyle): Set the inner block style to direction: ltr, and text-align: left.  This means that
1938          we will ignore those settings in the button to match the way the text is displayed in the popup menu.
1939         (WebCore::RenderMenuList::createInnerBlock): Call adjustInnerStyle.
1940         (WebCore::RenderMenuList::setStyle): ditto.
1941         * rendering/RenderMenuList.h: Added adjustInnerStyle.
1942
1943 2007-05-17  Justin Garcia  <justin.garcia@apple.com>
1944
1945         Reviewed by harrison
1946
1947         <rdar://problem/4924441> List becomes nested when changing its type
1948         <rdar://problem/5210032> Content before a list is placed at the end of the list when its made into a list item
1949         <rdar://problem/5207369> Crash when removing ordering from a nested list
1950
1951         * editing/InsertListCommand.cpp:
1952         (WebCore::InsertListCommand::doApply):
1953         The outermostEnclosingList of the position before the start isn't
1954         the previousList if it contains the start.
1955         Ditto for the position after the end and the nextList.
1956         If we're putting the newly created list item into the next list,
1957         insert it at the start of that list, not the end (don't append).
1958         Avoid nesting newly created lists inside list items.
1959         
1960 2007-05-17  Patti Hoa  <patti@apple.com>
1961
1962         Reviewed by Darin.
1963         
1964         <rdar://problem/4775672> AXTextMarkerRangeForUnorderedTextMarkers returns incorrect order
1965         
1966         * bridge/mac/WebCoreAXObject.mm:
1967         (-[WebCoreAXObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
1968         A selection's m_start is not guranteed to equal m_base since m_start can actually be m_base's downstream().
1969         A more accurate way to determine the order from selection is to ask directly for isBaseFirst().
1970         In addition, if the two visible positions given are the same position but different affinity, we need to 
1971         handle it here rather than depend on the selection. This is because selection does not retain the
1972         affinity of both selection start/end visible positions as part of the selection validation. 
1973
1974 2007-05-17  Mitz Pettel  <mitz@webkit.org>
1975
1976         Reviewed by Brady
1977
1978         - fix http://bugs.webkit.org/show_bug.cgi?id=13759
1979           REGRESSION (r20182-r20184): Incorrect rendering of multipart images
1980
1981         Test: http/tests/multipart/invalid-image-data.html
1982
1983         * loader/loader.cpp:
1984         (WebCore::Loader::didReceiveData): Make a copy of the current part's data
1985         instead of using the resource data, because the latter is going to be
1986         overwritten by the new part being received.
1987
1988 2007-05-17  Oliver Hunt  <oliver@apple.com>
1989
1990         Reviewed by Justin.
1991
1992         Fix for <rdar://problem/4244861> Safari fails to create image file
1993         after releasing dragged image that has changed on source page
1994
1995         Tell xcode to copy HTMLImageElement.h and HTMLImageLoader.h headers
1996         across to WebKit as private headers.
1997
1998         * WebCore.xcodeproj/project.pbxproj:
1999
2000 2007-05-17  Justin Garcia  <justin.garcia@apple.com>
2001
2002         Reviewed by harrison
2003
2004         <rdar://problem/5190926> 
2005         Gmail Editor: Crash when removing list style from underlined, multi-item list
2006         
2007         The user underlined some text, then created a list.
2008         The list was placed inside the inline element carrying 
2009         the underline style, so, that element surrounded the 
2010         list instead of being at the lowest level (just above 
2011         text nodes). This kind of markup is more difficult to 
2012         edit. Filed 5192089 and added a workaround so that we 
2013         don't produce this kind of markup.
2014
2015         * editing/InsertListCommand.cpp:
2016         (WebCore::InsertListCommand::doApply): Avoid inline
2017         elements when inserting the new list.
2018
2019 2007-05-17  David Hyatt  <hyatt@apple.com>
2020
2021         Allow redundant attributes with the same name in view source mode.
2022
2023         Reviewed by aroben
2024
2025         * dom/NamedAttrMap.h:
2026         (WebCore::NamedAttrMap::insertAttribute):
2027         * html/HTMLTokenizer.cpp:
2028         (WebCore::Token::addAttribute):
2029
2030 2007-05-17  George Staikos  <staikos@kde.org>
2031
2032         - Back out last patch based on discussion with Zack.
2033
2034         * platform/qt/WidgetQt.cpp:
2035         (WebCore::Widget::paint):
2036
2037 2007-05-16  Anders Carlsson  <andersca@apple.com>
2038
2039         Reviewed by Darin.
2040
2041         <rdar://problem/5207156> Hamachi test tool causes assertion in FormCompletionController in Safari
2042
2043         This happens because the form delegate gets passed the wrong source frame during the second submit().
2044         If a frame with the given name is found, FrameLoader::load is called with the same parameters on the found frame.
2045         This causes the found frame to be used as the source frame, which is wrong.
2046         
2047         The fix is to create the form state object before checking what frame to load the new request in. 
2048         
2049         * WebCore.exp:
2050         * loader/FrameLoader.cpp:
2051         (WebCore::FrameLoader::load):
2052         (WebCore::FrameLoader::checkNavigationPolicy):
2053         (WebCore::FrameLoader::continueAfterNavigationPolicy):
2054         * loader/FrameLoader.h:
2055         * manual-tests/submit-form-with-target-twice.html: Added.
2056
2057 2007-05-16  Maciej Stachowiak  <mjs@apple.com>
2058
2059         Reviewed by Oliver.
2060
2061         <rdar://problem/5205914> REGRESSION: PLT stops after loading first page due to r21479
2062         
2063         * loader/FrameLoader.cpp:
2064         (WebCore::FrameLoader::frameHasLoaded):
2065
2066 2007-05-16  David Hyatt  <hyatt@apple.com>
2067
2068         Improve the syntax-highlighted view source mode.  It now preserves all whitespace properly
2069         and highlights doctypes and comments (in addition to all the stuff it could highlight before).
2070
2071         Reviewed by aroben
2072
2073         * html/HTMLTokenizer.cpp:
2074         (WebCore::Token::addAttribute):
2075         (WebCore::HTMLTokenizer::parseTag):
2076         * html/HTMLTokenizer.h:
2077         (WebCore::Token::Token):
2078         (WebCore::Token::~Token):
2079         (WebCore::Token::reset):
2080         (WebCore::Token::addViewSourceChar):
2081         * html/HTMLViewSourceDocument.cpp:
2082         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2083         * html/HTMLViewSourceDocument.h:
2084
2085 2007-05-16  Maciej Stachowiak  <mjs@apple.com>
2086
2087         Reviewed by Adam.
2088
2089         <rdar://problem/5191024> Page never loads completely (emonome.vodpod.com)
2090         <rdar://problem/5205162> REGRESSION (r21367): In the Address URL field, typing a site name doesn't redirect to site after pressing return
2091         http://bugs.webkit.org/show_bug.cgi?id=13683
2092         <rdar://problem/5208951> REGRESSION: Progress bar never completes on link click that downloads (13694)
2093         http://bugs.webkit.org/show_bug.cgi?id=13694
2094         <rdar://problem/5201598> REGRESSION: After uploading file to iDisk at mac.com, "loading" status remains and file does not appear in the list
2095         
2096         * loader/FrameLoader.cpp:
2097         (WebCore::FrameLoader::mainReceivedCompleteError): Make sure to always check whether the overall
2098         load completed, even if we think the current frame load is already complete.
2099
2100 2007-05-16  Beth Dakin  <bdakin@apple.com>
2101
2102         Reviewed by Hyatt.
2103
2104         Fix for <rdar://problem/5204107> REGRESSION: CSS web forum site 
2105         layout not displaying properly in latest WebKit
2106
2107         Hyatt's http://trac.webkit.org/projects/webkit/changeset/21428 
2108         exposed this bug. We were not handling error cases with <caption> 
2109         correctly. This patch makes them do the same thing as colgroup.
2110
2111         * html/HTMLParser.cpp:
2112         (WebCore::HTMLParser::handleError):
2113         * html/HTMLParserErrorCodes.cpp: No need any more for caption-
2114         specific errors.
2115         (WebCore::htmlParserErrorMessageTemplate):
2116         * html/HTMLParserErrorCodes.h:
2117         (WebCore::):
2118
2119 2007-05-16  Kevin McCullough  <kmccullough@apple.com>
2120
2121         Reviewed by Darin and Geoff.
2122
2123         - rdar://problem/4981886
2124         - Now windows opened by the DOM can be closed by JS.
2125
2126         * bindings/js/kjs_window.cpp:
2127         (KJS::createNewWindow):
2128         (KJS::WindowFunc::callAsFunction):
2129         * loader/FrameLoader.cpp:
2130         (WebCore::FrameLoader::FrameLoader):
2131         (WebCore::FrameLoader::openedByDOM):
2132         (WebCore::FrameLoader::setOpenedByDOM):
2133         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
2134         * loader/FrameLoader.h:
2135
2136 2007-05-16  Darin Adler  <darin@apple.com>
2137
2138         Reviewed by Hyatt.
2139
2140         - fix <rdar://problem/4928671> Crash due to runaway recursion when fieldset has display: table-row (12066)
2141
2142         Test: fast/css/fieldset-display-row.html
2143
2144         * rendering/RenderContainer.cpp: (WebCore::RenderContainer::addChild):
2145         Change all decision making about special handling for new children to use
2146         the class of the render object instead of the style, except for the cases
2147         where the style is the only way to tell (TABLE_COLUMN_GROUP and TABLE_CAPTION).
2148         Thus a RenderFieldset with table-row style won't get handled as if it was
2149         a table row.
2150
2151         * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): Same thing.
2152         Except that here the styles that we ahave to look at are TABLE_CAPTION,
2153         TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, and TABLE_ROW_GROUP.
2154
2155 2007-05-16  Zack Rusin  <zrusin@trolltech.com>
2156
2157         Reviewed by Lars.
2158
2159         Implement bigger parts of the Canvas element in the
2160         Qt port. Gradients and patterns are missing.
2161
2162         * WebCore/html/CanvasRenderingContext2D.cpp:
2163         * WebCore/html/CanvasStyle.cpp:
2164         * WebCore/html/HTMLCanvasElement.cpp:
2165         * WebCore/html/HTMLCanvasElement:
2166
2167 2007-05-16  Zack Rusin  <zrusin@trolltech.com>
2168
2169         Reviewed by Lars
2170
2171         Fix shared timers, make them use miliseconds. Based
2172         on a patch from George.
2173
2174         * WebCore/platform/qt/SharedTimerQt.cpp:
2175        (WebCore::setSharedTimerFireTime):
2176
2177 2007-05-16  David Hyatt  <hyatt@apple.com>
2178
2179         Add rudimentary error reporting to the HTML parser.  This is disabled
2180         for now until it gets beefed up a bit more (and until we work out how
2181         best to pass the messages up without hurting perf).
2182
2183         Clean up and remove dead error handling code and incorrect error handling
2184         code as well.
2185
2186         Reviewed by mjs
2187
2188         * WebCore.xcodeproj/project.pbxproj:
2189         * html/HTMLParser.cpp:
2190         (WebCore::HTMLParser::HTMLParser):
2191         (WebCore::HTMLParser::handleError):
2192         (WebCore::HTMLParser::headCreateErrorCheck):
2193         (WebCore::HTMLParser::reportErrorToConsole):
2194         * html/HTMLParser.h:
2195         (WebCore::HTMLParser::reportError):
2196         * html/HTMLParserErrorCodes.cpp: Added.
2197         (WebCore::htmlParserErrorMessageTemplate):
2198         * html/HTMLParserErrorCodes.h: Added.
2199         (WebCore::):
2200         * html/HTMLTokenizer.h:
2201         (WebCore::HTMLTokenizer::tagStartLineNumber):
2202
2203 2007-05-15  David Hyatt  <hyatt@apple.com>
2204
2205         Make FrameLoader write "<html><body>" instead of just "<body>".
2206
2207         Reviewed by aroben
2208
2209         * loader/FrameLoader.cpp:
2210         (WebCore::FrameLoader::init):
2211
2212 2007-05-15  George Staikos  <staikos@kde.org>
2213
2214         Reviewed by Adam Roben.
2215
2216         - Pass cookies through from the loader.
2217
2218         * platform/network/qt/ResourceHandleManagerQt.cpp:
2219         (WebCore::ResourceHandleManager::receivedResponse):
2220
2221 2007-05-15  Adam Treat  <adam@staikos.net>
2222
2223         Reviewed by George Staikos.
2224
2225         - Implement drawArc with proper units.
2226
2227         * platform/graphics/qt/GraphicsContextQt.cpp:
2228         (WebCore::GraphicsContext::strokeArc):
2229
2230 2007-05-15  Adam Treat  <adam@staikos.net>
2231
2232         Reviewed by George Staikos.
2233
2234         - Add missing paint for nested subframes.
2235
2236         * platform/qt/WidgetQt.cpp:
2237         (WebCore::Widget::paint):
2238
2239 2007-05-15  Sam Weinig  <sam@webkit.org>
2240
2241         Reviewed by Oliver.
2242
2243         - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2244           Finish testing and fixing the setting of DOM attributes to JS null
2245
2246           Convert JS null to null string for SVG attributes.
2247
2248         Test: fast/dom/svg-element-attribute-js-null.xhtml
2249
2250         * ksvg2/svg/SVGAngle.idl:
2251         * ksvg2/svg/SVGElement.idl:
2252         * ksvg2/svg/SVGLength.idl:
2253         * ksvg2/svg/SVGScriptElement.idl:
2254
2255 2007-05-15  Sam Weinig  <sam@webkit.org>
2256
2257         Reviewed by Oliver.
2258
2259         - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2260           Finish testing and fixing the setting of DOM attributes to JS null
2261
2262           Convert JS null to null string for CanvasRenderingContext2D attributes.
2263
2264         Test: fast/dom/canvasContext2d-element-attribute-js-null.html
2265
2266         * html/CanvasRenderingContext2D.idl:
2267
2268 2007-05-15  Oliver Hunt  <oliver@apple.com>
2269
2270         Reviewed by Sam and Geoff.
2271
2272         Removing dead code left behind from drag and drop refactoring.
2273
2274         * page/mac/WebCoreFrameBridge.h:
2275
2276 2007-05-15  Sam Weinig  <sam@webkit.org>
2277
2278         Reviewed by Oliver.
2279
2280         - Second Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2281           Finish testing and fixing the setting of DOM attributes to JS null
2282
2283           Convert JS null to null string for remaining CSSOM attributes.
2284
2285         Test: fast/dom/css-element-attribute-js-null.html
2286
2287         * bindings/js/kjs_css.cpp:
2288         (KJS::DOMCSSStyleDeclaration::put):
2289         (KJS::DOMMediaList::put):
2290         (KJS::DOMCSSRule::putValueProperty):
2291         (KJS::DOMCSSValue::put):
2292         * css/CSSPageRule.idl:
2293         * css/CSSRule.idl:
2294         * css/CSSStyleDeclaration.idl:
2295         * css/CSSStyleRule.idl:
2296         * css/CSSValue.idl:
2297         * css/MediaList.idl:
2298
2299 2007-05-15  Darin Adler  <darin@apple.com>
2300
2301         Reviewed by Hyatt.
2302
2303         * css/html4.css: Remove wbr style rule -- not needed any more.
2304
2305 2007-05-15  Mitz Pettel  <mitz@webkit.org>
2306
2307         Reviewed by Brady
2308
2309         - fix http://bugs.webkit.org/show_bug.cgi?id=13360
2310           REGRESSION: Crash closing live web cam viewer page
2311
2312         Test: http/tests/misc/multipart.html
2313
2314         * loader/ResourceLoader.cpp:
2315         (WebCore::ResourceLoader::didFail): Avoid calling didFailToLoad() if
2316         didFinishLoad() has already been called (when the first part of a
2317         multipart resource arrived).
2318         (WebCore::ResourceLoader::didCancel): Ditto.
2319
2320 2007-05-15  Sam Weinig  <sam@webkit.org>
2321
2322         Reviewed by Darin.
2323
2324         - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2325           Finish testing and fixing the setting of DOM attributes to JS null
2326
2327           Convert JS null to null string for remaining Core DOM attributes.
2328
2329         Test: fast/dom/coreDOM-element-attribute-js-null.xhtml
2330
2331         * dom/Attr.cpp:
2332         (WebCore::Attr::setValue): Don't throw an expection for null values as this
2333         is not in the spec and Firefox does not do it either.
2334         * dom/Attr.idl:
2335         * dom/CharacterData.idl:
2336         * dom/ProcessingInstruction.idl:
2337
2338 2007-05-15  Mitz Pettel  <mitz@webkit.org>
2339
2340         Reviewed by Hyatt.
2341
2342         - fix http://bugs.webkit.org/show_bug.cgi?id=13718
2343           REGRESSION (r21093): editing/execCommand/5136770.html failing pixel test
2344
2345         * rendering/RenderContainer.cpp:
2346         (WebCore::RenderContainer::removeChildNode): Moved the code that clears the
2347         selection when moving a selection border into the fast path.
2348
2349 2007-05-15  Rob Buis  <buis@kde.org>
2350
2351         Reviewed by Hyatt.
2352
2353         http://bugs.webkit.org/show_bug.cgi?id=6487
2354         "Make Text Bigger/Smaller" affects SVGs when it probably shouldn't
2355
2356         Ignore Make Text Bigger/Smaller for SVG text.
2357
2358         * css/svg.css:
2359
2360 2007-05-15  Anders Carlsson  <andersca@apple.com>
2361
2362         Reviewed by Maciej.
2363
2364         <rdar://problem/5183685>
2365         http://bugs.webkit.org/show_bug.cgi?id=13301
2366         ASSERT or null value when trying to use a getter defined on a window object
2367
2368         Handle the case where the value returned is a getter/setter object.
2369         
2370         * bindings/js/kjs_window.cpp:
2371         (KJS::Window::getOverridePropertySlot):
2372
2373 2007-05-14  Anders Carlsson  <andersca@apple.com>
2374
2375         Reviewed by Geoff.
2376
2377         <rdar://problem/5200816>
2378         REGRESSION: With Shiira 1.2.2 , I can't open embedded link in flash object by clicking (http:/www.adobe.com )
2379         
2380         Shiira under some circumstances passes nil as the request to -[WebFrame loadRequest:]. ToT WebKit doesn't call any policy
2381         delegate methods in this case, which means that the page is actually being loaded. 
2382         
2383         This patch makes ToT WebKit behave in the same way as Tiger WebKit when the request is nil.
2384         
2385         * loader/FrameLoader.cpp:
2386         (WebCore::FrameLoader::checkNavigationPolicy):
2387         Don't continue without calling the navigation policy method if the request is null.
2388         
2389         (WebCore::FrameLoader::continueAfterNavigationPolicy):
2390         If the request can't be handled, don't continue the load.
2391         
2392         * platform/network/mac/ResourceRequestMac.mm:
2393         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2394         Don't create an NSURLRequest object if the request is null.
2395
2396 2007-05-15  Maciej Stachowiak  <mjs@apple.com>
2397
2398         Reviewed by Hyatt and Lars.
2399
2400         - fixed <rdar://problem/5201758> REGRESSION: Stop button enabled and other problems caused by [WebView currentURL] returning non-nil for empty window
2401
2402         * WebCore.exp: export new symbol
2403         * loader/FrameLoader.cpp:
2404         (WebCore::FrameLoader::begin): move marker that we committed a real doc load from here...
2405         (WebCore::FrameLoader::transitionToCommitted): ...to here
2406         (WebCore::FrameLoader::frameHasLoaded): check that we have at least started loading something
2407         besides the initial empty doc.
2408         * loader/FrameLoader.h:
2409
2410 2007-05-14  Justin Garcia  <justin.garcia@apple.com>
2411
2412         Reviewed by ggaren
2413         
2414         <http://bugs.webkit.org/show_bug.cgi?id=13716>
2415         REGRESSION: Three new layout test failures
2416         
2417         Two failures are correct.  Updated their expected results.
2418         
2419         In fast/events/frame-tab-focus.html, as we advance
2420         through focusable nodes, we descend into a subframe
2421         to focus a node and then ascend out of it into the
2422         main frame to focus the next.  When we focus the main 
2423         frame, the node in that frame that was previously 
2424         focused and contains an inactive selection is focused 
2425         momentarily because setCaretVisible tries to focus the 
2426         node containing the caret.
2427
2428         * page/Frame.cpp:
2429         (WebCore::Frame::setCaretVisible): Don't focus the
2430         node containing the caret. FocusController will focus
2431         the previously focused node (which will contain the
2432         caret) if necessary when the frame gains focus.
2433         
2434 2007-05-14  Maciej Stachowiak  <mjs@apple.com>
2435
2436         Reviewed by Brady.
2437
2438         - fixed <rdar://problem/5203036> REGRESSION: Assertion failure in WebCore::FrameLoader::restoreScrollPositionAndViewState() going back from fark.com Photoshop contest (13684)
2439
2440         Test: http/tests/navigation/back-to-slow-frame.html
2441         
2442         * loader/FrameLoader.cpp:
2443         (WebCore::FrameLoader::restoreScrollPositionAndViewState): Add needed early return.
2444
2445 2007-05-14  Mitz Pettel  <mitz@webkit.org>
2446
2447         Reviewed by Dave Hyatt.
2448
2449         - fix http://bugs.webkit.org/show_bug.cgi?id=13603
2450           style leaks in washingtonpost.com
2451           also known as http://bugs.webkit.org/show_bug.cgi?id=8750
2452           w3c.org: incorrect recovery from unclosed <a> elements
2453           also known as http://bugs.webkit.org/show_bug.cgi?id=12808
2454           Handling of misnested tags results in entire page appearing as link
2455           also known as http://bugs.webkit.org/show_bug.cgi?id=12861
2456           Post text renders as link
2457
2458         Test: fast/parser/residual-style-close-across-n-blocks.html
2459
2460         * html/HTMLParser.cpp:
2461         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Changed to
2462         deal with multiple block crossings instead of bailing out, by doing multiple
2463         reparenting passes, starting from the outermost block.
2464
2465 2007-05-14  Mitz Pettel  <mitz@webkit.org>
2466
2467         Reviewed by Darin.
2468
2469         - fix http://bugs.webkit.org/show_bug.cgi?id=13711
2470           REGRESSION - Bookmark Bar text rendering changed
2471
2472         No test possible since this patch affects only Safari chrome.
2473
2474         * platform/Font.cpp:
2475         (WebCore::Font::Font): Initialize m_isPlatformFont according to whether
2476         the Font object is derived from a FontPlatformData or not.
2477         * platform/Font.h:
2478         (WebCore::Font::isPlatformFont): Added. Returns whether this Font was
2479         derived from a platform font.
2480         * platform/mac/FontCacheMac.mm:
2481         (WebCore::FontCache::getFontDataForCharacters): Changed to not enable
2482         synthetic bold and italic in the fallback fonts if the original font
2483         was derived from a platform font.
2484
2485 2007-05-14  Sam Weinig  <sam@webkit.org>
2486
2487         Reviewed by Alice!
2488
2489         - Patch for http://bugs.webkit.org/show_bug.cgi?id=13541
2490           REGRESSION: Setting a DOMString attribute to JS null in the 
2491           JS bindings should default to converting to the empty string
2492
2493           Convert JS null to the empty string when passing it to an attribute that takes
2494           a DOMString.
2495
2496         Test: fast/dom/document-attribute-js-null.html
2497         Test: fast/dom/element-attribute-js-null.html
2498
2499         * bindings/js/kjs_dom.cpp:
2500         (KJS::DOMNode::putValueProperty):
2501         * bindings/js/kjs_html.cpp:
2502         (KJS::JSHTMLDocument::putValueProperty):
2503         (KJS::JSHTMLElement::objectSetter):
2504         (KJS::JSHTMLElement::embedSetter):
2505         (KJS::JSHTMLElement::tableSetter):
2506         (KJS::JSHTMLElement::tableCaptionSetter):
2507         (KJS::JSHTMLElement::tableColSetter):
2508         (KJS::JSHTMLElement::tableSectionSetter):
2509         (KJS::JSHTMLElement::tableRowSetter):
2510         (KJS::JSHTMLElement::tableCellSetter):
2511         (KJS::JSHTMLElement::frameSetSetter):
2512         (KJS::JSHTMLElement::frameSetter):
2513         (KJS::JSHTMLElement::iFrameSetter):
2514         (KJS::JSHTMLElement::marqueeSetter):
2515         (KJS::JSHTMLElement::putValueProperty):
2516         * bindings/js/kjs_html.h:
2517         * dom/Document.idl:
2518         * dom/Node.idl:
2519         * html/HTMLAnchorElement.idl:
2520         * html/HTMLAppletElement.idl:
2521         * html/HTMLAreaElement.idl:
2522         * html/HTMLBRElement.idl:
2523         * html/HTMLBaseElement.idl:
2524         * html/HTMLBaseFontElement.idl:
2525         * html/HTMLBlockquoteElement.idl:
2526         * html/HTMLBodyElement.idl:
2527         * html/HTMLButtonElement.idl:
2528         * html/HTMLDivElement.idl:
2529         * html/HTMLDocument.idl:
2530         * html/HTMLElement.idl:
2531         * html/HTMLEmbedElement.idl:
2532         * html/HTMLFontElement.idl:
2533         * html/HTMLFormElement.idl:
2534         * html/HTMLFrameElement.idl:
2535         * html/HTMLFrameSetElement.idl:
2536         * html/HTMLHRElement.idl:
2537         * html/HTMLHeadElement.idl:
2538         * html/HTMLHeadingElement.idl:
2539         * html/HTMLHtmlElement.idl:
2540         * html/HTMLIFrameElement.idl:
2541         * html/HTMLImageElement.idl:
2542         * html/HTMLInputElement.idl:
2543         * html/HTMLIsIndexElement.idl:
2544         * html/HTMLLIElement.idl:
2545         * html/HTMLLabelElement.idl:
2546         * html/HTMLLegendElement.idl:
2547         * html/HTMLLinkElement.idl:
2548         * html/HTMLMapElement.idl:
2549         * html/HTMLMetaElement.idl:
2550         * html/HTMLModElement.idl:
2551         * html/HTMLOListElement.idl:
2552         * html/HTMLObjectElement.idl:
2553         * html/HTMLOptGroupElement.idl:
2554         * html/HTMLOptionElement.idl:
2555         * html/HTMLParagraphElement.idl:
2556         * html/HTMLParamElement.idl:
2557         * html/HTMLQuoteElement.idl:
2558         * html/HTMLScriptElement.idl:
2559         * html/HTMLSelectElement.idl:
2560         * html/HTMLStyleElement.idl:
2561         * html/HTMLTableCaptionElement.idl:
2562         * html/HTMLTableCellElement.idl:
2563         * html/HTMLTableColElement.idl:
2564         * html/HTMLTableElement.idl:
2565         * html/HTMLTableRowElement.idl:
2566         * html/HTMLTableSectionElement.idl:
2567         * html/HTMLTextAreaElement.idl:
2568         * html/HTMLTitleElement.idl:
2569         * html/HTMLUListElement.idl:
2570
2571 2007-05-14  Geoffrey Garen  <ggaren@apple.com>
2572
2573         Trying to fix the Qt build.
2574
2575         * WebCore.pro:
2576
2577 2007-05-14  Geoffrey Garen  <ggaren@apple.com>
2578
2579         Reviewed by Oliver Hunt.
2580         
2581         Some improvements on my last patch, suggested by Darin.
2582
2583         * history/PageCache.cpp:
2584         (WebCore::PageCache::autoreleaseNow): Swap with an empty set instead of 
2585         building up an array and then calling clear(). This is slightly more 
2586         efficient and the code is cleaner.
2587
2588 2007-05-14  Justin Garcia  <justin.garcia@apple.com>
2589
2590         Reviewed by darin
2591         
2592         <rdar://problem/5136696> Selection is removed when focusing a node in another frame
2593         <rdar://problem/5192388> WordPress: Can't insert links/images
2594         
2595         Don't clear a selection when changing focus if the new
2596         focus node is in a different frame than the old selection.
2597
2598         * dom/Document.cpp:
2599         (WebCore::Document::setFocusedNode): Moved code to clear 
2600         selections to the FocusController, since it is Page level 
2601         and will know about the frame/document that contained the 
2602         old selection. Moved code to call shouldEndEditing to the 
2603         FocusController because selections are now cleared before
2604         calling Document::setFocusedNode and shouldEndEditing must
2605         be called before selections are cleared.
2606         * dom/Element.cpp:
2607         (WebCore::Element::blur): Call FocusController::setFocusNode
2608         instead of Document::setFocusNode, if possible.
2609         * page/EventHandler.cpp:
2610         (WebCore::EventHandler::dispatchMouseEvent): Ditto.
2611         * page/FocusController.cpp:
2612         (WebCore::relinquishesEditingFocus): Moved from Document.cpp.
2613         (WebCore::clearSelectionIfNeeded): Ditto.  Don't clear if
2614         the old selection is in a frame that's different than the 
2615         one that contains the new focus node.
2616         (WebCore::FocusController::setFocusedNode): Moved code
2617         here from Document::setFocusedNode.
2618         * page/Frame.cpp:
2619         (WebCore::Frame::setFocusedNodeIfNeeded): Call
2620         FocusController::setFocusNode.
2621
2622 2007-05-14  Geoffrey Garen  <ggaren@apple.com>
2623
2624         Reviewed by Darin Adler.
2625         
2626         Next step toward fixing <rdar://problem/5055182> The back cache has no 
2627         global cap.
2628         
2629         Created a PageCache singleton. Right now, it only handles the timer-based
2630         deallocation of cached pages. I plan to add HistoryItem->CachedPage tracking
2631         and eviction logic in later patches.
2632
2633         Updated for renames and file changes:
2634
2635         * WebCore.exp:
2636         * WebCore.xcodeproj/project.pbxproj:
2637         * history/BackForwardList.cpp:
2638         (WebCore::BackForwardList::setPageCacheSize):
2639         (WebCore::BackForwardList::clearPageCache):
2640
2641         Removed global timed release code, moved into new PageCache class, since
2642         it's eventually going to be in charge of deciding when things are released:
2643         
2644         * history/HistoryItem.cpp:
2645         (WebCore::HistoryItem::setCachedPage):
2646         * history/HistoryItem.h:
2647
2648         Folded into PageCache:
2649         
2650         * history/HistoryItemTimer.cpp: Removed.
2651         * history/HistoryItemTimer.h: Removed.
2652
2653         New singleton. Right now, it just handles timed release of cached pages:
2654         
2655         * history/PageCache.cpp: Added.
2656         (WebCore::pageCache):
2657         (WebCore::PageCache::PageCache):
2658         (WebCore::PageCache::autoreleaseNowOrReschedule):
2659         (WebCore::PageCache::autoreleaseNow):
2660         (WebCore::PageCache::autorelease):
2661         * history/PageCache.h: Added.
2662
2663 2007-05-14  Adele Peterson  <adele@apple.com>
2664
2665         Reviewed by Darin.
2666
2667         Fix for <rdar://problem/5200081> Repro crash in PopupMenu::show clicking popup menu button after reload
2668
2669         * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenu::show): Added call to dismissPopup so the cell gets unattached properly.
2670
2671 2007-05-14  Adele Peterson  <adele@apple.com>
2672
2673         Reviewed by Darin.
2674
2675         Remove incorrect assertion.
2676
2677         * page/FrameView.cpp: (WebCore::FrameView::setContentsPos):
2678
2679 2007-05-14  Anders Carlsson  <andersca@apple.com>
2680
2681         Reviewed by Geoff.
2682
2683         <rdar://problem/5172056> Regression: cannot open txt file, get broken image
2684
2685         Never let plug-ins override text/plain.
2686         
2687         * dom/DOMImplementation.cpp:
2688         (WebCore::DOMImplementation::createDocument):
2689
2690 2007-05-14  Zack Rusin  <zrusin@trolltech.com>
2691
2692         Reviewed by Simon.
2693
2694         Do some magic to get better dependency tracking for header
2695         files in the qmake project files.
2696
2697         * ChangeLog:
2698
2699 2007-05-14  Lars Knoll <lars@trolltech.com>
2700
2701         Reviewed by Zack
2702
2703         Required updates after Maciej's frame change.
2704
2705         * loader/FrameLoader.cpp:
2706         (WebCore::FrameLoader::mainReceivedCompleteError):
2707               Call checkLoadCompleted() at the end of the method. Without it
2708               we never get the loadDone() signal on the Qt port.
2709         * platform/network/qt/ResourceHandleManagerQt.cpp:
2710         (WebCore::ResourceHandleManager::receivedFinished):
2711               Don't pass a null error to didFail().
2712
2713 2007-05-14  Darin Adler  <darin@apple.com>
2714
2715         Reviewed by Antti.
2716
2717         - fix <rdar://problem/3109180> VIP: after go back, page jumps after loading even if I scrolled while loading
2718
2719         * history/CachedPage.cpp: (WebCore::CachedPage::clear): Call clearFrame rather than
2720         clearPart -- the "part" term was leftover prehistoric terminology.
2721
2722         * loader/FrameLoader.cpp:
2723         (WebCore::FrameLoader::open): Call setWasScrolledByUser(false) on the page, so that we
2724         can detect any user scrolling that happens during the "go back" process.
2725         (WebCore::FrameLoader::restoreScrollPositionAndViewState): Don't scroll if the view's
2726         wasScrolledByUser flag is set.
2727         (WebCore::FrameLoader::loadItem): Call setWasScrolledByUser(false) false when we do
2728         a new "load" (actually just a scroll) using the same frame. Also moved the line of code that
2729         sets m_currentHistoryItem to make this code path mroe similar to recursiveGoToItem.
2730         (WebCore::FrameLoader::recursiveGoToItem): Ditto.
2731
2732         * page/Frame.cpp:
2733         (WebCore::Frame::~Frame): Call clearFrame rather than stting m_frame directly.
2734         (WebCore::Frame::sendScrollEvent): Call setWasScrolledByUser(true) on FrameView. The FrameView
2735         itself knows to ignore this if the scrolling is being done programmatically instead of by the user.
2736
2737         * page/FrameView.h: Added wasScrolledByUser and setWasScrolledByUser. Also removed unneeded
2738         include and class forward declarations, renamed clearPart to clearFrame, removed uneeded function
2739         haveDelayedLayoutScheduled, and removed unneeded friend declarations.
2740         * page/FrameView.cpp:
2741         (WebCore::FrameViewPrivate::FrameViewPrivate): Added m_inProgrammaticScroll and m_wasScrolledByUser.
2742         (WebCore::FrameViewPrivate::reset): Set m_wasScrolledByUser to false.
2743         (WebCore::FrameView::clearFrame): Renamed from clearPart.
2744         (WebCore::FrameView::scrollRectIntoViewRecursively): Added code to set the m_inProgrammaticScroll flag.
2745         (WebCore::FrameView::setContentsPos): Ditto.
2746         (WebCore::FrameView::wasScrolledByUser): Added.
2747         (WebCore::FrameView::setWasScrolledByUser): Added. Does nothing if called when m_inProgrammaticScroll
2748         is true.
2749
2750 2007-05-14  Darin Adler  <darin@apple.com>
2751
2752         Reviewed by Antti.
2753
2754         - <rdar://problem/4865655> REGRESSION: find function does not work for the character ß
2755
2756         The trick was to fold case consistently in the CircularSearchBuffer class.
2757
2758         The problem was that we were folding the search target string with full case folding and
2759         the characters of the text we were searching with simple case folding. We now use full
2760         case folding in both cases.
2761
2762         * editing/TextIterator.cpp:
2763         (WebCore::CircularSearchBuffer::CircularSearchBuffer): Changed the buffer to be a
2764         Vector<UChar>. Added a Vector<bool> to record which characters were starts of characters
2765         in the text we are searching. Changed the cursor to be an int rather than a pointer.
2766         (WebCore::CircularSearchBuffer::append): New function that knows how to append multiple
2767         characters when folding case turns one character into many -- uses the full foldCase
2768         rather than the simplified single-character foldCase. Also removed the append function
2769         that did multiple characters at once; that was part of an optimization we don't need.
2770         (WebCore::CircularSearchBuffer::isMatch): Instead of asserting that the buffer is full,
2771         changed this to return false if it's not full, which lets us fill up the buffer with
2772         the normal loop. Also return false if the start of the buffer is half-way through a
2773         case-folded character and updated this since m_cursor is now an integer.
2774         (WebCore::CircularSearchBuffer::length): This returns the length in non-case-folded
2775         characters of the characters that were appended, which may not be the same as the length
2776         of the original target string. To do that we have to total up the character start
2777         booleans for the current state of the circular buffer.
2778         (WebCore::findPlainText): Streamlined the logic in a few ways: 1) Moved more of the
2779         return value setup to the top of the function so it could be shared with the early
2780         error exit. 2) Removed the separate "fill the buffer" logic, which allowed me to
2781         remove some of the functions from CircularSearchBuffer and eliminated the need for
2782         two nested loops. 3) Replaced the CharacterIterator and bool that were used to record
2783         the location we found with integers matchStart and matchLength. 4) Got rid of the use
2784         of goto since we don't have two nested loops any more.
2785
2786 2007-05-14  Andrew Wellington  <proton@wiretapped.net>
2787
2788         Reviewed by Darin.
2789
2790         Fix http://bugs.webkit.org/show_bug.cgi?id=13275
2791         Safari crashed when trying to login using the windows live contact control
2792
2793         Check for cleared windowObj in JSAbstractEventListener::handleEvent
2794
2795         * bindings/js/kjs_events.cpp:
2796         (KJS::JSAbstractEventListener::handleEvent):
2797
2798 2007-05-13  Alexey Proskuryakov  <ap@webkit.org>
2799
2800         Reviewed by Darin.
2801
2802         http://bugs.webkit.org/show_bug.cgi?id=13690
2803         JavaScript Form Validation issue on Banco do Brasil site
2804
2805         Test: fast/forms/input-setvalue-selection.html
2806
2807         * html/HTMLInputElement.cpp:
2808         (WebCore::HTMLInputElement::setValue): In other browsers, changing textInput.value
2809         always moves the insertion point past the text. In 10.4.9 WebKit, this only worked
2810         for inactive controls, and it never worked in ToT.
2811
2812 2007-05-13  Brady Eidson  <beidson@apple.com>
2813
2814         Reviewed by Mitz
2815
2816         http://bugs.webkit.org/show_bug.cgi?id=13701
2817
2818         Since HTMLInputElements register themselves with their Document for special handling, if their document
2819         ever changes then bad things can happen.
2820
2821         Unfortunately, with adoptNode, the document can change.  This has been a long standing crasher with all 
2822         input fields but was given recent high visibility by r21430
2823
2824         The solution is to add functionality for a Node to react to its owner document changing via a pair of 
2825         virtual callbacks.  Then we can tap into those callbacks in HTMLInputElement.
2826
2827         No layout test possible until http://bugs.webkit.org/show_bug.cgi?id=13672 is resolved
2828
2829         * dom/Node.cpp:
2830         (WebCore::Node::setDocument): Call willMoveToNewOwnerDocument and didMoveToNewOwnerDocument
2831
2832         * dom/Node.h:
2833         (WebCore::Node::willMoveToNewOwnerDocument): Virtual callback to a node for before an owner document change
2834         (WebCore::Node::didMoveToNewOwnerDocument): Virtual callback to a node for after an owner document change
2835
2836         * html/HTMLInputElement.cpp:
2837         (WebCore::HTMLInputElement::~HTMLInputElement): Unconditionally unregister both for both form state
2838           and the cache restoration callback
2839         (WebCore::HTMLInputElement::setInputType): Change registration with the document only if we're in one
2840         (WebCore::HTMLInputElement::attach): Don't bother registering for the callback here - that will be
2841           handled by setInputType() or by a change in owner document
2842         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument): Unregister with the old owner document
2843         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument): Register with the new owner document
2844         * html/HTMLInputElement.h:
2845
2846 2007-05-13  Darin Adler  <darin@apple.com>
2847
2848         * platform/mac/TextBreakIteratorInternalICUMac.mm: Fix comment typo.
2849
2850 2007-05-13  Rob Buis  <buis@kde.org>
2851
2852         Reviewed by Darin.
2853
2854         http://bugs.webkit.org/show_bug.cgi?id=13529
2855         DOM3 keyIdentifier text is incorrect
2856
2857         Use 4 digits for the Unicode based key identifiers.
2858
2859         * html/HTMLButtonElement.cpp:
2860         (WebCore::HTMLButtonElement::defaultEventHandler):
2861         * html/HTMLInputElement.cpp:
2862         (WebCore::HTMLInputElement::defaultEventHandler):
2863         * html/HTMLSelectElement.cpp:
2864         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2865         * page/EventHandler.cpp:
2866         (WebCore::EventHandler::defaultKeyboardEventHandler):
2867         * page/gdk/EventHandlerGdk.cpp:
2868         (WebCore::isKeyboardOptionTab):
2869         * page/mac/EventHandlerMac.mm:
2870         (WebCore::isKeyboardOptionTab):
2871         * page/qt/EventHandlerQt.cpp:
2872         (WebCore::isKeyboardOptionTab):
2873         * platform/gdk/KeyEventGdk.cpp:
2874         (WebCore::keyIdentifierForGdkKeyCode):
2875         * platform/mac/KeyEventMac.mm:
2876         (WebCore::keyIdentifierForKeyEvent):
2877         * platform/qt/PlatformKeyboardEventQt.cpp:
2878         (WebCore::keyIdentifierForQtKeyCode):
2879         * platform/win/KeyEventWin.cpp:
2880         (WebCore::keyIdentifierForWindowsKeyCode):
2881         * platform/wx/KeyEventWin.cpp:
2882         (WebCore::keyIdentifierForWindowsKeyCode):
2883         * platform/wx/KeyboardEventWx.cpp:
2884         (WebCore::keyIdentifierForWxKeyCode):
2885
2886 2007-05-12  Darin Adler  <darin@apple.com>
2887
2888         Reviewed by Antti.
2889
2890         - fix <rdar://problem/5174903> Safari crashes opening the attached webarchive (made by OmniWeb)
2891
2892         * loader/icon/IconLoader.cpp:
2893         (WebCore::IconLoader::didReceiveResponse): Check ResourceHandle for nil before calling url() on it.
2894         (WebCore::IconLoader::didFail): Ditto.
2895         (WebCore::IconLoader::didFinishLoading): Ditto.
2896
2897 2007-05-12  Rob Buis  <buis@kde.org>
2898
2899         Reviewed by Oliver.
2900
2901         Cleanup, get rid of the SVGStyledElement::view() call.
2902
2903         * ksvg2/svg/SVGClipPathElement.cpp:
2904         (WebCore::SVGClipPathElement::canvasResource):
2905         * ksvg2/svg/SVGFEFloodElement.cpp:
2906         (WebCore::SVGFEFloodElement::filterEffect):
2907         * ksvg2/svg/SVGGradientElement.cpp:
2908         (WebCore::SVGGradientElement::buildStops):
2909         * ksvg2/svg/SVGStyledElement.cpp:
2910         * ksvg2/svg/SVGStyledElement.h:
2911
2912 2007-05-12  Mitz Pettel  <mitz@webkit.org>
2913
2914         Reviewed by Hyatt.
2915
2916         - fix http://bugs.webkit.org/show_bug.cgi?id=13680
2917           Incomplete repaint of focus ring around continuation
2918
2919         Test: fast/repaint/continuation-after-outline.html
2920
2921         * rendering/RenderFlow.cpp:
2922         (WebCore::RenderFlow::absoluteClippedOverflowRect):
2923
2924 2007-05-12  Oliver Hunt  <oliver@apple.com>
2925
2926         Reviewed by Hyatt.
2927
2928         <rdar://problem/4728842> Can't drag-and-drop files onto <input type="file">
2929         
2930         This patch allows a file to be dropped on to a file input field.  There
2931         are a few changes for data handling and a  few to allow the data to be
2932         threaded to the appropriate places.
2933
2934         * page/DragController.cpp:
2935         (WebCore::asFileInput):
2936            When dropping a file onto a file input we may mouse over either 
2937            the element itself, or the contained button element.  This method
2938            returns the base element for the file input in either of these
2939            cases.
2940         (WebCore::DragController::tryDocumentDrag):
2941            Don't try to set the drag caret to a file input.
2942         (WebCore::DragController::concludeDrag):
2943            Handle dropping onto a file input element.
2944         (WebCore::DragController::canProcessDrag):
2945            We can now process a file being dragged onto a file input element.
2946            
2947         * platform/DragData.h:
2948            New accessors
2949            
2950         * platform/gdk/DragDataGdk.cpp:
2951         (WebCore::DragData::containsFiles):
2952         (WebCore::DragData::asFilenames):
2953            Link stubs.
2954            
2955         * platform/mac/DragDataMac.mm:
2956         (WebCore::DragData::containsFiles):
2957         (WebCore::DragData::asFilenames):
2958            Implement new accessors
2959         (WebCore::DragData::containsCompatibleContent):
2960            Update containsCompatibleContent to allow standalone files.
2961           
2962         * platform/qt/DragDataQt.cpp:
2963         (WebCore::DragData::containsFiles):
2964         (WebCore::DragData::asFilenames):
2965            Link stubs
2966                       
2967         * rendering/RenderFileUploadControl.cpp:
2968         (WebCore::RenderFileUploadControl::receiveDroppedFile):
2969         * rendering/RenderFileUploadControl.h:
2970            For security reasons we don't have an api to allow us to set 
2971            a value directly on a file input -- attempts to do so are
2972            blocked.  By adding a method to set the target through the 
2973            render we bypass such restrictions, and ensure the renderer
2974            is updated correctly.
2975
2976 2007-05-12  Mitz Pettel  <mitz@webkit.org>
2977
2978         Reviewed by Hyatt.
2979
2980         - fix http://bugs.webkit.org/show_bug.cgi?id=13695
2981           REGRESSION (r21387): Replaced elements' highlight rects are wrongly positioned
2982
2983         Test: fast/replaced/selection-rect.html
2984
2985         Also fixes the same problem with list markers, covered by existing test
2986         fast/lists/markers-in-selection.html.
2987
2988         * rendering/RenderListMarker.cpp:
2989         (WebCore::RenderListMarker::selectionRect):
2990         * rendering/RenderReplaced.cpp:
2991         (WebCore::RenderReplaced::selectionRect):
2992
2993 2007-05-12  Mitz Pettel  <mitz@webkit.org>
2994
2995         Reviewed by Darin.
2996
2997         - fix http://bugs.webkit.org/show_bug.cgi?id=13685
2998           REGRESSION (r21368-r21388): Highlighting text in scrolled textareas behaves oddly
2999
3000         Test: fast/repaint/text-selection-rect-in-overflow.html
3001
3002         * rendering/RenderText.cpp:
3003         (WebCore::RenderText::selectionRect):
3004
3005 2007-05-12  Brady Eidson  <beidson@apple.com>
3006
3007         Rubber stamped by Mitz
3008
3009         * html/HTMLInputElement.cpp:
3010         (WebCore::HTMLInputElement::attach): unregister->register - I screwed this one up in last minute renaming
3011           before committing  :(
3012
3013 2007-05-11  Brady Eidson  <beidson@apple.com>
3014
3015         Reviewed by Darin and Geoff
3016
3017         Fix for http://bugs.webkit.org/show_bug.cgi?id=13630
3018         and
3019         <rdar://problem/4873628>
3020
3021         Back/Forward cache should work with pages with login fields.
3022
3023         First change is to relocate the "useSecureKeyboardEntry" flag to the document.  This lets
3024         it persist through page cache transitions and it is truly a per-document concept more than
3025         per-frame anyways since its the document that has a password field, not the frame.
3026
3027         Second change is to introduce the concept of an Element getting a "didRestoreFromCache()" callback.
3028         The idea is for elements to register with the document if they need work to be done when the
3029         page comes out of the back/forward cache.  Currently the only client of this service is 
3030         HTMLInputElements that are input type == PASSWORD.  Such an element's implementation for this
3031         method is to call reset()
3032
3033         Finally, after a page is restored from the cache we have the document send the didRestoreFromCache()
3034         callback to its registered Elements.  The whole design is to clear the password fields after 
3035         restoring the page instead of when caching the page because we want to defer work for the common
3036         case - there shouldn't be extra work here just to navigate away from a page when the common case
3037         is that you'll never go back!
3038
3039         No layout tests possible until http://bugs.webkit.org/show_bug.cgi?id=13672 is resolved
3040
3041         * dom/Document.cpp:
3042         (WebCore::Document::Document):
3043         (WebCore::Document::registerForDidRestoreFromCacheCallback): Add an Element to the special page-restoration callback list
3044         (WebCore::Document::unregisterForDidRestoreFromCacheCallback): Remove such an element
3045         (WebCore::Document::didRestoreFromCache): Called by FrameLoader - dispatch to all the registered elements
3046         (WebCore::Document::setUseSecureKeyboardEntryWhenActive): Set the local flag and call updateSecureKeyboardEntryIfActive
3047           on the Frame
3048         (WebCore::Document::useSecureKeyboardEntryWhenActive): Return the flag
3049
3050         * dom/Document.h:
3051         (WebCore::Document::unregisterFormElementWithState): Renamed
3052
3053         * dom/Element.h:
3054         (WebCore::Element::didRestoreFromCache): Added virtual base method
3055
3056         * html/HTMLInputElement.cpp:
3057         (WebCore::HTMLInputElement::~HTMLInputElement): Deregister from the document if inputType == PASSWORD
3058         (WebCore::HTMLInputElement::dispatchFocusEvent): Set the flag on the document, not the frame
3059         (WebCore::HTMLInputElement::dispatchBlurEvent): Ditto
3060         (WebCore::HTMLInputElement::setInputType): If changing to/from PASSWORD, register/deregister in the document accordingly
3061         (WebCore::HTMLInputElement::attach): Call registerForDidRestoreFromCacheCallback(this) instead of passwordFieldAdded()
3062         (WebCore::HTMLInputElement::didRestoreFromCache): Call reset();
3063         * html/HTMLInputElement.h:
3064
3065         * html/HTMLSelectElement.cpp:
3066         (WebCore::HTMLSelectElement::~HTMLSelectElement): Renamed deregisterFormElementWithState to unregisterFormElementWithState
3067         * html/HTMLTextAreaElement.cpp:
3068         (WebCore::HTMLTextAreaElement::~HTMLTextAreaElement): Ditto
3069
3070         * loader/FrameLoader.cpp:
3071         (WebCore::FrameLoader::canCachePage): Remove the check for password fields - they're allowed now!
3072         (WebCore::FrameLoader::opened): Tell the document to dispatch to the registered elements
3073         (WebCore::FrameLoader::saveDocumentState): Remove the check for password fields.  Turns out that when we grab a copy a the
3074           form state we're only copying the state of form elements that are registered with the Document - and that set 
3075           explicitly excludes Password elements
3076
3077         * page/Frame.cpp:
3078         (WebCore::Frame::setDocument): If the frame is active, set the setUseSecureKeyboardEntry based on the setting contained
3079           in the new document
3080         (WebCore::Frame::updateSecureKeyboardEntryIfActive): Notification for the secure entry flag changing - if the Frame is
3081           active, then update to the new setting from the document
3082         (WebCore::Frame::setIsActive): Grab the useSecureKeyboardEntry flag from the document instead of FramePrivate
3083         (WebCore::FramePrivate::FramePrivate):
3084         * page/Frame.h:
3085         * page/FramePrivate.h:
3086
3087 2007-05-12  David Hyatt  <hyatt@apple.com>
3088
3089         FIx for 13696.  Rework residual style to be much more aggressive about reopening.  Added
3090         a comprehensive test case of HTML tags to guarantee we match Firefox.  We now have an exclusion
3091         set rather than an inclusion set, so unknown future tags will also participate in residual style.
3092
3093         Reviewed by olliej
3094
3095         fast/invalid/residual-style.html
3096
3097 2007-05-12  David Hyatt  <hyatt@apple.com>
3098
3099         Fix for bug 12740, bmw.com doesn't work.  We were missing a rule that is covered by the HTML5
3100         parsing spec.  A <table> encountered while inside stray table content should close up the
3101         table responsible for the stray content and start the new table as a sibling of the first.
3102
3103         Reviewed by mjs
3104
3105         fast/invalid/table-inside-stray-table-content.html
3106
3107 2007-05-12  Eric Seidel  <eric@webkit.org>
3108
3109         Reviewed by mjs.
3110
3111         Crash starting Safari with JavaScript disabled.
3112         http://bugs.webkit.org/show_bug.cgi?id=13691
3113         
3114         Test: none possible.
3115
3116         * page/mac/FrameMac.mm:
3117         (WebCore::Frame::cleanupPlatformScriptObjects): NULL check d->m_script
3118
3119 2007-05-11  David Hyatt  <hyatt@apple.com>
3120
3121         Fix for http://bugs.webkit.org/show_bug.cgi?id=13688, Colloquy is broken!
3122
3123         Make sure to adjust the baseline of a percentage height table cell's row if the
3124         cell flexes (and lowers the baseline).
3125
3126         Reviewed by olliej
3127
3128         fast/tables/vertical-align-baseline-readjust.html
3129
3130         (WebCore::RenderTableSection::calcRowHeight):
3131         (WebCore::RenderTableSection::layoutRows):
3132         * rendering/RenderTableSection.h:
3133         (WebCore::RenderTableSection::getBaseline):
3134         
3135 2007-05-11  David Hyatt  <hyatt@apple.com>
3136
3137         Make sure focus rings are always using the exterior style, regardless
3138         of what the OS default is.
3139
3140         Reviewed by beth
3141
3142         * rendering/RenderThemeMac.mm:
3143         (WebCore::RenderThemeMac::checkbox):
3144         (WebCore::RenderThemeMac::radio):
3145         (WebCore::RenderThemeMac::popupButton):
3146         (WebCore::RenderThemeMac::search):
3147         (WebCore::RenderThemeMac::sliderThumbHorizontal):
3148         (WebCore::RenderThemeMac::sliderThumbVertical):
3149
3150 2007-05-11  Oliver Hunt  <oliver@apple.com>
3151
3152         Reviewed by Hyatt.
3153         
3154         <rdar://problem/5195473> REGRESSION: "Curly quote" fails to 
3155         be displayed correctly even when META tag specifies charset=x-mac-roman
3156
3157
3158         * platform/TextCodecICU.cpp:
3159         (WebCore::TextCodecICU::registerExtendedEncodingNames):
3160         Register the xmacroman encoding
3161
3162 2007-05-11  Maciej Stachowiak  <mjs@apple.com>
3163
3164         Reviewed by Hyatt.
3165
3166         REGRESSION (r21367): Crash due to null document deref when closing bookmarks
3167         http://bugs.webkit.org/show_bug.cgi?id=13662
3168
3169         * loader/FrameLoader.cpp:
3170         (WebCore::FrameLoader::provisionalLoadStarted): Remove some useless and now harmful
3171         code - there's no need to clear in this case.
3172
3173 2007-05-11  Oliver Hunt  <oliver@apple.com>
3174
3175         GDK Build fix
3176
3177         * ChangeLog:
3178         * dom/Document.cpp:
3179         (WebCore::Document::importNode):
3180
3181 2007-05-11  Maciej Stachowiak  <mjs@apple.com>
3182
3183         Reviewed by Geoff.
3184         
3185         - fixed <rdar://problem/5197621> closing second window crashed webkit (13660)
3186         http://bugs.webkit.org/show_bug.cgi?id=13660
3187
3188         No test case; not testable.
3189
3190         * page/mac/FrameMac.mm:
3191         (WebCore::Frame::cleanupPlatformScriptObjects): Check if the interpreter is null;
3192         if so, we don't want to do work that may lazily create it while the Frame is being
3193         destroyed.
3194
3195 2007-05-11  Oliver Hunt  <oliver@apple.com>
3196
3197         Reviewed by Brady.
3198         
3199         <rdar://problem/5017375> WebKit should disable SVG in Dashboard
3200         
3201         Prevents an SVG document or element from being created when in
3202         dashboard compatibility mode.
3203         
3204         Manually parsing, or using XHR to created a document removes our 
3205         ability to detect Dashboard compatibility mode, so we also perform
3206         the check when importing nodes from one document into another.
3207
3208         * dom/DOMImplementation.cpp:
3209         (WebCore::DOMImplementation::createDocument):
3210           Don't create an SVGDocument if we're in dashboard compatibility mode
3211           
3212         * dom/Document.cpp:
3213         (WebCore::Document::importNode):
3214           Don't import SVG nodes if we're in dashboard compatibility mode
3215           
3216         * ksvg2/scripts/make_names.pl:
3217           Don't create SVG elements for documents that are in dashboard
3218           compatibility mode
3219
3220 2007-05-11  Holger Hans Peter Freyther  <zecke@selfish.org>
3221
3222         Reviewed by Maciej.
3223
3224         Bug 13676: [cairo/gdk] Provide implementation for ImageBufferCairo
3225         http://bugs.webkit.org/show_bug.cgi?id=13676
3226
3227         There are no test cases that explicitly cover platform/graphics at present.
3228
3229         * platform/graphics/ImageBuffer.h: Add cairo bits
3230         * platform/graphics/cairo/ImageBufferCairo.cpp: Untested implementation of the ImagerBuffer using the image_surface
3231         (WebCore::ImageBuffer::create): Create a reasonable sized surface
3232         (WebCore::ImageBuffer::ImageBuffer): Use a cairo_surface and create a GraphicsContext. GraphicsContext takes the cairo_t ownership
3233         (WebCore::ImageBuffer::~ImageBuffer): Unref the surface
3234         (WebCore::ImageBuffer::context): simply return the GraphicsContext, it should be possible to directly draw on it.
3235
3236 2007-05-11  Mitz Pettel  <mitz@webkit.org>
3237
3238         Release build fix.
3239
3240         * platform/mac/ShapeArabic.c:
3241         (shapeArabic):
3242
3243 2007-05-11  Geoffrey Garen  <ggaren@apple.com>
3244
3245         Reviewed by Darin Adler.
3246
3247         Removed +[WebScriptObject scriptObjectForJSObject:frame:] because the
3248         WebScriptObject API has some serious limitations that make it not ready
3249         to be used everywhere the C API is used. Hopefully we can add a good
3250         ObjC API in the future that doesn't suffer from this problem.
3251         
3252         Preliminary notes about these limitations are in <rdar://problem/4876466>.
3253
3254         * bindings/objc/WebScriptObject.mm:
3255         * bindings/objc/WebScriptObjectPendingPublic.h:
3256
3257 2007-05-11  Mitz Pettel  <mitz@webkit.org>
3258
3259         Reviewed by Darin.
3260
3261         - fix http://bugs.webkit.org/show_bug.cgi?id=13635
3262           REGRESSION: Cannot log in to webmail.co.za account
3263
3264         Test: fast/dom/HTMLOptionElement/option-text.html
3265
3266         Despite the specification that the 'text' attribute of HTMLOptionElement
3267         is "the text contained within the option element", other browsers return
3268         the text as displayed in the list box or popup, which is without leading,
3269         trailing and collapsible whitespace.
3270
3271         * html/HTMLOptionElement.cpp:
3272         (WebCore::HTMLOptionElement::text): Moved the code to trim and collapse
3273         whitespace and replace backslashes with the currency symbol into this
3274         function.
3275         (WebCore::HTMLOptionElement::optionText): Left only the code that adds
3276         the leading spaces for grouped options. Removed code that, in quirks mode,
3277         displayed the label if the option element contained no text. That behavior
3278         did not match WinIE and the description of the expected behavior in
3279         fast/forms/HTMLOptionElement_label06.html.
3280
3281 2007-05-11  Mitz Pettel  <mitz@webkit.org>
3282
3283         Reviewed by Darin.
3284
3285         - fix http://bugs.webkit.org/show_bug.cgi?id=13572
3286           Arabic characters are not correctly joined when using Arial
3287
3288         No tests added because standard fonts do not use the character-based shaping
3289         code path.
3290
3291         Added shapeArabic(), a private version of u_shapeArabic() from ICU,
3292         patched to shape Arabic characters used in Persian, Urdu, Sindhi, etc.
3293         (whose contextual forms belong to the Arabic Presentation Forms-A block).
3294
3295         * WebCore.xcodeproj/project.pbxproj: Added ShapeArabic.{c,h}.
3296         * platform/mac/FontMac.mm:
3297         (WebCore::shapeArabic): Changed to call shapeArabic() instead of u_shapeArabic().
3298         * platform/mac/ShapeArabic.c: Added. Based on ushape.c from ICU, with
3299         additional shaping data and logic for Arabic Presentation Forms-A. Removed
3300         many options that are not used in WebKit and code that malloc()ed a temporary
3301         buffer and reversed the string.
3302         (changeLamAlef):
3303         (specialChar):
3304         (getLink):
3305         (isTashkeelChar):
3306         (shapeUnicode):
3307         (shapeArabic):
3308         * platform/mac/ShapeArabic.h: Added.
3309
3310 2007-05-11  Darin Adler  <darin@apple.com>
3311
3312         Reviewed by Mitz.
3313
3314         - fix http://bugs.webkit.org/show_bug.cgi?id=7452
3315           <rdar://problem/3211749> line breaks ignored after <wbr> in <pre> block (affects livejournal.com)
3316
3317         - fix http://bugs.webkit.org/show_bug.cgi?id=10657
3318           <rdar://problem/4274588> <wbr> tags are ignored
3319
3320         - fix http://bugs.webkit.org/show_bug.cgi?id=12689
3321           <wbr> :before/:after content causes line break
3322
3323         - fix <rdar://problem/5127366> DOM tree isn't correct when parsing with <wbr>
3324
3325         Test: fast/text/wbr-pre.html
3326         Test: fast/text/wbr.html
3327         Test: fast/css-generated-content/wbr-with-before-content.html
3328         Test: fast/parser/parse-wbr.html
3329
3330         * html/HTMLElement.h:
3331         * html/HTMLElement.cpp:
3332         (WebCore::HTMLElement::endTagRequirement): Use the same end tag requirement for a <wbr>
3333         element as for a <br> element, TagStatusForbidden.
3334         (WebCore::HTMLElement::tagPriority): Use the same priority for a <wbr> element as for a
3335         <br> element, 0.
3336         (WebCore::HTMLElement::createRenderer): Added. Create a RenderWordBreak to trigger the
3337         new rendering code paths.
3338
3339         * rendering/RenderFlow.h: Add a virtual isWordBreak so we can detect RenderWordBreak.
3340
3341         * rendering/RenderWordBreak.h: Added.
3342         * rendering/RenderWordBreak.cpp: Added.
3343
3344         * WebCore.pro: Added new files.
3345         * WebCore.xcodeproj/project.pbxproj: Added new files.
3346         * WebCoreSources.bkl: Added new files.
3347
3348         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::calcInlinePrefWidths): Reset the
3349         line when we hit a <wbr>.
3350         * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Add a line break when
3351         we hit a <wbr>.
3352
3353         * dom/Node.cpp: (Node::createRendererIfNeeded): Fix a null check for the case where
3354         createRenderer returns 0 even though rendererIsNeeded returned true. I can't reproduce
3355         it on demand, but while running layout tests I hit this once. Since there was already
3356         a null check here, I rearranged it so it guards all the code that uses the renderer.
3357         Later we might want to figure out under exactly what circumstances rendererIsNeeded
3358         will return true but createRenderer return 0 and consider eliminating them.
3359
3360 2007-05-11  David Hyatt  <hyatt@apple.com>
3361
3362         Fix for bug 13675, focus rings don't repaint properly on editable
3363         continuations.
3364
3365         Reviewed by olliej
3366
3367         (WebCore::InlineFlowBox::paint):
3368         * rendering/RenderBlock.cpp:
3369         (WebCore::RenderBlock::paintObject):
3370         (WebCore::continuationOutlineTable):
3371         (WebCore::RenderBlock::addContinuationWithOutline):
3372         (WebCore::RenderBlock::paintContinuationOutlines):
3373         * rendering/RenderBlock.h:
3374         * rendering/RenderBox.cpp:
3375         (WebCore::RenderBox::absoluteClippedOverflowRect):
3376         * rendering/RenderObject.cpp:
3377         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
3378         (WebCore::RenderObject::absoluteOutlineBox):
3379
3380 2007-05-11  Rob Buis  <buis@kde.org>
3381
3382         Reviewed by Oliver.
3383
3384         Cleanups mostly inspired by Coverage results.
3385
3386         * ksvg2/css/SVGCSSParser.cpp:
3387         (WebCore::CSSParser::parseSVGValue):
3388         (WebCore::CSSParser::parseSVGStrokeDasharray):
3389         * ksvg2/css/SVGRenderStyleDefs.cpp:
3390         (StyleFillData::operator==):
3391         * ksvg2/svg/SVGColor.cpp:
3392         (WebCore::SVGColor::colorFromRGBColorString):
3393
3394 2007-05-11  Holger Freyther <freyther@kde.org>
3395
3396         Reviewed by Mark Rowe.
3397
3398         Move libcurl configuration into WebKit.pri so it will be used by GdkLauncher.
3399
3400         * WebCore.pro:
3401
3402 2007-05-10  David Hyatt  <hyatt@apple.com>
3403
3404         <rdar://problem/5015522> Bounds rectangle of unloaded images is 
3405         drawn briefly while loading
3406         
3407         When the image is null and has no size, don't draw the grey
3408         rectangles or alt text any more.  Wait for an actual error to
3409         occur with the image before we start showing alt text and borders.
3410
3411         (Images with no source set at all will continue to show alt text and
3412         borders immediately.)
3413
3414         Reviewed by bradee-oh
3415
3416         * rendering/RenderImage.cpp:
3417         (WebCore::RenderImage::paint):
3418
3419 2007-05-10  Mitz Pettel  <mitz@webkit.org>
3420
3421         Reviewed by Darin.
3422
3423         - fix http://bugs.webkit.org/show_bug.cgi?id=13655
3424           Incomplete repaint when text-shadow is used in a render layer with explicit height
3425
3426         Test: fast/repaint/layer-full-repaint.html
3427
3428         Removed custom repaint logic from RenderLayer. repaintAfterLayoutIfNeeded()
3429         knows how to do everything we need now. The only catch is that we cannot
3430         rely on its "do a full repaint if the object needs layout" behavior, since
3431         by the time we call it, the needs layout flag has been reset. The solution
3432         is to cache the need for a full repaint in the layer.
3433
3434         * page/FrameView.cpp:
3435         (WebCore::FrameView::layout): Removed call to checkForRepaintOnResize().
3436         * rendering/RenderLayer.cpp:
3437         (WebCore::RenderLayer::checkForRepaintOnResize): Removed.
3438         (WebCore::RenderLayer::RenderLayer): Replaced the m_repaintOverflowOnResize
3439         flag with a m_needsFullRepaint flag, which indicates that the layer needs
3440         to do a full repaint in the next call to updateLayerPositions().
3441         (WebCore::RenderLayer::updateLayerPositions): Simplified the repaint logic.
3442         Either call repaintAfterLayoutIfNeeded() or do a full repaint, depending on
3443         m_needsFullRepaint.
3444         * rendering/RenderLayer.h:
3445         (WebCore::RenderLayer::setNeedsFullRepaint):
3446         * rendering/RenderObject.cpp:
3447         (WebCore::RenderObject::setNeedsLayout): Mark the layer for full repaint.
3448
3449 2007-05-10  Justin Garcia  <justin.garcia@apple.com>
3450
3451         Reviewed by ggaren
3452
3453         <rdar://problem/5195166> Incorrect proposedRange DOMRange passed to WebViewEditing delegate
3454         
3455         In setModifyBias, we must cache the start and the end 
3456         because the calls to setBase and setExtent can modify 
3457         them (added a testcase).
3458         The temporary SelectionController that we use in modify() to
3459         produce the proposed range that will be passed to 
3460         shouldChangeSelectedDOMRange must have the same m_modifyBias
3461         as the original SelectionController, or else when the 
3462         modification is performed, setModifyBias can swap the base 
3463         and the extent incorrectly (added a testcase).
3464         Renamed m_modifyBias to m_lastChangeWasHorizontalExtension.
3465         Renamed setModifyBias to willBeModified.
3466
3467         * editing/SelectionController.cpp:
3468         (WebCore::SelectionController::SelectionController):
3469         (WebCore::SelectionController::setSelection):
3470         (WebCore::SelectionController::willBeModified):
3471         (WebCore::SelectionController::modify):
3472         * editing/SelectionController.h:
3473         (WebCore::SelectionController::setLastChangeWasHorizontalExtension):
3474         * page/EventHandler.cpp:
3475         (WebCore::EventHandler::handleMousePressEventSingleClick):
3476         (WebCore::EventHandler::updateSelectionForMouseDragOverPosition):
3477
3478 2007-05-10  Geoffrey Garen  <ggaren@apple.com>
3479
3480         Reviewed by Darin Adler.
3481
3482         "IconDatabase::sharedIconDatabase()" => "iconDatabase()" for terseness,
3483         in the style of WebCore::cache().
3484
3485         * WebCore.exp:
3486         * history/HistoryItem.cpp: Removed retainIconInDatabase because calling
3487         "retain" in order to release something is really confusing and, now that
3488         iconDatabase() is more terse, we don't need this helper to shorten the
3489         syntax. (The isEmpty() check is also done by the database, so we don't 
3490         need it either.)
3491
3492         (WebCore::IconDatabase::~IconDatabase): ASSERT that our destructor isn't
3493         called. We're a singleton, so it's confusing to have tear-down code.
3494
3495 2007-05-10  Adele Peterson  <adele@apple.com>
3496
3497         Reviewed by Hyatt.
3498
3499         WebCore part of fix for <rdar://problem/4100616> Doing a "find" in RSS doesn't scroll to result
3500
3501         Test: fast/overflow/scroll-nested-positioned-layer-in-overflow.html
3502
3503         Merged visibleSelectionRect into selectionRect.  selectionRect() now takes an argument to determine
3504         whether or not to return a rect that clips to the visible content.  This change makes all of the implementations of selectionRect
3505         consistent by having them all consider the repaint rect when clipping to visible content.
3506
3507         * page/Frame.cpp:
3508         (WebCore::Frame::revealSelection): Call selectionRect with clipToVisibleContent = false, so we can get a rect that's not visible to reveal.
3509         (WebCore::Frame::selectionRect): Added clipToVisibleContent argument, and merged visibleSelectionRect into this method.
3510         (WebCore::Frame::setIsActive): Use selectionRect instead of visibleSelectionRect.
3511         * page/Frame.h:
3512         * page/mac/FrameMac.mm: (WebCore::Frame::selectionImage): Update layout before creating the image.  Use selectionRect instead of visibleSelectionRect.
3513         * page/DragController.cpp: (WebCore::dragLocForSelectionDrag): Use selectionRect instead of visibleSelectionRect.
3514
3515         * rendering/RenderBR.h: (WebCore::RenderBR::selectionRect): Updated argument.
3516         * rendering/RenderBlock.h: (WebCore::RenderBlock::selectionRect): ditto.
3517         * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::selectionRect): ditto.
3518         * rendering/RenderSVGInlineText.h: ditto.
3519         * rendering/RenderObject.h: 
3520         (WebCore::RenderObject::selectionRect): ditto.
3521         (WebCore::RenderObject::SelectionInfo::SelectionInfo): ditto.
3522         * rendering/RenderView.cpp:
3523         (WebCore::RenderView::selectionRect): ditto.
3524         (WebCore::RenderView::setSelection): ditto.
3525         * rendering/RenderView.h:
3526
3527         * rendering/RenderText.h:
3528         * rendering/RenderText.cpp: (WebCore::RenderText::selectionRect): Only call computeAbsoluteRepaintRect when clipping to visible content.
3529         Otherwise, just adjust the rect to the correct position.
3530         * rendering/RenderListMarker.h:
3531         * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::selectionRect):
3532           To match what we do in RenderText, if we're trying to clip to visible content, just call computeAbsoluteRepaintRect.
3533         * rendering/RenderReplaced.h:
3534         * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::selectionRect): ditto.
3535
3536         * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): Check for a parent layer at the beginning, so we can try to scroll all of our parent layers 
3537           first, before trying to scroll the top level view.  Also, don't try to scroll overflow layers that have -webkit-line-clamp restricting the height.
3538           This will prevent us from revealing text hidden by the slider in Safari RSS.
3539
3540         * WebCore.exp: Update symbols for WebKit.
3541
3542 2007-05-10  David Hyatt  <hyatt@apple.com>
3543
3544         Fix for:
3545
3546         <rdar://problem/5195272> REGRESSION: broke outline rings for continuations 
3547         with empty inline containers
3548         
3549         http://bugs.webkit.org/show_bug.cgi?id=13667
3550
3551         Make sure to only include collapsed top/bottom margins of the block portion
3552         of the continuation if we know for sure that we have inline line boxes before
3553         and after that would prevent the collapse from going further.
3554
3555         In plain English: the focus rings were too tall. :)
3556
3557         Reviewed by beth
3558
3559         * rendering/RenderFlow.cpp:
3560         (WebCore::RenderFlow::addFocusRingRects):
3561
3562 2007-05-10  David Hyatt  <hyatt@apple.com>
3563
3564         Fix for:
3565
3566         <rdar://problem/5067235> REGRESSION: Excessively wide table, impossible to resize
3567
3568         The table used white-space: pre-wrap, which is supported only by WebKit.  There
3569         was a bug with the computation of min pref width for pre-wrap text.
3570
3571         Reviewed by mitzpettel
3572
3573         fast/text/white-space/pre-wrap-line-test.html
3574
3575         * rendering/RenderText.cpp:
3576         (WebCore::RenderText::calcPrefWidths):
3577
3578 2007-05-10  Brady Eidson  <beidson@apple.com>
3579
3580         Reviewed by Oliver
3581
3582         Cleanup from my earlier Java Applet patch.  We should keep a central location to query if 
3583         a mime type counts as a Java Applet
3584
3585         * html/HTMLObjectElement.cpp:
3586         (WebCore::HTMLObjectElement::containsJavaApplet): Query MimeTypeRegistry on the type
3587
3588         * platform/MimeTypeRegistry.cpp:
3589         (WebCore::MimeTypeRegistry::isSupportedImageMIMEType): Update style
3590         (WebCore::MimeTypeRegistry::isSupportedImageResourceMIMEType): Ditto
3591         (WebCore::MimeTypeRegistry::isSupportedNonImageMIMEType): Ditto
3592         (WebCore::MimeTypeRegistry::isJavaAppletMIMEType): Perform the Java Applet check
3593         * platform/MimeTypeRegistry.h: