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