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