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