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