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