a78d2d0ec3955de2c8976ec3c4abb6172a20eb32
[WebKit-https.git] / WebCore / ChangeLog
1 2007-05-15  Sam Weinig  <sam@webkit.org>
2
3         Reviewed by Oliver.
4
5         - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
6           Finish testing and fixing the setting of DOM attributes to JS null
7
8           Convert JS null to null string for CanvasRenderingContext2D attributes.
9
10         Test: fast/dom/canvasContext2d-element-attribute-js-null.html
11
12         * html/CanvasRenderingContext2D.idl:
13
14 2007-05-15  Oliver Hunt  <oliver@apple.com>
15
16         Reviewed by Sam and Geoff.
17
18         Removing dead code left behind from drag and drop refactoring.
19
20         * page/mac/WebCoreFrameBridge.h:
21
22 2007-05-15  Sam Weinig  <sam@webkit.org>
23
24         Reviewed by Oliver.
25
26         - Second Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
27           Finish testing and fixing the setting of DOM attributes to JS null
28
29           Convert JS null to null string for remaining CSSOM attributes.
30
31         Test: fast/dom/css-element-attribute-js-null.html
32
33         * bindings/js/kjs_css.cpp:
34         (KJS::DOMCSSStyleDeclaration::put):
35         (KJS::DOMMediaList::put):
36         (KJS::DOMCSSRule::putValueProperty):
37         (KJS::DOMCSSValue::put):
38         * css/CSSPageRule.idl:
39         * css/CSSRule.idl:
40         * css/CSSStyleDeclaration.idl:
41         * css/CSSStyleRule.idl:
42         * css/CSSValue.idl:
43         * css/MediaList.idl:
44
45 2007-05-15  Darin Adler  <darin@apple.com>
46
47         Reviewed by Hyatt.
48
49         * css/html4.css: Remove wbr style rule -- not needed any more.
50
51 2007-05-15  Mitz Pettel  <mitz@webkit.org>
52
53         Reviewed by Brady
54
55         - fix http://bugs.webkit.org/show_bug.cgi?id=13360
56           REGRESSION: Crash closing live web cam viewer page
57
58         Test: http/tests/misc/multipart.html
59
60         * loader/ResourceLoader.cpp:
61         (WebCore::ResourceLoader::didFail): Avoid calling didFailToLoad() if
62         didFinishLoad() has already been called (when the first part of a
63         multipart resource arrived).
64         (WebCore::ResourceLoader::didCancel): Ditto.
65
66 2007-05-15  Sam Weinig  <sam@webkit.org>
67
68         Reviewed by Darin.
69
70         - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
71           Finish testing and fixing the setting of DOM attributes to JS null
72
73           Convert JS null to null string for remaining Core DOM attributes.
74
75         Test: fast/dom/coreDOM-element-attribute-js-null.xhtml
76
77         * dom/Attr.cpp:
78         (WebCore::Attr::setValue): Don't throw an expection for null values as this
79         is not in the spec and Firefox does not do it either.
80         * dom/Attr.idl:
81         * dom/CharacterData.idl:
82         * dom/ProcessingInstruction.idl:
83
84 2007-05-15  Mitz Pettel  <mitz@webkit.org>
85
86         Reviewed by Hyatt.
87
88         - fix http://bugs.webkit.org/show_bug.cgi?id=13718
89           REGRESSION (r21093): editing/execCommand/5136770.html failing pixel test
90
91         * rendering/RenderContainer.cpp:
92         (WebCore::RenderContainer::removeChildNode): Moved the code that clears the
93         selection when moving a selection border into the fast path.
94
95 2007-05-15  Rob Buis  <buis@kde.org>
96
97         Reviewed by Hyatt.
98
99         http://bugs.webkit.org/show_bug.cgi?id=6487
100         "Make Text Bigger/Smaller" affects SVGs when it probably shouldn't
101
102         Ignore Make Text Bigger/Smaller for SVG text.
103
104         * css/svg.css:
105
106 2007-05-15  Anders Carlsson  <andersca@apple.com>
107
108         Reviewed by Maciej.
109
110         <rdar://problem/5183685>
111         http://bugs.webkit.org/show_bug.cgi?id=13301
112         ASSERT or null value when trying to use a getter defined on a window object
113
114         Handle the case where the value returned is a getter/setter object.
115         
116         * bindings/js/kjs_window.cpp:
117         (KJS::Window::getOverridePropertySlot):
118
119 2007-05-14  Anders Carlsson  <andersca@apple.com>
120
121         Reviewed by Geoff.
122
123         <rdar://problem/5200816>
124         REGRESSION: With Shiira 1.2.2 , I can't open embedded link in flash object by clicking (http:/www.adobe.com )
125         
126         Shiira under some circumstances passes nil as the request to -[WebFrame loadRequest:]. ToT WebKit doesn't call any policy
127         delegate methods in this case, which means that the page is actually being loaded. 
128         
129         This patch makes ToT WebKit behave in the same way as Tiger WebKit when the request is nil.
130         
131         * loader/FrameLoader.cpp:
132         (WebCore::FrameLoader::checkNavigationPolicy):
133         Don't continue without calling the navigation policy method if the request is null.
134         
135         (WebCore::FrameLoader::continueAfterNavigationPolicy):
136         If the request can't be handled, don't continue the load.
137         
138         * platform/network/mac/ResourceRequestMac.mm:
139         (WebCore::ResourceRequest::doUpdatePlatformRequest):
140         Don't create an NSURLRequest object if the request is null.
141
142 2007-05-15  Maciej Stachowiak  <mjs@apple.com>
143
144         Reviewed by Hyatt and Lars.
145
146         - fixed <rdar://problem/5201758> REGRESSION: Stop button enabled and other problems caused by [WebView currentURL] returning non-nil for empty window
147
148         * WebCore.exp: export new symbol
149         * loader/FrameLoader.cpp:
150         (WebCore::FrameLoader::begin): move marker that we committed a real doc load from here...
151         (WebCore::FrameLoader::transitionToCommitted): ...to here
152         (WebCore::FrameLoader::frameHasLoaded): check that we have at least started loading something
153         besides the initial empty doc.
154         * loader/FrameLoader.h:
155
156 2007-05-14  Justin Garcia  <justin.garcia@apple.com>
157
158         Reviewed by ggaren
159         
160         <http://bugs.webkit.org/show_bug.cgi?id=13716>
161         REGRESSION: Three new layout test failures
162         
163         Two failures are correct.  Updated their expected results.
164         
165         In fast/events/frame-tab-focus.html, as we advance
166         through focusable nodes, we descend into a subframe
167         to focus a node and then ascend out of it into the
168         main frame to focus the next.  When we focus the main 
169         frame, the node in that frame that was previously 
170         focused and contains an inactive selection is focused 
171         momentarily because setCaretVisible tries to focus the 
172         node containing the caret.
173
174         * page/Frame.cpp:
175         (WebCore::Frame::setCaretVisible): Don't focus the
176         node containing the caret. FocusController will focus
177         the previously focused node (which will contain the
178         caret) if necessary when the frame gains focus.
179         
180 2007-05-14  Maciej Stachowiak  <mjs@apple.com>
181
182         Reviewed by Brady.
183
184         - fixed <rdar://problem/5203036> REGRESSION: Assertion failure in WebCore::FrameLoader::restoreScrollPositionAndViewState() going back from fark.com Photoshop contest (13684)
185
186         Test: http/tests/navigation/back-to-slow-frame.html
187         
188         * loader/FrameLoader.cpp:
189         (WebCore::FrameLoader::restoreScrollPositionAndViewState): Add needed early return.
190
191 2007-05-14  Mitz Pettel  <mitz@webkit.org>
192
193         Reviewed by Dave Hyatt.
194
195         - fix http://bugs.webkit.org/show_bug.cgi?id=13603
196           style leaks in washingtonpost.com
197           also known as http://bugs.webkit.org/show_bug.cgi?id=8750
198           w3c.org: incorrect recovery from unclosed <a> elements
199           also known as http://bugs.webkit.org/show_bug.cgi?id=12808
200           Handling of misnested tags results in entire page appearing as link
201           also known as http://bugs.webkit.org/show_bug.cgi?id=12861
202           Post text renders as link
203
204         Test: fast/parser/residual-style-close-across-n-blocks.html
205
206         * html/HTMLParser.cpp:
207         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Changed to
208         deal with multiple block crossings instead of bailing out, by doing multiple
209         reparenting passes, starting from the outermost block.
210
211 2007-05-14  Mitz Pettel  <mitz@webkit.org>
212
213         Reviewed by Darin.
214
215         - fix http://bugs.webkit.org/show_bug.cgi?id=13711
216           REGRESSION - Bookmark Bar text rendering changed
217
218         No test possible since this patch affects only Safari chrome.
219
220         * platform/Font.cpp:
221         (WebCore::Font::Font): Initialize m_isPlatformFont according to whether
222         the Font object is derived from a FontPlatformData or not.
223         * platform/Font.h:
224         (WebCore::Font::isPlatformFont): Added. Returns whether this Font was
225         derived from a platform font.
226         * platform/mac/FontCacheMac.mm:
227         (WebCore::FontCache::getFontDataForCharacters): Changed to not enable
228         synthetic bold and italic in the fallback fonts if the original font
229         was derived from a platform font.
230
231 2007-05-14  Sam Weinig  <sam@webkit.org>
232
233         Reviewed by Alice!
234
235         - Patch for http://bugs.webkit.org/show_bug.cgi?id=13541
236           REGRESSION: Setting a DOMString attribute to JS null in the 
237           JS bindings should default to converting to the empty string
238
239           Convert JS null to the empty string when passing it to an attribute that takes
240           a DOMString.
241
242         Test: fast/dom/document-attribute-js-null.html
243         Test: fast/dom/element-attribute-js-null.html
244
245         * bindings/js/kjs_dom.cpp:
246         (KJS::DOMNode::putValueProperty):
247         * bindings/js/kjs_html.cpp:
248         (KJS::JSHTMLDocument::putValueProperty):
249         (KJS::JSHTMLElement::objectSetter):
250         (KJS::JSHTMLElement::embedSetter):
251         (KJS::JSHTMLElement::tableSetter):
252         (KJS::JSHTMLElement::tableCaptionSetter):
253         (KJS::JSHTMLElement::tableColSetter):
254         (KJS::JSHTMLElement::tableSectionSetter):
255         (KJS::JSHTMLElement::tableRowSetter):
256         (KJS::JSHTMLElement::tableCellSetter):
257         (KJS::JSHTMLElement::frameSetSetter):
258         (KJS::JSHTMLElement::frameSetter):
259         (KJS::JSHTMLElement::iFrameSetter):
260         (KJS::JSHTMLElement::marqueeSetter):
261         (KJS::JSHTMLElement::putValueProperty):
262         * bindings/js/kjs_html.h:
263         * dom/Document.idl:
264         * dom/Node.idl:
265         * html/HTMLAnchorElement.idl:
266         * html/HTMLAppletElement.idl:
267         * html/HTMLAreaElement.idl:
268         * html/HTMLBRElement.idl:
269         * html/HTMLBaseElement.idl:
270         * html/HTMLBaseFontElement.idl:
271         * html/HTMLBlockquoteElement.idl:
272         * html/HTMLBodyElement.idl:
273         * html/HTMLButtonElement.idl:
274         * html/HTMLDivElement.idl:
275         * html/HTMLDocument.idl:
276         * html/HTMLElement.idl:
277         * html/HTMLEmbedElement.idl:
278         * html/HTMLFontElement.idl:
279         * html/HTMLFormElement.idl:
280         * html/HTMLFrameElement.idl:
281         * html/HTMLFrameSetElement.idl:
282         * html/HTMLHRElement.idl:
283         * html/HTMLHeadElement.idl:
284         * html/HTMLHeadingElement.idl:
285         * html/HTMLHtmlElement.idl:
286         * html/HTMLIFrameElement.idl:
287         * html/HTMLImageElement.idl:
288         * html/HTMLInputElement.idl:
289         * html/HTMLIsIndexElement.idl:
290         * html/HTMLLIElement.idl:
291         * html/HTMLLabelElement.idl:
292         * html/HTMLLegendElement.idl:
293         * html/HTMLLinkElement.idl:
294         * html/HTMLMapElement.idl:
295         * html/HTMLMetaElement.idl:
296         * html/HTMLModElement.idl:
297         * html/HTMLOListElement.idl:
298         * html/HTMLObjectElement.idl:
299         * html/HTMLOptGroupElement.idl:
300         * html/HTMLOptionElement.idl:
301         * html/HTMLParagraphElement.idl:
302         * html/HTMLParamElement.idl:
303         * html/HTMLQuoteElement.idl:
304         * html/HTMLScriptElement.idl:
305         * html/HTMLSelectElement.idl:
306         * html/HTMLStyleElement.idl:
307         * html/HTMLTableCaptionElement.idl:
308         * html/HTMLTableCellElement.idl:
309         * html/HTMLTableColElement.idl:
310         * html/HTMLTableElement.idl:
311         * html/HTMLTableRowElement.idl:
312         * html/HTMLTableSectionElement.idl:
313         * html/HTMLTextAreaElement.idl:
314         * html/HTMLTitleElement.idl:
315         * html/HTMLUListElement.idl:
316
317 2007-05-14  Geoffrey Garen  <ggaren@apple.com>
318
319         Trying to fix the Qt build.
320
321         * WebCore.pro:
322
323 2007-05-14  Geoffrey Garen  <ggaren@apple.com>
324
325         Reviewed by Oliver Hunt.
326         
327         Some improvements on my last patch, suggested by Darin.
328
329         * history/PageCache.cpp:
330         (WebCore::PageCache::autoreleaseNow): Swap with an empty set instead of 
331         building up an array and then calling clear(). This is slightly more 
332         efficient and the code is cleaner.
333
334 2007-05-14  Justin Garcia  <justin.garcia@apple.com>
335
336         Reviewed by darin
337         
338         <rdar://problem/5136696> Selection is removed when focusing a node in another frame
339         <rdar://problem/5192388> WordPress: Can't insert links/images
340         
341         Don't clear a selection when changing focus if the new
342         focus node is in a different frame than the old selection.
343
344         * dom/Document.cpp:
345         (WebCore::Document::setFocusedNode): Moved code to clear 
346         selections to the FocusController, since it is Page level 
347         and will know about the frame/document that contained the 
348         old selection. Moved code to call shouldEndEditing to the 
349         FocusController because selections are now cleared before
350         calling Document::setFocusedNode and shouldEndEditing must
351         be called before selections are cleared.
352         * dom/Element.cpp:
353         (WebCore::Element::blur): Call FocusController::setFocusNode
354         instead of Document::setFocusNode, if possible.
355         * page/EventHandler.cpp:
356         (WebCore::EventHandler::dispatchMouseEvent): Ditto.
357         * page/FocusController.cpp:
358         (WebCore::relinquishesEditingFocus): Moved from Document.cpp.
359         (WebCore::clearSelectionIfNeeded): Ditto.  Don't clear if
360         the old selection is in a frame that's different than the 
361         one that contains the new focus node.
362         (WebCore::FocusController::setFocusedNode): Moved code
363         here from Document::setFocusedNode.
364         * page/Frame.cpp:
365         (WebCore::Frame::setFocusedNodeIfNeeded): Call
366         FocusController::setFocusNode.
367
368 2007-05-14  Geoffrey Garen  <ggaren@apple.com>
369
370         Reviewed by Darin Adler.
371         
372         Next step toward fixing <rdar://problem/5055182> The back cache has no 
373         global cap.
374         
375         Created a PageCache singleton. Right now, it only handles the timer-based
376         deallocation of cached pages. I plan to add HistoryItem->CachedPage tracking
377         and eviction logic in later patches.
378
379         Updated for renames and file changes:
380
381         * WebCore.exp:
382         * WebCore.xcodeproj/project.pbxproj:
383         * history/BackForwardList.cpp:
384         (WebCore::BackForwardList::setPageCacheSize):
385         (WebCore::BackForwardList::clearPageCache):
386
387         Removed global timed release code, moved into new PageCache class, since
388         it's eventually going to be in charge of deciding when things are released:
389         
390         * history/HistoryItem.cpp:
391         (WebCore::HistoryItem::setCachedPage):
392         * history/HistoryItem.h:
393
394         Folded into PageCache:
395         
396         * history/HistoryItemTimer.cpp: Removed.
397         * history/HistoryItemTimer.h: Removed.
398
399         New singleton. Right now, it just handles timed release of cached pages:
400         
401         * history/PageCache.cpp: Added.
402         (WebCore::pageCache):
403         (WebCore::PageCache::PageCache):
404         (WebCore::PageCache::autoreleaseNowOrReschedule):
405         (WebCore::PageCache::autoreleaseNow):
406         (WebCore::PageCache::autorelease):
407         * history/PageCache.h: Added.
408
409 2007-05-14  Adele Peterson  <adele@apple.com>
410
411         Reviewed by Darin.
412
413         Fix for <rdar://problem/5200081> Repro crash in PopupMenu::show clicking popup menu button after reload
414
415         * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenu::show): Added call to dismissPopup so the cell gets unattached properly.
416
417 2007-05-14  Adele Peterson  <adele@apple.com>
418
419         Reviewed by Darin.
420
421         Remove incorrect assertion.
422
423         * page/FrameView.cpp: (WebCore::FrameView::setContentsPos):
424
425 2007-05-14  Anders Carlsson  <andersca@apple.com>
426
427         Reviewed by Geoff.
428
429         <rdar://problem/5172056> Regression: cannot open txt file, get broken image
430
431         Never let plug-ins override text/plain.
432         
433         * dom/DOMImplementation.cpp:
434         (WebCore::DOMImplementation::createDocument):
435
436 2007-05-14  Zack Rusin  <zrusin@trolltech.com>
437
438         Reviewed by Simon.
439
440         Do some magic to get better dependency tracking for header
441         files in the qmake project files.
442
443         * ChangeLog:
444
445 2007-05-14  Lars Knoll <lars@trolltech.com>
446
447         Reviewed by Zack
448
449         Required updates after Maciej's frame change.
450
451         * loader/FrameLoader.cpp:
452         (WebCore::FrameLoader::mainReceivedCompleteError):
453               Call checkLoadCompleted() at the end of the method. Without it
454               we never get the loadDone() signal on the Qt port.
455         * platform/network/qt/ResourceHandleManagerQt.cpp:
456         (WebCore::ResourceHandleManager::receivedFinished):
457               Don't pass a null error to didFail().
458
459 2007-05-14  Darin Adler  <darin@apple.com>
460
461         Reviewed by Antti.
462
463         - fix <rdar://problem/3109180> VIP: after go back, page jumps after loading even if I scrolled while loading
464
465         * history/CachedPage.cpp: (WebCore::CachedPage::clear): Call clearFrame rather than
466         clearPart -- the "part" term was leftover prehistoric terminology.
467
468         * loader/FrameLoader.cpp:
469         (WebCore::FrameLoader::open): Call setWasScrolledByUser(false) on the page, so that we
470         can detect any user scrolling that happens during the "go back" process.
471         (WebCore::FrameLoader::restoreScrollPositionAndViewState): Don't scroll if the view's
472         wasScrolledByUser flag is set.
473         (WebCore::FrameLoader::loadItem): Call setWasScrolledByUser(false) false when we do
474         a new "load" (actually just a scroll) using the same frame. Also moved the line of code that
475         sets m_currentHistoryItem to make this code path mroe similar to recursiveGoToItem.
476         (WebCore::FrameLoader::recursiveGoToItem): Ditto.
477
478         * page/Frame.cpp:
479         (WebCore::Frame::~Frame): Call clearFrame rather than stting m_frame directly.
480         (WebCore::Frame::sendScrollEvent): Call setWasScrolledByUser(true) on FrameView. The FrameView
481         itself knows to ignore this if the scrolling is being done programmatically instead of by the user.
482
483         * page/FrameView.h: Added wasScrolledByUser and setWasScrolledByUser. Also removed unneeded
484         include and class forward declarations, renamed clearPart to clearFrame, removed uneeded function
485         haveDelayedLayoutScheduled, and removed unneeded friend declarations.
486         * page/FrameView.cpp:
487         (WebCore::FrameViewPrivate::FrameViewPrivate): Added m_inProgrammaticScroll and m_wasScrolledByUser.
488         (WebCore::FrameViewPrivate::reset): Set m_wasScrolledByUser to false.
489         (WebCore::FrameView::clearFrame): Renamed from clearPart.
490         (WebCore::FrameView::scrollRectIntoViewRecursively): Added code to set the m_inProgrammaticScroll flag.
491         (WebCore::FrameView::setContentsPos): Ditto.
492         (WebCore::FrameView::wasScrolledByUser): Added.
493         (WebCore::FrameView::setWasScrolledByUser): Added. Does nothing if called when m_inProgrammaticScroll
494         is true.
495
496 2007-05-14  Darin Adler  <darin@apple.com>
497
498         Reviewed by Antti.
499
500         - <rdar://problem/4865655> REGRESSION: find function does not work for the character ß
501
502         The trick was to fold case consistently in the CircularSearchBuffer class.
503
504         The problem was that we were folding the search target string with full case folding and
505         the characters of the text we were searching with simple case folding. We now use full
506         case folding in both cases.
507
508         * editing/TextIterator.cpp:
509         (WebCore::CircularSearchBuffer::CircularSearchBuffer): Changed the buffer to be a
510         Vector<UChar>. Added a Vector<bool> to record which characters were starts of characters
511         in the text we are searching. Changed the cursor to be an int rather than a pointer.
512         (WebCore::CircularSearchBuffer::append): New function that knows how to append multiple
513         characters when folding case turns one character into many -- uses the full foldCase
514         rather than the simplified single-character foldCase. Also removed the append function
515         that did multiple characters at once; that was part of an optimization we don't need.
516         (WebCore::CircularSearchBuffer::isMatch): Instead of asserting that the buffer is full,
517         changed this to return false if it's not full, which lets us fill up the buffer with
518         the normal loop. Also return false if the start of the buffer is half-way through a
519         case-folded character and updated this since m_cursor is now an integer.
520         (WebCore::CircularSearchBuffer::length): This returns the length in non-case-folded
521         characters of the characters that were appended, which may not be the same as the length
522         of the original target string. To do that we have to total up the character start
523         booleans for the current state of the circular buffer.
524         (WebCore::findPlainText): Streamlined the logic in a few ways: 1) Moved more of the
525         return value setup to the top of the function so it could be shared with the early
526         error exit. 2) Removed the separate "fill the buffer" logic, which allowed me to
527         remove some of the functions from CircularSearchBuffer and eliminated the need for
528         two nested loops. 3) Replaced the CharacterIterator and bool that were used to record
529         the location we found with integers matchStart and matchLength. 4) Got rid of the use
530         of goto since we don't have two nested loops any more.
531
532 2007-05-14  Andrew Wellington  <proton@wiretapped.net>
533
534         Reviewed by Darin.
535
536         Fix http://bugs.webkit.org/show_bug.cgi?id=13275
537         Safari crashed when trying to login using the windows live contact control
538
539         Check for cleared windowObj in JSAbstractEventListener::handleEvent
540
541         * bindings/js/kjs_events.cpp:
542         (KJS::JSAbstractEventListener::handleEvent):
543
544 2007-05-13  Alexey Proskuryakov  <ap@webkit.org>
545
546         Reviewed by Darin.
547
548         http://bugs.webkit.org/show_bug.cgi?id=13690
549         JavaScript Form Validation issue on Banco do Brasil site
550
551         Test: fast/forms/input-setvalue-selection.html
552
553         * html/HTMLInputElement.cpp:
554         (WebCore::HTMLInputElement::setValue): In other browsers, changing textInput.value
555         always moves the insertion point past the text. In 10.4.9 WebKit, this only worked
556         for inactive controls, and it never worked in ToT.
557
558 2007-05-13  Brady Eidson  <beidson@apple.com>
559
560         Reviewed by Mitz
561
562         http://bugs.webkit.org/show_bug.cgi?id=13701
563
564         Since HTMLInputElements register themselves with their Document for special handling, if their document
565         ever changes then bad things can happen.
566
567         Unfortunately, with adoptNode, the document can change.  This has been a long standing crasher with all 
568         input fields but was given recent high visibility by r21430
569
570         The solution is to add functionality for a Node to react to its owner document changing via a pair of 
571         virtual callbacks.  Then we can tap into those callbacks in HTMLInputElement.
572
573         No layout test possible until http://bugs.webkit.org/show_bug.cgi?id=13672 is resolved
574
575         * dom/Node.cpp:
576         (WebCore::Node::setDocument): Call willMoveToNewOwnerDocument and didMoveToNewOwnerDocument
577
578         * dom/Node.h:
579         (WebCore::Node::willMoveToNewOwnerDocument): Virtual callback to a node for before an owner document change
580         (WebCore::Node::didMoveToNewOwnerDocument): Virtual callback to a node for after an owner document change
581
582         * html/HTMLInputElement.cpp:
583         (WebCore::HTMLInputElement::~HTMLInputElement): Unconditionally unregister both for both form state
584           and the cache restoration callback
585         (WebCore::HTMLInputElement::setInputType): Change registration with the document only if we're in one
586         (WebCore::HTMLInputElement::attach): Don't bother registering for the callback here - that will be
587           handled by setInputType() or by a change in owner document
588         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument): Unregister with the old owner document
589         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument): Register with the new owner document
590         * html/HTMLInputElement.h:
591
592 2007-05-13  Darin Adler  <darin@apple.com>
593
594         * platform/mac/TextBreakIteratorInternalICUMac.mm: Fix comment typo.
595
596 2007-05-13  Rob Buis  <buis@kde.org>
597
598         Reviewed by Darin.
599
600         http://bugs.webkit.org/show_bug.cgi?id=13529
601         DOM3 keyIdentifier text is incorrect
602
603         Use 4 digits for the Unicode based key identifiers.
604
605         * html/HTMLButtonElement.cpp:
606         (WebCore::HTMLButtonElement::defaultEventHandler):
607         * html/HTMLInputElement.cpp:
608         (WebCore::HTMLInputElement::defaultEventHandler):
609         * html/HTMLSelectElement.cpp:
610         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
611         * page/EventHandler.cpp:
612         (WebCore::EventHandler::defaultKeyboardEventHandler):
613         * page/gdk/EventHandlerGdk.cpp:
614         (WebCore::isKeyboardOptionTab):
615         * page/mac/EventHandlerMac.mm:
616         (WebCore::isKeyboardOptionTab):
617         * page/qt/EventHandlerQt.cpp:
618         (WebCore::isKeyboardOptionTab):
619         * platform/gdk/KeyEventGdk.cpp:
620         (WebCore::keyIdentifierForGdkKeyCode):
621         * platform/mac/KeyEventMac.mm:
622         (WebCore::keyIdentifierForKeyEvent):
623         * platform/qt/PlatformKeyboardEventQt.cpp:
624         (WebCore::keyIdentifierForQtKeyCode):
625         * platform/win/KeyEventWin.cpp:
626         (WebCore::keyIdentifierForWindowsKeyCode):
627         * platform/wx/KeyEventWin.cpp:
628         (WebCore::keyIdentifierForWindowsKeyCode):
629         * platform/wx/KeyboardEventWx.cpp:
630         (WebCore::keyIdentifierForWxKeyCode):
631
632 2007-05-12  Darin Adler  <darin@apple.com>
633
634         Reviewed by Antti.
635
636         - fix <rdar://problem/5174903> Safari crashes opening the attached webarchive (made by OmniWeb)
637
638         * loader/icon/IconLoader.cpp:
639         (WebCore::IconLoader::didReceiveResponse): Check ResourceHandle for nil before calling url() on it.
640         (WebCore::IconLoader::didFail): Ditto.
641         (WebCore::IconLoader::didFinishLoading): Ditto.
642
643 2007-05-12  Rob Buis  <buis@kde.org>
644
645         Reviewed by Oliver.
646
647         Cleanup, get rid of the SVGStyledElement::view() call.
648
649         * ksvg2/svg/SVGClipPathElement.cpp:
650         (WebCore::SVGClipPathElement::canvasResource):
651         * ksvg2/svg/SVGFEFloodElement.cpp:
652         (WebCore::SVGFEFloodElement::filterEffect):
653         * ksvg2/svg/SVGGradientElement.cpp:
654         (WebCore::SVGGradientElement::buildStops):
655         * ksvg2/svg/SVGStyledElement.cpp:
656         * ksvg2/svg/SVGStyledElement.h:
657
658 2007-05-12  Mitz Pettel  <mitz@webkit.org>
659
660         Reviewed by Hyatt.
661
662         - fix http://bugs.webkit.org/show_bug.cgi?id=13680
663           Incomplete repaint of focus ring around continuation
664
665         Test: fast/repaint/continuation-after-outline.html
666
667         * rendering/RenderFlow.cpp:
668         (WebCore::RenderFlow::absoluteClippedOverflowRect):
669
670 2007-05-12  Oliver Hunt  <oliver@apple.com>
671
672         Reviewed by Hyatt.
673
674         <rdar://problem/4728842> Can't drag-and-drop files onto <input type="file">
675         
676         This patch allows a file to be dropped on to a file input field.  There
677         are a few changes for data handling and a  few to allow the data to be
678         threaded to the appropriate places.
679
680         * page/DragController.cpp:
681         (WebCore::asFileInput):
682            When dropping a file onto a file input we may mouse over either 
683            the element itself, or the contained button element.  This method
684            returns the base element for the file input in either of these
685            cases.
686         (WebCore::DragController::tryDocumentDrag):
687            Don't try to set the drag caret to a file input.
688         (WebCore::DragController::concludeDrag):
689            Handle dropping onto a file input element.
690         (WebCore::DragController::canProcessDrag):
691            We can now process a file being dragged onto a file input element.
692            
693         * platform/DragData.h:
694            New accessors
695            
696         * platform/gdk/DragDataGdk.cpp:
697         (WebCore::DragData::containsFiles):
698         (WebCore::DragData::asFilenames):
699            Link stubs.
700            
701         * platform/mac/DragDataMac.mm:
702         (WebCore::DragData::containsFiles):
703         (WebCore::DragData::asFilenames):
704            Implement new accessors
705         (WebCore::DragData::containsCompatibleContent):
706            Update containsCompatibleContent to allow standalone files.
707           
708         * platform/qt/DragDataQt.cpp:
709         (WebCore::DragData::containsFiles):
710         (WebCore::DragData::asFilenames):
711            Link stubs
712                       
713         * rendering/RenderFileUploadControl.cpp:
714         (WebCore::RenderFileUploadControl::receiveDroppedFile):
715         * rendering/RenderFileUploadControl.h:
716            For security reasons we don't have an api to allow us to set 
717            a value directly on a file input -- attempts to do so are
718            blocked.  By adding a method to set the target through the 
719            render we bypass such restrictions, and ensure the renderer
720            is updated correctly.
721
722 2007-05-12  Mitz Pettel  <mitz@webkit.org>
723
724         Reviewed by Hyatt.
725
726         - fix http://bugs.webkit.org/show_bug.cgi?id=13695
727           REGRESSION (r21387): Replaced elements' highlight rects are wrongly positioned
728
729         Test: fast/replaced/selection-rect.html
730
731         Also fixes the same problem with list markers, covered by existing test
732         fast/lists/markers-in-selection.html.
733
734         * rendering/RenderListMarker.cpp:
735         (WebCore::RenderListMarker::selectionRect):
736         * rendering/RenderReplaced.cpp:
737         (WebCore::RenderReplaced::selectionRect):
738
739 2007-05-12  Mitz Pettel  <mitz@webkit.org>
740
741         Reviewed by Darin.
742
743         - fix http://bugs.webkit.org/show_bug.cgi?id=13685
744           REGRESSION (r21368-r21388): Highlighting text in scrolled textareas behaves oddly
745
746         Test: fast/repaint/text-selection-rect-in-overflow.html
747
748         * rendering/RenderText.cpp:
749         (WebCore::RenderText::selectionRect):
750
751 2007-05-12  Brady Eidson  <beidson@apple.com>
752
753         Rubber stamped by Mitz
754
755         * html/HTMLInputElement.cpp:
756         (WebCore::HTMLInputElement::attach): unregister->register - I screwed this one up in last minute renaming
757           before committing  :(
758
759 2007-05-11  Brady Eidson  <beidson@apple.com>
760
761         Reviewed by Darin and Geoff
762
763         Fix for http://bugs.webkit.org/show_bug.cgi?id=13630
764         and
765         <rdar://problem/4873628>
766
767         Back/Forward cache should work with pages with login fields.
768
769         First change is to relocate the "useSecureKeyboardEntry" flag to the document.  This lets
770         it persist through page cache transitions and it is truly a per-document concept more than
771         per-frame anyways since its the document that has a password field, not the frame.
772
773         Second change is to introduce the concept of an Element getting a "didRestoreFromCache()" callback.
774         The idea is for elements to register with the document if they need work to be done when the
775         page comes out of the back/forward cache.  Currently the only client of this service is 
776         HTMLInputElements that are input type == PASSWORD.  Such an element's implementation for this
777         method is to call reset()
778
779         Finally, after a page is restored from the cache we have the document send the didRestoreFromCache()
780         callback to its registered Elements.  The whole design is to clear the password fields after 
781         restoring the page instead of when caching the page because we want to defer work for the common
782         case - there shouldn't be extra work here just to navigate away from a page when the common case
783         is that you'll never go back!
784
785         No layout tests possible until http://bugs.webkit.org/show_bug.cgi?id=13672 is resolved
786
787         * dom/Document.cpp:
788         (WebCore::Document::Document):
789         (WebCore::Document::registerForDidRestoreFromCacheCallback): Add an Element to the special page-restoration callback list
790         (WebCore::Document::unregisterForDidRestoreFromCacheCallback): Remove such an element
791         (WebCore::Document::didRestoreFromCache): Called by FrameLoader - dispatch to all the registered elements
792         (WebCore::Document::setUseSecureKeyboardEntryWhenActive): Set the local flag and call updateSecureKeyboardEntryIfActive
793           on the Frame
794         (WebCore::Document::useSecureKeyboardEntryWhenActive): Return the flag
795
796         * dom/Document.h:
797         (WebCore::Document::unregisterFormElementWithState): Renamed
798
799         * dom/Element.h:
800         (WebCore::Element::didRestoreFromCache): Added virtual base method
801
802         * html/HTMLInputElement.cpp:
803         (WebCore::HTMLInputElement::~HTMLInputElement): Deregister from the document if inputType == PASSWORD
804         (WebCore::HTMLInputElement::dispatchFocusEvent): Set the flag on the document, not the frame
805         (WebCore::HTMLInputElement::dispatchBlurEvent): Ditto
806         (WebCore::HTMLInputElement::setInputType): If changing to/from PASSWORD, register/deregister in the document accordingly
807         (WebCore::HTMLInputElement::attach): Call registerForDidRestoreFromCacheCallback(this) instead of passwordFieldAdded()
808         (WebCore::HTMLInputElement::didRestoreFromCache): Call reset();
809         * html/HTMLInputElement.h:
810
811         * html/HTMLSelectElement.cpp:
812         (WebCore::HTMLSelectElement::~HTMLSelectElement): Renamed deregisterFormElementWithState to unregisterFormElementWithState
813         * html/HTMLTextAreaElement.cpp:
814         (WebCore::HTMLTextAreaElement::~HTMLTextAreaElement): Ditto
815
816         * loader/FrameLoader.cpp:
817         (WebCore::FrameLoader::canCachePage): Remove the check for password fields - they're allowed now!
818         (WebCore::FrameLoader::opened): Tell the document to dispatch to the registered elements
819         (WebCore::FrameLoader::saveDocumentState): Remove the check for password fields.  Turns out that when we grab a copy a the
820           form state we're only copying the state of form elements that are registered with the Document - and that set 
821           explicitly excludes Password elements
822
823         * page/Frame.cpp:
824         (WebCore::Frame::setDocument): If the frame is active, set the setUseSecureKeyboardEntry based on the setting contained
825           in the new document
826         (WebCore::Frame::updateSecureKeyboardEntryIfActive): Notification for the secure entry flag changing - if the Frame is
827           active, then update to the new setting from the document
828         (WebCore::Frame::setIsActive): Grab the useSecureKeyboardEntry flag from the document instead of FramePrivate
829         (WebCore::FramePrivate::FramePrivate):
830         * page/Frame.h:
831         * page/FramePrivate.h:
832
833 2007-05-12  David Hyatt  <hyatt@apple.com>
834
835         FIx for 13696.  Rework residual style to be much more aggressive about reopening.  Added
836         a comprehensive test case of HTML tags to guarantee we match Firefox.  We now have an exclusion
837         set rather than an inclusion set, so unknown future tags will also participate in residual style.
838
839         Reviewed by olliej
840
841         fast/invalid/residual-style.html
842
843 2007-05-12  David Hyatt  <hyatt@apple.com>
844
845         Fix for bug 12740, bmw.com doesn't work.  We were missing a rule that is covered by the HTML5
846         parsing spec.  A <table> encountered while inside stray table content should close up the
847         table responsible for the stray content and start the new table as a sibling of the first.
848
849         Reviewed by mjs
850
851         fast/invalid/table-inside-stray-table-content.html
852
853 2007-05-12  Eric Seidel  <eric@webkit.org>
854
855         Reviewed by mjs.
856
857         Crash starting Safari with JavaScript disabled.
858         http://bugs.webkit.org/show_bug.cgi?id=13691
859         
860         Test: none possible.
861
862         * page/mac/FrameMac.mm:
863         (WebCore::Frame::cleanupPlatformScriptObjects): NULL check d->m_script
864
865 2007-05-11  David Hyatt  <hyatt@apple.com>
866
867         Fix for http://bugs.webkit.org/show_bug.cgi?id=13688, Colloquy is broken!
868
869         Make sure to adjust the baseline of a percentage height table cell's row if the
870         cell flexes (and lowers the baseline).
871
872         Reviewed by olliej
873
874         fast/tables/vertical-align-baseline-readjust.html
875
876         (WebCore::RenderTableSection::calcRowHeight):
877         (WebCore::RenderTableSection::layoutRows):
878         * rendering/RenderTableSection.h:
879         (WebCore::RenderTableSection::getBaseline):
880         
881 2007-05-11  David Hyatt  <hyatt@apple.com>
882
883         Make sure focus rings are always using the exterior style, regardless
884         of what the OS default is.
885
886         Reviewed by beth
887
888         * rendering/RenderThemeMac.mm:
889         (WebCore::RenderThemeMac::checkbox):
890         (WebCore::RenderThemeMac::radio):
891         (WebCore::RenderThemeMac::popupButton):
892         (WebCore::RenderThemeMac::search):
893         (WebCore::RenderThemeMac::sliderThumbHorizontal):
894         (WebCore::RenderThemeMac::sliderThumbVertical):
895
896 2007-05-11  Oliver Hunt  <oliver@apple.com>
897
898         Reviewed by Hyatt.
899         
900         <rdar://problem/5195473> REGRESSION: "Curly quote" fails to 
901         be displayed correctly even when META tag specifies charset=x-mac-roman
902
903
904         * platform/TextCodecICU.cpp:
905         (WebCore::TextCodecICU::registerExtendedEncodingNames):
906         Register the xmacroman encoding
907
908 2007-05-11  Maciej Stachowiak  <mjs@apple.com>
909
910         Reviewed by Hyatt.
911
912         REGRESSION (r21367): Crash due to null document deref when closing bookmarks
913         http://bugs.webkit.org/show_bug.cgi?id=13662
914
915         * loader/FrameLoader.cpp:
916         (WebCore::FrameLoader::provisionalLoadStarted): Remove some useless and now harmful
917         code - there's no need to clear in this case.
918
919 2007-05-11  Oliver Hunt  <oliver@apple.com>
920
921         GDK Build fix
922
923         * ChangeLog:
924         * dom/Document.cpp:
925         (WebCore::Document::importNode):
926
927 2007-05-11  Maciej Stachowiak  <mjs@apple.com>
928
929         Reviewed by Geoff.
930         
931         - fixed <rdar://problem/5197621> closing second window crashed webkit (13660)
932         http://bugs.webkit.org/show_bug.cgi?id=13660
933
934         No test case; not testable.
935
936         * page/mac/FrameMac.mm:
937         (WebCore::Frame::cleanupPlatformScriptObjects): Check if the interpreter is null;
938         if so, we don't want to do work that may lazily create it while the Frame is being
939         destroyed.
940
941 2007-05-11  Oliver Hunt  <oliver@apple.com>
942
943         Reviewed by Brady.
944         
945         <rdar://problem/5017375> WebKit should disable SVG in Dashboard
946         
947         Prevents an SVG document or element from being created when in
948         dashboard compatibility mode.
949         
950         Manually parsing, or using XHR to created a document removes our 
951         ability to detect Dashboard compatibility mode, so we also perform
952         the check when importing nodes from one document into another.
953
954         * dom/DOMImplementation.cpp:
955         (WebCore::DOMImplementation::createDocument):
956           Don't create an SVGDocument if we're in dashboard compatibility mode
957           
958         * dom/Document.cpp:
959         (WebCore::Document::importNode):
960           Don't import SVG nodes if we're in dashboard compatibility mode
961           
962         * ksvg2/scripts/make_names.pl:
963           Don't create SVG elements for documents that are in dashboard
964           compatibility mode
965
966 2007-05-11  Holger Hans Peter Freyther  <zecke@selfish.org>
967
968         Reviewed by Maciej.
969
970         Bug 13676: [cairo/gdk] Provide implementation for ImageBufferCairo
971         http://bugs.webkit.org/show_bug.cgi?id=13676
972
973         There are no test cases that explicitly cover platform/graphics at present.
974
975         * platform/graphics/ImageBuffer.h: Add cairo bits
976         * platform/graphics/cairo/ImageBufferCairo.cpp: Untested implementation of the ImagerBuffer using the image_surface
977         (WebCore::ImageBuffer::create): Create a reasonable sized surface
978         (WebCore::ImageBuffer::ImageBuffer): Use a cairo_surface and create a GraphicsContext. GraphicsContext takes the cairo_t ownership
979         (WebCore::ImageBuffer::~ImageBuffer): Unref the surface
980         (WebCore::ImageBuffer::context): simply return the GraphicsContext, it should be possible to directly draw on it.
981
982 2007-05-11  Mitz Pettel  <mitz@webkit.org>
983
984         Release build fix.
985
986         * platform/mac/ShapeArabic.c:
987         (shapeArabic):
988
989 2007-05-11  Geoffrey Garen  <ggaren@apple.com>
990
991         Reviewed by Darin Adler.
992
993         Removed +[WebScriptObject scriptObjectForJSObject:frame:] because the
994         WebScriptObject API has some serious limitations that make it not ready
995         to be used everywhere the C API is used. Hopefully we can add a good
996         ObjC API in the future that doesn't suffer from this problem.
997         
998         Preliminary notes about these limitations are in <rdar://problem/4876466>.
999
1000         * bindings/objc/WebScriptObject.mm:
1001         * bindings/objc/WebScriptObjectPendingPublic.h:
1002
1003 2007-05-11  Mitz Pettel  <mitz@webkit.org>
1004
1005         Reviewed by Darin.
1006
1007         - fix http://bugs.webkit.org/show_bug.cgi?id=13635
1008           REGRESSION: Cannot log in to webmail.co.za account
1009
1010         Test: fast/dom/HTMLOptionElement/option-text.html
1011
1012         Despite the specification that the 'text' attribute of HTMLOptionElement
1013         is "the text contained within the option element", other browsers return
1014         the text as displayed in the list box or popup, which is without leading,
1015         trailing and collapsible whitespace.
1016
1017         * html/HTMLOptionElement.cpp:
1018         (WebCore::HTMLOptionElement::text): Moved the code to trim and collapse
1019         whitespace and replace backslashes with the currency symbol into this
1020         function.
1021         (WebCore::HTMLOptionElement::optionText): Left only the code that adds
1022         the leading spaces for grouped options. Removed code that, in quirks mode,
1023         displayed the label if the option element contained no text. That behavior
1024         did not match WinIE and the description of the expected behavior in
1025         fast/forms/HTMLOptionElement_label06.html.
1026
1027 2007-05-11  Mitz Pettel  <mitz@webkit.org>
1028
1029         Reviewed by Darin.
1030
1031         - fix http://bugs.webkit.org/show_bug.cgi?id=13572
1032           Arabic characters are not correctly joined when using Arial
1033
1034         No tests added because standard fonts do not use the character-based shaping
1035         code path.
1036
1037         Added shapeArabic(), a private version of u_shapeArabic() from ICU,
1038         patched to shape Arabic characters used in Persian, Urdu, Sindhi, etc.
1039         (whose contextual forms belong to the Arabic Presentation Forms-A block).
1040
1041         * WebCore.xcodeproj/project.pbxproj: Added ShapeArabic.{c,h}.
1042         * platform/mac/FontMac.mm:
1043         (WebCore::shapeArabic): Changed to call shapeArabic() instead of u_shapeArabic().
1044         * platform/mac/ShapeArabic.c: Added. Based on ushape.c from ICU, with
1045         additional shaping data and logic for Arabic Presentation Forms-A. Removed
1046         many options that are not used in WebKit and code that malloc()ed a temporary
1047         buffer and reversed the string.
1048         (changeLamAlef):
1049         (specialChar):
1050         (getLink):
1051         (isTashkeelChar):
1052         (shapeUnicode):
1053         (shapeArabic):
1054         * platform/mac/ShapeArabic.h: Added.
1055
1056 2007-05-11  Darin Adler  <darin@apple.com>
1057
1058         Reviewed by Mitz.
1059
1060         - fix http://bugs.webkit.org/show_bug.cgi?id=7452
1061           <rdar://problem/3211749> line breaks ignored after <wbr> in <pre> block (affects livejournal.com)
1062
1063         - fix http://bugs.webkit.org/show_bug.cgi?id=10657
1064           <rdar://problem/4274588> <wbr> tags are ignored
1065
1066         - fix http://bugs.webkit.org/show_bug.cgi?id=12689
1067           <wbr> :before/:after content causes line break
1068
1069         - fix <rdar://problem/5127366> DOM tree isn't correct when parsing with <wbr>
1070
1071         Test: fast/text/wbr-pre.html
1072         Test: fast/text/wbr.html
1073         Test: fast/css-generated-content/wbr-with-before-content.html
1074         Test: fast/parser/parse-wbr.html
1075
1076         * html/HTMLElement.h:
1077         * html/HTMLElement.cpp:
1078         (WebCore::HTMLElement::endTagRequirement): Use the same end tag requirement for a <wbr>
1079         element as for a <br> element, TagStatusForbidden.
1080         (WebCore::HTMLElement::tagPriority): Use the same priority for a <wbr> element as for a
1081         <br> element, 0.
1082         (WebCore::HTMLElement::createRenderer): Added. Create a RenderWordBreak to trigger the
1083         new rendering code paths.
1084
1085         * rendering/RenderFlow.h: Add a virtual isWordBreak so we can detect RenderWordBreak.
1086
1087         * rendering/RenderWordBreak.h: Added.
1088         * rendering/RenderWordBreak.cpp: Added.
1089
1090         * WebCore.pro: Added new files.
1091         * WebCore.xcodeproj/project.pbxproj: Added new files.
1092         * WebCoreSources.bkl: Added new files.
1093
1094         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::calcInlinePrefWidths): Reset the
1095         line when we hit a <wbr>.
1096         * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Add a line break when
1097         we hit a <wbr>.
1098
1099         * dom/Node.cpp: (Node::createRendererIfNeeded): Fix a null check for the case where
1100         createRenderer returns 0 even though rendererIsNeeded returned true. I can't reproduce
1101         it on demand, but while running layout tests I hit this once. Since there was already
1102         a null check here, I rearranged it so it guards all the code that uses the renderer.
1103         Later we might want to figure out under exactly what circumstances rendererIsNeeded
1104         will return true but createRenderer return 0 and consider eliminating them.
1105
1106 2007-05-11  David Hyatt  <hyatt@apple.com>
1107
1108         Fix for bug 13675, focus rings don't repaint properly on editable
1109         continuations.
1110
1111         Reviewed by olliej
1112
1113         (WebCore::InlineFlowBox::paint):
1114         * rendering/RenderBlock.cpp:
1115         (WebCore::RenderBlock::paintObject):
1116         (WebCore::continuationOutlineTable):
1117         (WebCore::RenderBlock::addContinuationWithOutline):
1118         (WebCore::RenderBlock::paintContinuationOutlines):
1119         * rendering/RenderBlock.h:
1120         * rendering/RenderBox.cpp:
1121         (WebCore::RenderBox::absoluteClippedOverflowRect):
1122         * rendering/RenderObject.cpp:
1123         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
1124         (WebCore::RenderObject::absoluteOutlineBox):
1125
1126 2007-05-11  Rob Buis  <buis@kde.org>
1127
1128         Reviewed by Oliver.
1129
1130         Cleanups mostly inspired by Coverage results.
1131
1132         * ksvg2/css/SVGCSSParser.cpp:
1133         (WebCore::CSSParser::parseSVGValue):
1134         (WebCore::CSSParser::parseSVGStrokeDasharray):
1135         * ksvg2/css/SVGRenderStyleDefs.cpp:
1136         (StyleFillData::operator==):
1137         * ksvg2/svg/SVGColor.cpp:
1138         (WebCore::SVGColor::colorFromRGBColorString):
1139
1140 2007-05-11  Holger Freyther <freyther@kde.org>
1141
1142         Reviewed by Mark Rowe.
1143
1144         Move libcurl configuration into WebKit.pri so it will be used by GdkLauncher.
1145
1146         * WebCore.pro:
1147
1148 2007-05-10  David Hyatt  <hyatt@apple.com>
1149
1150         <rdar://problem/5015522> Bounds rectangle of unloaded images is 
1151         drawn briefly while loading
1152         
1153         When the image is null and has no size, don't draw the grey
1154         rectangles or alt text any more.  Wait for an actual error to
1155         occur with the image before we start showing alt text and borders.
1156
1157         (Images with no source set at all will continue to show alt text and
1158         borders immediately.)
1159
1160         Reviewed by bradee-oh
1161
1162         * rendering/RenderImage.cpp:
1163         (WebCore::RenderImage::paint):
1164
1165 2007-05-10  Mitz Pettel  <mitz@webkit.org>
1166
1167         Reviewed by Darin.
1168
1169         - fix http://bugs.webkit.org/show_bug.cgi?id=13655
1170           Incomplete repaint when text-shadow is used in a render layer with explicit height
1171
1172         Test: fast/repaint/layer-full-repaint.html
1173
1174         Removed custom repaint logic from RenderLayer. repaintAfterLayoutIfNeeded()
1175         knows how to do everything we need now. The only catch is that we cannot
1176         rely on its "do a full repaint if the object needs layout" behavior, since
1177         by the time we call it, the needs layout flag has been reset. The solution
1178         is to cache the need for a full repaint in the layer.
1179
1180         * page/FrameView.cpp:
1181         (WebCore::FrameView::layout): Removed call to checkForRepaintOnResize().
1182         * rendering/RenderLayer.cpp:
1183         (WebCore::RenderLayer::checkForRepaintOnResize): Removed.
1184         (WebCore::RenderLayer::RenderLayer): Replaced the m_repaintOverflowOnResize
1185         flag with a m_needsFullRepaint flag, which indicates that the layer needs
1186         to do a full repaint in the next call to updateLayerPositions().
1187         (WebCore::RenderLayer::updateLayerPositions): Simplified the repaint logic.
1188         Either call repaintAfterLayoutIfNeeded() or do a full repaint, depending on
1189         m_needsFullRepaint.
1190         * rendering/RenderLayer.h:
1191         (WebCore::RenderLayer::setNeedsFullRepaint):
1192         * rendering/RenderObject.cpp:
1193         (WebCore::RenderObject::setNeedsLayout): Mark the layer for full repaint.
1194
1195 2007-05-10  Justin Garcia  <justin.garcia@apple.com>
1196
1197         Reviewed by ggaren
1198
1199         <rdar://problem/5195166> Incorrect proposedRange DOMRange passed to WebViewEditing delegate
1200         
1201         In setModifyBias, we must cache the start and the end 
1202         because the calls to setBase and setExtent can modify 
1203         them (added a testcase).
1204         The temporary SelectionController that we use in modify() to
1205         produce the proposed range that will be passed to 
1206         shouldChangeSelectedDOMRange must have the same m_modifyBias
1207         as the original SelectionController, or else when the 
1208         modification is performed, setModifyBias can swap the base 
1209         and the extent incorrectly (added a testcase).
1210         Renamed m_modifyBias to m_lastChangeWasHorizontalExtension.
1211         Renamed setModifyBias to willBeModified.
1212
1213         * editing/SelectionController.cpp:
1214         (WebCore::SelectionController::SelectionController):
1215         (WebCore::SelectionController::setSelection):
1216         (WebCore::SelectionController::willBeModified):
1217         (WebCore::SelectionController::modify):
1218         * editing/SelectionController.h:
1219         (WebCore::SelectionController::setLastChangeWasHorizontalExtension):
1220         * page/EventHandler.cpp:
1221         (WebCore::EventHandler::handleMousePressEventSingleClick):
1222         (WebCore::EventHandler::updateSelectionForMouseDragOverPosition):
1223
1224 2007-05-10  Geoffrey Garen  <ggaren@apple.com>
1225
1226         Reviewed by Darin Adler.
1227
1228         "IconDatabase::sharedIconDatabase()" => "iconDatabase()" for terseness,
1229         in the style of WebCore::cache().
1230
1231         * WebCore.exp:
1232         * history/HistoryItem.cpp: Removed retainIconInDatabase because calling
1233         "retain" in order to release something is really confusing and, now that
1234         iconDatabase() is more terse, we don't need this helper to shorten the
1235         syntax. (The isEmpty() check is also done by the database, so we don't 
1236         need it either.)
1237
1238         (WebCore::IconDatabase::~IconDatabase): ASSERT that our destructor isn't
1239         called. We're a singleton, so it's confusing to have tear-down code.
1240
1241 2007-05-10  Adele Peterson  <adele@apple.com>
1242
1243         Reviewed by Hyatt.
1244
1245         WebCore part of fix for <rdar://problem/4100616> Doing a "find" in RSS doesn't scroll to result
1246
1247         Test: fast/overflow/scroll-nested-positioned-layer-in-overflow.html
1248
1249         Merged visibleSelectionRect into selectionRect.  selectionRect() now takes an argument to determine
1250         whether or not to return a rect that clips to the visible content.  This change makes all of the implementations of selectionRect
1251         consistent by having them all consider the repaint rect when clipping to visible content.
1252
1253         * page/Frame.cpp:
1254         (WebCore::Frame::revealSelection): Call selectionRect with clipToVisibleContent = false, so we can get a rect that's not visible to reveal.
1255         (WebCore::Frame::selectionRect): Added clipToVisibleContent argument, and merged visibleSelectionRect into this method.
1256         (WebCore::Frame::setIsActive): Use selectionRect instead of visibleSelectionRect.
1257         * page/Frame.h:
1258         * page/mac/FrameMac.mm: (WebCore::Frame::selectionImage): Update layout before creating the image.  Use selectionRect instead of visibleSelectionRect.
1259         * page/DragController.cpp: (WebCore::dragLocForSelectionDrag): Use selectionRect instead of visibleSelectionRect.
1260
1261         * rendering/RenderBR.h: (WebCore::RenderBR::selectionRect): Updated argument.
1262         * rendering/RenderBlock.h: (WebCore::RenderBlock::selectionRect): ditto.
1263         * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::selectionRect): ditto.
1264         * rendering/RenderSVGInlineText.h: ditto.
1265         * rendering/RenderObject.h: 
1266         (WebCore::RenderObject::selectionRect): ditto.
1267         (WebCore::RenderObject::SelectionInfo::SelectionInfo): ditto.
1268         * rendering/RenderView.cpp:
1269         (WebCore::RenderView::selectionRect): ditto.
1270         (WebCore::RenderView::setSelection): ditto.
1271         * rendering/RenderView.h:
1272
1273         * rendering/RenderText.h:
1274         * rendering/RenderText.cpp: (WebCore::RenderText::selectionRect): Only call computeAbsoluteRepaintRect when clipping to visible content.
1275         Otherwise, just adjust the rect to the correct position.
1276         * rendering/RenderListMarker.h:
1277         * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::selectionRect):
1278           To match what we do in RenderText, if we're trying to clip to visible content, just call computeAbsoluteRepaintRect.
1279         * rendering/RenderReplaced.h:
1280         * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::selectionRect): ditto.
1281
1282         * 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 
1283           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.
1284           This will prevent us from revealing text hidden by the slider in Safari RSS.
1285
1286         * WebCore.exp: Update symbols for WebKit.
1287
1288 2007-05-10  David Hyatt  <hyatt@apple.com>
1289
1290         Fix for:
1291
1292         <rdar://problem/5195272> REGRESSION: broke outline rings for continuations 
1293         with empty inline containers
1294         
1295         http://bugs.webkit.org/show_bug.cgi?id=13667
1296
1297         Make sure to only include collapsed top/bottom margins of the block portion
1298         of the continuation if we know for sure that we have inline line boxes before
1299         and after that would prevent the collapse from going further.
1300
1301         In plain English: the focus rings were too tall. :)
1302
1303         Reviewed by beth
1304
1305         * rendering/RenderFlow.cpp:
1306         (WebCore::RenderFlow::addFocusRingRects):
1307
1308 2007-05-10  David Hyatt  <hyatt@apple.com>
1309
1310         Fix for:
1311
1312         <rdar://problem/5067235> REGRESSION: Excessively wide table, impossible to resize
1313
1314         The table used white-space: pre-wrap, which is supported only by WebKit.  There
1315         was a bug with the computation of min pref width for pre-wrap text.
1316
1317         Reviewed by mitzpettel
1318
1319         fast/text/white-space/pre-wrap-line-test.html
1320
1321         * rendering/RenderText.cpp:
1322         (WebCore::RenderText::calcPrefWidths):
1323
1324 2007-05-10  Brady Eidson  <beidson@apple.com>
1325
1326         Reviewed by Oliver
1327
1328         Cleanup from my earlier Java Applet patch.  We should keep a central location to query if 
1329         a mime type counts as a Java Applet
1330
1331         * html/HTMLObjectElement.cpp:
1332         (WebCore::HTMLObjectElement::containsJavaApplet): Query MimeTypeRegistry on the type
1333
1334         * platform/MimeTypeRegistry.cpp:
1335         (WebCore::MimeTypeRegistry::isSupportedImageMIMEType): Update style
1336         (WebCore::MimeTypeRegistry::isSupportedImageResourceMIMEType): Ditto
1337         (WebCore::MimeTypeRegistry::isSupportedNonImageMIMEType): Ditto
1338         (WebCore::MimeTypeRegistry::isJavaAppletMIMEType): Perform the Java Applet check
1339         * platform/MimeTypeRegistry.h:
1340
1341         * rendering/RenderPartObject.cpp:
1342         (WebCore::RenderPartObject::updateWidget): Query MimeTypeRegistry on the type
1343
1344 2007-05-10  Patti Hoa  <patti@apple.com>
1345
1346         Reviewed by Darin.
1347         
1348         <rdar://problem/4720109> Sentence textMarker methods do not work well with empty lines
1349         
1350         * bridge/mac/WebCoreAXObject.mm:
1351         (-[WebCoreAXObject doAXNextSentenceEndTextMarkerForTextMarker:]):
1352         (-[WebCoreAXObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
1353         When a marker position is given, the sentence ax methods automatically shift position by one to make sure
1354         not to ask for the current sentence again.  This is generally fine except when the position
1355         shift over an empty line break, which is should be considered a separate sentence. In this case, 
1356         if we used the shifted position to ask for sentence boundary, ICU parser is not given the text data
1357         containing the newline to correctly determine the sentence boundary.  Since the ax sentence method is 
1358         explicitly shifting the position to ask for sentence boundary, it should make sure not to skip over important
1359         character that can be a standalone sentence.
1360         * editing/visible_units.cpp:
1361         (WebCore::nextBoundary):
1362         When determining boundary, don't stop on a collapsed range, such as newline.  
1363         Just pick the next valid position to use as boundary.
1364
1365 2007-05-10  Maciej Stachowiak  <mjs@apple.com>
1366
1367         Reviewed by Oliver.
1368
1369         - WebCore part of fix for:
1370         <rdar://problem/5063277> blank screen after login to Citibank Online (accessing document before frame starts loading cancels load)
1371         <rdar://problem/5159541> REGRESSION (r20972): Wall Street Journal pages replaced by advertisements (13465)
1372
1373         The basic approach is to have Frames start out containing an empty document instead of absolutely nothing,
1374         so there is no need to initialize them on demand. Various side effects of that cause both of these bugs.
1375         
1376         However, this caused many regressions so I had to fix the fallout.
1377         
1378         * WebCore.exp: fix symbol exports
1379         * bindings/js/kjs_window.cpp:
1380         (KJS::createNewWindow): useless "created" bool (we don't need it here)
1381         (KJS::WindowFunc::callAsFunction): detect if we created a new frame, because if so,
1382         we need to initialize the domain (can't count on it not having a document), also
1383         don't try to make a new document for it.
1384         Also, stop properly.
1385         * css/cssstyleselector.cpp:
1386         (WebCore::CSSStyleSelector::CSSStyleSelector): don't count on document having a view here
1387         * html/HTMLObjectElement.cpp:
1388         (WebCore::HTMLObjectElement::isImageType): Ask client, to match how other <object> renderer
1389         decisions are made.
1390         * loader/FrameLoader.cpp:
1391         (WebCore::FrameLoader::FrameLoader): Initialize new data members
1392         (WebCore::FrameLoader::init): Do the slightly tricky sequence of steps to properly make
1393         an empty document with everything hooked up.
1394         (WebCore::FrameLoader::createWindow): Added "created" bool.
1395         (WebCore::FrameLoader::stopLoading): (whitespace change)
1396         (WebCore::FrameLoader::begin): Don't try to create an empty document.
1397         (WebCore::FrameLoader::finishedParsing): If creating an initial empty document, don't
1398         do any of this work.
1399         (WebCore::FrameLoader::checkCompleted): Do checkLoadComplete() as well.
1400         (WebCore::FrameLoader::baseURL): don't check for null document
1401         (WebCore::FrameLoader::baseTarget): ditto
1402         (WebCore::FrameLoader::completeURL): ditto
1403         (WebCore::FrameLoader::didTellBridgeAboutLoad): ditto
1404         (WebCore::FrameLoader::scheduleLocationChange): determine duringLoad differently; doc won't
1405         be null.
1406         (WebCore::FrameLoader::gotoAnchor): don't check for null document
1407         (WebCore::FrameLoader::canTarget): don't check for null document
1408         (WebCore::FrameLoader::stopForUserCancel): new method for explicit stops like window.stop().
1409         (WebCore::FrameLoader::transitionToCommitted): check for pre-loaded state properly
1410         (WebCore::FrameLoader::createEmptyDocument): removed
1411         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): don't send delegate callbacks when making initial
1412         doc.
1413         (WebCore::FrameLoader::tokenizerProcessedData): Assume document; just checkCompleted now that it
1414         does checkLoadComplete.
1415         (WebCore::FrameLoader::receivedMainResourceError): assume document
1416         (WebCore::FrameLoader::saveDocumentState): Assume there's a document except during initial load
1417         (WebCore::FrameLoader::mainReceivedCompleteError): do checkCompleted, not checkLoadComplete
1418         (WebCore::FrameLoader::continueLoadWithData): assume document
1419         * loader/FrameLoader.h:
1420         * loader/MainResourceLoader.cpp:
1421         (WebCore::MainResourceLoader::receivedError): Add more ref protection and do things in a slightly
1422         different order.
1423         * page/DOMWindow.cpp:
1424         (WebCore::DOMWindow::document): don't force document creation, just assert there is one.
1425         * page/Frame.cpp:
1426         (WebCore::Frame::init): Added init method.
1427         (WebCore::Frame::pageDestroyed): when a frame is removed, make sure to check if the parent is
1428         done loading.
1429         * page/Frame.h:
1430         * page/mac/WebCoreFrameBridge.mm:
1431         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]): No need to force
1432         document.
1433         (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]): ditto
1434         * platform/graphics/svg/SVGImage.cpp:
1435         (WebCore::SVGImage::dataChanged): init the frame
1436         * rendering/RenderPart.cpp:
1437         (WebCore::RenderPart::updateWidgetPosition): If a subframe needs layout, then lay it out even
1438         if the bounds did not change; the content size might be wrong.
1439         * rendering/RenderTreeAsText.cpp:
1440         (WebCore::externalRepresentation): Don't crash if the frame lacks a view.
1441
1442 2007-05-10  David Hyatt  <hyatt@apple.com>
1443
1444         Fix for:
1445
1446         <rdar://problem/5146757> REGRESSION: div that wrapped to screen width in 
1447         tiger no longer wraps
1448         
1449         http://bugs.webkit.org/show_bug.cgi?id=13654
1450
1451         Reviewed by mitz
1452
1453         fast/text/whitespace/normal-after-nowrap-breaking.html
1454
1455         * rendering/RenderBlock.cpp:
1456         (WebCore::RenderBlock::calcInlinePrefWidths):
1457
1458 2007-05-10  David Hyatt  <hyatt@apple.com>
1459
1460         Fix for:
1461
1462         <rdar://problem/4778099> Links with nested continuations fail to 
1463         paint their outlines (11255)
1464         
1465         http://bugs.webkit.org/show_bug.cgi?id=11255
1466
1467         Fix multiple bugs with outline painting of continuations to ensure that
1468         all combos work (empty/full inline - block with/without margins - 
1469         empty/full inline).
1470
1471         Reviewed by mitz
1472
1473         fast/inline/continuation-outlines.html
1474
1475         * rendering/RenderBlock.cpp:
1476         (WebCore::RenderBlock::paintObject):
1477         * rendering/RenderFlow.cpp:
1478         (WebCore::RenderFlow::addFocusRingRects):
1479
1480 2007-05-10  David Hyatt  <hyatt@apple.com>
1481
1482         Fix for:
1483
1484         <rdar://problem/5193529> REGRESSION: RTL Overflows scrollbar not showing 
1485         when they should be
1486         
1487         Fallout from fix for bug 11926.  Make sure to restrict the fix to the
1488         RenderView for now, since the full-blown overflow case is pretty involved.
1489
1490         Reviewed by mitzpettel
1491
1492         fast/overflow/unreachable-content-bug-rtl.html
1493
1494         * rendering/RenderBlock.cpp:
1495         (WebCore::RenderBlock::lowestPosition):
1496         (WebCore::RenderBlock::rightmostPosition):
1497         (WebCore::RenderBlock::leftmostPosition):
1498
1499 2007-05-10  Brady Eidson <beidson@apple.com>
1500
1501         Reviewed by Oliver
1502
1503         Fix for http://bugs.webkit.org/show_bug.cgi?id=13636 and <rdar://problem/5190816>
1504
1505         When creating the applets collection, be sure to only count Objects if they contain
1506         a java applet
1507
1508         * html/HTMLCollection.cpp:
1509         (WebCore::HTMLCollection::traverseNextItem): Add the qualifier for Objects that 
1510           containsJavaApplet() must be true
1511
1512         * html/HTMLObjectElement.cpp:
1513         (WebCore::HTMLObjectElement::containsJavaApplet): Check this Object element and inner
1514           nodes for any Java applets
1515         * html/HTMLObjectElement.h: 
1516
1517 2007-05-10  David Hyatt  <hyatt@apple.com>
1518
1519         Fix for:
1520
1521         <rdar://problem/4694859> SAP: HTML tags with overflow:hidden consume
1522         space on page, do not consume space in Firefox (11926)
1523
1524         http://bugs.webkit.org/show_bug.cgi?id=11926
1525
1526         Make sure that unreachable objects along one axis (e.g., top/left) do not
1527         contribute to the scrollable area in the opposite axis (e.g., right/bottom).
1528
1529         Reviewed by olliej
1530
1531         fast/overflow/unreachable-content-test.html
1532
1533         * rendering/RenderBlock.cpp:
1534         (WebCore::RenderBlock::lowestPosition):
1535         (WebCore::RenderBlock::rightmostPosition):
1536         (WebCore::RenderBlock::leftmostPosition):
1537
1538 2007-05-10  David Hyatt  <hyatt@apple.com>
1539
1540         Fix for:
1541
1542         <rdar://problem/4656825> REGRESSION: Japanese TV time table widget:
1543         part of the number in background has been cut off.
1544
1545         Now that opacity uses a tight bounding box to clip, we need to make sure
1546         to factor spillout caused by negative letter spacing into our right
1547         overflow.  Latch on to the code that does this already for text-stroke
1548         and text-shadow.
1549
1550         Reviewed by olliej
1551
1552         fast/text/letter-spacing-negative-opacity.html
1553
1554        * rendering/InlineFlowBox.cpp:
1555         (WebCore::InlineFlowBox::placeBoxesHorizontally):
1556
1557 2007-05-10  Geoffrey Garen  <ggaren@apple.com>
1558
1559         Reviewed by Maciej Stachowiak.
1560         
1561         More fix-ups to the WebScriptObject/WebScripting APIs, related to
1562         <rdar://problem/5140447> API for fetching JSGlobalContextRef from WebView 
1563         or WebFrame
1564
1565         * bindings/objc/WebScriptObject.h: Fully specified the surprising rules for
1566         type conversion between JavaScript and ObjC.
1567         * bindings/objc/WebScriptObject.mm: Added up-call accessor to WebFrame.
1568         This is kind of stinky, but I'm OK with it because eventually all of this
1569         code should move up into WebKit.
1570         (+[WebScriptObject scriptObjectForJSObject:frame:]):
1571         (-[WebScriptObject valueForKey:]):
1572         (-[WebScriptObject JSObject]): 
1573             - Added _rootObject check because if _rootObject returns NULL it means 
1574             that _imp is no longer GC protected, so it's not safe to use. 
1575             - Added _isSafeScript check because that's what WebScriptObject methods
1576             typically do, even though the value of doing so isn't clear to me.
1577         * bindings/objc/WebScriptObjectPendingPublic.h: Added WebFrame* parameter
1578         to -scriptObjectForJSObject:. This is required to wrap JS objects that
1579         are not already in the wrapper cache. It would be nice to remove this
1580         limitation of WebScriptObject some day.
1581         * page/mac/FrameMac.mm:
1582         (WebCore::Frame::cleanupPlatformScriptObjects): Force removal of m_windowScriptObject
1583         from the cache, to avoid retrieving the m_windowScriptObject from the previous
1584         page on a new page load. (It would be non-functional in that case.)
1585
1586 2007-05-10  David Hyatt  <hyatt@apple.com>
1587
1588         Fix for <rdar://problem/5183697>.
1589
1590         http://bugs.webkit.org/show_bug.cgi?id=13576
1591
1592         Make sure verticalPositionHint is not called on an inline-block from
1593         content inside the inline-block (like text).
1594
1595         Reviewed by olliej
1596
1597         fast/inline-block/inline-block-vertical-align.html
1598
1599         * rendering/RenderObject.cpp:
1600         (WebCore::RenderObject::verticalPositionHint):
1601         * rendering/RenderText.cpp:
1602         (WebCore::RenderText::verticalPositionHint):
1603         * rendering/RenderThemeMac.mm:
1604         (WebCore::RenderThemeMac::setFontFromControlSize):
1605
1606 2007-05-09  Holger Freyther <zecke@selfish.org>
1607
1608         Reviewed by Mark Rowe.
1609
1610         Gdk build fix with SVG enabled.  Stub out ImageBufferCairo.
1611
1612         * WebCore.pro: Build ImageBufferCairo.cpp
1613         * platform/graphics/cairo/ImageBufferCairo.cpp: Added.
1614         (WebCore::ImageBuffer::create):
1615         (WebCore::ImageBuffer::~ImageBuffer):
1616         (WebCore::ImageBuffer::context):
1617
1618 2007-05-08  Justin Garcia  <justin.garcia@apple.com>
1619
1620         Reviewed by darin
1621         
1622         <rdar://problem/5017613> Style changes don't effect fully selected ToDo content
1623
1624         * editing/ApplyStyleCommand.cpp:
1625         (WebCore::ApplyStyleCommand::applyInlineStyle):
1626         Use a for loop instead of while(1).
1627         Simplify loop termination using Range::pastEndNode.
1628         Don't handle the start.node() == end.node() case 
1629         specially, it's unnecessary.
1630         Apply the style change to fully selected plaintext-only
1631         regions, not with wrapper spans inside the region, but 
1632         by changing the element's inline style declaration.
1633         Don't descend into nodes whose children we should ignore.
1634
1635 2007-05-09  Adele Peterson  <adele@apple.com>
1636
1637         Reviewed by Hyatt.
1638
1639         Fix for <rdar://problem/5113578> REGRESSION: textfields that set the height but not the font 
1640         look different from IE & FF because the font is small
1641
1642         For plain text fields, don't stretch the inner text box.  Center it vertically in the field.
1643
1644         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::layout):
1645
1646 2007-05-09  Atul Mehrotra  <atul.mehrotra@celunite.com>
1647
1648         Gdk build fix.
1649
1650         * platform/gdk/TemporaryLinkStubs.cpp:
1651         (Editor::newGeneralClipboard):
1652
1653 2007-05-09  Mitz Pettel  <mitz@webkit.org>
1654
1655         Reviewed by Dave Hyatt.
1656
1657         - fix http://bugs.webkit.org/show_bug.cgi?id=13037
1658           REGRESSION: Copy-on-scroll not reset properly after back/forward navigation
1659
1660         * page/FrameView.cpp:
1661         (WebCore::FrameViewPrivate::FrameViewPrivate): Moved initialization of
1662         m_slowRepaintObjectCount here.
1663         (WebCore::FrameViewPrivate::reset): Do not reset the slow repaint object
1664         count here.
1665         (WebCore::FrameView::useSlowRepaints):
1666         (WebCore::FrameView::addSlowRepaintObject):
1667         (WebCore::FrameView::removeSlowRepaintObject): Added an assertion that the
1668         object count is positive.
1669         * rendering/RenderObject.cpp:
1670         (WebCore::RenderObject::setStyle): Corrected a mix up between old and new
1671         style, which caused the object count to be decremented when it was supposed
1672         to be incremented and vice versa.
1673
1674 2007-05-09  Peter Müller <pm@one.com>
1675
1676         Reviewed by Dave Hyatt.
1677
1678         Changed the hardcoded colors that are used for CSS 2.1 system colors.
1679         Previous colors had numerous conflicts in semantic pairs, which
1680         made text invisible in highlight, info and menu colored areas.
1681         The new hardcoded colors are inspired by Aqua.
1682
1683         Ideally these colors should be fetched through AppKit instead,
1684         though I am not sure if it is possible to make a 1:1 mapping
1685         between CSS2.1 system colors and Mac OS X.
1686
1687         * css/cssstyleselector.cpp:
1688         (WebCore::):
1689
1690 2007-05-09  Lars Knoll <lars@trolltech.com>
1691
1692         Fix the Qt build.
1693
1694         * editing/qt/EditorQt.cpp:
1695
1696 2007-05-08  Geoffrey Garen  <ggaren@apple.com>
1697
1698         Reviewed by Darin Adler.
1699         
1700         More fix-ups to the WebScriptObject/WebScripting APIs, related to
1701         <rdar://problem/5140447> API for fetching JSGlobalContextRef from WebView 
1702         or WebFrame
1703         
1704         1. Added -scriptObjectForJSObject: SPI so you can bridge back from JavaScriptCore
1705         to WebScriptObject.
1706         
1707         2. Fixed WebScriptObject bridging so that you always get the same WebScriptObject
1708         for a JSObject (like in the DOM). This makes -scriptObjectForJSObject: a
1709         lot more coherent as an API.
1710
1711         * bindings/objc/DOMInternal.mm: Renamed wrapperCache to DOMWrapperCache
1712         to distinguish from the JSWrapperCache. Added typedef for readability.
1713         (WebCore::getDOMWrapper):
1714         (WebCore::addDOMWrapper):
1715         (WebCore::removeDOMWrapper):
1716         * bindings/objc/WebScriptObject.mm: Added JSWrapperCache, which works just
1717         like the DOMWrapperCache.
1718         (WebCore::getJSWrapper):
1719         (WebCore::addJSWrapper):
1720         (WebCore::removeJSWrapper):
1721         (WebCore::createJSWrapper):
1722         (+[WebScriptObject scriptObjectForJSObject:]): This is the new API. It attempts
1723         to return a specific DOM wrapper object, or, barring that, it returns a 
1724         generic WebScriptObject.
1725         (+[WebScriptObject scriptObjectForJSObject:originRootObject:rootObject:]):
1726         Added this method to support our old WebScriptObject security and leak 
1727         checking model, even though it doesn't work very well. 
1728         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
1729         (-[WebScriptObject dealloc]):
1730         (-[WebScriptObject finalize]):
1731         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1732         * bindings/objc/WebScriptObjectPendingPublic.h:
1733         * bindings/objc/WebScriptObjectPrivate.h:
1734         * page/mac/FrameMac.mm:
1735         (WebCore::Frame::windowScriptObject): Changed to use the new API. This
1736         fixes a bug where the object sent to -windowScriptObjectAvailable: and returned
1737         from -windowScriptObject could not be round-tripped.
1738
1739 2007-05-09  Mark Rowe  <mrowe@apple.com>
1740
1741         Build fix.
1742
1743         * editing/Editor.cpp:
1744         (WebCore::findFirstGrammarDetailInRange): Use unsigned rather than int.
1745         (WebCore::findFirstBadGrammarInRange): Cast to unsigned in assertion.
1746         (WebCore::isRangeUngrammatical): Remove unused variables.
1747
1748 2007-05-08  Oliver Hunt  <oliver@apple.com>
1749
1750         Reviewed by Darin.
1751         
1752         Fix <rdar://problem/5188938> arc method on Canvas causes hang or crash
1753         
1754         Workaround bad behaviour of CGPathAddArc when passed inf as start or
1755         end angles.
1756
1757         * platform/graphics/cg/PathCG.cpp:
1758         (WebCore::Path::addArc):
1759
1760 2007-05-08  Darin Adler  <darin@apple.com>
1761
1762         Reviewed by Hyatt and Hatcher.
1763
1764         - fix auto-activation code path so Tiger and Leopard aren't different
1765
1766         * platform/mac/WebFontCache.mm: (+[WebFontCache fontWithFamily:traits:size:]):
1767         Do the auto-activation dance first before doing anything else, and ignore the
1768         font that it returns.
1769
1770 2007-05-08  Steve Falkenburg  <sfalken@apple.com>
1771
1772         Reviewed by Darin.
1773
1774         Moved most spelling/grammar logic to C++.  Now calls through to
1775         WebKit to actually invoke NSSpellChecker.
1776
1777         * editing/Editor.cpp:
1778         (WebCore::Editor::ignoreSpelling): Added (ported from EditorMac).
1779         (WebCore::Editor::learnSpelling): Added (ported from EditorMac).
1780         (WebCore::findFirstMisspellingInRange): Added (ported from EditorMac).
1781         (WebCore::paragraphAlignedRangeForRange): Added (ported from EditorMac).
1782         (WebCore::findFirstGrammarDetailInRange): Added (ported from EditorMac).
1783         (WebCore::findFirstBadGrammarInRange): Added (ported from EditorMac).
1784         (WebCore::Editor::advanceToNextMisspelling): Added (ported from EditorMac).
1785         (WebCore::Editor::isSelectionMisspelled): Added (ported from EditorMac).
1786         (WebCore::isRangeUngrammatical): Added (ported from EditorMac).
1787         (WebCore::Editor::isSelectionUngrammatical): Added (ported from EditorMac).
1788         (WebCore::Editor::guessesForUngrammaticalSelection): Added (ported from EditorMac).
1789         (WebCore::Editor::guessesForMisspelledSelection): Added (ported from EditorMac).
1790         (WebCore::Editor::showSpellingGuessPanel): Added (ported from EditorMac).
1791         (WebCore::Editor::spellingPanelIsShowing): Added (ported from EditorMac).
1792         (WebCore::Editor::markMisspellingsAfterTypingToPosition): Added (ported from EditorMac).
1793         (WebCore::markAllMisspellingsInRange): Added (ported from EditorMac).
1794         (WebCore::markAllBadGrammarInRange): Added (ported from EditorMac).
1795         (WebCore::markMisspellingsOrBadGrammar): Added (ported from EditorMac).
1796         (WebCore::Editor::markMisspellings): Added (ported from EditorMac).
1797         (WebCore::Editor::markBadGrammar): Added (ported from EditorMac).
1798         * editing/mac/EditorMac.mm: Removed Objective C version of spelling/grammar calls.
1799
1800 2007-05-08  Steve Falkenburg  <sfalken@apple.com>
1801
1802         Reviewed by Ada.
1803
1804         Slight modification to last editor method fix.
1805
1806         * bridge/EditorClient.h:
1807         * platform/gdk/EditorClientGdk.cpp:
1808         (WebCore::EditorClientGdk::updateSpellingUIWithGrammarString):
1809         * platform/gdk/EditorClientGdk.h:
1810         * platform/graphics/svg/SVGImageEmptyClients.h:
1811         (WebCore::SVGEmptyEditorClient::updateSpellingUIWithGrammarString):
1812
1813 2007-05-08  Alexey Proskuryakov  <ap@webkit.org>
1814
1815         Reviewed by Hyatt.
1816
1817         http://bugs.webkit.org/show_bug.cgi?id=13480
1818         window.Attr is undefined
1819
1820         Test: fast/dom/Window/attr-constructor.html
1821
1822         * dom/Attr.idl:
1823         * dom/CDATASection.idl:
1824         * dom/CharacterData.idl:
1825         * dom/Comment.idl:
1826         * dom/DOMImplementation.idl:
1827         * dom/DocumentType.idl:
1828         * dom/Entity.idl:
1829         * dom/EntityReference.idl:
1830         * dom/Notation.idl:
1831         * dom/ProcessingInstruction.idl:
1832         * dom/Text.idl:
1833         Added GenerateConstructor.
1834
1835         * page/DOMWindow.idl: Added constructor properties for DOM interfaces.
1836
1837 2007-05-07  Geoffrey Garen  <ggaren@apple.com>
1838
1839         Reviewed by Maciej Stachowiak.
1840
1841         Fixed <rdar://problem/5140447> API for fetching JSGlobalContextRef from 
1842         WebView or WebFrame
1843         
1844         Added support for new -[WebScriptObject JSObject] and -[WebFrame globalContext]
1845         APIs.
1846         
1847         Also fixed some more cases of <rdar://problem/4395622> API: 
1848         WebScriptObject.h incorrectly reports that -isSelectorExcludedFromWebScript 
1849         returns NO by default, and generally cleaned up that documentation.
1850
1851         * WebCore.exp: A lot of the diff here is from sorting.
1852         * WebCore.xcodeproj/project.pbxproj:
1853         * bindings/objc/WebScriptObject.h:
1854         * bindings/objc/WebScriptObject.mm:
1855         (-[WebScriptObject JSObject]):
1856         * bindings/objc/WebScriptObjectPendingPublic.h: Added.
1857
1858 2007-05-08  Lars Knoll <lars@trolltech.com>
1859
1860         Reviewed by Hyatt.
1861
1862         Fix valgrind reported uninitialized memory read.
1863
1864         * rendering/RenderText.cpp:
1865         (WebCore::RenderText::RenderText):
1866
1867 2007-05-07  Justin Garcia  <justin.garcia@apple.com>
1868
1869         Reviewed by oliver
1870
1871         <rdar://problem/4895428> Can't drag selected ToDo
1872         
1873         The user tries to drag a selection by mousing down
1874         on the editable part of a ToDo, which is focusable,
1875         since it is an editable node within non-editable 
1876         content.  But we focus focusable elements on mouse 
1877         down, and focusing the editable piece blows away 
1878         the selection and prevents the drag. This is how 
1879         IE behaves, but content seems generally difficult 
1880         to drag in IE, so this doesn't make it any worse.
1881         
1882         Since focus doesn't appear to be cancelable, either
1883         with a DOM event or an editing delegate, I fixed this
1884         by delaying the focus of focusable nodes that are 
1885         selected and inside an already focused node.  The 
1886         node will be focused if the user mouses up without 
1887         doing any dragging because the mouse up sets a
1888         selection, which calls setFocusNodeIfNeeded.
1889
1890         * page/EventHandler.cpp:
1891         (WebCore::EventHandler::dispatchMouseEvent):
1892
1893 2007-05-07  Atul Mehrotra <atul.mehrotra@celunite.com>
1894
1895         Reviewed by Maciej.
1896
1897         GDK Build fix
1898
1899         * platform/gdk/TemporaryLinkStubs.cpp:
1900
1901 2007-05-07  Oliver Hunt  <oliver@apple.com>
1902
1903         Reviewed by Maciej.
1904
1905         Correcting comparisons to handle NaN in the same manner
1906         as other Canvas methods.
1907
1908         * html/CanvasRenderingContext2D.cpp:
1909         (WebCore::CanvasRenderingContext2D::arcTo):
1910         (WebCore::CanvasRenderingContext2D::arc):
1911           Correcting arc/arcTo to match the WHAT WG draft.
1912         (WebCore::CanvasRenderingContext2D::rect):
1913         (WebCore::CanvasRenderingContext2D::clearRect):
1914         (WebCore::CanvasRenderingContext2D::fillRect):
1915         (WebCore::CanvasRenderingContext2D::strokeRect):
1916
1917 2007-05-07  David Hyatt  <hyatt@apple.com>
1918
1919         Add some comments to the glyph/font code (patch from MarvinD, tweaked by
1920         me to correct a few bits and to make it forward-compatible with the work
1921         going on in 3315.
1922
1923         Reviewed by me
1924
1925         * ChangeLog:
1926         * platform/Font.cpp:
1927         (WebCore::Font::glyphDataForCharacter):
1928         * platform/GlyphPageTreeNode.cpp:
1929         (WebCore::GlyphPageTreeNode::initializePage):
1930         * platform/GlyphPageTreeNode.h:
1931
1932 2007-05-07  Justin Garcia  <justin.garcia@apple.com>
1933
1934         Fix layout test failures.
1935
1936         * editing/SelectionController.cpp:
1937         (WebCore::SelectionController::contains): Use comparePositions
1938         instead of Range::comparePoint, because comparePositions can
1939         handle positions inside shadow trees.
1940
1941 2007-05-07  Justin Garcia  <justin.garcia@apple.com>
1942
1943         Reviewed by darin
1944         
1945         <rdar://problem/4895428> Can't drag selected To Do if it is not showing a due date
1946         
1947         The code in SelectionController::contains returned false 
1948         incorrectly if the selection end just after a table 
1949         and the position was inside that table.
1950
1951         * editing/SelectionController.cpp:
1952         (WebCore::SelectionController::contains): Compare the position with the
1953         ends of the selection and then use Range::comparePoint.
1954
1955 2007-05-07  Darin Adler  <darin@apple.com>
1956
1957         - rolling out setInnerHTML optimization until I can figure out why tests are failing
1958
1959 2007-05-07  Darin Adler  <darin@apple.com>
1960
1961         Reviewed by Hyatt.
1962
1963         - fix http://bugs.webkit.org/show_bug.cgi?id=13602
1964           Amazon product pages keep repainting over and over again
1965
1966         Optimize setInnerHTML, setOuterHTML, and setInnerText so they don't change the DOM at all
1967         if they don't need to.
1968
1969         Test: fast/dom/HTMLElement/set-inner-outer-optimization.html
1970
1971         * html/HTMLElement.cpp:
1972         (WebCore::equal): Added. Helper function that compares two Text nodes or two NamedAttrMap
1973         attribute maps.
1974         (WebCore::shallowEqual): Added. Helper function that compares two Element nodes or two
1975         arbitrary nodes.
1976         (WebCore::replaceChildrenWithFragment): Added. Helper function used by setInnerHTML and
1977         setInnerText. Optimizes the cases where all the nodes are the same, where both the current
1978         and the new content are single text nodes, and where the current content is a single node
1979         that can be replaced with replaceChild.
1980         (WebCore::replaceChildrenWithText): Added. Helper function used by setInnerText. Optimizes
1981         the case where the current content is a single text node or a single node that can be
1982         replaced with replaceChild.
1983         (WebCore::HTMLElement::setInnerHTML): Changed to call replaceChildrenWithFragment.
1984         (WebCore::HTMLElement::setOuterHTML): Added special case to optimize when the new content
1985         exactly matches the current node.
1986         (WebCore::HTMLElement::setInnerText): Changed to call replaceChildrenWithText in a few
1987         cases instead of doing removeChildren/appendChild. Changed code that was using
1988         DeprecatedString to instead use String. Changed general case to use a document fragment
1989         and replaceChildrenWithFragment.
1990
1991         * dom/CharacterData.cpp: (WebCore::CharacterData::dispatchModifiedEvent):
1992         Fixed bug where we would not dispatch the DOMSubtreeModified event unless someone
1993         was registered for the DOMCharacterDataModified event. Caused trouble in the test.
1994
1995 2007-05-06  Darin Adler  <darin@apple.com>
1996
1997         - blind try at fixing the Qt build
1998
1999         * platform/qt/TextBreakIteratorQt.cpp: (WebCore::sentenceBreakIterator):
2000         Added a placeholder.
2001
2002 2007-05-06  Darin Adler  <darin@apple.com>
2003
2004         Reviewed by Hyatt.
2005
2006         - fix http://bugs.webkit.org/show_bug.cgi?id=13537
2007           Canvex example starts rendering strangely after a while
2008
2009         * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage):
2010         Don't raise an exception if the source or destination rectangle is empty.
2011
2012 2007-05-06  Darin Adler  <darin@apple.com>
2013
2014         Reviewed by Hyatt.
2015
2016         - fix <rdar://problem/4585593> REGRESSION: Some 2-byte characters in printed page
2017           header are drawn with too-large font and clipped
2018
2019         Doesn't affect text within web pages, so no layout test.
2020
2021         * platform/mac/FontCacheMac.mm: (WebCore::FontCache::getFontDataForCharacters):
2022         Base the substitute font on the FontPlatformData rather than the FontDescription.
2023         Before, it was a mix of both. This works properly for fonts where we have no
2024         FontDescription and is also more internally consistent.
2025
2026 2007-05-06  Darin Adler  <darin@apple.com>
2027
2028         Reviewed by Hyatt.
2029
2030         - http://bugs.webkit.org/show_bug.cgi?id=13606
2031           some functions are virtual that don't need to be
2032
2033         * dom/Node.h: Made first/lastChild be inline functions that call virtual functions.
2034         This lets us hide the functions with another inline function in a derived class,
2035         yet still override the behavior here in the base class by overriding the virtual
2036         functions too.
2037         * dom/Node.cpp:
2038         (WebCore::Node::virtualFirstChild): Renamed virtual functions. There are now
2039         non-virtual inline functions that call these virtual functions.
2040         (WebCore::Node::virtualLastChild): Ditto.
2041
2042         * dom/ContainerNode.h: Added non-virtual first/lastChild functions that hide the ones
2043         inherited from the Node class; these also replace the fastFirst/LastChild functions,
2044         and transparently give callers the faster form if they have a pointer of the right
2045         type. But still override the virtual functions named virtualFirst/LastChild, because
2046         those can still be called through a Node*. Removed the "fast" from the names of
2047         fastSetFirst/LastChild.
2048         * dom/ContainerNode.cpp:
2049         (WebCore::ContainerNode::virtualFirstChild): Renamed virtual functions. There are now
2050         also non-virtual inline versions.
2051         (WebCore::ContainerNode::virtualLastChild): Ditto.
2052
2053         * dom/CharacterData.cpp: Removed implementations of data and length functons.
2054         * dom/CharacterData.h: Made data, setData, length, substringData, appendData,
2055         insertData, deleteData, and replaceData all non-virtual, and made data and length
2056         both be inline.
2057
2058         * dom/NamedAttrMap.h: (WebCore::NamedAttrMap::attributeItem): Removed a null check
2059         from this function. If the length of the map is known to be greater than 0, then
2060         the null check isn't needed. But if the length of the map hasn't been checked at all,
2061         then it's unsafe to call this function since it doesn't range check the array
2062         index. Thus the null check is never needed. I also looked at all callers.
2063
2064         * dom/Attr.cpp: (WebCore::Attr::createTextChild):
2065         * dom/Document.cpp: (WebCore::Document::recalcStyle):
2066         * dom/Element.cpp: (WebCore::Element::recalcStyle):
2067         * ksvg2/svg/SVGElement.cpp:
2068         (WebCore::SVGElement::haveLoadedRequiredResources):
2069         Removed "fast" prefix from calls to fastFirst/LastChild and fastSetFirst/LastChlld.
2070         It's not needed any more -- you still get fast behavior if the pointer has a type
2071         that's ContainerNode or derived from it.
2072
2073 2007-05-06  Mitz Pettel  <mitz@webkit.org>
2074
2075         Reviewed by Hyatt.
2076
2077         - fix http://bugs.webkit.org/show_bug.cgi?id=13557
2078           Crash when dragging selection over absolutely positioned generated content on block element
2079
2080         Test: fast/css-generated-content/positioned-background-hit-test-crash.html
2081
2082         * rendering/RenderLayer.cpp:
2083         (WebCore::RenderLayer::enclosingElement): Added. Factored out of hitTestLayer().
2084         (WebCore::RenderLayer::hitTestLayer): Implemented the fix for <rdar://problem/3552346>
2085         from r6106 to the self hit test as well, namely: return the enclosing element
2086         for generated positioned content.
2087         * rendering/RenderLayer.h:
2088
2089 2007-05-06  Alexey Proskuryakov  <ap@webkit.org>
2090
2091         Reviewed by Darin.
2092
2093         http://bugs.webkit.org/show_bug.cgi?id=13584
2094         <script> code wrongly assumes requests can't fail
2095
2096         Test: fast/loader/unloadable-script.html
2097
2098         * html/HTMLScriptElement.cpp:
2099         (WebCore::HTMLScriptElement::parseMappedAttribute):
2100         (WebCore::HTMLScriptElement::insertedIntoDocument):
2101         Check the return value of requestScript().
2102
2103 2007-05-06  Alexey Proskuryakov  <ap@webkit.org>
2104
2105         Reviewed by Darin.
2106
2107         http://bugs.webkit.org/show_bug.cgi?id=13304
2108         REGRESSION(14784): WebKit doesn't dynamically reflect changes to the highlight color in System Preferences
2109
2110         Implemented a notification observer that invalidates cached system colors.
2111
2112         No automated test possible.
2113
2114         * rendering/RenderTheme.cpp:
2115         (WebCore::RenderTheme::activeSelectionBackgroundColor):
2116         (WebCore::RenderTheme::inactiveSelectionBackgroundColor):
2117         (WebCore::RenderTheme::platformColorsDidChange):
2118         * rendering/RenderTheme.h:
2119         * rendering/RenderThemeMac.h:
2120         * rendering/RenderThemeMac.mm:
2121         (-[WebCoreRenderThemeNotificationObserver initWithTheme:WebCore::]):
2122         (-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]):
2123         (WebCore::theme):
2124         (WebCore::RenderThemeMac::RenderThemeMac):
2125         (WebCore::RenderThemeMac::~RenderThemeMac):
2126         (WebCore::RenderThemeMac::checkbox):
2127         (WebCore::RenderThemeMac::radio):
2128         (WebCore::RenderThemeMac::button):
2129         (WebCore::RenderThemeMac::popupButton):
2130         (WebCore::RenderThemeMac::search):
2131         (WebCore::RenderThemeMac::sliderThumbHorizontal):
2132         (WebCore::RenderThemeMac::sliderThumbVertical):
2133
2134 2007-05-05  Rob Buis  <buis@kde.org>
2135
2136         Reviewed by Oliver.
2137
2138         http://bugs.webkit.org/show_bug.cgi?id=13592
2139         parseMappedAttribute inconsistency
2140
2141         Do not use local vars in parseMappedAttribute for attr name and value.
2142
2143         * ksvg2/svg/SVGAnimateMotionElement.cpp:
2144         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
2145         * ksvg2/svg/SVGAnimateTransformElement.cpp:
2146         (WebCore::SVGAnimateTransformElement::parseMappedAttribute):
2147         * ksvg2/svg/SVGAnimationElement.cpp:
2148         (WebCore::SVGAnimationElement::parseMappedAttribute):
2149         * ksvg2/svg/SVGCircleElement.cpp:
2150         (WebCore::SVGCircleElement::parseMappedAttribute):
2151         * ksvg2/svg/SVGClipPathElement.cpp:
2152         (WebCore::SVGClipPathElement::parseMappedAttribute):
2153         * ksvg2/svg/SVGCursorElement.cpp:
2154         (WebCore::SVGCursorElement::parseMappedAttribute):
2155         * ksvg2/svg/SVGEllipseElement.cpp:
2156         (WebCore::SVGEllipseElement::parseMappedAttribute):
2157         * ksvg2/svg/SVGExternalResourcesRequired.cpp:
2158         (WebCore::SVGExternalResourcesRequired::parseMappedAttribute):
2159         * ksvg2/svg/SVGGradientElement.cpp:
2160         (WebCore::SVGGradientElement::parseMappedAttribute):
2161         * ksvg2/svg/SVGImageElement.cpp:
2162         (WebCore::SVGImageElement::parseMappedAttribute):
2163         * ksvg2/svg/SVGLineElement.cpp:
2164         (WebCore::SVGLineElement::parseMappedAttribute):
2165         * ksvg2/svg/SVGLinearGradientElement.cpp:
2166         (WebCore::SVGLinearGradientElement::parseMappedAttribute):
2167         * ksvg2/svg/SVGMarkerElement.cpp:
2168         (WebCore::SVGMarkerElement::parseMappedAttribute):
2169         * ksvg2/svg/SVGMaskElement.cpp:
2170         (WebCore::SVGMaskElement::parseMappedAttribute):
2171         * ksvg2/svg/SVGPathElement.cpp:
2172         (WebCore::SVGPathElement::parseMappedAttribute):
2173         * ksvg2/svg/SVGPatternElement.cpp:
2174         (WebCore::SVGPatternElement::parseMappedAttribute):
2175         * ksvg2/svg/SVGRadialGradientElement.cpp:
2176         (WebCore::SVGRadialGradientElement::parseMappedAttribute):
2177         * ksvg2/svg/SVGRectElement.cpp:
2178         (WebCore::SVGRectElement::parseMappedAttribute):
2179         * ksvg2/svg/SVGSVGElement.cpp:
2180         (WebCore::SVGSVGElement::parseMappedAttribute):
2181         * ksvg2/svg/SVGScriptElement.cpp:
2182         (WebCore::SVGScriptElement::parseMappedAttribute):
2183         * ksvg2/svg/SVGStopElement.cpp:
2184         (WebCore::SVGStopElement::parseMappedAttribute):
2185         * ksvg2/svg/SVGTests.cpp:
2186         (WebCore::SVGTests::parseMappedAttribute):
2187         * ksvg2/svg/SVGTextContentElement.cpp:
2188         (WebCore::SVGTextContentElement::parseMappedAttribute):
2189         * ksvg2/svg/SVGTextPositioningElement.cpp:
2190         (WebCore::SVGTextPositioningElement::parseMappedAttribute):
2191         * ksvg2/svg/SVGUseElement.cpp:
2192         (WebCore::SVGUseElement::parseMappedAttribute):
2193         * ksvg2/svg/SVGViewElement.cpp:
2194         (WebCore::SVGViewElement::parseMappedAttribute):
2195         * ksvg2/svg/SVGZoomAndPan.cpp:
2196         (WebCore::SVGZoomAndPan::parseMappedAttribute):
2197
2198 2007-05-05  Oliver Hunt  <oliver@apple.com>
2199
2200         Reviewed by Hyatt.
2201
2202         Initialise default fill with Color::black rather than parsing
2203         the string "black"
2204
2205         * ksvg2/svg/SVGPaint.cpp:
2206         (WebCore::SVGPaint::defaultFill):
2207
2208 2007-05-04  Steve Falkenburg  <sfalken@apple.com>
2209
2210         Reviewed by Oliver.
2211
2212         Use TextBreakIterator for sentence breaking instead of TextBoundaries.
2213
2214         * WebCore.xcodeproj/project.pbxproj: Added TextBreakIeratorInternalICUMac.mm
2215         * editing/visible_units.cpp:
2216         (WebCore::startSentenceBoundary): Call TextBreakIterator instead of TextBoundaries.
2217         (WebCore::endSentenceBoundary): Call TextBreakIterator instead of TextBoundaries.
2218         (WebCore::previousSentencePositionBoundary): Call TextBreakIterator instead of TextBoundaries.
2219         (WebCore::nextSentencePositionBoundary): Call TextBreakIterator instead of TextBoundaries.
2220         * platform/TextBoundaries.h: Removed findSentenceBoundary, findNextSentenceFromIndex.
2221         * platform/TextBreakIterator.h: Added sentenceBreakIterator.
2222         * platform/TextBreakIteratorICU.cpp:
2223         (WebCore::setUpIterator): Add locale parameter (needed to maintain functionality that TextBoundaries code had).
2224         (WebCore::characterBreakIterator): Pass en_us for locale (same as old code).
2225         (WebCore::wordBreakIterator): Pass en_us for locale (same as old code).
2226         (WebCore::lineBreakIterator): Pass en_us for locale (same as old code).
2227         (WebCore::sentenceBreakIterator): Added.
2228         * platform/TextBreakIteratorInternalICU.h: Added.
2229         * platform/gdk/TemporaryLinkStubs.cpp: Removed findNextSentenceFromIndex, findSentenceBoundary.
2230         (WebCore::currentTextBreakLocaleID): Added stub.
2231         * platform/mac/TextBoundaries.mm: Removed currentTextBreakLocaleID, findSentenceBoundary, findNextSentenceFromIndex.
2232         * platform/mac/TextBreakIteratorInternalICUMac.mm: Added.
2233         (WebCore::currentTextBreakLocaleID): Moved from TextBoundaries.mm
2234         * platform/qt/TextBoundaries.cpp: Removed findNextSentenceFromIndex, findSentenceBoundary.
2235
2236 2007-05-04  Adele Peterson  <adele@apple.com>
2237
2238         Reviewed by Hyatt.
2239
2240         Fix for <rdar://problem/5116871> REGRESSION: Can't select options in widget's listbox
2241
2242         Don't use user-select to determine whether or not options can be selected in listboxes.
2243         This will match Firefox behavior for -moz-user-select.
2244
2245         * html/HTMLSelectElement.cpp:
2246         (WebCore::HTMLSelectElement::canSelectAll):
2247         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2248
2249 2007-05-04  Geoffrey Garen  <ggaren@apple.com>
2250
2251         Reviewed by Tim Hatcher.
2252
2253         First step in fixing <rdar://problem/5055182> The back cache has no global cap
2254
2255         Stop giving SnapBack infinite cache-ability. Instead, make SnapBack rely
2256         on the underlying back cache.
2257
2258         * WebCore.exp:
2259         * history/HistoryItem.cpp:
2260         (WebCore::HistoryItem::HistoryItem):
2261         * history/HistoryItem.h:
2262         * loader/FrameLoader.cpp:
2263         (WebCore::FrameLoader::purgePageCache):
2264
2265 2007-05-04  Geoffrey Garen  <ggaren@apple.com>
2266
2267         Reviewed by Brady Eidson.
2268         
2269         Removed export of clearPageCache(), since it was unused externally. I plan
2270         to remove its use from WebCore eventually, too.
2271
2272         Removed usesPageCache(), since it was unused and it duplicated pageCacheSize().
2273
2274         * WebCore.exp:
2275         * history/BackForwardList.cpp:
2276         * history/BackForwardList.h: Moved statics to the top of the class definition.
2277         * loader/FrameLoader.cpp:
2278         (WebCore::FrameLoader::canCachePage):
2279
2280 2007-05-04  Anders Carlsson  <andersca@apple.com>
2281
2282         Reviewed by Antti.
2283
2284         <rdar://problem/5179977> Use the correct URLs when dispatching delegate methods for data loads.
2285
2286         Restore behavior to matching release WebKit by adding a response URL to SubstituteData. If a nil base URL is
2287         passed, set the _request_ URL to "about:blank", but the response URL to a generated "applewebdata" URL.
2288
2289         * loader/FrameLoader.cpp:
2290         (WebCore::FrameLoader::commitProvisionalLoad):
2291         First, check for the SubstituteData's response URL.
2292
2293         (WebCore::FrameLoader::continueAfterNavigationPolicy):
2294         No need to special case applewebdata URLs here, they're only used in the response.
2295
2296         * loader/MainResourceLoader.cpp:
2297         (WebCore::MainResourceLoader::handleDataLoadNow):
2298         If the substitute data has a response URL, use it.
2299
2300         (WebCore::MainResourceLoader::loadNow):
2301         Only load "about:blank" as an empty document if there's no substitute data.
2302
2303         * loader/SubstituteData.h:
2304         (WebCore::SubstituteData::SubstituteData):
2305         (WebCore::SubstituteData::responseURL):
2306         Add responseURL member to SubstituteData.
2307
2308 2007-05-03  Steve Falkenburg  <sfalken@apple.com>
2309
2310         Reviewed by Oliver.
2311
2312         Add missing user description parameter to spelling-related editor client method.
2313
2314         * bridge/EditorClient.h:
2315         * platform/gdk/EditorClientGdk.cpp:
2316         (WebCore::EditorClientGdk::updateSpellingUIWithGrammarString):
2317         * platform/gdk/EditorClientGdk.h:
2318         * platform/graphics/svg/SVGImageEmptyClients.h:
2319         (WebCore::SVGEmptyEditorClient::updateSpellingUIWithGrammarString):
2320
2321 2007-05-03  Brady Eidson  <beidson@apple.com>
2322
2323         Reviewed by Oliver
2324
2325         Resolve an outstanding FIXME in Loader::numRequests()
2326
2327         Before, numRequests() would iterate through the list of requests pending load and the list of currently
2328         loading requests and tally up a count matching the current DocLoader.
2329
2330         I noticed while studying and cleaning up the loader code that numRequests() is potentially very hot!
2331         Indeed load a complex site with many resources and multiple frames, and this method gets called very often,
2332         tallying up this number every time.
2333
2334         The FIXME was to keep a collection of Requests mapped to each DocLoader.  In reality, since this map would
2335         simply be used for retrieving a count, that was overkill.  Keeping a request count in the DocLoader itself
2336         along with maintaining that count in Loader as requests come and go is a much better way to do this.
2337
2338         * loader/DocLoader.cpp:
2339         (WebCore::DocLoader::DocLoader):
2340         (WebCore::DocLoader::incrementRequestCount):
2341         (WebCore::DocLoader::decrementRequestCount):
2342         (WebCore::DocLoader::requestCount): Emulate the defunct Loader::numRequests()
2343         * loader/DocLoader.h:
2344
2345         * loader/FrameLoader.cpp:
2346         (WebCore::numRequests): Call DocLoader::requestCount() directly
2347         (WebCore::FrameLoader::checkCompleted): Use numRequests()
2348
2349         * loader/loader.cpp:
2350         (WebCore::Loader::load): Increment the DocLoader's request count
2351         (WebCore::Loader::servePendingRequests): If the SubresourceLoader failed to create, decrement the count
2352         (WebCore::Loader::didFinishLoading): If the Request is not Multipart, decrement the count
2353         (WebCore::Loader::didFail): If the Request is not Multipart, decrement the count
2354         (WebCore::Loader::didReceiveResponse): If the Request becomes Multipart, decrement the count
2355         (WebCore::Loader::cancelRequests): Decrement the count for the pending requests being tossed, and ASSERT the
2356           count is zero after all requests have been cancelled
2357         * loader/loader.h:
2358
2359 2007-05-03  Geoffrey Garen  <ggaren@apple.com>
2360
2361         Reviewed by Brady Eidson.
2362         
2363         Some cleanup in preparation for fixing <rdar://problem/5055182> The 
2364         back/forward cache has no global cap
2365
2366         * loader/FrameLoader.cpp:
2367         (WebCore::FrameLoader::provisionalLoadStarted): Moved "Can I cache this
2368         page?" logic to canCachePage(). Moved "I am caching this page" logic to
2369         cachePageToHistoryItem().
2370         (WebCore::FrameLoader::canCachePage): Moved above logic here.
2371         (WebCore::FrameLoader::cachePageToHistoryItem): Removed bogus NULL check
2372         and failure return value. Moved above logic here. Don't call setCachedPage()
2373         until the CachedPage is fully constructed.
2374         (WebCore::FrameLoader::purgePageCache): Removed comment that duplicated
2375         the function name.
2376         * loader/FrameLoader.h:
2377
2378 2007-05-03  Justin Garcia  <justin.garcia@apple.com>
2379
2380         Reviewed by harrison.
2381
2382         <rdar://problem/5120281> CrashTracer: [USER] 1 crash in Mail at WebCore::CSSComputedStyleDeclaration::copyInheritableProperties() const
2383
2384         Problem is that checkAncestor and lastClosed can be nil when createMarkup is called unrendered nodes, and that was not checked for.
2385         
2386         * editing/markup.cpp:
2387         (WebCore::createMarkup):
2388         Nil-check checkAncestor and lastClosed.
2389
2390 2007-05-03  Timothy Hatcher  <timothy@apple.com>
2391
2392         Reviewed by Kevin.
2393
2394         <rdar://problem/5016318> Contextual menu item for opening links is missing in compose windows but present in viewer
2395
2396         Add the Open Link, Open Link in New Window, Download Linked File and Copy Link menu
2397         items to the content editable context menu.
2398
2399         * platform/ContextMenu.cpp:
2400         (WebCore::ContextMenu::populate):
2401
2402 2007-05-03  Holger Freyther <freyther@kde.org>
2403
2404         Reviewed by Zack, landed by Simon.
2405         This is bugzilla bug 13499.
2406
2407         * WebCore.pro: Place the Qt port into the qt-port scope, add the Gdk port
2408
2409 2007-05-03  Adele Peterson  <adele@apple.com>
2410
2411         Use BUILDING_ON_TIGER.
2412
2413         * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry):
2414
2415 2007-05-03  Brady Eidson  <beidson@apple.com>
2416
2417         Reviewed by Darin
2418
2419         Some more minor cleanup that resolves a FIXME and ditches another pointless method
2420
2421         No change in functionality == no layout test
2422
2423         * loader/FrameLoader.cpp:
2424         (WebCore::FrameLoader::commitProvisionalLoad):  Updated a comment
2425         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Folded startLoading() into this method
2426         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): continueAfterWillSubmitForm becomes continueLoadAfterWillSubmitForm
2427         * loader/FrameLoader.h: Removed startLoading()
2428
2429 2007-05-03  Adele Peterson  <adele@apple.com>
2430
2431         Reviewed by Tim Hatcher.
2432
2433         Fix for <rdar://problem/4727607> REGRESSION: KeyScript is deprecated, need a new solution for forcing Roman input for password fields on Leopard
2434
2435         * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry):
2436         Use TSMSetDocumentProperty and TSMRemoveDocumentProperty on Leopard disable and enable non-ascii input sources.
2437
2438 2007-05-03  Brady Eidson  <beidson@apple.com>
2439
2440         Reviewed by Anders
2441
2442         commitProvisionalLoad() was the name of two methods.
2443         One of them was private and only called from one other private place.
2444         This was driving me crazy.  I had to change that.
2445
2446         No change in functionality == no layout test
2447
2448         * loader/FrameLoader.cpp:
2449         (WebCore::FrameLoader::transitionToCommitted): roll commitProvisionalLoad() into this method
2450         * loader/FrameLoader.h: Removed commitProvisionalLoad()
2451
2452 2007-05-03  Darin Adler  <darin@apple.com>
2453
2454         Reviewed by Anders.
2455
2456         - make ICU initialization lazy to speed up application start-up time
2457           (when it includes an initial webpage load)
2458
2459         * platform/TextCodecICU.h: Replaced registerEncodingNames and
2460         registerCodecs with registerBaseEncodingNames, registerBaseCodecs,
2461         registerExtendedEncodingNames, and registerExtendedCodecs.
2462         * platform/TextCodecICU.cpp:
2463         (WebCore::newTextCodecICU): Moved up to the top of the file.
2464         (WebCore::TextCodecICU::registerBaseEncodingNames): Added. Registers
2465         just UTF-8.
2466         (WebCore::TextCodecICU::registerBaseCodecs): Ditto.
2467         (WebCore::TextCodecICU::registerExtendedEncodingNames): Renamed.
2468         (WebCore::TextCodecICU::registerExtendedCodecs): Ditto.
2469         (WebCore::TextCodecICU::createICUConverter): Compare with the name
2470         "GBK" in a way that does not require extending the maps.
2471
2472         * platform/TextEncoding.cpp:
2473         (WebCore::TextEncoding::usesVisualOrdering): Added code so this will
2474         just return false if we haven't used any extended encoding names yet.
2475         The result will be correct, and we won't ask for an encoding name that
2476         will require registering the extended encoding names.
2477         (WebCore::TextEncoding::isJapanese): Ditto.
2478         (WebCore::TextEncoding::backslashAsCurrencySymbol): Ditto, but return
2479         a backslash instead of false.
2480
2481         * platform/TextEncodingRegistry.h: Added a new function named
2482          noExtendedTextEncodingNameUsed.
2483         * platform/TextEncodingRegistry.cpp:
2484         (WebCore::buildBaseTextCodecMaps): Added. Registers the base encodings,
2485         including Latin-1 because it's the default, and the UTF encodings.
2486         (WebCore::extendTextCodecMaps): Added. Registers all the other encodings.
2487         (WebCore::newTextCodec): Removed the all to buildTextCodecMap because
2488         we always build the map when making the canonical encoding name.
2489         (WebCore::atomicCanonicalTextEncodingName): Changed code to build only
2490         the base maps at first, then extend the maps the first time we run into
2491         a name we don't know.
2492         (WebCore::noExtendedTextEncodingNameUsed): Added.
2493
2494 2007-05-03  Mark Rowe  <mrowe@apple.com>
2495
2496         Qt build fix.  In r21185 the Qt version of WebCore::scaleDragImage was
2497         updated to have the incorrect signature.
2498
2499         * platform/qt/DragImageQt.cpp:
2500         (WebCore::scaleDragImage):
2501
2502 2007-05-02  Beth Dakin  <bdakin@apple.com>
2503
2504         * dom/Node.h: Just fixing a variable name because it's driving me 
2505         mad.
2506
2507 2007-05-02  Beth Dakin  <bdakin@apple.com>
2508
2509         Reviewed by Hyatt.
2510
2511         Fix for <rdar://problem/4513966> Never-ending identical repaint @ 
2512         orbitz.com (Safari eating 85% CPU)
2513
2514         We need to be a little bit more savvy about when we do a FULL style 
2515         recalc since it can be unnecessary and expensive.
2516
2517         * css/CSSMutableStyleDeclaration.cpp:
2518         (WebCore::CSSMutableStyleDeclaration::setChanged): Now takes a 
2519         StyleChangeType as a parameter.
2520         (WebCore::CSSMutableStyleDeclaration::setProperty): Send 
2521         InlineStyleChange as the paramter. This is the optimization!
2522         * css/CSSMutableStyleDeclaration.h: setChanged takes a 
2523         StyleChangeType as a parameter.
2524         * dom/Document.cpp: setChanged now takes a StyleChangeType instead 
2525         of a bool.
2526         (WebCore::Document::recalcStyle): Same.
2527         * dom/Element.cpp: 
2528         (WebCore::Element::recalcStyle): This is the fix!! Only set change 
2529         to Force is we use descendant rules AND it's a FullStyleChange.
2530         * dom/Node.cpp: m_hasStyle was an unused bit on Node, so this patch 
2531         gets rid of it and uses that extra bit for m_changed to be a 
2532         StyleChangeType instead of a bool.
2533         (WebCore::Node::Node):
2534         (WebCore::Node::setChanged):
2535         (WebCore::Node::dump):
2536         * dom/Node.h: Same.
2537         (WebCore::): Define the StyleChangeType enum.
2538         (WebCore::Node::hasClass):
2539         (WebCore::Node::changed):
2540         (WebCore::Node::styleChangeType):
2541         (WebCore::Node::setHasClass):
2542         * dom/StyledElement.cpp:
2543         (WebCore::StyledElement::parseMappedAttribute): Don't bother 
2544         calling setHasStyle() since m_hasStyle is gone now. It was never 
2545         used, and this was the only place it was set.
2546         * dom/Text.cpp:
2547         (WebCore::Text::recalcStyle): setChanged now takes a 
2548         StyleChangeType instead of a bool.
2549         * html/HTMLFrameSetElement.cpp:
2550         (WebCore::HTMLFrameSetElement::recalcStyle): Same.
2551         * html/HTMLSelectElement.cpp:
2552         (WebCore::HTMLSelectElement::restoreState): Same.
2553         (WebCore::HTMLSelectElement::reset): Same.
2554         * html/HTMLTextAreaElement.cpp:
2555         (WebCore::HTMLTextAreaElement::setValue): Same.
2556         * ksvg2/misc/SVGTimer.cpp:
2557         (WebCore::SVGTimer::applyAnimations): Same.
2558         * ksvg2/svg/SVGUseElement.cpp:
2559         (WebCore::SVGUseElement::recalcStyle): Same.
2560         * platform/graphics/svg/SVGResource.cpp:
2561         (WebCore::SVGResource::repaintClients): Same.
2562
2563 2007-05-02  David Harrison  <harrison@apple.com>
2564
2565         Reviewed by Antti.
2566
2567         <rdar://problem/4859132> Grammar must always be checked in entire-sentence chunks, and shouldn't show markers for current sentence
2568
2569         Restore the remainder of the original fix now that blocking bug rdar://5174862 is addressed.
2570
2571         John made the original patch on 2007-04-10, but this fell prey to rdar://5157329.
2572         Justin backed out the whole patch on 2007-04-30 to avoid the crash.
2573         Justin then restored most of the original patch, but used word granularity instead, to keep the build working.
2574         I just addressed the root cause of rdar://5157329 in rdar://5174862.
2575         This patch switches the temp uses of word granularity back to sentence granularity.
2576         
2577         * editing/mac/EditorMac.mm:
2578         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
2579         * page/Frame.cpp:
2580         (WebCore::Frame::respondToChangedSelection):
2581
2582 2007-05-02  David Harrison  <harrison@apple.com>
2583
2584         Reviewed by Antti.
2585
2586         <rdar://problem/5174862> Crash resulting from DeprecatedString::insert()
2587         
2588         Test added: editing/selection/move-by-sentence-001.html
2589
2590         * editing/visible_units.cpp:
2591         (WebCore::previousBoundary):
2592         (WebCore::nextBoundary):
2593         Use a UChar Vector instead of DeprecatedString.
2594         Avoid creating an extra string for secure bullet replacement unless it is actually needed.
2595         
2596         * platform/DeprecatedString.cpp:
2597         (WebCore::DeprecatedString::insert):
2598         Call forceUnicode() before setLength(), so that only the unicode buffer is resized.
2599
2600        (WebCore::DeprecatedString::setLength):
2601         Adjust the unicode buffer even if the ascii buffer is valid.
2602         
2603 2007-05-02  Mitz Pettel  <mitz@webkit.org>
2604
2605         Reviewed by Brady.
2606
2607         - http://bugs.webkit.org/show_bug.cgi?id=13564
2608           Remove friend class FrameLoader from Frame
2609
2610         No test added since there is no change in functionality.
2611
2612         * loader/FrameLoader.cpp:
2613         (WebCore::FrameLoader::didOpenURL):
2614         (WebCore::FrameLoader::begin):
2615         (WebCore::FrameLoader::open):
2616         * loader/FrameLoader.h: Made clear() private.
2617         * page/Frame.cpp:
2618         (WebCore::Frame::setDocument): Changed the argument into a PassRefPtr.
2619         * page/Frame.h:
2620         * xml/XSLTProcessor.cpp:
2621         (WebCore::XSLTProcessor::createDocumentFromSource):
2622
2623 2007-05-02  Mitz Pettel  <mitz@webkit.org>
2624
2625         Reviewed by Dave Hyatt.
2626
2627         - fix http://bugs.webkit.org/show_bug.cgi?id=9276
2628           Quirksmode: Image swap resize bug
2629
2630         Test: fast/replaced/image-resize-width.html
2631
2632         * rendering/RenderImage.cpp:
2633         (WebCore::RenderImage::imageChanged): Moved the call to dirtyPrefWidths()
2634         before the call to calcWidth().
2635
2636 2007-05-02  David Hyatt  <hyatt@apple.com>
2637
2638         Fix for bug 13566, broken Dashboard widgets.  setPrefWidthsDirty did
2639         the wrong thing for text children of a positioned element.
2640
2641         Reviewed by mitz
2642
2643         fast/block/positioning/pref-width-change.html
2644
2645         * rendering/RenderObject.cpp:
2646         (WebCore::RenderObject::setPrefWidthsDirty):
2647
2648 2007-05-01  Darin Adler  <darin@apple.com>
2649
2650         * rendering/RenderReplaced.cpp: Fix typo in a comment.
2651
2652 2007-05-01  David Hyatt  <hyatt@apple.com>
2653
2654         Fix for 13558, crash when using absolutely positioned generated content
2655         inside an inline.
2656
2657         Reviewed by darin
2658
2659         fast/css-generated-content/absolute-position-inside-inline.html
2660
2661         * rendering/RenderContainer.cpp:
2662         (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
2663
2664 2007-05-01  Justin Garcia  <justin.garcia@apple.com>
2665
2666         Reviewed by darin
2667
2668         <rdar://problem/5002441> 
2669         Pressing space key does nothing above quoted content or a signature
2670         
2671         Inserting a space under these circumstances inserts a single 
2672         text node containing a regular space and then does a layout. 
2673         That space isn't rendered (which is correct).  Whitespace 
2674         rebalancing is supposed to correct it but failed.  It replaces 
2675         the space with a non-breaking space, but that change doesn't 
2676         dirty line boxes (9441) and so the space isn't rendered.
2677         
2678         This workaround turns all incoming spaces into non-breaking 
2679         spaces before they're inserted (they're rebalanced after 
2680         insertion and turned back into regular spaces if possible).
2681
2682         * editing/InsertTextCommand.cpp:
2683         (WebCore::InsertTextCommand::prepareForTextInsertion): Removed
2684         an old irrelevant FIXME.
2685         (WebCore::InsertTextCommand::input): Turn incoming spaces into
2686         non breaking spaces before inserting them.
2687         
2688 2007-05-01  Darin Adler  <darin@apple.com>
2689
2690         Reviewed by Hyatt.
2691
2692         - fix http://bugs.webkit.org/show_bug.cgi?id=13559
2693           REGRESSION: Canvas aspect ratio is incorrect
2694
2695         - remove intrinsicWidth/Height functions from RenderObject
2696
2697         Test: fast/canvas/canvas-size-change-after-layout.html
2698
2699         * html/HTMLCanvasElement.cpp:
2700         (WebCore::HTMLCanvasElement::createRenderer): Removed code to set
2701         the intrinsic size, because the renderer now takes care of this
2702         in its constructor.
2703         (WebCore::HTMLCanvasElement::reset): Instead of calling the
2704         setIntrinsicWidth/Height functions, call canvasSizeChanged, which
2705         takes care of layout, but only if the size actually changed. Also
2706         call repaint if the contents of the canvas changed.
2707
2708         * rendering/RenderApplet.h:
2709         * rendering/RenderApplet.cpp: (WebCore::RenderApplet::intrinsicSize):
2710         Override the new intrinsicSize function. This override still doesn't
2711         make sense, so left a FIXME in here.
2712
2713         * rendering/RenderBox.h: Added an intrinsicSize function here to replace
2714         the intrinsicWidth/Height functions removed from RenderObject.
2715         * rendering/RenderBox.cpp:
2716         (WebCore::RenderBox::calcReplacedWidthUsing): Use intrinsicSize instead
2717         of intrinsicWidth.
2718         (WebCore::RenderBox::calcReplacedHeightUsing): Ditto, but for height.
2719
2720         * rendering/RenderHTMLCanvas.h: Changed the constructor parameter to be
2721         an HTMLCanvasElement* instead of Node*. Also added a canvasSizeChanged
2722         function.
2723         * rendering/RenderHTMLCanvas.cpp:
2724         (WebCore::RenderHTMLCanvas::RenderHTMLCanvas): Pass an initial intrinsic
2725         size based on the current size of the canvas element. This is now the
2726         responsibility of the renderer and the DOM element calls the canvasSizeChanged
2727         function when the size changes.
2728         (WebCore::RenderHTMLCanvas::paint): Removed checks of the type of the element,
2729         and used the node() function because we don't have to worry about the anonymous
2730         case in this class.
2731         (WebCore::RenderHTMLCanvas::canvasSizeChanged): Added. Changes the size and
2732         then calls setNeedsLayout and setPrefWidthsDirty as needed. I based the logic
2733         here on careful reading of RenderImage::imageChanged.
2734
2735         * rendering/RenderImage.cpp:
2736         (WebCore::RenderImage::RenderImage): Pass a default intrinsic size of 0,0
2737         instead of calling setIntrinsicWidth/Height.
2738         (WebCore::RenderImage::setImageSizeForAltText): Call the new intrinsic size
2739         functions instead of the width/height ones. Simplifies the logic since we
2740         handle both dimensions at once.
2741         (WebCore::RenderImage::imageChanged): Ditto.
2742         (WebCore::RenderImage::layout): Ditto.
2743         (WebCore::RenderImage::calcAspectRatioWidth): Ditto.
2744         (WebCore::RenderImage::calcAspectRatioHeight): Ditto.
2745
2746         * rendering/RenderObject.h: Removed intrinsicWidth/Height virtual functions.
2747
2748         * rendering/RenderReplaced.h: Replaced intrinsicWidth, intrinsicHeight,
2749         setIntrinsicWidth, setIntrinsicHeight, m_intrinsicWidth, and m_intrinsicHeight
2750         with intrinsicSize, setIntrinsicSize, and m_intrinsicSize.
2751         * rendering/RenderReplaced.cpp:
2752         (WebCore::RenderReplaced::RenderReplaced): Added a second contructor that takes
2753         an intrinsic size parameter. Also updated constructor since the intrinsic size
2754         is now an IntSize instead of two integers.
2755         (WebCore::RenderReplaced::intrinsicSize): Added. No point in making this inline
2756         because it's a virtual function.
2757         (WebCore::RenderReplaced::setIntrinsicSize): Added. Didn't make this inline,
2758         partly because in the future we might want this to be more than just a simple
2759         setter function, factoring in common code used in both RenderImage and
2760         RenderHTMLCanvas.
2761
2762         * rendering/RenderWidget.h: Removed a stray using declaration that wasn't needed.
2763
2764 2007-05-01  David Hyatt  <hyatt@apple.com>
2765
2766         Fix for hang when incorrectly trying to add before/after content to
2767         a <select>.  Disallow generated content in all selects and also turn it
2768         off for <input> buttons.
2769
2770         Reviewed by aroben
2771
2772         * rendering/RenderBlock.cpp:
2773         (WebCore::RenderBlock::setStyle):
2774         * rendering/RenderButton.cpp:
2775         (WebCore::RenderButton::canHaveChildren):
2776         * rendering/RenderButton.h:
2777
2778 2007-05-01  Darin Adler  <darin@apple.com>
2779
2780         Reviewed by Hyatt.
2781
2782         - removed the m_implicit bit from Node, freeing up a bit
2783
2784         - fixed <rdar://problem/5172607> XML parser is creating implicit tbody elements
2785         - fixed <rdar://problem/5172596> HTML-parser-created tbody elements are being
2786           ignored when processing CSS child rules
2787
2788         Test: fast/css/child-selector-implicit-tbody.html
2789
2790         * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::checkSelector):
2791         Removed code that used to look at implicitNode(), which no longer exists.
2792
2793         * css/html4.css: Added a style rule to handle cases where we have a tr
2794         inside a table with no intervening table section.
2795
2796         * dom/Node.h: Removed the bit.
2797         * dom/Node.cpp:
2798         (WebCore::Node::Node): Don't initialize the bit.
2799         (WebCore::Node::dump): Don't dump the bit.
2800
2801         * dom/XMLTokenizer.cpp:
2802         (WebCore::XMLTokenizer::startElementNs): Remove the code that made a
2803         table body element. This is handled in the render tree, the DOM tree
2804         should not be mangled.
2805         (WebCore::XMLTokenizer::endElementNs): Removed code that used to look at
2806         implicitNode(), which no longer exists.
2807
2808         * html/HTMLElementFactory.cpp: (WebCore::tableSectionConstructor):
2809         Removed boolean parameter that was passed to the HTMLTableSectionElement
2810         constructor.
2811         * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Ditto.
2812         * html/HTMLTableElement.cpp:
2813         (WebCore::HTMLTableElement::createTHead): Ditto.
2814         (WebCore::HTMLTableElement::createTFoot): Ditto.
2815         (WebCore::HTMLTableElement::insertRow): Changed to return a PassRefPtr,
2816         because it's possible the row could be removed from the table by JavaScript
2817         code responding to DOM mutation events before the function returns. Just
2818         something I noticed by code inspection.
2819
2820         * html/HTMLTableSectionElement.cpp:
2821         (WebCore::HTMLTableSectionElement::HTMLTableSectionElement): Removed
2822         boolean "implicit" parameter to the constructor.
2823         (WebCore::HTMLTableSectionElement::insertRow): Changed to return a
2824         PassRefPtr for the same reason cited above.
2825
2826         * html/HTMLTableElement.h: Changed the return value of insertRow to be
2827         a PassRefPtr.
2828         * html/HTMLTableSectionElement.h: Ditto.
2829
2830 2007-04-30  David Hyatt  <hyatt@apple.com>
2831
2832         Fix for bug 12691, generated content and display: table-cell duplicates
2833         content on a size change.  Make sure that the code to update before/after
2834         content is smart enough to drill into anonymous containers to find the
2835         old child.
2836
2837         Reviewed by olliej
2838
2839         Added fast/css-generated-content/table-cell-before-content.html
2840
2841         * rendering/RenderBlock.cpp:
2842         (WebCore::RenderBlock::setStyle):
2843         * rendering/RenderButton.cpp:
2844         (WebCore::RenderButton::updateBeforeAfterContent):
2845         * rendering/RenderButton.h:
2846         * rendering/RenderContainer.cpp:
2847         (WebCore::RenderContainer::beforeAfterContainer):
2848         (WebCore::RenderContainer::updateBeforeAfterContent):
2849         (WebCore::RenderContainer::updateBeforeAfterContentForObject):
2850         * rendering/RenderContainer.h:
2851         * rendering/RenderInline.cpp:
2852         (WebCore::RenderInline::setStyle):
2853         (WebCore::RenderInline::addChildToFlow):
2854         (WebCore::RenderInline::splitInlines):
2855
2856 2007-04-30  Jungshik Shin <jungshik.shin@gmail.com>
2857
2858         Reviewed by justin
2859         
2860         <http://bugs.webkit.org/show_bug.cgi?id=13552>
2861         comment to Range::comparePoint in dom/Range.cpp has 
2862         '0xD0' in place of '-': leading to a compiler warning
2863
2864         * dom/Range.cpp:
2865         (WebCore::Range::comparePoint):
2866
2867 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
2868
2869         Reviewed by darin
2870
2871         <rdar://problem/4875189> List gets deleted when replacing contents
2872
2873         * editing/ReplaceSelectionCommand.cpp:
2874         (WebCore::ReplaceSelectionCommand::doApply): Don't expand
2875         to include elements, like lists, when deleting a selection 
2876         to replace it.
2877
2878 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
2879
2880         Reviewed by ggaren
2881         
2882         Buildfix.  Leave in grammar checking machinery to 
2883         keep WebKit building on other platforms but don't
2884         operate on sentence sized chunks so that we don't
2885         re-introduce 5157329.
2886
2887         * editing/Editor.h:
2888         * editing/mac/EditorMac.mm:
2889         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
2890         (WebCore::markMisspellingsOrBadGrammar):
2891         (WebCore::Editor::markMisspellings):
2892         (WebCore::Editor::markBadGrammar):
2893         * page/Frame.cpp:
2894         (WebCore::Frame::respondToChangedSelection):
2895
2896 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
2897
2898         Reviewed by darin
2899
2900         <rdar://problem/5168598> 
2901         Crash when deleting a link inside an input field
2902         
2903         Deletion code tries to update one of its positions to keep 
2904         it valid and nullifies it.  Later in mergeParagraphs we try 
2905         to find out if it's valid by checking to see if it's still in 
2906         the document and crash.
2907         
2908         The fix is just to not bother keeping the position, 
2909         m_upstreamStart, valid, since after the point in the code 
2910         under examination, it doesn't need to be valid anymore.  
2911         Besides, code to update DeleteSelectionCommand's positions 
2912         should go in the functions that handle the content removal 
2913         that might invalid them (there are already FIXMEs about this).
2914         
2915         Also, users shouldn't be able to insert links (or any rich content)
2916         into plaintext-only regions like text fields, even if those
2917         text fields are inside richly editable regions.  This is a 
2918         separate bug and is filed as 5171552.
2919
2920         * editing/DeleteSelectionCommand.cpp:
2921         (WebCore::DeleteSelectionCommand::handleGeneralDelete): Don't
2922         bother updating m_upstreamStart.
2923
2924 2007-04-30  Patti Hoa  <patti@apple.com>
2925
2926         Reviewed by Dave Hyatt.
2927         
2928         <rdar://problem/5108546> REGRESSION: Zoom follows keyboard focus does not work
2929
2930         * WebCore.xcodeproj/project.pbxproj:
2931         Add new file SelectionControllerMac.mm
2932         * dom/Document.cpp:
2933         (WebCore::Document::updateSelection):
2934         Move the code to fire off AXSelectedTextChanged notification to a new method notifyAccessibilityForSelectionChange in SelectionControllerMac.mm
2935         * editing/SelectionController.cpp:
2936         (WebCore::SelectionController::setSelection):
2937         call notifyAccessibilityForSelectionChange to handle firing of accessibility notification and zoomFocusChange
2938         * editing/SelectionController.h:
2939         Add notifyAccessibilityForSelectionChange method for Mac platform
2940         * platform/Widget.h:
2941         * platform/mac/WidgetMac.mm:
2942         (WebCore::Widget::convertToScreenCoordinate):
2943         Add a helper routine that takes IntPoint in local coordinate and convert that to screen coordinate
2944
2945 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
2946
2947         Reviewed by harrison
2948
2949         <rdar://problem/5157329> 
2950         REGRESSION: Crash at WTF::fastFree() when arrowing or deleting backward through editable text (13493)
2951         
2952         Backing out the changes for 4859132.
2953
2954         * editing/Editor.h:
2955         * editing/mac/EditorMac.mm:
2956         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
2957         (WebCore::Editor::markMisspellings):
2958         * page/Frame.cpp:
2959         (WebCore::Frame::respondToChangedSelection):
2960
2961 2007-04-29  Antti Koivisto  <antti@apple.com>
2962
2963         Reviewed by Oliver.
2964
2965         Fix <rdar://problem/5169261>
2966         REGRESSION: Google Maps zooming too sensitive when using two fingers on trackpad
2967         
2968         Use line based delta values when generating DOM wheel events, use pixel deltas
2969         for scrolling only.
2970         
2971         No test case, requires user interaction and specific hardware.
2972
2973         * page/EventHandler.cpp:
2974         (WebCore::EventHandler::handleWheelEvent):
2975         * platform/PlatformWheelEvent.h:
2976         (WebCore::PlatformWheelEvent::continuousDeltaX):
2977         (WebCore::PlatformWheelEvent::continuousDeltaY):
2978         * platform/mac/WheelEventMac.mm:
2979         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2980
2981 2007-04-29  Oliver Hunt  <oliver@apple.com>
2982
2983         Reviewed by Brady.
2984
2985         Build fix for experimental features build
2986
2987         * rendering/RenderForeignObject.cpp:
2988
2989 2007-04-29  Mitz Pettel  <mitz@webkit.org>
2990
2991         Reviewed by Dave Hyatt.
2992
2993         - fix http://bugs.webkit.org/show_bug.cgi?id=13544
2994           REGRESSION (r21120): Member profile frame not erased at Yahoo! Answers
2995
2996         Test: fast/repaint/layer-hide-when-needs-layout.html
2997
2998         * rendering/RenderObject.cpp:
2999         (WebCore::RenderObject::setStyle): If we get a layout hint, we count on
3000         layout() or updateLayerPositions() to repaint. In the case of a layer
3001         going invisible, however, we need to repaint here since neither of the
3002         above will do it.
3003
3004 2007-04-29  Oliver Hunt  <oliver@apple.com>
3005
3006         Reviewed by Steve.
3007
3008         Fix for <rdar://problem/5126393> REGRESSION (r19672-19697): Safari drag image drags at original size (13261)
3009
3010         Added logic to ensure that when we create the drag image
3011         we're looking at the rendered image size.
3012
3013         * page/DragController.cpp:
3014         (WebCore::DragController::doImageDrag):
3015           Pass the rendered image size to fitDragImageToMaxSize
3016
3017         * platform/DragImage.cpp:
3018         (WebCore::fitDragImageToMaxSize):
3019            Need to do scaling relative to rendered image size
3020
3021         * platform/DragImage.h:
3022            scaleDragImage needs x and y scales to allow for them to be
3023            scaled seperately on a page
3024
3025         * platform/gdk/DragImageGdk.cpp:
3026         (WebCore::scaleDragImage):
3027            Prevent build bustage
3028
3029         * platform/mac/DragImageMac.mm:
3030         (WebCore::scaleDragImage):
3031            scale width and height independently
3032
3033         * platform/qt/DragImageQt.cpp:
3034         (WebCore::scaleDragImage):
3035            Prevent build bustage
3036
3037 2007-04-29  Darin Adler  <darin@apple.com>
3038
3039         Reviewed by Adele.
3040
3041         - fix the Gmail part of http://bugs.webkit.org/show_bug.cgi?id=12798
3042           and <rdar://problem/4118559>
3043
3044         This patch changes things so that resizing can make things larger than their
3045         initial size, but not smaller. I believe this resolves the problem for Gmail,
3046         but you can still get strange behavior if you have a small right-aligned <textarea>.
3047
3048         * rendering/RenderLayer.cpp:
3049         (WebCore::RenderLayer::resize): Rewrote to use more IntPoint and IntSize and add
3050         in a new minimum-size algorithm. This function now has the side effect of storing
3051         a new minimumSizeForResizing in the element being resized, and respects any existing
3052         minimum as well.
3053         (WebCore::RenderLayer::offsetFromResizeCorner): Reversed this so it converts the
3054         point into coordinates relative to the resize corner, hence negative numbers mean
3055         the point is above and to the left. This is used only in the algorithm above.
3056
3057         * dom/Element.h: Removed unneeded include of Attr.h, and added forward declarations
3058         as needed. Removed all friend declarations; there was no need for any of them.
3059         Tweaked formatting of various declarations and removed unneeded parameter names.
3060         Made as much as possible private, and a couple things public to avoid the need for
3061         friend classes. Added minimumSizeForResizing, setMinimumSizeForResizing, rareData,
3062         and createRareData functions.
3063
3064         * dom/Element.cpp:
3065         (WebCore::rareDataMap): Added. Function to return the single global map.
3066         (WebCore::rareDataFromMap): Added. For use by inlined functions to get the
3067         data from the map in the case where it's present.
3068         (WebCore::ElementRareData::ElementRareData): Added.
3069         (WebCore::Element::~Element): Added code to delete the element from the rare
3070         data map when appropriate.
3071         (WebCore::Element::rareData): Added.
3072         (WebCore::Element::createRareData): Added.
3073         (WebCore::Element::setAttributeNodeNS): Got rid of the old inline version of this,
3074         since it was the sole reason we had to include Attr.h in Element.h.
3075         (WebCore::Element::minimumSizeForResizing): Added. Accesses rare data.
3076         (WebCore::Element::setMinimumSizeForResizing): Ditto.
3077
3078         * dom/Node.h: Renamed the m_specified bit since it's now used for two purposes.
3079         Its new long name is m_attrWasSpecifiedOrElementHasRareData.
3080
3081         * dom/Attr.cpp: (WebCore::Attr::Attr): Updated for bit name change.
3082         * dom/Attr.h:
3083         (WebCore::Attr::specified): Ditto.
3084         (WebCore::Attr::setSpecified): Added, since setting the bit directly is pretty ugly now.
3085         * dom/Document.cpp: (WebCore::Document::adoptNode): Updated for bit name change.
3086         * dom/Node.cpp:
3087         (WebCore::Node::Node): Ditto.
3088         (WebCore::Node::dump): Ditto.
3089
3090         * dom/NamedAttrMap.cpp: (WebCore::NamedAttrMap::isReadOnlyNode): Moved out of line,
3091         since this was the sole reason we had to include Element.h in NamedAttrMap.h.
3092
3093         * html/HTMLElement.cpp:
3094         (WebCore::HTMLElement::nodeName): Changed to use tagQName() since that's a public
3095         way to do something that's now private.
3096         (WebCore::HTMLElement::cloneNode): Ditto.
3097
3098         * dom/Attribute.cpp:
3099         * dom/NamedAttrMap.h:
3100         * dom/NamedMappedAttrMap.cpp:
3101         * dom/StyledElement.h:
3102         * html/HTMLTokenizer.h:
3103         * xml/XPathFunctions.cpp:
3104         * xml/XPathStep.cpp:
3105         Updated includes, and other administrivia.
3106
3107 2007-04-29  Mitz Pettel  <mitz@webkit.org>
3108
3109         Reviewed by Darin and Hyatt.
3110
3111         - http://bugs.webkit.org/show_bug.cgi?id=13487
3112           Implement O(1) absoluteClippedOverflowRect and absoluteOutlineBox during layout for a possible speed gain
3113
3114         Test for a bug fixed by this patch: fast/repaint/intermediate-layout-position-clip.html
3115
3116         By keeping track of the total translation and clip during layout, absolutePosition and
3117         computeAbsoluteRepaintRect become O(1).
3118
3119         * WebCore.pro: Added LayoutState.cpp
3120         * WebCore.vcproj/WebCore/WebCore.vcproj: Added LayoutState.{cpp,h}
3121         * WebCore.xcodeproj/project.pbxproj: Added LayoutState.{cpp,h}
3122         * WebCoreSources.bkl: Added LayoutState.cpp
3123         * page/FrameView.cpp:
3124         (WebCore::FrameView::layout): When doing subtree layout, push an initial layout state for the
3125         layout root.
3126         * rendering/LayoutState.cpp: Added. A LayoutState corresponding to a box consists of the origin of
3127         its coordinate system in view coordinates and possibly the clip rect, in view coordinates, which
3128         applies to its children.
3129         (WebCore::LayoutState::LayoutState):
3130         (WebCore::LayoutState::destroy):
3131         (WebCore::throw):
3132         (WebCore::LayoutState::operator delete):
3133         * rendering/LayoutState.h: Added.
3134         (WebCore::LayoutState::LayoutState):
3135         * rendering/RenderBlock.cpp:
3136         (WebCore::RenderBlock::layoutBlock): Factored out the "only positioned objects" case into
3137         layoutOnlyPositionedObjects(). Added code to push/pop LayoutState, unless we have columns, in
3138         which case we disable/enable LayoutState. Removed the translation by the layout delta
3139         of the old absolute rects, since that is now integral to absoluteClippedOverflowRect() and
3140         absoluteOutlineBox().
3141         (WebCore::RenderBlock::layoutOnlyPositionedObjects): Added this helper function that checks for
3142         and handles the case where only positioned objects need layout. Returns true in that case.
3143         (WebCore::RenderBlock::repaintOverhangingFloats): Disabled LayoutState when repainting floats, since
3144         they may belong to other containers.
3145         (WebCore::RenderBlock::updateFirstLetter): Disabled LayoutState when adding and removing from the
3146         first letter container, since it may be different than ourselves.
3147         * rendering/RenderBlock.h:
3148         * rendering/RenderBox.cpp:
3149         (WebCore::RenderBox::setStyle): Minor cleanup: changed element()->document() to the equivalent document().
3150         (WebCore::RenderBox::offsetForPositionedInContainer): Added. Factored out common code from
3151         absolutePosition, computeAbsoluteRepaintRect and RenderLayer::updateLayerPosition into this function.
3152         (WebCore::RenderBox::absolutePosition): Added an O(1) code path when this function is called during
3153         layout (and LayoutState has not been disabled). Factored out some code into
3154         offsetForPositionedInContainer.
3155         (WebCore::RenderBox::absoluteClippedOverflowRect): Added the layout delta here, so callers don't need
3156         to.
3157         (WebCore::RenderBox::computeAbsoluteRepaintRect): Added an O(1) code path when this function is called
3158         during layout (and LayoutState has not been disabled). Factored out some code into
3159         offsetForPositionedInContainer.
3160         * rendering/RenderContainer.cpp:
3161         (WebCore::RenderContainer::layout): Added LayoutState push/pop.
3162         * rendering/RenderFlexibleBox.cpp:
3163         (WebCore::RenderFlexibleBox::layoutBlock): Factored out the "only positioned objects" case into
3164         layoutOnlyPositionedObjects(). Added LayoutState push/pop. Removed the translation by the layout delta
3165         of the old absolute rects, since that is now integral to absoluteClippedOverflowRect() and
3166         absoluteOutlineBox().
3167         * rendering/RenderFlow.cpp:
3168         (WebCore::RenderFlow::absoluteClippedOverflowRect): Added an ASSERT.
3169         * rendering/RenderForeignObject.cpp:
3170         (WebCore::RenderForeignObject::layout): Disabled LayoutState because it is incompatible with arbitrary
3171         affine transforms.
3172         * rendering/RenderHTMLCanvas.cpp:
3173         (WebCore::RenderHTMLCanvas::layout): Removed the translation by the layout delta of the old absolute
3174         rects, since that is now integral to absoluteClippedOverflowRect() and absoluteOutlineBox().
3175         * rendering/RenderImage.cpp:
3176         (WebCore::RenderImage::layout): Ditto.
3177         * rendering/RenderLayer.cpp:
3178         (WebCore::RenderLayer::updateLayerPositions): Added ASSERTs. Factored out some code into
3179         RenderBox::offsetForPositionedInContainer.
3180         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Disabled LayoutState around the call to
3181         scrollToOffset.
3182         * rendering/RenderListItem.cpp:
3183         (WebCore::RenderListItem::updateMarkerLocation): Disabled LayoutState when moving the list marker, since
3184         it can trigger repainting in other containers.
3185         * rendering/RenderObject.cpp:
3186         (WebCore::RenderObject::isRoot): Minor cleanup: changed element()->document() to the equivalent
3187         document().
3188         (WebCore::RenderObject::computeAbsoluteRepaintRect): Removed 'return' at the end of the function.
3189         (WebCore::RenderObject::container): Reordered to avoid calling isText() twice.
3190         (WebCore::RenderObject::absoluteOutlineBox): Added the layout delta here, so callers don't need to.
3191         * rendering/RenderSVGContainer.cpp:
3192         (WebCore::RenderSVGContainer::layout): Disabled LayoutState because it is incompatible with arbitrary
3193         affine transforms.
3194         * rendering/RenderTable.cpp:
3195         (WebCore::RenderTable::layout):  Factored out the "only positioned objects" case into
3196         layoutOnlyPositionedObjects(). Added LayoutState push/pop. Removed the translation by the layout delta
3197         of the old absolute rects, since that is now integral to absoluteClippedOverflowRect() and
3198         absoluteOutlineBox().
3199         * rendering/RenderTableCell.cpp:
3200         (WebCore::RenderTableCell::absoluteClippedOverflowRect): Added the layout delta here, so callers
3201         don't need to.
3202         (WebCore::RenderTableCell::computeAbsoluteRepaintRect): For the O(1) code path, skipped the correction
3203         for the parent row, because RenderTableRow doesn't push a translation into LayoutState.
3204         (WebCore::RenderTableCell::absolutePosition): Ditto.
3205         * rendering/RenderTableRow.cpp:
3206         (WebCore::RenderTableRow::layout): Added LayoutState push/pop.
3207         * rendering/RenderTableSection.cpp:
3208         (WebCore::RenderTableSection::setCellWidths): Added LayoutState push/pop if cells are repainted or
3209         receive layout.
3210         (WebCore::RenderTableSection::calcRowHeight): Ditto.
3211         (WebCore::RenderTableSection::layoutRows): Added LayoutState push/pop.
3212         * rendering/RenderView.cpp:
3213         (WebCore::RenderView::RenderView):
3214         (WebCore::RenderView::layout): Added initial LayoutState setup for the layout.
3215         (WebCore::RenderView::paintBoxDecorations): Minor cleanup: changed element()->document() to the
3216         equivalent document().
3217         (WebCore::RenderView::repaintViewRectangle): Ditto.
3218         (WebCore::RenderView::pushLayoutState): Added. Pushes initial layout state for subtree layout.
3219         * rendering/RenderView.h:
3220         (WebCore::RenderView::pushLayoutState):
3221         (WebCore::RenderView::popLayoutState):
3222         (WebCore::RenderView::layoutState):
3223         (WebCore::RenderView::disableLayoutState):
3224         (WebCore::RenderView::enableLayoutState):
3225
3226 2007-04-29  David Hyatt  <hyatt@apple.com>
3227
3228         Fix for bugzilla 13535, regression from positioning cleanup a while
3229         back.  Some code got added to compute available width for a relpositioned
3230         inline, only the code meant to be used for inline flows and not inline blocks.
3231
3232         Reviewed by mjs
3233
3234         fast/block/positioning/inline-block-relposition.html
3235
3236         * rendering/RenderBox.cpp:
3237         (WebCore::RenderBox::containingBlockWidthForPositioned):
3238
3239 2007-04-29  Oliver Hunt  <oliver@apple.com>
3240
3241         Reviewed by Zack.
3242
3243         Implement basic drag and drop support for qt
3244         this allows content and link dragging but does not
3245         provide the DOM data access methods.
3246
3247         * platform/DragData.h:
3248         * platform/qt/ClipboardQt.cpp:
3249         (WebCore::ClipboardQt::ClipboardQt):
3250         (WebCore::ClipboardQt::~ClipboardQt):
3251         (WebCore::ClipboardQt::clearData):
3252         (WebCore::ClipboardQt::clearAllData):
3253         (WebCore::ClipboardQt::setData):
3254         (WebCore::ClipboardQt::declareAndWriteDragImage):
3255         (WebCore::ClipboardQt::writeURL):
3256         (WebCore::ClipboardQt::writeRange):
3257         (WebCore::ClipboardQt::hasData):
3258         * platform/qt/ClipboardQt.h:
3259         (WebCore::ClipboardQt::clipboardData):
3260         (WebCore::ClipboardQt::invalidateWritableData):
3261         * platform/qt/DragDataQt.cpp:
3262         (WebCore::DragData::canSmartReplace):
3263         (WebCore::DragData::containsPlainText):
3264         (WebCore::DragData::asPlainText):
3265         (WebCore::DragData::createClipboard):
3266         (WebCore::DragData::containsCompatibleContent):
3267         (WebCore::DragData::containsURL):
3268         (WebCore::DragData::asURL):
3269         (WebCore::DragData::asFragment):
3270
3271 2007-04-28  Maciej Stachowiak  <mjs@apple.com>
3272
3273         Reviewed by Darin and Oliver.
3274
3275         - change Document to hold onto Frame* instead of FrameView*
3276         
3277         This is an architectural cleanup and a prerequisite to fixing citibank login
3278         in an architecturally sound way.
3279
3280         Some fixups for the page cache:
3281         
3282         * history/CachedPage.cpp:
3283         (WebCore::CachedPage::restore): Add an assert that the document's view
3284         matches the cached page's view - this needs to be true by the time this
3285         function is called.
3286         (WebCore::CachedPage::clear): Change assert to require frame matching, not
3287         view matching.
3288         * history/CachedPage.h:
3289         (WebCore::CachedPage::view): Add a way to get the view out.
3290         * loader/FrameLoader.cpp:
3291         (WebCore::FrameLoader::begin): pass Frame, not FrameView, when creating document
3292         (WebCore::FrameLoader::open): restore view based on CachedPage, not Document. 
3293
3294         Remaining changes are just straightforward updates based on which
3295         pointer is held or passed:
3296         
3297         * dom/DOMImplementation.cpp:
3298         (WebCore::DOMImplementation::createDocument):
3299         (WebCore::DOMImplementation::createHTMLDocument):
3300         * dom/DOMImplementation.h:
3301         * dom/Document.cpp:
3302         (WebCore::Document::Document):
3303         (WebCore::Document::view):
3304         (WebCore::Document::frame):
3305         (WebCore::Document::recalcStyle):
3306         (WebCore::Document::updateLayout):
3307         (WebCore::Document::attach):
3308         (WebCore::Document::detach):
3309         (WebCore::Document::createTokenizer):
3310         (WebCore::Document::recalcStyleSelector):
3311         (WebCore::Document::setInPageCache):
3312         (WebCore::Document::applyXSLTransform):
3313         * dom/Document.h:
3314         * html/HTMLDocument.cpp:
3315         (WebCore::HTMLDocument::HTMLDocument):
3316         * html/HTMLDocument.h:
3317         * html/HTMLViewSourceDocument.cpp:
3318         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
3319         * html/HTMLViewSourceDocument.h:
3320         * ksvg2/svg/SVGDocument.cpp:
3321         (WebCore::SVGDocument::SVGDocument):
3322         * ksvg2/svg/SVGDocument.h:
3323         * loader/ImageDocument.cpp:
3324         (WebCore::ImageDocument::ImageDocument):
3325         * loader/ImageDocument.h:
3326         * loader/PluginDocument.cpp:
3327         (WebCore::PluginDocument::PluginDocument):
3328         * loader/PluginDocument.h:
3329         * loader/TextDocument.cpp:
3330         (WebCore::TextDocument::TextDocument):
3331         * loader/TextDocument.h:
3332         * xml/XSLTProcessor.cpp:
3333         (WebCore::XSLTProcessor::createDocumentFromSource):
3334         (WebCore::XSLTProcessor::transformToDocument):
3335         * xml/XSLTProcessor.h:
3336
3337 2007-04-28  Adele Peterson  <adele@apple.com>
3338
3339         RS by Darin.
3340
3341         Update to fix for <rdar://problem/5152299>
3342
3343         Test: fast/events/no-blur-on-enter-button.html
3344
3345         * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::defaultEventHandler):
3346         Don't blur the button when handling the enter key.  This matches our new behavior for input elements.
3347
3348 2007-04-28  Adele Peterson  <adele@apple.com>
3349
3350         Fix by Darin, reviewed by me.
3351
3352         Fix for <rdar://problem/5152299> REGRESSION: <button> elements do not respond to space and return key as similar <input> elements do
3353
3354         Tests:
3355         fast/forms/button-spacebar-click.html
3356         fast/forms/button-enter-click.html
3357
3358         * html/HTMLButtonElement.h: (WebCore::HTMLButtonElement::): Made type enum private.
3359         Removed unnecessary m_value and m_currValue, and unused m_dirty.
3360         * html/HTMLButtonElement.cpp:
3361         (WebCore::HTMLButtonElement::HTMLButtonElement): Removed initialization of m_dirty.
3362         (WebCore::HTMLButtonElement::parseMappedAttribute): Removed case to parse value and accesskey attributes, which don't do anything.
3363         (WebCore::HTMLButtonElement::defaultEventHandler): Removed unnecessary check for button type.
3364          Added cases to handle spacebar and enter keys in the same way that they're handled for <input type=button/reset/submit> buttons.
3365         (WebCore::HTMLButtonElement::isSuccessfulSubmitButton): Shortened comment.
3366         (WebCore::HTMLButtonElement::appendFormData): Use value() instead of m_currValue.  Renamed encoding argument to formData.
3367
3368 2007-04-28  Mitz Pettel  <mitz@webkit.org>
3369
3370         Reviewed by Darin.
3371
3372         - fix http://bugs.webkit.org/show_bug.cgi?id=13501
3373           REGRESSION (r21093): Pasting into text field fails and makes the caret disappear
3374
3375         Test: fast/dynamic/anonymous-block-layer-lost.html
3376
3377         * rendering/RenderBlock.cpp:
3378         (WebCore::RenderBlock::removeChild): Avoid cutting off layers when removing
3379         the anonymous block.
3380
3381 2007-04-28  Mitz Pettel  <mitz@webkit.org>
3382
3383         Reviewed by Darin.
3384
3385         - fix http://bugs.webkit.org/show_bug.cgi?id=13471
3386           REGRESSION (r21045): Secure keyboard entry mode remains in effect after leaving a password field by submitting
3387
3388         * loader/FrameLoader.cpp:
3389         (WebCore::FrameLoader::clear): Replaced direct access to Frame's d->m_doc
3390         with a call to Frame::setDocument.
3391         (WebCore::FrameLoader::begin): Ditto.
3392         (WebCore::FrameLoader::open): Ditto.
3393         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): Ditto.
3394         (WebCore::FrameLoader::canCachePage): Added a comment.
3395         * manual-tests/secure-keyboard-enabled-after-submit.html: Added.
3396         * page/Frame.cpp:
3397         (WebCore::Frame::setDocument): Reset secure keyboard entry, in case the
3398         old document's focused node has set it.
3399
3400 2007-04-28  Mitz Pettel  <mitz@webkit.org>
3401
3402         Reviewed by Adele.
3403
3404         - fix http://bugs.webkit.org/show_bug.cgi?id=13379
3405           REGRESSION: Cannot add an option to a selected popup
3406
3407         * manual-tests/update-empty-popup.html: Added.
3408         * platform/mac/PopupMenuMac.mm:
3409         (WebCore::PopupMenu::show): Added a call to the client's hidePopup()
3410         callback before returning in the case that the menu is empty. Otherwise
3411         the client thinks that the menu stayed open.
3412
3413 2007-04-28  Adele Peterson  <adele@apple.com>
3414
3415         Reviewed by Darin.
3416
3417         Fix for <rdar://problem/4806988> REGRESSION: history.go(0) doesn't reload page (affects buttons at facebook.com)
3418
3419         Test: fast/history/history_reload.html
3420
3421         * loader/FrameLoader.cpp: (WebCore::FrameLoader::scheduleHistoryNavigation):
3422         We avoid doing a redirection when going to the same url in a history navigation, but we have to still
3423         schedule a redirection when the number of steps is zero so we can force a reload.
3424
3425 2007-04-28  Alexey Proskuryakov  <ap@webkit.org>
3426
3427         Reviewed by Darin.
3428
3429         http://bugs.webkit.org/show_bug.cgi?id=13514
3430         REGRESSION (r20997-21003): Crash in WebCore::Node::document
3431
3432         Test: fast/dom/NodeList/childNodes-reset-cache.html
3433
3434         * dom/Node.cpp:
3435         (WebCore::Node::notifyLocalNodeListsChildrenChanged): Reset the common caches for child node
3436         lists. We cannot rely on notifications, since there may be no list objects left around.
3437
3438         * dom/ChildNodeList.cpp:
3439         (WebCore::ChildNodeList::rootNodeChildrenChanged):
3440         * dom/ChildNodeList.h:
3441         Override rootNodeChildrenChanged() with an empty implementation, now that caches are reset
3442         in Node::notifyLocalNodeListsChildrenChanged().
3443
3444 2007-04-28  Mark Rowe  <mrowe@apple.com>
3445
3446         Build fix.  Change use of nil to 0 in C++ source file.
3447
3448         * editing/Editor.cpp:
3449         (WebCore::Editor::increaseSelectionListLevel):
3450         (WebCore::Editor::increaseSelectionListLevelOrdered):
3451         (WebCore::Editor::increaseSelectionListLevelUnordered):
3452
3453 2007-04-28  Darin Adler  <darin@apple.com>
3454
3455         Reviewed by Adele.
3456
3457         - fix http://bugs.webkit.org/show_bug.cgi?id=6216
3458           REGRESSION: getElementsByTagNameNS with empty namespace doesn't work
3459
3460         * dom/Node.cpp:
3461         (WebCore::TagNodeList::TagNodeList): Changed parameter to PassRefPtr, tweaked formatting.
3462         (WebCore::TagNodeList::item): Tweaked formatting.
3463         (WebCore::TagNodeList::nodeMatches): Tweaked formatting.
3464         (WebCore::Node::setPrefix): Tweaked formatting.
3465         (WebCore::Node::getElementsByTagNameNS): Added special case to turn empty namespaces into
3466         null namespaces.
3467
3468 2007-04-28  Darin Adler  <darin@apple.com>
3469
3470         Reviewed by Kevin Decker.
3471
3472         - fix <rdar://problem/5148271> Chinese numbers are incorrect in numbered lists
3473           (including pasting from TextEdit to Mail)
3474
3475         Covered by an existing regression test, which had wrong results checked in.
3476
3477         Hyatt told me not to use the algorithm in the CSS 3 specification, but I didn't listen!
3478         This corrects mistakes there and makes our results match current Firefox.
3479
3480         * rendering/RenderListMarker.cpp:
3481         (WebCore::toCJKIdeographic): Added code to strip off trailing zero digits.
3482         Added special case for zero, since that's the one case where we don't want
3483         to strip off trailing zero digits. Fixed mixed-up logic that would put the
3484         digits in each group backwards.
3485         (WebCore::listMarkerText): Corrected character values for the CJK_IDEOGRAPHIC case.
3486
3487 2007-04-28  Darin Adler  <darin@apple.com>
3488
3489         Reviewed by Oliver.
3490
3491         - fix <rdar://problem/5138250> REGRESSION (r18245): Changing any one aspect
3492           of a font applies all the aspects to selected text
3493
3494         Since this bug is only visible with the font panel, I don't
3495         think there's any way to make a DumpRenderTree-driven test.
3496
3497         * editing/Editor.cpp: (WebCore::Editor::fontForSelection):
3498         Set hasMultipleFonts properly. The old code had an early exit
3499         that was left over from when hasMultipleFonts was a pointer.
3500
3501 2007-04-27  Mitz Pettel  <mitz@webkit.org>
3502
3503         Reviewed by Dave Hyatt.
3504
3505         - fix http://bugs.webkit.org/show_bug.cgi?id=13525
3506           Repainting a listbox schedules a relayout
3507
3508         No test possible as there is no change to functionality.
3509
3510         - fix the root cause of http://bugs.webkit.org/show_bug.cgi?id=10862
3511           REGRESSION: Collapsing form input on www.myspace.com
3512
3513         No test possible since text fields are no longer implemented as flexboxes.
3514
3515         * rendering/RenderObject.cpp:
3516         (WebCore::RenderObject::scheduleRelayout): Added a check that the subtree
3517         root is in the tree and not free-floating.
3518         * rendering/bidi.cpp:
3519         (WebCore::RenderBlock::bidiReorderCharacters): Changed addChild and removeChild
3520         to appendChildNode and removeChildNode to save some unnecessary overhead.
3521         These calls still mark the tree for relayout, but the change in scheduleRelayout 
3522         ensures that a layout won't be scheduled.
3523
3524 2007-04-27  Patti Hoa  <patti@apple.com>
3525
3526         Reviewed by Darin.
3527         
3528         <rdar://problem/5153017> REPRODUCIBLE ASSERT: range != nil in WebViewFactory.mm:415 -[WebViewFactory startOfTextMarkerRange:] (13354)
3529         
3530         * bridge/mac/WebCoreAXObject.mm:
3531         (-[WebCoreAXObject textMarkerRangeForRange:]):
3532         Fix the range length check.  It was incorrectly assuming that the max range requested cannot be equal
3533         to the length of the string.  Since NSRange location is index based, it's perfectly valid to have the max
3534         range equal to the the text length.
3535
3536 2007-04-27  David Harrison  <harrison@apple.com>
3537
3538         Reviewed by Darin.
3539
3540         <rdar://problem/5160627> Export JS list creation support as ObjC SPI for Mail
3541
3542         * WebCore.exp:
3543         * editing/Editor.h:
3544         * editing/Editor.cpp:
3545         (WebCore::Editor::insertOrderedList):
3546         (WebCore::Editor::insertUnorderedList):
3547         (WebCore::Editor::canIncreaseSelectionListLevel):
3548         (WebCore::Editor::canDecreaseSelectionListLevel):
3549         (WebCore::Editor::increaseSelectionListLevel):
3550         (WebCore::Editor::increaseSelectionListLevelOrdered):
3551         (WebCore::Editor::increaseSelectionListLevelUnordered):
3552         (WebCore::Editor::decreaseSelectionListLevel):
3553         Add insertOrderedList() and insertUnorderedList().
3554         Move existing list management functions from WebCoreFrameBridge.
3555         The level increasing functions now return a PassRefPtr<Node> instead of Node.
3556         Add check for canEditRichly.
3557         
3558         - in many other functions, condense the check for nil client().
3559         
3560         * editing/InsertListCommand.h:
3561         * editing/InsertListCommand.cpp:
3562         (WebCore::InsertListCommand::insertList):
3563         (WebCore::InsertListCommand::fixOrphanedListChild):
3564         (WebCore::InsertListCommand::doApply):
3565         Add insertList(), which returns the new list element.
3566         Don't set the list element's ID if the specified ID was an empty string.
3567                 
3568         * editing/ModifySelectionListLevel.h:
3569         * editing/ModifySelectionListLevel.cpp:
3570         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelWithType):
3571         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel):
3572         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered):
3573         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered):
3574         Return PassRefPtr<Node> instead of Node.
3575
3576         * page/mac/WebCoreFrameBridge.h:
3577         * page/mac/WebCoreFrameBridge.mm:
3578         Move list management functions to Editor.h and Editor.cpp.
3579
3580
3581 2007-04-27  David Hyatt  <hyatt@apple.com>
3582
3583         Fix for <rdar://problem/5134254>, toolbar buttons don't work in gmail after double-click.  Make sure
3584         to clear out the capturing frame, since you don't get a second up when a double-click happens.
3585
3586         Reviewed by mjs
3587
3588         * page/EventHandler.cpp:
3589         (WebCore::EventHandler::handleMouseDoubleClickEvent):
3590
3591 2007-04-27  Justin Garcia  <justin.garcia@apple.com>
3592
3593         Reviewed by oliver
3594
3595         <rdar://problem/5164796> 
3596         Enable execCommand("CreateLink", ...) for caret selections
3597
3598         * editing/CreateLinkCommand.cpp:
3599         (WebCore::CreateLinkCommand::doApply): For a caret
3600         selection, insert a link at the caret position
3601         with the url as the link text.
3602         * editing/JSEditor.cpp: Enable CreateLink for caret 
3603         selections.
3604
3605 2007-04-27  Antti Koivisto  <antti@apple.com>
3606
3607         Reviewed by Darin, Hyatt.
3608         
3609         Fix http://bugs.webkit.org/show_bug.cgi?id=13081
3610         Empty table cells not handled correctly
3611         <rdar://problem/5067926>
3612         
3613         To match Firefox and IE, empty table cells with variable width need to be
3614         treated as special case. They generally get zero width.
3615
3616         * rendering/AutoTableLayout.cpp:
3617         (WebCore::AutoTableLayout::recalcColumn):
3618         (WebCore::AutoTableLayout::calcEffectiveWidth):
3619         (WebCore::AutoTableLayout::layout):
3620         * rendering/AutoTableLayout.h:
3621         (WebCore::AutoTableLayout::Layout::Layout):
3622         * rendering/RenderStyle.h:
3623         (WebCore::RenderStyle::hasPadding):
3624
3625 2007-04-27  Rob Buis  <buis@kde.org>
3626
3627         Reviewed by Oliver.
3628
3629         http://bugs.webkit.org/show_bug.cgi?id=13052
3630         Text not rendered in a second inline SVG element
3631
3632         Correct the rendering of svg text when embedded in non-svg container.
3633
3634         * rendering/RenderSVGText.cpp:
3635         (WebCore::RenderSVGText::paint):
3636
3637 2007-04-27  Mark Rowe  <mrowe@apple.com>
3638
3639         Reviewed by Maciej.
3640
3641         * WebCore.pro: Remove non-existent paths from qmake files.
3642
3643 2007-04-25  Lars Naesbye Christensen <lars@naesbye.dk>
3644
3645         Reviewed by Timothy Hatcher.
3646
3647         http://bugs.webkit.org/show_bug.cgi?id=13477
3648         Bug 13477: Help and context menu cursors need dropshadows.
3649
3650         * Resources/cellCursor.png:
3651         * Resources/contextMenuCursor.png:
3652         * Resources/helpCursor.png:
3653         * platform/mac/CursorMac.mm:
3654         (WebCore::contextMenuCursor):
3655         (WebCore::copyCursor):
3656         (WebCore::progressCursor):
3657         (WebCore::noDropCursor):
3658
3659 2007-04-27  Holger Freyther <freyther@kde.org>
3660
3661         Reviewed by Maciej.
3662
3663         Remove unmaintained CMake build system.
3664
3665         * CMakeLists.txt: Removed.
3666
3667 2007-04-26  Matt Perry  <mpComplete@gmail.com>
3668
3669         Reviewed by Maciej.
3670
3671         Added a version check to hackAroundLibXMLEntityBug, since that bug has
3672         been fixed in recent versions of libxml2.
3673
3674         * dom/XMLTokenizer.cpp:
3675         (WebCore::hackAroundLibXMLEntityBug):
3676
3677 2007-04-26  Christopher Brichford  <chrisb@adobe.com>
3678
3679         Reviewed by Timothy Hatcher.
3680
3681         - Fix for Bug 13204: Submit initial version of mac project files for apollo
3682           port of WebCore
3683           http://bugs.webkit.org/show_bug.cgi?id=13204
3684
3685         * WebCore.apolloproj/mac/WebCore.Debug.xcconfig: Added.
3686         * WebCore.apolloproj/mac/WebCore.Release.xcconfig: Added.
3687         * WebCore.apolloproj/mac/WebCore.xcconfig: Added.
3688         * WebCore.apolloproj/mac/WebCore.xcodeproj/project.pbxproj: Added.
3689
3690 2007-04-26  Alp Toker  <alp@atoker.com>
3691
3692         Reviewed by Maciej.
3693
3694         http://bugs.webkit.org/show_bug.cgi?id=13505
3695         Cast loses precision on x86_64
3696
3697         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3698         (WebCore::GraphicsContext::beginTransparencyLayer):
3699         (WebCore::GraphicsContext::endTransparencyLayer):
3700         Use a stack of opacity values instead of Cairo user data.
3701
3702 2007-04-26  Mitz Pettel  <mitz@webkit.org>
3703
3704         Reviewed by Darin.
3705
3706         - fix http://bugs.webkit.org/show_bug.cgi?id=13500
3707           REGRESSION: Listbox scrollbar does not reflect actual scrolled position when selected option is added after layout
3708
3709         Test: fast/forms/listbox-scrollbar-incremental-load.html
3710
3711         The scroller position was not updated correctly during insertion, since
3712         scrollbar proportions are updated only during layout
3713
3714         * rendering/RenderListBox.cpp:
3715         (WebCore::RenderListBox::selectionChanged): Delay scrolling to reveal the
3716         selection until after layout if m_optionsChanged is set. Layout is
3717         guaranteed to happen soon when the flag is set.
3718
3719 2007-04-26  David Hyatt  <hyatt@apple.com>
3720
3721         Fix for 13511, crash on a counters page.  Make sure that RenderTexts
3722         never get a null StringImpl.  I would have added an assert that the length
3723         had to be nonzero also, but unfortunately editing creates empty RenderTexts
3724         because of its EditingText DOM subclass that always forces renderers to be
3725         made.  I suppose there is a good reason for this...
3726
3727         Reviewed by aroben
3728
3729         * dom/CharacterData.cpp:
3730         (WebCore::CharacterData::setData):
3731         (WebCore::CharacterData::appendData):
3732         (WebCore::CharacterData::insertData):
3733         (WebCore::CharacterData::deleteData):
3734         (WebCore::CharacterData::replaceData):
3735         * rendering/RenderCounter.cpp:
3736         (WebCore::RenderCounter::RenderCounter):
3737         * rendering/RenderText.cpp:
3738         (WebCore::RenderText::RenderText):
3739         (WebCore::RenderText::trimmedPrefWidths):
3740         (WebCore::RenderText::setTextWithOffset):
3741         (WebCore::RenderText::setTextInternal):
3742         (WebCore::RenderText::setText):
3743
3744 2007-04-26  Alice Liu  <alice.liu@apple.com>
3745
3746         Reviewed by Oliver.
3747
3748         * editing/SelectionController.cpp:
3749         (WebCore::SelectionController::selectAll):
3750         adding null check
3751
3752 2007-04-26  Justin Garcia  <justin.garcia@apple.com>
3753
3754         Reviewed by oliver
3755
3756         <rdar://problem/5120591> 
3757         Crash when creating a link in Leopard wiki server
3758
3759         * editing/CreateLinkCommand.cpp:
3760         (WebCore::CreateLinkCommand::doApply): Use a RefPtr,
3761         setting the anchor's href can destroy it if there is
3762         an ancestor with a subtree modified event listener.
3763
3764 2007-04-26  Mitz Pettel  <mitz@webkit.org>
3765
3766         Reviewed by hyatt
3767
3768         - http://bugs.webkit.org/show_bug.cgi?id=13496
3769           Eliminate repaintObjectsBeforeLayout
3770
3771         No tests added since there is no change to functionality. Several
3772         tests in fast/repaint test repainting of objects that move during layout.
3773
3774         * page/FrameView.cpp:
3775         (WebCore::FrameView::layout):
3776         * rendering/RenderBlock.cpp:
3777         (WebCore::RenderBlock::layoutBlockChildren): Removed an early
3778         setNeedsLayout(false). Resetting the bit here prevents the full repaint
3779         that we rely on when we decide not to repaint children that move.
3780         * rendering/RenderBlock.h:
3781         * rendering/RenderObject.cpp:
3782         * rendering/RenderObject.h:
3783         * rendering/RenderTableSection.cpp:
3784         (WebCore::RenderTableSection::setCellWidths): Replaced the call to
3785         repaintObjectsBeforeLayout() if the cell didn't need layout with
3786         an unconditional repaint(). We don't bother with repainting only the
3787         delta between the old and new widths, since by marking the cell for
3788         layout results in a full repaint with the new width anyway.
3789
3790 2007-04-26  David Hyatt  <hyatt@apple.com>
3791
3792         Fix for 13509.  Don't recur to parent inline flows if they have been
3793         marked as needing layout themselves.
3794
3795         Reviewed by adele
3796
3797         * rendering/RenderFlow.cpp:
3798         (WebCore::RenderFlow::dirtyLinesFromChangedChild):
3799
3800 2007-04-26  Matt Perry  <mpComplete@gmail.com>
3801
3802         Reviewed and landed by Alexey.
3803
3804         http://bugs.webkit.org/show_bug.cgi?id=13495
3805         Crash when referencing an undefined entity in an XHTML document
3806
3807         Test: fast/parser/badentity.xhtml
3808
3809         * dom/XMLTokenizer.cpp:
3810         (WebCore::getEntityHandler): Check for a NULL returned from getXHTMLEntity
3811
3812 2007-04-26  Anders Carlsson  <andersca@apple.com>
3813
3814         Reviewed by Hyatt.
3815
3816         <rdar://problem/4851944>
3817         REGRESSION: With TOT, BMP images can no longer be opened in the browser window
3818         
3819         On Tiger, the MIME type for the com.microsoft.bmp UTI isn't in the registry, so add it manually.
3820         
3821         * platform/MimeTypeRegistry.cpp:
3822         (WebCore::initialiseSupportedImageMIMETypes):
3823
3824 2007-04-26  David Hyatt  <hyatt@apple.com>
3825
3826         Fix for bug 13503, invalidateContainingBlockPrefWidths is 15% of the
3827         nesting PLT.  Avoid O(n^2) behavior by including inlines in the minmax
3828         dirty chain.
3829
3830         Reviewed by kevin
3831
3832         * rendering/RenderBlock.cpp:
3833         (WebCore::RenderBlock::calcInlinePrefWidths):
3834         * rendering/RenderObject.cpp:
3835         (WebCore::RenderObject::setPrefWidthsDirty):
3836         (WebCore::RenderObject::invalidateContainerPrefWidths):
3837         * rendering/RenderObject.h:
3838
3839 2007-04-26  Anders Carlsson  <andersca@apple.com>
3840
3841         Reviewed by Darin.
3842
3843         <rdar://problem/5067925>
3844         Reproducible crash (infinite recursion) with a layout test that submits on unload (13078)
3845         
3846         Ask the document loader whether it's loading the main resource, since there are cases where the frame 
3847         loader's variable isn't updated correctly.
3848         
3849         In the distant future, the frame loader shouldn't have an instance variable but this is the least intrusive fix for now.
3850         
3851         I couldn't come up with a good test case for this since it requires running three tests in a row and scheduleLoad didn't work. Also,
3852         calling submit in the onunload prevents any new tests from loading!
3853         
3854         * loader/FrameLoader.cpp:
3855         (WebCore::FrameLoader::isLoading):
3856
3857 2007-04-26  Anders Carlsson  <andersca@apple.com>
3858
3859         ... and fix the build.
3860         
3861         * loader/FrameLoader.cpp:
3862         (WebCore::FrameLoader::continueAfterNavigationPolicy):
3863
3864 2007-04-26  Anders Carlsson  <andersca@apple.com>
3865
3866         Revert the previous change - activeDocumentLoader never returns the policy document loader.
3867         Instead, add a null check for the policy document loader.
3868         
3869         * loader/FrameLoader.cpp:
3870         (WebCore::FrameLoader::continueAfterNavigationPolicy):
3871
3872 2007-04-26  Anders Carlsson  <andersca@apple.com>
3873
3874         Use the active document loader instead of the policy document loader.
3875         
3876         * loader/FrameLoader.cpp:
3877         (WebCore::FrameLoader::continueAfterNavigationPolicy):
3878
3879 2007-04-26  Anders Carlsson  <andersca@apple.com>
3880
3881         Reviewed by Maciej.
3882
3883         <rdar://problem/5049099> documents no longer have a default base URL
3884
3885         Don't call canHandleRequest if we have valid substitute data and the protocol is "applewebdata".
3886         
3887         * loader/FrameLoader.cpp:
3888         (WebCore::FrameLoader::continueAfterNavigationPolicy):
3889
3890 2007-04-25  Stephanie Lewis <slewis@apple.com>
3891
3892         Reviewed by Darin.
3893
3894         Fix the build for platforms that overload the abs function.        
3895
3896         * dom/ChildNodeList.cpp:
3897         (WebCore::ChildNodeList::item):
3898
3899 2007-04-25  David Hyatt  <hyatt@apple.com>
3900
3901         Fix for bug 13373, make sure to invalidate the pref widths for objects
3902         with percentage padding.
3903
3904         Reviewed by beth
3905
3906         * rendering/RenderBlock.cpp:
3907         (WebCore::RenderBlock::layoutBlockChildren):
3908         (WebCore::RenderBlock::layoutPositionedObjects):
3909         * rendering/bidi.cpp:
3910         (WebCore::RenderBlock::layoutInlineChildren):
3911
3912 2007-04-25  David Harrison  <harrison@apple.com>
3913
3914         Comment change. Correct the header name in the endif comment.
3915         
3916         * editing/FormatBlockCommand.h:
3917         Change InsertListCommand_h to FormatBlockCommand_h.
3918
3919 2007-04-25  Darin Adler  <darin@apple.com>
3920
3921         Reviewed by Hyatt.
3922
3923         * platform/AtomicString.cpp: (WebCore::AtomicString::add):
3924         Removed unnecessary use of strlen to check if a string is empty.
3925
3926 2007-04-25  Mitz Pettel  <mitz@webkit.org>
3927
3928         Build fix.
3929
3930         * rendering/RenderListMarker.h: Undeleted the m_text member.
3931
3932 2007-04-25  David Hyatt  <hyatt@apple.com>
3933
3934         Rearchitect calcPrefWidths.  The calculation is now done lazily only when minPrefWidth
3935         or maxPrefWidth are asked for.  The result of the calculation is cached.
3936
3937         The new invalidation scheme for pref width invalidation follows the
3938         containing block hierarchy and knows to halt at positioned objects, since
3939         they cannot influence the size of their containers.
3940
3941         Reviewed by darin
3942
3943         * css/cssstyleselector.cpp:
3944         (WebCore::CSSStyleSelector::init):
3945         (WebCore::CSSStyleSelector::initForStyleResolve):
3946         * page/FrameView.cpp:
3947         (WebCore::FrameView::layout):
3948         * rendering/RenderApplet.cpp:
3949         (WebCore::RenderApplet::layout):
3950         * rendering/RenderBlock.cpp:
3951         (WebCore::RenderBlock::makeChildrenNonInline):
3952         (WebCore::RenderBlock::removeChild):
3953         (WebCore::RenderBlock::layout):
3954         (WebCore::RenderBlock::layoutBlock):
3955         (WebCore::RenderBlock::calcPrefWidths):
3956         (WebCore::InlineMinMaxIterator::endOfInline):
3957         (WebCore::shouldGrowTableCellForImage):
3958         (WebCore::RenderBlock::calcInlinePrefWidths):
3959         (WebCore::RenderBlock::calcBlockPrefWidths):
3960         * rendering/RenderBlock.h:
3961         * rendering/RenderBox.cpp:
3962         (WebCore::RenderBox::setStyle):
3963         (WebCore::RenderBox::minPrefWidth):
3964         (WebCore::RenderBox::maxPrefWidth):
3965         (WebCore::RenderBox::calcWidth):
3966         (WebCore::RenderBox::calcWidthUsing):
3967         (WebCore::RenderBox::calcAbsoluteHorizontal):
3968         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
3969         * rendering/RenderBox.h:
3970         * rendering/RenderContainer.cpp:
3971         (WebCore::RenderContainer::removeChildNode):
3972         (WebCore::RenderContainer::appendChildNode):
3973         (WebCore::RenderContainer::insertChildNode):
3974         (WebCore::RenderContainer::layout):
3975         * rendering/RenderContainer.h:
3976         (WebCore::RenderContainer::moveChildNode):
3977         * rendering/RenderCounter.cpp:
3978         (WebCore::RenderCounter::dirtyLineBoxes):
3979         (WebCore::RenderCounter::calcPrefWidths):
3980         * rendering/RenderCounter.h:
3981         * rendering/RenderFileUploadControl.cpp:
3982         (WebCore::RenderFileUploadControl::calcPrefWidths):
3983         * rendering/RenderFlexibleBox.cpp:
3984         (WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
3985         (WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
3986         (WebCore::RenderFlexibleBox::calcPrefWidths):
3987         (WebCore::RenderFlexibleBox::layoutBlock):
3988         * rendering/RenderForeignObject.cpp:
3989         (WebCore::RenderForeignObject::layout):
3990         * rendering/RenderFrameSet.cpp:
3991         (WebCore::RenderFrameSet::layout):
3992         * rendering/RenderHTMLCanvas.cpp:
3993         (WebCore::RenderHTMLCanvas::layout):
3994         * rendering/RenderImage.cpp:
3995         (WebCore::RenderImage::layout):
3996         * rendering/RenderInline.cpp:
3997         * rendering/RenderInline.h:
3998         * rendering/RenderListBox.cpp:
3999         (WebCore::RenderListBox::updateFromElement):
4000         (WebCore::RenderListBox::calcPrefWidths):
4001         * rendering/RenderListItem.cpp:
4002         (WebCore::firstNonMarkerChild):
4003         (WebCore::RenderListItem::updateMarkerLocation):
4004         (WebCore::RenderListItem::calcPrefWidths):
4005         (WebCore::RenderListItem::layout):
4006         * rendering/RenderListMarker.cpp:
4007         (WebCore::RenderListMarker::layout):
4008         (WebCore::RenderListMarker::calcPrefWidths):
4009         (WebCore::RenderListMarker::updateMargins):
4010         * rendering/RenderListMarker.h:
4011         * rendering/RenderObject.cpp:
4012         (WebCore::RenderObject::RenderObject):
4013         (WebCore::RenderObject::removeChildNode):
4014         (WebCore::RenderObject::moveChildNode):
4015         (WebCore::RenderObject::appendChildNode):
4016         (WebCore::RenderObject::insertChildNode):
4017         (WebCore::RenderObject::setPrefWidthsDirty):
4018         (WebCore::RenderObject::invalidateContainingBlockPrefWidths):
4019         (WebCore::RenderObject::information):
4020         (WebCore::RenderObject::setStyle):
4021         * rendering/RenderObject.h:
4022         (WebCore::RenderObject::layer):
4023         (WebCore::RenderObject::hasLayer):
4024         (WebCore::RenderObject::prefWidthsDirty):
4025         (WebCore::RenderObject::setNeedsLayoutAndPrefWidthsRecalc):
4026         (WebCore::RenderObject::setHasLayer):
4027         * rendering/RenderPartObject.cpp:
4028         (WebCore::RenderPartObject::layout):
4029         * rendering/RenderSVGContainer.cpp:
4030         (WebCore::RenderSVGContainer::layout):
4031         * rendering/RenderSVGContainer.h:
4032         * rendering/RenderSVGHiddenContainer.cpp:
4033         * rendering/RenderSVGHiddenContainer.h:
4034         * rendering/RenderSVGText.cpp:
4035         (WebCore::RenderSVGText::layout):
4036         * rendering/RenderTable.cpp:
4037         (WebCore::RenderTable::calcWidth):
4038         (WebCore::RenderTable::layout):
4039         (WebCore::RenderTable::removeChildNode):
4040         * rendering/RenderTable.h:
4041         * rendering/RenderTableRow.cpp:
4042         (WebCore::RenderTableRow::layout):
4043         * rendering/RenderTableSection.cpp:
4044         (WebCore::RenderTableSection::removeChildNode):
4045         * rendering/RenderTableSection.h:
4046         * rendering/RenderText.cpp:
4047         (WebCore::RenderText::trimmedPrefWidths):
4048         (WebCore::isSpaceAccordingToStyle):
4049         (WebCore::RenderText::minPrefWidth):
4050         (WebCore::RenderText::maxPrefWidth):
4051         (WebCore::RenderText::calcPrefWidths):
4052         (WebCore::RenderText::width):
4053         * rendering/RenderText.h:
4054         * rendering/RenderView.cpp:
4055         (WebCore::RenderView::RenderView):
4056         (WebCore::RenderView::calcPrefWidths):
4057         (WebCore::RenderView::layout):
4058         * rendering/RenderWidget.cpp:
4059         (WebCore::RenderWidget::layout):
4060
4061 2007-04-25  Steve Falkenburg  <sfalken@apple.com>
4062
4063         Reviewed by Adam.
4064
4065         Fix spelling error in spelling method name.
4066         Expose new spelling callback methods to all platforms.
4067
4068         * bridge/EditorClient.h:
4069         * platform/gdk/EditorClientGdk.cpp:
4070         (WebCore::EditorClientGdk::updateSpellingUIWithGrammarString):
4071         * platform/gdk/EditorClientGdk.h:
4072         * platform/graphics/svg/SVGImageEmptyClients.h:
4073         (WebCore::SVGEmptyEditorClient::updateSpellingUIWithGrammarString):
4074         (WebCore::SVGEmptyEditorClient::getGuessesForWord):
4075
4076 2007-04-24  Geoffrey Garen  <ggaren@apple.com>
4077
4078         Reviewed by Darin Adler, Tim Hatcher.
4079
4080         Fixed a few NSAutoreleasePool issues I noticed while reviewing Brady's patch.
4081
4082         * platform/graphics/mac/GraphicsContextMac.mm:
4083         (WebCore::GraphicsContext::setCompositeOperation): Call -drain instead of 
4084         -release, since -release is a no-op in a GC world.
4085
4086 2007-04-25  Alexey Proskuryakov  <ap@webkit.org>
4087
4088         Reviewed by Darin.
4089
4090         http://bugs.webkit.org/show_bug.cgi?id=13445
4091         NodeList access by index is slow
4092
4093         * dom/ChildNodeList.cpp:
4094         (WebCore::ChildNodeList::item): Support iterating backwards from the last accessed node
4095         or from the last child.
4096         * dom/NodeList.h: Make cachedLength unsigned.
4097
4098 2007-04-26  Mark Rowe  <mrowe@apple.com>
4099
4100         Gdk build fix.  Add missing stub.
4101
4102         * platform/gdk/TemporaryLinkStubs.cpp:
4103         (Editor::advanceToNextMisspelling):
4104
4105 2007-04-25  Rob Buis  <buis@kde.org>
4106
4107         Reviewed by Darin.
4108
4109         http://bugs.webkit.org/show_bug.cgi?id=12163
4110         SVG text does not appear in a scrolling <div>
4111
4112         Make sure SVG text is painted when scrolling by taking into account the relative offset of the non-SVG parent in the paintInfo rect.
4113
4114         * rendering/RenderSVGContainer.cpp:
4115         (WebCore::RenderSVGContainer::paint):
4116
4117 2007-04-26  Mark Rowe  <mrowe@apple.com>
4118
4119         Fix non-Mac builds after r21081.
4120
4121         Stub out new Editor methods for Qt and Gdk, and new SVGEmptyEditorClient methods
4122         for all non-Mac builds.
4123
4124         * editing/qt/EditorQt.cpp:
4125         (WebCore::Editor::showSpellingGuessPanel):
4126         (WebCore::Editor::spellingPanelIsShowing):
4127         * page/qt/EventHandlerQt.cpp:
4128         (WebCore::EventHandler::passWheelEventToWidget):
4129         (WebCore::EventHandler::passMousePressEventToScrollbar):
4130         * platform/gdk/TemporaryLinkStubs.cpp:
4131         (Editor::showSpellingGuessPanel):
4132         (Editor::spellingPanelIsShowing):
4133         * platform/graphics/svg/SVGImageEmptyClients.h:
4134         (WebCore::SVGEmptyEditorClient::ignoreWordInSpellDocument):
4135         (WebCore::SVGEmptyEditorClient::learnWord):
4136         (WebCore::SVGEmptyEditorClient::checkSpellingOfString):
4137   &