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