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