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