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