de299f977e92986cced2cb59ab4733563d12104d
[WebKit-https.git] / WebCore / ChangeLog
1 2007-04-08  Oliver Hunt  <oliver@apple.com>
2
3         rs=Adam.
4
5         Add ASSERT(selectedRange) to previous change
6
7         * platform/mac/PasteboardMac.mm:
8         (WebCore::Pasteboard::writeSelection):
9
10 2007-04-08  Oliver Hunt  <oliver@apple.com>
11
12         rs=Adam.
13
14         Fix minor error when writing selection to pasteboard.
15         This shouldn't have an effect as selectedRange should be the
16         selected range from source frame, however this is safer.
17
18         * platform/mac/PasteboardMac.mm:
19         (WebCore::Pasteboard::writeSelection):
20
21 2007-04-08  David Hyatt  <hyatt@apple.com>
22
23         Fix mouseover/out failing layout tests.
24
25         Reviewed by aroben
26
27         * page/EventHandler.cpp:
28         (WebCore::EventHandler::handleMouseMoveEvent):
29         (WebCore::EventHandler::updateMouseEventTargetNode):
30         (WebCore::EventHandler::dispatchMouseEvent):
31         * page/EventHandler.h:
32
33 2007-04-08  Oliver Hunt  <oliver@apple.com>
34
35         Reviewed by Adam.
36
37         Fix for <rdar://problem/5113621> REGRESSION: Dragging PDF as image does not give any feedback
38
39         If we fail when attempting to create a drag image for a dragged
40         image, we fall back to the appropriate icon.
41
42         * page/DragController.cpp:
43         (WebCore::DragController::doImageDrag):
44
45 2007-04-08  Adam Roben  <aroben@apple.com>
46
47         Reviewed by Oliver.
48
49         Bestowed the gift of -webkit-dashboard-region upon all platforms, since
50         there's nothing Mac-specific about it other than the name. This also
51         allowed me to get rid of FrameViewMac.mm.
52
53         Removed a lot of #if PLATFORM(MAC):
54
55         * css/CSSComputedStyleDeclaration.cpp:
56         (WebCore::):
57         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
58         * css/CSSPrimitiveValue.cpp:
59         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
60         (WebCore::CSSPrimitiveValue::cleanup):
61         (WebCore::CSSPrimitiveValue::cssText):
62         * css/CSSPrimitiveValue.h:
63         (WebCore::CSSPrimitiveValue::getDashboardRegionValue):
64         (WebCore::CSSPrimitiveValue::):
65         * css/cssparser.cpp:
66         (WebCore::CSSParser::parseValue):
67         (WebCore::CSSParser::parseDashboardRegions):
68         * css/cssparser.h:
69         * css/cssstyleselector.cpp:
70         (WebCore::CSSStyleSelector::applyProperty):
71         * dom/Document.cpp:
72         (WebCore::Document::Document):
73         * dom/Document.h:
74         * page/Frame.cpp:
75         (WebCore::Frame::paint):
76         * page/Frame.h:
77         * page/FrameView.cpp:
78         (WebCore::FrameView::layout):
79         (WebCore::FrameView::updateDashboardRegions): Moved from FrameViewMac.mm.
80         * page/FrameView.h:
81         * page/qt/FrameQt.cpp:
82         (WebCore::Frame::dashboardRegionsChanged): Stubbed out.
83         * platform/gdk/FrameGdk.cpp:
84         (WebCore::Frame::dashboardRegionsChanged): Ditto.
85         * rendering/RenderLayer.cpp:
86         (WebCore::RenderLayer::scrollToOffset):
87         (WebCore::RenderLayer::setHasHorizontalScrollbar):
88         (WebCore::RenderLayer::setHasVerticalScrollbar):
89         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
90         * rendering/RenderObject.cpp:
91         (WebCore::RenderObject::setStyle):
92
93         * WebCore.xcodeproj/project.pbxproj: Removed FrameViewMac.mm.
94         * bridge/mac/FrameViewMac.mm: Removed.
95
96 2007-04-08  Mark Rowe  <mrowe@apple.com>
97
98         Qt build fix.
99
100         * platform/qt/TemporaryLinkStubs.cpp:
101
102 2007-04-06  Geoffrey Garen  <ggaren@apple.com>
103
104         Reviewed by Beth Dakin.
105         
106         Fixed one more case of <rdar://problem/5112273> REGRESSION(TOT): 
107         Reproducible crash loading an old version of amazon.com as a web archive
108
109         * bindings/js/JSXMLHttpRequest.cpp:
110         (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction):
111
112 2007-04-06  Oliver Hunt  <oliver@apple.com>
113
114         Reviewed by Adam.
115
116         Fix MouseEvent so it's possible to distinguish between
117         a MouseMouseEvent with NoButton down, and a move with
118         LeftButton down.  It would be nice if the DOM allowed 
119         for NoButton to exist, but it doesn't so this is necessary.
120
121         * dom/EventTargetNode.cpp:
122         (WebCore::EventTargetNode::dispatchMouseEvent):
123         * dom/MouseEvent.cpp:
124         (WebCore::MouseEvent::MouseEvent):
125         (WebCore::MouseEvent::initMouseEvent):
126         * dom/MouseEvent.h:
127         (WebCore::MouseEvent::noButton):
128
129 2007-04-06  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
130
131         Not reviewed - gdk build fix.
132
133         * platform/gdk/MouseEventGdk.cpp:
134
135 2007-04-06  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
136
137         Reviewed by darin.
138
139         Coverity fix. Coverity says:
140         "Event var_deref_op: Variable "info_ptr" tracked as NULL was dereferenced."
141
142         * platform/image-decoders/png/pngrutil.c:
143         (png_handle_gAMA):
144
145 2007-04-06  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
146
147         Reviewed by darin.
148
149         Coverity fix. Coverity says:
150         "Event var_deref_model: Variable "(this)->clientptr" tracked as NULL was passed to a function that dereferences it."
151
152         * platform/image-decoders/gif/GIFImageReader.cpp:
153         (GIFImageReader::read):
154
155 2007-04-06  David Hyatt  <hyatt@apple.com>
156
157         Fix more of the layout test failures caused by fixing the slider layout test failure (sigh).  clear()
158         needs to null out the capturingMouseEventsNode in the case where a mousedown or move while captured
159         causes a navigation to another page.
160
161         * page/EventHandler.cpp:
162         (WebCore::EventHandler::clear):
163         (WebCore::EventHandler::handleMouseReleaseEvent):
164
165 2007-04-06  David Hyatt  <hyatt@apple.com>
166
167         Fix failing slider layout test.  Don't clear the subframe capture unless we really were capturing on a
168         subframe.
169
170         Reviewed by adele, darin
171
172         * page/EventHandler.cpp:
173         (WebCore::EventHandler::handleMouseReleaseEvent):
174
175 2007-04-06  Beth Dakin  <bdakin@apple.com>
176
177         Reviewed by Geoff and Darin.
178
179         Fix for <rdar://problem/4875433> WebView underlines are too thick 
180         when scaled small
181
182         When we have a small scale factor, we should follow the line-
183         drawing code as if we were printing. Meaning, specifically, that we 
184         should not round to device pixels and we should antialias.
185
186         * platform/graphics/cg/GraphicsContextCG.cpp:
187         (WebCore::GraphicsContext::drawLineForText):
188
189 2007-04-06  Geoffrey Garen  <ggaren@apple.com>
190
191         Reviewed by Beth Dakin.
192         
193         Fixed <rdar://problem/5112273> REGRESSION(TOT): Reproducible crash loading 
194         an old version of amazon.com as a web archive
195         
196         The problem was JavaScript executing inside a frame with a NULL document.
197         It's probably a bug that the document was NULL, but we don't want a minor
198         bug to be a crasher, and we don't want the DOM to depend on the implementation
199         details of the JS bindings, so I added NULL checks.
200
201         * bindings/js/kjs_window.cpp: Call FrameLoader::completeURL instead of
202         Document::completeURL, since FrameLoader::completeURL is safe against a
203         NULL document.
204         (KJS::Window::put):
205         (KJS::WindowFunc::callAsFunction):
206         (KJS::Location::put):
207         (KJS::LocationFunc::callAsFunction):
208
209 2007-04-06  David Hyatt  <hyatt@apple.com>
210
211         Fix for bug 13274.  Rework mouse events so that subframe capturing works again.  Make sure
212         everything just comes down through the top FrameView even when capturing is in effect.  Update
213         scrollbar handling logic so that scrollbars receive events correctly while capturing is in
214         effect.  Eliminate the notion of widget capture.  Fix mouse moves so that they only fire
215         on the innermost hit frame.
216
217         Reviewed by olliej
218
219         * page/EventHandler.cpp:
220         (WebCore::EventHandler::handleMouseDraggedEvent):
221         (WebCore::subframeForTargetNode):
222         (WebCore::EventHandler::handleMousePressEvent):
223         (WebCore::EventHandler::handleMouseMoveEvent):
224         (WebCore::EventHandler::handleMouseReleaseEvent):
225         * page/EventHandler.h:
226         * platform/PopupMenu.h:
227         (WebCore::PopupMenu::scrollbarCapturingMouse):
228         (WebCore::PopupMenu::setScrollbarCapturingMouse):
229         * platform/ScrollBar.h:
230         (WebCore::Scrollbar::handleMouseReleaseEvent):
231         * platform/Widget.h:
232         (WebCore::Widget::geometryChanged):
233
234 2007-04-06  Justin Garcia  <justin.garcia@apple.com>
235
236         Reviewed by john
237
238         <rdar://problem/5115601> 
239         REGRESSION: Crash deleting a selection that starts in an editable table cell
240         
241         The selection starts at the start of an editable 
242         root that's embedded in a non-editable ToDo (table).  
243         Removing the selection removes all editable 
244         VisiblePositions from the root.  Then, the creation 
245         of mergeDestination fails, and using it causes a crash.
246
247         * editing/DeleteSelectionCommand.cpp:
248         (WebCore::DeleteSelectionCommand::mergeParagraphs):
249         Nil-check mergeDestination to avoid crashing and
250         also insert a break in that case at m_upstreamStart, 
251         so that we can create a valid mergeDestination and
252         perform the merge.
253         
254         
255 2007-04-06  Mitz Pettel  <mitz@webkit.org>
256
257         Reviewed by Oliver.
258
259         Eliminate PlatformMouseEvent::currentEvent.
260
261         No test possible (no change to functionality).
262
263         * page/EventHandler.cpp:
264         (WebCore::EventHandler::handleDrag):
265         * platform/PlatformMouseEvent.h:
266         * platform/gdk/TemporaryLinkStubs.cpp:
267         * platform/mac/PlatformMouseEventMac.mm:
268         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
269         * platform/qt/PlatformMouseEventQt.cpp:
270         * platform/win/TemporaryLinkStubs.cpp:
271
272 2007-04-05  Oliver Hunt  <oliver@apple.com>
273
274         Reviewed by Maciej.
275
276         Fix for rdar://problem/4849948 -- JSCanvasRenderingContext2D::drawImage
277         crashes when given invalid arguments.
278
279         JSCanvasRenderingContext2D frequently casts from JSValue* to JSObject*
280         and then checks isObject *after* the cast.  JSObject::isObject is unsafe 
281         if applied to a JSImmediate value (null, undefined, etc).  This patch 
282         corrects the logic in a number of places by performing the isObject check
283         before casting to JSObject.
284
285         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
286         (WebCore::JSCanvasRenderingContext2D::drawImage):
287         (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
288         (WebCore::JSCanvasRenderingContext2D::createPattern):
289
290 2007-04-05  Adele Peterson  <adele@apple.com>
291
292         Reviewed by Oliver.
293
294         Fix for <rdar://problem/4965597> REGRESSION: mouseup doesn't fire for slider (causes it to always default to max)
295
296         Test: fast/forms/slider-mouse-events.html
297
298         * page/EventHandler.cpp: (WebCore::EventHandler::dispatchMouseEvent):
299         Since the actual target node of the event can't be a shadow node, set the target node to the capturing node before adjusting it.
300
301 2007-04-05  Kevin McCullough  <kmccullough@apple.com>
302
303         Reviewed by Darin.
304
305         - Added reportLocalLoadFailed to FrameLoader to send an error to the console when
306         calls to canLoad fail. 
307
308         * loader/Cache.cpp:
309         (WebCore::Cache::requestResource):
310         * loader/FrameLoader.cpp:
311         (WebCore::FrameLoader::loadSubframe):
312         (WebCore::FrameLoader::loadPlugin):
313         (WebCore::FrameLoader::load):
314         (WebCore::FrameLoader::reportLocalLoadFailed):
315         * loader/FrameLoader.h:
316         * loader/SubresourceLoader.cpp:
317         (WebCore::SubresourceLoader::create):
318
319 2007-04-05  Adele Peterson  <adele@apple.com>
320
321         Reviewed by Maciej.
322
323         Add text-align: -webkit-auto for form controls.  Buttons already override this property to center their text.
324
325         * css/html4.css:
326
327 2007-04-05  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
328
329         Reviewed by rwlbuis.
330
331         Coverity fix. Coverity says:
332         "Event var_deref_model: Variable "page" tracked as NULL was passed to a function that dereferences it."
333
334         * platform/Font.cpp:
335         (WebCore::Font::glyphDataForCharacter):
336
337 2007-04-05  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
338
339         Reviewed by darin.
340
341         Coverity fix. Coverity says:
342         "Event var_deref_model: Variable "unicode" tracked as NULL was passed to a 
343         function that dereferences it."
344
345         * platform/DeprecatedString.cpp:
346         (WebCore::DeprecatedString::DeprecatedString):
347
348 2007-04-05  Adele Peterson  <adele@apple.com>
349
350         Reviewed by Hyatt.
351
352         Fix for <rdar://problem/5113593> REGRESSION: Search fields in RSS pages don't show ibeam cursor
353
354         * css/html4.css: Set the cursor values explicitly for input, textarea (to auto), & select (to default).
355
356 2007-04-05  David Hyatt  <hyatt@apple.com>
357
358         Fix for <rdar://problem/5078866> tables should only reset text-align
359         in quirks mode.
360
361         Reviewed by beth
362
363         * css/html4.css:
364         * css/quirks.css:
365
366 2007-04-05  Adele Peterson  <adele@apple.com>
367
368         Fixing typo that's crashing.
369
370         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler):
371           Use evt instead of null variable k.
372
373 2007-04-05  Adele Peterson  <adele@apple.com>
374
375         Reviewed by Hyatt.
376
377         Fix for <rdar://problem/5021500> Cursor should stay as pointer when slider is being dragged
378
379         Don't set the selection ibeam cursor when there's a node that's capturing mouse events.
380
381         * page/EventHandler.cpp:
382         (WebCore::selectCursor):
383         (WebCore::EventHandler::handleMouseMoveEvent):
384
385 2007-04-05  Geoffrey Garen  <ggaren@apple.com>
386
387         Reviewed by Beth Dakin.
388
389         More clean-up while fixing <rdar://problem/5112273> REGRESSION(TOT): 
390         Reproducible crash loading an old version of amazon.com as a web archive
391         
392         Layout tests pass.
393         
394         Removed more superfluous document NULL checks. (Node::document() never 
395         returns NULL, and it asserts as much.)
396         
397         Merged some duplicate editing code into a static inline function.
398         
399         * page/mac/WebCoreFrameBridge.mm:
400         (updateRenderingForBindings): Removed superfluous static_cast.
401
402 2007-04-05  Adele Peterson  <adele@apple.com>
403
404         Reviewed by Darin.
405
406         A little cleanup from my last checkin.  Always check if an Event is really a MouseEvent or a KeyboardEvent
407         before casting it.
408
409         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler):
410         * html/HTMLSelectElement.cpp:
411         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
412         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
413         * html/HTMLTextFieldInnerElement.cpp:
414         (WebCore::HTMLSearchFieldResultsButtonElement::defaultEventHandler):
415         (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler):
416         * ksvg2/svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler):
417         * page/ContextMenuController.cpp: (WebCore::ContextMenuController::handleContextMenuEvent):
418         * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::userResize):
419         * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler):
420
421 2007-04-05  Geoffrey Garen  <ggaren@apple.com>
422
423         Reviewed by Beth Dakin.
424         
425         Some clean-up while fixing <rdar://problem/5112273> REGRESSION(TOT): 
426         Reproducible crash loading an old version of amazon.com as a web archive
427         
428         Removed superfluous document NULL checks. (Node::document() never returns
429         NULL, and it asserts as much.)
430         
431         Removed duplicate implementation of displayString.
432         
433         Layout tests pass.
434
435         * bindings/objc/DOMInternal.h:
436         * bindings/objc/DOMInternal.mm:
437         * html/HTMLGenericFormElement.cpp:
438         (WebCore::HTMLGenericFormElement::supportsFocus):
439         * html/HTMLPlugInElement.cpp:
440         (WebCore::HTMLPlugInElement::createNPObject):
441         * platform/ContextMenu.cpp:
442         (WebCore::ContextMenu::checkOrEnableIfNeeded):
443         * rendering/HitTestResult.cpp:
444         (WebCore::displayString):
445         * rendering/HitTestResult.h:
446         * rendering/RenderLayer.cpp:
447         (WebCore::RenderLayer::updateHoverActiveState):
448
449 === Safari-5522.6 ===
450
451 2007-04-05  Oliver Hunt  <oliver@apple.com>
452
453         Reviewed by Adam.
454
455         Fix rdar://problem/5030934 -- landscape PDFs embedded as an image are cut off
456         also fixes scaling of pdf images
457
458         PDFDocumentImage was not accounting for page rotation in a number of places
459
460         * platform/graphics/cg/PDFDocumentImage.cpp:
461         (WebCore::PDFDocumentImage::size):
462           we need to account for rotation of the pdf image effecting our bounds
463         (WebCore::PDFDocumentImage::draw):
464           When compensating for flipped coords we need to use the correct rect for the 
465           coordinate space.  We can't pass size() to CGContextDrawPDFDocument as it
466           returns the rotated bounds now -- this is also save the old 
467           FloatSize -> IntSize -> FloatSize conversions.
468           
469
470 2007-04-04  Alexey Proskuryakov  <ap@webkit.org>
471
472         Reviewed by Darin.
473
474         http://bugs.webkit.org/show_bug.cgi?id=13278
475         REGRESSION: cannot change SELECT option
476
477         Test: fast/forms/option-change-single-selected.html
478
479         * html/HTMLSelectElement.cpp:
480         (WebCore::HTMLSelectElement::setSelectedIndex): If multiple selection is not allowed, 
481         be sure to deselect the previous option.
482
483 2007-04-04  Adele Peterson  <adele@apple.com>
484
485         Reviewed by Oliver.
486
487         Fix for <rdar://5105009> Prepare for fix to send mousedown and mouseup (but not click) events when right-clicking
488
489         * page/EventHandler.cpp: Don't ever send click events for right-clicks.
490         (WebCore::EventHandler::handleMouseDoubleClickEvent):
491         (WebCore::EventHandler::handleMouseReleaseEvent):
492         
493         Check that the mousedown and mouseup are not with the right button before performing default behavior.
494         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler):
495         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
496         * html/HTMLSelectElement.cpp:
497         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
498         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
499         * html/HTMLTextFieldInnerElement.cpp:
500         (WebCore::HTMLSearchFieldResultsButtonElement::defaultEventHandler):
501         (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler):
502         * ksvg2/svg/SVGAElement.cpp:(WebCore::SVGAElement::defaultEventHandler):
503         * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::userResize):
504         * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler):
505
506 2007-04-03  Justin Garcia  <justin.garcia@apple.com>
507
508         Reviewed by darin
509         
510         <rdar://problem/5026848> Can cut/delete ToDo subunits
511         
512         We were removing non-editable content during a delete.
513
514         * editing/DeleteSelectionCommand.cpp: 
515         (WebCore::DeleteSelectionCommand::initializePositionData): 
516         Set m_startRoot and m_endRoot.
517         (WebCore::DeleteSelectionCommand::removeNode): If a node
518         is not inside both the start and end roots, remove it only
519         if it is in editable content.
520         * editing/DeleteSelectionCommand.h: Added m_startRoot and 
521         m_endRoot, the editable roots that contain the start and end
522         of the selection, respectively.  We consult these every
523         time we remove a node, and don't want to recompute them 
524         on every call to removeNode().
525
526 2007-04-03  David Hyatt  <hyatt@apple.com>
527
528         Fix for <rdar://problem/5108896>, make sure the assert for setEncodedSize
529         deals with the error case.
530
531         Reviewed by andersca
532
533         * loader/CachedResource.cpp:
534         (WebCore::CachedResource::setEncodedSize):
535
536 2007-04-03  Anders Carlsson  <andersca@apple.com>
537
538         Reviewed by Dave Hyatt.
539
540         * loader/ImageDocument.cpp:
541         Don't call error() in stopParsing.
542
543 2007-04-03  Justin Garcia  <justin.garcia@apple.com>
544
545         Reviewed by darin
546         
547         <rdar://problem/5107422> 
548         TOT REGRESSION: Delete key fails to delete text, and cursor disappears in Mail.app
549         <rdar://problem/5107413> 
550         TOT REGRESSION: Crash deleting text in email (infinite recursion in shouldInsertNode)
551
552         * editing/CompositeEditCommand.cpp:
553         (WebCore::CompositeEditCommand::moveParagraphs):
554         Back out the call to shouldInsert until we
555         add WebViewInsertActionMoved, because Mail returns
556         NO from shouldInsert for WebViewInsertActionPasted
557         to override our Paste operation.
558
559 2007-04-03  Anders Carlsson  <andersca@apple.com>
560
561         Reviewed by Mitz.
562
563         Make window.innerWidth/innerHeight include the size of any present scrollbar to match Firefox.
564         
565         Make document.body.clientWidth/clientHeight return the width/height of the visible content when in
566         quirks mode to match WinIE.
567         
568         * bindings/js/kjs_window.cpp:
569         (KJS::Window::getValueProperty):
570         Return the width and height of the scroll view, not the visible width and height.
571         
572         * dom/Element.cpp:
573         (WebCore::Element::clientWidth):        
574         (WebCore::Element::clientHeight):
575         Return the visible size if the element is the body element and we're in quirks mode.
576
577 2007-04-03  Adele Peterson  <adele@apple.com>
578
579         Reviewed by Darin.
580
581         Updated fix for <rdar://problem/5107095> REGRESSION: disabled text color calculations are slowing down launchtime measurements
582
583         * platform/graphics/Color.cpp: Moved optimization for lightening black and darkening white into the Color class.
584         (WebCore::Color::light):
585         (WebCore::Color::dark):
586         * rendering/RenderTextControl.cpp: (WebCore::disabledTextColor): Skip the difference calculation for black text, which will always be lightened.
587
588 2007-04-03  Anders Carlsson  <andersca@apple.com>
589
590         Reviewed by Tim.
591
592         <rdar://problem/4649516> 
593         Turn off slow script dialog or crank up time that makes it come up
594         
595         * bindings/js/kjs_binding.cpp:
596         (KJS::ScriptInterpreter::ScriptInterpreter):
597         Increase the timeout to 10 seconds to match Firefox.
598
599 2007-04-03  Mitz Pettel  <mitz@webkit.org>
600
601         Reviewed by Darin.
602
603         - fix http://bugs.webkit.org/show_bug.cgi?id=13251
604           editing/style/fontsize-1.html fails intermittently when run multiple times on Intel, generates incorrect DOM
605
606         Covered by existing editing tests.
607
608         * css/CSSPrimitiveValue.cpp:
609         (WebCore::CSSPrimitiveValue::getFloatValue): Added ASSERTs that the requested conversion
610         is from a scalar type to a scalar type. The intermittent failures in the test were
611         the result of trying to convert an identifier type to a scalar type.
612         * editing/ApplyStyleCommand.cpp:
613         (WebCore::StyleChange::checkForLegacyHTMLStyleChange): Added a check that the
614         font-size property value is an absolute length. If it is not (such as in the case
615         of relative units or keywords like "x-large"), then no corresponding 'size' attribute
616         will be generated for legacy HTML.
617
618 2007-04-03  Mitz Pettel  <mitz@webkit.org>
619
620         Reviewed by Darin.
621
622         - fix http://bugs.webkit.org/show_bug.cgi?id=13218
623           <rdar://problem/5095977>
624           Reproducible crash after call to window.close()
625
626         * manual-tests/stale-currentEvent.html: Added.
627         * page/EventHandler.cpp:
628         (WebCore::EventHandler::hoverTimerFired): Instead of faking a mouse event,
629         just hit-test the last mouse event coordinates and update for hover state
630         changes. This eliminates the use of currentEvent, which can be a non-mouse
631         event or even a stale event.
632
633 2007-04-02  Adele Peterson  <adele@apple.com>
634
635         Reviewed by Maciej.
636
637         Fix for <rdar://problem/5107095> REGRESSION: disabled text color calculations are slowing down launchtime measurements
638
639         Hardcode disabled text colors for the most common cases- black and white.
640
641         * rendering/RenderTextControl.cpp: (WebCore::disabledTextColor):
642
643 2007-04-02  David Hyatt  <hyatt@apple.com>
644
645         Fix for <rdar://problem/5105784>, assertion failure in cache.  Encoded sizes were being set to
646         garbage by accident because of a mismatch between derived class and base class constructors.  This
647         patch cleans all of this up and gets rid of expiration date as a concept separate from the response.
648
649         Reviewed by anders
650
651         * dom/Document.cpp:
652         (WebCore::Document::processHttpEquiv):
653         * html/HTMLImageLoader.cpp:
654         (WebCore::HTMLImageLoader::updateFromElement):
655         * loader/Cache.cpp:
656         (WebCore::createResource):
657         (WebCore::Cache::requestResource):
658         * loader/Cache.h:
659         * loader/CachedCSSStyleSheet.cpp:
660         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
661         * loader/CachedCSSStyleSheet.h:
662         * loader/CachedImage.cpp:
663         (WebCore::CachedImage::CachedImage):
664         * loader/CachedImage.h:
665         * loader/CachedResource.cpp:
666         (WebCore::CachedResource::CachedResource):
667         (WebCore::CachedResource::finish):
668         * loader/CachedResource.h:
669         * loader/CachedScript.cpp:
670         (WebCore::CachedScript::CachedScript):
671         * loader/CachedScript.h:
672         * loader/CachedXBLDocument.cpp:
673         (WebCore::CachedXBLDocument::CachedXBLDocument):
674         * loader/CachedXBLDocument.h:
675         * loader/CachedXSLStyleSheet.cpp:
676         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
677         * loader/CachedXSLStyleSheet.h:
678         * loader/DocLoader.cpp:
679         (WebCore::DocLoader::DocLoader):
680         (WebCore::DocLoader::requestResource):
681         * loader/DocLoader.h:
682
683 2007-04-03  Antti Koivisto  <antti@apple.com>
684
685         Reviewed by Hyatt.
686
687         Render tree memory savings, part 3
688         
689         These changes shrink all RenderBlocks by additional 28 bytes. Together with parts 1 and 2
690         RenderBlock goes from 172 bytes to 128 bytes, a saving of 26%.
691         
692         - Pack bitfields together in RenderFlow
693         - Move top/bottom min/max margin values to a struct that is only allocated in case these
694           variables have non default values. Usually this is <5% of all blocks. 
695         - Move rarely used column variables to hash
696
697         * rendering/RenderBlock.cpp:
698         (WebCore::ColumnInfo::ColumnInfo):
699         (WebCore::RenderBlock::RenderBlock):
700         (WebCore::RenderBlock::~RenderBlock):
701         (WebCore::RenderBlock::layoutBlock):
702         (WebCore::RenderBlock::collapseMargins):
703         (WebCore::RenderBlock::clearFloatsIfNeeded):
704         (WebCore::RenderBlock::setCollapsedBottomMargin):
705         (WebCore::RenderBlock::layoutBlockChildren):
706         (WebCore::RenderBlock::paintColumns):
707         (WebCore::RenderBlock::paintObject):
708         (WebCore::RenderBlock::fillSelectionGaps):
709         (WebCore::RenderBlock::lowestPosition):
710         (WebCore::RenderBlock::rightmostPosition):
711         (WebCore::RenderBlock::leftmostPosition):
712         (WebCore::RenderBlock::nodeAtPoint):
713         (WebCore::RenderBlock::hitTestColumns):
714         (WebCore::RenderBlock::positionForCoordinates):
715         (WebCore::RenderBlock::availableWidth):
716         (WebCore::RenderBlock::calcColumnWidth):
717         (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
718         (WebCore::RenderBlock::desiredColumnWidth):
719         (WebCore::RenderBlock::desiredColumnCount):
720         (WebCore::RenderBlock::columnRects):
721         (WebCore::RenderBlock::layoutColumns):
722         (WebCore::RenderBlock::adjustPointToColumnContents):
723         (WebCore::RenderBlock::adjustRectForColumns):
724         (WebCore::RenderBlock::setMaxTopMargins):
725         (WebCore::RenderBlock::setMaxBottomMargins):
726         * rendering/RenderBlock.h:
727         (WebCore::RenderBlock::maxTopMargin):
728         (WebCore::RenderBlock::maxBottomMargin):
729         (WebCore::RenderBlock::maxTopPosMargin):
730         (WebCore::RenderBlock::maxTopNegMargin):
731         (WebCore::RenderBlock::maxBottomPosMargin):
732         (WebCore::RenderBlock::maxBottomNegMargin):
733         (WebCore::RenderBlock::initMaxMarginValues):
734         (WebCore::RenderBlock::MaxMargin::MaxMargin):
735         (WebCore::RenderBlock::MaxMargin::topPosDefault):
736         (WebCore::RenderBlock::MaxMargin::topNegDefault):
737         (WebCore::RenderBlock::MaxMargin::bottomPosDefault):
738         (WebCore::RenderBlock::MaxMargin::bottomNegDefault):
739         * rendering/RenderFlexibleBox.cpp:
740         (WebCore::RenderFlexibleBox::layoutBlock):
741         * rendering/RenderFlow.h:
742         (WebCore::RenderFlow::RenderFlow):
743         (WebCore::RenderFlow::hasColumns):
744         * rendering/RenderInline.cpp:
745         (WebCore::RenderInline::RenderInline):
746         * rendering/RenderInline.h:
747
748 2007-04-03  Antti Koivisto  <antti@apple.com>
749
750         Reviewed by Hyatt.
751
752         Fix asserts, these may also be called for rel positioned elements
753
754         * rendering/RenderBox.cpp:
755         (WebCore::RenderBox::setStaticX):
756         (WebCore::RenderBox::setStaticY):
757
758 2007-04-02  David Hyatt  <hyatt@apple.com>
759
760         Throw in an assert to try to track down a problem where an image is being set to a smaller encoded
761         size.
762
763         * loader/CachedResource.cpp:
764         (WebCore::CachedResource::setEncodedSize):
765
766 2007-04-02  Ada Chan  <adachan@apple.com>
767
768         Reviewed by Adele.
769
770         <rdar://5105331> Missing null check in Editor::execCommand
771         Added null check.
772
773         * editing/Editor.cpp:
774         (WebCore::Editor::execCommand):
775
776 2007-04-02  Justin Garcia  <justin.garcia@apple.com>
777
778         Reviewed by darin
779
780         <rdar://problem/5058163> 
781         Hitting return inserts a new line between two To Dos, but caret is position after second ToDo
782
783         * editing/InsertParagraphSeparatorCommand.cpp:
784         (WebCore::InsertParagraphSeparatorCommand::doApply):
785         Removed refPos, it was unused.
786         Don't assume that upstream() moves to a different
787         node.  This assumption caused the line break to
788         be inserted *after* the caret and a bad position
789         to be set (added a testcase).
790         Use isStartOfParagraph instead of checking
791         for the existence of a br because the line might 
792         be broken by a newline character in text that 
793         preserves newlines.  Paragraphs that are created 
794         in other ways, like with blocks, are handled 
795         above (added a testcase).
796
797  2007-04-02  David Harrison  <harrison@apple.com>
798
799         Reviewed by Darin.
800
801         <rdar://problem/4906488> text attributes are not working for frame based web page
802
803         Attribute handling now treats each WebArea as its own world, rather than sometimes
804         referring back up to the top WebArea. e.g. getting/setting the selection now
805         operates on the WebArea containing the WebCoreAXObject that is being messaged (self).
806         The methods that sit above this and are able to go into arbitrary WebAreas
807         are accessibilityFocusedUIElement and doAXTextMarkerForPosition, allowing VoiceOver
808         to navigate between frames.
809         
810         * bridge/mac/WebCoreAXObject.mm:
811         (-[WebCoreAXObject topRenderer]):
812         (-[WebCoreAXObject frameView]):
813         (-[WebCoreAXObject topFrameView]):
814         Removed topDocument, renamed topView to topFrameView, added frameView.
815         
816         (-[WebCoreAXObject accessibilityAttributeValue:]):
817         AXSelectedTextMarkerRange, AXStartTextMarker, and AXEndTextMarker now use
818         self's WebArea, rather than the top WebArea.
819         
820         (-[WebCoreAXObject doAXTextMarkerRangeForLine:]):
821         Use self's WebArea, rather than the top WebArea.
822
823         (-[WebCoreAXObject doAXTextMarkerForPosition:]):
824         Use renamed methods for accessing top WebArea.
825          
826         (-[WebCoreAXObject doAXBoundsForTextMarkerRange:]):
827         Use renamed methods for accessing self's WebArea.
828
829         (AXAttributeStringSetColor):
830         (AXAttributeStringSetNumber):
831         (AXAttributeStringSetFont):
832         (AXAttributeStringSetStyle):
833         (AXAttributeStringSetElement):
834         (-[WebCoreAXObject rendererForView:]):
835         Clean up uses of nil and NULL.
836         
837         (-[WebCoreAXObject accessibilityFocusedUIElement]):
838         Find the focused node on the whole page. If there is no focused node,
839         return the WebArea for the focused document.
840         
841         (-[WebCoreAXObject doSetAXSelectedTextMarkerRange:]):
842         Use self's WebArea, rather than the top WebArea.
843
844 2007-04-02  Antti Koivisto  <antti@apple.com>
845
846         Fix build. This one was not supposed to be checked in.
847
848         * rendering/RenderFlexibleBox.cpp:
849         (WebCore::RenderFlexibleBox::layoutBlock):
850
851 2007-03-30  Antti Koivisto  <antti@apple.com>
852
853         Reviewed by Hyatt.
854
855         Render tree memory savings, part 2
856         
857         - Move staticX and staticY variables to RenderLayer since they are only
858           applicable to positioned objects
859         - Move very rarely used overrideSize variable to hash
860         
861         These changes shrink all box types by 12 bytes
862
863         * rendering/RenderBox.cpp:
864         (WebCore::RenderBox::RenderBox):
865         (WebCore::RenderBox::destroy):
866         (WebCore::RenderBox::overrideSize):
867         (WebCore::RenderBox::setOverrideSize):
868         (WebCore::RenderBox::overrideWidth):
869         (WebCore::RenderBox::overrideHeight):
870         (WebCore::RenderBox::position):
871         (WebCore::RenderBox::calcWidth):
872         (WebCore::RenderBox::calcHeight):
873         (WebCore::RenderBox::staticX):
874         (WebCore::RenderBox::staticY):
875         (WebCore::RenderBox::setStaticX):
876         (WebCore::RenderBox::setStaticY):
877         (WebCore::RenderBox::calcAbsoluteHorizontal):
878         (WebCore::RenderBox::calcAbsoluteVertical):
879         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
880         (WebCore::RenderBox::calcAbsoluteVerticalReplaced):
881         * rendering/RenderBox.h:
882         * rendering/RenderLayer.cpp:
883         (WebCore::RenderLayer::RenderLayer):
884         * rendering/RenderLayer.h:
885         (WebCore::RenderLayer::staticX):
886         (WebCore::RenderLayer::staticY):
887         (WebCore::RenderLayer::setStaticX):
888         (WebCore::RenderLayer::setStaticY):
889         * rendering/RenderObject.cpp:
890         (WebCore::RenderObject::RenderObject):
891         * rendering/RenderObject.h:
892         (WebCore::):
893         (WebCore::RenderObject::hasOverrideSize):
894         (WebCore::RenderObject::setHasOverrideSize):
895         * rendering/RenderWidget.cpp:
896         (WebCore::RenderWidget::destroy):
897
898 2007-03-31  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
899
900         Not reviewed - gdk build fix.
901
902         * platform/gdk/TemporaryLinkStubs.cpp:
903         (Font::selectionRectForComplexText):
904         (Font::drawComplexText):
905
906 2007-03-31  Alexey Proskuryakov  <ap@webkit.org>
907
908         Reviewed by Darin.
909
910         http://bugs.webkit.org/show_bug.cgi?id=12778
911         REGRESSION: Nightly won't load Curl plugin for full page use
912
913         * dom/DOMImplementation.cpp:
914         (WebCore::DOMImplementation::createDocument): Re-order cases to give more priority to plugins.
915         This also fixes Adobe SVG Viewer and any plugins that register XML MIME types.
916         Added a case for XHTML to avoid enumerating plugins.
917
918 2007-03-31  David Hyatt  <hyatt@apple.com>
919
920         Fix for bug 13234, layout of selected justified text is broken.  Rework TextRuns to avoid having
921         from/to members.  Let those be passed in only by the functions that need them (drawing and selection rect).
922
923         Reviewed by mitz
924
925         fast/text/justified-selection-at-edge.html
926
927         * platform/Font.cpp:
928         (WebCore::WidthIterator::WidthIterator):
929         (WebCore::WidthIterator::advance):
930         (WebCore::Font::canUseGlyphCache):
931         (WebCore::Font::drawSimpleText):
932         (WebCore::Font::drawText):
933         (WebCore::Font::floatWidth):
934         (WebCore::Font::floatWidthForSimpleText):
935         (WebCore::Font::selectionRectForText):
936         (WebCore::Font::selectionRectForSimpleText):
937         (WebCore::Font::offsetForPositionForSimpleText):
938         * platform/Font.h:
939         (WebCore::TextRun::m_len):
940         * platform/graphics/GraphicsContext.cpp:
941         (WebCore::GraphicsContext::drawText):
942         (WebCore::GraphicsContext::drawHighlightForText):
943         * platform/graphics/GraphicsContext.h:
944         * platform/mac/FontMac.mm:
945         (WebCore::addDirectionalOverride):
946         (WebCore::overrideLayoutOperation):
947         (WebCore::ATSULayoutParameters::initialize):
948         (WebCore::Font::selectionRectForComplexText):
949         (WebCore::Font::drawComplexText):
950         (WebCore::Font::floatWidthForComplexText):
951         (WebCore::Font::offsetForPositionForComplexText):
952         * platform/qt/FontQt.cpp:
953         (WebCore::Font::drawComplexText):
954         (WebCore::Font::floatWidthForComplexText):
955         * platform/qt/TemporaryLinkStubs.cpp:
956         (Font::selectionRectForComplexText):
957         * rendering/EllipsisBox.cpp:
958         (WebCore::EllipsisBox::paint):
959         * rendering/InlineTextBox.cpp:
960         (WebCore::InlineTextBox::selectionRect):
961         (WebCore::InlineTextBox::paint):
962         (WebCore::InlineTextBox::paintSelection):
963         (WebCore::InlineTextBox::paintMarkedTextBackground):
964         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
965         (WebCore::InlineTextBox::paintTextMatchMarker):
966         (WebCore::InlineTextBox::offsetForPosition):
967         (WebCore::InlineTextBox::positionForOffset):
968         * rendering/RenderListMarker.cpp:
969         (WebCore::RenderListMarker::paint):
970         (WebCore::RenderListMarker::calcMinMaxWidth):
971         (WebCore::RenderListMarker::getRelativeMarkerRect):
972         * rendering/RenderMenuList.cpp:
973         (WebCore::RenderMenuList::updateOptionsWidth):
974         * rendering/RenderText.cpp:
975         (WebCore::RenderText::widthFromCache):
976         (WebCore::RenderText::width):
977
978 2007-03-31  Mitz Pettel  <mitz@webkit.org>
979
980         Reviewed by Darin.
981
982         - fix http://bugs.webkit.org/show_bug.cgi?id=13243
983               <rdar://problem/5103226>
984           REGRESSION (r20506): Repro crash/assert when using scroll wheel on a list box taller than its contents
985
986         * platform/ScrollBar.cpp:
987         (WebCore::Scrollbar::setValue): Cleaned up a little.
988         (WebCore::Scrollbar::scroll): Changed to apply the minimum and maximum constraints
989         in the right order, and cleaned up a little.
990
991 2007-03-31  Mitz Pettel  <mitz@webkit.org>
992
993         Reviewed by Darin.
994
995         - fix http://bugs.webkit.org/show_bug.cgi?id=13242
996           REGRESSION: Repro crash when specifying the content property for an image
997
998         Test: fast/images/text-content-crash.html
999
1000         * html/HTMLImageElement.cpp:
1001         (WebCore::HTMLImageElement::parseMappedAttribute): Added a check that the
1002         renderer is an image.
1003         (WebCore::HTMLImageElement::attach): Ditto.
1004
1005 2007-03-31  Mark Rowe  <mrowe@apple.com>
1006
1007         Reviewed by Darin.
1008
1009         A more correct fix for http://bugs.webkit.org/show_bug.cgi?id=13129
1010         Bug 13129: Democracy Player dies in NSException from WebScriptObject on startup
1011
1012         The previous attempt at a fix in r20343 attempted to conditionally expose the 'count'
1013         method.  It did not work which resulted in 'count' always being hidden.  This change
1014         disables -[WebScriptObject count] completely until it can be determined whether it is
1015         needed and how to support it without breaking third-party applications.
1016
1017         * bindings/objc/WebScriptObject.mm:
1018         (-[WebScriptObject count]):
1019         * bindings/objc/WebScriptObjectPrivate.h:
1020
1021 2007-03-31  Nicholas Shanks  <webkit@nickshanks.com>
1022
1023         Reviewed by Adele.
1024
1025         http://bugs.webkit.org/show_bug.cgi?id=13184
1026         HTMLImageElement longdesc should be complete resolved URL
1027
1028         Test: fast/dom/HTMLImageElement/image-longdesc-absolute-url.html
1029
1030         * html/HTMLImageElement.cpp:
1031         (WebCore::HTMLImageElement::longDesc): Return absolute URL.
1032         Behaviour now matches Firefox and Opera.
1033
1034 2007-03-31  Mitz Pettel  <mitz@webkit.org>
1035
1036         Reviewed by Hyatt.
1037
1038         - fix http://bugs.webkit.org/show_bug.cgi?id=13209
1039           REGRESSION (r18756-18765): Incomplete list marker repaint when resizing list item
1040
1041         Test: fast/repaint/list-marker-2.html
1042
1043         A list marker can increase the horizontal overflow after layoutInlineChildren(),
1044         so made that function return only the vertical bounds of the repaint rect. As the
1045         horizontal bounds, made layoutBlock() just use the overflow bounds after layout.
1046
1047         * rendering/RenderBlock.cpp:
1048         (WebCore::RenderBlock::layoutBlock):
1049         * rendering/RenderBlock.h:
1050         * rendering/bidi.cpp:
1051         (WebCore::RenderBlock::layoutInlineChildren):
1052
1053 2007-03-31  Mitz Pettel  <mitz@webkit.org>
1054
1055         Reviewed by Hyatt.
1056
1057         - http://bugs.webkit.org/show_bug.cgi?id=13178
1058           Helvetica zero-width space has non-zero width
1059
1060         Test: fast/text/wide-zero-width-space.html
1061
1062         * platform/FontData.cpp:
1063         (WebCore::FontData::FontData): Force the ZERO WIDTH SPACE glyph to have width
1064         0, unless the SPACE character maps to the same glyph.
1065
1066 2007-03-31  Mitz Pettel  <mitz@webkit.org>
1067
1068         Reviewed by Darin.
1069
1070         - fix http://bugs.webkit.org/show_bug.cgi?id=8016
1071           REPRO: Safari hangs loading 18 MB page (deeply nested DOM tree)
1072
1073         Test: fast/tokenizer/lessthan-terminates-tags-and-attrs.html
1074
1075         * html/HTMLTokenizer.cpp:
1076         (WebCore::HTMLTokenizer::parseTag): Made "<" terminate tag and attribute
1077         names. This matches Firefox.
1078
1079 2007-03-31  Alexey Proskuryakov  <ap@webkit.org>
1080
1081         Debug build fix.
1082
1083         * xml/XPathValue.cpp:
1084         (WebCore::XPath::): Define Value::adopt.
1085
1086 2007-03-30  Alexey Proskuryakov  <ap@webkit.org>
1087
1088         Reviewed by Darin.
1089
1090         http://bugs.webkit.org/show_bug.cgi?id=13021
1091         XPath can be very slow
1092
1093         This patch finally makes us faster than Firefox 2.0 on this test case.
1094
1095         * xml/XPathFunctions.cpp:
1096         (WebCore::XPath::FunConcat::evaluate): Use a Vector buffer for faster appending.
1097         (WebCore::XPath::FunId::evaluate): Move the result NodeSet into Value instead of copying it.
1098         (WebCore::XPath::FunLocalName::evaluate): Cosmetic changes.
1099         (WebCore::XPath::FunNamespaceURI::evaluate): Ditto.
1100         (WebCore::XPath::FunName::evaluate): Ditto.
1101         (WebCore::XPath::FunNormalizeSpace::evaluate): Ditto.
1102
1103         * xml/XPathValue.cpp:
1104         (WebCore::XPath::Value::toNodeSet):
1105         (WebCore::XPath::Value::modifiableNodeSet):
1106         (WebCore::XPath::Value::toBoolean):
1107         (WebCore::XPath::Value::toNumber):
1108         (WebCore::XPath::Value::toString):
1109         * xml/XPathValue.h:
1110         (WebCore::XPath::ValueData::ValueData):
1111         (WebCore::XPath::Value::Value):
1112         Made Value copying faster by putting large data members into a separate refcounted ValueData class.
1113         Added provisions for moving a NodeSet in and out of Value without copying.
1114         Made construction safer by moving bool version to a template constructor.
1115         Removed an (almost) unused default constructor.
1116
1117         * xml/XPathPredicate.h: Store a Value for literal string and number expressions to avoid 
1118         constructing one each time.
1119
1120         * xml/XPathPath.cpp:
1121         (WebCore::XPath::Filter::evaluate):
1122         (WebCore::XPath::LocationPath::evaluate):
1123         (WebCore::XPath::Path::evaluate):
1124         * xml/XPathPath.h:
1125         * xml/XPathPredicate.cpp:
1126         (WebCore::XPath::NumericOp::evaluate):
1127         (WebCore::XPath::Union::evaluate):
1128         * xml/XPathResult.cpp:
1129         (WebCore::XPathResult::snapshotItem):
1130         * xml/XPathStep.cpp:
1131         (WebCore::XPath::Step::evaluate):
1132         (WebCore::XPath::Step::nodesInAxis):
1133         * xml/XPathStep.h:
1134         Got rid of unnecessary NodeSet copying in many cases.
1135
1136 2007-03-30  Justin Garcia  <justin.garcia@apple.com>
1137
1138         Reviewed by john
1139
1140         <rdar://problem/5076323> Only one To Do can be created by a selection in a message
1141
1142         When Mail's ToDoify operation called moveToEndOfDocument: 
1143         with a selection that started just before a ToDo, we'd 
1144         move them to the end of the document, not to the end
1145         of the editable root, because we incorrectly checked
1146         for the editability of positions before ToDos.  Then Mail
1147         would refuse to create a ToDo because the selection was 
1148         outside of the region where they allowed editing.
1149
1150         * editing/SelectionController.cpp:
1151         (WebCore::SelectionController::modifyExtendingRightForward):
1152         Check the position for editability, not the position's node,
1153         since there are editable positions of the form [node, offset]
1154         where node is contenteditable=false.
1155         Re-use pos.  Nothing that happens after it's created can invalidate
1156         it or the position and affinity used to create it.
1157         (WebCore::SelectionController::modifyMovingRightForward): Ditto.
1158         (WebCore::SelectionController::modifyExtendingLeftBackward): Ditto.
1159         (WebCore::SelectionController::modifyMovingLeftBackward): Ditto.
1160         * rendering/RenderBlock.cpp:
1161         (WebCore::RenderBlock::paintCaret): Ditto.
1162
1163 2007-03-30  Adele Peterson  <adele@apple.com>
1164
1165         Reviewed by Darin.
1166
1167         Added DeleteWordBackward and DeleteWordForward to execCommand.
1168
1169         * editing/Editor.cpp:
1170         (WebCore::execDeleteWordBackward):
1171         (WebCore::execDeleteWordForward):
1172         (WebCore::CommandEntry::):
1173
1174 2007-03-30  Simon Hausmann  <hausmann@kde.org>
1175
1176         Reviewed by Zack
1177
1178         * WebCore.pro: Fix release Qt builds.
1179
1180 2007-03-30  Antti Koivisto  <antti@apple.com>
1181
1182         Reviewed by bdash.
1183
1184         Spotted an int that should be float in previous patch.
1185
1186         * platform/Font.cpp:
1187         (WebCore::WidthIterator::advance):
1188
1189 2007-03-30  Antti Koivisto  <antti@apple.com>
1190
1191         Reviewed by Hyatt.
1192
1193         Render tree memory savings, part 1
1194         
1195         - Eliminate caching of monospace char width from RenderText. This optimization is not needed
1196           anymore since Font already caches space width (RenderText -4 bytes)
1197         - Eliminate caching of tab width from RenderBlock. Similary this optimization has become
1198           obsolete (RenderBlock -4 bytes)
1199
1200         * platform/Font.cpp:
1201         (WebCore::WidthIterator::advance):
1202         (WebCore::Font::spaceWidth):
1203         * platform/Font.h:
1204         (WebCore::Font::tabWidth):
1205         * platform/TextStyle.h:
1206         (WebCore::TextStyle::TextStyle):
1207         (WebCore::TextStyle::allowTabs):
1208         * rendering/InlineTextBox.cpp:
1209         (WebCore::InlineTextBox::selectionRect):
1210         (WebCore::InlineTextBox::paint):
1211         (WebCore::InlineTextBox::paintSelection):
1212         (WebCore::InlineTextBox::paintMarkedTextBackground):
1213         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
1214         (WebCore::InlineTextBox::paintTextMatchMarker):
1215         (WebCore::InlineTextBox::offsetForPosition):
1216         (WebCore::InlineTextBox::positionForOffset):
1217         * rendering/RenderBlock.cpp:
1218         (WebCore:::RenderFlow):
1219         (WebCore::RenderBlock::setStyle):
1220         * rendering/RenderBlock.h:
1221         * rendering/RenderObject.cpp:
1222         * rendering/RenderObject.h:
1223         * rendering/RenderText.cpp:
1224         (WebCore::RenderText::RenderText):
1225         (WebCore::RenderText::setStyle):
1226         (WebCore::RenderText::widthFromCache):
1227         (WebCore::RenderText::trimmedMinMaxWidth):
1228         (WebCore::RenderText::calcMinMaxWidthInternal):
1229         (WebCore::RenderText::setTextInternal):
1230         (WebCore::RenderText::width):
1231         * rendering/RenderText.h:
1232         (WebCore::RenderText::allowTabs):
1233         * rendering/bidi.cpp:
1234
1235 2007-03-30  David Hyatt  <hyatt@apple.com>
1236
1237         Fix (take 2) for bug 4334, flickering when floating elements gain/lose transparency.
1238
1239         Reviewed by mitz
1240
1241         * rendering/RenderBlock.cpp:
1242         * rendering/RenderBlock.h:
1243         * rendering/RenderBox.cpp:
1244         (WebCore::RenderBox::setStyle):
1245
1246 2007-03-29  Mitz Pettel  <mitz@webkit.org>
1247
1248         Reviewed by Darin.
1249
1250         - fix http://bugs.webkit.org/show_bug.cgi?id=13166
1251           REGRESSION (2005-10-16 - 2005-10-19): Ampersands showing up in the last column of the Gmail contacts table
1252
1253         Test: fast/tokenizer/write-partial-entity.html
1254
1255         * html/HTMLTokenizer.cpp:
1256         (WebCore::HTMLTokenizer::parseTag): Reordered to avoid resetting the buffer position
1257         after script execution which can write to the buffer.
1258
1259 2007-03-29  Justin Garcia  <justin.garcia@apple.com>
1260
1261         Reviewed by john
1262
1263         <rdar://problem/5099303> Deleting after a ToDo puts the caret in the wrong position
1264         
1265         We were failing to create the correct selection 
1266         for DeleteSelectionCommand because the selection extension 
1267         operations don't skip over non-editable content for editable 
1268         selections.
1269
1270         * editing/SelectionController.cpp:
1271         (WebCore::SelectionController::modifyExtendingRightForward):
1272         When extending an editable selection, don't extend into
1273         non-editable content.
1274         (WebCore::SelectionController::modifyExtendingLeftBackward):
1275         Ditto.
1276
1277 2007-03-29  Patti Hoa  <patti@apple.com>
1278
1279         Reviewed by harrison.
1280
1281         <rdar://problem/4918397> Exception raise inspecting note contents in the background
1282         * WebCore.xcodeproj/project.pbxproj:
1283         * bridge/mac/WebCoreAXObject.mm:
1284         (-[WebCoreAXObject subrole]):
1285         (-[WebCoreAXObject title]):
1286         Check that attachment supports the attribute before requesting it.
1287
1288 2007-03-29  Justin Garcia  <justin.garcia@apple.com>
1289
1290         Reviewed by john
1291
1292         <rdar://problem/5032066> Delete should work between ToDos
1293         
1294         Stop selecting the table when the user attempts to delete
1295         the line break just after it, instead, extend the selection
1296         into the last table cell.
1297         Let deletion merge content into table cells (as long as 
1298         its not from another table cell).  
1299         Start calling shouldInsertNode:replacingDOMRange:givenAction: 
1300         when moving content with moveParagraphs, so that Mail can 
1301         modify content before it is moved into a ToDo during a delete.
1302
1303         * editing/CompositeEditCommand.cpp:
1304         (WebCore::CompositeEditCommand::moveParagraphs): Ask the
1305         delegate before performing the move.  This will let Mail
1306         prevent styles from entering a ToDo.
1307         Added a FIXME about adding a new WebViewInsertAction
1308         * editing/DeleteSelectionCommand.cpp:
1309         (WebCore::DeleteSelectionCommand::initializePositionData):
1310         Allow merging into table cells from content not in a table.
1311         * editing/SelectionController.cpp:
1312         (WebCore::SelectionController::modifyExtendingRightForward):
1313         Don't select the table when extending by character/word from
1314         just before it.  This code was here to make it easier to select
1315         tables in order to delete them, but the deletion UI makes it 
1316         largely unnecessary.
1317         (WebCore::SelectionController::modifyExtendingLeftBackward):
1318         Ditto.
1319         * editing/TypingCommand.cpp:
1320         (WebCore::isFirstPositionAfterTable): Added.
1321         (WebCore::isLastPositionBeforeTable): Ditto.
1322         (WebCore::TypingCommand::deleteKeyPressed): When pressing
1323         the delete key with a caret at the beginning of a paragraph
1324         just after a table, move the paragraph into the last table
1325         cell.
1326         Do not do this if it would mean moving a block table.
1327         Removed some old irrelevant comments.
1328         * editing/htmlediting.cpp: Removed unused functions.
1329         * editing/htmlediting.h:
1330
1331 2007-03-29  Adam Treat  <adam@staikos.net>
1332
1333         Reviewed and committed by George Staikos.
1334
1335         Remove redundant line.
1336
1337         * platform/qt/FontDataQt.cpp:
1338         (WebCore::FontData::platformInit):
1339
1340 2007-03-29  Adam Treat  <adam@staikos.net>
1341
1342         Reviewed by David Hyatt, committed by George Staikos.
1343
1344         Test: fast/text/justified-selection.html
1345
1346         Take into account the entire run length to get a proper selection.
1347
1348         * platform/Font.cpp:
1349         (WebCore::WidthIterator::WidthIterator):
1350
1351 2007-03-29  David Hyatt  <hyatt@apple.com>
1352
1353         Fix for <rdar://problem/4545060>, technorati and arstechnica fail because of getComputedStyle not
1354         reporting display:none properly when it is set.  This is bugzilla bug 13103.
1355
1356         Reviewed by mitz
1357
1358         * css/CSSComputedStyleDeclaration.cpp:
1359         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1360
1361 2007-03-28  Oliver Hunt  <oliver@apple.com>
1362
1363         Reviewed by Hyatt.
1364
1365         Rename DocLoader::setPasteInProgress, etc to more generic 
1366         setAllowStaleResources, etc
1367
1368         * editing/Editor.cpp:
1369         (WebCore::Editor::paste):
1370         * loader/DocLoader.cpp:
1371         (WebCore::DocLoader::DocLoader):
1372         (WebCore::DocLoader::checkForReload):
1373         * loader/DocLoader.h:
1374         (WebCore::DocLoader::setAllowStaleResources):
1375         * page/DragController.cpp:
1376         (WebCore::DragController::concludeDrag):
1377
1378 2007-03-28  Oliver Hunt  <oliver@apple.com>
1379
1380         Reviewed by Anders and Steve.
1381
1382         Add a flag to DocLoader to prevent it from reloading 
1383         when performing a paste or drop operation.
1384         
1385         Remove m_cachePolicy from CachedResource as it is never used
1386         
1387         Fixes rdar://problem/5044366 : REGRESSION: Repro ASSERT failures 
1388         dragging image into GMail message in _web_writeImage and 
1389         documentFragmentFromDragData
1390
1391         * editing/Editor.cpp:
1392         (WebCore::Editor::paste):
1393           prevent the docloader from reloading resources on paste
1394         * html/HTMLImageLoader.cpp:
1395         (WebCore::HTMLImageLoader::updateFromElement):
1396         * loader/Cache.cpp:
1397         (WebCore::createResource):
1398         * loader/CachedCSSStyleSheet.cpp:
1399         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
1400         * loader/CachedCSSStyleSheet.h:
1401         * loader/CachedImage.cpp:
1402         (WebCore::CachedImage::CachedImage):
1403         * loader/CachedImage.h:
1404         * loader/CachedResource.cpp:
1405         (WebCore::CachedResource::CachedResource):
1406         * loader/CachedResource.h:
1407         * loader/CachedScript.cpp:
1408         (WebCore::CachedScript::CachedScript):
1409         * loader/CachedScript.h:
1410         * loader/CachedXBLDocument.cpp:
1411         (WebCore::CachedXBLDocument::CachedXBLDocument):
1412         * loader/CachedXBLDocument.h:
1413         * loader/CachedXSLStyleSheet.cpp:
1414         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
1415         * loader/CachedXSLStyleSheet.h:
1416         * loader/DocLoader.cpp:
1417         (WebCore::DocLoader::DocLoader):
1418            Tidy up constructor initialise new field
1419         (WebCore::DocLoader::checkForReload):
1420            Prevent reload when pasting
1421         * loader/DocLoader.h:
1422         (WebCore::DocLoader::setPasteInProgress):
1423           new field and setter
1424         * page/DragController.cpp:
1425         (WebCore::DragController::concludeDrag):
1426           prevent the docloader from reloading resources on drop
1427
1428 2007-03-27  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1429
1430         Not reviewed - fix typo in gdk build.
1431
1432         * platform/gdk/ScrollViewGdk.cpp:
1433         (WebCore::ScrollView::contentsToWindow):
1434
1435 2007-03-28  Maciej Stachowiak  <mjs@apple.com>
1436         
1437         Reviewed by Darin.
1438         
1439         - fixed <rdar://problem/4820817> Autoscroll is broken in Mail.app (message jumps around when trying to select text)
1440                 
1441         Handle scrolling external scrollviews around the webview during
1442         autoscroll or when scrolling into view.
1443         
1444         This should also restore performance on BenchJS test 6 lost due to Tim's partial fix.
1445
1446         * page/FrameView.cpp:
1447         (WebCore::FrameView::scrollRectIntoViewRecursively):
1448         * page/FrameView.h:
1449         * platform/ScrollView.h:
1450         * platform/gdk/ScrollViewGdk.cpp:
1451         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
1452         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1453         * platform/mac/ScrollViewMac.mm:
1454         (WebCore::ScrollView::visibleContentRect):
1455         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
1456         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1457         (WebCore::ScrollView::updateContents):
1458         * platform/qt/ScrollViewQt.cpp:
1459         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
1460         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1461         * platform/win/ScrollViewWin.cpp:
1462         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
1463         * platform/win/TemporaryLinkStubs.cpp:
1464         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1465         * rendering/RenderLayer.cpp:
1466         (WebCore::RenderLayer::scrollRectToVisible):
1467        
1468 2007-03-28  Jungshik Shin  <jungshik.shin@gmail.com>
1469
1470         Reviewed  and landed by Darin
1471
1472         Get rid of some misuses of |islower| and |tolower| for non-ASCII characters.
1473         http://bugs.webkit.org/show_bug.cgi?id=13138
1474
1475         * platform/StringImpl.cpp:
1476         (WebCore::StringImpl::isLower):
1477         (WebCore::StringImpl::lower):
1478         (WebCore::StringImpl::equalIgnoringCase):
1479
1480 2007-03-28  Antti Koivisto  <antti@apple.com>
1481
1482         Reviewed by Hyatt.
1483
1484         Fix <rdar://problem/5092653>
1485         REGRESSION: Image decoding making scrolling slow
1486         
1487         If decoder gave back a null frame (which I think happens regularly if you don't have full frame 
1488         data yet for image that does not decode incrementally) m_decodedSize was incremented anyway. This
1489         led to massive growth in calculated image size and eventually made cache prune constantly. 
1490         
1491         No test, I don't know how to make one for this.
1492
1493         * platform/graphics/BitmapImage.cpp:
1494         (WebCore::BitmapImage::cacheFrame):
1495
1496 2007-03-28  Adele Peterson  <adele@apple.com>
1497
1498         Reviewed by Kevin M.
1499
1500         WebCore part of fix for <rdar://problem/5095515> VitalSource Bookshelf should not pass return statements into stringByEvaluatingJavaScriptFromString
1501
1502         * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
1503         Convert return value to a string.  This matches the behavior in Safari 2.0.
1504
1505 2007-03-28  Alexey Proskuryakov  <ap@webkit.org>
1506
1507         Reviewed by Darin.
1508
1509         http://bugs.webkit.org/show_bug.cgi?id=13190
1510         XPath incorrectly handles namespaces on attributes
1511
1512         * xml/XPathStep.cpp:
1513         (WebCore::XPath::Step::nodesInAxis): Added a special case for faster attribute lookup; gives a slight but 
1514         measurable performance improvement for bug 13021.
1515         (WebCore::XPath::Step::nodeMatches): Fixed NameTest for attribute nodes.
1516
1517         * xml/XPathStep.h:
1518         (WebCore::XPath::Step::NodeTest::NodeTest):
1519         (WebCore::XPath::Step::NodeTest::namespaceURI):
1520         (WebCore::XPath::Step::nodeTest):
1521         (WebCore::XPath::Step::setNodeTest):
1522         Move m_namespaceURI to NodeTest, where it belongs. Removed unused m_nodeTestData (oops!).
1523
1524         * xml/XPathGrammar.y:
1525         * xml/XPathPath.cpp:
1526         (WebCore::XPath::LocationPath::optimizeStepPair):
1527         Accounted for the above change.
1528
1529 2007-03-28  Oliver Hunt  <oliver@apple.com>
1530
1531         rs=Hyatt.
1532
1533         Rollout local changes :-/
1534
1535         * loader/Cache.cpp:
1536         (WebCore::Cache::pruneAllResources):
1537         (WebCore::Cache::remove):
1538
1539 2007-03-28  Oliver Hunt  <oliver@apple.com>
1540
1541         Reviewed by Hyatt.
1542
1543         Roll out r20511 due to incredible badness
1544
1545         * loader/Cache.cpp:
1546         (WebCore::Cache::pruneAllResources):
1547         (WebCore::Cache::remove):
1548
1549 2007-03-27  Oliver Hunt  <oliver@apple.com>
1550
1551         Reviewed by Adam.
1552
1553         Don't enforce text-selection drag delay when we are
1554         going to drag an image anyway.
1555
1556         Fixes rdar://problem/4668935
1557
1558         * page/EventHandler.cpp:
1559         (WebCore::EventHandler::handleDrag):
1560
1561 2007-03-27  Justin Garcia  <justin.garcia@apple.com>
1562
1563         Build fix
1564         
1565         * editing/markup.cpp:
1566         (WebCore::startMarkup):
1567
1568 2007-03-27  Justin Garcia  <justin.garcia@apple.com>
1569
1570         Reviewed by darin
1571         
1572         <rdar://problem/5091898> REGRESSION: GMail Editor: A line of underlined text copied with Select All pastes with wrong font family
1573         
1574         createMarkup skipped elements if they were blocks
1575         when called from moveParagraphs (because that function 
1576         must receive only inline content).  This patch adds 
1577         code to inline these blocks instead of skipping them 
1578         so that we don't lose any of the style that they 
1579         contribute to the copied markup.
1580
1581         * editing/markup.cpp:
1582         (WebCore::startMarkup): Add an inlineBlocks option.
1583         Make sure to overwrite display:block coming from
1584         a style sheet or the inline style declaration.
1585         (WebCore::createMarkup): Don't refuse to include a 
1586         specialCommonAncestor that's a block if we were asked 
1587         to include only inline content, since we can now inline 
1588         block elements in startMarkup.
1589
1590 2007-03-27  Adele Peterson  <adele@apple.com>
1591
1592         Reviewed by Hyatt.
1593
1594         Fix for <rdar://problem/5026141> REGRESSION: Aperture Viewer Flashes when switching from Index Page to Detail page in Web Gallery
1595
1596         This disables the paint that occurs after WebCore finishes loading the document.  We should reenable this when we
1597         move the dispatchDidFinishLoad delegate callback to happen around the same time as the JS onload call.  See <rdar://problem/5092361>.
1598
1599         * dom/Document.cpp: (WebCore::Document::implicitClose):
1600
1601 2007-03-26  Justin Garcia  <justin.garcia@apple.com>
1602
1603         Reviewed by darin
1604         
1605         <rdar://problem/5065910> REGRESSION: In Mail and GMail, Can't apply color to pasted line of text
1606         <rdar://problem/5084241> After deleting a paragraph of colored text, can't change text color
1607         <rdar://problem/5065605> REGRESSION: Text copied with Select All + Copy loses color on Paste
1608         <rdar://problem/4916887> GMAIL: Can't apply color to text once it becomes indented
1609
1610         * css/CSSComputedStyleDeclaration.cpp:
1611         (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties):
1612         If a node's text fill color is invalid, then its children use 
1613         their font-color as their text fill color (they don't inherit 
1614         it).  Likewise for stroke color.
1615
1616 2007-03-27  Anders Carlsson  <acarlsson@apple.com>
1617
1618         * platform/ScrollBar.h:
1619         Use wtf/MathExtras.h instead of math.h
1620
1621 2007-03-27  Zack Rusin  <zrusin@trolltech.com>
1622
1623         Fix the compile - when using math.h functions
1624         actually include the header with them.
1625
1626         * platform/ScrollBar.h:
1627
1628 2007-03-27  Oliver Hunt  <oliver@apple.com>
1629
1630         Reviewed by Maciej.
1631
1632         The WebArchiver needs all the subresources of a document to be accessible
1633         through the DocLoader, so we can't remove a CachedResource simultaneously
1634         from the global Cache and all DocLoaders, just because it needs to be 
1635         reloaded in one.
1636
1637         Fixes rdar://problem/5044366
1638
1639         * loader/Cache.cpp:
1640         (WebCore::Cache::remove):
1641            Don't evict the resource from all DocLoaders
1642         * manual-tests/test-iframes-loading-the-same-resource.html: Added.
1643            Alas it wasn't possible to make a nice layout test, even this manual test
1644            is not entirely deterministic
1645
1646 2007-03-27  Mark Rowe  <mrowe@apple.com>
1647
1648         Build fix.
1649
1650         * platform/GlyphBuffer.h:
1651         (WebCore::GlyphBuffer::clear):
1652
1653 2007-03-27  Dave Hyatt  <hyatt@apple.com>
1654
1655         Add support for glyph offsets to the GlyphBuffer.
1656        
1657         Reviewed by olliej
1658
1659         * platform/Font.cpp:
1660         (WebCore::Font::drawGlyphBuffer):
1661         * platform/GlyphBuffer.h:
1662         (WebCore::GlyphBuffer::clear):
1663         (WebCore::GlyphBuffer::swap):
1664         (WebCore::GlyphBuffer::offsetAt):
1665         (WebCore::GlyphBuffer::add):
1666
1667 2007-03-27  Antti Koivisto  <antti@apple.com>
1668
1669         Keep buildbot happy.
1670
1671         * platform/mac/PlatformScrollBarMac.mm:
1672         (WebCore::PlatformScrollbar::scrollbarHit):
1673
1674 2007-03-26  Antti Koivisto  <antti@apple.com>
1675
1676         Reviewed by Darin.
1677         
1678         On Mac, support fine grained wheel events generated by trackpad and Mighty Mouse.
1679         http://bugs.webkit.org/show_bug.cgi?id=13134
1680         <rdar://problem/5076249?
1681
1682         * WebCore.exp:
1683             Export _wkGetWheelEventDeltas
1684         * page/EventHandler.cpp:
1685         (WebCore::EventHandler::handleWheelEvent):
1686             Remove (0, 0) scroll event hack, it is not needed anymore.
1687             Do per-pixel scrolling for fine grained events.
1688         * platform/PlatformWheelEvent.h:
1689         (WebCore::PlatformWheelEvent::isContinuous):
1690             Add new m_isContinuous boolean to indicate fine grained wheel events.
1691         * platform/ScrollBar.cpp:
1692         (WebCore::Scrollbar::Scrollbar):
1693         (WebCore::Scrollbar::setValue):
1694         (WebCore::Scrollbar::setSteps):
1695         (WebCore::Scrollbar::scroll):
1696         * platform/ScrollBar.h:
1697         (WebCore::Scrollbar::value):
1698             Use float to represent current position to support finer grained scrolling.
1699             Add ScrollByPixel, remove ScrollByWheel (which was same as ScrollByLine anyway)
1700         * platform/ScrollTypes.h:
1701         (WebCore::):
1702         * platform/gdk/WheelEventGdk.cpp:
1703         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1704             Initalize m_isContinuous
1705         * platform/mac/WebCoreSystemInterface.h:
1706         * platform/mac/WebCoreSystemInterface.mm:
1707             Add wkGetWheelEventDeltas for getting fine grained wheel events
1708         * platform/mac/WheelEventMac.mm:
1709         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1710             Get the wheel deltas using new wkGetWheelEventDeltas interface
1711         * platform/qt/WheelEventQt.cpp:
1712         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1713             Initalize m_isContinuous
1714         * rendering/RenderListBox.cpp:
1715         (WebCore::RenderListBox::calcHeight):
1716             Pass item height to scrollbar
1717
1718 2007-03-26  Geoffrey Garen  <ggaren@apple.com>
1719
1720         Reviewed by Darin Adler.
1721
1722         Fixed <rdar://problem/5088234> REGRESSION: Crash occurs at WebCore::Node::
1723         createRendererIfNeeded() when changing map views with MS Virtual Earth 
1724         (http://www.ziprealty.com/)
1725         
1726         The cause of the crash was the insertion of a <script> element whose
1727         script removed it from the document. The <script> element would then be 
1728         garbage when the insertion routine went on to attach() it.
1729         
1730         The solution here is to check that an element is still your child before
1731         trying to attach() it. This matches the style of checks we do elsewhere
1732         in the node insertion and removal code.
1733
1734         * dom/ContainerNode.cpp:
1735         (WebCore::ContainerNode::insertBefore):
1736         (WebCore::ContainerNode::replaceChild):
1737         (WebCore::ContainerNode::appendChild):
1738
1739 2007-03-26  David Carson  <dacarson@gmail.com>
1740
1741         Reviewed by Darin, landed by Anders.
1742
1743         Manual test case for: REGRESSION (r19559): Java applet crash
1744         http://bugs.webkit.org/show_bug.cgi?id=13142
1745         <rdar://problem/5080340>
1746
1747         * manual-tests/liveconnect-applet-get-boolean.html: Added.
1748         * manual-tests/resources/CheckerApplet.class: Added.
1749         * manual-tests/resources/CheckerApplet.java: Added.
1750
1751 2007-03-26  Mitz Pettel  <mitz@webkit.org>
1752
1753         Reviewed and landed by Darin.
1754
1755         - fix http://bugs.webkit.org/show_bug.cgi?id=13194
1756           <rdar://problem/5087738>
1757           REGRESSION: Selection rects are wrong for images in search results from images.google.com
1758
1759         Test: fast/replaced/selection-rect-in-table-cell.html
1760
1761         * rendering/RenderReplaced.cpp:
1762         (WebCore::RenderReplaced::selectionRect):
1763
1764 2007-03-26  Geoffrey Garen  <ggaren@apple.com>
1765
1766         Removed now-stale #includes of <assert.h>.
1767         
1768         * WebCorePrefix.h:
1769         * config.h:
1770         * css/CSSGrammar.y:
1771         * platform/Arena.cpp:
1772         * platform/KURL.cpp:
1773         * platform/SegmentedString.h:
1774         * rendering/DataRef.h:
1775         * rendering/RenderArena.cpp:
1776
1777 2007-03-26  Geoffrey Garen  <ggaren@apple.com>
1778
1779         Reviewed by Kevin McCulough.
1780
1781         Global replace of "assert(" with "ASSERT(" to assist debugging. Removed
1782         one instance of commented-out code containing "assert(" instead of replacing it.
1783
1784 2007-03-25  Antti Koivisto  <antti@apple.com>
1785
1786         Reviewed by Adam.
1787
1788         Fix <rdar://problem/5049842>
1789         Gmail Editor: Dragging message text in the message body results in a crash at WebCore::Frame::eventHandler()
1790
1791         Null check frame in m_dragTarget, it might be gone already.
1792
1793         * page/EventHandler.cpp:
1794         (WebCore::EventHandler::updateDragAndDrop):
1795         (WebCore::EventHandler::cancelDragAndDrop):
1796         (WebCore::EventHandler::performDragAndDrop):
1797
1798 2007-03-25  Alexey Proskuryakov  <ap@webkit.org>
1799
1800         Reviewed by Darin.
1801
1802         A partial fix for http://bugs.webkit.org/show_bug.cgi?id=13021
1803         XPath can be very slow
1804
1805         * xml/XPathExpression.cpp:
1806         (WebCore::XPathExpression::evaluate): Reset a reference to the context node, as this may prevent the whole document
1807         from being destroyed in time.
1808
1809         * dom/Attr.cpp:
1810         (WebCore::Attr::createTextChild): Instead of calling appendChild(), just do the few operations it really needs to perform.
1811         * dom/ContainerNode.h:
1812         (WebCore::ContainerNode::fastSetFirstChild):
1813         (WebCore::ContainerNode::fastSetLastChild):
1814         Added operations that let Attr hack internal ContainerNode data (evil, but fast!).
1815
1816         * xml/XPathStep.cpp:
1817         (WebCore::XPath::Step::evaluate):
1818         (WebCore::XPath::Step::nodesInAxis):
1819         (WebCore::XPath::Step::nodeMatches):
1820         * xml/XPathStep.h:
1821         Merged node testing into axis enumeration. This saves a lot of Vector resizing and passing, and is necessary for future 
1822         optimizations (sometimes, we can just pick the single result node instead of enumerating and filtering the whole axis).
1823
1824 2007-03-24  Mitz Pettel  <mitz@webkit.org>
1825
1826         Reviewed by Darin.
1827
1828         - fix http://bugs.webkit.org/show_bug.cgi?id=13156
1829           REGRESSION (r19621): Pasting breakable content where wrapped line is too long to fit in a textarea fails to draw a horizontal scrollbar
1830
1831         Test: fast/text/midword-break-after-breakable-char.html
1832
1833         Breaking in the middle of the word
1834         is allowed only if no breaking opportunity between words has occurred yet. The
1835         first position on the line should not be considered "between words" even if
1836         it is a breaking opportunity.
1837         
1838         * rendering/bidi.cpp:
1839         (WebCore::RenderBlock::findNextLineBreak): Changed according to the above. Also
1840         cleaned up a couple of lines.
1841
1842 2007-03-24  David Hyatt  <hyatt@apple.com>
1843
1844         Fix for bugzilla bug 13187, place a hard limit on the amount of decoded data that WebCore will keep
1845         around even on live pages (pages being displayed in tabs/windows or in the back/forward cache).
1846         Images will decode to paint and once the decoded data exceeds the cache size, the decoded data will be
1847         tossed.
1848
1849         Refine the flushing algorithm to apply the two-pass decode/evict model to each LRU-SP queue individually, rather
1850         than to all the lists at once.  This allows the cache to evict large encoded resources before flushing small
1851         or frequently accessed decoded onces.
1852
1853         Added information on live/decoded data to the cache statistics.
1854
1855         Reviewed by darin
1856
1857         * loader/Cache.cpp:
1858         (WebCore::Cache::Cache):
1859         (WebCore::Cache::pruneLiveResources):
1860         (WebCore::Cache::pruneAllResources):
1861         (WebCore::Cache::setMaximumSize):
1862         (WebCore::Cache::remove):
1863         (WebCore::Cache::lruListFor):
1864         (WebCore::Cache::removeFromLRUList):
1865         (WebCore::Cache::insertInLRUList):
1866         (WebCore::Cache::liveLRUListFor):
1867         (WebCore::Cache::removeFromLiveResourcesList):
1868         (WebCore::Cache::insertInLiveResourcesList):
1869         (WebCore::Cache::addToLiveResourcesSize):
1870         (WebCore::Cache::removeFromLiveResourcesSize):
1871         (WebCore::Cache::adjustSize):
1872         (WebCore::Cache::getStatistics):
1873         * loader/Cache.h:
1874         (WebCore::Cache::TypeStatistic::TypeStatistic):
1875         * loader/CachedImage.cpp:
1876         (WebCore::CachedImage::decodedSizeWillChange):
1877         (WebCore::CachedImage::decodedSizeChanged):
1878         * loader/CachedImage.h:
1879         * loader/CachedResource.cpp:
1880         (WebCore::CachedResource::CachedResource):
1881         (WebCore::CachedResource::ref):
1882         (WebCore::CachedResource::deref):
1883         (WebCore::CachedResource::setEncodedSize):
1884         (WebCore::CachedResource::liveResourceAccessed):
1885         * loader/CachedResource.h:
1886         (WebCore::CachedResource::liveAccessCount):
1887         (WebCore::CachedResource::resetLiveAccessCount):
1888         (WebCore::CachedResource::increaseLiveAccessCount):
1889         * platform/graphics/BitmapImage.cpp:
1890         (WebCore::BitmapImage::destroyDecodedData):
1891         (WebCore::BitmapImage::cacheFrame):
1892         * platform/graphics/ImageObserver.h:
1893         * rendering/RenderBox.cpp:
1894         (WebCore::RenderBox::paintBackgroundExtended):
1895         * rendering/RenderImage.cpp:
1896         (WebCore::RenderImage::paint):
1897         * rendering/RenderListMarker.cpp:
1898         (WebCore::RenderListMarker::paint):
1899         * rendering/RenderObject.cpp:
1900         (WebCore::RenderObject::paintBorderImage):
1901
1902 2007-03-24  Darin Adler  <darin@apple.com>
1903
1904         Reviewed by Mitz.
1905
1906         - fix http://bugs.webkit.org/show_bug.cgi?id=13123
1907           CSS selectors that use :lang, :not, and namespaces do not serialize correctly
1908
1909         Test: fast/css/css-selector-text.html
1910
1911         * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): Add the namespace
1912         prefix for tag or attribute names, the sub-selector for :not, and the argument
1913         for :lang.
1914
1915 2007-03-24  Brady Eidson  <beidson@apple.com>
1916
1917         Reviewed by Adam
1918
1919         <rdar://problem/5086210> - Move RetainPtr to WTF
1920
1921         * ForwardingHeaders/wtf/RetainPtr.h: Added.
1922         * WebCore.xcodeproj/project.pbxproj: Removed WebCore/RetainPtr.h
1923         
1924         * history/HistoryItem.h: Changed #include to <wtf/RetainPtr.h>
1925         * history/PageCache.h: Ditto
1926         * page/mac/WebCoreFrameBridge.mm: Ditto
1927         * platform/ContextMenu.h: Ditto
1928         * platform/ContextMenuItem.h: Ditto
1929         * platform/DragImage.h: Ditto
1930         * platform/FileChooser.h: Ditto
1931         * platform/PlatformKeyboardEvent.h: Ditto
1932         * platform/PopupMenu.h: Ditto
1933         * platform/SharedBuffer.h: Ditto
1934         * platform/cf/RetainPtr.h: Removed.
1935         * platform/graphics/Icon.h: Changed #include
1936         * platform/mac/ClipboardMac.h: Ditto
1937         * platform/mac/PasteboardMac.mm: Ditto
1938         * platform/mac/WidgetMac.mm: Ditto
1939         * platform/network/AuthenticationChallenge.h: Ditto
1940         * platform/network/ResourceError.h: Ditto
1941         * platform/network/ResourceHandle.h: Ditto
1942         * platform/network/ResourceRequest.h: Ditto
1943         * platform/network/ResourceResponse.h: Ditto
1944         * rendering/RenderThemeMac.mm: Ditto
1945
1946 2007-03-24  Mitz Pettel  <mitz@webkit.org>
1947
1948         Fix for <rdar://problem/5086797>, layoutPending is now reporting incorrect results, which will lead
1949         to all sorts of layout issues.  This is in bugzilla as 13179.
1950
1951         Reviewed by hyatt
1952
1953         - fix http://bugs.webkit.org/show_bug.cgi?id=13179
1954           REGRESSION (r20410): In debug builds, loading a certain page is suspended until redisplay is forced
1955
1956         Moved the root->needsLayout() check from layoutPending() to needsLayout()
1957         to restore the behavior before r20324.
1958
1959         * page/FrameView.cpp:
1960         (WebCore::FrameView::layoutPending):
1961         (WebCore::FrameView::needsLayout):
1962
1963 2007-03-24  Mitz Pettel  <mitz@webkit.org>
1964
1965         Reviewed by Adele.
1966
1967         - fix http://bugs.webkit.org/show_bug.cgi?id=13180
1968               <rdar://problem/5084478>
1969           Another debug build crash from ASSERTION FAILED: !needsLayout()
1970
1971         No test possible because updateRendering() is always called after script
1972         execution.
1973
1974         * page/FrameView.cpp:
1975         (WebCore::FrameView::layout): Get the layout root after calling recalcStyle()
1976         since a style recalc may result in needing to do start layout at the root.
1977
1978 2007-03-24  Nikolas Zimmermann  <zimmermann@kde.org>
1979
1980         Not reviewed. Build fix.
1981
1982         Fix FloatRect vs. IntRect confusion.
1983
1984         * rendering/RenderSVGImage.cpp:
1985         (WebCore::RenderSVGImage::nodeAtPoint):
1986
1987 2007-03-25  Mark Rowe  <mrowe@apple.com>
1988
1989         Fix incorrect radar number.
1990
1991         * platform/network/mac/ResourceHandleMac.mm:
1992         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
1993
1994 2007-03-23  Nikolas Zimmermann  <zimmermann@kde.org>
1995
1996         Reviewed by Oliver.
1997
1998         Fix all known RenderSVGImage problems.
1999
2000         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12126 (RenderSVGImage seems to suffer from integer overflow)
2001         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12442 (raster images disappearing during script execution (SVG))
2002         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12572 (WebKit does not properly invalidate image region after image load)
2003
2004         Added test: svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html
2005
2006         In RenderSVGImage::paint, do not call shouldPaint() as this will never work properly for SVG renderers, as shouldPaint
2007         doesn't take into account any special SVG transformation (localTransform/absoluteTransform). Just remove the call.
2008
2009         Fix hit detection on RenderSVGImage - it didn't work properly at all. No idea why I didn't notice before.
2010         Thanks Andreas Neumann once again for writing excellent bug reports and pointing me to them :-)
2011
2012         The carto.net navigation tools work as expected now, and also the "dock like" image effect example.
2013
2014         * rendering/RenderSVGImage.cpp:
2015         (WebCore::RenderSVGImage::paint):
2016         (WebCore::RenderSVGImage::nodeAtPoint):
2017
2018 2007-03-24  Mitz Pettel  <mitz@webkit.org>
2019
2020         Reviewed by Dave Hyatt.
2021
2022         - http://bugs.webkit.org/show_bug.cgi?id=13177
2023           Suppress control characters in the ATSUI code path
2024
2025         * platform/mac/FontMac.mm:
2026         (WebCore::overrideLayoutOperation):
2027         (WebCore::ATSULayoutParameters::initialize):
2028
2029 2007-03-24  David Hyatt  <hyatt@apple.com>
2030
2031         Fix for <rdar://problem/5086400>, images scrolled offscreen continue to animate.  Safari 2 would
2032         halt animations when images were no longer visible.
2033
2034         Reviewed by mjs, olliej
2035
2036         * platform/graphics/BitmapImage.cpp:
2037         (WebCore::BitmapImage::advanceAnimation):
2038
2039 2007-03-24  David Hyatt  <hyatt@apple.com>
2040
2041         Fix for <rdar://problem/508328>, sluggish text entry in search field.  Make sure
2042         our size actually changed before we decide to do a full repaint because of background/border
2043         complexities.
2044
2045         Reviewed by aroben
2046
2047         * rendering/RenderObject.cpp:
2048         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
2049
2050 2007-03-23  Dave Hyatt  <hyatt@apple.com>
2051
2052         Fix for <rdar://problem/5048219>, spurious glyphs in gmail.   This is bugzilla bug 13136, which
2053         will remain open to cover patching the complex text path.
2054         
2055         Reviewed by aroben
2056
2057         * platform/Font.cpp:
2058         (WebCore::Font::glyphDataForCharacter):
2059         * platform/Font.h:
2060         (WebCore::Font::treatAsZeroWidthSpace):
2061         * platform/GlyphPageTreeNode.cpp:
2062         (WebCore::GlyphPageTreeNode::initializePage):
2063
2064 2007-03-23  Mitz Pettel  <mitz@webkit.org>
2065
2066         Reviewed by Adele.
2067
2068         - fix http://bugs.webkit.org/show_bug.cgi?id=13153
2069           REGRESSION: Visual highlighting of pre-populated blank line in textarea is broken
2070
2071         - fix a bug where selecting across a soft line break did not highlight to
2072           the end of the first line if it contained skipped whitespace
2073
2074         Test: fast/text/selection-hard-linebreak.html
2075
2076         * rendering/InlineTextBox.cpp:
2077         (WebCore::InlineTextBox::selectionState): Changed to treat a selection that ends on the
2078         end of a hard line break as if it ends after the line break. Fixed the case of a selection
2079         that starts and ends in the same text object as the box but does not intersect it
2080         to return SelectionNone instead of selectionBoth.
2081
2082 2007-03-23  Mitz Pettel  <mitz@webkit.org>
2083
2084         Reviewed by Adele.
2085
2086         - fix http://bugs.webkit.org/show_bug.cgi?id=13124
2087           REGRESSION: Reproducible crash in Widget::getView
2088
2089         Test: fast/frames/hover-timer-crash.html
2090
2091         * page/Frame.cpp:
2092         (WebCore::Frame::setView): Added a call to EventHandler::clear().
2093
2094 2007-03-23  Justin Garcia  <justin.garcia@apple.com>
2095
2096         Reviewed by adele
2097
2098         <rdar://problem/5078739> 
2099         Crash in in ReplaceSelectionCommand if the fragment contains only a style span
2100
2101         * editing/ReplaceSelectionCommand.cpp:
2102         (WebCore::ReplaceSelectionCommand::doApply): Check 
2103         for an empty fragment after removing a redundant
2104         style span instead of before.
2105
2106 2007-03-23  David Hyatt  <hyatt@apple.com>
2107
2108         <rdar://problem/5085063>
2109
2110         Fix non-looping animation on cuteoverload.com. Just always flush
2111         decoded data for large animated images to avoid our cache getting
2112         out of sync with the image source.
2113
2114         Reviewed by ggaren
2115
2116         * platform/graphics/BitmapImage.cpp:
2117         (WebCore::BitmapImage::advanceAnimation):
2118
2119 2007-03-23  Adele Peterson  <adele@apple.com>
2120
2121         Reviewed by Darin.
2122
2123         Fix for <rdar://problem/5061024> REGRESSION: Returning false from onkeypress event on Input is ignored when key is Tab
2124         http://bugs.webkit.org/show_bug.cgi?id= 13020
2125
2126         No known way to add a layout test for this.  We would need a way to know exactly how the event was consumed.
2127
2128         * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler):
2129           If the keypress event has its default behavior prevented, then we should consider the keydown event handled.
2130
2131 2007-03-23  Justin Garcia  <justin.garcia@apple.com>
2132
2133         Reviewed by darin
2134
2135         <rdar://problem/5080333> 
2136         REGRESSION: Selection changes when changing the alignment of an image
2137         
2138         Regression occurred when we started using moveParagraphs
2139         to move content in applyBlockStyle.  moveParagraphs 
2140         moves by copying, deleting and reinserting content, and
2141         so must be accompanied by selection preservation code.
2142         That code uses rangeFromLocationAndLength and rangeLength,
2143         which use TextIterators, which don't emit anything for images 
2144         and other replaced elements, causing this bug.
2145
2146         * editing/ApplyStyleCommand.cpp:
2147         (WebCore::ApplyStyleCommand::applyBlockStyle): Ask rangeLength 
2148         and rangeFromLocationAndLength to request that their
2149         TextIterators emit spaces for replaced elements.
2150         Use rangeCompliantEquivalent()s when creating a Range from
2151         VisiblePositions, since some VisiblePositions have illegal
2152         deepEquivalent()s.
2153         * editing/CompositeEditCommand.cpp:
2154         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
2155         * editing/TextIterator.cpp:
2156         (WebCore::TextIterator::TextIterator):
2157         (WebCore::TextIterator::handleReplacedElement): Emit
2158         a space if requested.
2159         (WebCore::TextIterator::representNodeOffsetZero): Emit
2160         ranges before m_node, not around m_lastTextNode.  These
2161         ranges should represent the part of the document associated
2162         with the emitted character. 
2163         (WebCore::TextIterator::rangeLength): Take in the new bool.
2164         (WebCore::TextIterator::rangeFromLocationAndLength): Ditto.
2165         Also, don't loop an extra time after finding the end of the
2166         range when we're looking for zero length ranges.  This appeared
2167         to be a workaround for the bugs fixed in representNodeOffsetZero
2168         in this patch.
2169         * editing/TextIterator.h:
2170
2171 2007-03-24  Mark Rowe  <mrowe@apple.com>
2172
2173         Rubber-stamped by Darin.
2174
2175         * Configurations/WebCore.xcconfig: Remove unnecessary INFOPLIST_PREPROCESS.
2176
2177 2007-03-23  Darin Adler  <darin@apple.com>
2178
2179         * html/HTMLBodyElement.cpp: Fix comment typo.
2180
2181 2007-03-23  Adam Treat  <adam@staikos.net>
2182
2183         Reviewed and committed by George.
2184
2185         Patch from Adam Treat to make the Qt build work without SVG and XSLT.
2186         XMLNames is required in any case.
2187
2188         * WebCore.pro:
2189
2190 2007-03-23  Darin Adler  <darin@apple.com>
2191
2192         Reviewed by Hyatt.
2193
2194         - <rdar://problem/5074439> handle margins on frame and iframe elements
2195           without involving FrameView, FrameLoader, etc.
2196
2197         * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::insertedIntoDocument):
2198         Grab the margin from the frame directly here. There was no real benefit
2199         to doing this via FrameView. Later we can delete quite a bit of unneeded code
2200         here and in WebKit that exists only to set up the margin values in FrameView,
2201         which are now unused.
2202
2203 2007-03-23  Adele Peterson  <adele@apple.com>
2204
2205         Reviewed by Darin.
2206
2207         Fix for <rdar://problem/5080428> REGRESSION: getting value for hidden input element fails after the fix for Bug 11866
2208         http://bugs.webkit.org/show_bug.cgi?id=13121
2209
2210         Rolled out the change for 11866 that made hidden input elements store the value separately from the value attribute.
2211         Added an m_originalValue field that gets set when the element is done being parsed (in closeRenderer).  In reset,
2212         use the m_originalValue for hidden input elements.
2213
2214         * html/HTMLInputElement.cpp:
2215         (WebCore::HTMLInputElement::closeRenderer):
2216         (WebCore::HTMLInputElement::reset):
2217         (WebCore::HTMLInputElement::setValue):
2218         (WebCore::HTMLInputElement::storesValueSeparateFromAttribute):
2219         * html/HTMLInputElement.h:
2220
2221 2007-03-23  Mitz Pettel  <mitz@webkit.org>
2222
2223         Reviewed by Dave Hyatt.
2224
2225         - fix http://bugs.webkit.org/show_bug.cgi?id=13157
2226               <rdar://problem/5083995>
2227           List markers positioned incorrectly and don't repaint properly on Oxford homepage
2228
2229         Test: fast/lists/marker-image-error.html
2230
2231         * rendering/RenderListMarker.cpp:
2232         (WebCore::RenderListMarker::imageChanged): Mark ourselves for relayout if
2233         the image failed to load, since that means we will use a bullet instead.
2234
2235 2007-03-23  Zack Rusin  <zrusin@trolltech.com>
2236
2237         Fix the compile.
2238
2239         * platform/graphics/qt/ImageSourceQt.cpp:
2240
2241 2007-03-22  Dave Hyatt  <hyatt@apple.com>
2242
2243         Fix for <rdar://problem/5083072>.
2244
2245         * page/Frame.cpp:
2246         (WebCore::Frame::setPrinting):
2247         (WebCore::Frame::forceLayoutWithPageWidthRange):
2248         * page/Frame.h:
2249         * page/mac/WebCoreFrameBridge.mm:
2250         (-[WebCoreFrameBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
2251
2252 2007-03-22  Anders Carlsson  <acarlsson@apple.com>
2253
2254         Reviewed by Ada.
2255
2256         <rdar://problem/5074974>
2257         CrashTracer: [USER] repro crash in Safari at com.apple.WebCore: WebCore::FrameLoader::activeDocumentLoader const + 6
2258         
2259         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
2260         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
2261         Don't use ResourceResponse:isHTTP here since that only looks at the protocol instead of if the response came from a 
2262         HTTP server (and not a web archive).
2263
2264 2007-03-22  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2265
2266         Not reviewed - gdk build fix.
2267
2268         * platform/graphics/cairo/ImageSourceCairo.cpp:
2269
2270 2007-03-22  Dave Hyatt  <hyatt@apple.com>
2271
2272         Fix for <rdar://problem/5083473>.  Make sure wheeling still forwards to the frame view even
2273         when no node is hit.  Technically not ever hitting a node is a regression from the RenderView
2274         size changes (making it be the size of the initial containing block according to CSS2.1), but
2275         we should still handle this case gracefully in case it comes up again.
2276        
2277         Reviewed by olliej
2278
2279         * page/EventHandler.cpp:
2280         (WebCore::EventHandler::handleWheelEvent):
2281
2282 2007-03-22  Justin Garcia  <justin.garcia@apple.com>
2283
2284         Reviewed by kevin
2285
2286         <rdar://problem/5081257> 
2287         REGRESSION: New Mail signatures start out empty
2288
2289         * editing/VisiblePosition.cpp:
2290         (WebCore::VisiblePosition::canonicalPosition): Allow
2291         descent from positions inside the document into an 
2292         editable body.
2293
2294 2007-03-22  Brady Eidson  <beidson@apple.com>
2295
2296         Reviewed by Adele and John
2297
2298         <rdar://5043528> - Prepare for new API
2299         
2300         * platform/network/ResourceHandle.cpp:
2301         (WebCore::ResourceHandle::clearAuthentication): Clear CF type
2302
2303 2007-03-22  Beth Dakin  <bdakin@apple.com>
2304
2305         Patch by Hyatt, reviewed and committed by me.
2306
2307         Does not reproduce consistently, so a layout test does not seem 
2308         possible.
2309
2310         Fix for <rdar://problem/5082421> Constantly hitting ASSERT(!
2311         needsLayout()) in RenderView::paint()
2312
2313         * page/FrameView.cpp:
2314         (WebCore::FrameView::layoutPending): It is not enough to ask if the 
2315         layout timer is active. There may be times that we don't have a 
2316         body yet so we cannot schedule layout yet, but the root still needs 
2317         layout.  
2318
2319 2007-03-22  John Sullivan  <sullivan@apple.com>
2320
2321         Reviewed by Darin
2322         
2323         Followup for recent fix to 5079700, found by assertion added to Safari.
2324
2325         * page/mac/FrameMac.mm:
2326         (WebCore::Frame::searchForLabelsBeforeElement):
2327         Fixed another place in this method where an empty NSString was being returned instead of nil.
2328         Cleaned up the style a little too.
2329
2330 2007-03-22  David Hyatt  <hyatt@apple.com>
2331
2332         Remove unnecessary destroyFrameAtIndex call.  Now that we throw away
2333         the image source, it is no longer needed.
2334
2335         Reviewed by beth
2336
2337         * platform/graphics/BitmapImage.cpp:
2338         (WebCore::BitmapImage::destroyDecodedData):
2339
2340 2007-03-22  David Harrison  <harrison@apple.com>
2341
2342         Reviewed by Geoff, Darin.
2343
2344         <rdar://problem/5077892> In RapidWeaver 3.5.1, a crash occurs when attempting to load Safari Bookmarks in iMedia Browser
2345         
2346         * platform/mac/ThreadCheck.mm:
2347         (WebCore::_WebCoreThreadViolationCheck):
2348         Change default on Tiger to NSLog rather than raise an exception.
2349
2350 2007-03-22  Darin Adler  <darin@apple.com>
2351
2352         Reviewed by Brady.
2353
2354         - use binary_search instead of hash table; slightly better performance and
2355           less memory use
2356
2357         * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::portAllowed):
2358         Use binary_search.
2359
2360 2007-03-22  Darin Adler  <darin@apple.com>
2361
2362         Reviewed by Adele.
2363
2364         - fix <rdar://problem/5074630> detachChildren call should move from WebKit to WebCore
2365
2366         * loader/FrameLoader.cpp: (WebCore::FrameLoader::setDocumentLoader):
2367         Add a call to detachChildren() after the call to prepareForDataSourceReplacement().
2368         There was no reason for this crucial loading step to be left to the client.
2369
2370 2007-03-22  David Hyatt  <hyatt@apple.com>
2371
2372         Minor refactoring and cleanup of the bridge calls that want to control layout settings on the RenderView.
2373         Have the bridge talk through the FrameView instead of just asking for the RenderView directly.
2374
2375         Add an assert to help catch situations where the RenderView needs layout at paint time, since this is a known
2376         catastrophic scenario that will (much of the time) result in a crash in RenderTableSection::paint.
2377
2378         Reviewed by aroben
2379
2380         * page/FrameView.cpp:
2381         (WebCore::FrameView::adjustViewSize):
2382         (WebCore::FrameView::needsLayout):
2383         (WebCore::FrameView::setNeedsLayout):
2384         * page/FrameView.h:
2385         * page/mac/WebCoreFrameBridge.mm:
2386         (-[WebCoreFrameBridge needsLayout]):
2387         (-[WebCoreFrameBridge setNeedsLayout]):
2388         * rendering/RenderView.cpp:
2389         (WebCore::RenderView::paint):
2390
2391 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
2392
2393         Reviewed by Beth Dakin.
2394         
2395         Re-worked the fix in r20375. 'M' and 'm' are not the only commands that
2396         accept "extra" coordinates -- virtually all commands accept them.
2397
2398         * ksvg2/svg/SVGParserUtilities.cpp:
2399         (WebCore::SVGPathParser::parseSVG):
2400
2401 2007-03-21  David Harrison  <harrison@apple.com>
2402
2403         Reviewed by hyatt.
2404
2405         <rdar://problem/5072460> CrashTracer: [USER] 1 crashes in Xcode at com.apple.ImageIO.framework: getBandProcPNG + 168
2406
2407         An NSData object was being alloc/init'd, then returned callers who cast the pointer as a
2408         CFDataRef, including calling CFRelease on it. The problem is that under garbage collection, the NS
2409         retain count is ignored (it's always 0), but the CFRetain and CFRelease are not ignored. This
2410         caused the object to be over-released. The solution that works in both GC and non-GC is to "transfer"
2411         the initial NS retain count to the CF retain count, using HardRetainWithNSRelease.
2412         
2413         The creator of the NSData was SharedBuffer::createNSData. The callers were PDFDocumentImage::dataChanged()
2414         and ImageSource::setData(). This particular crash involved the ImageSource::setData() case.
2415
2416         * platform/SharedBuffer.h:
2417         Declare createCFData().
2418         
2419         * platform/graphics/cg/ImageSourceCG.cpp:
2420         (WebCore::ImageSource::setData):
2421         Call createCFData instead of createNSData.
2422         
2423         * platform/graphics/cg/PDFDocumentImage.cpp:
2424         (WebCore::PDFDocumentImage::dataChanged):
2425         Call createCFData instead of createNSData.
2426         
2427        * platform/mac/SharedBufferMac.mm:
2428         (WebCore::SharedBuffer::createCFData):
2429         Implement createCFData(). Use HardRetainWithNSRelease for gc safety.
2430         
2431 2007-03-21  Mitz Pettel  <mitz@webkit.org>
2432
2433         Reviewed by Darin.
2434
2435         - fix http://bugs.webkit.org/show_bug.cgi?id=13145
2436           Regression: Scrollbar not resizing after display none
2437
2438         Test: fast/dynamic/view-overflow.html
2439
2440         * rendering/RenderView.cpp:
2441         (WebCore::RenderView::layout): Reset overflowHeight() and overflowWidth()
2442         before calling docHeight() and docWidth(), since the former act as a lower
2443         bound for the latter.
2444
2445 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
2446
2447         Reviewed by Beth Dakin.
2448         
2449         A little cleanup based work I've been doing on the SVG parsers.
2450
2451         * ksvg2/svg/SVGParserUtilities.h:
2452         (WebCore::skipString):
2453         * ksvg2/svg/SVGPreserveAspectRatio.cpp: Moved checkString into
2454         SVGParserUtilities.h, so it could be with all its friends. Renamed 
2455         "checkString" to "skipString" to match the rest of the code and to be 
2456         clear about which functions move the buffer pointer.
2457         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
2458         * ksvg2/svg/SVGTransformable.cpp:
2459         (WebCore::SVGTransformable::parseTransformAttribute): Changed gotos into 
2460         returns. Removed unnecessary magic number.
2461
2462 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
2463
2464         Reviewed by Beth Dakin.
2465         
2466         Fixed <rdar://problem/5078471> SVG rgb color parser runs past end of 
2467         buffer when running fuzzing test
2468
2469         * ksvg2/svg/SVGColor.cpp:
2470         (WebCore::parseNumberOrPercent): Check for past the end condition.
2471         (WebCore::SVGColor::colorFromRGBColorString): Reversed "read past end
2472         of buffer, then check if you're past the end" logic.
2473
2474 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
2475
2476         Reviewed by Beth Dakin.
2477         
2478         Fixed <rdar://problem/5079410> SVG path parser hangs, exhausts memory when 
2479         running fuzzer test
2480
2481         * ksvg2/svg/SVGParserUtilities.cpp:
2482         (WebCore::SVGPathParser::parseSVG): Don't assume that extra digits are
2483         always preceded by an 'M' or an 'm'.
2484
2485 2007-03-21  John Sullivan  <sullivan@apple.com>
2486
2487         Reviewed by Adam
2488         
2489         - fixed <rdar://problem/5079700> REGRESSION (r19702): Name/password aren't autofilled 
2490           or saved for .Mac homepage login
2491
2492         * page/mac/FrameMac.mm:
2493         (WebCore::Frame::searchForLabelsBeforeElement):
2494         don't count empty strings as valid results
2495
2496 2007-03-21  Justin Garcia  <justin.garcia@apple.com>
2497
2498         Reviewed by darin
2499
2500         * editing/markup.cpp:
2501         (WebCore::styleFromMatchedRulesAndInlineDecl): 
2502         Release the RefPtr to avoid increasing/decreasing
2503         the refcount unnecessarily.
2504         (WebCore::propertyMissingOrEqualToNone): Added and used
2505         instead of converting values to strings.
2506         (WebCore::elementHasTextDecorationProperty): 
2507         (WebCore::createMarkup):
2508
2509 2007-03-21  Justin Garcia  <justin.garcia@apple.com>
2510
2511         Reviewed by oliver
2512
2513         <rdar://problem/5075944> 
2514         REGRESSION: Partially selected underlined content pastes as plain text
2515         
2516         We stopped adding markup for all the ancestors
2517         of lastClosed up to the commonAncestorBlock
2518         because it was adding a lot of unnecessary markup.
2519         This caused us to lose underlining when copying a 
2520         partially selected underlined element (even though 
2521         we put all styles that the copied markup inherits 
2522         into a style span, because the text-decoration 
2523         isn't inheritable).
2524
2525         * editing/markup.cpp:
2526         (WebCore::styleFromMatchedRulesAndInlineDecl): Moved
2527         code here.
2528         (WebCore::elementHasTextDecorationProperty): Added.
2529         (WebCore::createMarkup): If the copied markup has a
2530         text-decoration because some common ancestor has
2531         a text-decoration property set, include that ancestor
2532         and all its descendants in the copied markup.
2533
2534 2007-03-21  Oliver Hunt  <oliver@apple.com>
2535
2536         Reviewed by Antti.
2537
2538         Update a few SVG attribute parsers to be more defensive against
2539         reading beyond the end of input. 
2540
2541         Fixes rdar://problem/5077218 -- SVG transform parser runs past
2542         end of buffer when running fuzzing test
2543
2544         * ksvg2/svg/SVGParserUtilities.cpp:
2545         (WebCore::SVGPathParser::parseSVG):
2546         * ksvg2/svg/SVGParserUtilities.h:
2547         (WebCore::skipOptionalSpacesOrDelimiter):
2548         * ksvg2/svg/SVGTransformable.cpp:
2549         (WebCore::parseTransformParamList):
2550         (WebCore::SVGTransformable::parseTransformAttribute):
2551
2552 2007-03-21  Alexey Proskuryakov  <ap@webkit.org>
2553
2554         Reviewed by Mitz.
2555
2556         http://bugs.webkit.org/show_bug.cgi?id=13140
2557         Crash after loading SVG fragment with XMLHttpRequest (Yosemite Map Geology Layer)
2558
2559         Test: svg/carto.net/frameless-svg-parse-error.html
2560
2561         * ksvg2/misc/SVGDocumentExtensions.cpp:
2562         (WebCore::SVGDocumentExtensions::reportError): Added a null check.
2563         (WebCore::SVGDocumentExtensions::reportWarning): Ditto.
2564
2565 2007-03-21  Beth Dakin  <bdakin@apple.com>
2566
2567         Reviewed by Geoff.
2568
2569         Fix for <rdar://problem/5072678> Crash in
2570         RenderLayer::scrollRectToVisible with MallocScribble enabled
2571
2572         I tried to fix this earlier today but my fix caused a regression
2573         scrolling through RSS pages. It turns out that sometimes scroll
2574         events need to propagate immediately, and sometimes they must be
2575         delayed or they risk deleting objects that are expected to be
2576         around after the event has propagated. Mitz's original fix made
2577         sheduleEvent() only delay events that happen during layout. This
2578         fix marks two other places in addition to layout where events also
2579         need to be delayed. These two places are places that were marked
2580         with FIXMEs that Mitz removed in his original patch. (There was a
2581         third FIXME in RenderLayer::updateScrollInfoAfterLayout() but that
2582         case is only called through layout and is covered by Mitz's
2583         original patch.)
2584
2585         * page/FrameView.cpp:
2586         (WebCore::FrameView::~FrameView): Added assertion.
2587         (WebCore::FrameView::layout): Call new functions to increment and 
2588         decrement the queued events count.
2589         (WebCore::FrameView::pauseScheduledEvents):
2590         (WebCore::FrameView::resumeScheduledEvents): Decrement queued 
2591         events count and dispatch events if the count has zeroed.
2592         * page/FrameView.h:
2593         * rendering/RenderLayer.cpp:
2594         (WebCore::RenderLayer::scrollRectToVisible):
2595         (WebCore::Marquee::start):
2596
2597 2007-03-21  Mitz Pettel  <mitz@webkit.org>
2598
2599         Reviewed by John Sullivan.
2600
2601         - fix http://bugs.webkit.org/show_bug.cgi?id=13130
2602           REGRESSION: Sometimes a frame resizer keeps following the mouse after mouseup
2603
2604         * rendering/RenderFrameSet.cpp:
2605         (WebCore::RenderFrameSet::userResize): Reordered the code to allow resizing
2606         to be terminated by a mouseup event regardless of whether the frameset needs
2607         layout.
2608
2609 2007-03-20  Anders Carlsson  <acarlsson@apple.com>
2610
2611         Reviewed by Oliver.
2612
2613         <rdar://problem/5077252> 
2614         In NetNewsWire 2.1.1 and 3.0d62, a crash occurs after triple-clicking a link on the page
2615         
2616         * loader/FrameLoader.cpp:
2617         (WebCore::FrameLoader::load):
2618         Move the m_inStopAllLoaders check to the load function that's common for loading a request or substitute data.
2619
2620 2007-03-20  Brady Eidson  <beidson@apple.com>
2621
2622         Reviewed by Anders.
2623
2624         <rdar://problem/5073391> and http://bugs.webkit.org/show_bug.cgi?id=13137
2625
2626         Crash in IconDatabase when private browsing is enabled.
2627
2628         The problem was caused by http://trac.webkit.org/projects/webkit/changeset/20182 
2629         which changed many uses of char[] and Vector<char> to SharedBuffer.  The patch
2630         tended to literally replace a Vector<char> with RefPtr<SharedBuffers> but forgot
2631         to enforce the concept that Vector<char>'s always exist, whereas RefPtr<SharedBuffers>
2632         can be null.  This led to derefs.
2633
2634         I took the opportunity to rework the iconDB functions to live in a SharedBuffer 
2635         world, as that didn't exist when they were originally written - now they just return
2636         SharedBuffers instead of taking a Vector<char>& as a parameter
2637
2638         * loader/icon/IconDatabase.cpp:
2639         (WebCore::IconDatabase::imageDataForIconURL): Return a SharedBuffer
2640         (WebCore::IconDatabase::iconForPageURL): Null check the SharedBuffer before asking
2641           it if it's empty
2642         (WebCore::IconDatabase::imageDataForIconURLQuery): Return a new SharedBuffer
2643
2644         * loader/icon/IconDatabase.h: Return SharedBuffer's instead of taking Vector<char>&'s
2645
2646 2007-03-20  Adam Roben  <aroben@apple.com>
2647
2648         Rubberstamped by Adele.
2649
2650         Roll out r20348 because it was causing crashes.
2651
2652         * page/FrameView.cpp:
2653         (WebCore::FrameViewPrivate::FrameViewPrivate):
2654         (WebCore::FrameView::layout):
2655         (WebCore::FrameView::scheduleEvent):
2656
2657 2007-03-20  Timothy Hatcher  <timothy@apple.com>
2658
2659         Reviewed by Kevin Decker.
2660
2661         Rolling out part of r19828 that caused a scrolling regression in Mail.
2662
2663         <rdar://problem/4820817> Message jumps around when trying to select text
2664
2665         * platform/mac/ScrollViewMac.mm:
2666         (WebCore::ScrollView::visibleContentRect):
2667         (WebCore::ScrollView::updateContents):
2668
2669 2007-03-20  Brady Eidson  <beidson@apple.com>
2670
2671         Reviewed by John
2672
2673         <rdar://5071341> - Crash in IconLoader::finishLoading()
2674         
2675         Though the reproducibility of the crash is still elusive, there's been a crasher likely uncovered 
2676         Hyatt's recent caching changings to the IconLoader.  This crash tends to hit on sites without favicons,
2677         that serve up complex 404 pages, often when the load is cancelled or redirected.  Occasionally, it *seems*
2678         the IconLoader is getting failed/cancelled twice.
2679         
2680         This patch adds some assertions and a "fail gracefully in a release build" check that will have to
2681         serve us until we know more about the cause.
2682
2683         * loader/icon/IconLoader.cpp:
2684         (WebCore::IconLoader::didFail): Add an assertion to catch this case
2685         (WebCore::IconLoader::finishLoading): Add an assertion to catch the case, and fail
2686           gracefully in debug builds.  Also add an efficiency check to not commit to the DB if there is no
2687           IconURL
2688
2689 2007-03-20  Antti Koivisto  <antti@apple.com>
2690
2691         Reviewed by Darin.
2692
2693         - fix http://bugs.webkit.org/show_bug.cgi?id=10747
2694         REGRESSION: Using two fingers on a trackpad to scroll inside a text area makes the whole page move
2695         <rdar://problem/5045710>
2696         
2697         Eat smooth scroll events in WebCore if pointer is over scrollable area. Not
2698         really a good fix, smooth scrolling should be supported properly. It should do for now.
2699
2700         * page/EventHandler.cpp:
2701         (WebCore::EventHandler::handleWheelEvent):
2702         * rendering/RenderListBox.cpp:
2703         (WebCore::RenderListBox::isScrollable):
2704         * rendering/RenderListBox.h:
2705         * rendering/RenderObject.cpp:
2706         (WebCore::RenderObject::isScrollable):
2707         * rendering/RenderObject.h:
2708         * rendering/RenderTextControl.cpp:
2709         (WebCore::RenderTextControl::isScrollable):
2710         * rendering/RenderTextControl.h:
2711
2712 2007-03-20  Beth Dakin  <bdakin@apple.com>
2713
2714         Reviewed by Geoff.
2715
2716         Covered by existing test case.
2717
2718         Fix for <rdar://problem/5072678> Crash in 
2719         RenderLayer::scrollRectToVisible with MallocScribble enabled
2720
2721         This removes some code that was added with http://bugs.webkit.org/
2722         show_bug.cgi?id=8360. This code was not needed to fix that bug, but 
2723         the idea behind it was that there are times when it is safe for 
2724         scheduleEvent() to propagate the event immediately. The 
2725         MallocScribble crash revealed that this assumption was a bit too 
2726         broad; the cause of the crash was that we were propagating events 
2727         immediately when it was not safe. Mitz and I discussed this online 
2728         and we agree that the safest solution is to revert to the old 
2729         behavior here, and always delay the propagation of the event. 
2730
2731         * page/FrameView.cpp:
2732         (WebCore::FrameViewPrivate::FrameViewPrivate):
2733         (WebCore::FrameView::layout):
2734         (WebCore::FrameView::scheduleEvent):
2735
2736 2007-03-20  Brady Eidson  <beidson@apple.com>
2737
2738         Reviewed by John Sullivan
2739
2740         Add some very helpful logging to the IconLoader's SubresourceLoaderClient impl.
2741
2742         * loader/icon/IconLoader.cpp:
2743         (WebCore::IconLoader::didReceiveResponse):
2744         (WebCore::IconLoader::didReceiveData):
2745         (WebCore::IconLoader::didFail):
2746         (WebCore::IconLoader::didFinishLoading):
2747
2748 2007-03-20  Justin Garcia  <justin.garcia@apple.com>
2749
2750         Reviewed by darin
2751
2752         <rdar://problem/5071074> 
2753         REGRESSION: Links are pasted as plain text at certain positions
2754         
2755         moveParagraphs calls createMarkup without annotation, which leaves
2756         out anchor elements that aren't fully selected.
2757
2758         * editing/CompositeEditCommand.cpp:
2759         (WebCore::CompositeEditCommand::moveParagraphs): We don't want 
2760         createMarkup to do full annotation here.  Doing so could include 
2761         special ancestor blocks, which would prevent the copied content 
2762         from appearing in the destination paragraph when it's re-inserted.  
2763         Annotation would also inline styles from style sheets,  which is 
2764         unnecessary because the content is being moved to the same 
2765         document it's being moved from.
2766         Added a new bool to createMarkup that when true allows markup for 
2767         special ancestors as long as they are inline when annotation is off.
2768         * editing/markup.cpp:
2769         (WebCore::createMarkup): Don't set specialCommonAncestor if annotation
2770         is off, unless it's inline and we've been told it's ok to include such
2771         elements.
2772         * editing/markup.h:
2773
2774 2007-03-20  Alexey Proskuryakov  <ap@webkit.org>
2775
2776         Reviewed by Darin.
2777
2778         http://bugs.webkit.org/show_bug.cgi?id=12497
2779         Implement XPath result ordering.
2780
2781         XPath::NodeVector typedef is replaced with a real XPath::NodeSet class that knows how 
2782         to sort itself, and can remember whether it has been already sorted.
2783
2784         * CMakeLists.txt:
2785         * WebCore.pro:
2786         * WebCore.xcodeproj/project.pbxproj:
2787         * WebCoreSources.bkl:
2788         Added XPathNodeSet files.
2789
2790         * xml/XPathExpression.cpp: Fixed includes.
2791
2792         * xml/XPathFunctions.cpp:
2793         (WebCore::XPath::FunId::evaluate): Mark the resulting node-set as unsorted.
2794         (WebCore::XPath::FunLocalName::evaluate): Replacing NodeVector with NodeSet.
2795         (WebCore::XPath::FunNamespaceURI::evaluate): Ditto.
2796         (WebCore::XPath::FunName::evaluate): Ditto.
2797         (WebCore::XPath::FunCount::evaluate): Ditto.
2798         (WebCore::XPath::FunSum::evaluate): Ditto.
2799
2800         * xml/XPathNodeSet.cpp: Added.
2801         (WebCore::XPath::parentWithDepth):
2802         (WebCore::XPath::sortBlock):
2803         (WebCore::XPath::NodeSet::sort): Sort the node-set in document order.
2804         (WebCore::XPath::NodeSet::reverse): Reverse the order (useful for making axes such as 
2805         parent or ancestor sorted).
2806         (WebCore::XPath::NodeSet::firstNode): Returns the first node in document order; currently
2807         implemented via fully sorting the node-set, but this can obviously be optimized.
2808         (WebCore::XPath::NodeSet::anyNode): Added for symmetry with firstNode().
2809         
2810         * xml/XPathNodeSet.h: Added.
2811         (WebCore::XPath::NodeSet::NodeSet):
2812         (WebCore::XPath::NodeSet::operator=):
2813         (WebCore::XPath::NodeSet::size):
2814         (WebCore::XPath::NodeSet::isEmpty):
2815         (WebCore::XPath::NodeSet::operator[]):
2816         (WebCore::XPath::NodeSet::reserveCapacity):
2817         (WebCore::XPath::NodeSet::clear):
2818         (WebCore::XPath::NodeSet::swap):
2819         (WebCore::XPath::NodeSet::append):
2820         (WebCore::XPath::NodeSet::markSorted):
2821         (WebCore::XPath::NodeSet::isSorted):
2822         Most of these methods just call Vector counterparts. 
2823
2824         * xml/XPathParser.cpp: Updated the copyright notice.
2825
2826         * xml/XPathPath.cpp:
2827         (WebCore::XPath::Filter::evaluate): Replacing NodeVector with NodeSet.
2828         (WebCore::XPath::Path::evaluate): Ditto.
2829         (WebCore::XPath::LocationPath::evaluate): Replacing NodeVector with NodeSet. This function
2830         always marks the result as unsorted, because it is hard to tell whether a step breaks node order.
2831         Identifying and implementing special cases when it is not necessary to do so is an important
2832         future optimization.
2833
2834         * xml/XPathPath.h: Replacing NodeVector with NodeSet.
2835         * xml/XPathPredicate.cpp:
2836         (WebCore::XPath::EqTestOp::compare): Replacing NodeVector with NodeSet.
2837         (WebCore::XPath::Union::evaluate): Replacing NodeVector with NodeSet. Currently, Union just
2838         marks the result as unordered; we can consider using merge sort to avoid this.
2839
2840         * xml/XPathResult.cpp:
2841         (WebCore::XPathResult::XPathResult): Replacing NodeVector with NodeSet.
2842         (WebCore::XPathResult::singleNodeValue): Ditto.
2843         (WebCore::XPathResult::snapshotLength): Ditto.
2844         (WebCore::XPathResult::iterateNext): Ditto.
2845         (WebCore::XPathResult::snapshotItem): Ditto.
2846         (WebCore::XPathResult::convertTo): Ditto. Sort the result when requested to.
2847
2848         * xml/XPathResult.h: Replacing NodeVector with NodeSet.
2849
2850         * xml/XPathStep.cpp:
2851         (WebCore::XPath::Step::evaluate): If the input is not sorted, mark the output as such, too.
2852         (WebCore::XPath::Step::nodesInAxis): Fixed a number of bugs when enumerating with an
2853         attribute context node.
2854         (WebCore::XPath::Step::nodeTestMatches): Replacing NodeVector with NodeSet.
2855         * xml/XPathStep.h: Ditto.
2856
2857         * xml/XPathUtil.cpp:
2858         (WebCore::XPath::isValidContextNode): XPath data model doesn't put attribute data into child
2859         nodes, so passing such node as a context could cause problems.
2860
2861         * xml/XPathUtil.h: Removed NodeVector typedef.
2862
2863         * xml/XPathValue.cpp:
2864         (WebCore::XPath::Value::Value):
2865         (WebCore::XPath::Value::toNodeSet):
2866         (WebCore::XPath::Value::toBoolean):
2867         (WebCore::XPath::Value::toNumber):
2868         (WebCore::XPath::Value::toString):
2869         * xml/XPathValue.h:
2870         (WebCore::XPath::Value::):
2871         (WebCore::XPath::Value::isNodeSet):
2872         Replacing NodeVector with NodeSet.
2873
2874 2007-03-21  Mark Rowe  <mrowe@apple.com>
2875
2876         Build fix.
2877
2878         * bindings/objc/WebScriptObject.mm:
2879         (-[WebScriptObject methodForSelector:]):
2880         (-[WebScriptObject respondsToSelector:]):
2881
2882 2007-03-21  Mark Rowe  <mrowe@apple.com>
2883
2884         Reviewed by Tim Hatcher.
2885
2886         Fix for http://bugs.webkit.org/show_bug.cgi?id=13129.
2887         Bug 13129: Democracy Player dies in NSException from WebScriptObject on startup.
2888
2889         Some cross-language scripting bridges use the presence of -(int)count to determine
2890         whether to treat objects as sequence-like.  All WebScriptObject's exposed this method
2891         which lead to non-collection WebScriptObject's being mishandled by PyObjC.  We now
2892         expose -count only when the object we wrap looks like a collection from a JavaScript
2893         point of view (eg, it has a length property).
2894
2895         * bindings/objc/WebScriptObject.mm:
2896         (-[WebScriptObject _shouldRespondToCount]):
2897         (-[WebScriptObject methodForSelector:]):
2898         (-[WebScriptObject respondsToSelector:]):
2899         (-[WebScriptObject _count]):
2900         * bindings/objc/WebScriptObjectPrivate.h:
2901
2902 2007-03-20  Darin Adler  <darin@apple.com>
2903
2904         * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseMoveEvent):
2905         Fix obvious typo in the change from last night -- forgot to assign to the variable.
2906
2907 2007-03-20  Dave Hyatt  <hyatt@apple.com>
2908
2909         Refactor fonts a bit for portability.
2910        
2911         Reviewed by aroben
2912
2913         * platform/Font.cpp:
2914         (WebCore::Font::drawSimpleText):
2915         (WebCore::Font::drawGlyphBuffer):
2916         (WebCore::Font::floatWidthForSimpleText):
2917         * platform/Font.h:
2918         * platform/FontData.h:
2919         (WebCore::FontData::isSystemFont):
2920         (WebCore::FontData::scriptCache):
2921         * platform/GlyphBuffer.h:
2922         (WebCore::GlyphBuffer::add):
2923
2924 2007-03-20  Anders Carlsson  <acarlsson@apple.com>
2925
2926         Reviewed by Adam.
2927
2928         Stub out a couple of CFNetwork backend functions.
2929         
2930         * platform/network/ResourceHandle.h:
2931
2932 2007-03-19  Oliver Hunt  <oliver@apple.com>
2933
2934         Reviewed by Ada.
2935
2936         Protect against possibility of JS detaching a frame (and losing its view)
2937         midway through a mouse move.
2938
2939         * page/EventHandler.cpp:
2940         (WebCore::EventHandler::handleMouseMoveEvent):
2941
2942 2007-03-19  Alexey Proskuryakov  <ap@webkit.org>
2943
2944         Reviewed by Darin.
2945
2946         http://bugs.webkit.org/show_bug.cgi?id=13107
2947         XPath should raise an exception when trying to parse an unknown function
2948
2949         Test: fast/xpath/invalid-functions.html
2950
2951         * xml/XPathFunctions.cpp:
2952         (WebCore::XPath::createFunction): Return 0 if the function couldn't be created.
2953         * xml/XPathGrammar.y: Handle nulls returned from createFunction().
2954
2955 2007-03-19  Adele Peterson  <adele@apple.com>
2956
2957         Reviewed by Beth.
2958
2959         Fix for http://bugs.webkit.org/show_bug.cgi?id=13087
2960         <rdar://problem/5064316> REGRESSION: Allow setting the checked attribute in js and in markup for unnamed radio buttons (dominos.com)
2961
2962         Test: fast/forms/radio_checked_name.html
2963
2964         We were matching a WinIE quirk that does not allow a user to check and uncheck an unnamed radio button.  But they still
2965         allow the checked attribute to be set in html, and changed in javascript.  So this change matches that behavior.
2966
2967         * html/HTMLInputElement.cpp:
2968         (WebCore::HTMLInputElement::parseMappedAttribute): We no longer need a special call to setChecked when parsing the name
2969          attribute, since we setChecked will now work with unnamed radio buttons.
2970         (WebCore::HTMLInputElement::preDispatchEventHandler): Added comment.
2971         (WebCore::HTMLInputElement::setChecked): Don't check for the unnamed radio button case here.
2972         (WebCore::HTMLInputElement::postDispatchEventHandler): Don't call setChecked for unnamed radio buttons.
2973         (WebCore::HTMLInputElement::defaultEventHandler): ditto.
2974
2975 2007-03-19  Adam Roben  <aroben@apple.com>
2976
2977         Rubberstamped by Oliver.
2978
2979         * bridge/JavaScriptStatistics.cpp: Added missing header for
2980         correctness.
2981
2982 2007-03-19  Andrew Wellington  <proton@wiretapped.net>
2983
2984         Reviewed by Maciej.
2985
2986         Really set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html)
2987
2988         * WebCore.xcodeproj/project.pbxproj:
2989
2990 2007-03-19  Justin Garcia  <justin.garcia@apple.com>
2991
2992         Reviewed by darin
2993         
2994         <rdar://problem/5071074> 
2995         REGRESSION: Links that aren't fully selected copy and paste as only text
2996         
2997         We stopped adding markup for all commonAncestorBlocks
2998         and the ancestors of lastClosed up to them because it 
2999         was adding a lot of unnecessary markup.
3000
3001         * editing/markup.cpp:
3002         (WebCore::createMarkup): Also include markup for nodes
3003         up to an enclosing anchor.  Cleaned up the code for
3004         including special common ancestors a bit.
3005
3006 2007-03-19  Nikolas Zimmermann  <zimmermann@kde.org>
3007
3008         Reviewed by Lars Knoll.
3009
3010         Fix crash when opening a SVG document which contains SVG elements, but no <svg> root element.
3011         Moving the mouse was crashing WebKit. Fixes svg/hixie/dynamic/006.xml.
3012
3013         * rendering/RenderObject.cpp:
3014         (WebCore::RenderObject::updateHitTestResult):
3015
3016 2007-03-19  Mitz Pettel  <mitz@webkit.org>
3017
3018         Reviewed by Hyatt.
3019
3020         - fix http://bugs.webkit.org/show_bug.cgi?id=13117
3021         REGRESSION (r14658): Flickering text fields when updating via javascript
3022
3023         * page/Frame.cpp:
3024         (WebCore::Frame::forceLayout): Added a flag to allow partial relayout.
3025         * page/Frame.h:
3026         * page/mac/WebCoreFrameBridge.mm:
3027         (-[WebCoreFrameBridge forceLayoutAdjustingViewSize:]): Allow partial relayout
3028         if not adjusting view size.
3029         (-[WebCoreFrameBridge needsLayout]): Changed to check for pending subtree
3030         layout instead of just whether the root needs layout.
3031
3032 2007-03-18  Nikolas Zimmermann  <zimmermann@kde.org>
3033
3034         Reviewed by Maciej.
3035
3036         Make JS function calls on POD-types (ie. SVGLength) take effect.
3037         Calling ie. newValueInSpecifiedUnits on SVGLength works as expected.
3038
3039         This worked fine before we switched to SVGLength POD type, so this
3040         can be considered as P1 regression fix.
3041
3042         Partly fix svg/hixie/dynamic/005-broken.svg. We match Opera now though
3043         it's not yet completly fixed. Setting baseVal attribute on SVGAnimatedString
3044         doesn't work as expected - needs a seperated fix.
3045
3046         * bindings/scripts/CodeGeneratorJS.pm:
3047
3048 2007-03-19  Adele Peterson  <adele@apple.com>
3049
3050         Reviewed by Adam.
3051
3052         Adding comments and a little cleanup from my last checkin.
3053
3054         * html/HTMLSelectElement.cpp:
3055         (WebCore::HTMLSelectElement::setSelectedIndex): Removed commented out assert.  Added comment about how we use onChange.
3056         (WebCore::HTMLSelectElement::selectAll): Added comment about how we use saveLastSelection and onChange.
3057         (WebCore::HTMLSelectElement::dispatchFocusEvent): ditto.
3058         (WebCore::HTMLSelectElement::dispatchBlurEvent): ditto.
3059         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): ditto.
3060         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto.
3061         (WebCore::HTMLSelectElement::menuListOnChange): Added assert that usesMenuList() is true.
3062         (WebCore::HTMLSelectElement::listBoxOnChange): Added assert that usesMenuList() is false.
3063         (WebCore::HTMLSelectElement::saveLastSelection): Added early return for menu lists.
3064
3065 2007-03-19  Mitz Pettel  <mitz@webkit.org>
3066
3067         Reviewed by Tim Hatcher.
3068
3069         - fix http://bugs.webkit.org/show_bug.cgi?id=13091
3070           REGRESSION (r20075): Wrong text style and pixel break in Apple Store Locator HUD
3071
3072         Test: fast/innerHTML/additional-inline-style.html
3073
3074         * editing/markup.cpp:
3075         (WebCore::startMarkup): Changed to add inline style based on CSS rules only
3076         in AnnotateForInterchange mode.
3077
3078 2007-03-19  Zack Rusin  <zrusin@trolltech.com>
3079
3080         Compile fix.
3081
3082         * platform/qt/ScrollViewQt.cpp:
3083         (WebCore::ScrollView::update):
3084
3085 2007-03-19  Adam Roben  <aroben@apple.com>
3086
3087         Reviewed by Hyatt and Maciej.
3088
3089         Renamed WebCoreJavaScript to JavaScriptStatistics and made it C++ as
3090         part of <rdar://problem/5071653>.
3091
3092         All layout tests pass.
3093
3094         * WebCore.exp: Updated.
3095         * WebCore.xcodeproj/project.pbxproj: Updated.
3096         * bridge/JavaScriptStatistics.cpp: Moved from
3097         bridge/mac/WebCoreJavaScript.mm, and converted to C++.
3098         (WebCore::collect):
3099         (WebCore::JavaScriptStatistics::objectCount):
3100         (WebCore::JavaScriptStatistics::interpreterCount):
3101         (WebCore::JavaScriptStatistics::protectedObjectCount):
3102         (WebCore::JavaScriptStatistics::rootObjectTypeCounts):
3103         (WebCore::JavaScriptStatistics::garbageCollect):
3104         (WebCore::JavaScriptStatistics::garbageCollectOnAlternateThread):
3105         (WebCore::JavaScriptStatistics::shouldPrintExceptions):
3106         (WebCore::JavaScriptStatistics::setShouldPrintExceptions):
3107         * bridge/JavaScriptStatistics.h: Added.
3108         * bridge/mac/WebCoreJavaScript.h: Removed.
3109         * bridge/mac/WebCoreJavaScript.mm: Removed.
3110
3111 2007-03-18  Maciej Stachowiak  <mjs@apple.com>
3112
3113         Reviewed by Mark.
3114
3115         - avoid static construction (and global variable access) in a smarter, more portable way,
3116         to later enable MUTLI_THREAD mode to work on other platforms and compilers.
3117         
3118         * bindings/js/JSCustomXPathNSResolver.cpp:
3119         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
3120         * bindings/js/JSHTMLInputElementBase.cpp:
3121         (WebCore::JSHTMLInputElementBaseFunction::JSHTMLInputElementBaseFunction):
3122         * bindings/js/JSHTMLOptionElementConstructor.cpp:
3123         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
3124         * bindings/js/JSXMLHttpRequest.cpp:
3125         (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
3126         * bindings/js/JSXSLTProcessor.cpp:
3127         (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
3128         * bindings/js/kjs_dom.cpp:
3129         (KJS::DOMNamedNodeMap::getOwnPropertySlot):
3130         (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
3131         * bindings/js/kjs_events.cpp:
3132         (KJS::JSAbstractEventListener::handleEvent):
3133         * bindings/js/kjs_html.cpp:
3134         (KJS::HTMLElementFunction::HTMLElementFunction):
3135         (KJS::JSHTMLCollection::getOwnPropertySlot):
3136         * bindings/js/kjs_window.cpp:
3137         (KJS::ScheduledAction::execute):
3138         * bindings/objc/WebScriptObject.mm:
3139         * bindings/scripts/CodeGeneratorJS.pm:
3140
3141 2007-03-18  Andrew Wellington  <proton@wiretapped.net>
3142
3143         Reviewed by Mark Rowe
3144
3145         Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html)
3146
3147         * WebCore.xcodeproj/project.pbxproj:
3148
3149 2007-03-18  David Hyatt  <hyatt@apple.com>
3150
3151         Fix for REGRESSION bug 13108, frame borders being painted when they shouldn't be.  Rework both frame borders
3152         and resizing to be more like other browsers.
3153
3154         Reviewed by ggaren
3155
3156         fast/frames/no-frame-borders.html
3157
3158         * html/HTMLFrameElement.cpp:
3159         (WebCore::HTMLFrameElement::HTMLFrameElement):
3160         (WebCore::HTMLFrameElement::attach):
3161         (WebCore::HTMLFrameElement::parseMappedAttribute):
3162         * html/HTMLFrameElement.h:
3163         (WebCore::HTMLFrameElement::hasFrameBorder):
3164         * html/HTMLFrameElementBase.cpp:
3165         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
3166         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
3167         * html/HTMLFrameElementBase.h:
3168         * html/HTMLFrameSetElement.cpp:
3169         (WebCore::HTMLFrameSetElement::attach):
3170         * html/HTMLFrameSetElement.h:
3171         (WebCore::HTMLFrameSetElement::hasFrameBorder):
3172         * html/HTMLIFrameElement.cpp:
3173         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
3174         * rendering/RenderFrame.cpp:
3175         (WebCore::RenderFrame::edgeInfo):
3176         * rendering/RenderFrame.h:
3177         * rendering/RenderFrameSet.cpp:
3178         (WebCore::RenderFrameSet::paint):
3179         (WebCore::RenderFrameSet::GridAxis::resize):
3180         (WebCore::RenderFrameSet::fillFromEdgeInfo):
3181         (WebCore::RenderFrameSet::computeEdgeInfo):
3182         (WebCore::RenderFrameSet::edgeInfo):
3183         (WebCore::RenderFrameSet::layout):
3184         (WebCore::RenderFrameSet::startResizing):
3185         (WebCore::RenderFrameSet::continueResizing):
3186         (WebCore::RenderFrameSet::canResizeRow):
3187         (WebCore::RenderFrameSet::canResizeColumn):
3188         (WebCore::RenderFrameSet::splitPosition):
3189         (WebCore::RenderFrameSet::hitTestSplit):
3190         (WebCore::RenderFrameSet::dump):
3191         * rendering/RenderFrameSet.h:
3192         (WebCore::):
3193         (WebCore::FrameEdgeInfo::FrameEdgeInfo):
3194         (WebCore::FrameEdgeInfo::preventResize):
3195         (WebCore::FrameEdgeInfo::allowBorder):
3196         (WebCore::FrameEdgeInfo::setPreventResize):
3197         (WebCore::FrameEdgeInfo::setAllowBorder):
3198
3199 2007-03-19  Mark Rowe  <mrowe@apple.com>
3200
3201         Rubber-stamped by Brady.
3202
3203         Update references to bugzilla.opendarwin.org with bugs.webkit.org.
3204
3205         * ChangeLog:
3206         * WebCore.vcproj/WebCore/build-generated-files.sh:
3207         * manual-tests/ATSU-bad-layout.html:
3208         * manual-tests/accidental-strict-mode.html:
3209         * manual-tests/applet-param-no-name.html:
3210         * manual-tests/bidi-parens.html:
3211         * manual-tests/bugzilla-3855.html:
3212         * manual-tests/bugzilla-4840.html:
3213         * manual-tests/bugzilla-6821.html:
3214         * manual-tests/containing-block-position-chage.html:
3215         * manual-tests/contenteditable-link.html:
3216         * manual-tests/css3-cursor-fallback-quirks.html:
3217         * manual-tests/css3-cursor-fallback-strict.html:
3218         * manual-tests/custom-cursors.html:
3219         * manual-tests/dictionary-scrolled-iframe.html:
3220         * manual-tests/dom-manipulation-on-resize.html:
3221         * manual-tests/drag-image-to-address-bar.html:
3222         * manual-tests/empty-link-target.html:
3223         * manual-tests/empty-title-popup.html:
3224         * manual-tests/first-line-style-crash.html:
3225         * manual-tests/invalid-mouse-event.html:
3226         * manual-tests/left-overflow-repaint.html:
3227         * manual-tests/linkjump-3.html:
3228         * manual-tests/log-keypress-events.html:
3229         * manual-tests/named-window-blank-target.html:
3230         * manual-tests/plain-text-paste.html:
3231         * manual-tests/plugin-controller-datasource.html:
3232         * manual-tests/pre-tab-selection-rect.html:
3233         * manual-tests/redirection-target.html:
3234         * manual-tests/redraw-page-cache-visited-links.html:
3235         * manual-tests/reset-initiatedDrag.html:
3236         * manual-tests/resources/named-window-blank-target-step2.html:
3237         * manual-tests/resources/named-window-blank-target-step3.html:
3238         * manual-tests/resources/named-window-blank-target-step4.html:
3239         * manual-tests/resources/redraw-page-cache-visited-links-2.html:
3240         * manual-tests/scrollbar-hittest.html:
3241         * manual-tests/scrollbar-hittest2.html:
3242         * manual-tests/subview-click-assertion.html:
3243         * manual-tests/tabbing-input-google.html:
3244         * manual-tests/text-field-autoscroll.html:
3245         * manual-tests/textarea-after-stylesheet-link.html:
3246         * manual-tests/textarea-focus.html:
3247         * manual-tests/whitespace-pre-affinity.html:
3248
3249 2007-03-18  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3250
3251         Not reviewed - gdk build fix.
3252
3253         * platform/gdk/ScrollViewGdk.cpp:
3254         (WebCore::ScrollView::update): add a stub
3255
3256 2007-03-18  Brady Eidson  <beidson@apple.com>
3257
3258         Reviewed by Hyatt
3259
3260         http://bugs.webkit.org/show_bug.cgi?id=13111
3261         When stopped a load before it completes, partial images become the 
3262         broken image icon
3263
3264         * loader/loader.cpp:
3265         (WebCore::Loader::didFail): Split off into a method that knows the 
3266           difference between failed and cancelled.  If a load is cancelled,
3267           don't call error() on the object - only remove it from the cache
3268         (WebCore::Loader::cancelRequests): Call didFail(loader, true)
3269         * loader/loader.h: Added didFail(SubresourceLoader*, bool cancelled)
3270
3271 2007-03-18  Mitz Pettel  <mitz@webkit.org>
3272
3273         Reviewed by Adele.
3274
3275         - fix http://bugs.webkit.org/show_bug.cgi?id=13101
3276           REGRESSION (NativeTextField): Specifying word-wrap:break-word makes text field wrap
3277
3278         Test: fast/forms/input-text-word-wrap.html
3279
3280         * rendering/RenderTextControl.cpp:
3281         (WebCore::RenderTextControl::createInnerTextStyle): Force the inner block to
3282         'word-wrap:normal'.
3283
3284 2007-03-18  Dan Waylonis  <waylonis@mac.com>
3285
3286         Reviewed by Tim Hatcher.
3287
3288         Fix http://bugs.webkit.org/show_bug.cgi?id=13005
3289         Bug 13005: WebScriptObject +throwException needs NULL check.
3290
3291         Add checking for NULL interpreter before throwing exception.
3292
3293         * bindings/objc/WebScriptObject.mm:
3294         (+[WebScriptObject throwException:]):
3295
3296 2007-03-18  Geoffrey Garen  <ggaren@apple.com>
3297
3298         Reviewed by Oliver Hunt.
3299         
3300         Fixed http://bugs.webkit.org/show_bug.cgi?id=13106
3301         REGRESSION: Incomplete document.all implementation breaks abtelectronics.com 
3302         (Style Change Through JavaScript Blanks Content)
3303         
3304         When indexing into collections, treat the empty string as an invalid argument,
3305         instead of the number 0.
3306
3307         * bindings/js/kjs_html.cpp:
3308         (KJS::JSHTMLCollection::getOwnPropertySlot):
3309         (KJS::JSHTMLCollection::callAsFunction):
3310         (KJS::JSHTMLCollectionPrototypeFunction::callAsFunction):
3311
3312 2007-03-18  David Hyatt  <hyatt@apple.com>
3313
3314         Use fillRect instead of drawLine, since drawLine has some odd behavior (it's only used for borders).
3315
3316         Reviewed by aroben
3317
3318         * platform/graphics/IntRect.h:
3319         * rendering/RenderFrameSet.cpp:
3320         (WebCore::RenderFrameSet::paintColumnBorder):
3321         (WebCore::RenderFrameSet::paintRowBorder):
3322
3323 2007-03-18  David Hyatt  <hyatt@apple.com>
3324
3325         Change the frameborder color to be light gray for framesets.
3326
3327         Reviewed by aroben
3328
3329         * rendering/RenderFrameSet.cpp:
3330         (WebCore::borderFillColor):
3331         (WebCore::RenderFrameSet::paintColumnBorder):
3332         (WebCore::RenderFrameSet::paintRowBorder):
3333
3334 2007-03-18  David Hyatt  <hyatt@apple.com>
3335
3336         Make iframes work properly with frameborder="0".
3337
3338         Reviewed by aroben
3339
3340         * html/HTMLIFrameElement.cpp:
3341         (WebCore::HTMLIFrameElement::mapToEntry):
3342         (WebCore::HTMLIFrameElement::parseMappedAttribute):
3343
3344 2007-03-18  David Hyatt  <hyatt@apple.com>
3345
3346         Add a 2px border by default to <iframe>s for compatibility with other browsers.
3347
3348         Reviewed by aroben
3349
3350         * css/html4.css:
3351
3352 2007-03-18  David Hyatt  <hyatt@apple.com>
3353
3354         Move frame borders out of WebKit and into WebCore.
3355
3356         Reviewed by aroben, olliej
3357
3358         * bridge/mac/FrameViewMac.mm:
3359         * css/html4.css:
3360         * html/HTMLFrameSetElement.cpp:
3361         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
3362         (WebCore::HTMLFrameSetElement::mapToEntry):
3363         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
3364         (WebCore::HTMLFrameSetElement::attach):
3365         * html/HTMLFrameSetElement.h:
3366         (WebCore::HTMLFrameSetElement::hasBorderColor):
3367         * page/FrameView.cpp:
3368         (WebCore::FrameViewPrivate::FrameViewPrivate):
3369         * page/FrameView.h:
3370         * page/mac/WebCoreFrameBridge.h:
3371         * platform/graphics/IntRect.h:
3372         (WebCore::IntRect::topLeft):
3373         (WebCore::IntRect::topRight):
3374         (WebCore::IntRect::bottomLeft):
3375         (WebCore::IntRect::bottomRight):
3376         * rendering/RenderFrame.cpp:
3377         (WebCore::RenderFrame::viewCleared):
3378         * rendering/RenderFrameSet.cpp:
3379         (WebCore::borderStartEdgeColor):
3380         (WebCore::borderEndEdgeColor):
3381         (WebCore::RenderFrameSet::paintColumnBorder):
3382         (WebCore::RenderFrameSet::paintRowBorder):
3383         (WebCore::RenderFrameSet::paint):
3384         * rendering/RenderFrameSet.h:
3385         * rendering/RenderPartObject.cpp:
3386         (WebCore::RenderPartObject::viewCleared):
3387         * rendering/RenderView.cpp:
3388         (WebCore::RenderView::repaintViewRectangle):
3389
3390 2007-03-17  David Hyatt  <hyatt@apple.com>
3391
3392         Make onload do an explicit paint when a top-level document is ready (to ensure that a first paint always
3393         happens before any timers set by the onload can fire).
3394
3395         Reviewed by aroben
3396
3397         * dom/Document.cpp:
3398         (WebCore::Document::implicitClose):
3399         * platform/ScrollView.h:
3400         * platform/mac/ScrollViewMac.mm:
3401         (WebCore::ScrollView::update):
3402
3403 2007-03-17  Dave Hyatt  <hyatt@apple.com>
3404
3405         Prevent starvation of user input and painting when processing timers.
3406         If we are already in the processing of a custom timer message, don't allow that
3407         processing to do another PostMessage.  Force SetTimer to be used instead.
3408       
3409         Reviewed by ggaren
3410
3411        * platform/win/SharedTimerWin.cpp:
3412         (WebCore::TimerWindowWndProc):
3413         (WebCore::setSharedTimerFireTime):
3414
3415 2007-03-17  Geoffrey Garen  <ggaren@apple.com>
3416
3417         Reviewed by Beth Dakin.
3418
3419         Fixed <rdar://problem/5070967> REGRESSION (r20211): Repro crash when 
3420         closing View Source window
3421         
3422         I award myself 0 points, and may God have mercy on my soul.
3423
3424         * bindings/js/kjs_proxy.cpp:
3425         (WebCore::KJSProxy::~KJSProxy):
3426
3427 2007-03-17  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3428
3429         Not reviewed - gdk build fix.
3430
3431         * platform/gdk/TemporaryLinkStubs.cpp:
3432         (Pasteboard::writeURL):
3433
3434 2007-03-17  David Hyatt  <hyatt@apple.com>
3435
3436         Fix tiny PLT regression.  Don't examine the border/background data for RenderImage when images change
3437         unless we actually have a border/background.
3438
3439         Reviewed by Brady
3440
3441         * rendering/RenderImage.cpp:
3442         (WebCore::RenderImage::imageChanged):
3443
3444 2007-03-17  Nikolas Zimmermann  <zimmermann@kde.org>
3445
3446         Reviewed by Sam Weinig.
3447
3448         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13046 (CSS styles on hover and focus are broken for <use>)
3449         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12838 (SVG <use> CSS styles broken)
3450         Added test: svg/custom/use-css-events.svg
3451
3452         In general this fixes the peepo.co.uk website.
3453
3454         Forgot to pass the actual StyleChange to the recalcStyle() function,
3455         when calling it on the shadow tree root element.
3456
3457         * ksvg2/svg/SVGUseElement.cpp:
3458         (WebCore::SVGUseElement::recalcStyle):
3459
3460 2007-03-17  Timothy Hatcher  <timothy@apple.com>
3461
3462         Reviewed by Mark Rowe.
3463
3464         Made Version.xcconfig smarter when building for different configurations.
3465         Now uses the 522+ OpenSource version for Debug and Release, while using the
3466         full 522.4 version for Production builds. The system prefix is also computed
3467         based on the current system, so 4522.4 on Tiger and 5522.4 on Leopard.
3468
3469         * Configurations/Version.xcconfig:
3470         * Configurations/WebCore.xcconfig:
3471
3472 2007-03-17  Antti Koivisto  <antti@apple.com>
3473
3474         Reviewed by Adele.
3475
3476         Fix http://bugs.webkit.org/show_bug.cgi?id=12595
3477         REGRESSION: Can't add item to cart at lnt.com (JS type error)
3478         <rdar://problem/4722863>
3479         
3480         Emulate Firefox behavior where form elements accessed by a name
3481         can be accessed with that name later even if the name changes or
3482         even if element is removed from the document.
3483         
3484         This is loosely based on Darin's earlier patch for the same problem but
3485         is much less expansive. It takes somewhat different approach to more closely
3486         mimic Firefox behavior. Includes expanded test case.
3487
3488         * bindings/js/JSHTMLFormElementCustom.cpp:
3489         (WebCore::JSHTMLFormElement::canGetItemsForName):
3490             Use new the HTMLFormElement::getNamedElements() method
3491         (WebCore::JSHTMLFormElement::nameGetter):
3492             Use new the HTMLFormElement::getNamedElements() method
3493         * html/HTMLFormElement.cpp:
3494         (WebCore::HTMLFormElement::HTMLFormElement):
3495         (WebCore::HTMLFormElement::~HTMLFormElement):
3496         (WebCore::HTMLFormElement::elementForAlias):
3497         (WebCore::HTMLFormElement::addElementAlias):
3498             Maintain a map of known element aliases
3499         (WebCore::HTMLFormElement::getNamedElements):
3500             Get a list of elements matching the name, based both their
3501             current names and known aliases (earlier names).
3502             Keep the alias list in sync.
3503         * html/HTMLFormElement.h:
3504
3505 2007-03-17  Adele Peterson  <adele@apple.com>
3506
3507         Reviewed by Hyatt.
3508
3509         Fix for <rdar://problem/4990050> REGRESSION: onchange gets fired when clicking on a programmatically selected element in a listbox
3510         http://bugs.webkit.org/show_bug.cgi?id=12725
3511
3512         Test: updated fast/forms/listbox-onchange.html
3513
3514         Added HTMLSelectElement::saveLastSelection that is called before changing a selection that could result
3515         in onChange being called.  m_lastOnChangeIndex and m_lastOnChangeSelection no longer have to be up-to date all the time, 
3516         they just have to be up-to-date before we execute an action that may trigger onChange.
3517
3518         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::setSelectedState): Added.
3519           The HTMLSelectElement will only set an option's selected state with this method.  This ensures
3520           that notifyOptionSelected won't get called when the call originates from the select element.
3521         * html/HTMLOptionElement.h:
3522
3523         * html/HTMLSelectElement.cpp:
3524         (WebCore::HTMLSelectElement::deselectItems): Calls setSelectedState.
3525         (WebCore::HTMLSelectElement::setSelectedIndex): ditto. Don't update the last selection variables here.  Scroll to the new selection.
3526          The scrolling call used to only be in notifyOptionSelected.  There's no reason we shouldn't scroll when the selection is set through
3527          the HTMLSelectElement.
3528         (WebCore::HTMLSelectElement::setValue): Call setSelectedIndex to update all options selected state.
3529         (WebCore::HTMLSelectElement::restoreState): Call setSelectedState.
3530         (WebCore::HTMLSelectElement::selectAll): Call saveLastSelection before making the selection, and calling onChange.
3531         (WebCore::HTMLSelectElement::recalcListItems): Call setSelectedState.  Don't need to save selection here anymore, 
3532          since it will get saved before we call onChange.
3533         (WebCore::HTMLSelectElement::reset): ditto.
3534         (WebCore::HTMLSelectElement::dispatchFocusEvent): Added. Call saveLastSelection for menu lists, since onChange can be fired
3535          on blur.
3536         (WebCore::HTMLSelectElement::dispatchBlurEvent): Call menuListOnChange.
3537         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Call saveLastSelection before showing the popup window.
3538         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):  Call saveLastSelection during mousedown (to prepare for an 
3539          onchange during mouseup, or after autoscroll).
3540         (WebCore::HTMLSelectElement::updateListBoxSelection): Call setSelectedState.
3541
3542         (WebCore::HTMLSelectElement::menuListOnChange): Added. Compares the m_lastOnChangeIndex to the selectedIndex().
3543         (WebCore::HTMLSelectElement::listBoxOnChange): Move the m_lastOnChangeSelection creation to saveLastSelection.
3544         (WebCore::HTMLSelectElement::saveLastSelection): Added. Sets m_lastOnChangeIndex or m_lastOnChangeSelection.
3545         * html/HTMLSelectElement.h:
3546         * platform/PopupMenu.h:
3547
3548 2007-03-16  Oliver Hunt  <oliver@apple.com>
3549
3550         Reviewed by Hyatt.
3551
3552         The old canSaveAsWebArchive call was necessary as stand alone
3553         images used to be rendered by ImageDocument.
3554
3555         Fixes rdar://problem/5061252
3556
3557         * dom/Clipboard.cpp:
3558         * dom/Clipboard.h:
3559         (WebCore::Clipboard::setDragHasStarted):
3560         * page/DragClient.h:
3561         (WebCore::DragClient::declareAndWriteDragImage):
3562         * platform/mac/ClipboardMac.mm:
3563         (WebCore::ClipboardMac::declareAndWriteDragImage):
3564
3565 2007-03-16  Anders Carlsson  <acarlsson@apple.com>
3566
3567         Reviewed by Maciej.
3568
3569         <rdar://problem/4869095>
3570         default content type changed for XMLHttpRequest POSTs changed (breaks Flickrator 0.1 widget)
3571         
3572         * xml/xmlhttprequest.cpp:
3573         (WebCore::XMLHttpRequest::send):
3574
3575 2007-03-16  Brady Eidson  <beidson@apple.com>
3576
3577         Rubberstamped by Tim Hatcher
3578
3579         Update the hash table header for Window object properties
3580
3581         * bindings/js/kjs_window.cpp:
3582
3583 2007-03-16  Brady Eidson  <beidson@apple.com>
3584
3585         Reviewed by Anders
3586
3587         <rdar://problem/5061826> and
3588         http://bugs.webkit.org/show_bug.cgi?id=12863
3589         Implement window.stop()
3590
3591         * bindings/js/kjs_window.cpp:
3592         (KJS::WindowFunc::callAsFunction): Add case Window::Stop
3593         * bindings/js/kjs_window.h:
3594         (KJS::Window::): Add "Stop"
3595
3596 2007-03-16  Geoffrey Garen  <ggaren@apple.com>
3597
3598         Reviewed by Brady Eidson.
3599
3600         Fixed dir creation to account for already existing dirs and missing leading
3601         dirs in path.
3602         
3603         * loader/icon/IconDatabase.cpp:
3604         (WebCore::makeAllDirectories):
3605
3606 2007-03-16  David Hyatt  <hyatt@apple.com>
3607
3608         Fix for 13084, assertion failure in the Cache.  Convert the client list
3609         to a HashCountedSet so that multiple refs and derefs are allowed.
3610
3611         Fix RenderImage so that if it has the same image used as a background/border
3612         and as the foreground that it will repaint properly (can be tested using
3613         border-image and a foreground image).
3614
3615         Optimize list marker so that it doesn't waste time in the base class method,
3616         since list markers don't support background or border images.
3617
3618         Reviewed by andersca
3619
3620         * ChangeLog:
3621         * loader/CachedResource.cpp:
3622         (WebCore::CachedResource::ref):
3623         * loader/CachedResource.h:
3624         * loader/CachedResourceClientWalker.cpp:
3625         (WebCore::CachedResourceClientWalker::CachedResourceClientWalker):
3626         * loader/CachedResourceClientWalker.h:
3627         * rendering/RenderImage.cpp:
3628         (WebCore::RenderImage::imageChanged):
3629         * rendering/RenderListMarker.cpp:
3630         (WebCore::RenderListMarker::imageChanged):
3631
3632 2007-03-16  Geoffrey Garen  <ggaren@apple.com>
3633
3634         Reviewed by Anders Carlsson.
3635         
3636         Fixed <rdar://problem/5065399> REGRESSION: leaks in Frame::bindingRootObject 
3637         seen on buildbot
3638
3639         The problem was that we were initializing the same WebScriptObject twice.
3640         This caused it to leak its original set of ivars.
3641         
3642         I think some refactoring could prevent this situation from arising in the
3643         first place, but I'm just adding a check at the call site for now, to do 
3644         the simplest thing.
3645
3646         * bindings/objc/WebScriptObject.mm:
3647         (-[WebScriptObject _setImp:originRootObject:rootObject:]): Added ASSERTs
3648         against multiple calls.
3649
3650         * bindings/objc/WebScriptObjectPrivate.h: Renamed _initializeWithObjectImp
3651         to setImp because "init" vs "initialize" was a too subtle indication that
3652         one was a Cocoa initializer and one was not.
3653
3654 2007-03-16  Lars Knoll <lars@trolltech.com>
3655
3656         don't use #import in .cpp files.
3657
3658         * editing/qt/EditorQt.cpp:
3659
3660 2007-03-16  Lars Knoll <lars@trolltech.com>
3661
3662         Fix the Qt build once again.
3663
3664         * platform/qt/PasteboardQt.cpp:
3665         (WebCore::Pasteboard::Pasteboard):
3666         (WebCore::Pasteboard::writeSelection):
3667         (WebCore::Pasteboard::plainText):
3668         (WebCore::Pasteboard::documentFragment):
3669         (WebCore::Pasteboard::writeURL):
3670         (WebCore::Pasteboard::writeImage):
3671         (WebCore::Pasteboard::clear):
3672
3673 2007-03-15  Shrikant Gangoda  <shrikant.gangoda@celunite.com>
3674
3675         Gdk build fix.
3676
3677         * loader/gdk/FrameLoaderClientGdk.cpp:
3678         (WebCore::FrameLoaderClientGdk::blockedError):
3679         * loader/gdk/FrameLoaderClientGdk.h:
3680
3681 2007-03-15  Beth Dakin  <bdakin@apple.com>
3682
3683         Reviewed by Geoff.
3684
3685         Fix for http://bugs.webkit.org/show_bug.cgi?id=13088 REGRESSION
3686         (r19761-19779): Copy image no longer includes image address 
3687         (rdar://5067927)
3688
3689         writeURL() does not need an isImage parameter. Now that it accepts 
3690         the types as a parameter, we can just declare the appropriate image 
3691         types within writeImage and send them to writeURL(). Also, 
3692         declaring the types twice is what broke this.
3693
3694         * platform/Pasteboard.h:
3695         * platform/mac/PasteboardMac.mm:
3696         (WebCore::Pasteboard::writeURL):
3697         (WebCore::Pasteboard::writeImage):
3698
3699 2007-03-15  Adele Peterson  <adele@apple.com>
3700
3701         Reviewed by Kevin Decker.
3702
3703         Fix for <rdar://problem/4926179> Text in menulist control should never update if menu is open
3704
3705         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
3706           Only setTextFromOption if the menu isn't visible.
3707
3708 2007-03-15  Brady Eidson  <beidson@apple.com>
3709
3710         Reviewed by Oliver
3711
3712         A few platform specific tweaks
3713
3714         * platform/cf/RetainPtr.h:
3715         (WebCore::RetainPtr::releaseRef): Fixed releaseRef to work with CF
3716         
3717         * platform/network/ResourceHandle.h: Added a "releaseRef" style call
3718
3719 2007-03-15  Maciej Stachowiak  <mjs@apple.com>
3720
3721         Reviewed by Geoff and Steve.
3722
3723         * config.h: Remove unneeded hack.
3724
3725 2007-03-15  Justin Garcia  <justin.garcia@apple.com>
3726
3727         Reviewed by john
3728         
3729         <rdar://problem/5062376> 
3730         REGRESSION: In Mail and Gmail, can't change alignment to text after it has been applied
3731         
3732         Bring back the remove step in applyBlockStyle.  It's 
3733         necessary because addBlockStyleIfNeeded assumes that 
3734         the properties it adds aren't already on the block that 
3735         it adds them to.
3736
3737         * editing/ApplyStyleCommand.cpp:
3738         (WebCore::ApplyStyleCommand::applyBlockStyle): 
3739         Bring back the remove step (added a testcase).
3740         Don't do the add step if m_removeOnly is true (no testcase
3741         because there aren't any clients using removeOnly functionality
3742         to remove styles yet, only styled elemets).
3743         Moved the code for creating new blocks up one level
3744         to this function so that we can pass blocks to removeCSSStyle.
3745         When converting VisiblePositions to indices and vice versa,
3746         use the highest node in the shadow tree if we're in one as
3747         the scope (working on a testcase).
3748         (WebCore::ApplyStyleCommand::addBlockStyle): Moved code to
3749         applyBlockStyle.
3750         * editing/ApplyStyleCommand.h: 
3751
3752 2007-03-15  Brady Eidson  <beidson@apple.com>
3753
3754         Reviewed by Maciej
3755
3756         <rdar://problem/4429701>
3757         Implements a port blocking black list that matches Firefox's
3758
3759         * loader/FrameLoader.cpp:
3760         (WebCore::FrameLoader::blockedError): Call through to the client for blockedError 
3761         * loader/FrameLoader.h:
3762
3763         * loader/FrameLoaderClient.h: Get the "port blocked" error for the current platform
3764
3765         * loader/ResourceLoader.cpp:
3766         (WebCore::ResourceLoader::wasBlocked): ResourceHandleClient method to pass on the didFail(error)
3767         (WebCore::ResourceLoader::blockedError): Following the pattern of "CancelledError()", get the 
3768           error to fail with for the didFail() call
3769         * loader/ResourceLoader.h:
3770
3771         * platform/graphics/svg/SVGImageEmptyClients.h:
3772         (WebCore::SVGEmptyFrameLoaderClient::blockedError): Added stub
3773
3774         * platform/network/ResourceHandle.cpp:
3775         (WebCore::ResourceHandle::create): If the port is blocked, create the handle but schedule it for
3776           deferred failure on a timer
3777         (WebCore::ResourceHandle::scheduleBlockedFailure): Do the timer scheduling
3778         (WebCore::ResourceHandle::fireBlockedFailure): Fire the timer here
3779         (WebCore::ResourceHandle::portAllowed): Implements checking of Mozilla's
3780         * platform/network/ResourceHandle.h:
3781         * platform/network/ResourceHandleClient.h:
3782         (WebCore::ResourceHandleClient::wasBlocked): Virtual for clients to get the "blocked" message
3783
3784 2007-03-15  Beth Dakin  <bdakin@apple.com>
3785
3786         Reviewed by Hyatt.
3787
3788         Fix for <rdar://problem/5065396> REGRESSION: leaks in 
3789         RenderBlock::layoutInlineChildren seen on buildbot
3790
3791         This leak appeared after http://trac.webkit.org/projects/webkit/
3792         changeset/20188. This change shifted line boxes around in 
3793         removeChild(). But since removeChild() calls 
3794         setNeedsLayoutAndMinMaxRecalc(), all of the line boxes will be 
3795         removed once we actually lay out anyway. So this patch fixes the 
3796         leak by deleting the line boxes instead of shifting them around. 
3797
3798         * editing/IndentOutdentCommand.cpp:
3799         (WebCore::IndentOutdentCommand::outdentParagraph): Call into 
3800         updateLayout(). This fixes an assertion I got in editing/
3801         execCommand/4976800.html This is very similar to the line box fix I 
3802         made recently (http://trac.webkit.org/projects/webkit/changeset/
3803         20177). We need to update layout before relying on VisiblePositions 
3804         after removing a node.
3805         * rendering/RenderBlock.cpp:
3806         (WebCore::RenderBlock::deleteLinesForBlock): New helper function 
3807         since this functionality is needed in three places now.
3808         (WebCore::RenderBlock::makeChildrenNonInline): Call into new 
3809         deleteLinesForBlock().
3810         (WebCore::RenderBlock::removeChild): Same.
3811         * rendering/RenderBlock.h:
3812
3813 2007-03-15  Timothy Hatcher  <timothy@apple.com>
3814
3815         Reviewed by John.
3816
3817         * Factored out most of our common build settings into .xcconfig files. Anything that was common in
3818           each build configuration was factored out into the shared .xcconfig file.
3819         * Adds a Version.xcconfig file to define the current framework version, to be used in other places.
3820         * Use the new $(BUNDLE_VERSION) (defined in Version.xcconfig) in the preprocessed Info.plist.
3821         * Use the versions defined in Version.xcconfig to set $(DYLIB_CURRENT_VERSION).
3822
3823         * Configurations/Base.xcconfig: Added.
3824         * Configurations/DebugRelease.xcconfig: Added.
3825         * Configurations/Version.xcconfig: Added.
3826         * Configurations/WebCore.xcconfig: Added.
3827         * Info.plist:
3828         * WebCore.xcodeproj/project.pbxproj:
3829
3830 2007-03-15  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3831
3832         Not reviewed - gdk build fixes.
3833
3834         * platform/gdk/EditorClientGdk.cpp:
3835         (WebCore::EditorClientGdk::handleKeypress):
3836         * platform/graphics/cairo/ImageSourceCairo.cpp:
3837         (WebCore::ImageSource::setData):
3838         * platform/graphics/gdk/ImageGdk.cpp:
3839         (WebCore::Image::loadPlatformResource):
3840
3841 2007-03-14  Justin Garcia  <justin.garcia@apple.com>
3842
3843         Reviewed by john
3844         
3845         ~2x speed up of 5k rich text paste:
3846         http://shakespeare.mit.edu/hamlet/full.html        
3847
3848         * editing/ReplaceSelectionCommand.cpp:
3849         (WebCore::ReplaceSelectionCommand::doApply): Remove the top 
3850         level style span if it's unnecessary before inserting
3851         into the document, it's faster than doing it after.
3852         * editing/ReplaceSelectionCommand.h: Exposed 
3853         ReplacementFragment::removeNodePreservingChildren so that
3854         the style span can be removed using non-undoable removes,
3855         like the rest of the removes done on the ReplacementFragment.
3856         * editing/markup.cpp:
3857         (WebCore::createMarkup): Make the style span the top level
3858         element, otherwise it's useless.  This also facilitates the
3859         optimization mentioned above.
3860         When including markup for a fully selected root, include markup
3861         for all the nodes beneath that fully selected root, to preserve 
3862         the structure and appearance of the copied markup.  Did this
3863         by merging with the code for adding markup for descendants of
3864         special commonAncestorBlocks.
3865
3866 2007-03-15  Beth Dakin  <bdakin@apple.com>
3867
3868         Rubber-stamped by Adele.
3869
3870         Rolling out http://trac.webkit.org/projects/webkit/changeset/20148 
3871         (which is a fix for http://bugs.webkit.org/show_bug.cgi?id=12595 
3872         and rdar://4722863) because it causes a horrible memory-trasher. 
3873
3874         * bindings/js/JSHTMLFormElementCustom.cpp:
3875         (WebCore::JSHTMLFormElement::canGetItemsForName):
3876         (WebCore::JSHTMLFormElement::nameGetter):
3877         * bindings/js/kjs_dom.cpp:
3878         (KJS::):
3879         (KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
3880         (KJS::DOMNamedNodesCollection::lengthGetter):
3881         (KJS::DOMNamedNodesCollection::indexGetter):
3882         (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
3883         * bindings/js/kjs_dom.h:
3884         (KJS::DOMNamedNodesCollection::classInfo):
3885         * bindings/js/kjs_html.cpp:
3886         (KJS::JSHTMLCollection::getNamedItems):
3887         * dom/ChildNodeList.cpp:
3888         (WebCore::ChildNodeList::ChildNodeList):
3889         (WebCore::ChildNodeList::length):
3890         (WebCore::ChildNodeList::item):
3891         (WebCore::ChildNodeList::nodeMatches):
3892         * dom/ChildNodeList.h:
3893         * dom/NameNodeList.cpp:
3894         (WebCore::NameNodeList::NameNodeList):
3895         (WebCore::NameNodeList::item):
3896         (WebCore::NameNodeList::nodeMatches):
3897         * dom/NameNodeList.h:
3898         (WebCore::NameNodeList::rootNodeAttributeChanged):
3899         * dom/Node.cpp:
3900         (WebCore::TagNodeList::TagNodeList):
3901         (WebCore::TagNodeList::nodeMatches):
3902         (WebCore::Node::registerNodeList):
3903         (WebCore::Node::unregisterNodeList):
3904         * dom/Node.h:
3905         * dom/NodeList.cpp:
3906         (WebCore::NodeList::NodeList):
3907         (WebCore::NodeList::~NodeList):
3908         (WebCore::NodeList::recursiveLength):
3909         (WebCore::NodeList::itemForwardsFromCurrent):
3910         (WebCore::NodeList::itemBackwardsFromCurrent):
3911         (WebCore::NodeList::recursiveItem):
3912         (WebCore::NodeList::itemWithName):
3913         (WebCore::NodeList::rootNodeChildrenChanged):
3914         * dom/NodeList.h:
3915         (WebCore::NodeList::rootNodeAttributeChanged):
3916         * html/HTMLFormElement.cpp:
3917         (WebCore::HTMLFormElement::HTMLFormElement):
3918         (WebCore::HTMLFormElement::~HTMLFormElement):
3919         (WebCore::HTMLFormElement::formData):
3920         (WebCore::HTMLFormElement::parseMappedAttribute):
3921         (WebCore::HTMLFormElement::removeFormElement):
3922         * html/HTMLFormElement.h:
3923         * html/HTMLGenericFormElement.cpp:
3924         (WebCore::HTMLGenericFormElement::parseMappedAttribute):
3925         (WebCore::HTMLGenericFormElement::insertedIntoTree):
3926         * html/HTMLGenericFormElement.h:
3927         * html/HTMLInputElement.cpp:
3928         (WebCore::HTMLInputElement::parseMappedAttribute):
3929
3930 2007-03-15  Geoffrey Garen  <ggaren@apple.com>
3931
3932         Added an assert to help catch a bug. Hopefully someone will hit it!
3933         
3934         * bindings/js/kjs_proxy.cpp:
3935         (WebCore::KJSProxy::~KJSProxy):
3936
3937 2007-03-14  Oliver Hunt  <oliver@apple.com>
3938
3939         Reviewed by Adele.
3940
3941         Fix for rdar://problem/5061737.
3942         
3943         This was a regression from the original Objective-C -> C++ conversion
3944         for the drag logic.  We don't need to call Range::startNode as we just
3945         need the document that contains the range.   
3946
3947         * page/DragController.cpp:
3948         (WebCore::documentFragmentFromDragData):
3949
3950 2007-03-14  Mitz Pettel  <mitz@webkit.org>
3951
3952         Reviewed by Hyatt.
3953
3954         - http://bugs.webkit.org/show_bug.cgi?id=13071
3955           REGRESSION: Plain text files no longer wrap lines longer than the width of the browser window
3956
3957         Test: fast/loader/text-document-wrapping.html
3958
3959         * loader/TextDocument.cpp:
3960         (WebCore::TextTokenizer::write): Specified word-wrap:break-word for the <pre> element.
3961
3962 2007-03-14  Mitz Pettel  <mitz@webkit.org>
3963
3964         Reviewed by Hyatt.
3965
3966         - fix http://bugs.webkit.org/show_bug.cgi?id=13072
3967           REGRESSION (r15617): white-space: pre-wrap breaks off the last character of a wide word
3968
3969         Test: fast/text/whitespace/pre-wrap-last-char.html
3970
3971         * rendering/bidi.cpp:
3972         (WebCore::RenderBlock::findNextLineBreak): Undid the change from r15617.
3973
3974 2007-03-14  David Hyatt  <hyatt@apple.com>
3975
3976         Add asserts to help catch double refs and double derefs of CachedResources.
3977
3978         Reviewed by mjs
3979
3980         * loader/CachedResource.cpp:
3981         (WebCore::CachedResource::ref):
3982         (WebCore::CachedResource::deref):
3983
3984 2007-03-14  Alice Liu  <alice.liu@apple.com>
3985
3986         Rubber-stamped by Hyatt.
3987
3988         Adding null check to prevent the crash that happens on 2nd run of iBench HTML load test
3989
3990         * loader/icon/IconDataCache.cpp:
3991         (WebCore::IconDataCache::writeToDatabase):
3992
3993 === Safari-5522.4 ===
3994
3995 2007-03-14  Adele Peterson  <adele@apple.com>
3996
3997         Reviewed by Adam.
3998
3999         Fix for <rdar://problem/5062898> REGRESSION: autocomplete window in text fields doesn't come up
4000
4001         When we moved the initialization of a bunch of variables in the HTMLFormElement constructor, m_autocomplete accidently got initialized to false.
4002
4003         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::HTMLFormElement):
4004
4005 2007-03-14  Steve Falkenburg  <sfalken@apple.com>
4006
4007         Reviewed by Adam.
4008
4009         Added missing null check in case this is called on a subframe
4010         that hasn't started loading.
4011
4012         * page/Frame.cpp:
4013         (WebCore::Frame::setMarkedTextMatchesAreHighlighted): Check for a null document.
4014
4015 2007-03-14  Antti Koivisto  <antti@apple.com>
4016
4017         Reviewed by Geoff.
4018
4019         Fix http://bugs.webkit.org/show_bug.cgi?id=13060
4020         REGRESSION: Repro ASSERT failure in Cache::adjustSize running layout tests
4021         <rdar://5060208>
4022         
4023         Script evaluation may have dereffed the CachedScript object already, causing double deref and
4024         eventually m_liveResourcesSize underflow.
4025
4026         * html/HTMLScriptElement.cpp:
4027         (WebCore::HTMLScriptElement::notifyFinished):
4028
4029 2007-03-14  Adele Peterson  <adele@apple.com>
4030
4031         Reviewed by Darin.
4032
4033         Added InsertTab, InsertBacktab, InsertLineBreak, and InsertNewline to the editing command table.
4034         Added Event parameter to execCommand, and to all of the enabled and exec functions.  Right now,
4035         the event is only used by the newly added commands.  But in the future, many (and possibly all) of
4036         these editing commands will need to consider the event so they are applied to the correct selection.
4037
4038         * WebCore.exp:
4039         * editing/Editor.cpp:
4040         (WebCore::execCopy):
4041         (WebCore::execCut):
4042         (WebCore::execDelete):
4043         (WebCore::execBackwardDelete):
4044         (WebCore::execForwardDelete):
4045         (WebCore::execMoveBackward):
4046         (WebCore::execMoveBackwardAndModifySelection):
4047         (WebCore::execMoveUpByPageAndModifyCaret):
4048         (WebCore::execMoveDown):
4049         (WebCore::execMoveDownAndModifySelection):
4050         (WebCore::execMoveForward):
4051         (WebCore::execMoveForwardAndModifySelection):
4052         (WebCore::execMoveDownByPageAndModifyCaret):
4053         (WebCore::execMoveLeft):
4054         (WebCore::execMoveLeftAndModifySelection):
4055         (WebCore::execMoveRight):
4056         (WebCore::execMoveRightAndModifySelection):
4057         (WebCore::execMoveToBeginningOfDocument):
4058         (WebCore::execMoveToBeginningOfDocumentAndModifySelection):
4059         (WebCore::execMoveToBeginningOfSentence):
4060         (WebCore::execMoveToBeginningOfSentenceAndModifySelection):
4061         (WebCore::execMoveToBeginningOfLine):
4062         (WebCore::execMoveToBeginningOfLineAndModifySelection):
4063         (WebCore::execMoveToBeginningOfParagraph):
4064         (WebCore::execMoveToBeginningOfParagraphAndModifySelection):
4065         (WebCore::execMoveToEndOfDocument):
4066         (WebCore::execMoveToEndOfDocumentAndModifySelection):
4067         (WebCore::execMoveToEndOfSentence):
4068         (WebCore::execMoveToEndOfSentenceAndModifySelection):
4069         (WebCore::execMoveToEndOfLine):
4070         (WebCore::execMoveToEndOfLineAndModifySelection):
4071         (WebCore::execMoveToEndOfParagraph):
4072         (WebCore::execMoveToEndOfParagraphAndModifySelection):
4073         (WebCore::execMoveParagraphBackwardAndModifySelection):
4074         (WebCore::execMoveParagraphForwardAndModifySelection):
4075         (WebCore::execMoveUp):
4076         (WebCore::execMoveUpAndModifySelection):
4077         (WebCore::execMoveWordBackward):
4078         (WebCore::execMoveWordBackwardAndModifySelection):
4079         (WebCore::execMoveWordForward):
4080         (WebCore::execMoveWordForwardAndModifySelection):
4081         (WebCore::execMoveWordLeft):
4082         (WebCore::execMoveWordLeftAndModifySelection):
4083         (WebCore::execMoveWordRight):
4084         (WebCore::execMoveWordRightAndModifySelection):
4085         (WebCore::execPaste):
4086         (WebCore::execSelectAll):
4087         (WebCore::execToggleBold):
4088         (WebCore::execToggleItalic):
4089         (WebCore::execRedo):
4090         (WebCore::execUndo):
4091         (WebCore::execInsertTab):
4092         (WebCore::execInsertBacktab):
4093         (WebCore::execInsertNewline):
4094         (WebCore::execInsertLineBreak):
4095         (WebCore::enabled):
4096         (WebCore::canPaste):
4097         (WebCore::hasEditableSelection):
4098         (WebCore::hasEditableRangeSelection):
4099         (WebCore::hasRangeSelection):
4100         (WebCore::hasRichlyEditableSelection):
4101         (WebCore::canRedo):
4102         (WebCore::canUndo):
4103         (WebCore::CommandEntry::):
4104         (WebCore::Editor::toggleBold):
4105
4106         (WebCore::Editor::execCommand): Added optional event parameter.
4107         (WebCore::Editor::insertText): Added.  Calls handleTextInputEvent.
4108         (WebCore::Editor::insertTextWithoutSendingTextEvent): Renamed from insertText.
4109          Performs the actual insertion without dispatching any event.
4110         * editing/Editor.h:
4111         * page/EventHandler.cpp: (WebCore::EventHandler::defaultTextInputEventHandler):
4112           Call insertTextWithoutSendingTextEvent.
4113
4114 2007-03-14  Justin Garcia  <justin.garcia@apple.com>
4115
4116         Reviewed by darin
4117         
4118         ~3x speedup pasting 5k lines of rich text:
4119         http://shakespeare.mit.edu/hamlet/full.html
4120         ~2x speedup pasting 10k lines of plain text
4121         
4122         * css/CSSComputedStyleDeclaration.cpp:
4123         (WebCore::computedStyle): Added for convenience.
4124         * css/CSSComputedStyleDeclaration.h:
4125         * editing/ReplaceSelectionCommand.cpp:
4126         (WebCore::ReplaceSelectionCommand::removeRedundantStyles):
4127         The code that pushed down the top level style span had
4128         a bug in it that made it do unnecessary work.  Instead of
4129         fixing the bug I removed the code because it was used to 
4130         help see more redundancies in second level style spans, but 
4131         createMarkup now *only* creates a top level style span.
4132         Only remove redundant styles from style spans and only remove
4133         unstyled elements if they are style spans.  FF doesn't
4134         remove redundant styles from elements, or remove redundant 
4135         font tags on copy/paste.  We could offer this functionality 
4136         through a separate "cleanup" command.
4137         * editing/markup.cpp:
4138         (WebCore::createMarkup): Only add markup for ancestors of 
4139         lastClosed if we're including markup for acommonAncestorBlock 
4140         (we do this for commonAncestorBlocks like tables and lists),
4141         otherwise it's unnecessary/redundant.
4142
4143 2007-03-14  Anders Carlsson  <acarlsson@apple.com>
4144
4145         Reviewed by Ada.
4146
4147         Make sure to call ResourceLoader::didReceiveData to ensure that there's a shared buffer with the resource
4148         data, since SubresourceLoaderClients now make use of that buffer.
4149         
4150         * loader/SubresourceLoader.cpp:
4151         (WebCore::SubresourceLoader::didReceiveData):
4152
4153 2007-03-14  Administrator  <acarlsson@apple.com>
4154
4155         Get the size from the shared buffer.
4156         
4157         * platform/graphics/cg/ImageSourceCG.cpp:
4158         (WebCore::ImageSource::setData):
4159         * platform/graphics/cg/PDFDocumentImage.cpp:
4160         (WebCore::PDFDocumentImage::dataChanged):
4161
4162 2007-03-14  Mitz Pettel  <mitz@webkit.org>
4163
4164         Reviewed by Hyatt, thumbs up by Darin.
4165
4166         - fix http://bugs.webkit.org/show_bug.cgi?id=12782
4167           Reproducible crash in BidiContext::deref
4168
4169         Test: fast/dynamic/anonymous-block-orphaned-lines.html
4170
4171         * rendering/InlineBox.cpp:
4172         (WebCore::InlineBox::root): Added an assertion that we return a root inline box.
4173         * rendering/RenderBlock.cpp:
4174         (WebCore::RenderBlock::removeChild): Added code to adopt the line boxes of
4175         anonymous blocks being destroyed instead of leaving them orphaned, which
4176         is what caused this crash. The boxes will be deleted on the next layout, but
4177         this ensures consistency in the mean time.
4178
4179 2007-03-14  Lars Knoll <lars@trolltech.com>
4180
4181         Reviewed by Antti.
4182
4183         Fix the Qt build.
4184         Add a getter to SharedBuffer that returns a reference to the internal
4185         Vector to avoid an extra copy of the data.
4186
4187         * platform/SharedBuffer.h:
4188         (WebCore::SharedBuffer::buffer):
4189         * platform/graphics/qt/ImageQt.cpp:
4190         (WebCore::Image::loadPlatformResource):
4191         * platform/graphics/qt/ImageSourceQt.cpp:
4192         (WebCore::detectImageFormat):
4193         (WebCore::createDecoder):
4194         (WebCore::ImageSource::setData):
4195
4196 2007-03-14  Antti Koivisto  <antti@apple.com>
4197
4198         Reviewed by Mitz.
4199         
4200         Fix <rdar://problem/5058774>
4201         REGRESSION: In Mail, caret appears oversized when typing in a To Do note
4202         
4203         Horizontal and vertical were switched. Was regression from
4204         http://trac.webkit.org/projects/webkit/changeset/20103
4205
4206         * rendering/RootInlineBox.cpp:
4207         (WebCore::RootInlineBox::addHighlightOverflow):
4208
4209 2007-03-14  David Hyatt  <hyatt@apple.com>
4210
4211         Tweak the data() functions of stylesheets and scripts to be internally consistent.
4212
4213         * loader/CachedCSSStyleSheet.cpp:
4214         (WebCore::CachedCSSStyleSheet::data):
4215         * loader/CachedScript.cpp:
4216         (WebCore::CachedScript::data):
4217         * loader/CachedXSLStyleSheet.cpp:
4218         (WebCore::CachedXSLStyleSheet::data):
4219
4220 2007-03-14  David Hyatt  <hyatt@apple.com>
4221
4222         Fix Radar 5050688.  
4223
4224         For large animated GIFs, destroy and recreate the source for every animation frame.  This keeps
4225         the memory consumption down while giant images are animating.
4226
4227         Reviewed by andersca
4228
4229         * platform/graphics/BitmapImage.cpp:
4230         (WebCore::BitmapImage::BitmapImage):
4231         (WebCore::BitmapImage::destroyDecodedData):
4232         (WebCore::BitmapImage::dataChanged):
4233         (WebCore::BitmapImage::advanceAnimation):
4234         * platform/graphics/BitmapImage.h:
4235
4236 2007-03-14  David Hyatt  <hyatt@apple.com>
4237
4238         Make sure to use CFDataCreateWithBytesNoCopy where we can.