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