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