b33900b327ee31675ea38ae72f2c9b67cadfba84
[WebKit-https.git] / WebCore / ChangeLog
1 2007-01-26  George Staikos  <staikos@kde.org>
2
3         Reviewed by Zack.
4
5         Qt implementation.
6
7         * WebCore.pro:
8         * platform/qt/FontPlatformDataQt.cpp:
9         (WebCore::FontPlatformData::FontPlatformData):
10         * platform/qt/ScrollViewQt.cpp:
11         (WebCore::ScrollView::scrollbarUnderMouse):
12
13 2007-01-26  Brady Eidson  <beidson@apple.com>
14
15         Reviewed by Anders' rubberstamp
16         
17         Warning about unreferenced formal parameter caused compile to fail
18
19         * platform/cf/RetainPtr.h:
20         (WebCore::adoptCFReference):
21
22 2007-01-26  Darin Adler  <darin@apple.com>
23
24         Reviewed by Brady.
25
26         - fix <rdar://problem/4956688> move Mac-specific part of icon code into IconMac
27         - fix a GC-compatibility problem in the icon code I noticed by code inspection
28
29         * platform/FileChooser.cpp: (WebCore::FileChooser::chooseIcon): Removed Mac-specific
30         path check -- that's in newIconForFile now.
31
32         * platform/graphics/Icon.h: Changed the image to be a RetainPtr. The old code was
33         using -[NSObject retain] which is not good enough for a pointer in a C++ object.
34         * platform/graphics/mac/IconMac.mm:
35         (WebCore::Icon::Icon): Got rid of unneeded code to do what RetainPtr does for us.
36         (WebCore::Icon::~Icon): Ditto.
37         (WebCore::Icon::newIconForFile): Added check for non-absolute file names. Updated
38         for use of RetainPtr. Use constructor that takes NSImage.
39         (WebCore::Icon::paint): Add get() calls needed now that we are using a RetainPtr.
40
41         * WebCore.xcodeproj/project.pbxproj: Let Xcode do its thing.
42
43 2007-01-26  Alexey Proskuryakov  <ap@webkit.org>
44
45         Reviewed by Maciej.
46
47         http://bugs.webkit.org/show_bug.cgi?id=12385
48         Assertion failure when loading subresources from "data:" frames
49
50         Test: fast/loader/opaque-base-url.html
51
52         * platform/KURL.cpp:
53         (WebCore::KURL::init): Make the URL invalid if it's relative, but has an opaque or empty base.
54
55 2007-01-26  Dex Deacon  <occupant4@gmail.com>
56
57         Reviewed by Darin.
58
59         * page/EventHandler.cpp:
60         (WebCore::EventHandler::handleMouseMoveEvent):
61         Removed a call to invalidateClick(), since we don't want to cancel a
62         click if the mouse moves.
63
64 2007-01-26  Darin Adler  <darin@apple.com>
65
66         * css/MediaQueryEvaluator.cpp:
67         (WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific):
68         Oops, forgot a !.
69
70 2007-01-26  Darin Adler  <darin@apple.com>
71
72         Patch by Nate Begeman.
73         Reviewed by Darin and Maciej.
74
75         - <rdar://problem/4946877> Avoid unnecessary allocations in CSS, patch attached (12401)
76           http://bugs.webkit.org/show_bug.cgi?id=12401
77
78         * css/MediaQueryEvaluator.h: Add mediaTypeMatchSpecific, a function that
79         takes a char* to avoid creating and destroying a String for simple media
80         type queries.
81         * css/MediaQueryEvaluator.cpp:
82         (WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific): Added. Besides
83         avoiding the conversion to String, this also doesn't have the special
84         case code to handle "" and "all".
85
86         * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::matchUARules):
87         Call mediaTypeMatchSpecific here when deciding whether to use the
88         print version of the user agent style sheet.
89
90         * loader/Cache.cpp: (WebCore::Cache::requestResource): Don't convert to
91         a string and back to a KURL when calling createResource. Avoids reparsing
92         the URL string.
93
94 2007-01-26  Zack Rusin  <zrusin@trolltech.com>
95
96         Reviewed by Lars
97
98         Add history related classes to the project file.
99
100         * WebCore.pro:
101
102 2007-01-26  Zack Rusin  <zack@kde.org>
103
104         Reviewed by Lars
105
106         Introduce PlatformScrollBar and try to make 
107         the scrollbar behavior a little more sane.
108
109         * WebCore.pro:
110         * platform/qt/PlatformScrollBarQt.cpp: Added.
111         (WebCore::Scrollbar::Scrollbar):
112         (WebCore::Scrollbar::setSteps):
113         (WebCore::Scrollbar::scroll):
114         (WebCore::Scrollbar::setValue):
115         (WebCore::Scrollbar::setProportion):
116         (WebCore::PlatformScrollbar::PlatformScrollbar):
117         (WebCore::PlatformScrollbar::~PlatformScrollbar):
118         (WebCore::PlatformScrollbar::width):
119         (WebCore::PlatformScrollbar::height):
120         (WebCore::PlatformScrollbar::setEnabled):
121         (WebCore::PlatformScrollbar::paint):
122         (WebCore::PlatformScrollbar::updateThumbPosition):
123         (WebCore::PlatformScrollbar::updateThumbProportion):
124         (WebCore::PlatformScrollbar::setRect):
125         * platform/qt/ScrollViewQt.cpp:
126         (WebCore::ScrollView::addChild):
127         * platform/qt/TemporaryLinkStubs.cpp:
128         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
129
130 2007-01-26  Mitz Pettel  <mitz@webkit.org>
131
132         Reviewed by Darin.
133
134         - fix http://bugs.webkit.org/show_bug.cgi?id=11109
135           REGRESSION (r15471): menus are offset on eink.com
136           <rdar://problem/4824760>
137
138         Changed offset{Left,Top} to match Firefox. If the body element is statically
139         positioned, it is still returned as the offsetParent of elements whose containing
140         block is the initial containing block (the root), but their offset{Left,Top} are
141         relative to the root. If the body element is positioned, then offsets are relative
142         to it. The body's own offset{Left,Top} are always 0. 
143
144         Test: fast/dom/Element/offsetLeft-offsetTop-body-quirk.html
145
146         * rendering/RenderObject.cpp:
147         (WebCore::RenderObject::offsetLeft):
148         (WebCore::RenderObject::offsetTop):
149
150 2007-01-26  Mitz Pettel  <mitz@webkit.org>
151
152         Reviewed by Darin and Maciej.
153
154         - fix http://bugs.webkit.org/show_bug.cgi?id=10983
155           REGRESSION (r12290): Drop shadow of flickr photo note is positioned incorrectly the second time it's shown
156
157         Test: fast/dynamic/staticY.html
158
159         * rendering/RenderBlock.cpp:
160         (WebCore::RenderBlock::layoutPositionedObjects): Avoid marking the object's
161         parents, since they have already been laid out.
162         * rendering/RenderBox.cpp:
163         (WebCore::RenderBox::setStaticY): Added a call to setChildNeedsLayout() to
164         ensure relayout by this box's container (third and fourth cases in the
165         layout test).
166         * rendering/RenderBox.h:
167         * rendering/RenderObject.cpp:
168         (WebCore::RenderObject::markContainingBlocksForLayout): For positioned objects
169         with static y, also mark the object's parent to ensure that it recomputes
170         the static y value (first case in the layout test).
171
172 2007-01-26  Lars Knoll <lars@trolltech.com>
173
174         Reviewed by Zack
175
176         Get rid of FrameQtClient. It's unused since we moved over
177         to the loader.
178
179         * WebCore.pro:
180         * page/qt/FrameQt.cpp:
181         (WebCore::FrameQt::FrameQt):
182         * page/qt/FrameQt.h:
183         * page/qt/FrameQtClient.cpp: Removed.
184         * page/qt/FrameQtClient.h: Removed.
185         * platform/network/ResourceHandleInternal.h:
186         * platform/network/qt/ResourceHandleManagerQt.cpp:
187         (WebCore::RequestQt::RequestQt):
188         (WebCore::ResourceHandleManager::add):
189         * platform/network/qt/ResourceHandleManagerQt.h:
190         * platform/network/qt/ResourceHandleQt.cpp:
191         (WebCore::ResourceHandle::start):
192
193 2007-01-26  Zack Rusin  <zack@kde.org>
194
195         Fix the compile
196
197         * WebCore.pro:
198
199 2007-01-26  Adam Roben  <aroben@apple.com>
200
201         Reviewed by Maciej.
202
203         Fixed an issue on tivofaq.com where you could never tab forward into
204         the left frame after tabbing out of the document.
205
206         * page/FocusController.cpp:
207         (WebCore::FocusController::advanceFocus): Clear the focused frame
208         before passing off focus to Chrome so that when we re-enter the
209         document we start at the main frame instead of the last focused frame.
210
211 2007-01-25  Rob Buis  <buis@kde.org>
212
213         Reviewed by olliej.
214
215         http://bugs.webkit.org/show_bug.cgi?id=11911
216         SVG exhibits double-text-selection behavior
217
218         Fix selection height of the inline text boxes for svg.
219
220         * WebCore.xcodeproj/project.pbxproj:
221         * rendering/InlineTextBox.cpp:
222         (WebCore::InlineTextBox::selectionTop):
223         (WebCore::InlineTextBox::selectionHeight):
224         (WebCore::InlineTextBox::selectionRect):
225         (WebCore::InlineTextBox::paintSelection):
226         (WebCore::InlineTextBox::paintMarkedTextBackground):
227         (WebCore::InlineTextBox::paintCustomHighlight):
228         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
229         (WebCore::InlineTextBox::paintTextMatchMarker):
230         * rendering/InlineTextBox.h:
231         * rendering/RenderSVGInlineText.cpp:
232         (WebCore::RenderSVGInlineText::createInlineTextBox):
233         * rendering/RenderSVGInlineText.h:
234         * rendering/RenderText.cpp:
235         (WebCore::RenderText::createInlineTextBox):
236         (WebCore::RenderText::createInlineBox):
237         * rendering/RenderText.h:
238         * rendering/SVGInlineTextBox.cpp: Added.
239         (WebCore::SVGInlineTextBox::selectionTop):
240         (WebCore::SVGInlineTextBox::selectionHeight):
241         * rendering/SVGInlineTextBox.h: Added.
242         (WebCore::SVGInlineTextBox::SVGInlineTextBox):
243
244 2007-01-26  Zack Rusin  <zack@kde.org>
245
246         Reviewed by Lars
247
248         Fix drawing of tiled images.
249
250         * WebCore.pro:
251         * platform/graphics/qt/ImageQt.cpp:
252         (WebCore::BitmapImage::drawPattern):
253
254 2007-01-26  Zack Rusin  <zack@kde.org>
255
256         Reviewed by Lars
257
258         Fixing image loading - we decode QImages
259         but render QPixmaps now. Implement Icon
260         class
261
262         * platform/graphics/BitmapImage.h:
263         * platform/graphics/Icon.h:
264         * platform/graphics/Image.h:
265         (WebCore::Image::getPixmap):
266         * platform/graphics/qt/IconQt.cpp:
267         (WebCore::Icon::Icon):
268         (WebCore::Icon::~Icon):
269         (WebCore::Icon::newIconForFile):
270         (WebCore::Icon::paint):
271         * platform/graphics/qt/ImageDecoderQt.cpp:
272         (WebCore::ImageDecoderQt::ImageData::ImageData):
273         (WebCore::ImageDecoderQt::ReadContext::read):
274         (WebCore::ImageDecoderQt::ReadContext::readImageLines):
275         (WebCore::ImageDecoderQt::reset):
276         (WebCore::ImageDecoderQt::imageAtIndex):
277         * platform/graphics/qt/ImageDecoderQt.h:
278         * platform/graphics/qt/ImageQt.cpp:
279         (WebCore::BitmapImage::drawPattern):
280         (WebCore::BitmapImage::getPixmap):
281         * platform/graphics/qt/ImageSourceQt.cpp:
282         (WebCore::ImageSource::createFrameAtIndex):
283
284 2007-01-25  Justin Garcia  <justin.garcia@apple.com>
285
286         Reviewed by oliver
287         
288         <http://bugs.webkit.org/show_bug.cgi?id=12409>
289         REGRESSION (r19039): Drag caret isn't cleared after a drop
290
291         No new layout tests because the regression was
292         caught by current layout tests.
293
294         * page/DragController.cpp:
295         (WebCore::DragController::concludeDrag): Clear the drag caret.
296
297 2007-01-25  Darin Adler  <darin@apple.com>
298
299         Reviewed and landed by Geoffrey Garen.
300
301         - fix http://bugs.webkit.org/show_bug.cgi?id=12342
302           REGRESSION: destroying a frame from its own script causes various crashes
303
304         * bindings/js/kjs_window.cpp: (KJS::ScheduledAction::execute):
305         Use RefPtr for the frame and the interpreter object so they don't get deleted
306         out from underneath us.
307
308         * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate):
309         Add a check for a page of 0. This was the only call site for the
310         addMessageToConsole function that did not have a check for a page of 0.
311
312 2007-01-25 Dirk Mueller  <mueller@kde.org>
313
314         Reviewed and merged by Beth.
315
316         Fix for <rdar://problem/4921692> not processing comments inside a 
317         title element leads to XSS (for at least BlogSpot)
318
319         This is equivalent to commit 626791 in the KDE tree. Basically, the 
320         patch allows comment parsing in titles to avoid capturing a 
321         <script> tag by accident.
322
323         * html/HTMLTokenizer.cpp:
324         (WebCore::HTMLTokenizer::parseSpecial):
325         (WebCore::HTMLTokenizer::parseComment):
326
327 2007-01-25  Darin Adler  <darin@apple.com>
328
329         * ksvg2/svg/SVGPreserveAspectRatio.cpp: Add a couple of comments.
330
331 2007-01-25  Darin Adler  <darin@apple.com>
332
333         Reviewed by Maciej.
334
335         - fix http://bugs.webkit.org/show_bug.cgi?id=12365
336           Reproducible crash in WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio
337           in svg/W3C-SVG-1.1/animate-elem-40-t.svg under guard malloc
338         - fix bug where the parser accepts "meet" or "slice" as an entire string
339         - fix bug where "slice" is ignored if the old alignment was "none"
340           even if the newly-parsed alignment is something other than "none", and
341           "slice" is not ignored if the old alignment was not "none", but the
342           newly-parsed alignment is "none"
343         - optimize to only call notifyAttributeChange if the attribute actually changed
344
345         Test: svg/dom/preserve-aspect-ratio-parser-test.html
346
347         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
348         (WebCore::checkString): Added an overload for using char* constants which is
349         much simpler than the old one, and almost as fast.
350         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio): Fail if there's no
351         more text after "defer". Fail if there's neither "none" nor an x/y specified.
352         Check that there's more text before looking at the "m" and "s" for "meet" and
353         "slice". Merged the failure and success cases. Only call notifyAttributeChange
354         if something changed.
355
356         I think all the "optimized" code where we check the first character before
357         calling checkString isn't really helpful, but I decided to leave it as-is
358         for now.
359
360 2007-01-25  Lars Knoll <lars@trolltech.com>
361
362         Reviewed by Zack
363
364         Trivial implementation of getMIMETypeForExtension.
365         Use the above method in the ResourceHandleManager to set
366         a mimetype on Resources that don't have one set (which
367         includes everything loaded from local disk).
368
369         Should fix quite a few test cases :)
370
371         * platform/network/qt/ResourceHandleManagerQt.cpp:
372         (WebCore::ResourceHandleManager::receivedResponse):
373         * platform/qt/MimeTypeRegistryQt.cpp:
374         (WebCore::):
375         (WebCore::MimeTypeRegistry::getMIMETypeForExtension):
376
377 2007-01-25 Harald Fernengel <harald@trolltech.com>
378
379         Reviewed by zack
380
381         Compile on platforms where qreal is not a double.
382
383         * platform/graphics/qt/AffineTransformQt.cpp:
384         (WebCore::AffineTransform::map):
385
386 2007-01-25  Zack Rusin  <zack@kde.org>
387
388         Reviewed by Lars.
389
390         Add wheel event handling and make explicit usage
391         of the EventHandler.
392
393         * WebCore.pro:
394         * page/qt/EventHandlerQt.cpp:
395         (WebCore::EventHandler::focusDocumentView):
396         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
397         (WebCore::EventHandler::passMouseDownEventToWidget):
398         (WebCore::EventHandler::lastEventIsMouseUp):
399         (WebCore::EventHandler::handleMouseUp):
400         * platform/PlatformWheelEvent.h:
401         * platform/qt/ScrollViewCanvasQt.cpp:
402         (WebCore::ScrollViewCanvasQt::ScrollViewCanvasQt):
403         (WebCore::ScrollViewCanvasQt::mousePressEvent):
404         (WebCore::ScrollViewCanvasQt::wheelEvent):
405         (WebCore::ScrollViewCanvasQt::dragEnterEvent):
406         (WebCore::ScrollViewCanvasQt::dragLeaveEvent):
407         (WebCore::ScrollViewCanvasQt::dragMoveEvent):
408         * platform/qt/ScrollViewCanvasQt.h:
409         * platform/qt/ScrollViewQt.cpp:
410         (WebCore::ScrollView::wheelEvent):
411         * platform/qt/WheelEventQt.cpp: Added.
412         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
413
414 2007-01-25  Rob Buis  <buis@kde.org>
415
416         Reviewed by Maciej.
417
418         http://bugs.webkit.org/show_bug.cgi?id=12391
419         SVG containers with viewports should respect overflow when hit testing
420
421         Take into account the overflow property when hit testing <svg>.
422
423         * rendering/RenderSVGContainer.cpp:
424         (WebCore::RenderSVGContainer::nodeAtPoint):
425
426 2007-01-23  Alice Liu  <alice.liu@apple.com>
427
428         Reviewed by Maciej.
429
430         fixed <rdar://problem/4808039> REGRESSION: eBay ID check never completes
431         Also known as http://bugs.webkit.org/show_bug.cgi?id=11230
432
433         * bindings/js/kjs_window.cpp:
434         It's not necessary to check safeScript when doing a location.replace, .reload, or .assign
435         (KJS::Location::getOwnPropertySlot):
436         (KJS::LocationFunc::callAsFunction):
437
438 2007-01-25  Alice Liu  <alice.liu@apple.com>
439
440         Reviewed by Geoff and Adele.
441
442         fixed <rdar://problem/4866655> REGRESSION: Copying out of Calculator & CIFIlterWidget is broken on 9A320
443
444         * editing/Editor.cpp:
445         (WebCore::Editor::canDHTMLCut):
446         (WebCore::Editor::canDHTMLCopy):
447         (WebCore::Editor::tryDHTMLCopy):
448         (WebCore::Editor::tryDHTMLCut):
449         Reverting some mistakes made in r17504:
450         Anything in r17503 that used to call mayDHTML* still calls canDHTML* as it was changed in r17504, where canDHTML* now calls !selectionController::isInPasswordField instead of editor::canCopy
451         Anything else in r17503 that used to call mayCopy now calls (!)selectionController::isInPasswordField.
452
453         * editing/JSEditor.cpp:
454         copy via JS should be enabled as long as selection is not in a password field.  a range selection shouldn't be required. 
455
456 2007-01-24  Adele Peterson  <adele@apple.com>
457
458         Reviewed by Brady and Oliver.
459
460         Fix for <rdar://problem/4953504> When the keydown event changes focus, the keypress event should go to the new focused node
461
462         Test: fast/events/keydown-keypress-focus-change.html
463
464         * page/EventHandler.cpp:
465         (WebCore::eventTargetNodeForDocument): Added for convenience.
466         (WebCore::EventHandler::keyEvent): Moved from EventHandlerMac.mm.  After dispatching the keyDown event,
467          recheck the target node for the keyPress event in case its changed.
468         * page/EventHandler.h:
469         * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::keyEvent):
470           Moved the bulk of this code to EventHandler.cpp.
471
472 2007-01-24  Geoffrey Garen  <ggaren@apple.com>
473
474         New forwarding header. No review necessary.
475
476         * ForwardingHeaders/kjs/ustring.h: Added.
477
478 2007-01-24  Oliver Hunt  <oliver@apple.com>
479
480         Reviewed by Maciej.
481
482         Migrating more drag state information to WebCore
483
484         * page/DragController.cpp:
485         * page/DragController.h:
486         (WebCore::DragController::dragOperation):
487         (WebCore::DragController::setDraggingImageURL):
488         (WebCore::DragController::draggingImageURL):
489         (WebCore::DragController::setDragOffset):
490         (WebCore::DragController::dragOffset):
491
492 2007-01-24  Darin Adler  <darin@apple.com>
493
494         Reviewed by Adele.
495
496         - fix http://bugs.webkit.org/show_bug.cgi?id=12331
497           REGRESSION(r18951): Selecting text in a textarea makes the page scroll
498
499         Test: fast/events/autoscroll.html
500
501         * rendering/RenderLayer.cpp: (WebCore::RenderLayer::autoscroll):
502         Adjust position to be relative to the object's corner for the hit test, but not for the
503         scrollRectToVisible call. The previous version accidentally re-used the version that was
504         adjusted for the hit test.
505
506 2007-01-24  Beth Dakin  <bdakin@apple.com>
507
508         Reviewed by Geoff.
509
510         Fix for <rdar://problem/4948128> REGRESSION: A crash occurs at 
511         WebCore::Frame::view() after completing a query at mapquest.com 
512         then switching to Bookmarks view
513
514         This is just a null-check. If you are in strict mode and ask for 
515         the clientWidth or clientHeight after the document was removed from 
516         it's parent, we no longer have a frameView, so we have to null-
517         check it. I added null checks for the FrameView in some other 
518         places where it seems like we could potentially run into this 
519         issue.
520
521         * bindings/objc/DOMHTML.mm:
522         (-[DOMHTMLInputElement _rectOnScreen]):
523         * bridge/mac/WebCoreAXObject.mm:
524         (-[WebCoreAXObject accessibilityAttributeValue:]):
525         * dom/ContainerNode.cpp:
526         (WebCore::ContainerNode::getUpperLeftCorner):
527         * dom/Element.cpp:
528         (WebCore::Element::clientWidth): Actual bug fix here!
529         (WebCore::Element::clientHeight): And here!
530         * ksvg2/svg/SVGLength.cpp:
531         (WebCore::SVGLength::PercentageOfViewport):
532         * loader/FrameLoader.cpp:
533         (WebCore::FrameLoader::createJavaAppletWidget):
534         * page/mac/WebCoreFrameBridge.mm:
535         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
536         * rendering/RenderLayer.cpp:
537         (WebCore::RenderLayer::windowClipRect):
538         (WebCore::RenderLayer::updateOverflowStatus):
539         (WebCore::frameVisibleRect):
540         * rendering/RenderListBox.cpp:
541         (WebCore::RenderListBox::windowClipRect):
542         * rendering/RenderTable.cpp:
543         (WebCore::RenderTable::layout):
544
545 2007-01-24  Maciej Stachowiak  <mjs@apple.com>
546
547         Not reviewed, just removing accidentally committed file.
548
549         - removed file that shouldn't be there
550
551         * Image Viewer/Image Viewer.aps: Removed.
552
553 2007-01-24  Anders Carlsson  <acarlsson@apple.com>
554
555         Reviewed by Geoff and Adam.
556
557         <rdar://problem/4922655>
558         http://galeri.milliyet.com.tr/ reproducibly crashes Safari
559         
560         * loader/FrameLoader.cpp:
561         (WebCore::FrameLoader::requestFrame):
562         If the frame already exists, defer the navigation so that we won't end up replacing the document
563         while we're parsing it. This is similar to what setting window.location ends up doing.
564
565 2007-01-25  Mark Rowe  <mrowe@apple.com>
566
567         Reviewed by Darin.
568
569         * Info.plist: Update copyright string.
570
571 2007-01-24  Justin Garcia  <justin.garcia@apple.com>
572
573         Reviewed by harrison
574
575         <rdar://problem/4916235>
576         eBay Editor: Crash occurs at WebCore::Range::startPosition() after applying ordered list styling to selected text
577         <rdar://problem/4857269>
578         REGRESSION: editing/execCommand/create-list-from-range-selection.html no longer works as intended
579         <rdar://problem/4916583>
580         eBay Editor: Removing a indent from a list item actually deletes the list item instead
581         <rdar://problem/4928635>
582         designMode outdent causes crash (11750)
583
584         * editing/CompositeEditCommand.cpp:
585         (WebCore::CompositeEditCommand::moveParagraphs): Fixed br insertion
586         after the pruning of empty containers left over after the paragraph
587         to move is removed.
588         * editing/DeleteSelectionCommand.cpp:
589         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): There are
590         bugs that leave the wrong number of line breaks after a deletion 
591         that expands to include special elements (lists/tables).  Added 
592         a workaround so that moveParagraphs can avoid these until they 
593         are fixed.
594         (WebCore::DeleteSelectionCommand::initializeStartEnd): Ditto.
595         (WebCore::DeleteSelectionCommand::initializePositionData): Ditto.
596         * editing/DeleteSelectionCommand.h:
597         * editing/TextIterator.cpp:
598         (WebCore::TextIterator::advance): We used to not call exitNode for
599         ancestors of a node where the next node in a pre-order traversal is 
600         the ranges's pastEndNode().  This is only correct for ancestors that
601         contain the end of the range.
602         (WebCore::shouldEmitNewlineAfterNode): Added, we should only emit newlines
603         after blocks that have VisiblePositions after them.  VisiblePosition creation
604         though is too expensive to do here, what I added here is an OK substitute.
605         (WebCore::shouldEmitNewlineBeforeNode): Added.  No special logic yet.
606         (WebCore::TextIterator::handleNonTextNode): Call shouldEmitNewlineBeforeNode.
607         (WebCore::TextIterator::exitNode): Call shouldEmitNewlineAfterNode.
608         (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Call
609         shouldEmitNewlineAfterNode.
610
611 2007-01-24  Darin Adler  <darin@apple.com>
612
613         Reviewed by Mark Rowe.
614
615         * WebCore.xcodeproj/project.pbxproj: Changed to /usr/sbin/sysctl
616         so we don't rely on people's paths.
617
618 2007-01-24  Darin Adler  <darin@apple.com>
619
620         Reviewed by Adele.
621
622         - a couple minor tweaks to recently-changed things
623
624         * dom/Document.h: Use HTMLHeadElement as type for the head function.
625         * dom/Document.cpp: (WebCore::Document::head):
626
627         * ksvg2/svg/SVGElementInstance.cpp:
628         (WebCore::SVGElementInstance::~SVGElementInstance): Change loop to
629         a for loop and use a local variable for document.
630
631 2007-01-24  Oliver Hunt  <oliver@apple.com>
632
633         Reviewed by Adele.
634
635         Fixes DragController to allow a null target Document.
636         This is encountered in new tabs/windows that have not 
637         loaded any page
638
639         * page/DragController.cpp:
640         (WebCore::documentAtPoint):
641         (WebCore::DragController::tryDocumentDrag):
642         (WebCore::DragController::operationForLoad):
643         (WebCore::DragController::concludeDrag):
644         * page/mac/DragControllerMac.mm:
645         (WebCore::DragController::dragOperation):
646
647 2007-01-24  Sam Weinig  <sam@webkit.org>
648
649         Reviewed by Mitz.
650
651         Patch for http://bugs.webkit.org/show_bug.cgi?id=12394
652         Cleanup RenderBox
653
654         No functionality changes, just a good old fashion cleanup,
655         thus no tests.
656
657         * rendering/RenderBox.cpp:
658         (WebCore::RenderBox::RenderBox):
659         (WebCore::RenderBox::setStyle):
660         (WebCore::RenderBox::destroy):
661         (WebCore::RenderBox::setPos):
662         (WebCore::RenderBox::calcBorderBoxWidth):
663         (WebCore::RenderBox::calcBorderBoxHeight):
664         (WebCore::RenderBox::calcContentBoxWidth):
665         (WebCore::RenderBox::calcContentBoxHeight):
666         (WebCore::RenderBox::nodeAtPoint):
667         (WebCore::RenderBox::paintRootBoxDecorations):
668         (WebCore::RenderBox::paintBoxDecorations):
669         (WebCore::RenderBox::paintBackgrounds):
670         (WebCore::RenderBox::paintBackground):
671         (WebCore::cacluateBackgroundSize):
672         (WebCore::RenderBox::paintBackgroundExtended):
673         (WebCore::RenderBox::getOverflowClipRect):
674         (WebCore::RenderBox::getClipRect):
675         (WebCore::RenderBox::containingBlockWidth):
676         (WebCore::RenderBox::absolutePosition):
677         (WebCore::RenderBox::dirtyLineBoxes):
678         (WebCore::RenderBox::position):
679         (WebCore::RenderBox::getAbsoluteRepaintRect):
680         (WebCore::RenderBox::computeAbsoluteRepaintRect):
681         (WebCore::RenderBox::repaintDuringLayoutIfMoved):
682         (WebCore::RenderBox::relativePositionOffsetX):
683         (WebCore::RenderBox::relativePositionOffsetY):
684         (WebCore::RenderBox::calcWidth):
685         (WebCore::RenderBox::calcWidthUsing):
686         (WebCore::RenderBox::sizesToIntrinsicWidth):
687         (WebCore::RenderBox::calcHorizontalMargins):
688         (WebCore::RenderBox::calcHeight):
689         (WebCore::RenderBox::calcPercentageHeight):
690         (WebCore::RenderBox::calcReplacedWidthUsing):
691         (WebCore::RenderBox::calcReplacedHeightUsing):
692         (WebCore::RenderBox::availableHeightUsing):
693         (WebCore::RenderBox::calcVerticalMargins):
694         (WebCore::RenderBox::containingBlockWidthForPositioned):
695         (WebCore::RenderBox::calcAbsoluteHorizontal):
696         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
697         (WebCore::RenderBox::calcAbsoluteVertical):
698         (WebCore::RenderBox::calcAbsoluteVerticalValues):
699         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
700         (WebCore::RenderBox::caretRect):
701         * rendering/RenderBox.h:
702         (WebCore::RenderBox::setOverrideSize):
703         (WebCore::RenderBox::width):
704         (WebCore::RenderBox::height):
705         (WebCore::RenderBox::setWidth):
706         (WebCore::RenderBox::setHeight):
707         (WebCore::RenderBox::inlineBoxWrapper):
708         (WebCore::RenderBox::setInlineBoxWrapper):
709         (WebCore::RenderBox::stretchesToViewHeight):
710         (WebCore::RenderBox::setStaticX):
711         (WebCore::RenderBox::setStaticY):
712
713 2007-01-24  Eric Seidel  <eric@webkit.org>
714
715         Reviewed by ap.
716
717         Converted SVGTransform from being Shared<T> to a POD type.
718
719         No functional changes, thus no tests.
720
721         * bindings/scripts/CodeGenerator.pm:
722         * bindings/scripts/CodeGeneratorJS.pm:
723         * ksvg2/misc/SVGTimer.cpp:
724         (WebCore::baseValueTransformList):
725         * ksvg2/svg/SVGAnimateTransformElement.cpp:
726         (WebCore::SVGAnimateTransformElement::storeInitialValue):
727         (WebCore::SVGAnimateTransformElement::resetValues):
728         (WebCore::SVGAnimateTransformElement::updateCurrentValue):
729         (WebCore::SVGAnimateTransformElement::handleStartCondition):
730         (WebCore::SVGAnimateTransformElement::applyAnimationToValue):
731         (WebCore::SVGAnimateTransformElement::parseTransformValue):
732         * ksvg2/svg/SVGAnimateTransformElement.h:
733         * ksvg2/svg/SVGLinearGradientElement.cpp:
734         (WebCore::SVGLinearGradientElement::collectGradientProperties):
735         * ksvg2/svg/SVGPatternElement.cpp:
736         (WebCore::SVGPatternElement::collectPatternProperties):
737         * ksvg2/svg/SVGRadialGradientElement.cpp:
738         (WebCore::SVGRadialGradientElement::collectGradientProperties):
739         * ksvg2/svg/SVGSVGElement.cpp:
740         (WebCore::SVGSVGElement::createSVGTransform):
741         (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
742         * ksvg2/svg/SVGSVGElement.h:
743         * ksvg2/svg/SVGStyledTransformableElement.cpp:
744         (WebCore::SVGStyledTransformableElement::updateLocalTransform):
745         * ksvg2/svg/SVGTextElement.cpp:
746         (WebCore::SVGTextElement::updateLocalTransform):
747         * ksvg2/svg/SVGTransform.cpp:
748         (SVGTransform::SVGTransform):
749         (SVGTransform::isValid):
750         * ksvg2/svg/SVGTransform.h:
751         * ksvg2/svg/SVGTransform.idl:
752         * ksvg2/svg/SVGTransformList.cpp:
753         (SVGTransformList::SVGTransformList):
754         (SVGTransformList::createSVGTransformFromMatrix):
755         (SVGTransformList::consolidate):
756         (SVGTransformList::concatenate):
757         * ksvg2/svg/SVGTransformList.h:
758         * ksvg2/svg/SVGTransformable.cpp:
759         (WebCore::SVGTransformable::parseTransformAttribute):
760
761 2007-01-24  Mark Rowe  <mrowe@apple.com>
762
763         Reviewed by Eric.
764
765         Plug another bunch of SVG memory leaks.
766
767         * ksvg2/misc/SVGDocumentExtensions.cpp:
768         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions): Delete memory we have allocated.
769         (WebCore::SVGDocumentExtensions::removePendingResource): Return an auto_ptr to show that we are transferring ownership.
770         * ksvg2/misc/SVGDocumentExtensions.h:
771         * ksvg2/svg/SVGElement.cpp:
772         (WebCore::SVGElement::insertedIntoDocument): Update for use of auto_ptr.
773
774 2007-01-23  Mark Rowe  <mrowe@apple.com>
775
776         Reviewed by Brady.
777
778         Plug thousands of node leaks seen running layout tests.
779
780         * ksvg2/svg/SVGElementInstance.cpp:
781         (WebCore::SVGElementInstance::~SVGElementInstance): Disassociate ourselves from our children so they will
782         be destroyed if we were the only thing referencing them.
783         * ksvg2/svg/SVGUseElement.cpp:
784         (WebCore::SVGUseElement::removedFromDocument):
785         * ksvg2/svg/SVGUseElement.h:
786
787 2007-01-23  Alice Liu  <alice.liu@apple.com>
788
789         Reviewed by Brady.
790
791         * editing/Editor.cpp:
792         (WebCore::Editor::appliedEditing):
793         minor change.  removing unnecessary call to frame to fetch editor
794
795 2007-01-23  Mark Rowe  <mrowe@apple.com>
796
797         Reviewed by Adele.
798
799         http://bugs.webkit.org/show_bug.cgi?id=12375
800         Bug 12375: REGRESSION(r19038): fast/dom/title-text-property-2.html failing
801
802         Fix regression by making setTitle/updateTitle/removeTitle logic match document.title
803         specification at http://whatwg.org/specs/web-apps/current-work/#the-title1.
804
805         * dom/Document.cpp:
806         (WebCore::Document::setTitle): Materialize a title element into the head if one doesn't exist when setting
807         document.title.  Also update the contents of the title element when the title is set via document.title.
808         (WebCore::Document::removeTitle): Update the title based on first title element in the head, if one exists.
809         (WebCore::Document::head): Convenience method to retrieve the head element in an HTML document.
810         * dom/Document.h:
811
812 2007-01-23  Beth Dakin  <bdakin@apple.com>
813
814         Reviewed by Hyatt.
815
816         Follow-up to the fix below for 4843226.
817
818         * rendering/RenderLayer.cpp:
819         (WebCore::transparencyClipBox): Has to be recursive or we will miss 
820         out on grandchildren!
821
822 2007-01-23  Oliver Hunt  <oliver@apple.com>
823
824         Reviewed by Adam.
825
826         Fixes dropping of files into safari
827
828         * page/DragController.cpp:
829         (WebCore::DragController::performDrag):
830
831 2007-01-23  Brady Eidson  <beidson@apple.com>
832
833         Reviewed by Darin
834
835         Added a couple of CF things previously missed
836
837         * platform/network/ResourceError.h:
838         * platform/network/ResourceHandle.h:
839
840 2007-01-23  Nikolas Zimmermann  <zimmermann@kde.org>
841
842         Reviewed by Maciej.
843
844         Fix evil genericContext() assertion, which occours sometimes when running DRT.
845         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12379
846
847         * bindings/scripts/CodeGeneratorJS.pm:
848         * ksvg2/misc/SVGDocumentExtensions.h:
849         (WebCore::SVGDocumentExtensions::genericContextMap):
850         (WebCore::SVGDocumentExtensions::forgetGenericContext):
851
852 2007-01-23  Beth Dakin  <bdakin@apple.com>
853
854         Reviewed by Hyatt.
855
856         Fix for <rdar://problem/4843226> REGRESSION: Pull down menu appears 
857         clipped at http://istweb.apple.com/
858
859         * rendering/RenderLayer.cpp:
860         (WebCore::transparencyClipBox): Always unite with sibling rects.
861
862 2007-01-22  Justin Garcia  <justin.garcia@apple.com>
863
864         Reviewed by john
865
866         <rdar://problem/4920742>
867         REGRESSION: GMail Editor: Attempting to remove formatting from selection results in a crash at WebCore::Range::checkDeleteExtract()
868
869         * dom/Range.cpp:
870         (WebCore::Range::checkDeleteExtract): Return if there is no
871         commonAncestor container or if commonAncestorContainer() throws
872         an exception.
873         * editing/Editor.cpp:
874         (WebCore::Editor::removeFormattingAndStyle): Fixed a bug that reversed
875         the order of the selected paragraphs.
876
877 2007-01-23  Nikolas Zimmermann  <zimmermann@kde.org>
878
879         Reviewed by Sam.
880
881         Fix dynamic creation/updates of markers, masks, clipPaths, and several tiny pattern issues.
882         Added 16 (!) new layout tests covering quite some weird scenerios - Batik & Opera do have problems, we don't.
883
884         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12380
885         Fixes: svg/custom/image-with-transform-clip-filter.svg (filter shows up again)
886
887         Added: svg/custom/clip-path-child-changes.svg
888         Added: svg/custom/clip-path-href-changes.svg
889         Added: svg/custom/clip-path-units-changes.svg
890         Added: svg/custom/deep-dynamic-updates.svg
891         Added: svg/custom/js-late-clipPath-and-object-creation.svg
892         Added: svg/custom/js-late-clipPath-creation.svg
893         Added: svg/custom/js-late-marker-and-object-creation.svg
894         Added: svg/custom/js-late-marker-creation.svg
895         Added: svg/custom/js-late-mask-and-object-creation.svg
896         Added: svg/custom/js-late-mask-creation.svg
897         Added: svg/custom/js-update-pattern-child.svg
898         Added: svg/custom/marker-changes.svg
899         Added: svg/custom/marker-child-changes.svg
900         Added: svg/custom/marker-viewBox-changes.svg
901         Added: svg/custom/mask-changes.svg
902         Added: svg/custom/mask-child-changes.svg
903
904         * ksvg2/misc/KCanvasRenderingStyle.cpp:
905         (WebCore::KSVGPainterFactory::fillPaintServer):
906         (WebCore::KSVGPainterFactory::strokePaintServer):
907         * ksvg2/svg/SVGClipPathElement.cpp:
908         (WebCore::SVGClipPathElement::notifyAttributeChange):
909         * ksvg2/svg/SVGClipPathElement.h:
910         * ksvg2/svg/SVGGradientElement.cpp:
911         * ksvg2/svg/SVGGradientElement.h:
912         * ksvg2/svg/SVGMarkerElement.cpp:
913         (WebCore::SVGMarkerElement::canvasResource):
914         (WebCore::SVGMarkerElement::notifyAttributeChange):
915         * ksvg2/svg/SVGMarkerElement.h:
916         * ksvg2/svg/SVGMaskElement.cpp:
917         (WebCore::SVGMaskElement::notifyAttributeChange):
918         * ksvg2/svg/SVGMaskElement.h:
919         * ksvg2/svg/SVGStopElement.cpp:
920         (WebCore::SVGStopElement::notifyAttributeChange):
921         * ksvg2/svg/SVGStyledElement.cpp:
922         (WebCore::SVGStyledElement::notifyAttributeChange):
923         (WebCore::SVGStyledElement::notifyResourceParentIfExistant):
924         (WebCore::SVGStyledElement::rebuildRenderer):
925         * ksvg2/svg/SVGStyledElement.h:
926         * ksvg2/svg/SVGUseElement.cpp:
927         (WebCore::SVGUseElement::notifyAttributeChange):
928         * platform/graphics/svg/SVGResource.cpp:
929         (WebCore::SVGResource::invalidate):
930         (WebCore::SVGResource::addClient):
931         (WebCore::SVGResource::repaintClients):
932         * platform/graphics/svg/SVGResource.h:
933         * platform/graphics/svg/SVGResourceMarker.cpp:
934         (WebCore::SVGResourceMarker::draw):
935         (WebCore::SVGResourceMarker::cachedBounds):
936         * platform/graphics/svg/SVGResourceMarker.h:
937         * rendering/RenderPath.cpp:
938         (WebCore::RenderPath::layout):
939         (WebCore::RenderPath::getAbsoluteRepaintRect):
940         (WebCore::RenderPath::paint):
941         (WebCore::drawMarkerWithData):
942         (WebCore::RenderPath::drawMarkersIfNeeded):
943         * rendering/RenderPath.h:
944         * rendering/RenderSVGContainer.cpp:
945         (WebCore::RenderSVGContainer::paint):
946         (WebCore::RenderSVGContainer::getAbsoluteRepaintRect):
947         * rendering/RenderSVGImage.cpp:
948         (WebCore::RenderSVGImage::paint):
949         (WebCore::RenderSVGImage::getAbsoluteRepaintRect):
950         * rendering/SVGInlineFlowBox.cpp:
951         (WebCore::paintSVGInlineFlow):
952
953 2007-01-23  Adele Peterson  <adele@apple.com>
954
955         Reviewed by Darin.
956         
957         WebCore part of fix for <rdar://problem/4946753>REGRESSION: Inserting tabs is broken in Mail
958
959         In addition to this fix, I also reorganized some event handling code for keyPress events to
960         prepare for another fix.  There's also just a little bit of unrelated cleanup.
961         
962         * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler):
963           Move tab focus behavior into new defaultKeyboardEventHandler method.
964         
965         * bridge/EditorClient.h: Added handleKeyPress.
966         * editing/Editor.cpp:
967         (WebCore::Editor::handleKeyPress): Added. Calls over to the client method.
968         (WebCore::Editor::deleteRange): Removed unnecessary propogateDOMException.
969         * editing/Editor.h: Added handleKeyPress.
970         (WebCore::Editor::addToKillRing): Formatting cleanup.
971         * editing/mac/EditorMac.mm: Removed unnecessary propogateDOMException.
972         
973         * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): Added. Checks
974           the tabKeyCyclesThroughElements setting before advancing focus for tab key events.  Calls handleKeyPress.
975         * page/EventHandler.h: Added defaultKeyboardEventHandler.
976         
977         * page/Page.cpp: (WebCore::Page::Page): Initialize m_tabKeyCyclesThroughElements to true.
978         * page/Page.h: Added m_tabKeyCyclesThroughElements.
979         (WebCore::Page::setTabKeyCyclesThroughElements): Added.
980         (WebCore::Page::tabKeyCyclesThroughElements): Added.
981         
982         * platform/PlatformKeyboardEvent.h: Added ability to get NSEvent from PlatformKeyboardEvent.
983         * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
984           Initialize m_macEvent to the NSEvent.
985         
986         * platform/graphics/svg/SVGImageEmptyClients.h: (WebCore::SVGEmptyEditorClient::handleKeyPress): Added.
987
988 2007-01-23  George Staikos  <staikos@kde.org>
989
990         Compile with a released Qt.
991
992         * platform/graphics/qt/ImageQt.cpp:
993
994 2007-01-23  Lars Knoll <lars@trolltech.com>
995
996         Reviewed by Zack
997
998         Widget and ScrollView do not own the Qt widgets
999         anymore. Make sure they can handle the case of
1000         a null QWidget and never delete them.
1001
1002         * platform/qt/ScrollViewQt.cpp:
1003         (WebCore::ScrollView::setScrollArea):
1004         (WebCore::ScrollView::updateContents):
1005         (WebCore::ScrollView::visibleWidth):
1006         (WebCore::ScrollView::visibleHeight):
1007         (WebCore::ScrollView::visibleContentRect):
1008         (WebCore::ScrollView::setContentsPos):
1009         (WebCore::ScrollView::resizeContents):
1010         (WebCore::ScrollView::contentsX):
1011         (WebCore::ScrollView::contentsY):
1012         (WebCore::ScrollView::contentsWidth):
1013         (WebCore::ScrollView::contentsHeight):
1014         (WebCore::ScrollView::scrollOffset):
1015         (WebCore::ScrollView::scrollBy):
1016         (WebCore::ScrollView::hScrollbarMode):
1017         (WebCore::ScrollView::vScrollbarMode):
1018         (WebCore::ScrollView::setHScrollbarMode):
1019         (WebCore::ScrollView::setVScrollbarMode):
1020         * platform/qt/WidgetQt.cpp:
1021         (WebCore::WidgetPrivate::~WidgetPrivate):
1022         (WebCore::Widget::setQWidget):
1023
1024 2007-01-23  Zack Rusin  <zack@kde.org>
1025
1026         Forgot to add one new file to the build.
1027
1028         * WebCore.pro: Add dom/clipboard.cpp
1029
1030 2007-01-23  Zack Rusin  <zack@kde.org>
1031
1032         Fix the Qt build
1033
1034         * page/DragActions.h:
1035         * page/DragController.cpp:
1036         * platform/qt/DragDataQt.cpp:
1037         (WebCore::DragData::canSmartReplace):
1038         (WebCore::DragData::containsColor):
1039         (WebCore::DragData::containsPlainText):
1040         (WebCore::DragData::asPlainText):
1041         (WebCore::DragData::asColor):
1042         (WebCore::DragData::createClipboard):
1043         (WebCore::DragData::containsCompatibleContent):
1044         (WebCore::DragData::containsURL):
1045         (WebCore::DragData::asURL):
1046         (WebCore::DragData::asFragment):
1047         * platform/qt/FileChooserQt.cpp:
1048
1049 2007-01-23  Lars Knoll <lars@trolltech.com>
1050
1051         Reviewed by Maciej
1052
1053         Make the last remaining pieces of the FrameLoader platform 
1054         independent. Move most of the code over to WebFrameLoaderClient.
1055         Some smaller cleanups in the WebFrameBridge, and moved some
1056         platform independent functionality over to the shared code
1057         in WebCore.
1058         
1059         * WebCore.exp:
1060         * WebCore.pro:
1061         * WebCore.xcodeproj/project.pbxproj:
1062         * loader/FrameLoader.cpp:
1063         (WebCore::FrameLoader::loadSubframe):
1064         (WebCore::FrameLoader::shouldUsePlugin):
1065         (WebCore::FrameLoader::loadPlugin):
1066         (WebCore::FrameLoader::detachFromParent):
1067         (WebCore::FrameLoader::partClearedInBegin):
1068         (WebCore::FrameLoader::createJavaAppletWidget):
1069         (WebCore::FrameLoader::didChangeTitle):
1070         * loader/FrameLoader.h:
1071         * loader/FrameLoaderClient.h:
1072         * loader/FrameLoaderTypes.h:
1073         (WebCore::):
1074         * loader/PluginDocument.cpp:
1075         (WebCore::PluginTokenizer::writeRawData):
1076         * loader/mac/FrameLoaderMac.mm: Removed.
1077         * loader/qt/FrameLoaderQt.cpp: Removed.
1078         * page/Frame.cpp:
1079         (WebCore::Frame::Frame):
1080         * page/FrameView.cpp:
1081         (WebCore::FrameView::mediaType):
1082         * page/qt/FrameQt.cpp:
1083         (WebCore::FrameQt::FrameQt):
1084         * platform/graphics/svg/SVGImageEmptyClients.h:
1085         (WebCore::SVGEmptyFrameLoaderClient::makeRepresentation):
1086         (WebCore::SVGEmptyFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
1087         (WebCore::SVGEmptyFrameLoaderClient::dispatchDidCommitLoad):
1088         (WebCore::SVGEmptyFrameLoaderClient::dispatchDidFailLoad):
1089         (WebCore::SVGEmptyFrameLoaderClient::dispatchCreatePage):
1090         (WebCore::SVGEmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1091         (WebCore::SVGEmptyFrameLoaderClient::dispatchUnableToImplementPolicy):
1092         (WebCore::SVGEmptyFrameLoaderClient::revertToProvisionalState):
1093         (WebCore::SVGEmptyFrameLoaderClient::setMainDocumentError):
1094         (WebCore::SVGEmptyFrameLoaderClient::startDownload):
1095         (WebCore::SVGEmptyFrameLoaderClient::committedLoad):
1096         (WebCore::SVGEmptyFrameLoaderClient::shouldFallBack):
1097         (WebCore::SVGEmptyFrameLoaderClient::willUseArchive):
1098         (WebCore::SVGEmptyFrameLoaderClient::createDocumentLoader):
1099         (WebCore::SVGEmptyFrameLoaderClient::createFrame):
1100         (WebCore::SVGEmptyFrameLoaderClient::createPlugin):
1101         (WebCore::SVGEmptyFrameLoaderClient::createJavaAppletWidget):
1102         (WebCore::SVGEmptyFrameLoaderClient::objectContentType):
1103         (WebCore::SVGEmptyFrameLoaderClient::overrideMediaType):
1104         (WebCore::SVGEmptyFrameLoaderClient::redirectDataToPlugin):
1105         (WebCore::SVGEmptyFrameLoaderClient::windowObjectCleared):
1106
1107 2007-01-23  Oliver Hunt  <oliver@apple.com>
1108
1109         Reviewed by Adam.
1110
1111         Added DragController to handled drag and drop state and control logic.
1112         Currently this only handles logic for Dragging and Dropping, and is 
1113         unable to initialise a drag itself.
1114
1115         platform/DragData encapsulate the paltform Drag data (NSDraggingInfo on Mac, 
1116         QMimeType in Qt).  This provides methods to pull data out the drag data as a String, 
1117         a URL, a DocumentFragment (for rich content), or a Colour.
1118
1119         * WebCore.exp:
1120         * WebCore.pro:
1121         * WebCore.xcodeproj/project.pbxproj:
1122         * dom/Clipboard.cpp: Added.
1123         (WebCore::Clipboard::setAccessPolicy):
1124         (WebCore::dragOpFromIEOp):
1125         (WebCore::IEOpFromDragOp):
1126         (WebCore::Clipboard::sourceOperation):
1127         (WebCore::Clipboard::destinationOperation):
1128         (WebCore::Clipboard::setSourceOperation):
1129         (WebCore::Clipboard::setDestinationOperation):
1130         (WebCore::Clipboard::setDropEffect):
1131         (WebCore::Clipboard::setEffectAllowed):
1132           move platform independent functions from ClipboardMac to Clipboard
1133
1134         * dom/Clipboard.h:
1135         (WebCore::Clipboard::Clipboard):
1136         (WebCore::Clipboard::dropEffect):
1137         (WebCore::Clipboard::effectAllowed):
1138         (WebCore::Clipboard::policy):
1139           as above -- also removed virtual modifier from now 
1140           platform independent methods
1141
1142         * editing/Editor.cpp:
1143         (WebCore::Editor::smartInsertDeleteEnabled): 
1144         (WebCore::Editor::shouldApplyStyle):
1145         * editing/Editor.h:
1146           adding calls through to EditorClient
1147          
1148         * page/DragActions.h: Added.
1149         (WebCore::):
1150           Replicates a number of NS* enums in the WebCore namespace
1151
1152         * page/DragClient.h: Added.
1153         (WebCore::DragClient::~DragClient):
1154           Standard client interface for dragging UIDelegate
1155
1156         * page/DragController.cpp: Added.
1157         (WebCore::createMouseEvent):
1158         (WebCore::DragController::DragController):
1159         (WebCore::DragController::~DragController):
1160         (WebCore::documentFragmentFromDragData):
1161         (WebCore::DragController::isMoveDrag):
1162         (WebCore::visiblePositionForPoint):
1163         (WebCore::DragController::cancelDrag):
1164         (WebCore::documentAtPoint):
1165         (WebCore::DragController::dragEntered):
1166         (WebCore::DragController::dragExited):
1167         (WebCore::DragController::dragUpdated):
1168         (WebCore::DragController::performDrag):
1169         (WebCore::DragController::dragEnteredOrUpdated):
1170         (WebCore::DragController::tryDocumentDrag):
1171         (WebCore::DragController::operationForLoad):
1172         (WebCore::DragController::concludeDrag):
1173         (WebCore::DragController::canProcessDrag):
1174         (WebCore::DragController::tryDHTMLDrag):
1175           Class to handle state and logic for dragging and dropping
1176
1177         * page/DragController.h: Added.
1178         (WebCore::DragController::client):
1179         (WebCore::DragController::didInitiateDrag):
1180         (WebCore::DragController::isHandlingDrag):
1181         (WebCore::DragController::dragOperation):
1182         (WebCore::DragController::document):
1183         (WebCore::DragController::dragInitiator):
1184         (WebCore::DragController::dragDestinationAction):
1185         (WebCore::DragController::dragSourceAction):
1186         (WebCore::DragController::dragEnded):
1187         (WebCore::DragController::setIsHandlingDrag):
1188         (WebCore::DragController::setDidInitiateDrag):
1189         (WebCore::DragController::setDragOperation):
1190         (WebCore::DragController::setDragSourceAction):
1191         (WebCore::DragController::setDragInitiator):
1192           See above
1193
1194         * page/Page.cpp:
1195         (WebCore::Page::Page):
1196           Update Page to have DragController
1197
1198         * page/Page.h:
1199         (WebCore::Page::dragController):
1200           ditto
1201
1202         * page/mac/DragControllerMac.mm: Added.
1203         (WebCore::DragController::isCopyKeyDown):
1204         (WebCore::DragController::dragOperation):
1205           Platform specific portions of the DragController
1206
1207         * page/mac/EventHandlerMac.mm:
1208         (WebCore::EventHandler::handleDrag):
1209         (WebCore::EventHandler::dragSourceEndedAt):
1210           Convert from NSDragOperation to WebCore::DragOperation
1211
1212         * page/mac/WebCoreFrameBridge.h:
1213         * page/mac/WebCoreFrameBridge.mm:
1214           Remove obsolete Drag functions
1215
1216         * page/qt/DragControllerQt.cpp: Added.
1217         (WebCore::DragController::isCopyKeyDown):
1218         (WebCore::DragController::dragOperation):
1219           Basic stubs to maintain Qt  build
1220
1221         * platform/DragData.cpp: Added.
1222         (WebCore::DragData::DragData):
1223         * platform/DragData.h: Added.
1224         (WebCore::DragData::clientPosition):
1225         (WebCore::DragData::globalPosition):
1226         (WebCore::DragData::platformData):
1227         (WebCore::DragData::draggingSourceOperationMask):
1228           DragData class to encapsulate platform drag data/event
1229
1230         * platform/graphics/svg/SVGImage.cpp:
1231         (WebCore::SVGImage::setData):
1232           Addition of dummy DragClient
1233
1234         * platform/graphics/svg/SVGImageEmptyClients.h:
1235         (WebCore::SVGEmptyDragClient::~SVGEmptyDragClient):
1236         (WebCore::SVGEmptyDragClient::willPerformDragDestinationAction):
1237         (WebCore::SVGEmptyDragClient::actionMaskForDrag):
1238         (WebCore::SVGEmptyDragClient::dragControllerDestroyed):
1239           ditto
1240
1241         * platform/mac/ClipboardMac.h:
1242         * platform/mac/ClipboardMac.mm:
1243         (WebCore::ClipboardMac::ClipboardMac):
1244         (WebCore::ClipboardMac::clearData):
1245         (WebCore::ClipboardMac::clearAllData):
1246         (WebCore::ClipboardMac::getData):
1247         (WebCore::ClipboardMac::setData):
1248         (WebCore::ClipboardMac::types):
1249         (WebCore::ClipboardMac::setDragImage):
1250          Moving platform independent logic to Clipboard, and updating
1251          platform specific methods to use appropriate accessors rather than 
1252          directly manipulating data they no longer own
1253
1254         * platform/mac/DragDataMac.mm: Added.
1255         (WebCore::DragData::DragData):
1256         (WebCore::DragData::canSmartReplace):
1257         (WebCore::DragData::containsColor):
1258         (WebCore::DragData::containsPlainText):
1259         (WebCore::DragData::asPlainText):
1260         (WebCore::DragData::asColor):
1261         (WebCore::DragData::createClipboard):
1262         (WebCore::imageExistsAtPaths):
1263         (WebCore::DragData::containsCompatibleContent):
1264         (WebCore::DragData::containsURL):
1265         (WebCore::DragData::asURL):
1266         (WebCore::DragData::asFragment):
1267           Mac implementations of DragData methods.  A number of these use
1268           a Helper class that accesses WebKit functionality.  That functionality 
1269           should be migrated to WebCore in the future.
1270
1271         * platform/mac/PasteboardHelper.h: Added.
1272         (WebCore::PasteboardHelper::~PasteboardHelper):
1273           Temporary, and Mac only, helper class to access WebKit functionality 
1274           from WebCore
1275
1276         * platform/qt/DragDataQt.cpp: Added.
1277         (WebCore::DragData::canSmartReplace):
1278         (WebCore::DragData::containsColor):
1279         (WebCore::DragData::containsPlainText):
1280         (WebCore::DragData::asPlainText):
1281         (WebCore::DragData::asColor):
1282         (WebCore::DragData::createClipboard):
1283         (WebCore::DragData::containsCompatibleContent):
1284         (WebCore::DragData::containsURL):
1285         (WebCore::DragData::asURL):
1286         (WebCore::DragData::asFragment):
1287          Basic stubs to maintain Qt build
1288
1289         * rendering/HitTestResult.cpp:
1290         (WebCore::HitTestResult::HitTestResult):
1291          Correct HitTestResult copy contructor to copy localPoint
1292
1293 2007-01-22  Mark Rowe  <mrowe@apple.com>
1294
1295         Reviewed by Maciej.
1296
1297         http://bugs.webkit.org/show_bug.cgi?id=11692
1298         Bug 11692: REGRESSION(r17352): Disappearing page title
1299
1300         * dom/Document.cpp:
1301         (WebCore::Document::setTitle): If the title has already been set explicitly via JavaScript,
1302         ignore any changes to it due to encountering <title> tags.
1303
1304 2007-01-22  Mitz Pettel  <mitz@webkit.org>
1305
1306         Reviewed by Darin.
1307
1308         - fix http://bugs.webkit.org/show_bug.cgi?id=12344
1309           NativeListBox: item hit testing does not account for top padding and border
1310
1311         Test: fast/forms/listbox-selection-2.html
1312
1313         * rendering/RenderListBox.cpp:
1314         (WebCore::RenderListBox::numVisibleItems): Changed height() to contentHeight()
1315         since items are visible only in the content box.
1316         (WebCore::RenderListBox::listIndexAtOffset): Adjusted for vertical padding and
1317         borders. Changed to return -1 instead of the last item's index if the given offset
1318         is below the last item.
1319         (WebCore::RenderListBox::autoscroll): Adjusted for vertical padding and borders.
1320         (WebCore::RenderListBox::controlClipRect): Changed to return the content box since
1321         items should not spill into the padding box. This change is the reason the test
1322         generates pixel results.
1323
1324 2007-01-22  Justin Garcia  <justin.garcia@apple.com>
1325
1326         Reviewed by darin
1327         
1328         <rdar://problem/4944770>
1329         editing/pasteboard/4641033 layout test is broken (12328)
1330         
1331         This layout test failure demonstrates three bugs:
1332         Smart replace shouldn't be turned on, but is because a word
1333         selection granularity from the previous test isn't cleared.
1334         Smart replace shouldn't add any spaces because the paste is performed
1335         in an empty paragraph.
1336         Smart replace spaces are added to the text of options inside
1337         the select element instead of before/after the select element.
1338         
1339         This patch fixes the second two problems.  During a 
1340         ReplaceSelectionCommand, the VisiblePosition for the end of 
1341         the inserted content is the last position in the last leaf 
1342         inserted.  This is a problem when the last leaf is inside a 
1343         select element, since VP creation is inconsistent there.  
1344         Second, smart spaces were inserted inside the last leaf, not
1345         at the endOfInsertedContent.
1346
1347         * editing/ReplaceSelectionCommand.cpp:
1348         (WebCore::ReplaceSelectionCommand::shouldMergeStart): Renamed 
1349         m_lastNodeInserted to m_lastLeafInserted.  Use the 
1350         start/endOfInsertedContent getters.
1351         (WebCore::ReplaceSelectionCommand::shouldMergeEnd): Ditto.
1352         (WebCore::ReplaceSelectionCommand::removeNodePreservingChildren): Ditto.
1353         (WebCore::ReplaceSelectionCommand::removeRedundantStyles): Ditto.
1354         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): Added.
1355         Special case for when the last leaf inserted is inside a select 
1356         element: return the VisiblePosition after the select element.
1357         (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): Added.
1358         (WebCore::ReplaceSelectionCommand::doApply): Did renaming.  Used
1359         the start/endOfInsertedContent getters.  Insert smart replace spaces
1360         into the right nodes.
1361         (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Renaming.
1362         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
1363         (WebCore::ReplaceSelectionCommand::updateNodesInserted): Ditto.
1364         * editing/ReplaceSelectionCommand.h:
1365
1366 2007-01-22  Darin Adler  <darin@apple.com>
1367
1368         Reviewed by Adam.
1369
1370         - fix http://bugs.webkit.org/show_bug.cgi?id=12273
1371           REGRESSION: File input value invisible after removing and re-appending
1372
1373         - made more of the file chooser code cross-platform
1374
1375         - fixed an Objective-C garbage collection problem in FileChooser
1376
1377         - tried to remove layering violations where FileChooser in the platform
1378           directory knows about the rendering and DOM trees (but wasn't able to
1379           do it entirely)
1380
1381         * platform/FileChooser.cpp: Added.
1382         (WebCore::FileChooser::create): Changed parameters.
1383         (WebCore::FileChooser::chooseFile): Changed to call chooseIcon function.
1384         (WebCore::FileChooser::chooseIcon): Added.
1385
1386         * platform/FileChooser.h: Added FileChooserClient so this file doesn't have
1387         to know about RenderFileUploadControl. Used RetainPtr instead of retain/release
1388         so this works properly with Objective-C GC. Replaced disconnectUploadControl
1389         with disconnectClient, which has a simple inline implementation. Moved the
1390         Document parameter from the constructor to openFileChooser, along with a comment
1391         about why it should not be there. Added a filename parameter to the constructor
1392         for the initial filename. Added a font parameter to basenameForWidth so we don't
1393         depend on having a pointer to the renderer. Removed the uploadControl() and
1394         document() functions since no one calls either of them.
1395
1396         * platform/mac/FileChooserMac.mm: Removed code that is now cross-platform.
1397         (-[OpenPanelController beginSheetWithFrame:]): Added frame parameter, instead
1398         of storing a document pointer in the FileChooser.
1399         (WebCore::FileChooser::FileChooser): Updated for changed parameters. Also added
1400         code to choose the icon based on the initial filename. Pass the adopt parameter
1401         to the constructor of the RetainPtr.
1402         (WebCore::FileChooser::~FileChooser): Removed the release call, since the
1403         RetainPtr will take care of it. Added a call to disconnectFileChooser here.
1404         There's no need to disconnect at disconnectClient time, and that lets us have
1405         one more cross-platform function.
1406         (WebCore::FileChooser::openFileChooser): Added document parameter. Added code
1407         to get the frame from the document. And added a nil check since there's no
1408         ironclad guarantee the document won't have outlived its frame.
1409         (WebCore::FileChooser::basenameForWidth): Added font parameter. Use that instead
1410         of going at the upload control's style. The caller can handle that now.
1411
1412         * rendering/RenderFileUploadControl.h: Removed unnecessary includes.
1413         Made class inherit privately from FileChooserClient. Changed constructor
1414         parameter to HTMLInputElement rather than Node. Made protected members be
1415         private instead, and made a couple function members const.
1416         * rendering/RenderFileUploadControl.cpp: Moved constants to the top of the file,
1417         but after the "using namespace"
1418         (WebCore::RenderFileUploadControl::RenderFileUploadControl): Updated for changes
1419         to the FileChooser::create function and the parameter types.
1420         (WebCore::RenderFileUploadControl::~RenderFileUploadControl): Removed unneeded
1421         null check -- there's no case where the FileChooser fails to be created.
1422         (WebCore::RenderFileUploadControl::click): Pass document to openFileChooser.
1423         (WebCore::RenderFileUploadControl::updateFromElement): Tweaked code a bit by
1424         using updateFromElement and setValue instead of casting the renderer to a
1425         RenderButton and calling setText directly. Put setInputType call here.
1426         (WebCore::RenderFileUploadControl::maxFilenameWidth): Made const. Broke long line.
1427         (WebCore::RenderFileUploadControl::createButtonStyle): Made const.
1428         (WebCore::RenderFileUploadControl::paintObject): Moved buttonShadowHeight constant
1429         to the top of the file. Call isEmpty instead of checking width and height of
1430         IntRect for 0. Computed font to pass to FileChooser::basenameForWidth. Broke
1431         long lines.
1432         (WebCore::HTMLFileUploadInnerButtonElement::HTMLFileUploadInnerButtonElement):
1433         Moved the setInputType call to the caller; concept here is that this class is
1434         as simple as possible, rather than doing as much of the button job as possible.
1435
1436         * WebCore.xcodeproj/project.pbxproj: Added FileChooser.cpp.
1437         * WebCore.pro: Ditto.
1438         * CMakeLists.txt: Ditto.
1439         * WebCoreSources.bkl: Ditto.
1440
1441         * platform/gdk/TemporaryLinkStubs.cpp: Updated stubs.
1442         * platform/qt/FileChooserQt.cpp: Updated stubs.
1443
1444 2007-01-22  Mitz Pettel  <mitz@webkit.org>
1445
1446         Reviewed by Darin.
1447
1448         - fix http://bugs.webkit.org/show_bug.cgi?id=12364
1449           REGRESSSION (NativeListBox): Selected option's background is not clipped to the list box
1450
1451         Test: fast/forms/select-item-background-clip.html
1452
1453         * rendering/RenderListBox.cpp:
1454         (WebCore::RenderListBox::paintItemBackground): Intersect the item's rect with
1455         the list box's clip rect.
1456
1457 2007-01-22  Darin Adler  <darin@apple.com>
1458
1459         Reviewed by Beth.
1460
1461         - fix http://bugs.webkit.org/show_bug.cgi?id=12369
1462           REGRESSION (r19027): amazon.com home page crashes WebKit r19028 debug build
1463
1464         I caused this a few hours ago. Oops!
1465
1466         * rendering/RenderText.cpp: (WebCore::RenderText::setStyle):
1467         Compute whether the font changed before calling RenderObject::setStyle.
1468
1469 2007-01-22  Beth Dakin  <bdakin@apple.com>
1470
1471         Reviewed by Maciej.
1472
1473         Fix for <rdar://problem/4912129> REGRESSION: Crash occurs at 
1474         WebCore::Frame::eventHandler() after clicking to dismiss a 
1475         contextual menu on the page
1476
1477         * page/EventHandler.cpp:
1478         (WebCore::EventHandler::stopAutoscrollTimer): Added nil-check.
1479
1480 2007-01-22  Darin Adler  <darin@apple.com>
1481
1482         Reviewed by Mitz.
1483
1484         Inspired by a much simpler patch by Andrew Wellington <proton@wiretapped.net>.
1485
1486         - fix http://bugs.webkit.org/show_bug.cgi?id=11197
1487           REGRESSION: Specifying a counter for a CODE tag's content style property
1488           on before or after causes a crash.
1489
1490         Test: fast/css/beforeSelectorOnCodeElement.html
1491
1492         - fix regression I recently introduced where the monospace cache could be
1493           used for text that was not ASCII, if text was changed after the style was set
1494
1495         Test: fast/text/monospace-width-cache.html
1496
1497         - streamline RenderText.h -- remove unneeded functions, make some needlessly
1498           virtual functions non-virtual, remove unneeded header includes, replace use
1499           of Font* with Font& for consistency with RenderStyle, use "text" consistently
1500           instead of "string"
1501
1502         * rendering/RenderText.h: Removed unneeded include of "Text.h", declarations of
1503         SOFT_HYPHEN, DocumentMarker, InlineBox, Position, String. Got rid of friend
1504         declaration for InlineTextBox. Changed constructor to take a PassRefPtr since
1505         we do take owership of the passed-in text. Made deleteTextBoxes() private.
1506         Removed unneeded data(). Made override of length() private so people will use
1507         the faster textLength() instead. Renamed string() to text() so it matches up
1508         better with setText(). Same for stringLength(), originalString(), and
1509         setInternalString(), which are now textLength(), originalText(), and
1510         setTextInternal(). Renamed the old text() function to characters(), since it
1511         returns a pointer as StringImpl::characters does. Changed Font* to Font& everywhere.
1512         Renamed the internal calcMinMaxWidth() function to calcMinMaxWidthInternal() and
1513         made it non-virtual since it's not overriden anywhere. Also made the
1514         trimmedMinMaxWidth() function non-virtual. Made containsOnlyWhitespace() private.
1515         Removed both font() functions (one was needlessly virtual) and element().
1516         Renamed cacheWidths() to updateMonospaceCharacterWidth() and removed the
1517         shouldUseMonospaceCache() function. Renamed allAscii() to isAllASCII() and made
1518         it an inline function. Removed the m_allAsciiChecked flag and renamed the
1519         m_allAscii flag to m_isAllASCII.
1520         * rendering/RenderText.cpp:
1521         (WebCore::RenderText::RenderText): Removed initialization of m_allAsciiChecked.
1522         Initialize m_isAllASCII. Changed all occurrences of m_str->length() and
1523         m_str->characters () to use the stringLength() and characters() inline functions
1524         instead.
1525         (WebCore::RenderText::setStyle): Replaced the unconditional call to cacheWidths
1526         with a conditional call to updateMonospaceCharacterWidth. This speeds up the common
1527         case where style is changed without changing the font.
1528         (WebCore::RenderText::originalText): Changed code to not depend on overridden
1529         element() function with casts to a Text node -- this was one of only two call sites.
1530         Also renamed.
1531         (WebCore::RenderText::positionForCoordinates): Name change.
1532         (WebCore::RenderText::caretRect): Ditto.
1533         (WebCore::RenderText::updateMonospaceCharacterWidth): Renamed from cacheWidths and
1534         incorporate the check that was formerly in a separate shouldUseMonospaceCache
1535         function.
1536         (WebCore::RenderText::widthFromCache): Changed to take a Font& instead of Font*.
1537         Changed to take advantage of the fact that the string is known to be all ASCII in
1538         the m_monospaceCharacterWidth code path.
1539         (WebCore::RenderText::trimmedMinMaxWidth): Ditto. Also use style()->font() instead
1540         of font(false).
1541         (WebCore::RenderText::calcMinMaxWidth): Ditto. Also changed to use softHyphen instead
1542         of SOFT_HYPHEN.
1543         (WebCore::RenderText::containsOnlyWhitespace): More of the same.
1544         (WebCore::RenderText::setSelectionState): Ditto.
1545         (WebCore::RenderText::setTextWithOffset): Ditto.
1546         (WebCore::isInlineFlowOrEmptyText): Ditto.
1547         (WebCore::RenderText::setTextInternal): Updated for name changes. Also changed to
1548         set the m_isAllASCII flag every time, in the more-efficient way we use elsewhere
1549         (or'ing all the characters together), and to call updateMonospaceCharacterWidth
1550         if the "all ASCII"-ness of the text changes.
1551         (WebCore::RenderText::setText): Updated for name changes.
1552         (WebCore::RenderText::width): More like above.
1553         (WebCore::RenderText::selectionRect): Ditto.
1554         (WebCore::RenderText::caretMaxOffset): Ditto.
1555         (WebCore::RenderText::previousOffset): Ditto.
1556         (WebCore::RenderText::nextOffset): Ditto.
1557
1558         * dom/Position.cpp:
1559         * dom/Range.cpp:
1560         * editing/CompositeEditCommand.cpp:
1561         * editing/DeleteSelectionCommand.cpp:
1562         * editing/VisiblePosition.cpp:
1563         * html/HTMLElement.cpp:
1564         Added now-needed include of "Text.h" which is no longer included by "RenderText.h".
1565
1566         * editing/SelectionController.cpp:
1567         (WebCore::SelectionController::debugRenderer):
1568         * editing/TextIterator.cpp:
1569         (WebCore::TextIterator::handleTextNode):
1570         (WebCore::TextIterator::handleTextBox):
1571         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
1572         Update for name changes of stringLength(), string(), and originalString() to
1573         textLength(), text(), and originalText(), and to always use textLength() instead
1574         of length() when we have a RenderText* rather than a RenderObject*.
1575         * editing/visible_units.cpp:
1576         (WebCore::startOfParagraph): Ditto.
1577         (WebCore::endOfParagraph): Ditto.
1578         * rendering/InlineFlowBox.cpp:
1579         (WebCore::InlineFlowBox::placeBoxesHorizontally): Ditto. Also removed use of the
1580         RenderObject::font() function and replaced it with explicit access to the style.
1581         (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
1582         * rendering/InlineTextBox.cpp:
1583         (WebCore::InlineTextBox::selectionRect): Ditto.
1584         (WebCore::InlineTextBox::isLineBreak): Ditto.
1585         (WebCore::InlineTextBox::paint): Ditto.
1586         (WebCore::InlineTextBox::selectionStartEnd): Ditto.
1587         (WebCore::InlineTextBox::paintSelection): Ditto.
1588         (WebCore::InlineTextBox::paintMarkedTextBackground): Ditto.
1589         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
1590         (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
1591         (WebCore::InlineTextBox::offsetForPosition): Ditto.
1592         (WebCore::InlineTextBox::positionForOffset): Ditto.
1593         * rendering/RenderContainer.cpp:
1594         (WebCore::RenderContainer::addChild): Ditto.
1595         * rendering/RenderCounter.cpp:
1596         (WebCore::RenderCounter::originalText): Ditto.
1597         (WebCore::RenderCounter::calcMinMaxWidth): Ditto.
1598         * rendering/RenderCounter.h: Ditto.
1599         * rendering/RenderTextFragment.cpp:
1600         (WebCore::RenderTextFragment::originalText): Ditto.
1601         * rendering/RenderTextFragment.h: Ditto.
1602         * rendering/SVGInlineFlowBox.cpp:
1603         (WebCore::placePositionedBoxesHorizontally): Ditto.
1604         (WebCore::placeBoxesVerticallyWithAbsBaseline): Ditto.
1605         * rendering/bidi.cpp:
1606         (WebCore::BidiIterator::increment): Ditto.
1607         (WebCore::BidiIterator::current): Ditto.
1608         (WebCore::BidiIterator::direction): Ditto.
1609         (WebCore::addRun): Ditto.
1610         (WebCore::checkMidpoints): Ditto.
1611         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Ditto.
1612         (WebCore::RenderBlock::skipWhitespace): Ditto.
1613         (WebCore::RenderBlock::findNextLineBreak): Ditto.
1614
1615         * rendering/RenderBR.h: Updated signature of width function which now takes a
1616         Font& instead of a Font*.
1617
1618         * rendering/RenderBlock.cpp: (WebCore::stripTrailingSpace): Updated to no longer
1619         use the RenderObject::font() function, and added a comment about first-line, which
1620         is not handled properly here.
1621
1622         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::text):
1623         * rendering/RenderTreeAsText.cpp: (WebCore::writeTextRun):
1624         Eliminated use of RenderText::data().
1625
1626         * rendering/RenderObject.h: Removed RenderObject::font(). This had the bad effect of
1627         having everyone pass in a boolean rather than using the cleaner style() and
1628         firstLineStyle() functions in cases where there's no a firstLineStyle boolean.
1629         * rendering/RenderObject.cpp:
1630         (WebCore::RenderObject::getVerticalPosition): Replaced use of RenderObject::font()
1631         with direct use of the style instead, which is arguably easier to understand anyway.
1632         (WebCore::RenderObject::baselinePosition): Ditto.
1633
1634 2007-01-22  Sam Weinig  <sam@webkit.org>
1635
1636         Reviewed by The Mitz.
1637
1638         Move JSHTMLSelectElementCustom.cpp from bindings to bindings/js
1639         where it belongs.
1640
1641         * WebCore.pro:
1642         * WebCore.xcodeproj/project.pbxproj:
1643         * bindings/JSHTMLSelectElementCustom.cpp: Removed.
1644         * bindings/js/JSHTMLSelectElementCustom.cpp: Added.
1645
1646 2007-01-22  Zack Rusin  <zack@kde.org>
1647
1648         Fix the Qt build.
1649
1650         * WebCore.pro: adjust after last changes
1651
1652 2007-01-21  Alexey Proskuryakov  <ap@webkit.org>
1653
1654         Reviewed by Darin.
1655
1656         http://bugs.webkit.org/show_bug.cgi?id=10934
1657         REGRESSION: prototype.js logs error (HTMLFormElement) on webkit builds
1658
1659         Added constructors for most HTML elements; started auto-generating HTMLSelectElement JS binding.
1660
1661         Test: fast/dom/Window/element-constructors-on-window.html
1662
1663         * DerivedSources.make: Generate JSHTMLSelectElement.
1664         * WebCore.xcodeproj/project.pbxproj: Added JSHTMLSelectElement{Custom}.
1665         * bindings/js/JSHTMLElementWrapperFactory.cpp: Create a proper binding for SELECT.
1666
1667         * bindings/js/kjs_html.cpp:
1668         (KJS::):
1669         (KJS::JSHTMLElement::classInfo):
1670         (KJS::JSHTMLElement::accessors):
1671         (KJS::JSHTMLElement::getOwnPropertySlot):
1672         (KJS::HTMLElementFunction::callAsFunction):
1673         (KJS::JSHTMLElement::put):
1674         * bindings/js/kjs_html.h:
1675         (KJS::JSHTMLElement::):
1676         Removed everything related to SELECT. Renamed getHTMLOptionsCollection to toJS for autogenerated code 
1677         to be happy, and rewrote it using cacheDOMObject.
1678
1679         * bindings/scripts/CodeGeneratorJS.pm: Added HTMLElement to the list of types that cannot fail conversion.
1680
1681         * html/HTMLAnchorElement.idl:
1682         * html/HTMLAppletElement.idl:
1683         * html/HTMLAreaElement.idl:
1684         * html/HTMLBRElement.idl:
1685         * html/HTMLBaseElement.idl:
1686         * html/HTMLBaseFontElement.idl:
1687         * html/HTMLBodyElement.idl:
1688         * html/HTMLButtonElement.idl:
1689         * html/HTMLCanvasElement.idl:
1690         * html/HTMLDListElement.idl:
1691         * html/HTMLDirectoryElement.idl:
1692         * html/HTMLDivElement.idl:
1693         * html/HTMLFieldSetElement.idl:
1694         * html/HTMLFontElement.idl:
1695         * html/HTMLFormElement.idl:
1696         * html/HTMLHRElement.idl:
1697         * html/HTMLHeadElement.idl:
1698         * html/HTMLHeadingElement.idl:
1699         * html/HTMLHtmlElement.idl:
1700         * html/HTMLImageElement.idl:
1701         * html/HTMLInputElement.idl:
1702         * html/HTMLIsIndexElement.idl:
1703         * html/HTMLLIElement.idl:
1704         * html/HTMLLabelElement.idl:
1705         * html/HTMLLegendElement.idl:
1706         * html/HTMLLinkElement.idl:
1707         * html/HTMLMapElement.idl:
1708         * html/HTMLMenuElement.idl:
1709         * html/HTMLMetaElement.idl:
1710         * html/HTMLModElement.idl:
1711         * html/HTMLOListElement.idl:
1712         * html/HTMLOptGroupElement.idl:
1713         * html/HTMLParagraphElement.idl:
1714         * html/HTMLParamElement.idl:
1715         * html/HTMLPreElement.idl:
1716         * html/HTMLQuoteElement.idl:
1717         * html/HTMLScriptElement.idl:
1718         * html/HTMLStyleElement.idl:
1719         * html/HTMLTextAreaElement.idl:
1720         * html/HTMLTitleElement.idl:
1721         * html/HTMLUListElement.idl:
1722         Generate constructors.
1723
1724         * html/HTMLSelectElement.cpp:
1725         (WebCore::HTMLSelectElement::length):
1726         * html/HTMLSelectElement.h:
1727         Make length() return unsigned for auto-generated code to be happy.
1728
1729         * html/HTMLSelectElement.idl: Adjusted to be usable for JS.
1730
1731         * bindings/JSHTMLSelectElementCustom.cpp: Added. Implements remove().
1732
1733         * page/DOMWindow.idl:
1734         Added properties for most elements' constructors.
1735
1736 2007-01-21  Mark Rowe  <mrowe@apple.com>
1737
1738         Reviewed by Maciej.
1739
1740         http://bugs.webkit.org/show_bug.cgi?id=12357
1741         Bug 12357: Reproducible crash in WebCore::Settings::isJavaScriptEnabled in svg/custom/js-update-bounce.svg under guard-malloc
1742
1743         * page/Frame.cpp:
1744         (WebCore::Frame::~Frame): Access the global object directly rather than via Window::retrieveWindow to prevent our reference to
1745         a deleted settings object being used.
1746
1747 2007-01-21  Darin Adler  <darin@apple.com>
1748
1749         Reviewed by Maciej.
1750
1751         - fix <rdar://problem/4930503> REGRESSION: Page changes title when
1752           command-clicking on named anchor link (12299)
1753
1754         * loader/FrameLoader.cpp:
1755         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
1756         Return if shouldContinue is false. This matches the other similar
1757         functions and prevents us from doing extra work in the "ignore" case.
1758
1759 2007-01-21  Mark Rowe  <mrowe@apple.com>
1760
1761         Reviewed by Darin.
1762
1763         http://bugs.webkit.org/show_bug.cgi?id=12355
1764         Bug 12355: Reproducible crash in WebCore::parseNumber in svg/custom/js-update-bounce.svg under guard-malloc
1765
1766         * ksvg2/svg/SVGParserUtilities.cpp:
1767         (WebCore::parseNumber): Parenthesize to prevent reading past end of buffer.
1768
1769 2007-01-21  Mitz Pettel  <mitz@webkit.org>
1770
1771         Reviewed by Darin.
1772
1773         - fix http://bugs.webkit.org/show_bug.cgi?id=12345
1774           REGRESSION: Disabled pop-up text is not grayed out
1775
1776         Test: fast/forms/select-disabled-appearance.html
1777
1778         * rendering/RenderThemeMac.mm:
1779         (WebCore::RenderThemeMac::adjustMenuListStyle):
1780
1781 2007-01-21  Darin Adler  <darin@apple.com>
1782
1783         - fix non-Mac builds
1784
1785         * CMakeLists.txt: Added JSDocumentCustom.cpp.
1786         * WebCore.pro: Ditto.
1787         * WebCoreSources.bkl: Ditto.
1788
1789 2007-01-21  Mitz Pettel  <mitz@webkit.org>
1790
1791         Reviewed by Darin.
1792
1793         - fix http://bugs.webkit.org/show_bug.cgi?id=12353 <rdar://problem/4944599>
1794           REGRESSION: Crash on load (mutation event dispatch under the image element constructor deletes the element)
1795     
1796         Test: fast/dom/HTMLImageElement/constructor-mutation-event-dispatch.html
1797
1798         * bindings/js/kjs_html.cpp:
1799         (KJS::ImageConstructorImp::construct): Protect the image element before setting
1800         its attributes.
1801
1802 2007-01-21  Sam Weinig  <sam@webkit.org>
1803
1804         Rolling out patch for http://bugs.webkit.org/show_bug.cgi?id=8360.
1805
1806         * rendering/RenderLayer.cpp:
1807         (WebCore::RenderLayer::RenderLayer):
1808         (WebCore::RenderLayer::scrollToOffset):
1809         (WebCore::RenderLayer::scrollRectToVisible):
1810         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1811         (WebCore::Marquee::start):
1812         * rendering/RenderLayer.h:
1813
1814 2007-01-21  David Kilzer  <ddkilzer@webkit.org>
1815
1816         Reviewed by Darin.
1817
1818         - fix http://bugs.webkit.org/show_bug.cgi?id=12280
1819           select element not available by name through document.all
1820           (dropdown list not available on smarthome.com checkout)
1821
1822         Test: fast/dom/document-all-select.html
1823
1824         * html/HTMLCollection.cpp:
1825         (WebCore::HTMLCollection::checkForNameMatch):
1826         (WebCore::HTMLCollection::updateNameCache):
1827
1828 2007-01-21  Mitz Pettel  <mitz@webkit.org>
1829
1830         Reviewed by Darin.
1831
1832         - http://bugs.webkit.org/show_bug.cgi?id=10805
1833           REGRESSION (r15720): manual-tests/onblur-remove.html failing
1834
1835         * manual-tests/onblur-remove.html: Changed the test to not require pressing
1836         Enter, since the correct behavior for Enter is to send a blur event.
1837
1838 2007-01-21  Sanjay Madhav  <sanjay12@gmail.com>
1839
1840         Reviewed by Darin.
1841
1842         Fix for: <rdar://problem/4928583> Memory usage grows when reloading google.com/ig
1843
1844         JSDocuments are now responsible for marking the DOM wrappers associated with them, when they get marked.
1845         This fixes a JS object leak when a DOM wrapper has a reference to a JSDocument that is otherwise not reachable.
1846
1847         Test: fast/dom/gc-10.html
1848
1849         * WebCore.vcproj/WebCore/WebCore.vcproj:
1850         * WebCore.xcodeproj/project.pbxproj:
1851         * bindings/js/JSDocumentCustom.cpp: Added.
1852         (WebCore::JSDocument::mark):
1853         * bindings/js/kjs_binding.cpp:
1854         (KJS::ScriptInterpreter::markDOMNodesForDocument):
1855         (KJS::ScriptInterpreter::mark):
1856         * bindings/js/kjs_binding.h:
1857         * dom/Document.idl:
1858
1859 2007-01-21  Mitz Pettel  <mitz@webkit.org>
1860
1861         Reviewed by Darin.
1862
1863         - fix http://bugs.webkit.org/show_bug.cgi?id=10692
1864           REGRESSION (r14847): Unnecessary scrollbars with position:relative; and overflow:auto;
1865
1866         Test: fast/overflow/position-relative.html
1867
1868         * rendering/RenderBox.cpp:
1869         (WebCore::RenderBox::lowestPosition): Add the relative position offset only
1870         if 'includeSelf' is true.
1871         (WebCore::RenderBox::rightmostPosition): Ditto.
1872         (WebCore::RenderBox::leftmostPosition): Ditto.
1873         * rendering/RenderFlow.cpp:
1874         (WebCore::RenderFlow::lowestPosition): Ditto.
1875         (WebCore::RenderFlow::rightmostPosition): Ditto.
1876         (WebCore::RenderFlow::leftmostPosition): Ditto.
1877
1878 2007-01-21  Mitz Pettel  <mitz@webkit.org>
1879
1880         Reviewed by Darin.
1881
1882         - fix http://bugs.webkit.org/show_bug.cgi?id=10472
1883           REGRESSION: "add" method of <select> object does not put the <option> object in the correct position
1884
1885         Test: fast/dom/HTMLSelectElement/options-collection-detached.html
1886
1887         * html/HTMLSelectElement.cpp:
1888         (WebCore::HTMLSelectElement::setRecalcListItems): Reset the options collection
1889         info if the <select> is not in the document. For in-document <select>s this
1890         happens anyway as a result of the DOM tree version increasing.
1891
1892 2007-01-21  Mitz Pettel  <mitz@webkit.org>
1893
1894         Reviewed by Darin.
1895
1896         - fix http://bugs.webkit.org/show_bug.cgi?id=12349
1897           NativeFileUpload: Button text is not grayed out when the control is disabled
1898
1899         Covered by fast/forms/file-input-disabled.html 
1900
1901         * css/html4.css: Changed selectors that had pseudo-classes after the -webkit-file-upload-button
1902         pseudo-element to have the pseudo-element at the end. Pseudo-elements must be at the end.
1903         * rendering/RenderFileUploadControl.cpp:
1904         (WebCore::RenderFileUploadControl::createButtonStyle): Changed to not overwrite the button's
1905         style with its parent's style. getPseudoStyle() handles inheritance properly.
1906
1907 2007-01-21  Mitz Pettel  <mitz@webkit.org>
1908
1909         Reviewed by Darin.
1910
1911         - fix http://bugs.webkit.org/show_bug.cgi?id=12343
1912           crash in css2.1/t1202-counter-09-b.html
1913
1914         * platform/Font.cpp:
1915         (WebCore::Font::glyphDataForCharacter):
1916
1917 2007-01-21  Darin Adler  <darin@apple.com>
1918
1919         Reviewed by Adam and Mitz.
1920
1921         - fix http://bugs.webkit.org/show_bug.cgi?id=12347
1922           REGRESSION: list box scrolling broken (fast/forms/listbox-selection.html)
1923
1924         Covered by existing test: fast/forms/listbox-selection.html
1925
1926         * rendering/RenderListBox.h: Added override of layout(), made selectionChanged()
1927         no longer an inline. Added private scrollToRevealSelection(),
1928         m_scrollToRevealSelectionAfterLayout, and m_inAutoscroll.
1929         * rendering/RenderListBox.cpp:
1930         (WebCore::RenderListBox::RenderListBox): Initialize new data members.
1931         (WebCore::RenderListBox::updateFromElement): Remove scrolling code.
1932         (WebCore::RenderListBox::selectionChanged): Moved from header. Calls repaint
1933         and then scrollToRevealSelection, but if we need layout, instead schedules
1934         scrollToRevealSelection to be done after layout.
1935         (WebCore::RenderListBox::layout): Added. After calling base class, calls
1936         scrollToRevealSelection if the m_scrollToRevealSelectionAfterLayout is set.
1937         (WebCore::RenderListBox::scrollToRevealSelection): Added. Code was originally
1938         in updateFromElement.
1939         (WebCore::RenderListBox::autoscroll): Set m_inAutoscroll so that the
1940         selectionChanged function knows not to scroll. Also removed the repaint()
1941         here because updateListBoxSelection() takes care of repainting by calling
1942         selectionChanged().
1943
1944 2007-01-21  David Kilzer  <ddkilzer@webkit.org>
1945
1946         * page/EventHandler.cpp:
1947         (WebCore::EventHandler::handleMouseMoveEvent): Changed #if SVG_SUPPORT to #ifdef SVG_SUPPORT.
1948
1949 2007-01-20  Mitz Pettel  <mitz@webkit.org>
1950
1951         Reviewed by Maciej.
1952
1953         - fix http://bugs.webkit.org/show_bug.cgi?id=11115
1954           REGRESSION: Crash on Flickr after hitting cancel from adding a note
1955
1956         Test: fast/forms/text-set-value-crash.html
1957
1958         * html/HTMLInputElement.cpp:
1959         (WebCore::HTMLInputElement::setValue): Added a call to Document::updateRendering().
1960         * html/HTMLTextAreaElement.cpp:
1961         (WebCore::HTMLTextAreaElement::setValue): Ditto.
1962
1963 2007-01-20  Mitz Pettel  <mitz@webkit.org>
1964
1965         Reviewed by Darin.
1966
1967         - fix http://bugs.webkit.org/show_bug.cgi?id=8360
1968           Repro crash when onscroll handler deletes the scrolled object
1969
1970         Test: fast/layers/removed-by-scroll-handler.html
1971
1972         * rendering/RenderLayer.cpp:
1973         (WebCore::RenderLayer::RenderLayer):
1974         (WebCore::RenderLayer::dispatchScrollEvent): Added. Called when the timer
1975         fires and dispatches the scroll event to the layer's element.
1976         (WebCore::RenderLayer::scrollToOffset): Instead of dispatching the scroll
1977         event from this function, which is called during layout, schedule a 0-duration
1978         timer to dispatch the event after layout.
1979         (WebCore::RenderLayer::scrollRectToVisible):
1980         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1981         (WebCore::Marquee::start):
1982         * rendering/RenderLayer.h:
1983
1984 2007-01-20  Nikolas Zimmermann  <zimmermann@kde.org>
1985
1986         Reviewed by Sam.
1987
1988         Fix JS bindings for SVGAnimated{Boolean, Enumeration, Integer, Number, String}.
1989
1990         Dynamic SVG DOM updates (ie. "someUse.href.baseVal = '#rect'") with these types
1991         didn't work. Existing gradient updating examples relied on calling setAttribute
1992         after a SVG DOM update - that was the only reason it worked, added a new test
1993         only using SVG DOM updates (js-update-stop.svg).
1994
1995         Added test: js-update-stop.svg
1996         Added test: use-property-changes-through-dom.svg (change xlink:href, x/y attributes using setAttribute)
1997         Added test: use-property-changes-through-svg-dom.svg (change xlink:href, x/y attributes using SVG DOM)
1998
1999         * bindings/js/JSSVGPODTypeWrapper.h:
2000         (WebCore::JSSVGPODTypeWrapper::commitChange):
2001         (WebCore::JSSVGPODTypeWrapperCreator::commitChange):
2002         (WebCore::JSSVGPODTypeWrapperCreatorForList::commitChange):
2003         * bindings/js/JSSVGPathSegListCustom.cpp:
2004         (WebCore::updatePathSegContextMap):
2005         (WebCore::removeFromPathSegContextMap):
2006         * bindings/scripts/CodeGeneratorJS.pm:
2007         * ksvg2/misc/SVGDocumentExtensions.h:
2008         (WebCore::SVGDocumentExtensions::baseValueMap):
2009         (WebCore::SVGDocumentExtensions::genericContextMap):
2010         (WebCore::SVGDocumentExtensions::baseValue):
2011         (WebCore::SVGDocumentExtensions::setBaseValue):
2012         (WebCore::SVGDocumentExtensions::removeBaseValue):
2013         (WebCore::SVGDocumentExtensions::hasBaseValue):
2014         (WebCore::SVGDocumentExtensions::genericContext):
2015         (WebCore::SVGDocumentExtensions::setGenericContext):
2016         (WebCore::SVGDocumentExtensions::removeGenericContext):
2017         (WebCore::SVGDocumentExtensions::hasGenericContext):
2018         (WebCore::String):
2019         (WebCore::FloatRect):
2020         (WebCore::bool):
2021         (WebCore::double):
2022         * ksvg2/svg/SVGClipPathElement.h:
2023         * ksvg2/svg/SVGElement.h:
2024         (WebCore::SVGElement::notifyAttributeChange):
2025         * ksvg2/svg/SVGPathSegList.cpp:
2026         (WebCore::SVGPathSegList::SVGPathSegList):
2027         (WebCore::SVGPathSegList::context):
2028         * ksvg2/svg/SVGPathSegList.h:
2029         * ksvg2/svg/SVGPatternElement.h:
2030         * ksvg2/svg/SVGPointList.cpp:
2031         (SVGPointList::SVGPointList):
2032         (SVGPointList::context):
2033         * ksvg2/svg/SVGPointList.h:
2034         * ksvg2/svg/SVGStopElement.cpp:
2035         (WebCore::SVGStopElement::parseMappedAttribute):
2036         (WebCore::SVGStopElement::notifyAttributeChange):
2037         * ksvg2/svg/SVGStopElement.h:
2038         * ksvg2/svg/SVGUseElement.cpp:
2039         (WebCore::SVGUseElement::notifyAttributeChange):
2040
2041 2007-01-20  Rob Buis  <buis@kde.org>
2042
2043         Reviewed by Sam.
2044
2045         http://bugs.webkit.org/show_bug.cgi?id=12334
2046         Respect <text> boundaries for svg text selecting
2047
2048         Make sure the text selection for svg stays inside
2049         containing blocks.
2050         Added one manual test since html selection does not
2051         seem to work for SVG and selectSubString for SVG
2052         is not implemented yet.
2053
2054         * manual-tests/svg-text-selection.svg: Added.
2055         * page/EventHandler.cpp:
2056         (WebCore::EventHandler::handleMouseMoveEvent):
2057         * rendering/RenderObject.h:
2058         (WebCore::RenderObject::isSVGText):
2059         * rendering/RenderSVGInlineText.h:
2060         (WebCore::RenderSVGInlineText::isSVGText):
2061         * rendering/RenderSVGText.h:
2062         (WebCore::RenderSVGText::isSVGText):
2063
2064 2007-01-19  Adele Peterson  <adele@apple.com>
2065
2066         Reviewed by Hyatt.
2067
2068         Fix for: <rdar://problem/4697438> REGRESSION: select menu lists match the wrong css rule on www.chainreaction.com
2069
2070         Update the size attribute value for select elements to match the numeric value.  This is a special case since this
2071         attribute is used to determine which control to use.  We want to make sure that the size attribute is valid when we match
2072         CSS rules.
2073
2074         Test: fast/forms/select-size.html
2075
2076         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute): If the attribute string value is not the
2077           same as its integer value, then update the attribute value to match the integer.
2078         * dom/Attribute.h: Made setValue and setPrefix public.
2079
2080 2007-01-19  John Sullivan  <sullivan@apple.com>
2081
2082         Reviewed by Darin
2083
2084         - WebCore part of fix for: <rdar://problem/4451715> REGRESSION: On some sites, have to 
2085           type a character before username/password autofill kicks in
2086
2087         * loader/FrameLoaderClient.h:
2088         new dispatchDidFinishDocumentLoad call
2089
2090         * loader/FrameLoader.cpp:
2091         (WebCore::FrameLoader::finishedParsing):
2092         call dispatchDidFinishDocumentLoad
2093         
2094         * platform/graphics/svg/SVGImageEmptyClients.h:
2095         (WebCore::SVGEmptyFrameLoaderClient::dispatchDidFinishDocumentLoad):
2096         empty implementation for dispatchDidFinishDocumentLoad
2097
2098 2007-01-19  Adele Peterson  <adele@apple.com>
2099
2100         Reviewed by Hyatt.
2101
2102         Fix for <rdar://problem/4760280> REGRESSION: Bottom portion of text hangs off edge of SELECT element at http://macreviewzone.com/index.php
2103         
2104         Test: fast/forms/control-restrict-line-height.html
2105
2106         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::setFontFromControlSize): Don't honor line-height for controls that
2107           have restricted font size.
2108
2109 2007-01-19  Darin Adler  <darin@apple.com>
2110
2111         Reviewed by Adele.
2112
2113         - fix http://bugs.webkit.org/show_bug.cgi?id=11999
2114           <rdar://problem/4940442> REGRESSION: Incomplete listing in TVListings window (11999)
2115           Fix was to use the actual size of the renderer in the RenderListBox
2116           case, instead of always using the size specified by the select element.
2117
2118         Test: fast/forms/select-list-box-with-height.html
2119
2120         - fix http://bugs.webkit.org/show_bug.cgi?id=11995
2121           <rdar://problem/4901834> REGRESSION(NativeListBox): Focus is not placed on
2122           SELECT after mousing down on OPTION
2123
2124         Test: fast/forms/select-list-box-mouse-focus.html
2125
2126         - fix bug where auto-scrolling was not working in list box select elements
2127
2128         No test yet.
2129
2130         - fix a missing semicolon in the radio/checkbox section of html4.css
2131
2132         Test: fast/forms/radio-no-theme-padding.html
2133
2134         - fix bug where the scroll bars for select elements were pixel-type scroll
2135           bars even though the scrolling is line at a time scrolling
2136
2137         No test.
2138
2139         * html/HTMLSelectElement.cpp:
2140         (WebCore::HTMLSelectElement::selectAll): Removed an explicit call
2141         to repaint, since the RenderListBox now does that in selectionChanged.
2142         (WebCore::HTMLSelectElement::notifyOptionSelected): Call the new
2143         selectionChanged instead of the old setSelectionChanged.
2144         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Added a call
2145         to focus. Removed an explicit call to repaint and added a call to the
2146         new setMouseDownMayStartAutoscroll function in EventHandler. Removed an
2147         explicit call to repaint as above.
2148         (WebCore::HTMLSelectElement::updateListBoxSelection): Call the new
2149         selectionChanged instead of the old setSelectionChanged.
2150
2151         * page/EventHandler.h: Added setMouseDownMayStartAutoscroll, needed
2152         because the existing code to set that flag won't get triggered when
2153         the select element's default event handler handles the event.
2154
2155         * rendering/RenderListBox.h: Made ScrollbarClient a private base class.
2156         Removed setSelectionChanged and m_selectionChanged. Added selectionChanged,
2157         which is really just a synonym for repaint for now. Moved valueChanged,
2158         the ScrollbarClient function implementations, and itemHeight into the
2159         private part of the class. Added numVisibleItems() and listHeight() to
2160         the private section. Changed m_vBar to be a RefPtr.
2161
2162         * rendering/RenderListBox.cpp: Removed unneeded includes. Moved all
2163         the constants to the top of the file.
2164         (WebCore::RenderListBox::RenderListBox): Removed initialization of
2165         m_selectionChanged because it was removed and of m_vBar because it's
2166         now a RefPtr which is automaticall initialized.
2167         (WebCore::RenderListBox::~RenderListBox): Removed the explicit deref of
2168         m_vBar because it's a RefPtr. Added null checking for FrameView.
2169         (WebCore::RenderListBox::updateFromElement): Use numItems().
2170         (WebCore::RenderListBox::calcMinMaxWidth): Added null checking for
2171         FrameView and used RefPtr for the newly-created scroll bar.
2172         (WebCore::RenderListBox::size): Tweaked formatting. Also renamed the
2173         misleading minDefaultSize to maxDefaultSize, since it's a maximum.
2174         (WebCore::RenderListBox::numVisibleItems): Added. Used in many places
2175         where size() was used before. This computes the number of rows we have
2176         room for. We don't need a row space after the last row, and this takes
2177         that into account.
2178         (WebCore::RenderListBox::numItems): Tweaked to remove the local variable.
2179         (WebCore::RenderListBox::listHeight): Added. Total height of all the rows
2180         and spaces between them.
2181         (WebCore::RenderListBox::calcHeight): Changed to call itemHeight for the
2182         row height, and to subtract the last row spacing off since we don't need
2183         a space after the last row. Changed the scroll bar setup to make it
2184         correspond to row numbers, not pixel numbers.
2185         (WebCore::RenderListBox::baselinePosition): Moved the comment to the
2186         constant declaration at the top of the file.
2187         (WebCore::RenderListBox::itemBoundingBoxRect): Simplified by using
2188         the itemHeight() function.
2189         (WebCore::RenderListBox::paintObject): Changed to use numItems and
2190         to use numVisibleItems instead of size.
2191         (WebCore::RenderListBox::isPointInScrollbar): Added get() call since
2192         m_vBar is now a RefPtr.
2193         (WebCore::RenderListBox::listIndexAtOffset): Changed to use numItems(),
2194         itemHeight(), and rearranged a min/max combo so it starts with the low,
2195         then the value, then the high value for pinning.
2196         (WebCore::RenderListBox::autoscroll): Use numVisibleItems() instead of
2197         size().
2198         (WebCore::RenderListBox::stopAutoscroll): Removed an unneeded nil check
2199         of the element.
2200         (WebCore::RenderListBox::scrollToRevealElementAtListIndex): Changed
2201         to use numItems() and to use numVisibleItems() instead of size().
2202         Also changed scroll bar code to work more simply now that the scroll
2203         bar is row-based.
2204         (WebCore::RenderListBox::listIndexIsVisible): Changed to use
2205         numVisibleItems() instead of size().
2206         (WebCore::RenderListBox::valueChanged): Simplified since the scrollbar
2207         is now row-based. Also removed an unnecessary null check.
2208         (WebCore::RenderListBox::itemHeight): Updated for name change from
2209         optionsSpacingMiddle to rowSpacing.
2210         (WebCore::RenderListBox::scrollHeight): Changed to use listHeight().
2211         (WebCore::RenderListBox::setScrollTop): Simplified, and removed the code
2212         that does nothing if the computed list index is visible (which did not
2213         make sense for this function and seemed a cut and paste error from the
2214         scrollToReveal function). The scrollbar part is simpler now that it's
2215         row-based.
2216         (WebCore::RenderListBox::windowClipRect): Changed to use document()->view()
2217         so we don't have to include RenderView.h.
2218
2219         * css/html4.css: Added a semicolon I noticed was missing.
2220
2221 2007-01-19  Beth Dakin  <bdakin@apple.com>
2222
2223         Reviewed by Maciej and Darin.
2224
2225         Fix for <rdar://problem/4702420> REGRESSION: Null characters need 
2226         to be stripped from text nodes (townhall.com)
2227
2228         This was a regression from the fix for <rdar://problem/3727939>
2229         Safari strips \0 characters from HTML tags making them valid, which
2230         was fixed with r12652. We still need to strip null characters in
2231         text nodes.
2232
2233         * html/HTMLTokenizer.cpp:
2234         (WebCore::HTMLTokenizer::write): No behavior change here, this is
2235         just to make Darin happy.
2236         (WebCore::HTMLTokenizer::processToken): Call into StringImpl's new 
2237         createStrippingNull function instead of the normal StringImpl 
2238         constructor.
2239         * platform/StringImpl.cpp:
2240         (WebCore::StringImpl::createStrippingNull): Strip null.
2241         * platform/StringImpl.h:
2242
2243 2007-01-19  David Kilzer  <ddkilzer@webkit.org>
2244
2245         Reviewed by NOBODY (no-svg build fix).
2246
2247         * ksvg2/svg/SVGMPathElement.cpp: Added #ifdef SVG_SUPPORT/#endif guards.
2248
2249 2007-01-19  Anders Carlsson  <acarlsson@apple.com>
2250         
2251         Build fix.
2252         
2253         * platform/graphics/svg/SVGImageEmptyClients.h:
2254         (WebCore::SVGEmptyChromeClient::setStatusbarText):
2255
2256 2007-01-18  Anders Carlsson  <acarlsson@apple.com>
2257
2258         Reviewed by Adam.
2259
2260         Move JavaScript alert and status bar functions to the chrome.
2261         
2262         * bindings/js/kjs_window.cpp:
2263         (KJS::WindowFunc::callAsFunction):
2264         * page/Chrome.cpp:
2265         (WebCore::Chrome::runJavaScriptAlert):
2266         (WebCore::Chrome::runJavaScriptConfirm):
2267         (WebCore::Chrome::runJavaScriptPrompt):
2268         (WebCore::Chrome::setStatusBarText):
2269         * page/Chrome.h:
2270         * page/ChromeClient.h:
2271         * page/Frame.cpp:
2272         (WebCore::Frame::setJSStatusBarText):
2273         (WebCore::Frame::setJSDefaultStatusBarText):
2274         * page/Frame.h:
2275         * page/mac/FrameMac.h:
2276         * page/mac/FrameMac.mm:
2277         * page/mac/WebCoreFrameBridge.h:
2278         * platform/graphics/svg/SVGImageEmptyClients.h:
2279         (WebCore::SVGEmptyChromeClient::runJavaScriptAlert):
2280         (WebCore::SVGEmptyChromeClient::runJavaScriptConfirm):
2281         (WebCore::SVGEmptyChromeClient::runJavaScriptPrompt):
2282         (WebCore::SVGEmptyChromeClient::setStatusBarText):
2283
2284 2007-01-19  Zack Rusin  <zack@kde.org>
2285
2286         Fix the build.
2287
2288         * WebCore.pro: Add missing files
2289
2290 2007-01-19  Eric Seidel  <eric@webkit.org>
2291
2292         Reviewed by rwlbuis.
2293
2294         More cleanup to SVGAnimated* classes.
2295
2296         No tests possible (only code cleanup)
2297
2298         * ksvg2/svg/SVGAnimateMotionElement.cpp:
2299         (WebCore::SVGAnimateMotionElement::applyAnimationToValue):
2300         * ksvg2/svg/SVGAnimateMotionElement.h:
2301         * ksvg2/svg/SVGAnimationElement.cpp:
2302         (WebCore::SVGAnimationElement::parseBeginOrEndValue):
2303         (WebCore::SVGAnimationElement::parseMappedAttribute):
2304         (WebCore::SVGAnimationElement::parseClockValue):
2305         (WebCore::SVGAnimationElement::isIndefinite):
2306         * ksvg2/svg/SVGAnimationElement.h:
2307
2308 2007-01-19  Nikolas Zimmermann  <zimmermann@kde.org>
2309
2310         Not reviewed.
2311
2312         Remove accidently commited debug output. Shame on me :-)
2313
2314         * ksvg2/svg/SVGUseElement.cpp:
2315         (WebCore::SVGUseElement::notifyAttributeChange):
2316
2317 2007-01-19  Nikolas Zimmermann  <zimmermann@kde.org>
2318
2319         Reviewed by Eric.
2320
2321         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10410 (SVG Slider example renders completely wrong (inserting <use> dynamically doesn't work))
2322         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11660 (SVG: creation of <use/> elements through scripting/DOM doesn't work)
2323
2324         Added test: svg/custom/use-instanceRoot-modifications.svg
2325         Added test: svg/custom/use-on-g.svg
2326         Added test: svg/custom/use-on-rect.svg
2327         Added test: svg/custom/use-on-symbol-inside-pattern.svg
2328         Added test: svg/custom/use-on-symbol.svg
2329         Added test: svg/custom/use-on-text.svg
2330         Added test: svg/custom/use-transform.svg
2331
2332         Fixes: svg/W3C-SVG-1.1/text-text-04-t.svg (missing use elements)
2333         Fixes: svg/carto.net/button.svg (image buttons didn't appear)
2334         Fixes: svg/carto.net/colourpicker.svg (slider handles finally show up)
2335         Fixes: svg/carto.net/slider.svg (slider handles finally show up)
2336         Fixes: svg/carto.net/window.svg (window decorations show up) 
2337         Fixes: svg/custom/use-forward-refs.svg (missing use elements)
2338
2339         Rewrite <use> support with a real-shadow tree (as the spec demands), and implement SVGElementInstance.
2340         AFAIK we're the first implementing this SVG feature - after ASV3 (!).
2341
2342         * DerivedSources.make:
2343         * WebCore.xcodeproj/project.pbxproj:
2344         * bindings/objc/DOMInternal.h:
2345         * bindings/objc/DOMSVG.h:
2346         * ksvg2/misc/SVGDocumentExtensions.cpp:
2347         (WebCore::SVGDocumentExtensions::reportWarning):
2348         (WebCore::SVGDocumentExtensions::reportError):
2349         (WebCore::SVGDocumentExtensions::addPendingResource):
2350         (WebCore::SVGDocumentExtensions::isPendingResource):
2351         (WebCore::SVGDocumentExtensions::removePendingResource):
2352         (WebCore::SVGDocumentExtensions::mapInstanceToElement):
2353         (WebCore::SVGDocumentExtensions::removeInstanceMapping):
2354         (WebCore::SVGDocumentExtensions::instancesForElement):
2355         * ksvg2/misc/SVGDocumentExtensions.h:
2356         * ksvg2/svg/SVGCircleElement.cpp:
2357         (WebCore::SVGCircleElement::notifyAttributeChange):
2358         * ksvg2/svg/SVGElement.cpp:
2359         (WebCore::SVGElement::insertedIntoDocument):
2360         * ksvg2/svg/SVGElement.h:
2361         (WebCore::SVGElement::buildPendingResource):
2362         * ksvg2/svg/SVGElementInstance.cpp:
2363         (WebCore::SVGElementInstance::SVGElementInstance):
2364         (WebCore::SVGElementInstance::~SVGElementInstance):
2365         (WebCore::SVGElementInstance::clonedElement):
2366         (WebCore::SVGElementInstance::correspondingElement):
2367         (WebCore::SVGElementInstance::correspondingUseElement):
2368         (WebCore::SVGElementInstance::parentNode):
2369         (WebCore::SVGElementInstance::childNodes):
2370         (WebCore::SVGElementInstance::previousSibling):
2371         (WebCore::SVGElementInstance::nextSibling):
2372         (WebCore::SVGElementInstance::firstChild):
2373         (WebCore::SVGElementInstance::lastChild):
2374         (WebCore::SVGElementInstance::appendChild):
2375         (WebCore::SVGElementInstance::updateInstance):
2376         * ksvg2/svg/SVGElementInstance.h:
2377         * ksvg2/svg/SVGElementInstance.idl: Added.
2378         * ksvg2/svg/SVGElementInstanceList.cpp:
2379         (WebCore::SVGElementInstanceList::SVGElementInstanceList):
2380         (WebCore::SVGElementInstanceList::length):
2381         (WebCore::SVGElementInstanceList::item):
2382         * ksvg2/svg/SVGElementInstanceList.h:
2383         * ksvg2/svg/SVGElementInstanceList.idl: Added.
2384         * ksvg2/svg/SVGEllipseElement.cpp:
2385         (WebCore::SVGEllipseElement::notifyAttributeChange):
2386         * ksvg2/svg/SVGGElement.cpp:
2387         * ksvg2/svg/SVGGElement.h:
2388         (WebCore::SVGGElement::contextElement):
2389         * ksvg2/svg/SVGGradientElement.cpp:
2390         * ksvg2/svg/SVGGradientElement.h:
2391         * ksvg2/svg/SVGHiddenElement.h: Added.
2392         (WebCore::SVGHiddenElement::Type):
2393         (WebCore::SVGHiddenElement::~SVGHiddenElement):
2394         (WebCore::SVGHiddenElement::localName):
2395         * ksvg2/svg/SVGImageElement.cpp:
2396         (WebCore::SVGImageElement::notifyAttributeChange):
2397         * ksvg2/svg/SVGLineElement.cpp:
2398         (WebCore::SVGLineElement::notifyAttributeChange):
2399         * ksvg2/svg/SVGPathElement.cpp:
2400         (WebCore::SVGPathElement::notifyAttributeChange):
2401         * ksvg2/svg/SVGPatternElement.cpp:
2402         * ksvg2/svg/SVGPatternElement.h:
2403         * ksvg2/svg/SVGPolyElement.cpp:
2404         (WebCore::SVGPolyElement::notifyAttributeChange):
2405         * ksvg2/svg/SVGRectElement.cpp:
2406         (WebCore::SVGRectElement::notifyAttributeChange):
2407         * ksvg2/svg/SVGStyledElement.cpp:
2408         (WebCore::SVGStyledElement::notifyAttributeChange):
2409         (WebCore::SVGStyledElement::updateElementInstance):
2410         * ksvg2/svg/SVGStyledElement.h:
2411         * ksvg2/svg/SVGUseElement.cpp:
2412         (WebCore::SVGUseElement::instanceRoot):
2413         (WebCore::SVGUseElement::animatedInstanceRoot):
2414         (WebCore::SVGUseElement::hasChildNodes):
2415         (WebCore::SVGUseElement::insertedIntoDocument):
2416         (WebCore::SVGUseElement::buildPendingResource):
2417         (WebCore::SVGUseElement::createRenderer):
2418         (WebCore::SVGUseElement::buildShadowTree):
2419         (WebCore::SVGUseElement::recursiveShadowTreeBuilder):
2420         (WebCore::dumpShadowTree):
2421         (WebCore::SVGUseElement::addShadowTree):
2422         * ksvg2/svg/SVGUseElement.h:
2423         * ksvg2/svg/SVGUseElement.idl:
2424
2425 2007-01-19  Eric Seidel  <eric@webkit.org>
2426
2427         Reviewed by rwlbuis.
2428
2429         Add support for SVGMPathElement parsing.
2430
2431         No test cases possible (SVGAnimateMotion doesn't work yet)
2432
2433         * WebCore.xcodeproj/project.pbxproj:
2434         * ksvg2/svg/SVGAnimateMotionElement.cpp:
2435         (WebCore::SVGAnimateMotionElement::animationPath):
2436         * ksvg2/svg/SVGMPathElement.cpp: Added.
2437         (WebCore::SVGMPathElement::SVGMPathElement):
2438         (WebCore::SVGMPathElement::~SVGMPathElement):
2439         (WebCore::SVGMPathElement::parseMappedAttribute):
2440         (WebCore::SVGMPathElement::pathElement):
2441         * ksvg2/svg/SVGMPathElement.h: Added.
2442         * ksvg2/svg/SVGNumberList.cpp:
2443         (WebCore::SVGNumberList::parse): fix typo in comment
2444         * ksvg2/svg/svgtags.in: add back mpath
2445
2446 2007-01-19  Eric Seidel  <eric@webkit.org>
2447
2448         Reviewed by rwlbuis.
2449
2450         Implement better parsing for keyTimes, keySplines and keyPoints.
2451
2452         Unfortunately none of this code is used much yet, thus isn't very testable.
2453
2454         * ksvg2/svg/SVGAnimateMotionElement.cpp:
2455         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
2456         * ksvg2/svg/SVGAnimationElement.cpp:
2457         (WebCore::SVGAnimationElement::parseKeyNumbers):
2458         (WebCore::parseKeySplines):
2459         (WebCore::SVGAnimationElement::parseMappedAttribute):
2460         * ksvg2/svg/SVGAnimationElement.h:
2461         * ksvg2/svg/SVGNumberList.cpp:
2462         (WebCore::SVGNumberList::parse):
2463
2464 2007-01-18  Adam Roben  <aroben@apple.com>
2465
2466         Reviewed by Beth.
2467
2468         Fix: <rdar://problem/4939672> REGRESSION: With text selected that is
2469         not a link, the "Remove Link" contextual menu item remains active
2470
2471         * platform/ContextMenuItem.h: Added enabled method.
2472         * platform/qt/ContextMenuItemQt.cpp:
2473         (WebCore::ContextMenuItem::enabled): Implemented.
2474         * platform/mac/ContextMenuItemMac.mm:
2475         (WebCore::ContextMenuItem::enabled): Ditto.
2476         * platform/mac/ContextMenuMac.mm:
2477         (-[WebCoreMenuTarget validateMenuItem:]): Implemented to fulfill the
2478         NSMenuValidation protocol.
2479         
2480 2007-01-18  Beth Dakin  <bdakin@apple.com>
2481
2482         Reviewed by Adele.
2483
2484         Fix for <rdar://problem/4939558> REGRESSION: "Search in Google", 
2485         "Search in Spotlight" and "Look up in Dictionary" are missing 
2486         initially from the contextual menu
2487
2488         The bug here is that we select the we were selecting the word after 
2489         the context menu event was dispatched and after the context menu 
2490         was built up.
2491
2492         * page/EventHandler.cpp:
2493         (WebCore::EventHandler::sendContextMenuEvent): Select the word 
2494         before dispatching the event. It is safe to remove the check for 
2495         swallowEvent since WebCore context menus ensure that we always 
2496         swallow the event anyway.
2497
2498 2007-01-18  Mark Rowe  <mrowe@apple.com>
2499
2500         Reviewed by Tim H.
2501
2502         Fix for http://bugs.webkit.org/show_bug.cgi?id=7926
2503         Bug 7926: Crash using -callWebScriptMethod to access offsetTop property
2504
2505         * bindings/objc/WebScriptObject.mm:
2506         (-[WebScriptObject callWebScriptMethod:withArguments:]): Bail out early if function value is an immediate,
2507         or if the function object is not callable.
2508
2509 2007-01-18  Sam Weinig  <sam@webkit.org>
2510
2511         Reviewed by Maciej.
2512
2513         Patch for http://bugs.webkit.org/show_bug.cgi?id=11853
2514         REGRESSION (r17352): Whitespace in <title> is rendered
2515
2516         * loader/DocumentLoader.cpp:
2517         (WebCore::canonicalizedTitle): Changed to also collapse internal
2518         whitespace.  This required removing an optimization that is no
2519         longer possible.
2520         * manual-tests/title-internal-whitespace.html: Added.
2521
2522 2007-01-18  Mitz Pettel  <mitz@webkit.org>
2523
2524         Reviewed by Maciej.
2525
2526         - fix http://bugs.webkit.org/show_bug.cgi?id=12039
2527           Assertion failure in WebCore::Font::primaryFont
2528
2529         Test: fast/text/font-initial.html
2530
2531         * css/cssstyleselector.cpp:
2532         (WebCore::CSSStyleSelector::applyProperty): Give 'font: initial' the
2533         Standard generic family. This makes the FontDescription different from
2534         that of the initial font of a GraphicsContext, ensuring that the latter
2535         will not be used.
2536
2537 2007-01-18  Mitz Pettel  <mitz@webkit.org>
2538
2539         Reviewed by Darin.
2540
2541         - fix http://bugs.webkit.org/show_bug.cgi?id=11451
2542           REGRESSION: Dell.com does not render correctly in ToT (stylesheet not loaded)
2543
2544         Test: http/tests/misc/css-accept-any-type.html
2545
2546         * loader/CachedCSSStyleSheet.cpp:
2547         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): Changed the accept header
2548         for stylesheets to "text/css,*/*;q=0.1" to match Firefox, accepting CSS served
2549         as any type.
2550
2551 2007-01-18  Mitz Pettel  <mitz@webkit.org>
2552
2553         Reviewed by Darin.
2554
2555         - fix http://bugs.webkit.org/show_bug.cgi?id=11271
2556         REGRESSION (r12358): Text in display: table unselectable
2557
2558         Test: editing/selection/display-table-text.html
2559
2560         * editing/htmlediting.cpp:
2561         (WebCore::isTableElement): Changed to return false for text nodes.
2562
2563 2007-01-18  Mitz Pettel  <mitz@webkit.org>
2564
2565         Reviewed by Darin.
2566
2567         - fix http://bugs.webkit.org/show_bug.cgi?id=6218
2568           CSS1: WebTextRenderer caches and re-uses fallback renderers that are based on family lists
2569
2570         This patch takes character-to-glyph mapping out of FontData and instead makes
2571         each Font keep its own mapping, using a shared set of glyph page fallback trees.
2572
2573         For each page number there is (at most) one tree. A path from the root to a
2574         node in the tree corresponds to a fallback list of FontDatas. The node points to
2575         a page (which may be shared with other nodes) that maps each character in its range
2576         to a glyph in the first FontData in the fallback list that has it, or to 0 if none of
2577         the FontDatas has a glyph for that character. A special kind of node, that can
2578         only occur as a leaf, corresponds to using system fallback fonts after the list
2579         has been exhausted. This prevents system fallback from polluting non-leaf
2580         nodes.
2581
2582         Nodes and pages are initialized lazily and employ "copy on write".
2583
2584         * CMakeLists.txt:
2585         * WebCore.pro:
2586         * WebCore.vcproj/WebCore/WebCore.vcproj:
2587         * WebCore.xcodeproj/project.pbxproj:
2588         * WebCoreSources.bkl:
2589         * platform/Font.cpp:
2590         (WebCore::WidthIterator::WidthIterator): Removed substituteFontData.
2591         (WebCore::WidthIterator::advance): Moved all character-to-glyph mapping logic out
2592         of here and replaced it with a call to Font::glyphDataForCharacter().
2593         (WebCore::Font::Font):
2594         (WebCore::Font::operator=):
2595         (WebCore::Font::glyphDataForCharacter): Added. This method performs the lookup in the
2596         page fallback trees, triggering lazy initialization as needed, and caching pointers to
2597         the retrieved page tree nodes in the font.
2598         (WebCore::Font::update):
2599         (WebCore::Font::drawSimpleText):
2600         (WebCore::Font::floatWidth):
2601         (WebCore::Font::floatWidthForSimpleText): Removed substituteFont argument.
2602         (WebCore::Font::offsetForPositionForSimpleText):
2603         * platform/Font.h:
2604         * platform/FontData.cpp:
2605         (WebCore::FontData::FontData):
2606         * platform/FontData.h:
2607         (WebCore::FontData::missingGlyphData): Added. Returns the "missing glyph" GlyphData for
2608         this FontData.
2609         * platform/GlyphMap.cpp: Removed.
2610         * platform/GlyphMap.h: Removed.
2611         * platform/GlyphPageTreeNode.cpp: Renamed GlyphMap.cpp to this.
2612         (WebCore::GlyphPageTreeNode::getRoot): Added. Returns the root of the page fallback tree for
2613         the given page number.
2614         (WebCore::GlyphPageTreeNode::initializePage): Added. Helper method that initializes the page
2615         pointer of a node, possibly to a pointer to another node's page or to 0.
2616         (WebCore::GlyphPageTreeNode::getChild): Added.
2617         * platform/GlyphPageTreeNode.h: Renamed GlyphMap.h to this.
2618         (WebCore::GlyphPage::glyphDataForCharacter):
2619         (WebCore::GlyphPage::setGlyphDataForCharacter):
2620         (WebCore::GlyphPage::setGlyphDataForIndex):
2621         (WebCore::GlyphPageTreeNode::GlyphPageTreeNode):
2622         (WebCore::GlyphPageTreeNode::getRootChild):
2623         (WebCore::GlyphPageTreeNode::parent):
2624         (WebCore::GlyphPageTreeNode::page):
2625         (WebCore::GlyphPageTreeNode::level):
2626         (WebCore::GlyphPageTreeNode::isSystemFallback): Added. Returns whether the node corresponds
2627         to the system providing fallback fonts, which is done on a character-by-character basis.
2628         * platform/gdk/GlyphMapGdk.cpp: Removed.
2629         * platform/gdk/GlyphPageTreeNodeGdk.cpp: Renamed GlyphMapGdk.cpp to this.
2630         (WebCore::GlyphPage::fill):
2631         * platform/mac/FontDataMac.mm:
2632         (WebCore::FontData::platformInit):
2633         * platform/mac/FontMac.mm:
2634         (WebCore::Font::Font):
2635         * platform/mac/GlyphMapMac.cpp: Removed.
2636         * platform/mac/GlyphPageTreeNodeMac.cpp: Renamed GlypMapMac.cpp to this.
2637         (WebCore::GlyphPage::fill): Changed to return false if the font has no glyphs in the page.
2638         * platform/qt/GlyphMapQt.cpp: Removed.
2639         * platform/qt/GlyphPageTreeNodeQt.cpp: Renamed GlyphMapQt.cpp to this.
2640         (WebCore::GlyphPage::fill):
2641         * platform/win/GlyphMapWin.cpp: Removed.
2642         * platform/win/GlyphPageTreeNodeWin.cpp: Renamed GlyphMapWin to this.
2643         (WebCore::GlyphPage::fill):
2644
2645 2007-01-18  Mitz Pettel  <mitz@webkit.org>
2646
2647         Reviewed by Darin.
2648
2649         - fix http://bugs.webkit.org/show_bug.cgi?id=9952
2650           REGRESSION: Repro crash when dragging an image from the window to the address bar
2651
2652         * page/FrameView.cpp:
2653         (WebCore::FrameView::~FrameView): Removed the call to Document::detach(). If this
2654         view is the current view, then the Frame should have already detached the document.
2655         Added an assertion that this is the case. If this view is not the current view,
2656         then it cannot access its document, but the page cache should have detached it already.
2657         Similarly, changed to call RenderPart::setWidget() only if this is the current view
2658         in the frame.
2659         (WebCore::FrameView::adjustViewSize): Added an assertion that this view is the current
2660         view in the frame.
2661         (WebCore::FrameView::layout): Ditto.
2662         (WebCore::FrameView::scheduleRelayout): Ditto.
2663         (WebCore::FrameView::scheduleRelayoutOfSubtree): Ditto.
2664         (WebCore::FrameView::windowClipRect): Ditto.
2665
2666 2007-01-18  Eric Seidel  <eric@webkit.org>
2667
2668         Reviewed by bdash.
2669
2670         No test needed, removed bogus debug-only ASSERT.
2671
2672         * rendering/RenderSVGContainer.cpp:
2673         (WebCore::RenderSVGContainer::paint):
2674
2675 2007-01-18  Alice Liu  <alice.liu@apple.com>
2676
2677         Build Fix
2678
2679         * platform/mac/PasteboardMac.mm:
2680         (WebCore::Pasteboard::writeSelection):
2681
2682 2007-01-18  Alice Liu  <alice.liu@apple.com>
2683
2684         Reviewed by Mark Rowe.
2685
2686         Fixes the leaks from my last patch, except for the first change below which is a missing delegate call for Mail purposes
2687
2688         * editing/Editor.cpp:
2689         (WebCore::Editor::cut):
2690         * platform/Pasteboard.h:
2691         * platform/mac/PasteboardMac.mm:
2692         (WebCore::Pasteboard::Pasteboard):
2693         (WebCore::Pasteboard::clear):
2694         (WebCore::Pasteboard::writeSelection):
2695         (WebCore::Pasteboard::writeURL):
2696         (WebCore::Pasteboard::plainText):
2697         (WebCore::Pasteboard::documentFragment):
2698
2699 2007-01-18  David Hyatt  <hyatt@apple.com>
2700
2701         Make sure layer autoscrolling puts the event coordinates into the layer's coordinate space before
2702         calling hitTest on it.  Fixes "flashy" selection in textareas.
2703
2704         Reviewed by darin
2705
2706         * rendering/RenderLayer.cpp:
2707         (WebCore::RenderLayer::autoscroll):
2708         * rendering/RenderTextControl.cpp:
2709         (WebCore::RenderTextControl::nodeAtPoint):
2710
2711 2007-01-18  Anders Carlsson  <acarlsson@apple.com>
2712
2713         Reviewed by Adam.
2714
2715         Get rid of ResourceLoaderMac.mm and make willCacheResponse platform-independent.
2716         
2717         * loader/ResourceLoader.cpp:
2718         (WebCore::ResourceLoader::willCacheResponse):
2719         * loader/ResourceLoader.h:
2720         * loader/mac/ResourceLoaderMac.mm: Removed.
2721         * platform/network/ResourceHandleClient.h:
2722         (WebCore::):
2723         (WebCore::ResourceHandleClient::willCacheResponse):
2724         (WebCore::ResourceHandleClient::willStopBufferingData):
2725         * platform/network/mac/ResourceHandleMac.mm:
2726         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
2727
2728 2007-01-18  Maciej Stachowiak  <mjs@apple.com>
2729
2730         Reviewed by John.
2731
2732         - fixed <rdar://problem/4887416> REGRESSION (SearchField): Assertion failure in HTMLInputElement::setValueFromRenderer when editing via drag and drop (11846)
2733         http://bugs.webkit.org/show_bug.cgi?id=11846
2734         
2735         * editing/ReplaceSelectionCommand.cpp:
2736         (WebCore::ReplaceSelectionCommand::doApply): Don't insert extra paragraph separators to avoid
2737         nesting blocks in plaintext mode, since that's not an issue under normal circumstances.
2738         * html/HTMLInputElement.h:
2739         * manual-tests/drag-move-in-search-field.html: Added.
2740         * rendering/RenderTextControl.cpp:
2741         (WebCore::RenderTextControl::subtreeHasChanged): constrain the value; we'd
2742         rather truncate it than end up with an illegal value here.
2743
2744 2007-01-18  Simon Hausmann  <hausmann@kde.org>
2745
2746         Reviewed by Zack.
2747
2748         * WebCore.pro: Ha^H^HFix to support massive parallel builds.
2749
2750 2007-01-18  David Kilzer  <ddkilzer@kilzer.net>
2751
2752         Reviewed by Darin and Mitz.
2753
2754         - fix http://bugs.webkit.org/show_bug.cgi?id=12305
2755           REGRESSION: Images do not load in video sections on CNN.com homepage
2756
2757         <rdar://problem/4931480> REGRESSION: Images do not load in video sections on CNN.com homepage (12305)
2758
2759         Test: fast/dom/HTMLImageElement/image-lowsrc-getset.html
2760
2761         * html/HTMLAttributeNames.in: Added lowsrc.
2762         * html/HTMLImageElement.cpp:
2763         (WebCore::HTMLImageElement::isURLAttribute): Added lowsrc.
2764         (WebCore::HTMLImageElement::lowsrc): Added.
2765         (WebCore::HTMLImageElement::setLowsrc): Added.
2766         * html/HTMLImageElement.h: Added lowsrc and setLowsrc.
2767         * html/HTMLImageElement.idl: Added lowsrc.
2768
2769 2007-01-18  Simon Hausmann  <hausmann@kde.org>
2770
2771         Reviewed by Zack.
2772
2773         * WebCore.pro: Remove generated files on make clean.
2774
2775 2007-01-17  Alice Liu  <alice.liu@apple.com>
2776
2777         Reviewed by Harrison.
2778
2779         Fix for <rdar://problem/4894155> REGRESSION: Extra line break is pasted with content into message body after choosing File - Paste
2780
2781         Migration of some editing code from WebHTMView to WebCore::Editor
2782         resulted in not calling pasteboardTypesForSelection, which Mail was
2783         overriding for the special purpose of adding a type to the
2784         pasteboard after WebKit did.  This patch adds 2 separate code paths
2785         for Tiger and Leopard.  On Tiger we give in and call the WebView's
2786         pasteboardTypesForSelection.  On Leopard we call a delegate after
2787         the pasteboard types are set. 
2788
2789         * bridge/EditorClient.h:
2790         * editing/Editor.h:
2791         * platform/Pasteboard.h:
2792         * platform/graphics/svg/SVGImageEmptyClients.h:
2793         (WebCore::SVGEmptyEditorClient::didSetSelectionTypesForPasteboard):
2794         (WebCore::SVGEmptyEditorClient::pasteboardTypesForSelection):
2795         * platform/mac/PasteboardMac.mm:
2796         (WebCore::Pasteboard::Pasteboard):
2797         (WebCore::Pasteboard::clear):
2798         (WebCore::Pasteboard::writeSelection):
2799         (WebCore::Pasteboard::writeURL):
2800         (WebCore::Pasteboard::plainText):
2801         (WebCore::Pasteboard::documentFragment):
2802
2803 2007-01-17  John Sullivan  <sullivan@apple.com>
2804
2805         Reviewed by Darin
2806
2807         - WebCore part of fix for <rdar://problem/4462420> REGRESSION: Mail hangs during 
2808           Replace All if the replacement string contains the search string
2809         
2810         * page/Frame.h:
2811         * page/Frame.cpp:
2812         (WebCore::Frame::findString):
2813         new startInSelection parameter -- if true, search starts looking in selection; if false,
2814         search starts looking after the selection
2815         
2816         * page/mac/WebCoreFrameBridge.h:
2817         * page/mac/WebCoreFrameBridge.mm:
2818         (-[WebCoreFrameBridge searchFor:direction:caseSensitive:wrap:startInSelection:]):
2819         new startInSelection parameter, passed through to Frame::findString()
2820
2821         * editing/JSEditor.cpp:
2822         pass false for new findString parameter, to match old behavior
2823
2824 2007-01-17  Beth Dakin  <bdakin@apple.com>
2825
2826         Rubber stamped by Darin.
2827
2828         * rendering/HitTestResult.cpp: Just added a comment.
2829
2830 2007-01-17  Justin Garcia  <justin.garcia@apple.com>
2831
2832         Reviewed by darin
2833         
2834         <rdar://problem/4920488>
2835         REGRESSION: A crash occurs at WebCore::Range::processContents () when removing formatting from selected text (that contains a link)
2836
2837         * dom/Range.cpp:
2838         (WebCore::Range::commonAncestorContainer): Return null if the nodes
2839         don't have a common ancestor.  As a side effect, the public 
2840         commonAncestorContainer now sets an exception if the Range starts
2841         in one document and ends in another, or starts or ends in a tree
2842         that's been removed from the document.  The spec doesn't cover
2843         this and there is no precedent in other browsers for this case because
2844         they don't allow invalid Ranges (you can create one with WebCore
2845         by removing a node that contains the start/end of a Range).
2846         (WebCore::Range::compareBoundaryPoints): If the the two positions
2847         are in nodes that have no common ancestor, return null.  This doesn't
2848         change the behavior of the public compareBoundaryPoints: it already
2849         throws an exception if the two positions are in nodes that don't have
2850         a common ancestor.  This follows the spec.
2851
2852 2007-01-17  John Sullivan  <sullivan@apple.com>
2853
2854         The one word was typed by me, but only after debugging for a long time with Darin.
2855
2856         - fixed <rdar://problem/4912002> REGRESSION: Series of words marked as a single misspelled word
2857
2858         * editing/TextIterator.cpp:
2859         (WebCore::WordAwareIterator::WordAwareIterator):
2860         We were creating a TextIterator with the default kind, but WordAwareIterator is designed to work
2861         in concert with CharacterIterator, so they need to use the same kind. CharacterIterator uses
2862         kind RUNFINDER, so WordAwareIterator needs to do so also.
2863
2864 2007-01-17  Adele Peterson  <adele@apple.com>
2865
2866         Reviewed by Brady.
2867
2868         Fix for <rdar://problem/4900895> REGRESSION: onChange doesn't always fire for popups that have had value changed by JS
2869
2870         No test case since you need to open up the menu to fire onChange.
2871
2872         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setSelectedIndex):
2873           Keep track of m_lastOnChangeIndex even when we're not firing onChange.  Since
2874           the selected index has changed, we still want the m_lastOnChangeIndex to be up to date when we compare
2875           it later.  This matches our behavior in Safari 2.0.
2876
2877 2007-01-17  Adele Peterson  <adele@apple.com>
2878
2879         Reviewed by Darin and John.
2880
2881         - Fix for <rdar://problem/4816550> REGRESSION: autoscrolling doesn't work after double-click
2882
2883         * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): Set swallowEvent bool instead
2884           of returning early for double and triple clicks.
2885
2886 2007-01-17  Darin Adler  <darin@apple.com>
2887
2888         Reviewed by Hyatt.
2889
2890         * rendering/RenderObject.h: Removed unused nextEditable and previousEditable.
2891         * rendering/RenderObject.cpp: Ditto.
2892
2893 2007-01-17  Darin Adler  <darin@apple.com>
2894
2895         Reviewed by Maciej.
2896
2897         - fix http://bugs.webkit.org/show_bug.cgi?id=12278
2898           <rdar://problem/4928705> REGRESSION(r13070): Dragged image size includes padding (12278)
2899
2900         * WebCore.exp: Added HitTestResult::imageRect,
2901         removed HitTestResult::boundingBox.
2902
2903         * rendering/HitTestResult.h:
2904         * rendering/HitTestResult.cpp: (WebCore::HitTestResult::imageRect):
2905         Added. Returns the content rectangle of the image.
2906
2907         * rendering/RenderObject.h:
2908         * rendering/RenderObject.cpp:
2909         (WebCore::RenderObject::absolutePosition): Made const.
2910         (WebCore::RenderObject::contentBox): Added.
2911         (WebCore::RenderObject::absoluteContentBox): Added.
2912
2913         * rendering/RenderBox.h:
2914         * rendering/RenderBox.cpp:
2915         (WebCore::RenderBox::absolutePosition): Made const.
2916
2917         * rendering/RenderTableCell.h:
2918         * rendering/RenderTableCell.cpp:
2919         (WebCore::RenderTableCell::absolutePosition): Made const.
2920
2921         * rendering/RenderView.h:
2922         * rendering/RenderView.cpp:
2923         (WebCore::RenderView::absolutePosition): Made const.
2924
2925 2007-01-17  Adele Peterson  <adele@apple.com>
2926
2927         Reviewed by Beth.
2928
2929         Fix for  http://bugs.webkit.org/show_bug.cgi?id=10139
2930         <rdar://problem/4823028> REGRESSION: Reproducible crash when selecting a popup/button with ::selection pseudostyle
2931
2932         Test: fast/css/pseudostyle-anonymous-text.html
2933
2934         * rendering/RenderObject.cpp: (WebCore::RenderObject::getPseudoStyle): Nil check the node.
2935
2936 2007-01-17  Adele Peterson  <adele@apple.com>
2937
2938         Reviewed by Anders and John.
2939
2940         Fix for http://bugs.webkit.org/show_bug.cgi?id=11278
2941         <rdar://problem/4826875> REGRESSION: Popup width doesn't change to accommodate dynamic changes to options
2942
2943         Test: fast/forms/menulist-width-change.html
2944
2945         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
2946           When the options change, call setNeedsLayoutAndMinMaxRecalc.
2947
2948 2007-01-16  Alexey Proskuryakov  <ap@webkit.org>
2949
2950         Reviewed by Maciej.
2951
2952         http://bugs.webkit.org/show_bug.cgi?id=12268
2953         Give object prototypes their own names
2954
2955         * bindings/js/kjs_html.cpp: Changed the names of KJS:HTMLElement and KJS::HTMLElement to 
2956         not match the names of their WebCore counterparts. The "DOM" prefix I gave them doesn't 
2957         seem to carry much sense, but matches some other kjs_html object names.
2958
2959         * bindings/scripts/CodeGeneratorJS.pm: Append "Proto" to interface name for the prototype's ClassInfo.
2960
2961         * bindings/js/JSHTMLInputElementBase.cpp:
2962         (WebCore::JSHTMLInputElementBasePrototypeFunction::callAsFunction):
2963         (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
2964         * bindings/js/JSHTMLInputElementBase.h:
2965         * bindings/js/JSXMLHttpRequest.cpp:
2966         (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
2967         (KJS::JSXMLHttpRequest::JSXMLHttpRequest):
2968         (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction):
2969         * bindings/js/JSXMLHttpRequest.h:
2970         * bindings/js/JSXSLTProcessor.cpp:
2971         (KJS::JSXSLTProcessor::JSXSLTProcessor):
2972         (KJS::XSLTProcessorPrototypeFunction::callAsFunction):
2973         (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
2974         * bindings/js/kjs_css.cpp:
2975         (KJS::DOMCSSStyleDeclaration::DOMCSSStyleDeclaration):
2976         (KJS::DOMCSSStyleDeclarationPrototypeFunction::callAsFunction):
2977         (KJS::DOMMediaList::DOMMediaList):
2978         (KJS::KJS::DOMMediaListPrototypeFunction::callAsFunction):
2979         (KJS::DOMCSSStyleSheet::DOMCSSStyleSheet):
2980         (KJS::DOMCSSStyleSheetPrototypeFunction::callAsFunction):
2981         (KJS::DOMCSSValue::DOMCSSValue):
2982         (KJS::DOMCSSValuePrototypeFunction::callAsFunction):
2983         * bindings/js/kjs_css.h:
2984         * bindings/js/kjs_dom.cpp:
2985         (KJS::DOMNode::DOMNode):
2986         (KJS::DOMNodePrototypeFunction::callAsFunction):
2987         (KJS::DOMEventTargetNode::DOMEventTargetNode):
2988         (KJS::DOMEventTargetNodePrototypeFunction::callAsFunction):
2989         (KJS::DOMNamedNodeMap::DOMNamedNodeMap):
2990         (KJS::DOMNamedNodeMapPrototypeFunction::callAsFunction):
2991         * bindings/js/kjs_dom.h:
2992         * bindings/js/kjs_domnode.h:
2993         * bindings/js/kjs_events.cpp:
2994         (KJS::DOMEvent::DOMEvent):
2995         (KJS::DOMEventPrototypeFunction::callAsFunction):
2996         (KJS::Clipboard::Clipboard):
2997         (KJS::ClipboardPrototypeFunction::callAsFunction):
2998         * bindings/js/kjs_events.h:
2999         * bindings/js/kjs_html.cpp:
3000         (KJS::JSHTMLDocumentPrototypeFunction::callAsFunction):
3001         (KJS::):
3002         (KJS::JSHTMLDocument::JSHTMLDocument):
3003         (KJS::JSHTMLElementPrototypeFunction::callAsFunction):
3004         (KJS::JSHTMLElement::JSHTMLElement):
3005         (KJS::JSHTMLCollection::JSHTMLCollection):
3006         (KJS::JSHTMLCollectionPrototypeFunction::callAsFunction):
3007         * bindings/js/kjs_html.h:
3008         * bindings/js/kjs_navigator.cpp:
3009         * bindings/js/kjs_traversal.cpp:
3010         (KJS::DOMNodeFilter::DOMNodeFilter):
3011         (KJS::DOMNodeFilterPrototypeFunction::callAsFunction):
3012         * bindings/js/kjs_window.cpp:
3013         (KJS::Window::clear):
3014         Changed Proto to Prototype, and ProtoFunc to PrototypeFunction.
3015
3016 2007-01-17  Lars Knoll <lars@trolltech.com>
3017
3018         Reviewed by Zack and Darin
3019
3020         Fix the Qt build again after the latest Image changes.
3021         Also make some of the methods implemented in ImageCG 
3022         crossplatform.
3023
3024         * platform/graphics/BitmapImage.h:
3025         * platform/graphics/Image.cpp:
3026         (WebCore::Image::fillWithSolidColor):
3027         (WebCore::calculatePatternScale):
3028         (WebCore::Image::drawTiled):
3029         * platform/graphics/Image.h:
3030         * platform/graphics/cg/ImageCG.cpp:
3031         (WebCore::BitmapImage::draw):
3032         * platform/graphics/qt/ImageQt.cpp:
3033         (WebCore::Image::loadPlatformResource):
3034         (WebCore::Image::drawPattern):
3035         (WebCore::BitmapImage::initPlatformData):
3036         (WebCore::BitmapImage::invalidatePlatformData):
3037         (WebCore::BitmapImage::draw):
3038         (WebCore::BitmapImage::drawPattern):
3039         * platform/qt/TemporaryLinkStubs.cpp:
3040
3041 2007-01-17  Darin Adler  <darin@apple.com>
3042
3043         - quick attempt to fix the Qt build
3044
3045         * platform/graphics/qt/ImageQt.cpp: (WebCore::BitmapImage::drawTiled):
3046         Remove obsolete parameters from this stub.
3047
3048 2007-01-17  Eric Seidel  <eric@webkit.org>
3049
3050         Reviewed by rwlbuis.
3051
3052         Test: svg/custom/inner-svg-hit-test.svg
3053
3054         * rendering/RenderSVGContainer.cpp:
3055         (WebCore::RenderSVGContainer::nodeAtPoint): never allow containers to be hit.
3056
3057 2007-01-17  Lars Knoll <lars@trolltech.com>
3058
3059         Reviewed by Zack
3060
3061         Don't call receivedResponse twice for file: URLs.
3062         Never call back into the ResourceHandleClient once
3063         cancel() has been called on the ResourceHandle.
3064
3065         * WebCore.pro:
3066         * platform/network/qt/ResourceHandleManagerQt.cpp:
3067         (WebCore::ResourceHandleManager::cancel):
3068         (WebCore::ResourceHandleManager::receivedResponse):
3069         (WebCore::ResourceHandleManager::receivedData):
3070         (WebCore::ResourceHandleManager::receivedFinished):
3071         (WebCore::FileLoader::request):
3072         (WebCore::FileLoader::parseDataUrl):
3073         (WebCore::WebCoreHttp::scheduleNextRequest):
3074         * platform/network/qt/ResourceHandleManagerQt.h:
3075
3076 2007-01-17  Eric Seidel  <eric@webkit.org>
3077
3078         No review, build fix only.
3079
3080         * platform/graphics/cg/ImageCG.cpp: correct drawPatternCombined to drawPattern
3081         (WebCore::Image::drawPattern):
3082         (WebCore::Image::drawTiled):
3083
3084 2007-01-17  Eric Seidel  <eric@webkit.org>
3085
3086         Reviewed by mitz and rwlbuis.
3087         
3088         SVGs do not work as background images:
3089         http://bugs.webkit.org/show_bug.cgi?id=12096
3090
3091         Tests updated:
3092         - fast/images/svg-as-background.svg: now passes
3093         - fast/images/svg-as-tiled-background.svg: now passes
3094
3095         * platform/graphics/BitmapImage.h:
3096         (WebCore::BitmapImage::nativeImageForCurrentFrame):
3097         (WebCore::BitmapImage::mayFillWithSolidColor):
3098         (WebCore::BitmapImage::solidColor):
3099         * platform/graphics/Image.h:
3100         (WebCore::Image::mayFillWithSolidColor):
3101         (WebCore::Image::solidColor):
3102         (WebCore::Image::nativeImageForCurrentFrame):
3103         (WebCore::Image::startAnimation):
3104         * platform/graphics/cg/ImageCG.cpp:
3105         (WebCore::Image::drawPatternCallback):
3106         (WebCore::Image::drawPatternCombined):
3107         (WebCore::caculatePatternScale):
3108         (WebCore::Image::drawTiled):
3109         * platform/graphics/cg/PDFDocumentImage.cpp:
3110         * platform/graphics/cg/PDFDocumentImage.h:
3111         * platform/graphics/svg/SVGImage.cpp:
3112         (WebCore::SVGImage::nativeImageForCurrentFrame):
3113         * platform/graphics/svg/SVGImage.h:
3114
3115 2007-01-17  Rob Buis  <buis@kde.org>
3116
3117         Reviewed by Eric
3118
3119         Add proper condition for rx attribute negative check.
3120
3121         * ksvg2/svg/SVGRectElement.cpp:
3122         (WebCore::SVGRectElement::parseMappedAttribute):
3123
3124 2007-01-17  Lars Knoll <lars@trolltech.com>
3125
3126         Reviewed by Zack
3127
3128         change all notImplemented() macros to use qDebug
3129         instead of fprintf(stder, ...)
3130
3131         * loader/qt/DocumentLoaderQt.cpp:
3132         * loader/qt/FrameLoaderQt.cpp:
3133         * page/qt/EventHandlerQt.cpp:
3134         * page/qt/FrameQt.cpp:
3135         * platform/graphics/qt/GraphicsContextQt.cpp:
3136         * platform/graphics/qt/IconQt.cpp:
3137         * platform/network/qt/ResourceHandleManagerQt.cpp:
3138         * platform/network/qt/ResourceHandleQt.cpp:
3139         * platform/qt/CursorQt.cpp:
3140         * platform/qt/FileChooserQt.cpp:
3141         * platform/qt/MimeTypeRegistryQt.cpp:
3142         * platform/qt/PageQt.cpp: Removed.
3143         * platform/qt/PopupMenuQt.cpp:
3144         * platform/qt/ScrollViewQt.cpp:
3145         * platform/qt/TemporaryLinkStubs.cpp:
3146         * platform/qt/TextBoundaries.cpp:
3147         * platform/qt/WidgetQt.cpp:
3148
3149 2007-01-16  Brady Eidson  <beidson@apple.com>
3150
3151         Reviewed by Oliver
3152
3153         A few enhancements to the HTTP Auth architecture
3154
3155         * platform/network/ProtectionSpace.cpp:
3156         (WebCore::ProtectionSpace::isProxy):
3157         (WebCore::ProtectionSpace::receivesCredentialSecurely):
3158         * platform/network/ProtectionSpace.h:
3159
3160 2007-01-16  Alice Liu  <alice.liu@apple.com>
3161
3162         Reviewed by harrison.
3163
3164         Fixed <rdar://problem/4921134> WebKit needs extensible cut/copy to allow additional types to be written to pasteboard
3165
3166         * WebCore.xcodeproj/project.pbxproj:
3167         * bridge/EditorClient.h:
3168         * editing/Editor.cpp:
3169         (WebCore::Editor::copy):
3170         (WebCore::Editor::didWriteSelectionToPasteboard):
3171         * editing/Editor.h:
3172         * platform/graphics/svg/SVGImageEmptyClients.h:
3173         (WebCore::SVGEmptyEditorClient::didWriteSelectionToPasteboard):
3174
3175 2007-01-16  Justin Garcia  <justin.garcia@apple.com>
3176
3177         Reviewed by harrison
3178         
3179         <rdar://problem/4747450>
3180         Gmail Editor: Caret doesn't always position itself after list marker
3181         <rdar://problem/4917055>
3182         GMail Editor: A hang can occur when attempting to apply list styling to selected indented text
3183
3184         * editing/TextIterator.cpp:
3185         (WebCore::TextIterator::rangeFromLocationAndLength): Use VisiblePositions
3186         to compute the end of a run for emitted '\n's, because it's often wrong
3187         in that case.
3188
3189 2007-01-16  Darin Adler  <darin@apple.com>
3190
3191         - quick lame attempt to get Qt compiling again
3192
3193         * platform/qt/ContextMenuQt.cpp: Removed show() function.
3194
3195 2007-01-17  Nicholas Shanks  <contact@nickshanks.com>
3196
3197         Reviewed by Darin.
3198
3199         * platform/network/ResourceRequest.h:
3200         (WebCore::ResourceRequest::setHTTPAccept): Correct argument name.
3201
3202 2007-01-16  Beth Dakin  <bdakin@apple.com>
3203
3204         Reviewed by Adam.
3205
3206         Get rid of show() and hide() since they don't do anything.
3207
3208         * page/ContextMenuController.cpp:
3209         (WebCore::ContextMenuController::handleContextMenuEvent):
3210         * platform/ContextMenu.h:
3211         * platform/mac/ContextMenuMac.mm:
3212
3213 2007-01-16  Lars Knoll <lars@trolltech.com>
3214
3215         Reviewed by Zack
3216
3217         Cleaned up the way we create native widgets. They are
3218         now not created in WebCore anymore, but in the new
3219         Qt API to WebKit.
3220
3221         Fix a compile issue in the ResourceHandleManager.
3222
3223         * WebCore.pro:
3224         * platform/ScrollView.h:
3225         * platform/Widget.h:
3226         (WebCore::ResourceHandleManager::cancel):
3227         * platform/qt/ScrollViewCanvasQt.cpp:
3228         (WebCore::ScrollViewCanvasQt::ScrollViewCanvasQt):
3229         (WebCore::ScrollViewCanvasQt::paintEvent):
3230         (WebCore::ScrollViewCanvasQt::mouseMoveEvent):
3231         (WebCore::ScrollViewCanvasQt::mousePressEvent):
3232         (WebCore::ScrollViewCanvasQt::mouseReleaseEvent):
3233         (WebCore::ScrollViewCanvasQt::handleKeyEvent):
3234         * platform/qt/ScrollViewCanvasQt.h:
3235         * platform/qt/ScrollViewQt.cpp:
3236         (WebCore::ScrollView::ScrollView):
3237         (WebCore::ScrollView::setScrollArea):
3238         (WebCore::ScrollView::addChild):
3239         * platform/qt/WidgetQt.cpp:
3240         * platform/network/qt/ResourceHandleManagerQt.cpp:
3241
3242 2007-01-16  Lars Knoll <lars@trolltech.com>
3243
3244         Reviewed by Zack
3245
3246         Looks like ResourceHandle _has_ to do everything
3247         asynchronously if we don't want to run into
3248         lots of trouble in the loader.
3249
3250         Implement support data: URLs.
3251
3252         Remove some unused Qt only code in ResourceHandleClient.h
3253
3254         * platform/network/ResourceHandleClient.h:
3255         * platform/network/qt/ResourceHandleManagerQt.cpp:
3256         (WebCore::RequestQt::setURL):
3257         (WebCore::ResourceHandleManager::add):
3258         (WebCore::ResourceHandleManager::cancel):
3259         (WebCore::ResourceHandleManager::receivedFinished):
3260         (WebCore::LoaderThread::run):
3261         (WebCore::FileLoader::request):
3262         (WebCore::FileLoader::sendData):
3263         (WebCore::FileLoader::parseDataUrl):
3264         * platform/network/qt/ResourceHandleManagerQt.h:
3265
3266 2007-01-16  Eric Seidel  <eric@webkit.org>
3267
3268         Reviewed by mitz.
3269
3270         Refactor drawTiled implementations in preparation for combining them.
3271         Removed unused RoundTile code path.
3272
3273         * platform/graphics/cg/ImageCG.cpp:
3274         (WebCore::drawPattern):
3275         (WebCore::BitmapImage::drawTiled):
3276         (WebCore::caculatePatternScale):
3277
3278 2007-01-16  Darin Adler  <darin@apple.com>
3279
3280         Reviewed by Mark Rowe.
3281
3282         - removed unused field from loader
3283
3284         * loader/loader.cpp:
3285         (WebCore::Loader::numRequests):
3286         (WebCore::Loader::cancelRequests):
3287         * loader/loader.h:
3288
3289 2007-01-15  Rob Buis  <buis@kde.org>
3290
3291         Reviewed by Eric.
3292
3293         http://bugs.webkit.org/show_bug.cgi?id=12272
3294         SVG picture is clipped (edges not visible)
3295
3296         Expose css dpi constant and use it for svg, making
3297         1in amount to 96 pixels like for html.
3298
3299         * css/CSSPrimitiveValue.cpp:
3300         (WebCore::CSSPrimitiveValue::computeLengthFloat):
3301         (WebCore::scaleFactorForConversion):
3302         * css/csshelper.h:
3303         * ksvg2/svg/SVGLength.cpp:
3304         (WebCore::SVGLength::value):
3305         (WebCore::SVGLength::setValue):
3306         * ksvg2/svg/SVGLength.h:
3307
3308 2007-01-15  Brady Eidson  <beidson@apple.com>
3309
3310         Reviewed by Adam
3311         
3312         CFNet additions
3313
3314         * platform/network/AuthenticationChallenge.cpp:
3315         (WebCore::operator==):
3316         * platform/network/AuthenticationChallenge.h:
3317         (WebCore::AuthenticationChallenge::sourceHandle):
3318         (WebCore::AuthenticationChallenge::cfURLAuthChallengeRef):
3319         * platform/network/ResourceError.h:
3320         * platform/network/ResourceHandle.h:
3321         * platform/network/ResourceHandleInternal.h:
3322         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3323
3324 2007-01-15  Eric Seidel  <eric@webkit.org>
3325
3326         Reviewed by hyatt.
3327
3328         Don't map attributes in namespaces other than null to CSS properties.
3329         
3330         Test: svg/custom/attribute-namespace-check.svg
3331
3332         * ksvg2/svg/SVGStyledElement.cpp:
3333         (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName):
3334
3335 2007-01-15  Lars Naesbye Christensen  <larsnaesbye@stud.ku.dk>
3336
3337         Reviewed by Darin.
3338
3339         - http://bugs.webkit.org/show_bug.cgi?id=11112
3340           add a drop shadow to the hand cursor used for links
3341
3342         * Resources/linkCursor.png: Added a drop shadow.
3343
3344 2007-01-15  Darin Adler  <darin@apple.com>
3345
3346         Reviewed by Adam.
3347
3348         - fix http://bugs.webkit.org/show_bug.cgi?id=12190
3349           REGRESSION: Placeholder text does not reflect dynamic updates
3350
3351         Test: fast/forms/placeholder-set-attribute.html
3352
3353         * html/HTMLTextFieldInnerElement.cpp:
3354         (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler):
3355         Call onSearch on the element since I removed it from the renderer.
3356
3357         * rendering/RenderTextControl.h: Added explicit virtual keywords for overrides
3358         of virtual functions. Removed the unneeded onSearch function. Made the inheritance
3359         from PopupMenuClient be private, and made the overrides all private. Replaced the
3360         showPlaceholderIfNeeded and hidePlaceholderIfNeeded functions with updatePlaceholder.
3361         * rendering/RenderTextControl.cpp:
3362         (WebCore::RenderTextControl::createResultsButtonStyle): Added an assertion.
3363         (WebCore::RenderTextControl::updatePlaceholder): Added. Replaces the two
3364         functions, showPlaceholderIfNeeded and hidePlaceholderIfNeeded.
3365         (WebCore::RenderTextControl::updateFromElement): Added call to
3366         updatePlaceholder before updating the value. Also improved the structure
3367         of the function and corrected incorrect use of copy and replace.
3368         (WebCore::RenderTextControl::updateCancelButtonVisibility): Added an
3369         assertion and removed an unneeded local variable.
3370         (WebCore::RenderTextControl::subtreeHasChanged): Removed an unneeded
3371         null check and virtual function calls.
3372         (WebCore::RenderTextControl::forwardEvent): Replaced calls to the old
3373         functions with calls to updatePlaceholder.
3374         (WebCore::RenderTextControl::selectionChanged): Changed code to dispatch
3375         the select event directly -- I plan to remove the onSelect function, which
3376         was only called here.
3377         (WebCore::RenderTextControl::autosaveName): Removed too-specific cast and
3378         local variable.
3379         (WebCore::RenderTextControl::addSearchResult): Added assertion and changed
3380         variable name for clarity.
3381         (WebCore::RenderTextControl::valueChanged): Changed code to check for empty
3382         autosave name instead of null for consistency with other call sites that
3383         manage the autosave name. Also changed the code that dispatches an event
3384         to call onSearch on the input element so we don't need our own function.
3385
3386 2007-01-15  Eric Seidel  <eric@webkit.org>
3387
3388         Reviewed by hyatt.
3389
3390         Fix SVGStyledElement::parseMappedAttribute to only map SVG-allowed CSS properties
3391         (i.e. width is no longer mapped to CSS for SVG)
3392         Add SVGStyledElement::mapToEntry to allow RenderStyle-sharing
3393         http://bugs.webkit.org/show_bug.cgi?id=12060
3394
3395         * dom/MappedAttributeEntry.h:
3396         (WebCore::):
3397         * ksvg2/svg/SVGStyledElement.cpp:
3398         (WebCore::cssPropertyIdForName): new helper
3399         (WebCore::mapAttributeToCSSProperty): new helper
3400         (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName): new helper
3401         (WebCore::SVGStyledElement::mapToEntry): added.
3402         (WebCore::SVGStyledElement::parseMappedAttribute): use cssPropertyIdForSVGAttributeName
3403         * ksvg2/svg/SVGStyledElement.h:
3404
3405 2007-01-15  Eric Seidel  <eric@webkit.org>
3406
3407         Reviewed by bdash.
3408
3409         Update header guards to follow new style guidelines using new clean-header-guards script.
3410
3411         * bindings/js/JSHTMLElementWrapperFactory.h:
3412         * bindings/js/JSHTMLInputElementBase.h:
3413         * bindings/js/JSHTMLOptionElementConstructor.h:
3414         * bindings/js/JSSVGElementWrapperFactory.h:
3415         * bindings/js/JSSVGPODTypeWrapper.h:
3416         * bindings/js/JSXMLHttpRequest.h:
3417         * bindings/js/JSXSLTProcessor.h:
3418         * bindings/js/kjs_binding.h:
3419         * bindings/js/kjs_css.h:
3420         * bindings/js/kjs_dom.h:
3421         * bindings/js/kjs_domnode.h:
3422         * bindings/js/kjs_events.h:
3423         * bindings/js/kjs_html.h:
3424         * bindings/js/kjs_navigator.h:
3425         * bindings/js/kjs_proxy.h:
3426         * bindings/js/kjs_traversal.h:
3427         * bindings/js/kjs_window.h:
3428         * bridge/EditorClient.h:
3429         * bridge/History.h:
3430         * css/CSSStyleSheet.h:
3431         * css/CSSValue.h:
3432         * css/CSSValueList.h:
3433         * css/DashboardRegion.h:
3434         * css/FontFamilyValue.h:
3435         * css/FontValue.h:
3436         * css/MediaFeatureNames.h:
3437         * css/MediaList.h:
3438         * css/Pair.h:
3439         * css/RectImpl.h:
3440         * css/ShadowValue.h:
3441         * css/StyleBase.h:
3442         * css/StyleList.h:
3443         * css/StyleSheet.h:
3444         * css/StyleSheetList.h:
3445         * css/cssstyleselector.h:
3446         * dom/BeforeTextInsertedEvent.h:
3447         * dom/CDATASection.h:
3448         * dom/CharacterData.h:
3449         * dom/ChildNodeList.h:
3450         * dom/Comment.h:
3451         * dom/DOMImplementation.h:
3452         * dom/DocPtr.h:
3453         * dom/Document.h:
3454         * dom/DocumentFragment.h:
3455         * dom/DocumentMarker.h:
3456         * dom/DocumentType.h:
3457         * dom/EditingText.h:
3458         * dom/Entity.h:
3459         * dom/EntityReference.h:
3460         * dom/EventNames.h:
3461         * dom/EventTargetNode.h:
3462         * dom/NameNodeList.h:
3463         * dom/NamedNodeMap.h:
3464         * dom/Node.h:
3465         * dom/NodeList.h:
3466         * dom/Notation.h:
3467         * dom/Position.h:
3468         * dom/ProcessingInstruction.h:
3469         * dom/Range.h:
3470         * dom/StyleElement.h:
3471         * dom/Text.h:
3472         * editing/AppendNodeCommand.h:
3473         * editing/ApplyStyleCommand.h:
3474         * editing/BreakBlockquoteCommand.h:
3475         * editing/CommandByName.h:
3476         * editing/CompositeEditCommand.h:
3477         * editing/DeleteButton.h:
3478         * editing/DeleteButtonController.h:
3479         * editing/DeleteFromTextNodeCommand.h:
3480         * editing/DeleteSelectionCommand.h:
3481         * editing/InsertIntoTextNodeCommand.h:
3482         * editing/InsertLineBreakCommand.h:
3483         * editing/InsertNodeBeforeCommand.h:
3484         * editing/InsertParagraphSeparatorCommand.h:
3485         * editing/InsertTextCommand.h:
3486         * editing/JoinTextNodesCommand.h:
3487         * editing/MergeIdenticalElementsCommand.h:
3488         * editing/ModifySelectionListLevel.h:
3489         * editing/MoveSelectionCommand.h:
3490         * editing/RemoveCSSPropertyCommand.h:
3491         * editing/RemoveNodeAttributeCommand.h:
3492         * editing/RemoveNodeCommand.h:
3493         * editing/RemoveNodePreservingChildrenCommand.h:
3494         * editing/ReplaceSelectionCommand.h:
3495         * editing/SetNodeAttributeCommand.h:
3496         * editing/SplitElementCommand.h:
3497         * editing/SplitTextNodeCommand.h:
3498         * editing/SplitTextNodeContainingElementCommand.h:
3499         * editing/TextGranularity.h:
3500         * editing/TypingCommand.h:
3501         * editing/WrapContentsInDummySpanCommand.h:
3502         * history/BackForwardList.h:
3503         * history/HistoryItem.h:
3504         * history/HistoryItemTimer.h:
3505         * history/PageCache.h:
3506         * html/CanvasGradient.h:
3507         * html/CanvasPattern.h:
3508         * html/CanvasRenderingContext2D.h:
3509         * html/CanvasStyle.h:
3510         * html/FormDataList.h:
3511         * html/HTMLAnchorElement.h:
3512         * html/HTMLAppletElement.h:
3513         * html/HTMLAreaElement.h:
3514         * html/HTMLBRElement.h:
3515         * html/HTMLBaseElement.h:
3516         * html/HTMLBaseFontElement.h:
3517         * html/HTMLBlockquoteElement.h:
3518         * html/HTMLBodyElement.h:
3519         * html/HTMLButtonElement.h:
3520         * html/HTMLCanvasElement.h:
3521         * html/HTMLCollection.h:
3522         * html/HTMLDListElement.h:
3523         * html/HTMLDirectoryElement.h:
3524         * html/HTMLDivElement.h:
3525         * html/HTMLElement.h:
3526         * html/HTMLElementFactory.h:
3527         * html/HTMLEmbedElement.h:
3528         * html/HTMLFieldSetElement.h:
3529         * html/HTMLFontElement.h:
3530         * html/HTMLFormCollection.h:
3531         * html/HTMLFormElement.h:
3532         * html/HTMLFrameSetElement.h:
3533         * html/HTMLGenericFormElement.h:
3534         * html/HTMLHRElement.h:
3535         * html/HTMLHeadElement.h:
3536         * html/HTMLHeadingElement.h:
3537         * html/HTMLHtmlElement.h:
3538         * html/HTMLImageElement.h:
3539         * html/HTMLImageLoader.h:
3540         * html/HTMLInputElement.h:
3541         * html/HTMLIsIndexElement.h:
3542         * html/HTMLKeygenElement.h:
3543         * html/HTMLLIElement.h:
3544         * html/HTMLLabelElement.h:
3545         * html/HTMLLegendElement.h:
3546         * html/HTMLLinkElement.h:
3547         * html/HTMLMapElement.h:
3548         * html/HTMLMarqueeElement.h:
3549         * html/HTMLMenuElement.h:
3550         * html/HTMLMetaElement.h:
3551         * html/HTMLModElement.h:
3552         * html/HTMLNameCollection.h:
3553         * html/HTMLOListElement.h:
3554         * html/HTMLObjectElement.h:
3555         * html/HTMLOptGroupElement.h:
3556         * html/HTMLOptionElement.h:
3557         * html/HTMLOptionsCollection.h:
3558         * html/HTMLParagraphElement.h:
3559         * html/HTMLParamElement.h:
3560         * html/HTMLParser.h:
3561         * html/HTMLPlugInElement.h:
3562         * html/HTMLPreElement.h:
3563         * html/HTMLQuoteElement.h:
3564         * html/HTMLScriptElement.h:
3565         * html/HTMLSelectElement.h:
3566         * html/HTMLStyleElement.h:
3567         * html/HTMLTableCaptionElement.h:
3568         * html/HTMLTableCellElement.h:
3569         * html/HTMLTableColElement.h:
3570         * html/HTMLTableElement.h:
3571         * html/HTMLTablePartElement.h:
3572         * html/HTMLTableRowElement.h:
3573         * html/HTMLTableSectionElement.h:
3574         * html/HTMLTextAreaElement.h:
3575         * html/HTMLTextFieldInnerElement.h:
3576         * html/HTMLTitleElement.h:
3577         * html/HTMLUListElement.h:
3578         * ksvg2/css/SVGRenderStyle.h:
3579         * ksvg2/css/SVGRenderStyleDefs.h:
3580         * ksvg2/events/JSSVGLazyEventListener.h:
3581         * ksvg2/events/SVGZoomEvent.h:
3582         * ksvg2/misc/KCanvasRenderingStyle.h:
3583         * ksvg2/misc/PointerEventsHitRules.h:
3584         * ksvg2/misc/SVGDocumentExtensions.h:
3585         * ksvg2/misc/SVGImageLoader.h:
3586         * ksvg2/misc/TimeScheduler.h:
3587         * ksvg2/svg/GradientAttributes.h:
3588         * ksvg2/svg/LinearGradientAttributes.h:
3589         * ksvg2/svg/PatternAttributes.h:
3590         * ksvg2/svg/RadialGradientAttributes.h:
3591         * ksvg2/svg/SVGAElement.h:
3592         * ksvg2/svg/SVGAngle.h:
3593         * ksvg2/svg/SVGAnimateColorElement.h:
3594         * ksvg2/svg/SVGAnimateElement.h:
3595         * ksvg2/svg/SVGAnimateMotionElement.h:
3596         * ksvg2/svg/SVGAnimateTransformElement.h:
3597         * ksvg2/svg/SVGAnimatedPathData.h:
3598         * ksvg2/svg/SVGAnimatedPoints.h:
3599         * ksvg2/svg/SVGAnimatedTemplate.h:
3600         * ksvg2/svg/SVGAnimationElement.h:
3601         * ksvg2/svg/SVGCircleElement.h:
3602         * ksvg2/svg/SVGClipPathElement.h:
3603         * ksvg2/svg/SVGColor.h:
3604         * ksvg2/svg/SVGComponentTransferFunctionElement.h:
3605         * ksvg2/svg/SVGCursorElement.h:
3606         * ksvg2/svg/SVGDOMImplementation.h:
3607         * ksvg2/svg/SVGDefsElement.h:
3608         * ksvg2/svg/SVGDescElement.h:
3609         * ksvg2/svg/SVGDocument.h:
3610         * ksvg2/svg/SVGElement.h:
3611         * ksvg2/svg/SVGElementInstance.h:
3612         * ksvg2/svg/SVGElementInstanceList.h:
3613         * ksvg2/svg/SVGEllipseElement.h:
3614         * ksvg2/svg/SVGExternalResourcesRequired.h:
3615         * ksvg2/svg/SVGFEBlendElement.h:
3616         * ksvg2/svg/SVGFEColorMatrixElement.h:
3617         * ksvg2/svg/SVGFEComponentTransferElement.h:
3618         * ksvg2/svg/SVGFECompositeElement.h:
3619         * ksvg2/svg/SVGFEDiffuseLightingElement.h:
3620         * ksvg2/svg/SVGFEDisplacementMapElement.h:
3621         * ksvg2/svg/SVGFEDistantLightElement.h:
3622         * ksvg2/svg/SVGFEFloodElement.h:
3623         * ksvg2/svg/SVGFEFuncAElement.h:
3624         * ksvg2/svg/SVGFEFuncBElement.h:
3625         * ksvg2/svg/SVGFEFuncGElement.h:
3626         * ksvg2/svg/SVGFEFuncRElement.h:
3627         * ksvg2/svg/SVGFEGaussianBlurElement.h:
3628         * ksvg2/svg/SVGFEImageElement.h:
3629         * ksvg2/svg/SVGFELightElement.h:
3630         * ksvg2/svg/SVGFEMergeElement.h:
3631         * ksvg2/svg/SVGFEMergeNodeElement.h:
3632         * ksvg2/svg/SVGFEOffsetElement.h:
3633         * ksvg2/svg/SVGFEPointLightElement.h:
3634         * ksvg2/svg/SVGFESpecularLightingElement.h:
3635         * ksvg2/svg/SVGFESpotLightElement.h:
3636         * ksvg2/svg/SVGFETileElement.h:
3637         * ksvg2/svg/SVGFETurbulenceElement.h:
3638         * ksvg2/svg/SVGFilterElement.h:
3639         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
3640         * ksvg2/svg/SVGFitToViewBox.h:
3641         * ksvg2/svg/SVGForeignObjectElement.h:
3642         * ksvg2/svg/SVGGElement.h:
3643         * ksvg2/svg/SVGGradientElement.h:
3644         * ksvg2/svg/SVGImageElement.h:
3645         * ksvg2/svg/SVGLangSpace.h:
3646         * ksvg2/svg/SVGLength.h:
3647         * ksvg2/svg/SVGLengthList.h:
3648         * ksvg2/svg/SVGLineElement.h:
3649         * ksvg2/svg/SVGLinearGradientElement.h:
3650         * ksvg2/svg/SVGList.h:
3651         * ksvg2/svg/SVGListTraits.h:
3652         * ksvg2/svg/SVGLocatable.h:
3653         * ksvg2/svg/SVGMarkerElement.h:
3654         * ksvg2/svg/SVGMaskElement.h:
3655         * ksvg2/svg/SVGMetadataElement.h:
3656         * ksvg2/svg/SVGNumberList.h:
3657         * ksvg2/svg/SVGPaint.h:
3658         * ksvg2/svg/SVGParserUtilities.h:
3659         * ksvg2/svg/SVGPathElement.h:
3660         * ksvg2/svg/SVGPathSeg.h:
3661         * ksvg2/svg/SVGPathSegArc.h:
3662         * ksvg2/svg/SVGPathSegClosePath.h:
3663         * ksvg2/svg/SVGPathSegCurvetoCubic.h:
3664         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
3665         * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
3666         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
3667         * ksvg2/svg/SVGPathSegLineto.h:
3668         * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
3669         * ksvg2/svg/SVGPathSegLinetoVertical.h:
3670         * ksvg2/svg/SVGPathSegList.h:
3671         * ksvg2/svg/SVGPathSegMoveto.h:
3672         * ksvg2/svg/SVGPatternElement.h:
3673         * ksvg2/svg/SVGPointList.h:
3674         * ksvg2/svg/SVGPolyElement.h:
3675         * ksvg2/svg/SVGPolygonElement.h:
3676         * ksvg2/svg/SVGPolylineElement.h:
3677         * ksvg2/svg/SVGPreserveAspectRatio.h:
3678         * ksvg2/svg/SVGRadialGradientElement.h:
3679         * ksvg2/svg/SVGRectElement.h:
3680         * ksvg2/svg/SVGRenderingIntent.h:
3681         * ksvg2/svg/SVGSVGElement.h:
3682         * ksvg2/svg/SVGScriptElement.h:
3683         * ksvg2/svg/SVGSetElement.h:
3684         * ksvg2/svg/SVGStopElement.h:
3685         * ksvg2/svg/SVGStringList.h:
3686         * ksvg2/svg/SVGStylable.h:
3687         * ksvg2/svg/SVGStyleElement.h:
3688         * ksvg2/svg/SVGStyledElement.h:
3689         * ksvg2/svg/SVGStyledLocatableElement.h:
3690         * ksvg2/svg/SVGStyledTransformableElement.h:
3691         * ksvg2/svg/SVGSwitchElement.h:
3692         * ksvg2/svg/SVGSymbolElement.h:
3693         * ksvg2/svg/SVGTRefElement.h:
3694         * ksvg2/svg/SVGTSpanElement.h:
3695         * ksvg2/svg/SVGTests.h:
3696         * ksvg2/svg/SVGTextContentElement.h:
3697         * ksvg2/svg/SVGTextElement.h:
3698         * ksvg2/svg/SVGTextPositioningElement.h:
3699         * ksvg2/svg/SVGTitleElement.h:
3700         * ksvg2/svg/SVGTransform.h:
3701         * ksvg2/svg/SVGTransformList.h:
3702         * ksvg2/svg/SVGTransformable.h:
3703         * ksvg2/svg/SVGURIReference.h:
3704         * ksvg2/svg/SVGUnitTypes.h:
3705         * ksvg2/svg/SVGUseElement.h:
3706         * ksvg2/svg/SVGViewElement.h:
3707         * ksvg2/svg/SVGZoomAndPan.h:
3708         * loader/CachedCSSStyleSheet.h:
3709         * loader/CachedImage.h:
3710         * loader/CachedXSLStyleSheet.h:
3711         * loader/DocumentLoader.h:
3712         * loader/Request.h:
3713         * loader/SubresourceLoader.h:
3714         * loader/icon/IconDataCache.h:
3715         * loader/icon/IconDatabase.h:
3716         * loader/icon/IconLoader.h:
3717         * loader/icon/SQLDatabase.h:
3718         * loader/icon/SQLStatement.h:
3719         * loader/icon/SQLTransaction.h:
3720         * page/Frame.h:
3721         * page/FrameLoadRequest.h:
3722         * page/FrameTree.h:
3723         * page/FrameView.h:
3724         * page/PageState.h:
3725         * page/Plugin.h:
3726         * page/qt/FrameQt.h:
3727         * page/qt/FrameQtClient.h:
3728         * platform/Arena.h:
3729         * platform/ArrayImpl.h:
3730         * platform/Cursor.h:
3731         * platform/DeprecatedArray.h:
3732         * platform/DeprecatedCString.h:
3733         * platform/FileChooser.h:
3734         * platform/Font.h:
3735         * platform/FontCache.h:
3736         * platform/FontData.h:
3737         * platform/FontDescription.h:
3738         * platform/FontFamily.h:
3739         * platform/GlyphBuffer.h:
3740         * platform/GlyphMap.h:
3741         * platform/GlyphWidthMap.h:
3742         * platform/Logging.h:
3743         * platform/Pasteboard.h:
3744         * platform/PlatformString.h:
3745         * platform/PlugInInfoStore.h:
3746         * platform/PopupMenu.h:
3747         * platform/PopupMenuClient.h:
3748         * platform/ScrollBar.h:
3749         * platform/ScrollView.h:
3750         * platform/SearchPopupMenu.h:
3751         * platform/Shared.h:
3752         * platform/Sound.h:
3753         * platform/SystemTime.h:
3754         * platform/Timer.h:
3755         * platform/Widget.h:
3756         * platform/cf/RetainPtr.h:
3757         * platform/gdk/ChromeClientGdk.h:
3758         * platform/gdk/FontPlatformData.h:
3759         * platform/gdk/FrameGdk.h:
3760         * platform/gdk/KeyboardCodes.h:
3761         * platform/gdk/RenderPopupMenuGdk.h:
3762         * platform/gdk/RenderThemeGdk.h:
3763         * platform/graphics/BitmapImage.h:
3764         * platform/graphics/Color.h:
3765         * platform/graphics/FloatPoint.h:
3766         * platform/graphics/FloatPoint3D.h:
3767         * platform/graphics/FloatRect.h:
3768         * platform/graphics/Icon.h:
3769         * platform/graphics/Image.h:
3770         * platform/graphics/ImageAnimationObserver.h:
3771         * platform/graphics/ImageBuffer.h:
3772         * platform/graphics/ImageSource.h:
3773         * platform/graphics/IntPoint.h:
3774         * platform/graphics/IntRect.h:
3775         * platform/graphics/IntSize.h:
3776         * platform/graphics/IntSizeHash.h:
3777         * platform/graphics/PathTraversalState.h:
3778         * platform/graphics/Pen.h:
3779         * platform/graphics/qt/ImageDecoderQt.h:
3780         * platform/graphics/svg/SVGImage.h:
3781         * platform/graphics/svg/SVGImageEmptyClients.h:
3782         * platform/graphics/svg/SVGPaintServer.h:
3783         * platform/graphics/svg/SVGPaintServerGradient.h:
3784         * platform/graphics/svg/SVGPaintServerLinearGradient.h:
3785         * platform/graphics/svg/SVGPaintServerPattern.h:
3786         * platform/graphics/svg/SVGPaintServerRadialGradient.h:
3787         * platform/graphics/svg/SVGPaintServerSolid.h:
3788         * platform/graphics/svg/SVGResource.h:
3789         * platform/graphics/svg/SVGResourceClipper.h:
3790         * platform/graphics/svg/SVGResourceFilter.h:
3791         * platform/graphics/svg/SVGResourceMarker.h:
3792         * platform/graphics/svg/SVGResourceMasker.h:
3793         * platform/graphics/svg/cg/CgSupport.h:
3794         * platform/graphics/svg/filters/SVGDistantLightSource.h:
3795         * platform/graphics/svg/filters/SVGFEBlend.h:
3796         * platform/graphics/svg/filters/SVGFEColorMatrix.h:
3797         * platform/graphics/svg/filters/SVGFEComponentTransfer.h:
3798         * platform/graphics/svg/filters/SVGFEComposite.h:
3799         * platform/graphics/svg/filters/SVGFEConvolveMatrix.h:
3800         * platform/graphics/svg/filters/SVGFEDiffuseLighting.h:
3801         * platform/graphics/svg/filters/SVGFEDisplacementMap.h:
3802         * platform/graphics/svg/filters/SVGFEFlood.h:
3803         * platform/graphics/svg/filters/SVGFEGaussianBlur.h:
3804         * platform/graphics/svg/filters/SVGFEImage.h:
3805         * platform/graphics/svg/filters/SVGFEMerge.h:
3806         * platform/graphics/svg/filters/SVGFEMorphology.h:
3807         * platform/graphics/svg/filters/SVGFEOffset.h:
3808         * platform/graphics/svg/filters/SVGFESpecularLighting.h:
3809         * platform/graphics/svg/filters/SVGFETile.h:
3810         * platform/graphics/svg/filters/SVGFETurbulence.h:
3811         * platform/graphics/svg/filters/SVGFilterEffect.h:
3812         * platform/graphics/svg/filters/SVGLightSource.h:
3813         * platform/graphics/svg/filters/SVGPointLightSource.h:
3814         * platform/graphics/svg/filters/SVGSpotLightSource.h:
3815         * platform/mac/FontPlatformData.h:
3816         * platform/mac/PlatformScrollBar.h:
3817         * platform/network/AuthenticationChallenge.h:
3818         * platform/network/Credential.h:
3819         * platform/network/HTTPHeaderMap.h:
3820         * platform/network/ProtectionSpace.h:
3821         * platform/network/ResourceError.h:
3822         * platform/network/ResourceRequest.h:
3823         * platform/network/ResourceResponse.h:
3824         * platform/network/cf/FormDataStreamCFNet.h:
3825         * platform/network/cf/ResourceRequestCFNet.h:
3826         * platform/network/cf/ResourceResponseCFNet.h:
3827         * platform/network/gdk/ResourceHandleManager.h:
3828         * platform/network/mac/AuthenticationMac.h:
3829         * platform/network/mac/FormDataStreamMac.h:
3830         * platform/network/qt/ResourceHandleManagerKDE.h:
3831         * platform/network/qt/ResourceHandleManagerQt.h:
3832         * platform/network/win/ResourceHandleWin.h:
3833         * platform/qt/FontPlatformData.h:
3834         * platform/qt/KeyboardCodes.h:
3835         * platform/qt/PlatformScrollBar.h:
3836         * platform/qt/ScrollViewCanvasQt.h:
3837         * platform/qt/SharedTimerQt.h:
3838         * platform/win/FontPlatformData.h:
3839         * platform/win/PlatformScrollBar.h:
3840         * rendering/AutoTableLayout.h:
3841         * rendering/HitTestRequest.h:
3842         * rendering/HitTestResult.h:
3843         * rendering/InlineBox.h:
3844         * rendering/InlineFlowBox.h:
3845         * rendering/Length.h:
3846         * rendering/ListMarkerBox.h:
3847         * rendering/RenderBox.h:
3848         * rendering/RenderMenuList.h:
3849         * rendering/RenderPart.h:
3850         * rendering/RenderPartObject.h:
3851         * rendering/RenderPath.h:
3852         * rendering/RenderReplaced.h:
3853         * rendering/RenderSVGContainer.h:
3854         * rendering/RenderSVGImage.h:
3855         * rendering/RenderSVGInline.h:
3856         * rendering/RenderSVGInlineText.h:
3857         * rendering/RenderSVGTSpan.h:
3858         * rendering/RenderSVGText.h:
3859         * rendering/RenderStyle.h:
3860         * rendering/RenderTableCol.h:
3861         * rendering/RenderThemeWin.h:
3862         * rendering/bidi.h:
3863         * xml/DOMParser.h:
3864         * xml/XPathEvaluator.h:
3865         * xml/XPathExpression.h:
3866         * xml/XPathExpressionNode.h:
3867         * xml/XPathFunctions.h:
3868         * xml/XPathNSResolver.h:
3869         * xml/XPathNamespace.h:
3870         * xml/XPathParser.h:
3871         * xml/XPathPath.h:
3872         * xml/XPathPredicate.h:
3873         * xml/XPathResult.h:
3874         * xml/XPathStep.h:
3875         * xml/XPathUtil.h:
3876         * xml/XPathValue.h:
3877         * xml/XPathVariableReference.h:
3878         * xml/XSLImportRule.h:
3879         * xml/XSLStyleSheet.h:
3880         * xml/XSLTProcessor.h:
3881         * xml/xmlhttprequest.h:
3882
3883 2007-01-15  Anders Carlsson  <acarlsson@apple.com>
3884
3885         Build fix.
3886         
3887         * loader/ProgressTracker.cpp:
3888
3889 2007-01-15  Lars Knoll <lars@trolltech.com>
3890
3891         Fix the Qt build
3892
3893         * WebCore.pro:
3894
3895 2007-01-15  Anders Carlsson  <acarlsson@apple.com>
3896
3897         Reviewed by Darin.
3898
3899         * loader/ProgressTracker.cpp:
3900         Set finalProgressValue to its value explicitly instead of calculating it 
3901         (which causes a global initializer to be generated).
3902
3903 2007-01-15  Anders Carlsson  <acarlsson@apple.com>
3904
3905         Reviewed by Darin and Adam.
3906
3907         Move progress tracking down to WebCore.
3908         
3909         * WebCore.exp:
3910         Add ProgressTracker::estimatedProgress() to be used by WebKit.
3911         
3912         * WebCore.xcodeproj/project.pbxproj:
3913         Add ProgressTracker.[cpp|h]
3914         
3915         * loader/FrameLoader.cpp:
3916         (WebCore::FrameLoader::prepareForLoadStart):
3917         (WebCore::FrameLoader::clearProvisionalLoad):
3918         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3919         (WebCore::FrameLoader::startLoading):
3920         (WebCore::FrameLoader::didReceiveResponse):
3921         (WebCore::FrameLoader::didReceiveData):
3922         (WebCore::FrameLoader::didFailToLoad):
3923         (WebCore::FrameLoader::requestFromDelegate):
3924         (WebCore::FrameLoader::didFinishLoad):
3925         Call directly to the progress tracker instead of through the frame loader client.
3926         
3927         * loader/FrameLoaderClient.h:
3928         Get rid of the old methods and add new methods for tracking progress.
3929         
3930         * loader/ProgressTracker.cpp: Added.
3931         (WebCore::ProgressItem::ProgressItem):
3932         (WebCore::ProgressTracker::ProgressTracker):
3933         (WebCore::ProgressTracker::~ProgressTracker):
3934         (WebCore::ProgressTracker::estimatedProgress):
3935         (WebCore::ProgressTracker::reset):
3936         (WebCore::ProgressTracker::progressStarted):
3937         (WebCore::ProgressTracker::progressCompleted):
3938         (WebCore::ProgressTracker::finalProgressComplete):
3939         (WebCore::ProgressTracker::incrementProgress):
3940         (WebCore::ProgressTracker::completeProgress):
3941         (WebCore::ProgressTracker::createUniqueIdentifier):
3942         * loader/ProgressTracker.h: Added.
3943         New per page class which tracks progress.
3944         
3945         * loader/ResourceLoader.cpp:
3946         (WebCore::ResourceLoader::willSendRequest):
3947         * page/Page.cpp:
3948         (WebCore::Page::Page):
3949         * page/Page.h:
3950         (WebCore::Page::progress):
3951         Move createUniqueIdentifier to ProgressTracker, add ProgressTracker object to Page.
3952         
3953         * platform/graphics/svg/SVGImageEmptyClients.h:
3954         (WebCore::SVGEmptyFrameLoaderClient::willChangeEstimatedProgress):
3955         (WebCore::SVGEmptyFrameLoaderClient::didChangeEstimatedProgress):
3956         (WebCore::SVGEmptyFrameLoaderClient::postProgressStartedNotification):
3957         (WebCore::SVGEmptyFrameLoaderClient::postProgressEstimateChangedNotification):
3958         (WebCore::SVGEmptyFrameLoaderClient::postProgressFinishedNotification):
3959         Add new methods, get rid of the old ones.
3960
3961 2007-01-15  Adam Roben  <aroben@apple.com>
3962
3963         Reviewed by Anders.
3964
3965         Fix comment.
3966
3967         * html/HTMLScriptElement.cpp:
3968         (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript):
3969
3970 2007-01-15  John Sullivan  <sullivan@apple.com>
3971
3972         * platform/ContextMenu.cpp:
3973         (WebCore::ContextMenu::checkOrEnableIfNeeded):
3974         Leopard build fix; don't declare one of the case values twice
3975
3976 2007-01-15  Mitz Pettel  <mitz@webkit.org>
3977
3978         Reviewed by Darin.
3979
3980         - fix http://bugs.webkit.org/show_bug.cgi?id=8604
3981           rowspan does not work when set through javascript
3982
3983         Covered by existing tests.
3984
3985         * rendering/RenderTableCell.cpp:
3986         (WebCore::RenderTableCell::updateFromElement): Mark the section for grid recalc
3987         if row span or column span change.
3988
3989 2007-01-15  Adam Roben  <aroben@apple.com>
3990
3991         Reviewed by Darin.
3992
3993         Small context menu fixes.
3994
3995         * platform/ContextMenu.cpp:
3996         (WebCore::ContextMenu::populate): Fix typo.
3997         (WebCore::ContextMenu::checkOrEnableIfNeeded): Disabled "No Guesses
3998         Found", and added all enum values explicitly.
3999
4000 2007-01-15  Alexey Proskuryakov  <ap@webkit.org>
4001
4002         Reviewed by Darin.
4003
4004         http://bugs.webkit.org/show_bug.cgi?id=6272
4005         XMLHttpRequest freezes on getting a missing document with overridden Content-Length
4006
4007         http://bugs.webkit.org/show_bug.cgi?id=6212
4008         Investigate disallowing some XMLHttpRequest headers from being set via setRequestHeader.
4009
4010         Tests:
4011         - http/tests/xmlhttprequest/connection-error-sync.html
4012         - http/tests/xmlhttprequest/set-dangerous-headers.html
4013
4014         * bindings/js/kjs_binding.cpp:
4015         (KJS::):
4016         (KJS::setDOMException): Added support for NETWORK_ERR. Changed the temporary 
4017         PERMISSION_DENIED error into a special case.
4018
4019         * loader/FrameLoader.cpp:
4020         (WebCore::FrameLoader::loadResourceSynchronously):
4021         * loader/FrameLoader.h:
4022         Return the error object to the caller. Removed an extra local variable for error, 
4023         which shadowed the one from enclosing block.
4024
4025         * dom/XMLTokenizer.cpp:
4026         (WebCore::openFunc): 
4027         * xml/XSLTProcessor.cpp:
4028         (WebCore::docLoaderFunc): 
4029         Updated to pass an error object (currently ignored).
4030
4031         * xml/xmlhttprequest.cpp:
4032         (WebCore::canSetRequestHeader): Added. The headers to block include the ones from 
4033         the current XMLHttpRequest draft plus "Via", which is blocked by Firefox.
4034         (WebCore::XMLHttpRequest::send): Raise an exception if a sync request results in 
4035         an error.
4036         (WebCore::XMLHttpRequest::setRequestHeader): Call canSetRequestHeader().
4037         * xml/xmlhttprequest.h:
4038         (WebCore::): Added NETWORK_ERR and a comment about PERMISSION_DENIED.
4039
4040 2007-01-15  Zack Rusin  <zack@kde.org>
4041
4042         Optimizing rendering on the Qt platform. Mainly
4043         switching from client side QImage to QPixmap's.
4044         Also cleaning the the ScrollViewCanvasQt code
4045         quite a bit.
4046
4047         * platform/graphics/ImageSource.h: use QPixmap
4048         * platform/graphics/qt/GraphicsContextQt.cpp:
4049         (WebCore::TransparencyLayer::TransparencyLayer):
4050         (WebCore::GraphicsContext::clip): clip rects when you can
4051         * platform/graphics/qt/ImageDecoderQt.cpp:
4052         (WebCore::ImageDecoderQt::ImageData::ImageData):
4053         (WebCore::ImageDecoderQt::ReadContext::read):
4054         (WebCore::ImageDecoderQt::ReadContext::readImageLines):
4055         (WebCore::ImageDecoderQt::imageAtIndex):
4056         * platform/graphics/qt/ImageDecoderQt.h: use QPixmap
4057         * platform/graphics/qt/ImageQt.cpp: QPixmap instead of QImage
4058         (WebCore::BitmapImage::draw):
4059         (WebCore::BitmapImage::drawTiled):
4060         * platform/graphics/qt/ImageSourceQt.cpp:
4061         (WebCore::):
4062         (WebCore::ImageSource::createFrameAtIndex):
4063         (WebCore::ImageSource::frameHasAlphaAtIndex):
4064         * platform/qt/ScrollViewCanvasQt.cpp: clean up
4065         (WebCore::ScrollViewCanvasQt::ScrollViewCanvasQt):
4066         (WebCore::ScrollViewCanvasQt::updateFrameView):
4067         (WebCore::ScrollViewCanvasQt::paintEvent):
4068         (WebCore::ScrollViewCanvasQt::mouseMoveEvent):
4069         (WebCore::ScrollViewCanvasQt::mousePressEvent):
4070         (WebCore::ScrollViewCanvasQt::mouseReleaseEvent):
4071         (WebCore::ScrollViewCanvasQt::handleKeyEvent):
4072         * platform/qt/ScrollViewCanvasQt.h:
4073         * platform/qt/ScrollViewQt.cpp: remove hacks
4074         (WebCore::ScrollView::ScrollView):
4075         (WebCore::ScrollView::setParentWidget):
4076         (WebCore::ScrollView::updateContents):
4077
4078 2007-01-15  Lars Knoll <lars@trolltech.com>
4079
4080         Reviewed by Zack
4081
4082         Fix weird crashes when running the layout tests. The
4083         reason was that I used KURL (and thus DeprecatedString)
4084         in a thread. Unfortunately that class is not threadsafe
4085         at all.
4086
4087         * platform/network/qt/ResourceHandleManagerQt.cpp:
4088         (WebCore::RequestQt::RequestQt):
4089         (WebCore::RequestQt::setURL):
4090         (WebCore::ResourceHandleManager::add):
4091         (WebCore::ResourceHandleManager::cancel):
4092         (WebCore::ResourceHandleManager::receivedResponse):
4093         (WebCore::FileLoader::request):
4094         (WebCore::HostInfo::HostInfo):
4095         (WebCore::NetworkLoader::request):
4096         (WebCore::NetworkLoader::cancel):
4097         * platform/network/qt/ResourceHandleManagerQt.h:
4098         (WebCore::HostInfo::HostInfo):
4099         (WebCore::HostInfo::isLocalFile):
4100
4101 2007-01-15  Eric Seidel  <eric@webkit.org>
4102
4103         Reviewed by rwlbuis.
4104
4105         Make isValid check not malloc 3 SVGStringLists for every element.
4106         
4107         No test possible, performance fix only.
4108
4109         * ksvg2/svg/SVGTests.cpp:
4110         (WebCore::SVGTests::isValid):
4111
4112 2007-01-15  Rob Buis  <buis@kde.org>
4113
4114         Reviewed by Eric.
4115
4116         Remove unused member var.
4117
4118         * ksvg2/svg/SVGStyledElement.h:
4119
4120 2007-01-15  Rob Buis  <buis@kde.org>
4121
4122         Reviewed by Eric.
4123
4124         http://bugs.webkit.org/show_bug.cgi?id=12069
4125         Hit detection fails under some viewbox constraints
4126
4127         Do not take viewBox into account when hit testing svg container.
4128
4129         * rendering/RenderSVGContainer.cpp:
4130         (WebCore::RenderSVGContainer::nodeAtPoint):
4131
4132 2007-01-15  David Hyatt  <hyatt@apple.com>
4133
4134         Fix  for 12275, negative margins confuse page breaks.
4135
4136         Reviewed by Eric
4137
4138         * rendering/RenderBlock.cpp:
4139         (WebCore::RenderBlock::paintChildren):
4140
4141 2007-01-15  Eric Seidel  <eric@webkit.org>
4142
4143         Reviewed by mjs.
4144         
4145         SVG gradients do not notice stop additions
4146         http://bugs.webkit.org/show_bug.cgi?id=12192
4147
4148         Test: svg/custom/gradient-add-stops.svg
4149
4150         * ksvg2/svg/SVGGradientElement.cpp:
4151         (WebCore::SVGGradientElement::childrenChanged):
4152         * ksvg2/svg/SVGGradientElement.h:
4153
4154 2007-01-14  David Hyatt  <hyatt@apple.com>
4155
4156         Fix for bug 10356, positioning doesn't work with <svg> elements in XHTML.  Change the requiresLayer
4157         check to use the DOM, since the old check would fail if the parent block had no element.
4158
4159         Reviewed by Eric
4160
4161         Added svg/custom/relative-positioning.html (absolute/fixed too)
4162
4163         * rendering/RenderSVGContainer.cpp:
4164         (WebCore::RenderSVGContainer::requiresLayer):
4165
4166 2007-01-14  Eric Seidel  <eric@webkit.org>
4167
4168         Reviewed by hyatt.
4169         
4170         SVG does not correctly handle float: left
4171         http://bugs.webkit.org/show_bug.cgi?id=12210
4172
4173         Test: svg/custom/svg-float-border-padding.xml
4174
4175         * rendering/RenderSVGContainer.cpp:
4176         (WebCore::RenderSVGContainer::paint):
4177
4178 2007-01-14  David Hyatt  <hyatt@apple.com>
4179
4180         More work to fix 10145, regression where form elements don't break properly.  Make sure to really use
4181         the parent of the replaced element's whitespace value everywhere.
4182
4183         Reviewed by olliej
4184
4185         fast/replaced/three-selects-break.html
4186
4187         * rendering/bidi.cpp:
4188         (WebCore::RenderBlock::findNextLineBreak):
4189
4190 2007-01-14  Sam Weinig  <sam@webkit.org>
4191
4192         Reviewed by Darin and then by Mitz.
4193
4194         Patch for http://bugs.webkit.org/show_bug.cgi?id=12228
4195         Cleanup assorted CSS classes
4196
4197         * css/CSSBorderImageValue.cpp:
4198         (WebCore::CSSBorderImageValue::CSSBorderImageValue):
4199         (WebCore