570dfc1b8dbaac52037a6efe9704adc1be33be01
[WebKit-https.git] / WebCore / ChangeLog
1 2006-10-31  John Sullivan  <sullivan@apple.com>
2
3         Reviewed by Maciej
4         
5         - fixed <rdar://problem/4804627> ToolTips do not appear for grammar suggestions
6         
7         The foundation of this was in my last checkin. This checkin is all about displaying
8         the correct string in the toolTip.
9
10         * dom/DocumentMarker.h:
11         New description field in this struct.
12
13         * bridge/mac/FrameMac.mm:
14         (WebCore::FrameMac::advanceToNextMisspelling):
15         When adding a grammar marker, supply the appropriate description. Also, added a comment
16         about the remaining work to make grammar checking return sensible answers.
17         (WebCore::FrameMac::markMisspellings):
18         ditto (yes, still needs some refactoring to minimize duplicated code)
19         
20         * dom/Document.h:
21         * dom/Document.cpp:
22         (WebCore::Document::addMarker):
23         Now takes an optional description string
24         (WebCore::Document::markerContainingPoint):
25         New function, returns a pointer to the (first) marker of the specified type whose rect 
26         contains the specified point, or 0 if none.
27         
28         * rendering/HitTestResult.cpp:
29         (WebCore::HitTestResult::spellingToolTip):
30         Replaced hardwired string placeholder implementation with code that uses markerContainingPoint
31         and gets the description from the marker.
32
33 2006-10-31  Geoffrey Garen  <ggaren@apple.com>
34
35         Reviewed by Maciej.
36         
37         Fixed crash resulting from Darin's last patch to remove BrowserExtension.
38
39         * loader/mac/FrameLoaderMac.mm:
40         (WebCore::FrameLoader::createWindow):
41         * manual-tests/window-open-features-parsing.html: Updated for clarity.
42
43 2006-10-31  Geoffrey Garen  <ggaren@apple.com>
44
45         Reviewed by Alice.
46
47         Moved some Editing code from WebKit, the bridge, and WebCore::Frame down 
48         to WebCore::Editor.
49         
50         Layout tests pass.
51         
52         Renamed "may*" to "can*" because "can" is more accurate (these functions
53         aren't just about permission) and it matches WebKit.
54
55         (WebCore::FrameMac::handleMouseMoveEvent): Directly test for dragging in a 
56         password field. Now that WebCore fully implements canCopy(), it doesn't just
57         mean "the selection is not in a password field" anymore.
58         (-[WebCoreFrameBridge _shouldAllowAccessFrom:]): Removed this #ifed-out code. 
59         The fact that it's not called anymore may represent a security issue, but I
60         don't see how commented-out code will help reveal the issue, and the
61         bridge is going away, anyway.
62         * editing/SelectionController.h: Changed selection() calls to references
63         to m_sel, to match the rest of the file.
64
65 2006-10-31  Justin Garcia  <justin.garcia@apple.com>
66
67         Reviewed by harrison
68         
69         <rdar://problem/4711063>
70         Pasting 10K lines into Mail/Blot takes ~7sec, in TextEdit it takes ~1.5sec
71
72         * editing/ReplaceSelectionCommand.cpp:
73         (WebCore::ReplacementFragment::ReplacementFragment): Don't do the test
74         insertion and plain text string creation unless we need the string
75         for a BeforeTextInserted event handler or for a plain text only region.
76         (WebCore::ReplacementFragment::removeInterchangeNodes): Added, moved
77         code here from ReplacementFragment's constructor.
78         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): Added a
79         FIXME.
80         * editing/ReplaceSelectionCommand.h:
81
82 2006-10-31  Ada Chan  <adachan@apple.com>
83
84         Reviewed by Adam
85
86         Correct forward declarations of the HitTestRequest struct.
87
88         * rendering/EllipsisBox.h:
89         * rendering/InlineBox.h:
90         * rendering/InlineFlowBox.h:
91         * rendering/RenderLayer.h:
92         * rendering/RenderObject.h:
93
94 2006-10-31  John Sullivan  <sullivan@apple.com>
95
96         Reviewed by Beth and Adam
97
98         Support for displaying tooltips for bad grammar. Currently this always displays the same tooltip; 
99         next I'll make it use a string that's relevant for a specific grammar error.
100
101         * WebCore.exp:
102         export symbol for spellingToolTip function
103         
104         * rendering/HitTestResult.h:
105         * rendering/HitTestResult.cpp:
106         (WebCore::HitTestResult::spellingToolTip):
107         new function, returns the string to be used in a tool tip that describes the questionable grammar
108         
109         * rendering/InlineTextBox.h:
110         * rendering/InlineTextBox.cpp:
111         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
112         now takes a style and font, needed to compute the rect representing the range containing
113         questionable grammar. Computes the rect and associates it with the marker.
114         (WebCore::InlineTextBox::paintDocumentMarkers):
115         Pass in the style and font now needed by paintSpellingOrGrammarMarker
116
117 2006-10-31  Adele Peterson  <adele@apple.com>
118
119         Removed commented out variable from last checkin.
120
121         * html/HTMLSelectElement.cpp:
122         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
123
124 2006-10-31  Brady Eidson  <beidson@apple.com>
125
126         Build fix (unused variable in release builds)
127
128         * html/HTMLSelectElement.cpp:
129         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
130
131 2006-10-31  Adele Peterson  <adele@apple.com>
132
133         Reviewed by Adam.
134
135         - Fix for http://bugs.webkit.org/show_bug.cgi?id=11127 NativeListBox: arrow and drag selection should pivot around one list item
136         and http://bugs.webkit.org/show_bug.cgi?id=11173 REGRESSION (NativeListBox): Shift-clicking items in list box doesn't expand the current selection
137         and http://bugs.webkit.org/show_bug.cgi?id=11417 REGRESSION: onchange does not fire for list-style select elements
138
139         Tests: 
140         * LayoutTests/fast/forms/listbox-selection.html
141         * LayoutTests/fast/forms/listbox-onchange.html
142
143         * html/HTMLSelectElement.h: Added m_selectedListIndexBase and m_selectedListIndexExtent to track indices for the active selection in progress.
144           Added 2 vectors to cache selection state.  One is kept so that the previous selection state can be restored as the active selection grows and shrinks.
145           And one for onChange, that is updated after onChange is fired.
146           Added m_activeSelectionState to keep track of whether the current drag selection is selecting or deselecting.
147  
148         * html/HTMLSelectElement.cpp:
149         (WebCore::HTMLSelectElement::HTMLSelectElement): Initialized new variables.
150         (WebCore::HTMLSelectElement::setSelectedIndex): If needed, initialize m_selectedListIndexBase and m_selectedListIndexExtent.
151         (WebCore::HTMLSelectElement::dispatchBlurEvent): Only fire the onChange event here for menu lists.
152         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Updates base and extent variables for mouse and key events.
153         (WebCore::HTMLSelectElement::setBase): Added. Also caches the selection state.
154         (WebCore::HTMLSelectElement::setExtent): Added.
155         (WebCore::HTMLSelectElement::updateListBoxSelection): Added.
156         (WebCore::HTMLSelectElement::listBoxOnChange): Added.
157
158         * rendering/RenderListBox.cpp:
159         (WebCore::RenderListBox::updateFromElement): Only scroll to reveal the first index if both the first and last indices aren't visible.
160         (WebCore::RenderListBox::listIndexAtOffset): Added.  Replaces optionAtPoint, which is no longer used.
161         (WebCore::RenderListBox::autoscroll): Now sets the selection using the select's base and extent.
162         (WebCore::RenderListBox::stopAutoscroll): Added.  Tells the select element to fire onChange.  This is needed because the autoscroll can end from a mouseUp
163          outside of the list box, and the select element won't get a mouseUp event directly.  But the frame will stop the autoscroll at that point, and now we can
164          notify the select element from here.
165         (WebCore::RenderListBox::scrollToRevealElementAtListIndex): Checks new listIndexIsVisible method.
166         (WebCore::RenderListBox::listIndexIsVisible): Added.
167         (WebCore::RenderListBox::valueChanged): Removed unnecessary printf.
168
169         * page/Frame.cpp: (WebCore::Frame::stopAutoscrollTimer): Added rendererIsBeingDestroyed argument, so when the renderer calls this during destruction, 
170         we don't try to use the pointer to that renderer to call stopAutoscroll.  This is done so a renderer that's still alive has a chance to do some cleanup after autoscroll.
171         * rendering/RenderListBox.h: (WebCore::RenderListBox::shouldAutoscroll): Always returns true now, since we're also updating selection from the autoscroll timer.
172         * rendering/RenderObject.h: (WebCore::RenderObject::stopAutoscroll): Added.
173         * rendering/RenderObject.cpp: (WebCore::RenderObject::destroy): Calls stopAutoscrollTimer with rendererIsBeingDestroyed argument.
174
175 2006-10-31  Beth Dakin  <bdakin@apple.com>
176
177         Forgot to check this in a minute ago. Oops!! Thanks Mitz!
178
179         * rendering/HitTestRequest.h: Added.
180         (WebCore::HitTestRequest::HitTestRequest):
181
182 2006-10-31  Beth Dakin  <bdakin@apple.com>
183
184         Reviewed by Maciej.
185
186         Fix for http://bugs.webkit.org/show_bug.cgi?id=11461 HitTestResult 
187         should be split into HitTestRequest and HitTestResult
188
189         This patch creates a new struct called HitTestRequest that holds 
190         the three boolean values (readonly, active, and mouseMove) that 
191         were formerly a part of HitTestResult. All hitTest() and 
192         nodeAtPoint() functions now take a HitTestRequest in addition to 
193         the HitTestResult.
194
195         * WebCore.exp:
196         * WebCore.xcodeproj/project.pbxproj:
197         * bridge/mac/FrameMac.mm:
198         (WebCore::FrameMac::eventMayStartDrag):
199         (WebCore::FrameMac::handleMouseMoveEvent):
200         * bridge/mac/WebCoreAXObject.mm:
201         (-[WebCoreAXObject doAXTextMarkerForPosition:]):
202         (-[WebCoreAXObject accessibilityHitTest:]):
203         * dom/Document.cpp:
204         (WebCore::Document::elementFromPoint):
205         (WebCore::Document::prepareMouseEvent):
206         * editing/SelectionController.cpp:
207         (WebCore::SelectionController::contains):
208         * page/Frame.cpp:
209         (WebCore::Frame::hitTestResultAtPoint):
210         * page/FrameView.cpp:
211         (WebCore::FrameView::handleWheelEvent):
212         * rendering/EllipsisBox.cpp:
213         (WebCore::EllipsisBox::nodeAtPoint):
214         * rendering/EllipsisBox.h:
215         * rendering/HitTestResult.cpp:
216         (WebCore::HitTestResult::HitTestResult):
217         (WebCore::HitTestResult::operator=):
218         * rendering/HitTestResult.h:
219         * rendering/InlineBox.cpp:
220         (WebCore::InlineBox::nodeAtPoint):
221         * rendering/InlineBox.h:
222         * rendering/InlineFlowBox.cpp:
223         (WebCore::InlineFlowBox::nodeAtPoint):
224         * rendering/InlineFlowBox.h:
225         * rendering/InlineTextBox.cpp:
226         (WebCore::InlineTextBox::nodeAtPoint):
227         * rendering/InlineTextBox.h:
228         * rendering/RenderBlock.cpp:
229         (WebCore::RenderBlock::nodeAtPoint):
230         * rendering/RenderBlock.h:
231         * rendering/RenderBox.cpp:
232         (WebCore::RenderBox::nodeAtPoint):
233         * rendering/RenderBox.h:
234         * rendering/RenderFlow.cpp:
235         (WebCore::RenderFlow::hitTestLines):
236         * rendering/RenderFlow.h:
237         * rendering/RenderForeignObject.cpp:
238         (WebCore::RenderForeignObject::nodeAtPoint):
239         * rendering/RenderForeignObject.h:
240         * rendering/RenderFrameSet.cpp:
241         (WebCore::RenderFrameSet::nodeAtPoint):
242         * rendering/RenderFrameSet.h:
243         * rendering/RenderImage.cpp:
244         (WebCore::RenderImage::nodeAtPoint):
245         * rendering/RenderImage.h:
246         * rendering/RenderInline.cpp:
247         (WebCore::RenderInline::nodeAtPoint):
248         * rendering/RenderInline.h:
249         * rendering/RenderLayer.cpp:
250         (WebCore::RenderLayer::autoscroll):
251         (WebCore::RenderLayer::hitTest):
252         (WebCore::RenderLayer::hitTestLayer):
253         (WebCore::RenderLayer::updateHoverActiveState):
254         * rendering/RenderLayer.h:
255         * rendering/RenderObject.cpp:
256         (WebCore::RenderObject::hitTest):
257         (WebCore::RenderObject::nodeAtPoint):
258         * rendering/RenderObject.h:
259         * rendering/RenderPath.cpp:
260         (WebCore::RenderPath::nodeAtPoint):
261         * rendering/RenderPath.h:
262         * rendering/RenderSVGImage.cpp:
263         (WebCore::RenderSVGImage::nodeAtPoint):
264         * rendering/RenderSVGImage.h:
265         * rendering/RenderSVGText.cpp:
266         (WebCore::RenderSVGText::nodeAtPoint):
267         * rendering/RenderSVGText.h:
268         * rendering/RenderTableRow.cpp:
269         (WebCore::RenderTableRow::nodeAtPoint):
270         * rendering/RenderTableRow.h:
271         * rendering/RenderTableSection.cpp:
272         (WebCore::RenderTableSection::nodeAtPoint):
273         * rendering/RenderTableSection.h:
274         * rendering/RenderText.h:
275         (WebCore::RenderText::nodeAtPoint):
276         * rendering/RenderTextControl.cpp:
277         (WebCore::RenderTextControl::nodeAtPoint):
278         * rendering/RenderTextControl.h:
279         * rendering/RootInlineBox.cpp:
280         (WebCore::RootInlineBox::nodeAtPoint):
281         * rendering/RootInlineBox.h:
282
283 2006-10-31  Lars Naesbye Christensen <larsnaesbye@stud.ku.dk>
284
285         Reviewed by Maciej.
286
287         Bug 11442: [CSS 3] support for cursor: all-scroll
288         http://bugs.webkit.org/show_bug.cgi?id=11442
289
290         * css/CSSComputedStyleDeclaration.cpp:
291         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
292         * css/CSSValueKeywords.in:
293         * css/cssparser.cpp:
294         (WebCore::CSSParser::parseValue):
295         * page/FrameView.cpp:
296         (WebCore::selectCursor):
297         * rendering/RenderStyle.h:
298
299 2006-10-31  Oliver Hunt  <oliver@apple.com>
300
301         Reviewed by Geoff.
302
303         Converting Obj-C++ to C++ in kcanvas
304
305         * WebCore.xcodeproj/project.pbxproj:
306         * kcanvas/device/quartz/KCanvasFilterQuartz.h:
307         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
308         * kcanvas/device/quartz/KCanvasItemQuartz.cpp: Added.
309         * kcanvas/device/quartz/KCanvasItemQuartz.mm: Removed.
310         * kcanvas/device/quartz/KRenderingDeviceQuartz.cpp: Added.
311         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
312         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm: Removed.
313         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
314         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
315         * kcanvas/device/quartz/QuartzSupport.cpp: Added.
316         * kcanvas/device/quartz/QuartzSupport.h:
317         * kcanvas/device/quartz/QuartzSupport.mm: Removed.
318         * platform/graphics/svg/cg/SVGResourceClipperCg.cpp: Added.
319         (WebCore::SVGResourceClipper::applyClip):
320         * platform/graphics/svg/cg/SVGResourceClipperCg.mm: Removed.
321         * platform/graphics/svg/cg/SVGResourceImageCg.cpp: Added.
322         * platform/graphics/svg/cg/SVGResourceImageCg.mm: Removed.
323
324 2006-10-31  Justin Garcia  <justin.garcia@apple.com>
325
326         Reviewed by harrison
327         
328         <rdar://problem/4808375>
329         REGRESSION: TextIterator slowed down, affecting Find on Page & Copy (etc.) [11460}
330         
331         Completely back out r17276 because of performance issues.
332
333         * editing/TextIterator.cpp:
334         (WebCore::TextIterator::TextIterator):
335         (WebCore::TextIterator::advance):
336         (WebCore::TextIterator::handleTextNode):
337         (WebCore::TextIterator::handleTextBox):
338         (WebCore::TextIterator::handleReplacedElement):
339         (WebCore::TextIterator::handleNonTextNode):
340         (WebCore::TextIterator::exitNode):
341         (WebCore::TextIterator::emitCharacter):
342         (WebCore::TextIterator::range):
343         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
344         (WebCore::SimplifiedBackwardsTextIterator::advance):
345         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
346         (WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement):
347         (WebCore::SimplifiedBackwardsTextIterator::emitCharacter):
348         (WebCore::SimplifiedBackwardsTextIterator::emitNewline):
349         (WebCore::SimplifiedBackwardsTextIterator::range):
350         (WebCore::CharacterIterator::range):
351         (WebCore::TextIterator::rangeFromLocationAndLength):
352         * editing/TextIterator.h:
353         (WebCore::TextIterator::atEnd):
354         (WebCore::SimplifiedBackwardsTextIterator::atEnd):
355
356 2006-10-31  Darin Adler  <darin@apple.com>
357
358         Reviewed by Brady.
359
360         - got "action dictionary" code out of FrameLoader,
361           replacing with a class called NavigationAction
362
363         * loader/DocumentLoader.h: Changed m_triggeringAction to a NavigationAction.
364         * loader/mac/DocumentLoaderMac.mm:
365         (WebCore::DocumentLoader::triggeringAction): Ditto.
366         (WebCore::DocumentLoader::setTriggeringAction): Ditto.
367
368         * loader/FrameLoader.h: Changed action parameters to NavigationAction.
369
370         * loader/FrameLoaderClient.h: Changed action parameters to NavigationAction.
371         Removed elementForEvent.
372         * loader/mac/FrameLoaderMac.mm:
373         (WebCore::FrameLoader::load): Ditto.
374         (WebCore::FrameLoader::reload): Ditto.
375         (WebCore::FrameLoader::checkNewWindowPolicy): Ditto.
376         (WebCore::FrameLoader::checkNavigationPolicy): Ditto.
377         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Ditto.
378         (WebCore::FrameLoader::post): Ditto.
379
380         * loader/NavigationAction.h: Added.
381         * loader/NavigationAction.cpp: Added.
382         * loader/mac/NavigationActionMac.mm: Added.
383
384         * loader/mac/MainResourceLoaderMac.mm: Fixed copyright.
385
386         * WebCore.xcodeproj/project.pbxproj: Updated for new files.
387         * WebCore.exp: Updated.
388
389 2006-10-31  Steve Falkenburg  <sfalken@apple.com>
390
391         Reviewed by Adam.
392
393         Build fix
394
395         * platform/win/CookieJarWin.cpp:
396         (WebCore::cookies):
397
398 2006-10-31  Nikolas Zimmermann  <zimmermann@kde.org>
399
400         Reviewed by Maciej. Landed by Adam.
401
402         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11463
403
404         Move KCanvasTreeDebug into rendering, named as SVGRenderTreeAsText.*,
405         as dicussed with Dave. Also kill the outdated DESIGN document.
406
407         * CMakeLists.txt:
408         * WebCore.xcodeproj/project.pbxproj:
409         * kcanvas/DESIGN: Removed.
410         * kcanvas/KCanvasFilters.cpp:
411         * kcanvas/KCanvasTreeDebug.cpp: Moved to rendering/SVGRenderTreeAsText
412         * kcanvas/KCanvasTreeDebug.h: Ditto.
413         * kcanvas/device/KRenderingPaintServerGradient.cpp:
414         * kcanvas/device/KRenderingPaintServerPattern.cpp:
415         * kcanvas/device/KRenderingPaintServerSolid.cpp:
416         * platform/graphics/svg/SVGResourceClipper.cpp:
417         * rendering/RenderTreeAsText.cpp:
418         * rendering/SVGRenderTreeAsText.cpp: Added.
419         * rendering/SVGRenderTreeAsText.h: Added.
420         (WebCore::operator<<):
421
422 2006-10-31  MorganL  <morganl.webkit@yahoo.com>
423
424         Reviewed by Maciej.
425
426         Fixes http://bugs.webkit.org/show_bug.cgi?id=11286
427         Includes some CRLF -> LF fixups.
428
429         * platform/win/CookieJarWin.cpp:
430         (WebCore::cookies):
431
432 2006-10-31  Adam Roben  <aroben@apple.com>
433
434         Reviewed by Steve.
435
436         Fix some incorrect forward declarations.
437
438         * loader/FrameLoader.h:
439         * page/Frame.h:
440
441 2006-10-31  Darin Adler  <darin@apple.com>
442
443         * WebCore.xcodeproj/project.pbxproj: Change GraphicsTypes.h to a private header to
444         try to fix the build on the buildbot.
445
446 2006-10-31  Darin Adler  <darin@apple.com>
447
448         * bridge/mac/FrameMac.mm:
449         (WebCore::FrameMac::advanceToNextMisspelling): Build fix for release Tiger builds.
450         (WebCore::FrameMac::markMisspellings): Ditto.
451
452 2006-10-31  John Sullivan  <sullivan@apple.com>
453
454         * bridge/mac/FrameMac.mm:
455         (WebCore::FrameMac::advanceToNextMisspelling):
456         build fix: needed #ifndef BUILDING_ON_TIGER in one more place
457
458 2006-10-30  John Sullivan  <sullivan@apple.com>
459
460         Reviewed by Adam Roben
461         
462         - fixes <rdar://problem/4804614> Bad grammar ranges are not visibly marked
463         
464         This patch introduces much of the guts of grammar checking, though still not enough to actually
465         check grammar sensibly, due to:
466           
467         <rdar://problem/4811175> Many false reports of bad grammar appear, caused by insufficient 
468         context passed to grammar checker
469
470         * platform/Logging.h:
471         * platform/Logging.cpp:
472         new log channel SpellingAndGrammar
473
474         * bridge/mac/WebCorePageBridge.mm:
475         (initializeLoggingChannelsIfNecessary):
476         initialize new log channel
477
478         * bridge/mac/FrameMac.mm:
479         (WebCore::FrameMac::advanceToNextMisspelling):
480         Compute bad grammar range when computing misspelling range. Find first detailed grammar range from the
481         set NSSpellChecker determines. Compare it with misspelling range to see which is earliest (or shortest
482         in the event of a tie), and do further processing with that one (select range; create marker that
483         causes range to be visibly marked with a funky underline; update spelling panel appropriately).
484         (WebCore::FrameMac::markMisspellings):
485         More or less the same types of changes as in advanceToNextMisspelling The loops are structured just 
486         differently enough to make sharing code between these two functions a little tricky, so I decided to 
487         save that for a later patch.
488         
489         (WebCore::FrameMac::respondToChangedSelection):
490         remove grammar markers when we remove spelling markers        
491
492 2006-10-31  Nikolas Zimmermann <zimmermann@kde.org>
493
494         Reviewed by Mitz.
495
496         Fix Qt/Linux build with older gcc3.3.4.
497
498         * bindings/js/kjs_window.cpp:
499         (KJS::WindowFunc::callAsFunction):
500
501 2006-10-31  Zack Rusin  <zack@kde.org>
502
503         Reviewed by Mitz.
504
505         Fix the Qt build after last nights changes.
506
507         * WebCore/platform/qt/FrameQt.cpp:
508         * WebCore/platform/qt/EditorClientQt.h:
509         * WebCore/platform/qt/EditorClientQt.cpp:
510         * WebCore/platform/graphics/svg/qt/SVGResourceImageQt.cpp:
511         * WebCore/platform/graphics/svg/qt/SVGResourceClipperQt.cpp:
512         * WebCore/CMakeLists.txt:
513         * WebCore/kcanvas/device/qt/KRenderingDeviceQt.cpp:
514         * WebKitQt/QtLauncher/CMakeLists.txt:
515         * WebKitQt/WebKitPart/CMakeLists.txt:
516
517 2006-10-30  Darin Adler  <darin@apple.com>
518
519         Reviewed by Anders.
520
521         - remove BrowserExtension
522
523         * WebCore.vcproj/WebCore/WebCore.vcproj:
524         * WebCore.xcodeproj/project.pbxproj:
525         * bindings/js/kjs_window.cpp:
526         (KJS::createNewWindow):
527         (KJS::WindowFunc::callAsFunction):
528         * bridge/BrowserExtension.h: Removed.
529         * bridge/mac/BrowserExtensionMac.h: Removed.
530         * bridge/mac/BrowserExtensionMac.mm: Removed.
531         * bridge/mac/FrameMac.mm:
532         (WebCore::FrameMac::FrameMac):
533         (WebCore::FrameMac::submitForm):
534         (WebCore::FrameMac::urlSelected):
535         * bridge/win/BrowserExtensionWin.cpp: Removed.
536         * bridge/win/BrowserExtensionWin.h: Removed.
537         * bridge/win/FrameWin.cpp:
538         (WebCore::FrameWin::FrameWin):
539         * loader/FrameLoader.cpp:
540         (WebCore::FrameLoader::createWindow):
541         * loader/FrameLoader.h:
542         * loader/icon/IconLoader.cpp:
543         * loader/mac/FrameLoaderMac.mm:
544         (WebCore::FrameLoader::safeLoad):
545         (WebCore::FrameLoader::load):
546         (WebCore::FrameLoader::createWindow):
547         * page/Frame.cpp:
548         (WebCore::Frame::urlSelected):
549         (WebCore::Frame::requestFrame):
550         (WebCore::Frame::submitForm):
551         (WebCore::Frame::scheduleHistoryNavigation):
552         (WebCore::Frame::redirectionTimerFired):
553         * page/Frame.h:
554         * page/FrameLoadRequest.h:
555         (WebCore::FrameLoadRequest::FrameLoadRequest):
556         (WebCore::FrameLoadRequest::isEmpty):
557         (WebCore::FrameLoadRequest::resourceRequest):
558         (WebCore::FrameLoadRequest::frameName):
559         (WebCore::FrameLoadRequest::setFrameName):
560         * page/FramePrivate.h:
561         (WebCore::FramePrivate::FramePrivate):
562         (WebCore::FramePrivate::~FramePrivate):
563         * platform/gdk/BrowserExtensionGdk.h: Removed.
564         * platform/gdk/FrameGdk.cpp:
565         (WebCore::FrameGdk::FrameGdk):
566         * platform/gdk/TemporaryLinkStubs.cpp:
567         * platform/network/ResourceRequest.h:
568         (WebCore::ResourceRequest::isEmpty):
569
570 2006-10-31  Nikolas Zimmermann  <zimmermann@kde.org>
571
572         Reviewed by Oliver.
573
574         Modified from original due to earlier reversion
575
576         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11436
577
578         Better SVG integration in WebKit, Part I.
579
580         The patch is mostly about creating a new platform/graphics directory, and
581         moving the kcanvas resources (clipper/masker/marker) there (in svg budir),
582         with a new name (KCanvasClipper -> SVGResourceClipper). Also fix several ownership
583         issues, by using ref counting (the SVG classes now store RefPtrs to the resources).
584
585         KCanvasFilters is still left in kcanvas/ subdirectory, to be converted in a next patch.
586         All details of the patch, and upcoming patches can be found in the bug report.
587
588         * CMakeLists.txt:
589         * WebCore.xcodeproj/project.pbxproj:
590         * graphics/svg/SVGResource.cpp: Removed.
591         * graphics/svg/SVGResourceClipper.cpp: Removed.
592         * graphics/svg/SVGResourceClipper.h: Removed.
593         * graphics/svg/SVGResourceImage.h: Removed.
594         * graphics/svg/SVGResourceListener.h: Removed.
595         * graphics/svg/SVGResourceMarker.cpp: Removed.
596         * graphics/svg/SVGResourceMarker.h: Removed.
597         * graphics/svg/SVGResourceMasker.cpp: Removed.
598         * graphics/svg/SVGResourceMasker.h: Removed.
599         * kcanvas/KCanvasClipper.cpp: Removed.
600         * kcanvas/KCanvasClipper.h: Removed.
601         * kcanvas/KCanvasCreator.cpp: Removed.
602         * kcanvas/KCanvasCreator.h: Removed.
603         * kcanvas/KCanvasFilters.cpp:
604         (WebCore::getFilterById):
605         * kcanvas/KCanvasFilters.h:
606         * kcanvas/KCanvasImage.h: Removed.
607         * kcanvas/KCanvasMarker.cpp: Removed.
608         * kcanvas/KCanvasMarker.h: Removed.
609         * kcanvas/KCanvasMasker.cpp: Removed.
610         * kcanvas/KCanvasMasker.h: Removed.
611         * kcanvas/KCanvasResource.cpp: Removed.
612         * kcanvas/KCanvasResource.h: Removed.
613         * kcanvas/KCanvasResourceListener.h: Removed.
614         * kcanvas/KCanvasTreeDebug.cpp:
615         (WebCore::writeRenderResources):
616         * kcanvas/device/KRenderingDevice.h:
617         * kcanvas/device/KRenderingPaintServer.h:
618         (WebCore::KRenderingPaintServer::KRenderingPaintServer):
619         * kcanvas/device/KRenderingPaintServerGradient.cpp:
620         (WebCore::KRenderingPaintServerGradient::listener):
621         (WebCore::KRenderingPaintServerGradient::setListener):
622         * kcanvas/device/KRenderingPaintServerGradient.h:
623         * kcanvas/device/KRenderingPaintServerPattern.cpp:
624         (WebCore::KRenderingPaintServerPattern::KRenderingPaintServerPattern):
625         (WebCore::KRenderingPaintServerPattern::~KRenderingPaintServerPattern):
626         (WebCore::KRenderingPaintServerPattern::tile):
627         (WebCore::KRenderingPaintServerPattern::setTile):
628         (WebCore::KRenderingPaintServerPattern::listener):
629         (WebCore::KRenderingPaintServerPattern::setListener):
630         * kcanvas/device/KRenderingPaintServerPattern.h:
631         * kcanvas/device/KRenderingPaintServerSolid.h:
632         * kcanvas/device/qt/KCanvasClipperQt.cpp: Removed.
633         * kcanvas/device/qt/KCanvasClipperQt.h:
634         * kcanvas/device/qt/KRenderingDeviceQt.cpp:
635         (WebCore::KRenderingDeviceQt::contextForImage):
636         (WebCore::KRenderingDeviceQt::createResource):
637         (WebCore::KRenderingDeviceQt::createPaintServer):
638         * kcanvas/device/qt/KRenderingDeviceQt.h:
639         * kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
640         * kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp:
641         * kcanvas/device/qt/KRenderingPaintServerQt.cpp:
642         * kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp:
643         * kcanvas/device/qt/RenderPathQt.h: Removed.
644         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
645         (WebCore::KCanvasFilterQuartz::getCIFilterStack):
646         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
647         * kcanvas/device/quartz/KCanvasMaskerQuartz.h: Removed.
648         * kcanvas/device/quartz/KCanvasMaskerQuartz.mm: Removed.
649         * kcanvas/device/quartz/KCanvasResourcesQuartz.h: Removed.
650         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm: Removed.
651         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
652         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
653         (WebCore::KRenderingDeviceQuartz::contextForImage):
654         (WebCore::KRenderingDeviceQuartz::createPaintServer):
655         (WebCore::KRenderingDeviceQuartz::createResource):
656         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
657         (WebCore::KRenderingPaintServerGradientQuartz::KRenderingPaintServerGradientQuartz):
658         (WebCore::KRenderingPaintServerGradientQuartz::~KRenderingPaintServerGradientQuartz):
659         (WebCore::KRenderingPaintServerGradientQuartz::setup):
660         (WebCore::KRenderingPaintServerGradientQuartz::teardown):
661         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
662         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
663         (WebCore::patternCallback):
664         (WebCore::KRenderingPaintServerPatternQuartz::setup):
665         * kcanvas/device/quartz/QuartzSupport.mm:
666         * ksvg2/misc/KCanvasRenderingStyle.cpp:
667         (WebCore::sharedSolidPaintServer):
668         * ksvg2/svg/SVGClipPathElement.cpp:
669         (WebCore::SVGClipPathElement::SVGClipPathElement):
670         (WebCore::SVGClipPathElement::~SVGClipPathElement):
671         (WebCore::SVGClipPathElement::canvasResource):
672         * ksvg2/svg/SVGClipPathElement.h:
673         * ksvg2/svg/SVGFEImageElement.cpp:
674         * ksvg2/svg/SVGFilterElement.cpp:
675         (WebCore::SVGFilterElement::SVGFilterElement):
676         (WebCore::SVGFilterElement::~SVGFilterElement):
677         (WebCore::SVGFilterElement::canvasResource):
678         * ksvg2/svg/SVGFilterElement.h:
679         * ksvg2/svg/SVGGradientElement.cpp:
680         (WebCore::SVGGradientElement::SVGGradientElement):
681         (WebCore::SVGGradientElement::~SVGGradientElement):
682         (WebCore::SVGGradientElement::canvasResource):
683         (WebCore::SVGGradientElement::resourceNotification):
684         * ksvg2/svg/SVGGradientElement.h:
685         * ksvg2/svg/SVGImageElement.cpp:
686         * ksvg2/svg/SVGLinearGradientElement.cpp:
687         (WebCore::SVGLinearGradientElement::buildGradient):
688         * ksvg2/svg/SVGLinearGradientElement.h:
689         * ksvg2/svg/SVGMarkerElement.cpp:
690         (WebCore::SVGMarkerElement::SVGMarkerElement):
691         (WebCore::SVGMarkerElement::~SVGMarkerElement):
692         (WebCore::SVGMarkerElement::canvasResource):
693         * ksvg2/svg/SVGMarkerElement.h:
694         * ksvg2/svg/SVGMaskElement.cpp:
695         (WebCore::SVGMaskElement::SVGMaskElement):
696         (WebCore::SVGMaskElement::~SVGMaskElement):
697         (WebCore::SVGMaskElement::drawMaskerContent):
698         (WebCore::SVGMaskElement::canvasResource):
699         * ksvg2/svg/SVGMaskElement.h:
700         * ksvg2/svg/SVGPatternElement.cpp:
701         (WebCore::SVGPatternElement::SVGPatternElement):
702         (WebCore::SVGPatternElement::~SVGPatternElement):
703         (WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
704         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
705         (WebCore::SVGPatternElement::canvasResource):
706         * ksvg2/svg/SVGPatternElement.h:
707         * ksvg2/svg/SVGRadialGradientElement.cpp:
708         (WebCore::SVGRadialGradientElement::buildGradient):
709         * ksvg2/svg/SVGRadialGradientElement.h:
710         * ksvg2/svg/SVGStyledElement.h:
711         (WebCore::SVGStyledElement::canvasResource):
712         * platform/GraphicsContext.cpp: Removed.
713         * platform/GraphicsContext.h: Removed.
714         * platform/GraphicsTypes.cpp: Removed.
715         * platform/GraphicsTypes.h: Removed.
716         * platform/graphics/GraphicsContext.cpp:
717         (WebCore::GraphicsContextState::GraphicsContextState):
718         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
719         (WebCore::GraphicsContext::createGraphicsContextPrivate):
720         (WebCore::GraphicsContext::destroyGraphicsContextPrivate):
721         (WebCore::GraphicsContext::save):
722         (WebCore::GraphicsContext::restore):
723         (WebCore::GraphicsContext::font):
724         (WebCore::GraphicsContext::setFont):
725         (WebCore::GraphicsContext::pen):
726         (WebCore::GraphicsContext::setPen):
727         (WebCore::GraphicsContext::setFillColor):
728         (WebCore::GraphicsContext::fillColor):
729         (WebCore::GraphicsContext::updatingControlTints):
730         (WebCore::GraphicsContext::setUpdatingControlTints):
731         (WebCore::GraphicsContext::setPaintingDisabled):
732         (WebCore::GraphicsContext::paintingDisabled):
733         (WebCore::GraphicsContext::drawImage):
734         (WebCore::GraphicsContext::drawText):
735         (WebCore::GraphicsContext::drawHighlightForText):
736         (WebCore::GraphicsContext::initFocusRing):
737         (WebCore::GraphicsContext::clearFocusRing):
738         (WebCore::GraphicsContext::focusRingBoundingRect):
739         (WebCore::GraphicsContext::addFocusRingRect):
740         (WebCore::GraphicsContext::focusRingWidth):
741         (WebCore::GraphicsContext::focusRingOffset):
742         (WebCore::GraphicsContext::focusRingRects):
743         (WebCore::GraphicsContext::drawTiledImage):
744         * platform/graphics/GraphicsContext.h:
745         * platform/graphics/GraphicsTypes.cpp:
746         (WebCore::):
747         (WebCore::parseCompositeOperator):
748         (WebCore::compositeOperatorName):
749         (WebCore::parseLineCap):
750         (WebCore::lineCapName):
751         (WebCore::parseLineJoin):
752         (WebCore::lineJoinName):
753         * platform/graphics/GraphicsTypes.h:
754         (WebCore::):
755         * platform/graphics/svg/SVGResource.cpp: Added.
756         (WebCore::SVGResource::SVGResource):
757         (WebCore::SVGResource::~SVGResource):
758         (WebCore::SVGResource::invalidate):
759         (WebCore::SVGResource::addClient):
760         (WebCore::SVGResource::clients):
761         (WebCore::SVGResource::idInRegistry):
762         (WebCore::SVGResource::setIdInRegistry):
763         (WebCore::SVGResource::externalRepresentation):
764         (WebCore::getResourceById):
765         (WebCore::getPaintServerById):
766         (WebCore::operator<<):
767         * platform/graphics/svg/SVGResource.h: Added.
768         (WebCore::):
769         (WebCore::SVGResource::isPaintServer):
770         (WebCore::SVGResource::isFilter):
771         (WebCore::SVGResource::isClipper):
772         (WebCore::SVGResource::isMarker):
773         (WebCore::SVGResource::isMasker):
774         (WebCore::SVGResourceListener::~SVGResourceListener):
775         * platform/graphics/svg/SVGResourceClipper.cpp: Added.
776         (WebCore::SVGResourceClipper::SVGResourceClipper):
777         (WebCore::SVGResourceClipper::~SVGResourceClipper):
778         (WebCore::SVGResourceClipper::resetClipData):
779         (WebCore::SVGResourceClipper::addClipData):
780         (WebCore::SVGResourceClipper::clipData):
781         (WebCore::SVGResourceClipper::externalRepresentation):
782         (WebCore::operator<<):
783         (WebCore::getClipperById):
784         * platform/graphics/svg/SVGResourceClipper.h: Added.
785         (WebCore::ClipDataList::addPath):
786         (WebCore::SVGResourceClipper::isClipper):
787         * platform/graphics/svg/SVGResourceImage.h: Added.
788         * platform/graphics/svg/SVGResourceMarker.cpp: Added.
789         (WebCore::SVGResourceMarker::SVGResourceMarker):
790         (WebCore::SVGResourceMarker::~SVGResourceMarker):
791         (WebCore::SVGResourceMarker::setMarker):
792         (WebCore::SVGResourceMarker::setRef):
793         (WebCore::SVGResourceMarker::draw):
794         (WebCore::SVGResourceMarker::externalRepresentation):
795         (WebCore::getMarkerById):
796         * platform/graphics/svg/SVGResourceMarker.h: Added.
797         (WebCore::SVGResourceMarker::refX):
798         (WebCore::SVGResourceMarker::refY):
799         (WebCore::SVGResourceMarker::setAngle):
800         (WebCore::SVGResourceMarker::setAutoAngle):
801         (WebCore::SVGResourceMarker::angle):
802         (WebCore::SVGResourceMarker::setUseStrokeWidth):
803         (WebCore::SVGResourceMarker::useStrokeWidth):
804         (WebCore::SVGResourceMarker::isMarker):
805         * platform/graphics/svg/SVGResourceMasker.cpp: Added.
806         (WebCore::SVGResourceMasker::SVGResourceMasker):
807         (WebCore::SVGResourceMasker::~SVGResourceMasker):
808         (WebCore::SVGResourceMasker::setMask):
809         (WebCore::SVGResourceMasker::mask):
810         (WebCore::SVGResourceMasker::externalRepresentation):
811         (WebCore::getMaskerById):
812         * platform/graphics/svg/SVGResourceMasker.h: Added.
813         (WebCore::SVGResourceMasker::isMasker):
814         * platform/graphics/svg/cg/SVGResourceClipperCg.mm: Added.
815         (WebCore::SVGResourceClipper::applyClip):
816         * platform/graphics/svg/cg/SVGResourceImageCg.mm: Added.
817         (WebCore::SVGResourceImage::SVGResourceImage):
818         (WebCore::SVGResourceImage::~SVGResourceImage):
819         (WebCore::SVGResourceImage::init):
820         (WebCore::SVGResourceImage::size):
821         (WebCore::SVGResourceImage::cgLayer):
822         (WebCore::SVGResourceImage::setCGLayer):
823         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm: Added.
824         (WebCore::applyLuminanceToAlphaFilter):
825         (WebCore::applyExpandAlphatoGrayscaleFilter):
826         (WebCore::transformImageIntoGrayscaleMask):
827         (WebCore::SVGResourceMasker::applyMask):
828         * platform/graphics/svg/qt/SVGResourceClipperQt.cpp: Added.
829         (WebCore::SVGResourceClipper::applyClip):
830         * platform/graphics/svg/qt/SVGResourceImageQt.cpp: Added.
831         (WebCore::SVGResourceImage::init):
832         (WebCore::SVGResourceImage::size):
833         * platform/graphics/svg/qt/SVGResourceMaskerQt.cpp: Added.
834         (WebCore::SVGResourceMasker::applyMask):
835         * platform/qt/GraphicsContextQt.cpp:
836         * rendering/RenderPath.cpp:
837         (WebCore::RenderPath::paint):
838         (WebCore::DrawMarkersData::DrawMarkersData):
839         (WebCore::RenderPath::drawMarkersIfNeeded):
840         * rendering/RenderSVGContainer.cpp:
841         (WebCore::RenderSVGContainer::paint):
842         * rendering/RenderSVGImage.cpp:
843         (WebCore::RenderSVGImage::paint):
844         * rendering/SVGInlineFlowBox.cpp:
845         (WebCore::paintSVGInlineFlow):
846
847 2006-10-30  John Sullivan  <sullivan@apple.com>
848
849         Reviewed by Brady
850         
851         - minor cleanup to make future patches clearer
852
853         * bridge/mac/FrameMac.mm:
854         (WebCore::FrameMac::advanceToNextMisspelling):
855         renamed misspelling to misspellingNSRange for clarity; changed > 0 test to == 0 test
856         with "continue" to better match structure of similar code in markMisspellings; a few
857         other style tweaks.
858         
859         (WebCore::FrameMac::markMisspellings):
860         renamed misspelling to misspellingNSRange for clarity; removed unnecessary braces around
861         a block just after a break and outdented accordingly.
862
863 2006-10-30  John Sullivan  <sullivan@apple.com>
864
865         Reviewed by Geoff Garen
866         
867         WebCore part of change to push the code that updates the spelling panel
868         into WebCore, in preparation for some grammar-checking stuff.
869
870         * bridge/mac/FrameMac.h:
871         * bridge/mac/FrameMac.mm:
872         (WebCore::FrameMac::advanceToNextMisspelling):
873         no more return value for this method, and update the spelling panel with
874         the misspelled word here rather than in the WebKit callers.
875
876 2006-10-30  Oliver Hunt  <oliver@apple.com>
877
878         Reviewed by Anders.
879
880         Roll out last patch
881
882         * CMakeLists.txt:
883         * ChangeLog:
884         * WebCore.xcodeproj/project.pbxproj:
885         * graphics/svg/SVGResource.cpp:
886         * graphics/svg/SVGResourceClipper.cpp:
887         * graphics/svg/SVGResourceClipper.h:
888         * graphics/svg/SVGResourceImage.h:
889         * graphics/svg/SVGResourceListener.h:
890         * graphics/svg/SVGResourceMarker.cpp:
891         * graphics/svg/SVGResourceMarker.h:
892         * graphics/svg/SVGResourceMasker.cpp:
893         * graphics/svg/SVGResourceMasker.h:
894         * kcanvas/KCanvasClipper.cpp: Added.
895         (WebCore::operator<<):
896         (WebCore::KCanvasClipper::KCanvasClipper):
897         (WebCore::KCanvasClipper::~KCanvasClipper):
898         (WebCore::KCanvasClipper::resetClipData):
899         (WebCore::KCanvasClipper::addClipData):
900         (WebCore::KCanvasClipper::clipData):
901         (WebCore::KCanvasClipper::externalRepresentation):
902         (WebCore::getClipperById):
903         * kcanvas/KCanvasClipper.h: Added.
904         (WebCore::KCClipData::windRule):
905         (WebCore::KCClipDataList::KCClipDataList):
906         (WebCore::KCClipDataList::addPath):
907         (WebCore::KCanvasClipper::isClipper):
908         * kcanvas/KCanvasFilters.cpp:
909         (WebCore::getFilterById):
910         * kcanvas/KCanvasFilters.h:
911         * kcanvas/KCanvasImage.h: Added.
912         (WebCore::KCanvasImage::KCanvasImage):
913         (WebCore::KCanvasImage::~KCanvasImage):
914         * kcanvas/KCanvasMarker.cpp: Added.
915         (WebCore::KCanvasMarker::KCanvasMarker):
916         (WebCore::KCanvasMarker::~KCanvasMarker):
917         (WebCore::KCanvasMarker::setMarker):
918         (WebCore::KCanvasMarker::setRef):
919         (WebCore::KCanvasMarker::refX):
920         (WebCore::KCanvasMarker::refY):
921         (WebCore::KCanvasMarker::setAngle):
922         (WebCore::KCanvasMarker::angle):
923         (WebCore::KCanvasMarker::setAutoAngle):
924         (WebCore::KCanvasMarker::setUseStrokeWidth):
925         (WebCore::KCanvasMarker::useStrokeWidth):
926         (WebCore::KCanvasMarker::draw):
927         (WebCore::KCanvasMarker::externalRepresentation):
928         (WebCore::getMarkerById):
929         * kcanvas/KCanvasMarker.h: Added.
930         (WebCore::KCanvasMarker::isMarker):
931         * kcanvas/KCanvasMasker.cpp: Added.
932         (WebCore::KCanvasMasker::KCanvasMasker):
933         (WebCore::KCanvasMasker::~KCanvasMasker):
934         (WebCore::KCanvasMasker::setMask):
935         (WebCore::KCanvasMasker::externalRepresentation):
936         (WebCore::getMaskerById):
937         * kcanvas/KCanvasMasker.h: Added.
938         (WebCore::KCanvasMasker::isMasker):
939         (WebCore::KCanvasMasker::mask):
940         * kcanvas/KCanvasResource.cpp: Added.
941         (WebCore::operator<<):
942         (WebCore::KCanvasResource::KCanvasResource):
943         (WebCore::KCanvasResource::~KCanvasResource):
944         (WebCore::KCanvasResource::addClient):
945         (WebCore::KCanvasResource::clients):
946         (WebCore::KCanvasResource::invalidate):
947         (WebCore::KCanvasResource::idInRegistry):
948         (WebCore::KCanvasResource::setIdInRegistry):
949         (WebCore::KCanvasResource::externalRepresentation):
950         (WebCore::getResourceById):
951         (WebCore::getPaintServerById):
952         * kcanvas/KCanvasResource.h:
953         (WebCore::):
954         (WebCore::KCanvasResource::isPaintServer):
955         (WebCore::KCanvasResource::isFilter):
956         (WebCore::KCanvasResource::isClipper):
957         (WebCore::KCanvasResource::isMarker):
958         (WebCore::KCanvasResource::isMasker):
959         * kcanvas/KCanvasResourceListener.h: Added.
960         (KCanvasResourceListener::KCanvasResourceListener):
961         (KCanvasResourceListener::~KCanvasResourceListener):
962         * kcanvas/KCanvasTreeDebug.cpp:
963         (WebCore::writeRenderResources):
964         * kcanvas/device/KRenderingDevice.h:
965         * kcanvas/device/KRenderingPaintServer.h:
966         (WebCore::KRenderingPaintServer::KRenderingPaintServer):
967         (WebCore::KRenderingPaintServer::idInRegistry):
968         (WebCore::KRenderingPaintServer::setIdInRegistry):
969         * kcanvas/device/KRenderingPaintServerGradient.cpp:
970         (WebCore::KRenderingPaintServerGradient::listener):
971         (WebCore::KRenderingPaintServerGradient::setListener):
972         * kcanvas/device/KRenderingPaintServerGradient.h:
973         * kcanvas/device/KRenderingPaintServerPattern.cpp:
974         (WebCore::KRenderingPaintServerPattern::KRenderingPaintServerPattern):
975         (WebCore::KRenderingPaintServerPattern::~KRenderingPaintServerPattern):
976         (WebCore::KRenderingPaintServerPattern::tile):
977         (WebCore::KRenderingPaintServerPattern::setTile):
978         (WebCore::KRenderingPaintServerPattern::listener):
979         (WebCore::KRenderingPaintServerPattern::setListener):
980         * kcanvas/device/KRenderingPaintServerPattern.h:
981         * kcanvas/device/KRenderingPaintServerSolid.h:
982         * kcanvas/device/qt/KCanvasClipperQt.cpp:
983         (WebCore::KCanvasClipperQt::applyClip):
984         * kcanvas/device/qt/KCanvasClipperQt.h:
985         (WebCore::KCanvasClipperQt::KCanvasClipperQt):
986         * kcanvas/device/qt/KRenderingDeviceQt.cpp:
987         (WebCore::KRenderingDeviceQt::contextForImage):
988         (WebCore::KRenderingDeviceQt::createResource):
989         (WebCore::KRenderingDeviceQt::createPaintServer):
990         * kcanvas/device/qt/KRenderingDeviceQt.h:
991         * kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
992         * kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp:
993         * kcanvas/device/qt/KRenderingPaintServerQt.cpp:
994         * kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp:
995         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
996         (WebCore::KCanvasFilterQuartz::getCIFilterStack):
997         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
998         * kcanvas/device/quartz/KCanvasMaskerQuartz.h:
999         (WebCore::KCanvasMaskerQuartz::KCanvasMaskerQuartz):
1000         * kcanvas/device/quartz/KCanvasMaskerQuartz.mm:
1001         (WebCore::applyLuminanceToAlphaFilter):
1002         (WebCore::applyExpandAlphatoGrayscaleFilter):
1003         (WebCore::transformImageIntoGrayscaleMask):
1004         (WebCore::KCanvasMaskerQuartz::applyMask):
1005         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
1006         (WebCore::KCanvasClipperQuartz::KCanvasClipperQuartz):
1007         (WebCore::KCanvasImageQuartz::KCanvasImageQuartz):
1008         (WebCore::KCanvasImageQuartz::init):
1009         (WebCore::KCanvasImageQuartz::size):
1010         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
1011         (WebCore::KCanvasClipperQuartz::applyClip):
1012         (WebCore::KCanvasImageQuartz::~KCanvasImageQuartz):
1013         (WebCore::KCanvasImageQuartz::cgLayer):
1014         (WebCore::KCanvasImageQuartz::setCGLayer):
1015         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
1016         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
1017         (WebCore::KRenderingDeviceQuartz::contextForImage):
1018         (WebCore::KRenderingDeviceQuartz::createPaintServer):
1019         (WebCore::KRenderingDeviceQuartz::createResource):
1020         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
1021         (WebCore::KRenderingPaintServerGradientQuartz::KRenderingPaintServerGradientQuartz):
1022         (WebCore::KRenderingPaintServerGradientQuartz::~KRenderingPaintServerGradientQuartz):
1023         (WebCore::KRenderingPaintServerGradientQuartz::setup):
1024         (WebCore::KRenderingPaintServerGradientQuartz::teardown):
1025         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
1026         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
1027         (WebCore::patternCallback):
1028         (WebCore::KRenderingPaintServerPatternQuartz::setup):
1029         * kcanvas/device/quartz/QuartzSupport.mm:
1030         * ksvg2/misc/KCanvasRenderingStyle.cpp:
1031         (WebCore::sharedSolidPaintServer):
1032         * ksvg2/svg/SVGClipPathElement.cpp:
1033         (WebCore::SVGClipPathElement::SVGClipPathElement):
1034         (WebCore::SVGClipPathElement::~SVGClipPathElement):
1035         (WebCore::SVGClipPathElement::canvasResource):
1036         * ksvg2/svg/SVGClipPathElement.h:
1037         * ksvg2/svg/SVGFEImageElement.cpp:
1038         * ksvg2/svg/SVGFilterElement.cpp:
1039         (WebCore::SVGFilterElement::SVGFilterElement):
1040         (WebCore::SVGFilterElement::~SVGFilterElement):
1041         (WebCore::SVGFilterElement::canvasResource):
1042         * ksvg2/svg/SVGFilterElement.h:
1043         * ksvg2/svg/SVGGradientElement.cpp:
1044         (WebCore::SVGGradientElement::SVGGradientElement):
1045         (WebCore::SVGGradientElement::~SVGGradientElement):
1046         (WebCore::SVGGradientElement::canvasResource):
1047         (WebCore::SVGGradientElement::resourceNotification):
1048         * ksvg2/svg/SVGGradientElement.h:
1049         * ksvg2/svg/SVGImageElement.cpp:
1050         * ksvg2/svg/SVGLinearGradientElement.cpp:
1051         (WebCore::SVGLinearGradientElement::buildGradient):
1052         * ksvg2/svg/SVGLinearGradientElement.h:
1053         * ksvg2/svg/SVGMarkerElement.cpp:
1054         (WebCore::SVGMarkerElement::SVGMarkerElement):
1055         (WebCore::SVGMarkerElement::~SVGMarkerElement):
1056         (WebCore::SVGMarkerElement::canvasResource):
1057         * ksvg2/svg/SVGMarkerElement.h:
1058         * ksvg2/svg/SVGMaskElement.cpp:
1059         (WebCore::SVGMaskElement::SVGMaskElement):
1060         (WebCore::SVGMaskElement::~SVGMaskElement):
1061         (WebCore::SVGMaskElement::drawMaskerContent):
1062         (WebCore::SVGMaskElement::canvasResource):
1063         * ksvg2/svg/SVGMaskElement.h:
1064         * ksvg2/svg/SVGPatternElement.cpp:
1065         (WebCore::SVGPatternElement::SVGPatternElement):
1066         (WebCore::SVGPatternElement::~SVGPatternElement):
1067         (WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
1068         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
1069         (WebCore::SVGPatternElement::canvasResource):
1070         * ksvg2/svg/SVGPatternElement.h:
1071         * ksvg2/svg/SVGRadialGradientElement.cpp:
1072         (WebCore::SVGRadialGradientElement::buildGradient):
1073         * ksvg2/svg/SVGRadialGradientElement.h:
1074         * ksvg2/svg/SVGStyledElement.h:
1075         (WebCore::SVGStyledElement::canvasResource):
1076         * platform/GraphicsContext.cpp: Added.
1077         (WebCore::GraphicsContextState::GraphicsContextState):
1078         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
1079         (WebCore::GraphicsContext::createGraphicsContextPrivate):
1080         (WebCore::GraphicsContext::destroyGraphicsContextPrivate):
1081         (WebCore::GraphicsContext::save):
1082         (WebCore::GraphicsContext::restore):
1083         (WebCore::GraphicsContext::font):
1084         (WebCore::GraphicsContext::setFont):
1085         (WebCore::GraphicsContext::pen):
1086         (WebCore::GraphicsContext::setPen):
1087         (WebCore::GraphicsContext::setFillColor):
1088         (WebCore::GraphicsContext::fillColor):
1089         (WebCore::GraphicsContext::updatingControlTints):
1090         (WebCore::GraphicsContext::setUpdatingControlTints):
1091         (WebCore::GraphicsContext::setPaintingDisabled):
1092         (WebCore::GraphicsContext::paintingDisabled):
1093         (WebCore::GraphicsContext::drawImage):
1094         (WebCore::GraphicsContext::drawText):
1095         (WebCore::GraphicsContext::drawHighlightForText):
1096         (WebCore::GraphicsContext::initFocusRing):
1097         (WebCore::GraphicsContext::clearFocusRing):
1098         (WebCore::GraphicsContext::focusRingBoundingRect):
1099         (WebCore::GraphicsContext::addFocusRingRect):
1100         (WebCore::GraphicsContext::focusRingWidth):
1101         (WebCore::GraphicsContext::focusRingOffset):
1102         (WebCore::GraphicsContext::focusRingRects):
1103         (WebCore::GraphicsContext::drawTiledImage):
1104         * platform/GraphicsContext.h: Added.
1105         * platform/GraphicsTypes.cpp: Added.
1106         (WebCore::):
1107         (WebCore::parseCompositeOperator):
1108         (WebCore::compositeOperatorName):
1109         (WebCore::parseLineCap):
1110         (WebCore::lineCapName):
1111         (WebCore::parseLineJoin):
1112         (WebCore::lineJoinName):
1113         * platform/GraphicsTypes.h: Added.
1114         (WebCore::):
1115         * platform/graphics/GraphicsContext.cpp:
1116         * platform/graphics/GraphicsContext.h:
1117         * platform/graphics/GraphicsTypes.cpp:
1118         * platform/graphics/GraphicsTypes.h:
1119         * platform/qt/GraphicsContextQt.cpp:
1120         * rendering/RenderPath.cpp:
1121         (WebCore::RenderPath::paint):
1122         (WebCore::DrawMarkersData::DrawMarkersData):
1123         (WebCore::RenderPath::drawMarkersIfNeeded):
1124         * rendering/RenderSVGContainer.cpp:
1125         (WebCore::RenderSVGContainer::paint):
1126         * rendering/RenderSVGImage.cpp:
1127         (WebCore::RenderSVGImage::paint):
1128         * rendering/SVGInlineFlowBox.cpp:
1129         (WebCore::paintSVGInlineFlow):
1130
1131 2006-10-30  John Sullivan  <sullivan@apple.com>
1132
1133         Reviewed by Geoff Garen.
1134         
1135         Moved spelling-related methods from bridge to EditorClient. Added one not-yet-used
1136         grammar-related method.
1137
1138         * bridge/EditorClient.h:
1139         declare isContinuousSpellCheckingEnabled(), spellCheckerDocumentTag(), and new
1140         isGrammarCheckingEnabled()
1141         
1142         * bridge/mac/WebCoreFrameBridge.h:
1143         removed bridge equivalents
1144
1145         * bridge/mac/FrameMac.mm:
1146         (WebCore::FrameMac::advanceToNextMisspelling):
1147         convert bridge-using code to editor()->client()-using code
1148         (WebCore::FrameMac::markMisspellingsInAdjacentWords):
1149         ditto
1150         (WebCore::FrameMac::markMisspellings):
1151         ditto
1152         (WebCore::FrameMac::respondToChangedSelection):
1153         ditto
1154         
1155         * editing/Editor.h:
1156         * editing/Editor.cpp:
1157         (WebCore::Editor::client):
1158         new method, returns EditorClient pointer. In an ideal world all the code that needed to
1159         access the EditorClient would be in Editor.cpp, and we wouldn't need this accessor.
1160         But for now it's too tricky to extricate the spelling-related code from FrameMac.mm.
1161
1162 2006-10-30  Geoffrey Garen  <ggaren@apple.com>
1163
1164         Reviewed by Darin.
1165
1166         Removed a number of editing and selection methods from the bridge.
1167         
1168         I moved cross-platform editing and selection code into Editor and 
1169         SelectionController, respecitvely.
1170
1171         I moved ObjC and AppKit stuff up into WebKit, so I ended up exporting
1172         everything + the kitchen sink.
1173         
1174         Specific comments below for interesting things.
1175         
1176         * bindings/objc/DOMInternal.h: Moved exception handling helper methods into
1177         a new file so that WebKit can use them, too. Added a helper method for
1178         handling exceptions when selecting a Range.
1179         * bridge/mac/FrameMac.h: Moved attributedString creation and helper functions into 
1180         WebKit, since they have to do with creating an NSAttributedString for API
1181         consumption, and not much to do with general Frame functionality.
1182         * editing/Editor.h: Moved lastEditCommand tracking (at least the data,
1183         for now) into the Editor. Eventually, the Frame will not have to notify 
1184         the Editor of what the lastEditCommand was, since the Editor will perform
1185         all EditCommands.
1186         * editing/SelectionController.h: The code here is just stuff moved from the bridge.
1187         * editing/SelectionController.cpp:
1188         (WebCore::SelectionController::setSelectedRange): We now explicitly check from DOM exceptions
1189         and return them. The bridge method to select a DOM range did this implicitly,
1190         since all ObjC DOM operations handle DOM exceptions by throwing them as
1191         ObjC exceptions.
1192         * editing/TextAffinity.h: Added helper functions for conversion to NSSelectionAffinity.
1193         The two enumerations are numerically identical, but that's an implementation
1194         detail of TextAffinity that clients shouldn't be required to know about.
1195
1196 2006-10-30  Timothy Hatcher  <timothy@apple.com>
1197
1198         Rolling out the following change because this crash:
1199         <rdar://problem/4806705> REGRESSION: Crash occurs at WebCore::Font::lineSpacing() when loading site (http://www.photoplusexpo.com/ppe/index.jsp) 
1200
1201         And this regression:
1202         <rdar://problem/4728514> REGRESSION: Safari applies the wrong font to BODY element at http://www.apple.com/downloads/dashboard/
1203
1204     2006-09-06  David Harrison  <harrison@apple.com>
1205
1206         Reviewed and tweaked by Tim H. 
1207
1208         <rdar://problem/4564955> WebKit doesn't trigger Auto Font Activation 
1209
1210         If we don't find the font in the available fonts list, call [NSFont fontWithName:size:] 
1211         to trigger a search that will include auto activation. No PLT or iBench perf impact. 
1212         No layout tests affected. Not testable in an automated way that will work on all systems. 
1213
1214         * platform/mac/WebFontCache.mm: 
1215         (+[WebFontCache fontWithFamily:traits:size:]): 
1216
1217 2006-10-30  Justin Garcia  <justin.garcia@apple.com>
1218
1219         Reviewed by harrison
1220
1221         <rdar://problem/4808375>
1222         REGRESSION: TextIterator slowed down, affecting Find on Page & Copy (etc.) (11460)
1223
1224         * editing/TextIterator.cpp:
1225         (WebCore::TextIterator::exitNode): Only create VisiblePositions
1226         when we're going to use them to create a range for an emitted character.
1227         We should further speed TextIterators up by avoiding creating VisiblePositions
1228         for TIs that are only used for the characters they emit (like the one that 
1229         plainText uses).
1230
1231 2006-10-30  Sam Weinig  <sam.weinig@gmail.com>
1232
1233         Reviewed by Mitz.
1234
1235         Fix for http://bugs.webkit.org/show_bug.cgi?id=11441
1236         More rendering code cleaning
1237
1238         * WebCore.xcodeproj/project.pbxproj:
1239         * rendering/RenderApplet.cpp:
1240         (WebCore::RenderApplet::RenderApplet):
1241         (WebCore::RenderApplet::createWidgetIfNecessary):
1242         * rendering/RenderApplet.h:
1243         * rendering/RenderArena.cpp:
1244         (WebCore::):
1245         (WebCore::RenderArena::RenderArena):
1246         (WebCore::RenderArena::allocate):
1247         (WebCore::RenderArena::free):
1248         * rendering/RenderArena.h:
1249         * rendering/RenderBR.cpp:
1250         (WebCore::RenderBR::RenderBR):
1251         (WebCore::RenderBR::baselinePosition):
1252         (WebCore::RenderBR::lineHeight):
1253         (WebCore::RenderBR::setStyle):
1254         (WebCore::RenderBR::caretMinOffset):
1255         (WebCore::RenderBR::positionForCoordinates):
1256         (WebCore::RenderBR::inlineBox):
1257         * rendering/RenderBR.h:
1258         * rendering/RenderBlock.cpp:
1259         * rendering/RenderBlock.h:
1260         (WebCore::RenderBlock::maxTopMargin):
1261         (WebCore::RenderBlock::maxBottomMargin):
1262         (WebCore::RenderBlock::initMaxMarginValues):
1263         (WebCore::RenderBlock::containsFloats):
1264         (WebCore::RenderBlock::setHasMarkupTruncation):
1265         (WebCore::RenderBlock::BlockSelectionInfo::BlockSelectionInfo):
1266         (WebCore::RenderBlock::BlockSelectionInfo::block):
1267         (WebCore::RenderBlock::BlockSelectionInfo::state):
1268         (WebCore::RenderBlock::FloatingObject::FloatingObject):
1269         (WebCore::RenderBlock::CompactInfo::clear):
1270         * rendering/RenderButton.cpp:
1271         (WebCore::RenderButton::removeChild):
1272         (WebCore::RenderButton::paintObject):
1273         * rendering/RenderButton.h:
1274         (WebCore::RenderButton::renderName):
1275         (WebCore::RenderButton::removeLeftoverAnonymousBoxes):
1276         * rendering/RenderContainer.cpp:
1277         (WebCore::RenderContainer::RenderContainer):
1278         * rendering/RenderContainer.h:
1279         (WebCore::RenderContainer::firstChild):
1280         (WebCore::RenderContainer::lastChild):
1281         (WebCore::RenderContainer::calcMinMaxWidth):
1282         * rendering/RenderCounter.cpp:
1283         (WebCore::RenderCounter::RenderCounter):
1284         (WebCore::toRoman):
1285         (WebCore::toHebrew):
1286         (WebCore::RenderCounter::calcMinMaxWidth):
1287         * rendering/RenderCounter.h:
1288         * rendering/RenderFieldset.cpp:
1289         (WebCore::RenderFieldset::paintBoxDecorations):
1290         (WebCore::RenderFieldset::paintBorderMinusLegend):
1291         (WebCore::RenderFieldset::setStyle):
1292         * rendering/RenderFileUploadControl.cpp:
1293         (WebCore::RenderFileUploadControl::~RenderFileUploadControl):
1294         (WebCore::RenderFileUploadControl::setStyle):
1295         (WebCore::RenderFileUploadControl::paintObject):
1296         (WebCore::RenderFileUploadControl::calcMinMaxWidth):
1297         * rendering/RenderFileUploadControl.h:
1298         (WebCore::RenderFileUploadControl::renderName):
1299         * rendering/RenderFlexibleBox.h:
1300         * rendering/RenderFlow.cpp:
1301         * rendering/RenderFlow.h:
1302         * rendering/RenderForeignObject.cpp:
1303         (WebCore::RenderForeignObject::RenderForeignObject):
1304         (WebCore::RenderForeignObject::paint):
1305         (WebCore::RenderForeignObject::computeAbsoluteRepaintRect):
1306         (WebCore::RenderForeignObject::layout):
1307         (WebCore::RenderForeignObject::nodeAtPoint):
1308         * rendering/RenderForeignObject.h:
1309         (WebCore::RenderForeignObject::renderName):
1310         * rendering/RenderFormElement.cpp:
1311         (WebCore::RenderFormElement::setStyle):
1312         (WebCore::RenderFormElement::layout):
1313         (WebCore::RenderFormElement::textAlignment):
1314         * rendering/RenderFormElement.h:
1315         * rendering/RenderFrame.cpp:
1316         * rendering/RenderFrame.h:
1317         (WebCore::RenderFrame::element):
1318         * rendering/RenderFrameSet.cpp:
1319         * rendering/RenderFrameSet.h:
1320         (WebCore::RenderFrameSet::element):
1321         * rendering/RenderHTMLCanvas.cpp:
1322         (WebCore::RenderHTMLCanvas::RenderHTMLCanvas):
1323         (WebCore::RenderHTMLCanvas::paint):
1324         * rendering/RenderHTMLCanvas.h:
1325         (WebCore::RenderHTMLCanvas::renderName):
1326         * rendering/RenderImage.cpp:
1327         (WebCore::RenderImage::RenderImage):
1328         (WebCore::RenderImage::setStyle):
1329         (WebCore::RenderImage::setContentObject):
1330         (WebCore::RenderImage::setCachedImage):
1331         (WebCore::RenderImage::imageChanged):
1332         (WebCore::RenderImage::paint):
1333         (WebCore::RenderImage::layout):
1334         (WebCore::RenderImage::updateAltText):
1335         * rendering/RenderImage.h:
1336         (WebCore::RenderImage::element):
1337         * rendering/RenderInline.cpp:
1338         (WebCore::RenderInline::RenderInline):
1339         (WebCore::RenderInline::~RenderInline):
1340         (WebCore::RenderInline::setStyle):
1341         (WebCore::RenderInline::addChildToFlow):
1342         (WebCore::RenderInline::cloneInline):
1343         (WebCore::RenderInline::splitInlines):
1344         (WebCore::RenderInline::splitFlow):
1345         (WebCore::RenderInline::paint):
1346         (WebCore::RenderInline::absoluteRects):
1347         (WebCore::RenderInline::calcMinMaxWidth):
1348         (WebCore::RenderInline::requiresLayer):
1349         (WebCore::RenderInline::width):
1350         (WebCore::RenderInline::height):
1351         (WebCore::RenderInline::renderName):
1352         (WebCore::RenderInline::nodeAtPoint):
1353         (WebCore::RenderInline::positionForCoordinates):
1354         * rendering/RenderInline.h:
1355         (WebCore::RenderInline::layout):
1356         * rendering/RenderLayer.cpp:
1357         * rendering/RenderLayer.h:
1358         (WebCore::ClipRects::ClipRects):
1359         (WebCore::RenderLayer::nextSibling):
1360         (WebCore::RenderLayer::root):
1361         (WebCore::RenderLayer::setPos):
1362         (WebCore::RenderLayer::height):
1363         (WebCore::RenderLayer::relativePositionOffset):
1364         * rendering/RenderLineEdit.cpp:
1365         (WebCore::RenderLineEdit::setStyle):
1366         (WebCore::RenderLineEdit::updateFromElement):
1367         (WebCore::RenderLineEdit::selectionStart):
1368         (WebCore::RenderLineEdit::selectionEnd):
1369         (WebCore::RenderLineEdit::setSelectionStart):
1370         (WebCore::RenderLineEdit::setSelectionEnd):
1371         (WebCore::RenderLineEdit::setSelectionRange):
1372         * rendering/RenderLineEdit.h:
1373         * rendering/RenderListBox.cpp:
1374         * rendering/RenderListBox.h:
1375         (WebCore::RenderListBox::renderName):
1376         * rendering/RenderListItem.cpp:
1377         (WebCore::RenderListItem::setStyle):
1378         (WebCore::getParentOfFirstLineBox):
1379         (WebCore::RenderListItem::updateMarkerLocation):
1380         (WebCore::RenderListItem::positionListMarker):
1381         (WebCore::RenderListItem::paint):
1382         * rendering/RenderListItem.h:
1383         * rendering/RenderListMarker.cpp:
1384         * rendering/RenderListMarker.h:
1385         (WebCore::RenderListMarker::renderName):
1386         (WebCore::RenderListMarker::isListMarker):
1387
1388 2006-10-30  Timothy Hatcher  <timothy@apple.com>
1389
1390         Reviewed by Hyatt.
1391
1392         <rdar://problem/4478625> Basic table editing and culling
1393
1394         Refined the criteria for deletable elements, rely on the renderer more.
1395         Corrected the interface positioning for elements that have borders.
1396
1397         * editing/DeleteButtonController.cpp:
1398         (WebCore::isDeletableElement):
1399         (WebCore::DeleteButtonController::show):
1400
1401 2006-10-30  Darin Adler  <darin@apple.com>
1402
1403         - fix build
1404
1405         * loader/ResourceLoader.h: Added header guard.
1406
1407 2006-10-31  Darin Adler  <darin@apple.com>
1408
1409         Reviewed by Adam.
1410
1411         - fix FrameLoader files so they can be built on non-Mac platforms
1412
1413         * page/FramePrivate.h:
1414         (WebCore::FramePrivate::FramePrivate): Added code to create the frame loader.
1415         (WebCore::FramePrivate::~FramePrivate): Added code to delete the frame loader.
1416
1417         * page/Page.h:
1418         * page/Page.cpp: (WebCore::Page::setDefersLoading): Removed the
1419         #if PLATFORM(MAC) that Adam added as a stop-gap when I did this wrong
1420         the other day.
1421
1422         * bridge/mac/FrameMac.mm:
1423         (WebCore::FrameMac::FrameMac): Removed code to create the frame loader.
1424         (WebCore::FrameMac::~FrameMac): Removed code to delete the frame loader.
1425
1426         * loader/FrameLoader.h: Changed import to include, added #if PLATFORM(MAC)
1427         around the PolicyCheck definition.
1428
1429         * loader/FormState.cpp: Changed import to include.
1430         * loader/FrameLoader.cpp: Ditto.
1431         * loader/MainResourceLoader.h: Ditto.
1432
1433         * loader/FrameLoaderTypes.h: Added a header guard.
1434
1435         * loader/NetscapePlugInStreamLoader.h: Changed import to include.
1436         Added #if PLATFORM(MAC) around Mac-specific details.
1437         * loader/SubresourceLoader.h: Ditto.
1438
1439         * page/Frame.cpp: (WebCore::Frame::loader): Updated name of loader to
1440         m_loader from m_frameLoader.
1441
1442         * CMakeLists.txt: Updated.
1443         * WebCoreSources.bkl: Updated.
1444
1445 2006-10-30  Nikolas Zimmermann  <zimmermann@kde.org>
1446
1447         Reviewed and landed by Anders.
1448
1449         Patch by Zack rusin to fix: 
1450         http://bugs.webkit.org/show_bug.cgi?id=11429
1451
1452         Fix startup crash.
1453
1454         * platform/qt/FrameQtClient.cpp:
1455         (WebCore::FrameQtClientDefault::openURL):
1456
1457 2006-10-30  Zach Rusin  <zack@kde.org>
1458
1459         Reviewed and landed by Anders.
1460
1461         * platform/network/qt/ResourceHandleQt.cpp:
1462         (WebCore::ResourceHandle::receivedResponse):
1463         * platform/qt/FrameQtClient.cpp:
1464         (WebCore::FrameQtClientDefault::FrameQtClientDefault):
1465         * platform/qt/LoaderFunctionsQt.cpp:
1466         (WebCore::ServeSynchronousRequest):
1467         More build fixes.
1468
1469 2006-10-30  Simon Hausmann  <hausmann@kde.org>
1470
1471         Reviewed and landed by Anders.
1472         
1473         - fix Qt build
1474         * platform/qt/FrameQtClient.cpp: ResourceLoaderClient ->
1475         ResourceHandleClient
1476
1477 2006-10-30  Darin Adler  <darin@apple.com>
1478
1479         Reviewed by John Sullivan.
1480
1481         - work toward removing Objective-C data types from FrameLoader.h:
1482           removed NSDate, NSString, WebCorePageState, WebCoreResourceLoader,
1483           and WebCoreResourceHandle
1484         - moved bodyBackgroundColor function from Frame to WebFrame in WebKit
1485
1486         * page/PageState.h:
1487         * page/PageState.cpp: Added, C++ class with much of what WebCorePageState had.
1488
1489         * bridge/mac/FrameMac.h: Removed uneeeded declarations and bodyBackgroundColor().
1490         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::startRedirectionTimer): Use a
1491         double for the date instead of an NSDate.
1492
1493         * bridge/mac/WebCoreFrameBridge.h:
1494         * bridge/mac/WebCoreFrameBridge.mm: Removed invalidatePageCache and
1495         saveDocumentToPageCache methods.
1496
1497         * bridge/mac/WebCorePageState.h:
1498         * bridge/mac/WebCorePageState.mm: Removed most of the class and turned it into
1499         an Objective-C wrapper for PageState.
1500
1501         * loader/FrameLoader.h: Removed unused Objective-C types, eliminated use of
1502         NSDate and WebCorePageState.
1503         * loader/FrameLoaderClient.h: Changed NSDate to double.
1504         * loader/mac/FrameLoaderMac.mm:
1505         (WebCore::FrameLoader::receivedMainResourceError): Moved call to setInPageCache
1506         here that used to be in invalidateCurrentItemPageCache on the WebKit side.
1507         (WebCore::FrameLoader::clientRedirected): Changed NSDate to double for date.
1508         (WebCore::FrameLoader::open): Moved one of the open functions that was part of
1509         commitProvisionalLoad inside the commitProvisionalLoad function, so that it can
1510         extract the parameters from the response. Changed the open function that takes
1511         a PageState to use the new C++ PageState.
1512         (WebCore::FrameLoader::commitProvisionalLoad): Added the code from the open
1513         function; tightened up logic, removing a few cases that could never happen, as
1514         well as the unused reload boolean.
1515
1516         * ForwardingHeaders/kjs/property_map.h: Added.
1517
1518         * WebCore.exp: Updated.
1519         * WebCore.xcodeproj/project.pbxproj: Updated.
1520
1521 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
1522
1523         Reviewed by Anders.
1524
1525         - added ResourceResponse class and didReceiveResponse delegate call
1526         
1527         * WebCore.xcodeproj/project.pbxproj: Added new files.
1528         * bridge/mac/WebCoreFrameBridge.h: Removed no longer needed
1529         expiresTimeForResponse: method.
1530         * dom/XMLTokenizer.cpp:
1531         (WebCore::openFunc): Updated to use ResourceResponse.
1532         * loader/FrameLoader.h: Update loadResourceSynchronously to
1533         use ResourceResponse.
1534         * loader/LoaderFunctions.h:
1535         * loader/icon/IconLoader.cpp:
1536         (IconLoader::didReceiveResponse): Updated from receivedResponse
1537         and made cross-platform.
1538         * loader/icon/IconLoader.h: updated for above change
1539         * loader/loader.cpp:
1540         (WebCore::Loader::receivedResponse): reduced to just saving
1541         the PlatformResponse (ideally we'd phase out use of this).
1542         (WebCore::Loader::didReceivedResponse): most of the ReceivedResponse 
1543         logic.
1544         * loader/loader.h:
1545         * loader/mac/FrameLoaderMac.mm:
1546         (WebCore::FrameLoader::loadResourceSynchronously): Return results
1547         as ResourceResponse.
1548         * loader/mac/IconLoaderMac.mm: remove receivedResponse.
1549         * loader/mac/LoaderFunctionsMac.mm:
1550         (WebCore::ServeSynchronousRequest): take ResourceResponse as
1551         argument.
1552         * platform/network/ResourceHandle.cpp:
1553         * platform/network/ResourceHandle.h: Remove calls for
1554         broken out response pieces.
1555         * platform/network/ResourceHandleClient.h:
1556         (WebCore::ResourceHandleClient::didReceiveResponse): New
1557         delegate method.
1558         * platform/network/ResourceHandleInternal.h:
1559         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Remove
1560         storage of response bits, we're not gonna return them
1561         seprately any more.
1562         * platform/network/ResourceResponse.h: Added.
1563         (WebCore::ResourceResponse::ResourceResponse): Freshly
1564         implemented. Same for below.
1565         (WebCore::ResourceResponse::url):
1566         (WebCore::ResourceResponse::mimeType):
1567         (WebCore::ResourceResponse::expectedContentLength):
1568         (WebCore::ResourceResponse::textEncodingName):
1569         (WebCore::ResourceResponse::suggestedFilename):
1570         (WebCore::ResourceResponse::httpStatusCode):
1571         (WebCore::ResourceResponse::setHTTPStatusCode):
1572         (WebCore::ResourceResponse::httpHeaderField):
1573         (WebCore::ResourceResponse::httpHeaderFields):
1574         (WebCore::ResourceResponse::isMultipart):
1575         (WebCore::ResourceResponse::setExpirationDate):
1576         (WebCore::ResourceResponse::expirationDate):
1577         * platform/network/cf/ResourceHandleCFNet.cpp:
1578         (WebCore::didReceiveResponse): Send didReceiveResponse
1579         client method.
1580         * platform/network/cf/ResourceResponseCFNet.h: Added.
1581         * platform/network/cf/ResourceResponseCFNet.mm: Added.
1582         (getResourceResponse): Helper function to get a ResourceResponse 
1583         from CFURLResponseRef.
1584         * platform/network/mac/ResourceHandleMac.mm:
1585         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1586         Don't bother cleaning up fields we no longer have.
1587         (WebCore::ResourceHandle::receivedResponse): Send
1588         didReceiveResponse client method.
1589         * platform/network/mac/ResourceResponseMac.h: Added.
1590         * platform/network/mac/ResourceResponseMac.mm: Added.
1591         (getResourceResponse): Helper function to get a ResourceResponse 
1592         from an NSURLResponse*.
1593         * rendering/HitTestResult.cpp:
1594         * xml/XSLTProcessor.cpp:
1595         (WebCore::docLoaderFunc): Prepare for use of ResourceResponse.
1596         * xml/xmlhttprequest.cpp:
1597         (WebCore::XMLHttpRequest::getResponseText): Store http response
1598         info in the form of a ResourceResponse, change all methods to
1599         account for this.
1600         (WebCore::XMLHttpRequest::getResponseXML):
1601         (WebCore::XMLHttpRequest::XMLHttpRequest):
1602         (WebCore::XMLHttpRequest::open):
1603         (WebCore::XMLHttpRequest::send):
1604         (WebCore::XMLHttpRequest::getAllResponseHeaders):
1605         (WebCore::XMLHttpRequest::getResponseHeader):
1606         (WebCore::XMLHttpRequest::getStatus):
1607         (WebCore::XMLHttpRequest::getStatusText):
1608         (WebCore::XMLHttpRequest::processSyncLoadResults):
1609         (WebCore::XMLHttpRequest::didFinishLoading):
1610         (WebCore::XMLHttpRequest::didReceiveResponse):
1611         (WebCore::XMLHttpRequest::didReceiveData):
1612         * xml/xmlhttprequest.h:
1613
1614 2006-10-29  Darin Adler  <darin@apple.com>
1615
1616         - fix build
1617
1618         * loader/DocumentLoader.h: Add declarations so this compiles without ObjC.
1619         * loader/NetscapePlugInStreamLoader.h: Ditto.
1620         * loader/ResourceLoader.h: Ditto.
1621
1622 2006-10-29  Darin Adler  <darin@apple.com>
1623
1624         - one last name change -- WebFormState.h to FormState.h
1625         - added more empty placeholder platform-independent files
1626           for currently-Mac-specific loader classes
1627
1628         * loader/FormState.cpp: Updated include.
1629         * loader/FrameLoader.cpp: Updated include.
1630         * loader/mac/FrameLoaderMac.mm: Updated include.
1631
1632         * loader/WebFormState.h: Removed.
1633         * loader/FormState.h: Added.
1634
1635         * loader/DocumentLoader.cpp: Added.
1636         * loader/MainResourceLoader.cpp: Added.
1637         * loader/NetscapePlugInStreamLoader.cpp: Added.
1638         * loader/ResourceLoader.cpp: Added.
1639         * loader/SubresourceLoader.cpp: Added.
1640
1641         * WebCore.xcodeproj/project.pbxproj: Updated for changes above.
1642
1643 2006-10-29  Darin Adler  <darin@apple.com>
1644
1645         - did the do-webcore-rename renames, including a number of changes
1646           to the names of loader files (and WebResourceLoader -> ResourceLoader),
1647           jScript() to scriptProxy(), jScriptEnabled() to javaScriptEnabled(),
1648           and improvements to the names of decoder classes and their source
1649           files (Decoder -> TextResourceDecoder, StreamingTextDecoder -> TextCodec)
1650
1651         * CMakeLists.txt:
1652         * WebCore.exp:
1653         * WebCore.vcproj/WebCore/WebCore.vcproj:
1654         * WebCore.xcodeproj/project.pbxproj:
1655         * WebCoreSources.bkl:
1656         * bindings/js/kjs_binding.cpp:
1657         (KJS::ScriptInterpreter::updateDOMNodeDocument):
1658         * bindings/js/kjs_events.cpp:
1659         (KJS::JSAbstractEventListener::handleEvent):
1660         (KJS::JSLazyEventListener::parseCode):
1661         * bindings/js/kjs_html.cpp:
1662         (KJS::JSHTMLElement::implementsCall):
1663         * bindings/js/kjs_traversal.cpp:
1664         (KJS::JSNodeFilterCondition::acceptNode):
1665         * bindings/js/kjs_window.cpp:
1666         (KJS::Window::interpreter):
1667         (KJS::Window::retrieveWindow):
1668         (KJS::Window::retrieve):
1669         (KJS::ScheduledAction::execute):
1670         * bindings/objc/DOMInternal.mm:
1671         (-[WebScriptObject _initializeScriptDOMNodeImp]):
1672         * bridge/mac/FrameMac.mm:
1673         (WebCore::FrameMac::executionContextForDOM):
1674         (WebCore::FrameMac::bindingRootObject):
1675         (WebCore::FrameMac::windowScriptObject):
1676         (WebCore::FrameMac::windowScriptNPObject):
1677         (WebCore::FrameMac::partClearedInBegin):
1678         * bridge/mac/WebCoreEncodings.mm:
1679         * bridge/mac/WebCoreFrameBridge.mm:
1680         (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]):
1681         (-[WebCoreFrameBridge stringWithData:]):
1682         (-[WebCoreFrameBridge executionContextForView:]):
1683         * bridge/win/FrameWin.cpp:
1684         * dom/Document.cpp:
1685         (WebCore::Document::inputEncoding):
1686         (WebCore::Document::setCharset):
1687         (WebCore::Document::createHTMLEventListener):
1688         (WebCore::Document::setDecoder):
1689         * dom/Document.h:
1690         (WebCore::Document::decoder):
1691         * dom/EventTargetNode.cpp:
1692         (WebCore::EventTargetNode::dispatchGenericEvent):
1693         * html/HTMLParser.cpp:
1694         (WebCore::HTMLParser::noscriptCreateErrorCheck):
1695         (WebCore::HTMLParser::canvasCreateErrorCheck):
1696         (WebCore::HTMLParser::isInline):
1697         * html/HTMLPlugInElement.cpp:
1698         (WebCore::HTMLPlugInElement::createNPObject):
1699         * html/HTMLScriptElement.cpp:
1700         (WebCore::HTMLScriptElement::evaluateScript):
1701         * html/HTMLTokenizer.cpp:
1702         (WebCore::HTMLTokenizer::parseTag):
1703         (WebCore::HTMLTokenizer::processToken):
1704         * ksvg2/misc/SVGDocumentExtensions.cpp:
1705         (WebCore::SVGDocumentExtensions::createSVGEventListener):
1706         * loader/CachedCSSStyleSheet.cpp:
1707         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
1708         (WebCore::CachedCSSStyleSheet::setEncoding):
1709         * loader/CachedCSSStyleSheet.h:
1710         * loader/CachedXBLDocument.cpp:
1711         (WebCore::CachedXBLDocument::CachedXBLDocument):
1712         (WebCore::CachedXBLDocument::setEncoding):
1713         * loader/CachedXBLDocument.h:
1714         * loader/CachedXSLStyleSheet.cpp:
1715         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
1716         (WebCore::CachedXSLStyleSheet::setEncoding):
1717         * loader/CachedXSLStyleSheet.h:
1718         * loader/Decoder.cpp: Removed.
1719         * loader/Decoder.h: Removed.
1720         * loader/FrameLoader.cpp:
1721         * loader/FrameLoader.h:
1722         * loader/FrameLoaderClient.h:
1723         * loader/MainResourceLoader.h: Added.
1724         * loader/NetscapePlugInStreamLoader.h: Added.
1725         * loader/Request.h:
1726         (WebCore::Request::cachedResource):
1727         * loader/ResourceLoader.h: Added.
1728         * loader/SubresourceLoader.h: Added.
1729         * loader/TextResourceDecoder.cpp: Added.
1730         (WebCore::TextResourceDecoder::determineContentType):
1731         (WebCore::TextResourceDecoder::defaultEncoding):
1732         (WebCore::TextResourceDecoder::TextResourceDecoder):
1733         (WebCore::TextResourceDecoder::~TextResourceDecoder):
1734         (WebCore::TextResourceDecoder::setEncoding):
1735         (WebCore::TextResourceDecoder::checkForBOM):
1736         (WebCore::TextResourceDecoder::checkForCSSCharset):
1737         (WebCore::TextResourceDecoder::checkForHeadCharset):
1738         (WebCore::TextResourceDecoder::detectJapaneseEncoding):
1739         (WebCore::TextResourceDecoder::decode):
1740         (WebCore::TextResourceDecoder::flush):
1741         * loader/TextResourceDecoder.h: Added.
1742         * loader/WebDocumentLoader.h: Removed.
1743         * loader/WebLoader.h: Removed.
1744         * loader/WebMainResourceLoader.h: Removed.
1745         * loader/WebNetscapePlugInStreamLoader.h: Removed.
1746         * loader/WebSubresourceLoader.h: Removed.
1747         * loader/loader.cpp:
1748         (WebCore::Loader::servePendingRequests):
1749         (WebCore::Loader::receivedAllData):
1750         (WebCore::Loader::receivedResponse):
1751         (WebCore::Loader::didReceiveData):
1752         (WebCore::Loader::cancelRequests):
1753         (WebCore::Loader::jobForRequest):
1754         * loader/mac/DocumentLoaderMac.mm:
1755         * loader/mac/FormDataStream.m: Added.
1756         * loader/mac/FrameLoaderMac.mm:
1757         (WebCore::FrameLoader::cancelPendingArchiveLoad):
1758         (WebCore::FrameLoader::addPlugInStreamLoader):
1759         (WebCore::FrameLoader::removePlugInStreamLoader):
1760         (WebCore::FrameLoader::addSubresourceLoader):
1761         (WebCore::FrameLoader::removeSubresourceLoader):
1762         (WebCore::FrameLoader::willSendRequest):
1763         (WebCore::FrameLoader::didReceiveAuthenticationChallenge):
1764         (WebCore::FrameLoader::didCancelAuthenticationChallenge):
1765         (WebCore::FrameLoader::didReceiveResponse):
1766         (WebCore::FrameLoader::didReceiveData):
1767         (WebCore::FrameLoader::didFinishLoad):
1768         (WebCore::FrameLoader::didFailToLoad):
1769         (WebCore::FrameLoader::open):
1770         (WebCore::FrameLoader::willUseArchive):
1771         (WebCore::FrameLoader::isArchiveLoadPending):
1772         * loader/mac/ImageDocumentMac.mm:
1773         * loader/mac/LoaderFunctionsMac.mm:
1774         (WebCore::CheckCacheObjectStatus):
1775         * loader/mac/MainResourceLoaderMac.mm:
1776         (WebCore::MainResourceLoader::MainResourceLoader):
1777         (WebCore::MainResourceLoader::releaseDelegate):
1778         (WebCore::MainResourceLoader::didCancel):
1779         (WebCore::MainResourceLoader::addData):
1780         (WebCore::MainResourceLoader::willSendRequest):
1781         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1782         (WebCore::MainResourceLoader::didReceiveData):
1783         (WebCore::MainResourceLoader::didFinishLoading):
1784         (WebCore::MainResourceLoader::setDefersLoading):
1785         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
1786         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
1787         (WebCore::NetscapePlugInStreamLoader::releaseResources):
1788         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
1789         (WebCore::NetscapePlugInStreamLoader::didReceiveData):
1790         (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
1791         (WebCore::NetscapePlugInStreamLoader::didFail):
1792         (WebCore::NetscapePlugInStreamLoader::didCancel):
1793         * loader/mac/ResourceLoaderMac.mm:
1794         (WebCore::ResourceLoader::ResourceLoader):
1795         (WebCore::ResourceLoader::~ResourceLoader):
1796         (WebCore::ResourceLoader::releaseResources):
1797         (WebCore::ResourceLoader::load):
1798         (WebCore::ResourceLoader::setDefersLoading):
1799         (WebCore::ResourceLoader::frameLoader):
1800         (WebCore::ResourceLoader::addData):
1801         (WebCore::ResourceLoader::resourceData):
1802         (WebCore::ResourceLoader::clearResourceData):
1803         (WebCore::ResourceLoader::willSendRequest):
1804         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
1805         (WebCore::ResourceLoader::didCancelAuthenticationChallenge):
1806         (WebCore::ResourceLoader::didReceiveResponse):
1807         (WebCore::ResourceLoader::didReceiveData):
1808         (WebCore::ResourceLoader::willStopBufferingData):
1809         (WebCore::ResourceLoader::didFinishLoading):
1810         (WebCore::ResourceLoader::didFinishLoadingOnePart):
1811         (WebCore::ResourceLoader::didFail):
1812         (WebCore::ResourceLoader::willCacheResponse):
1813         (WebCore::ResourceLoader::didCancel):
1814         (WebCore::ResourceLoader::cancel):
1815         (WebCore::ResourceLoader::setIdentifier):
1816         (WebCore::ResourceLoader::response):
1817         (WebCore::ResourceLoader::inConnectionCallback):
1818         (WebCore::ResourceLoader::cancelledError):
1819         (WebCore::ResourceLoader::receivedCredential):
1820         (WebCore::ResourceLoader::receivedRequestToContinueWithoutCredential):
1821         (WebCore::ResourceLoader::receivedCancellation):
1822         (WebCore::ResourceLoader::delegate):
1823         (WebCore::ResourceLoader::releaseDelegate):
1824         (-[WebCoreResourceLoaderAsDelegate initWithLoader:]):
1825         * loader/mac/SubresourceLoaderMac.mm:
1826         (WebCore::SubresourceLoader::SubresourceLoader):
1827         (WebCore::SubresourceLoader::willSendRequest):
1828         (WebCore::SubresourceLoader::didReceiveResponse):
1829         (WebCore::SubresourceLoader::didReceiveData):
1830         (WebCore::SubresourceLoader::didFinishLoading):
1831         (WebCore::SubresourceLoader::didFail):
1832         (WebCore::SubresourceLoader::didCancel):
1833         * loader/mac/WebFormDataStream.h: Removed.
1834         * loader/mac/WebFormDataStream.m: Removed.
1835         * page/Frame.cpp:
1836         (WebCore::Frame::javaScriptEnabled):
1837         (WebCore::Frame::scriptProxy):
1838         (WebCore::Frame::executeScript):
1839         (WebCore::Frame::write):
1840         (WebCore::Frame::userGestureHint):
1841         (WebCore::Frame::saveInterpreterBuiltins):
1842         (WebCore::Frame::restoreInterpreterBuiltins):
1843         (WebCore::Frame::backslashAsCurrencySymbol):
1844         * page/Frame.h:
1845         * page/FramePrivate.h:
1846         * platform/StreamingTextDecoder.cpp: Removed.
1847         * platform/StreamingTextDecoder.h: Removed.
1848         * platform/StreamingTextDecoderICU.cpp: Removed.
1849         * platform/StreamingTextDecoderICU.h: Removed.
1850         * platform/TextCodec.cpp: Added.
1851         * platform/TextCodec.h: Added.
1852         * platform/TextCodecICU.cpp: Added.
1853         * platform/TextCodecICU.h: Added.
1854         * platform/TextCodecLatin1.h:
1855         * platform/TextCodecUTF16.h:
1856         * platform/TextDecoder.h:
1857         * platform/TextEncoding.cpp:
1858         * platform/TextEncodingRegistry.cpp:
1859         * platform/image-decoders/jpeg/jmorecfg.h:
1860         * platform/mac/StreamingTextDecoderMac.cpp: Removed.
1861         * platform/mac/StreamingTextDecoderMac.h: Removed.
1862         * platform/mac/TextCodecMac.cpp: Added.
1863         * platform/mac/TextCodecMac.h: Added.
1864         * platform/network/ResourceHandleInternal.h:
1865         * platform/network/mac/ResourceHandleMac.mm:
1866         * platform/qt/FrameQt.cpp:
1867         (WebCore::FrameQt::bindingRootObject):
1868         * platform/qt/LoaderFunctionsQt.cpp:
1869         (WebCore::CheckCacheObjectStatus):
1870         * rendering/RenderObject.cpp:
1871         (WebCore::RenderObject::backslashAsCurrencySymbol):
1872         * xml/XSLTProcessor.cpp:
1873         (WebCore::XSLTProcessor::createDocumentFromSource):
1874         * xml/xmlhttprequest.cpp:
1875         (WebCore::XMLHttpRequest::didReceiveData):
1876         * xml/xmlhttprequest.h:
1877
1878 2006-10-29  Darin Adler  <darin@apple.com>
1879
1880         Rubber stamped by Adam (kinda).
1881
1882         - add Mac suffixes and correct filenames inside loader/mac
1883
1884         * WebCore.xcodeproj/project.pbxproj: Updated for changes below.
1885
1886         * loader/mac/FrameLoader.mm: Removed.
1887         * loader/mac/WebDocumentLoader.mm: Removed.
1888         * loader/mac/WebLoader.mm: Removed.
1889         * loader/mac/WebMainResourceLoader.mm: Removed.
1890         * loader/mac/WebNetscapePlugInStreamLoader.mm: Removed.
1891         * loader/mac/WebSubresourceLoader.mm: Removed.
1892
1893         * loader/mac/FrameLoaderMac.mm: Added.
1894         * loader/mac/DocumentLoaderMac.mm: Added.
1895         * loader/mac/ResourceLoaderMac.mm: Added.
1896         * loader/mac/MainResourceLoaderMac.mm: Added.
1897         * loader/mac/WebNetscapePlugInStreamLoaderMac.mm: Added.
1898         * loader/mac/SubresourceLoaderMac.mm: Removed.
1899
1900 2006-10-29  Darin Adler  <darin@apple.com>
1901
1902         Reviewed by Adam.
1903
1904         - moving towards use of FrameLoader cross-platform; get FrameLoader.h
1905           and FrameLoader.cpp mostly ready
1906
1907         * WebCore.xcodeproj/project.pbxproj: Added FrameLoader.cpp and
1908         FormState.cpp. Removed WebFormState.mm.
1909
1910         * loader/FrameLoader.h: Put in lots of #if statements to see if we can
1911         get this header compiling on non-Mac.
1912         * loader/FrameLoader.cpp: Added. Has non-Mac-specific bits of FrameLoader.
1913         * loader/mac/FrameLoader.mm: Moved some non-Mac-specific bits out.
1914
1915         * loader/FrameLoaderClient.h: Added some ifdefs.
1916         * loader/WebDocumentLoader.h: Ditto.
1917         * loader/WebLoader.h: Ditto.
1918         * loader/WebMainResourceLoader.h: Ditto.
1919
1920         * loader/mac/WebDocumentLoader.mm:
1921         (WebCore::DocumentLoader::isLoadingInAPISense):
1922         Rewrote to work without bridge, partly to remove the need for ObjC
1923         bridge type in the header, and also because we're tearing down the bridge.
1924
1925         * loader/mac/WebMainResourceLoader.mm:
1926         (WebCore::MainResourceLoader::MainResourceLoader): Removed unused
1927         m_contentLength and m_bytesReceived.
1928         (WebCore::MainResourceLoader::didReceiveResponse): Ditto.
1929         (WebCore::MainResourceLoader::didReceiveData): Ditto.
1930
1931         * bridge/mac/WebCoreFrameBridge.h: Removed doneProcessingData.
1932         * bridge/mac/WebCoreFrameBridge.mm: Ditto.
1933
1934         * loader/mac/FormState.mm: Removed.
1935         * loader/FormState.cpp: Added.
1936
1937 2006-10-29  Darin Adler  <darin@apple.com>
1938
1939         Rubber stamped by Adam.
1940
1941         - moving towards use of FrameLoader cross-platform; move the headers
1942           for the Mac loader from loader/mac into loader, in preparation for
1943           making them useful on non-Mac
1944
1945         * WebCore.xcodeproj/project.pbxproj:
1946
1947         * loader/mac/FrameLoader.h: Removed.
1948         * loader/mac/WebDocumentLoader.h: Removed.
1949         * loader/mac/WebFormState.h: Removed.
1950         * loader/mac/WebLoader.h: Removed.
1951         * loader/mac/WebMainResourceLoader.h: Removed.
1952         * loader/mac/WebNetscapePlugInStreamLoader.h: Removed.
1953         * loader/mac/WebSubresourceLoader.h: Removed.
1954
1955         * loader/FrameLoader.h: Added.
1956         * loader/WebDocumentLoader.h: Added.
1957         * loader/WebFormState.h: Added.
1958         * loader/WebLoader.h: Added.
1959         * loader/WebMainResourceLoader.h: Added.
1960         * loader/WebNetscapePlugInStreamLoader.h: Added.
1961         * loader/WebSubresourceLoader.h: Added.
1962
1963 2006-10-29  Adam Roben  <aroben@apple.com>
1964
1965         Reviewed by Geoff.
1966
1967         Finish Darin's clean up of the use of __APPLE__ in WebCore, begun in
1968         r17405.
1969
1970         * platform/DeprecatedString.h:
1971
1972 2006-10-29  Beth Dakin  <bdakin@apple.com>
1973
1974         Rubber stamped by Geoff.
1975
1976         This is a followup to my HitTestResult checkin. Most of the 
1977         HitTestResult local variables in the code were named i or info for 
1978         when the class was named NodeInfo. This patch renames all of these 
1979         local variables to result.
1980
1981         * dom/Document.cpp:
1982         (WebCore::Document::prepareMouseEvent):
1983         * html/HTMLAreaElement.cpp:
1984         (WebCore::HTMLAreaElement::mapMouseEvent):
1985         * html/HTMLMapElement.cpp:
1986         (WebCore::HTMLMapElement::mapMouseEvent):
1987         * rendering/EllipsisBox.cpp:
1988         (WebCore::EllipsisBox::nodeAtPoint):
1989         * rendering/EllipsisBox.h:
1990         * rendering/InlineBox.cpp:
1991         (WebCore::InlineBox::nodeAtPoint):
1992         * rendering/InlineFlowBox.cpp:
1993         (WebCore::InlineFlowBox::nodeAtPoint):
1994         * rendering/InlineTextBox.cpp:
1995         (WebCore::InlineTextBox::nodeAtPoint):
1996         * rendering/RenderBlock.cpp:
1997         (WebCore::RenderBlock::isPointInScrollbar):
1998         (WebCore::RenderBlock::nodeAtPoint):
1999         * rendering/RenderBlock.h:
2000         * rendering/RenderBox.cpp:
2001         (WebCore::RenderBox::nodeAtPoint):
2002         * rendering/RenderBox.h:
2003         * rendering/RenderFlow.cpp:
2004         (WebCore::RenderFlow::hitTestLines):
2005         * rendering/RenderFlow.h:
2006         * rendering/RenderForeignObject.cpp:
2007         (WebCore::RenderForeignObject::nodeAtPoint):
2008         * rendering/RenderFrameSet.cpp:
2009         (WebCore::RenderFrameSet::nodeAtPoint):
2010         * rendering/RenderImage.cpp:
2011         (WebCore::RenderImage::nodeAtPoint):
2012         * rendering/RenderInline.cpp:
2013         (WebCore::RenderInline::nodeAtPoint):
2014         * rendering/RenderInline.h:
2015         * rendering/RenderLayer.cpp:
2016         (WebCore::RenderLayer::autoscroll):
2017         (WebCore::RenderLayer::hitTest):
2018         (WebCore::RenderLayer::hitTestLayer):
2019         (WebCore::RenderLayer::updateHoverActiveState):
2020         * rendering/RenderListBox.cpp:
2021         (WebCore::RenderListBox::isPointInScrollbar):
2022         * rendering/RenderObject.cpp:
2023         (WebCore::RenderObject::hitTest):
2024         (WebCore::RenderObject::setInnerNode):
2025         (WebCore::RenderObject::nodeAtPoint):
2026         * rendering/RenderObject.h:
2027         * rendering/RenderPath.cpp:
2028         (WebCore::RenderPath::nodeAtPoint):
2029         * rendering/RenderSVGImage.cpp:
2030         (WebCore::RenderSVGImage::nodeAtPoint):
2031         * rendering/RenderSVGText.cpp:
2032         (WebCore::RenderSVGText::nodeAtPoint):
2033         * rendering/RenderTableRow.cpp:
2034         (WebCore::RenderTableRow::nodeAtPoint):
2035         * rendering/RenderTableRow.h:
2036         * rendering/RenderTableSection.cpp:
2037         (WebCore::RenderTableSection::nodeAtPoint):
2038         * rendering/RenderTableSection.h:
2039         * rendering/RenderTextControl.cpp:
2040         (WebCore::RenderTextControl::nodeAtPoint):
2041         * rendering/RootInlineBox.cpp:
2042         (WebCore::RootInlineBox::nodeAtPoint):
2043         * rendering/RootInlineBox.h:
2044
2045 2006-10-29  Adam Roben  <aroben@apple.com>
2046
2047         More semi-fixes.
2048
2049         * page/Page.cpp: Forgot to wrap the actual definition of
2050         setDefersLoading() in PLATFORM(MAC).
2051         * platform/PlatformWheelEvent.h: Fix up preprocessor directives.
2052
2053 2006-10-29  Adam Roben  <aroben@apple.com>
2054
2055         Build semi-fix.
2056
2057         Move all FrameLoader-related code in Page.{cpp,h} within #if
2058         PLATFORM(MAC), since this class currently only exists on Mac.
2059
2060         * page/Page.cpp:
2061         * page/Page.h:
2062
2063 2006-10-29  Geoffrey Garen  <ggaren@apple.com>
2064
2065         build fix.
2066         
2067         * platform/PlatformString.h:
2068         (WebCore::String::operator NSString*):
2069
2070 2006-10-29  Geoffrey Garen  <ggaren@apple.com>
2071
2072         Rolled out accidental commit.
2073         
2074         * platform/AtomicString.h:
2075         (WebCore::AtomicString::AtomicString):
2076         (WebCore::AtomicString::operator NSString*):
2077
2078 2006-10-29  Geoffrey Garen  <ggaren@apple.com>
2079
2080         RS by Darin.
2081
2082         Rolled out change to map NULL Strings to nil NSStrings because it caused
2083         even more AppKit crashes. Maybe we should remove the NSString * operator
2084         entirely, since its use is not straight-forward, and require callers to
2085         specify explicitly whether they tolerate NULL.
2086         
2087         * platform/AtomicString.h:
2088         * platform/PlatformString.h:
2089         (WebCore::String::operator NSString*):
2090         * platform/mac/TextFieldMac.mm:
2091         (-[NSSearchFieldCell _addStringToRecentSearches:]):
2092
2093 2006-10-29  Darin Adler  <darin@apple.com>
2094
2095         Reviewed by Geoff.
2096
2097         - fixed storage leak showing up on the buildbot
2098
2099         * loader/mac/WebSubresourceLoader.mm: (WebCore::SubresourceLoader::create):
2100         Release the NSURLRequest after passing it to load. Also clean up logic a bit.
2101
2102 2006-10-29  Darin Adler  <darin@apple.com>
2103
2104         Rubber stamped by Adam.
2105
2106         - renamed WebFrameLoaderClient to match the class name inside it
2107
2108         * loader/mac/WebFrameLoaderClient.h: Removed.
2109         * loader/FrameLoaderClient.h: Moved it here.
2110
2111         * WebCore.xcodeproj/project.pbxproj: Updated project.
2112
2113         * bridge/mac/FrameMac.mm: Updated includes.
2114         * bridge/mac/WebCoreFrameBridge.mm: Ditto.
2115         * loader/mac/FrameLoader.mm: Ditto.
2116         * loader/mac/WebLoader.h: Ditto.
2117
2118 2006-10-29  Darin Adler  <darin@apple.com>
2119
2120         Reviewed by Mitz.
2121
2122         - fix crash visible on buildbot and also when running the test
2123           anchor-image-scrolled-x-y.html under libgmalloc
2124
2125         * loader/mac/WebSubresourceLoader.h: Renamed m_loader to m_handle
2126         now that the class is named ResourceHandle.
2127         * loader/mac/WebSubresourceLoader.mm: Renaming, plus:
2128         (WebCore::SubresourceLoader::didFinishLoading): Get the handle into
2129         a local RefPtr before calling finishJobAndHandle, since we might get
2130         cancelled inside that function, so we should not rely on m_handle to
2131         keep the ResourceHandle alive.
2132         (WebCore::SubresourceLoader::didFail): Ditto.
2133         (WebCore::SubresourceLoader::didCancel): Ditto.
2134
2135 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
2136
2137         - build fix
2138
2139         * platform/network/mac/ResourceHandleMac.mm:
2140
2141 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
2142
2143         Rubber stamped by Darin.
2144
2145         - renamed ResourceLoader to ResourceHandle (and same for related classes)
2146
2147         * CMakeLists.txt:
2148         * Projects/gdk/webcore-gdk.bkl:
2149         * WebCore.vcproj/WebCore/WebCore.vcproj:
2150         * WebCore.xcodeproj/project.pbxproj:
2151         * WebCoreSources.bkl:
2152         * bridge/mac/FrameMac.mm:
2153         * bridge/win/FrameWin.cpp:
2154         * dom/XMLTokenizer.cpp:
2155         * loader/Cache.cpp:
2156         * loader/CachedResource.h:
2157         * loader/LoaderFunctions.h:
2158         * loader/icon/IconLoader.cpp:
2159         (IconLoader::startLoading):
2160         (IconLoader::didReceiveData):
2161         (IconLoader::didFinishLoading):
2162         * loader/icon/IconLoader.h:
2163         * loader/loader.cpp:
2164         (WebCore::Loader::servePendingRequests):
2165         (WebCore::Loader::receivedAllData):
2166         (WebCore::Loader::receivedResponse):
2167         (WebCore::Loader::didReceiveData):
2168         (WebCore::Loader::cancelRequests):
2169         (WebCore::Loader::jobForRequest):
2170         * loader/loader.h:
2171         * loader/mac/IconLoaderMac.mm:
2172         (IconLoader::receivedResponse):
2173         * loader/mac/LoaderFunctionsMac.mm:
2174         * loader/mac/WebLoader.h:
2175         * loader/mac/WebSubresourceLoader.h:
2176         * loader/mac/WebSubresourceLoader.mm:
2177         (WebCore::SubresourceLoader::SubresourceLoader):
2178         (WebCore::SubresourceLoader::create):
2179         * platform/gdk/FrameGdk.cpp:
2180         (WebCore::FrameGdkClientDefault::FrameGdkClientDefault):
2181         (WebCore::FrameGdkClientDefault::openURL):
2182         (WebCore::FrameGdkClientDefault::submitForm):
2183         (WebCore::FrameGdkClientDefault::receivedResponse):
2184         (WebCore::FrameGdkClientDefault::didReceiveData):
2185         (WebCore::FrameGdkClientDefault::receivedAllData):
2186         * platform/gdk/FrameGdk.h:
2187         * platform/gdk/TemporaryLinkStubs.cpp:
2188         (WebCore::ServeSynchronousRequest):
2189         (WebCore::ResourceHandle::assembleResponseHeaders):
2190         (WebCore::ResourceHandle::retrieveCharset):
2191         * platform/network/ResourceHandle.cpp: Added.
2192         (WebCore::ResourceHandle::ResourceHandle):
2193         (WebCore::ResourceHandle::create):
2194         (WebCore::ResourceHandle::isErrorPage):
2195         (WebCore::ResourceHandle::error):
2196         (WebCore::ResourceHandle::setError):
2197         (WebCore::ResourceHandle::responseEncoding):
2198         (WebCore::ResourceHandle::responseHTTPHeadersAsString):
2199         (WebCore::ResourceHandle::kill):
2200         (WebCore::ResourceHandle::requestHeaders):
2201         (WebCore::ResourceHandle::url):
2202         (WebCore::ResourceHandle::postData):
2203         (WebCore::ResourceHandle::method):
2204         (WebCore::ResourceHandle::client):
2205         * platform/network/ResourceHandle.h: Added.
2206         (WebCore::ResourceHandle::getInternal):
2207         * platform/network/ResourceHandleClient.h: Added.
2208         (WebCore::ResourceHandleClient::~ResourceHandleClient):
2209         (WebCore::ResourceHandleClient::didReceiveData):
2210         (WebCore::ResourceHandleClient::didFinishLoading):
2211         (WebCore::ResourceHandleClient::receivedRedirect):
2212         (WebCore::ResourceHandleClient::receivedResponse):
2213         (WebCore::ResourceHandleClient::receivedAllData):
2214         * platform/network/ResourceHandleInternal.h: Added.
2215         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2216         * platform/network/ResourceLoader.cpp: Removed.
2217         * platform/network/ResourceLoader.h: Removed.
2218         * platform/network/ResourceLoaderClient.h: Removed.
2219         * platform/network/ResourceLoaderInternal.h: Removed.
2220         * platform/network/cf/ResourceHandleCFNet.cpp: Added.
2221         (WebCore::willSendRequest):
2222         (WebCore::didReceiveResponse):
2223         (WebCore::didReceiveData):
2224         (WebCore::didFinishLoading):
2225         (WebCore::didFail):
2226         (WebCore::willCacheResponse):
2227         (WebCore::didReceiveChallenge):
2228         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2229         (WebCore::ResourceHandle::~ResourceHandle):
2230         (WebCore::ResourceHandle::start):
2231         (WebCore::ResourceHandle::cancel):
2232         * platform/network/cf/ResourceLoaderCFNet.cpp: Removed.
2233         * platform/network/gdk/ResourceHandleCurl.cpp: Added.
2234         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2235         (WebCore::ResourceHandle::~ResourceHandle):
2236         (WebCore::ResourceHandle::start):
2237         (WebCore::ResourceHandle::cancel):
2238         * platform/network/gdk/ResourceHandleManager.cpp: Added.
2239         (WebCore::ResourceHandleManager::ResourceHandleManager):
2240         (WebCore::ResourceHandleManager::get):
2241         (WebCore::ResourceHandleManager::useSimpleTransfer):
2242         (WebCore::writeCallback):
2243         (WebCore::ResourceHandleManager::downloadTimerCallback):
2244         (WebCore::ResourceHandleManager::remove):
2245         (WebCore::ResourceHandleManager::add):
2246         (WebCore::ResourceHandleManager::cancel):
2247         * platform/network/gdk/ResourceHandleManager.h: Added.
2248         * platform/network/gdk/ResourceLoaderCurl.cpp: Removed.
2249         * platform/network/gdk/ResourceLoaderManager.cpp: Removed.
2250         * platform/network/gdk/ResourceLoaderManager.h: Removed.
2251         * platform/network/mac/ResourceHandleMac.mm: Added.
2252         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2253         (WebCore::ResourceHandle::~ResourceHandle):
2254         (WebCore::ResourceHandle::start):
2255         (WebCore::ResourceHandle::assembleResponseHeaders):
2256         (WebCore::ResourceHandle::retrieveResponseEncoding):
2257         (WebCore::ResourceHandle::receivedResponse):
2258         (WebCore::ResourceHandle::cancel):
2259         (WebCore::ResourceHandle::redirectedToURL):
2260         (WebCore::ResourceHandle::addData):
2261         (WebCore::ResourceHandle::finishJobAndHandle):
2262         (WebCore::ResourceHandle::reportError):
2263         * platform/network/mac/ResourceLoaderMac.mm: Removed.
2264         * platform/network/qt/ResourceHandleManager.cpp: Added.
2265         (WebCore::ResourceHandleManager::ResourceHandleManager):
2266         (WebCore::ResourceHandleManager::~ResourceHandleManager):
2267         (WebCore::ResourceHandleManager::self):
2268         (WebCore::ResourceHandleManager::slotData):
2269         (WebCore::ResourceHandleManager::slotMimetype):
2270         (WebCore::ResourceHandleManager::slotResult):
2271         (WebCore::ResourceHandleManager::remove):
2272         (WebCore::ResourceHandleManager::add):
2273         (WebCore::ResourceHandleManager::cancel):
2274         * platform/network/qt/ResourceHandleManager.h: Added.
2275         * platform/network/qt/ResourceHandleQt.cpp: Added.
2276         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2277         (WebCore::ResourceHandle::~ResourceHandle):
2278         (WebCore::ResourceHandle::start):
2279         (WebCore::ResourceHandle::cancel):
2280         (WebCore::ResourceHandle::assembleResponseHeaders):
2281         (WebCore::ResourceHandle::retrieveResponseEncoding):
2282         (WebCore::ResourceHandle::receivedResponse):
2283         (WebCore::ResourceHandle::extractCharsetFromHeaders):
2284         * platform/network/qt/ResourceLoaderManager.cpp: Removed.
2285         * platform/network/qt/ResourceLoaderManager.h: Removed.
2286         * platform/network/qt/ResourceLoaderQt.cpp: Removed.
2287         * platform/network/win/ResourceHandleWin.cpp: Added.
2288         (WebCore::):
2289         (WebCore::addToOutstandingJobs):
2290         (WebCore::lookupResourceHandle):
2291         (WebCore::ResourceHandleWndProc):
2292         (WebCore::initializeOffScreenResourceHandleWindow):
2293         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2294         (WebCore::ResourceHandle::~ResourceHandle):
2295         (WebCore::ResourceHandle::onHandleCreated):
2296         (WebCore::ResourceHandle::onRequestRedirected):
2297         (WebCore::ResourceHandle::onRequestComplete):
2298         (WebCore::ResourceHandle::start):
2299         (WebCore::ResourceHandle::fileLoadTimer):
2300         (WebCore::ResourceHandle::cancel):
2301         (WebCore::ResourceHandle::setHasReceivedResponse):
2302         (WebCore::ResourceHandle::hasReceivedResponse):
2303         * platform/network/win/ResourceHandleWin.h: Added.
2304         * platform/network/win/ResourceLoaderWin.cpp: Removed.
2305         * platform/network/win/ResourceLoaderWin.h: Removed.
2306         * platform/qt/FrameQt.cpp:
2307         * platform/qt/FrameQtClient.cpp:
2308         (WebCore::FrameQtClientDefault::openURL):
2309         (WebCore::FrameQtClientDefault::submitForm):
2310         (WebCore::FrameQtClientDefault::receivedResponse):
2311         (WebCore::FrameQtClientDefault::didReceiveData):
2312         (WebCore::FrameQtClientDefault::receivedAllData):
2313         * platform/qt/FrameQtClient.h:
2314         * platform/win/TemporaryLinkStubs.cpp:
2315         (WebCore::ResourceHandle::assembleResponseHeaders):
2316         (WebCore::ResourceHandle::retrieveResponseEncoding):
2317         (WebCore::ServeSynchronousRequest):
2318         * xml/XSLTProcessor.cpp:
2319         * xml/xmlhttprequest.cpp:
2320         (WebCore::XMLHttpRequest::send):
2321         (WebCore::XMLHttpRequest::didFinishLoading):
2322         (WebCore::XMLHttpRequest::receivedRedirect):
2323         (WebCore::XMLHttpRequest::didReceiveData):
2324         * xml/xmlhttprequest.h:
2325
2326 t2006-10-29  Darin Adler  <darin@apple.com>
2327
2328         Reviewed by Maciej.
2329
2330         - eliminate use of NSArray to carry form data around
2331
2332         * WebCore.exp:
2333         * WebCore.xcodeproj/project.pbxproj:
2334         * bridge/mac/FormDataMac.h: Removed.
2335         * bridge/mac/FormDataMac.mm: Removed.
2336         * bridge/mac/FrameMac.h:
2337         * bridge/mac/WebCoreFrameBridge.h:
2338         * bridge/mac/WebCoreFrameBridge.mm:
2339         * html/HTMLFormElement.cpp:
2340         (WebCore::HTMLFormElement::submit):
2341         * loader/FormData.h:
2342         (WebCore::FormData::isEmpty):
2343         * loader/mac/FrameLoader.h:
2344         * loader/mac/FrameLoader.mm:
2345         (WebCore::FrameLoader::load):
2346         (WebCore::FrameLoader::post):
2347         (WebCore::FrameLoader::loadEmptyDocumentSynchronously):
2348         (WebCore::FrameLoader::loadResourceSynchronously):
2349         * loader/mac/LoaderFunctionsMac.mm:
2350         (WebCore::ServeSynchronousRequest):
2351         * loader/mac/WebFormDataStream.h:
2352         * loader/mac/WebFormDataStream.m:
2353         (WebCore::pairRetain):
2354         (WebCore::pairRelease):
2355         (WebCore::pairEqual):
2356         (WebCore::pairHash):
2357         (WebCore::closeCurrentStream):
2358         (WebCore::scheduleWithPair):
2359         (WebCore::advanceCurrentStream):
2360         (WebCore::openNextStream):
2361         (WebCore::formCreate):
2362         (WebCore::formFinalize):
2363         (WebCore::formOpen):
2364         (WebCore::formRead):
2365         (WebCore::formCanRead):
2366         (WebCore::formClose):
2367         (WebCore::formSchedule):
2368         (WebCore::formUnschedule):
2369         (WebCore::formEventCallback):
2370         (WebCore::setHTTPBody):
2371         * loader/mac/WebSubresourceLoader.h:
2372         * loader/mac/WebSubresourceLoader.mm:
2373         (WebCore::SubresourceLoader::create):
2374         * platform/network/mac/ResourceLoaderMac.mm:
2375
2376 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
2377
2378         Reviewed by Darin.
2379
2380         - create SubresourceLoader with a ResourceRequest, not broken out request bits
2381
2382         * loader/mac/WebSubresourceLoader.h:
2383         * loader/mac/WebSubresourceLoader.mm:
2384         (WebCore::SubresourceLoader::create):
2385         * platform/network/mac/ResourceLoaderMac.mm:
2386         (WebCore::ResourceLoader::start):
2387
2388 2006-10-29  Maciej Stachowiak  <mjs@apple.com>
2389
2390         Reviewed by Darin.
2391
2392         - removed ObjC glue between ResourceLoader and SubresourceLoader, then now talk to each other directly
2393
2394         Removed WebCoreResourceLoader, WebCoreResourceHandle and WebCoreResourceLoaderImp
2395         
2396         * WebCore.xcodeproj/project.pbxproj:
2397         * bridge/mac/WebCoreFrameBridge.h:
2398         * loader/mac/FrameLoader.h:
2399         * loader/mac/FrameLoader.mm:
2400         * loader/mac/LoaderFunctionsMac.mm:
2401         * loader/mac/WebLoader.h:
2402         * loader/mac/WebSubresourceLoader.h:
2403         * loader/mac/WebSubresourceLoader.mm:
2404         (WebCore::SubresourceLoader::SubresourceLoader):
2405         (WebCore::SubresourceLoader::create):
2406         (WebCore::SubresourceLoader::willSendRequest):
2407         (WebCore::SubresourceLoader::didReceiveResponse):
2408         (WebCore::SubresourceLoader::didReceiveData):
2409         (WebCore::SubresourceLoader::didFinishLoading):
2410         (WebCore::SubresourceLoader::didFail):
2411         (WebCore::SubresourceLoader::didCancel):
2412         * platform/network/ResourceLoader.h:
2413         * platform/network/ResourceLoaderInternal.h:
2414         * platform/network/mac/ResourceLoaderMac.mm:
2415         (WebCore::ResourceLoader::~ResourceLoader):
2416         (WebCore::ResourceLoader::start):
2417         (WebCore::ResourceLoader::receivedResponse):
2418         (WebCore::ResourceLoader::cancel):
2419         (WebCore::ResourceLoader::redirectedToURL):
2420         (WebCore::ResourceLoader::addData):
2421         (WebCore::ResourceLoader::finishJobAndHandle):
2422         (WebCore::ResourceLoader::reportError):
2423         * platform/network/mac/WebCoreResourceLoader.h: Removed.
2424         * platform/network/mac/WebCoreResourceLoaderImp.h: Removed.
2425         * platform/network/mac/WebCoreResourceLoaderImp.mm: Removed.
2426
2427 2006-10-28  Darin Adler  <darin@apple.com>
2428
2429         Reviewed by Maciej.
2430
2431         - eliminated the use of Objective-C for the policy decider
2432           machinery, obviating the need for WebPolicyDecider,
2433           WebCoreFrameLoaderAsDelegate, and
2434           WebCoreMainResourceLoaderAsPolicyDelegate
2435
2436         - grouped the state related to policy decisions into a PolicyCheck
2437           class to simplify the FrameLoader logic
2438
2439         - removed six methods from the bridge, reducing FrameLoader's use of
2440           the bridge to a single method
2441
2442         - changed form state to always use HashMap instead of NSDictionary
2443
2444         - moved the defersLoading flag from WebView to WebCore::Page
2445           and changed code to consistently call it defersLoading rather
2446           than defersCallbacks
2447
2448         - updated for rename of PassRefPtr::release to releaseRef
2449         - replaced all uses of __APPLE__ with appropriate PLATFORM defines
2450         - cleaned up kjs_binding.h a bit
2451         - cleaned up FrameMac.h a bit
2452
2453         * loader/mac/WebPolicyDecider.h: Removed.
2454         * loader/mac/WebPolicyDecider.mm: Removed.
2455         * WebCore.xcodeproj/project.pbxproj: Updated for removal.
2456
2457         * WebCore.exp:
2458         * bindings/js/kjs_binding.cpp:
2459         (KJS::ScriptInterpreter::ScriptInterpreter):
2460         (KJS::ScriptInterpreter::wasRunByUserGesture):
2461         * bindings/js/kjs_binding.h:
2462         (KJS::ScriptInterpreter::setCurrentEvent):
2463         (KJS::ScriptInterpreter::setInlineCode):
2464         (KJS::ScriptInterpreter::setProcessingTimerCallback):
2465         (KJS::ScriptInterpreter::getCurrentEvent):
2466         (KJS::cacheDOMObject):
2467         (KJS::DOMExceptionTranslator::DOMExceptionTranslator):
2468         * bridge/AXObjectCache.h:
2469         * bridge/mac/BrowserExtensionMac.mm:
2470         (WebCore::BrowserExtensionMac::createNewWindow):
2471         * bridge/mac/FrameMac.h:
2472         * bridge/mac/FrameMac.mm:
2473         (WebCore::FrameMac::loadRequest):
2474         (WebCore::FrameMac::submitForm):
2475         (WebCore::FrameMac::urlSelected):
2476         (WebCore::FrameMac::userAgent):
2477         (WebCore::FrameMac::passMouseDownEventToWidget):
2478         (WebCore::FrameMac::handleMouseMoveEvent):
2479         * bridge/mac/PageMac.mm:
2480         (WebCore::Page::Page):
2481         * bridge/mac/WebCoreEditCommand.mm:
2482         * bridge/mac/WebCoreFrameBridge.h:
2483         * bridge/mac/WebCoreFrameBridge.mm:
2484         (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
2485         (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
2486         * css/CSSComputedStyleDeclaration.cpp:
2487         (WebCore::):
2488         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2489         * css/CSSPrimitiveValue.cpp:
2490         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2491         (WebCore::CSSPrimitiveValue::cleanup):
2492         (WebCore::CSSPrimitiveValue::cssText):
2493         * css/CSSPrimitiveValue.h:
2494         (WebCore::CSSPrimitiveValue::):
2495         * css/CSSValueList.cpp:
2496         (WebCore::CSSValueList::append):
2497         * css/cssparser.cpp:
2498         (WebCore::CSSParser::parseValue):
2499         * css/cssparser.h:
2500         * css/cssstyleselector.cpp:
2501         (WebCore::CSSStyleSelector::applyProperty):
2502         * dom/Document.cpp:
2503         (WebCore::Document::Document):
2504         (WebCore::Document::updateSelection):
2505         (WebCore::Document::implicitClose):
2506         (WebCore::Document::setFocusNode):
2507         * dom/Document.h:
2508         * editing/ReplaceSelectionCommand.h:
2509         * html/HTMLParser.cpp:
2510         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
2511         * loader/mac/FrameLoader.h:
2512         (WebCore::PolicyCheck::request):
2513         * loader/mac/FrameLoader.mm:
2514         (WebCore::FrameLoader::~FrameLoader):
2515         (WebCore::FrameLoader::safeLoad):
2516         (WebCore::FrameLoader::load):
2517         (WebCore::FrameLoader::open):
2518         (WebCore::FrameLoader::stopLoading):
2519         (WebCore::setAllDefersLoading):
2520         (WebCore::FrameLoader::setDefersLoading):
2521         (WebCore::FrameLoader::willSendRequest):
2522         (WebCore::FrameLoader::receivedMainResourceError):
2523         (WebCore::FrameLoader::callContinueFragmentScrollAfterNavigationPolicy):
2524         (WebCore::FrameLoader::commitProvisionalLoad):
2525         (WebCore::FrameLoader::checkNavigationPolicy):
2526         (WebCore::FrameLoader::checkContentPolicy):
2527         (WebCore::FrameLoader::cancelContentPolicyCheck):
2528         (WebCore::FrameLoader::stopPolicyCheck):
2529         (WebCore::FrameLoader::checkNewWindowPolicy):
2530         (WebCore::FrameLoader::continueAfterNewWindowPolicy):
2531         (WebCore::FrameLoader::continueAfterNavigationPolicy):
2532         (WebCore::FrameLoader::continueAfterContentPolicy):
2533         (WebCore::FrameLoader::continueAfterWillSubmitForm):
2534         (WebCore::FrameLoader::callContinueLoadAfterNavigationPolicy):
2535         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2536         (WebCore::FrameLoader::closeDocument):
2537         (WebCore::FrameLoader::transitionToCommitted):
2538         (WebCore::FrameLoader::callContinueLoadAfterNewWindowPolicy):
2539         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
2540         (WebCore::FrameLoader::post):
2541         (WebCore::FrameLoader::detachFromParent):
2542         (WebCore::FrameLoader::addExtraFieldsToRequest):
2543         (WebCore::PolicyCheck::PolicyCheck):
2544         (WebCore::PolicyCheck::clear):
2545         (WebCore::PolicyCheck::set):
2546         (WebCore::PolicyCheck::call):
2547         (WebCore::PolicyCheck::dropRequest):
2548         (WebCore::FrameLoaderClient::~FrameLoaderClient):
2549         * loader/mac/WebFormState.h:
2550         * loader/mac/WebFormState.mm:
2551         * loader/mac/WebFrameLoaderClient.h:
2552         * loader/mac/WebLoader.h:
2553         (WebCore::WebResourceLoader::defersLoading):
2554         * loader/mac/WebLoader.mm:
2555         (WebCore::WebResourceLoader::WebResourceLoader):
2556         (WebCore::WebResourceLoader::load):
2557         (WebCore::WebResourceLoader::setDefersLoading):
2558         * loader/mac/WebMainResourceLoader.h:
2559         * loader/mac/WebMainResourceLoader.mm:
2560         (WebCore::MainResourceLoader::MainResourceLoader):
2561         (WebCore::MainResourceLoader::releaseDelegate):
2562         (WebCore::MainResourceLoader::didCancel):
2563         (WebCore::MainResourceLoader::callContinueAfterNavigationPolicy):
2564         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
2565         (WebCore::MainResourceLoader::willSendRequest):
2566         (WebCore::MainResourceLoader::callContinueAfterContentPolicy):
2567         (WebCore::MainResourceLoader::continueAfterContentPolicy):
2568         (WebCore::MainResourceLoader::didReceiveResponse):
2569         (WebCore::MainResourceLoader::didReceiveData):
2570         (WebCore::MainResourceLoader::didFinishLoading):
2571         (WebCore::MainResourceLoader::didFail):
2572         (WebCore::MainResourceLoader::loadNow):
2573         (WebCore::MainResourceLoader::load):
2574         (WebCore::MainResourceLoader::setDefersLoading):
2575         * page/Frame.cpp:
2576         (WebCore::Frame::paint):
2577         * page/FrameView.cpp:
2578         (WebCore::FrameView::layout):
2579         * page/FrameView.h:
2580         * page/Page.cpp:
2581         (WebCore::Page::setDefersLoading):
2582         * page/Page.h:
2583         (WebCore::Page::defersLoading):
2584         * platform/DeprecatedString.h:
2585         * platform/DeprecatedStringList.h:
2586         * platform/FontFallbackList.h:
2587         * platform/PlatformKeyboardEvent.h:
2588         * platform/PlatformMouseEvent.h:
2589         * platform/PlatformWheelEvent.h:
2590         * platform/mac/ClipboardMac.h:
2591         * platform/mac/ClipboardMac.mm:
2592         (WebCore::ClipboardMac::setDragImage):
2593         (WebCore::ClipboardMac::dragNSImage):
2594         (WebCore::ClipboardMac::sourceOperation):
2595         (WebCore::ClipboardMac::destinationOperation):
2596         * rendering/RenderObject.cpp:
2597         (WebCore::RenderObject::setStyle):
2598         * rendering/break_lines.cpp:
2599         (WebCore::nextBreakablePosition):
2600
2601 2006-10-28  Adam Roben  <aroben@apple.com>
2602
2603         Reviewed by Maciej.
2604
2605         Fix layout tests that broke after r17399. Mitz discovered that the
2606         failures were caused by HitTestResult::m_point being uninitialized
2607         much of the time. HitTestResults are now always constructed with a
2608         point, and RenderLayer::hitTest and RenderLayer::hitTestLayer use that
2609         point instead of being passed one explicitly.
2610
2611         * WebCore.exp: Change constructor symbol.
2612         * bridge/mac/FrameMac.mm:
2613         (WebCore::FrameMac::eventMayStartDrag): Update to new constructor and
2614         hitTest().
2615         (WebCore::FrameMac::handleMouseMoveEvent): Ditto.
2616         * bridge/mac/WebCoreAXObject.mm:
2617         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
2618         (-[WebCoreAXObject accessibilityHitTest:]): Ditto.
2619         * dom/Document.cpp:
2620         (WebCore::Document::elementFromPoint): Ditto.
2621         (WebCore::Document::prepareMouseEvent): Ditto.
2622         * page/Frame.cpp:
2623         (WebCore::Frame::isPointInsideSelection): Ditto.
2624         (WebCore::Frame::hitTestResultAtPoint): Ditto.
2625         * page/FrameView.cpp:
2626         (WebCore::FrameView::handleWheelEvent): Ditto.
2627         * rendering/HitTestResult.cpp:
2628         (WebCore::HitTestResult::HitTestResult): Initalize m_point with the
2629         passed point.
2630         * rendering/HitTestResult.h: Update constructor declaration.
2631         * rendering/RenderLayer.cpp:
2632         (WebCore::RenderLayer::autoscroll): Update to new constructor and
2633         hitTest().
2634         (WebCore::RenderLayer::hitTest): Use the IntPoint stored in the
2635         HitTestResult instead of being passed one.
2636         (WebCore::RenderLayer::hitTestLayer): Ditto.
2637         * rendering/RenderLayer.h: Update declarations.
2638
2639 2006-10-28  Nikolas Zimmermann  <zimmermann@kde.org>
2640
2641         Reviewed by Anders.
2642
2643         Fix Qt/Linux build.
2644
2645         * CMakeLists.txt:
2646         * platform/qt/FrameQtClient.cpp:
2647         (WebCore::numRequests):
2648         (WebCore::FrameQtClientDefault::numPendingOrLoadingRequests):
2649         * platform/qt/PopupMenuQt.cpp:
2650         (WebCore::PopupMenu::updateFromElement):
2651
2652 2006-10-28  David Carson  <dacarson@gmail.com>
2653
2654         Tweaked by Sam. Reviewed by Brady.
2655
2656         Fix for: http://bugs.webkit.org/show_bug.cgi?id=11437
2657         Initialize m_modifyBiasSet to false, as it sometimes gets 
2658         used before it has been initalized.
2659
2660         * editing/SelectionController.cpp:
2661         (WebCore::SelectionController::SelectionController):
2662
2663 2006-10-28  Beth Dakin  <bdakin@apple.com>
2664
2665         Reviewed by Darin.
2666
2667         This is the WebCore half of pushing elementAtPoint and the backend 
2668         of WebElementDictionary into WebCore. Most of the changes below are 
2669         to accommodate one of the following:
2670                 
2671         -NodeInfo is now a stand-alone class called HitTestResult. 
2672                 Previously it was defined in RenderObject.h, but not for 
2673                 any particular reason. The WebElementDictionary 
2674                 functionality that was pushed into WebCore has been pushed 
2675                 specifically into the this class. In fact, 
2676                 WebElementDictionary now keeps a HitTestResult as a member 
2677                 varibale.
2678                 
2679         -The enumeration AccessPolicy is now called 
2680                 ClipboardAccessPolicy and is defined in its own header. It 
2681                 was previously defined in ClipboardMac.h, but is now 
2682                 defined independently to avoid including ClipboardMac.h 
2683                 from within FrameMac.h since FrameMac.h is now included in 
2684                 WebElementDictionary.m in WebKit.
2685                 
2686         -Element now has a virtual target() for the sake of 
2687                 NodeInfo::targetFrame() 
2688
2689         * WebCore.exp: Several WebCore functions are newly called from 
2690         WebKit, so they have been added here. 
2691         * WebCore.xcodeproj/project.pbxproj:
2692         * bindings/objc/DOM.mm: Must include Image.h because of adjustments 
2693         to ClipboardMac.
2694         * bridge/mac/FrameMac.h: Adjust to HitTestResult changes.
2695         * bridge/mac/FrameMac.mm:
2696         (WebCore::FrameMac::freeClipboard): Adjust to ClipboardAccessPolicy 
2697         and HitTestResult changes.
2698         (WebCore::FrameMac::eventMayStartDrag): Same.
2699         (WebCore::FrameMac::handleMouseMoveEvent): Same.
2700         (WebCore::FrameMac::dispatchCPPEvent): Same.
2701         (WebCore::FrameMac::mayDHTMLCut): Same.
2702         (WebCore::FrameMac::mayDHTMLCopy): Same.
2703         (WebCore::FrameMac::mayDHTMLPaste): Same.
2704         (WebCore::FrameMac::tryDHTMLCut): Same
2705         (WebCore::FrameMac::tryDHTMLCopy): Same.
2706         (WebCore::FrameMac::tryDHTMLPaste): Same.
2707         * bridge/mac/WebCoreAXObject.mm:
2708         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Adjust to 
2709         HitTestResult changes.
2710         (-[WebCoreAXObject accessibilityHitTest:]): Same.
2711         * bridge/mac/WebCoreFrameBridge.h: Same.
2712         * bridge/mac/WebCoreFrameBridge.mm:
2713         (-[WebCoreFrameBridge dragOperationForDraggingInfo:]): Adjust for 
2714         ClipboardAccessPolicy changes.
2715         (-[WebCoreFrameBridge dragExitedWithDraggingInfo:]): Same.
2716         (-[WebCoreFrameBridge concludeDragForDraggingInfo:]): Same.
2717         * dom/Document.cpp:
2718         (WebCore::Document::elementFromPoint): Adjust for HitTestResult 
2719         changes.
2720         (WebCore::Document::prepareMouseEvent): Same.
2721         * dom/Element.h:
2722         (WebCore::Element::target): Now has a virtual target()
2723         * html/HTMLAnchorElement.h: Same.
2724         * html/HTMLAreaElement.cpp:
2725         (WebCore::HTMLAreaElement::mapMouseEvent): Adjust for HitTestResult 
2726         changes.
2727         * html/HTMLAreaElement.h: Virtual target()
2728         * html/HTMLBaseElement.h:
2729         (WebCore::HTMLBaseElement::target): Same.
2730         * html/HTMLFormElement.h: Same.
2731         * html/HTMLLinkElement.h: Same.
2732         * html/HTMLMapElement.cpp:
2733         (WebCore::HTMLMapElement::mapMouseEvent): Adjust for HitTestResult 
2734         changes.
2735         * html/HTMLMapElement.h: Same.
2736         * page/Frame.cpp:
2737         (WebCore::Frame::isPointInsideSelection): Same.
2738         (WebCore::Frame::hitTestResultAtPoint): Same. 
2739         * page/Frame.h: Same.
2740         * page/FrameView.cpp:
2741         (WebCore::FrameView::handleWheelEvent): Same.
2742         * platform/mac/ClipboardAccessPolicy.h: Added.
2743         (WebCore::):
2744         * platform/mac/ClipboardMac.h: Remove definition of AccessPolicy, 
2745         include ClipboardAccessPolicy.h, and rename AccessPolicy to 
2746         ClipboardAccessPolicy.
2747         * platform/mac/ClipboardMac.mm: Rename ClipboardAccessPolicy.
2748         (WebCore::ClipboardMac::ClipboardMac):
2749         (WebCore::ClipboardMac::setAccessPolicy):
2750         (WebCore::ClipboardMac::clearData):
2751         (WebCore::ClipboardMac::clearAllData):
2752         (WebCore::ClipboardMac::getData):
2753         (WebCore::ClipboardMac::setData):
2754         (WebCore::ClipboardMac::types):
2755         (WebCore::ClipboardMac::setDragImage):
2756         (WebCore::ClipboardMac::setDropEffect):
2757         (WebCore::ClipboardMac::setEffectAllowed):
2758         * rendering/EllipsisBox.cpp:
2759         (WebCore::EllipsisBox::nodeAtPoint): Adjust for HitTestResult 
2760         changes.
2761         * rendering/EllipsisBox.h:
2762         * rendering/HitTestResult.cpp: Added.
2763         (WebCore::HitTestResult::HitTestResult):
2764         (WebCore::HitTestResult::~HitTestResult):
2765         (WebCore::HitTestResult::operator=):
2766         (WebCore::HitTestResult::setInnerNode):
2767         (WebCore::HitTestResult::setInnerNonSharedNode):
2768         (WebCore::HitTestResult::setURLElement):
2769         (WebCore::HitTestResult::setScrollbar):
2770         (WebCore::HitTestResult::targetFrame):
2771         (WebCore::HitTestResult::boundingBox):
2772         (WebCore::HitTestResult::isSelected):
2773         (WebCore::HitTestResult::title):
2774         * rendering/HitTestResult.h: Added.
2775         (WebCore::HitTestResult::readonly):
2776         (WebCore::HitTestResult::active):
2777         (WebCore::HitTestResult::mouseMove):
2778         (WebCore::HitTestResult::innerNode):
2779         (WebCore::HitTestResult::innerNonSharedNode):
2780         (WebCore::HitTestResult::point):
2781         (WebCore::HitTestResult::URLElement):
2782         (WebCore::HitTestResult::scrollbar):
2783         (WebCore::HitTestResult::setPoint):
2784         (WebCore::HitTestResult::setReadonly):
2785         (WebCore::HitTestResult::setActive):
2786         (WebCore::HitTestResult::setMouseMove):
2787         * rendering/InlineBox.cpp:
2788         (WebCore::InlineBox::nodeAtPoint): Adjust to HitTestResult changes.
2789         * rendering/InlineBox.h: Same.
2790         * rendering/InlineFlowBox.cpp:
2791         (WebCore::InlineFlowBox::nodeAtPoint): Same.
2792         * rendering/InlineFlowBox.h: Same.
2793         * rendering/InlineTextBox.cpp: 
2794         (WebCore::InlineTextBox::nodeAtPoint): Same.
2795         * rendering/InlineTextBox.h: Same.
2796         * rendering/RenderBlock.cpp:
2797         (WebCore::RenderBlock::isPointInScrollbar): Same.
2798         (WebCore::RenderBlock::nodeAtPoint): Same.
2799         * rendering/RenderBlock.h: Same.
2800         * rendering/RenderBox.cpp:
2801         (WebCore::RenderBox::nodeAtPoint): Same.
2802         * rendering/RenderBox.h: Same.
2803         * rendering/RenderFlow.cpp:
2804         (WebCore::RenderFlow::hitTestLines): Same.
2805         * rendering/RenderFlow.h: Same.
2806         * rendering/RenderForeignObject.cpp:
2807         (WebCore::RenderForeignObject::nodeAtPoint): Same.
2808         * rendering/RenderForeignObject.h: Same.
2809         * rendering/RenderFrameSet.cpp:
2810         (WebCore::RenderFrameSet::nodeAtPoint): Same.
2811         * rendering/RenderFrameSet.h: Same.
2812         * rendering/RenderImage.cpp:
2813         (WebCore::RenderImage::nodeAtPoint): Same.
2814         * rendering/RenderImage.h: Same.
2815         * rendering/RenderInline.cpp:
2816         (WebCore::RenderInline::nodeAtPoint): Same.
2817         * rendering/RenderInline.h: Same.
2818         * rendering/RenderLayer.cpp:
2819         (WebCore::RenderLayer::autoscroll): Same.
2820         (WebCore::RenderLayer::hitTest): Same.
2821         (WebCore::RenderLayer::hitTestLayer): Same.
2822         (WebCore::RenderLayer::updateHoverActiveState): Same.
2823         * rendering/RenderLayer.h: Same.
2824         * rendering/RenderListBox.cpp:
2825         (WebCore::RenderListBox::isPointInScrollbar): Same.
2826         * rendering/RenderListBox.h: Same.
2827         * rendering/RenderObject.cpp:
2828         (WebCore::RenderObject::hitTest): Same.
2829         (WebCore::RenderObject::setInnerNode): Same.
2830         (WebCore::RenderObject::nodeAtPoint): Same.
2831         * rendering/RenderObject.h: Remove NodeInfo class and forward 
2832         declare HitTestResult.
2833         * rendering/RenderPath.cpp:
2834         (WebCore::RenderPath::nodeAtPoint): Adjust to HitTestResult 
2835         changes.
2836         * rendering/RenderPath.h: Same.
2837         * rendering/RenderSVGImage.cpp:
2838         (WebCore::RenderSVGImage::nodeAtPoint): Same.
2839         * rendering/RenderSVGImage.h: Same
2840         * rendering/RenderSVGText.cpp:
2841         (WebCore::RenderSVGText::nodeAtPoint): Same.
2842         * rendering/RenderSVGText.h: Same.
2843         * rendering/RenderTableRow.cpp:
2844         (WebCore::RenderTableRow::nodeAtPoint): Same.
2845         * rendering/RenderTableRow.h: Same.
2846         * rendering/RenderTableSection.cpp:
2847         (WebCore::RenderTableSection::nodeAtPoint): Same.
2848         * rendering/RenderTableSection.h: Same.
2849         * rendering/RenderText.h: Same.
2850         (WebCore::RenderText::nodeAtPoint): Same.
2851         * rendering/RenderTextControl.cpp:
2852         (WebCore::RenderTextControl::nodeAtPoint): Same.
2853         * rendering/RenderTextControl.h: Same.
2854         * rendering/RootInlineBox.cpp:
2855         (WebCore::RootInlineBox::nodeAtPoint): Same.
2856         * rendering/RootInlineBox.h: Same.
2857
2858 2006-10-27  Maciej Stachowiak  <mjs@apple.com>
2859
2860         Reviewed by Anders.
2861
2862         - reverted fix for http://bugs.webkit.org/show_bug.cgi?id=11212, later we will address the performance
2863         impact of fixing it again.
2864
2865         * bridge/mac/FrameMac.mm:
2866         (WebCore::FrameMac::clear):
2867
2868 2006-10-27  Maciej Stachowiak  <mjs@apple.com>
2869
2870         Reviewed by John & Adam.
2871
2872         - assorted speedups to fix perf regression from fixing correctness regression
2873
2874         * WebCore.exp: exported new methods.
2875         * WebCore.xcodeproj/project.pbxproj: Added CachedResourceMac.mm
2876         * bridge/mac/WebCoreFrameBridge.h:
2877         * bridge/mac/WebCoreFrameBridge.mm:
2878         * loader/CachedResource.cpp: Removed now obsolete getCFURL.
2879         * loader/CachedResource.h:
2880         * loader/mac/CachedResourceMac.mm: Added.
2881         (WebCore::CachedResource::getNSURLRequest): New method; the NSURLRequest is
2882         now cached in the CachedObject.
2883         * loader/mac/FrameLoader.h:
2884         * loader/mac/FrameLoader.mm:
2885         (WebCore::FrameLoader::loadedResourceFromMemoryCache): New method - lets
2886         the WebKit side do faster dispatch for clients that implement the fast path delegate. 
2887         * loader/mac/LoaderFunctionsMac.mm:
2888         (WebCore::CheckCacheObjectStatus): Instead of calling several FrameLoader methods,
2889         just call loadedResourceFromMemoryCache.
2890         * loader/mac/WebFrameLoaderClient.h:
2891
2892 2006-10-27  Oliver Hunt  <oliver@apple.com>
2893
2894         Reviewed by Maciej.
2895
2896         build fix
2897
2898         * dom/Document.cpp:
2899         (WebCore::Document::referrer):
2900
2901 2006-10-27  Geoffrey Garen  <ggaren@apple.com>
2902
2903         Reviewed by Maciej.
2904
2905         Moved some WebCoreFrameBridge functions into FrameLoader.
2906         
2907         I had to make FrameLoader.h capable of compiling in C++-only source files
2908         by adding some forward declarations and __OBJC__ #ifdefs.
2909
2910         * WebCore.exp:
2911         * bridge/mac/FrameMac.h:
2912         * bridge/mac/FrameMac.mm:
2913         (WebCore::FrameMac::createEmptyDocument):
2914         (WebCore::FrameMac::tokenizerProcessedData):
2915         * bridge/mac/WebCoreFrameBridge.h:
2916         * bridge/mac/WebCoreFrameBridge.mm:
2917         * dom/Document.cpp:
2918         (WebCore::Document::processHttpEquiv):
2919         (WebCore::Document::referrer):
2920         * loader/LoaderFunctions.h:
2921         * loader/mac/FrameLoader.h:
2922         * loader/mac/FrameLoader.mm:
2923         (WebCore::numRequests):
2924         (WebCore::FrameLoader::numPendingOrLoadingRequests):
2925         (WebCore::FrameLoader::isReloading):
2926         (WebCore::FrameLoader::referrer):
2927         (WebCore::FrameLoader::loadEmptyDocumentSynchronously):
2928         (WebCore::FrameLoader::startLoadingResource):
2929         * loader/mac/LoaderFunctionsMac.mm:
2930         (WebCore::CheckIfReloading):
2931         * page/Frame.h:
2932         * page/FrameTree.cpp:
2933         (WebCore::FrameTree::isDescendantOf):
2934         (WebCore::FrameTree::traverseNext):
2935         * page/FrameTree.h:
2936         * platform/network/mac/ResourceLoaderMac.mm:
2937         (WebCore::ResourceLoader::start):
2938
2939 2006-10-27  Timothy Hatcher  <timothy@apple.com>
2940
2941         Reviewed by Darin.
2942
2943         <rdar://problem/4478625> HTML Editing: Basic table editing and culling
2944
2945         Expanded the Deletion UI to lists, positioned block element and block elementss with borders.
2946
2947         * editing/DeleteButtonController.cpp:
2948         (WebCore::isDeletableElement):
2949         (WebCore::enclosingDeletableElement):
2950         (WebCore::DeleteButtonController::respondToChangedSelection):
2951
2952 2006-10-27  John Sullivan  <sullivan@apple.com>
2953
2954         Reviewed by Kevin Decker
2955         
2956         Some more grammar-checking plumbing. No additional grammar jokes will have been made by the time
2957         you haven't not finished reading this.
2958
2959         * rendering/InlineTextBox.h:
2960         * rendering/InlineTextBox.cpp:
2961         (WebCore::InlineTextBox::paint):
2962         Updated for changed signature of paintDocumentMarkers, which causes grammar markers to be
2963         considered also.
2964         (WebCore::InlineTextBox::paintDocumentMarkers):
2965         Renamed from paintAllMarkersOfType; now takes a bool for whether background or foreground
2966         markers should be painted, instead of a marker type. This avoids walking the collection of
2967         markers multiple times back to back. Now handles grammar markers.
2968
2969 2006-10-27  Timothy Hatcher  <timothy@apple.com>
2970
2971         Reviewed by Beth.
2972
2973         Renamed Copy Files to Copy Generated Headers.
2974         Copy 4 DOM*Internal.h headers.
2975
2976         * WebCore.xcodeproj/project.pbxproj:
2977         * bindings/scripts/CodeGeneratorObjC.pm:
2978
2979 2006-10-27  John Sullivan  <sullivan@apple.com>
2980
2981         Reviewed by Anders
2982
2983         * WebCore.exp:
2984         exported symbol for FrameMac->advanceToNextSpelling()
2985         
2986         * bridge/mac/WebCoreFrameBridge.h:
2987         * bridge/mac/WebCoreFrameBridge.mm:
2988         removed advanceToNextMisspelling callers. Clients in WebKit must now call FrameMac directly.
2989
2990 2006-10-27  Justin Garcia  <justin.garcia@apple.com>
2991
2992         Reviewed by harrison
2993         
2994         <http://bugs.webkit.org/show_bug.cgi?id=11423>
2995         REGRESSION: First newline missing from textarea's value
2996         
2997         The regression is that foo, return, bar in a textarea serializes as 'foobar'.
2998         
2999         Before my change in r17223, return (an InsertLineBreak) would insert a '\n' 
3000         (the line break) then a br to prevent the '\n' from collapsing, since the 
3001         insertion is being done at the end of a block (the textarea's shadow div).  Then, 
3002         inserting "bar" would displace the br, and "foo\nbar" would serialize as "foo\nbar".  
3003         After my change in r17223, InsertLineBreak would insert a br then a '\n' (reversed 
3004         the order).  Then inserting "bar" would displace the '\n' and "foo"<br>"bar" would 
3005         serialize as "foobar" because when serializing RenderTextControl intentionally asks 
3006         textContent to not convert brs to newlines.  It seems to think that the only brs in 
3007         the shadow div will be placeholders or collapsed.
3008         
3009         We could remove this assumption, but, for consistancy's sake, I changed InsertLineBreak 
3010         to insert two '\n's when at the end of a block in white-space:pre text.  This alone 
3011         would have fixed the bug, but introduced a new one, because foo, return, bar would 
3012         produce "foo\nbar\n" which would serialize as "foo\nbar\n" (even though the second 
3013         '\n' is collapsed, because of 9661).  So, then I changed placeholder displacement to 
3014         displace a '\n' if it's acting as a placeholder.  A "placeholder" is now defined as 
3015         a br or '\n' that will collapse (become superfluous) when content is inserted just 
3016         before it.
3017         
3018         * editing/CompositeEditCommand.cpp:
3019         (WebCore::CompositeEditCommand::removePlaceholderAt): Renamed.  Remove
3020         a br or '\n' if content inserted just before it will cause it to collapse.
3021         * editing/CompositeEditCommand.h:
3022         * editing/InsertLineBreakCommand.cpp:
3023         (WebCore::InsertLineBreakCommand::doApply): Insert the same type of node
3024         to prevent a collapse as was used for the line break.  Fixed comments.
3025         * editing/InsertTextCommand.cpp:
3026         (WebCore::InsertTextCommand::input): Call the renamed function.
3027         
3028 2006-10-27  Geoffrey Garen  <ggaren@apple.com>
3029
3030         Reviewed by Brady.
3031
3032         Fixed semantic inaccuracy in String::operator NSString *(), where a NULL
3033         String became an empty NSString *, instead of nil. This will become important
3034         as we start using this conversion more.
3035         
3036         Added work-around for AppKit crash that semantic accuracy revealed.
3037         
3038         No testcase because I don't think there's a way to reflect this change
3039         in a webpage yet.
3040
3041         * platform/PlatformString.h:
3042         (WebCore::String::operator NSString*):
3043         * platform/mac/TextFieldMac.mm:
3044         (-[NSSearchFieldCell _addStringToRecentSearches:]):
3045
3046 2006-10-27  David Harrison  <harrison@apple.com>
3047
3048         Reviewed by Maciej,
3049
3050         <rdar://problem/4003820> Expose blockquotes in AXAttributedStringForTextMarkerRange
3051
3052         * bridge/mac/WebCoreAXObject.mm:
3053         (blockquoteLevel):
3054         Calculate and return the blockquote level of the element.
3055         
3056         (AXAttributeStringSetBlockquoteLevel):
3057         Add, if non-zero, or clear the block quote level attribute.
3058         
3059         (AXAttributedStringAppendText):
3060         Send AXAttributeStringSetBlockquoteLevel.
3061
3062 2006-10-27  Darin Adler  <darin@apple.com>
3063
3064         - fix one error in the Qt build
3065
3066         * platform/qt/GraphicsContextQt.cpp:
3067         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
3068         Updated.
3069
3070 2006-10-27  Darin Adler  <darin@apple.com>
3071
3072         Reviewed by Maciej.
3073
3074         * WebCore.exp: Export more symbols needed by WebKit.
3075
3076 2006-10-26  Geoffrey Garen  <ggaren@apple.com>
3077
3078         Reviewed by the Baroness Esmeralda Von Scratch N' Purr XIV.
3079
3080         Fixed layout test crash. Oops.
3081         
3082         * loader/mac/WebDocumentLoader.mm:
3083         (WebCore::canonicalizedTitle):
3084
3085 2006-10-26  John Sullivan  <sullivan@apple.com>
3086
3087         Reviewed by Brady
3088         
3089         - fixed <rdar://problem/4806064> Repro crash in FrameMac::loadRequest following iTunes music store link from salon.com
3090         
3091         This restores some of the nil-handling that was implicit before some of the code was converted from
3092         Objective-C to C++.
3093
3094         * bridge/mac/FrameMac.mm:
3095         (WebCore::FrameMac::loadRequest):
3096         handle nil FrameMac
3097         
3098         * bridge/mac/WebCoreFrameBridge.mm:
3099         (-[WebCoreFrameBridge canTargetLoadInFrame:]):
3100         handle nil Frame
3101
3102 2006-10-26  Geoffrey Garen  <ggaren@apple.com>
3103
3104         Reviewed by Darin, Maciej.
3105
3106         Removed many uses of NSString *.
3107         Moved a few methods from WebCoreFrameBridge to FrameLoader, replacing 
3108         stringByCollapsingNonPrintingCharacters with a c++ equivalent.
3109         
3110         PLT says no performance regression.
3111         
3112         * WebCore.exp:
3113         * bridge/mac/WebCoreFrameBridge.mm:
3114         (-[WebCoreFrameBridge receivedData:textEncodingName:]):
3115         * loader/mac/FrameLoader.h:
3116         * loader/mac/FrameLoader.mm:
3117         (WebCore::FrameLoader::setupForReplaceByMIMEType):
3118         (WebCore::FrameLoader::load):
3119         (WebCore::FrameLoader::canShowMIMEType):
3120         (WebCore::FrameLoader::representationExistsForURLScheme):
3121         (WebCore::FrameLoader::generatedMIMETypeForURLScheme):
3122         (WebCore::FrameLoader::checkContentPolicy):
3123         (WebCore::FrameLoader::reloadAllowingStaleData):
3124         (WebCore::FrameLoader::invalidatePendingPolicyDecision):
3125         (WebCore::FrameLoader::checkNewWindowPolicy):
3126         (WebCore::FrameLoader::continueAfterNewWindowPolicy):
3127         (WebCore::FrameLoader::transitionToCommitted):
3128         (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
3129         (WebCore::FrameLoader::post):
3130         * loader/mac/WebDocumentLoader.h:
3131         * loader/mac/WebDocumentLoader.mm:
3132         (WebCore::DocumentLoader::doesProgressiveLoad):
3133         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
3134         (WebCore::DocumentLoader::title):
3135         (WebCore::DocumentLoader::setOverrideEncoding):
3136         (WebCore::DocumentLoader::overrideEncoding):
3137         (WebCore::DocumentLoader::setTitle):
3138         * loader/mac/WebFrameLoaderClient.h:
3139         * loader/mac/WebMainResourceLoader.mm:
3140         (WebCore::MainResourceLoader::continueAfterContentPolicy):
3141
3142 2006-10-26  Timothy Hatcher  <timothy@apple.com>
3143
3144         Reviewed by Adam.
3145
3146         <rdar://problem/4796941> Table deletion outline is misplaced at nytimes.com
3147
3148         The main table at nytimes.com has a fixed width of 874px, but the table ends
3149         up overflowing to 963px. We now use overflowWidth() and overflowHeight() to correct
3150         this. The other bug was a missing top and left of 0px on the container element,
3151         causing the deletion UI to sometimes be offset below the table.
3152
3153         Now check for the element's renderer at the beginning of show() and
3154         return early if it is null.
3155
3156         * editing/DeleteButtonController.cpp:
3157         (WebCore::DeleteButtonController::updateOutlineStyle):
3158         (WebCore::DeleteButtonController::show):
3159
3160 2006-10-26  Anders Carlsson  <acarlsson@apple.com>
3161
3162         Build fix.
3163
3164         * html/CanvasRenderingContext2D.cpp:
3165         Include MathExtras.h
3166         
3167 2006-10-26  John Sullivan  <sullivan@apple.com>
3168
3169         Reviewed by Anders.
3170
3171         Some changes to support new grammar checking code in WebKit.
3172
3173         * WebCore.exp:
3174         added mangled symbol for Document->removeMarkers() so I can call it from WebKit
3175         
3176         * WebCore.xcodeproj/project.pbxproj:
3177         Made Document.h and DocumentMarker.h private so I can include them from WebKit.
3178         Made HTMLCollection.h private because Document.h uses it.
3179         
3180         * bridge/mac/WebCoreFrameBridge.h:
3181         * bridge/mac/WebCoreFrameBridge.mm:
3182         removed unmarkAllMisspellings(); WebKit now calls through to the Document directly
3183
3184 2006-10-26  Anders Carlsson  <acarlsson@apple.com>
3185
3186         Reviewed by Brady.
3187
3188         Add reverseFind to String and use it instead of findRev.
3189         Use CString instead of DeprecatedCString in one place.
3190         
3191         * html/HTMLFormElement.cpp:
3192         (WebCore::HTMLFormElement::formData):
3193         * ksvg2/svg/SVGURIReference.cpp:
3194         (WebCore::SVGURIReference::getTarget):
3195         * loader/Decoder.cpp:
3196         (WebCore::Decoder::checkForCSSCharset):
3197         * platform/PlatformString.h:
3198         (WebCore::String::reverseFind):
3199         * platform/StringImpl.cpp:
3200         (WebCore::StringImpl::reverseFind):
3201         * platform/StringImpl.h:
3202
3203 2006-10-26  John Sullivan  <sullivan@apple.com>
3204
3205         Reviewed by Darin
3206         
3207         More plumbing for grammar checking. Still no grammars is checked.
3208
3209         * dom/DocumentMarker.h:
3210         (WebCore::DocumentMarker::):
3211         added Grammar to enum of marker types; removed explicit enum values; removed unnecessary "enum"
3212         
3213         * platform/GraphicsContext.h:
3214         renamed method drawLineForMisspelling to drawLineForMisspellingOrBadGrammar;
3215         now takes a bool parameter for whether it represents bad grammar or a misspelling 
3216         
3217         * platform/mac/GraphicsContextMac.mm:
3218         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
3219         Renamed from drawLineForMisspelling; uses green dot instead of red dot for grammar case. Changed
3220         an existing "assert" to "ASSERT".
3221         
3222         * rendering/InlineTextBox.h:
3223         renamed function paintSpellingMarker to paintSpellingOrGrammarMarker;
3224
3225         * rendering/InlineTextBox.cpp:
3226         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
3227         Renamed from paintSpellingMarker; now takes a bool parameter for whether it represents
3228         bad grammar or a misspelling
3229         (WebCore::InlineTextBox::paintAllMarkersOfType):
3230         now handles markers of type Grammar
3231
3232 === Safari-521.29 ===
3233         
3234 2006-10-26  Sam Weinig  <sam.weinig@gmail.com>
3235
3236         Reviewed by Mitz.
3237
3238         Fix for http://bugs.webkit.org/show_bug.cgi?id=11424
3239         Cleanup rendering code
3240
3241         - Assorted code cleanup.
3242
3243         * rendering/AutoTableLayout.cpp:
3244         * rendering/AutoTableLayout.h:
3245         (WebCore::AutoTableLayout::totalPercent):
3246         * rendering/CounterListItem.h:
3247         * rendering/CounterNode.cpp:
3248         * rendering/CounterNode.h:
3249         (WebCore::CounterNode::~CounterNode):
3250         (WebCore::CounterNode::isReset):
3251         * rendering/CounterResetNode.cpp:
3252         * rendering/CounterResetNode.h:
3253         * rendering/DataRef.h:
3254         (WebCore::DataRef::DataRef):
3255         * rendering/DeprecatedRenderSelect.h:
3256         * rendering/DeprecatedSlider.cpp:
3257         * rendering/DeprecatedSlider.h:
3258         * rendering/EllipsisBox.cpp:
3259         * rendering/EllipsisBox.h:
3260         (WebCore::EllipsisBox::EllipsisBox):
3261         * rendering/FixedTableLayout.cpp:
3262         * rendering/FixedTableLayout.h:
3263         * rendering/GapRects.h:
3264         * rendering/InlineBox.cpp:
3265         * rendering/InlineBox.h:
3266         (WebCore::InlineBox::InlineBox):
3267         (WebCore::InlineBox::setConstructed):
3268         (WebCore::InlineBox::clearTruncation):
3269         (WebCore::InlineBox::markDirty):
3270         * rendering/InlineFlowBox.cpp:
3271         * rendering/InlineFlowBox.h:
3272         (WebCore::InlineFlowBox::InlineFlowBox):
3273         (WebCore::InlineFlowBox::setConstructed):
3274         (WebCore::InlineFlowBox::setEdges):
3275         (WebCore::InlineFlowBox::setVerticalOverflowPositions):
3276         (WebCore::InlineFlowBox::setVerticalSelectionPositions):
3277         * rendering/InlineRunBox.h:
3278         (WebCore::InlineRunBox::paintBackgroundAndBorder):
3279         (WebCore::InlineRunBox::paintDecorations):
3280         * rendering/InlineTextBox.cpp:
3281         * rendering/InlineTextBox.h:
3282         (WebCore::InlineTextBox::InlineTextBox):
3283         (WebCore::InlineTextBox::end):
3284         (WebCore::InlineTextBox::textObject):
3285         * rendering/Length.h:
3286         (WebCore::Length::Length):
3287         * rendering/ListMarkerBox.cpp:
3288         * rendering/ListMarkerBox.h:
3289         * rendering/RenderPartObject.h:
3290         * rendering/RootInlineBox.cpp:
3291         * rendering/RootInlineBox.h:
3292         * rendering/SVGInlineFlowBox.cpp:
3293         * rendering/SVGInlineFlowBox.h:
3294         (WebCore::SVGInlineFlowBox::SVGInlineFlowBox):
3295         * rendering/SVGRootInlineBox.cpp:
3296         * rendering/SVGRootInlineBox.h:
3297         (WebCore::SVGRootInlineBox::SVGRootInlineBox):
3298         * rendering/TableLayout.h:
3299         (WebCore::TableLayout::TableLayout):
3300         (WebCore::TableLayout::~TableLayout):
3301         * rendering/bidi.h:
3302         (WebCore::BidiStatus::BidiStatus):
3303         (WebCore::BidiRun::BidiRun):
3304         * rendering/break_lines.h:
3305
3306 2006-10-26  Justin Garcia  <justin.garcia@apple.com>
3307
3308         Reviewed by john
3309
3310         <http://bugs.webkit.org/show_bug.cgi?id=11329>
3311         Gmail Editor: Can't remove styling applied to selection after clicking "Remove Formatting" toolbar icon.
3312         
3313         * editing/Editor.cpp:
3314         (WebCore::Editor::removeFormattingAndStyle): Moved from JSEditor.
3315         Wrapped the plain text fragment in a style span with the document 
3316         default style so that it will appear unstyled regardless of where
3317         it is inserted.  Could have also inserted the plain text fragment 
3318         and then applied the document default style to it, but there is not 
3319         yet any redundant style prevention in ApplyStyleCommand, so this
3320         is cleaner.
3321         * editing/Editor.h:
3322         * editing/JSEditor.cpp:
3323
3324 2006-10-26  Oliver Hunt  <oliver@apple.com>
3325
3326         Reviewed by Anders.
3327         Fixes <rdar://problem/4800518> -- needed to update existing
3328         canvas path elements when transforms are performed on the
3329         context.
3330
3331         * html/CanvasRenderingContext2D.cpp:
3332         (WebCore::CanvasRenderingContext2D::scale):
3333         (WebCore::CanvasRenderingContext2D::rotate):
3334         (WebCore::CanvasRenderingContext2D::translate):
3335
3336 2006-10-26  Nikolas Zimmermann  <zimmermann@kde.org>
3337
3338         Reviewed by Darin.
3339
3340         Fix Qt/Linux build.
3341
3342         * platform/network/qt/ResourceLoaderManager.cpp:
3343         (WebCore::ResourceLoaderManager::slotData):
3344         (WebCore::ResourceLoaderManager::slotMimetype):
3345         (WebCore::ResourceLoaderManager::remove):
3346         (WebCore::ResourceLoaderManager::add):
3347         * platform/network/qt/ResourceLoaderQt.cpp:
3348         (WebCore::ResourceLoader::receivedResponse):
3349         * platform/qt/FrameQtClient.cpp:
3350         (WebCore::FrameQtClientDefault::openURL):
3351         * platform/qt/LoaderFunctionsQt.cpp:
3352         (WebCore::ServeSynchronousRequest):
3353
3354 2006-10-26  Adam Roben  <aroben@apple.com>
3355
3356         Reviewed by Adele.
3357
3358         Fix: <rdar://problem/3951815> add "type-to-select" feature for list
3359         boxes (<select> elements)
3360         Fix: http://bugs.webkit.org/show_bug.cgi?id=9764 New popup menus
3361         should have type-ahead selection without popping up menu
3362
3363         * WebCore.xcodeproj/project.pbxproj: Version wars.
3364         * html/HTMLSelectElement.h: Add new instance variables for type-ahead
3365         find.
3366         * html/HTMLSelectElement.cpp:
3367         (WebCore::HTMLSelectElement::HTMLSelectElement): Initialize new
3368         instance variables.
3369         (WebCore::HTMLSelectElement::defaultEventHandler): Perform type-ahead
3370         find on printable character presses.
3371         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Remove
3372         redundant check that the listIndex has changed (setSelectedIndex does
3373         this for us), and fix indentation.
3374         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Change an if
3375         to an else-if.
3376         (WebCore::stripLeadingWhiteSpace): Helper function for typeAheadFind()
3377         to strip leading whitespace (including non-breaking spaces) from a
3378         string.
3379         (WebCore::HTMLSelectElement::typeAheadFind): New method to perform
3380         type-ahead find.
3381         * platform/PopupMenu.h: Added new updateFromElement() method to be
3382         called from RenderMenuList::updateFromElement().
3383         * platform/mac/PopupMenuMac.mm:
3384         (WebCore::PopupMenu::updateFromElement): While we are using
3385         NSPopUpButtonCell for our popups, this method can stay empty.
3386         * rendering/RenderListBox.cpp:
3387         (WebCore::RenderListBox::updateFromElement): Scroll to reveal the first
3388         selected element.
3389         * rendering/RenderMenuList.cpp:
3390         (WebCore::RenderMenuList::updateFromElement): Tell the popup to update
3391         if it's visible.
3392
3393 2006-10-26  Darin Adler  <darin@apple.com>
3394
3395         Reviewed by Anders.
3396
3397         - fix http://bugs.webkit.org/show_bug.cgi?id=11360
3398           editing/pasteboard/copy-paste-bidi intermittently fails due to disappearance of anonymous RenderBlock
3399
3400         * editing/ReplaceSelectionCommand.cpp:
3401         (WebCore::ReplaceSelectionCommand::removeRedundantStyles):
3402         Use two vectors instead of a hash map: more efficient, deterministic. There was no
3403         reason to use a hash table.
3404
3405 2006-10-26  Maciej Stachowiak  <mjs@apple.com>
3406
3407         Reviewed by Anders.
3408
3409         - .5% speed improvement by avoiding excess CFURLRef allocation
3410
3411         * loader/CachedResource.cpp:
3412         (WebCore::CachedResource::getCFURL): New method. For Mac only (for now), cache the CFURL
3413         here for later reuse.
3414         * loader/CachedResource.h:
3415         * loader/mac/LoaderFunctionsMac.mm:
3416         (WebCore::CheckCacheObjectStatus): Use the cached CFURL, don't make a whole new one.
3417
3418 2006-10-25  Darin Adler  <darin@apple.com>
3419
3420         Reviewed by Anders.
3421
3422         - removed 55 methods from WebCoreFrameBridge
3423         - changed callers to use Frame directly instead
3424         - put FrameLoaderTypes.h types into the WebCore namespace
3425         - first steps to get FrameLoader.h ready for cross-platform duty
3426
3427         * WebCore.exp:
3428         * WebCore.xcodeproj/project.pbxproj:
3429         * bridge/mac/BrowserExtensionMac.mm:
3430         (WebCore::BrowserExtensionMac::createNewWindow):
3431         * bridge/mac/FrameMac.h:
3432         * bridge/mac/FrameMac.mm:
3433         (WebCore::FrameMac::loadRequest):
3434         (WebCore::FrameMac::startRedirectionTimer):
3435         (WebCore::FrameMac::stopRedirectionTimer):
3436         (WebCore::FrameMac::passSubframeEventToSubframe):
3437         (WebCore::FrameMac::handledOnloadEvents):
3438         (WebCore::FrameMac::isLoadTypeReload):
3439         * bridge/mac/WebCoreFrameBridge.h:
3440         * bridge/mac/WebCoreFrameBridge.mm:
3441         (-[WebCoreFrameBridge executionContextForView:]):
3442         (updateRenderingForBindings):
3443         (-[WebCoreFrameBridge canTargetLoadInFrame:]):
3444         (-[WebCoreFrameBridge forceLayoutAdjustingViewSize:]):
3445         (-[WebCoreFrameBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
3446         (-[WebCoreFrameBridge installInFrame:]):
3447         (-[WebCoreFrameBridge numPendingOrLoadingRequests]):
3448         (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
3449         (-[WebCoreFrameBridge baseWritingDirectionForSelectionStart]):
3450         (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
3451         (stringByCollapsingNonPrintingCharacters):
3452         (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
3453         (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
3454         (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
3455         * loader/FrameLoaderTypes.h:
3456         * loader/mac/FrameLoader.h:
3457         * loader/mac/FrameLoader.mm:
3458         (WebCore::FrameLoader::FrameLoader):
3459         (WebCore::FrameLoader::setupForReplace):
3460         (WebCore::FrameLoader::load):
3461         (WebCore::FrameLoader::activeDocumentLoader):
3462         (WebCore::FrameLoader::state):
3463         (WebCore::FrameLoader::setState):
3464         (WebCore::FrameLoader::clearProvisionalLoad):
3465         (WebCore::FrameLoader::markLoadComplete):
3466         (WebCore::FrameLoader::commitProvisionalLoad):
3467         (WebCore::FrameLoader::receivedMainResourceError):
3468         (WebCore::FrameLoader::handleFallbackContent):
3469         (WebCore::FrameLoader::isLoadingMainFrame):
3470         (WebCore::FrameLoader::continueAfterNewWindowPolicy):
3471         (WebCore::FrameLoader::continueAfterNavigationPolicy):
3472         (WebCore::FrameLoader::continueAfterWillSubmitForm):
3473         (WebCore::FrameLoader::continueLoadRequestAfterNavigationPolicy):
3474         (WebCore::FrameLoader::transitionToCommitted):
3475         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3476         (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
3477         (-[WebCoreFrameLoaderAsDelegate continueAfterNewWindowPolicy:]):
3478         (-[WebCoreFrameLoaderAsDelegate continueAfterNavigationPolicy:]):
3479         (-[WebCoreFrameLoaderAsDelegate continueAfterWillSubmitForm:]):
3480         * loader/mac/ImageDocumentMac.mm:
3481         (WebCore::finishImageLoad):
3482         * loader/mac/WebDocumentLoader.mm:
3483         (WebCore::DocumentLoader::isLoadingInAPISense):
3484         * loader/mac/WebMainResourceLoader.h:
3485         * loader/mac/WebMainResourceLoader.mm:
3486         (WebCore::MainResourceLoader::continueAfterContentPolicy):
3487         (-[WebCoreMainResourceLoaderAsPolicyDelegate continueAfterContentPolicy:]):
3488         * loader/mac/WebSubresourceLoader.mm:
3489         (-[WebCoreSubresourceHandle initWithLoader:]):
3490         * platform/mac/ListBoxMac.mm:
3491         (-[WebCoreTableView keyDown:]):
3492         (-[WebCoreTableView keyUp:]):
3493         * platform/mac/WebCoreTextField.mm:
3494         (-[WebCoreTextFieldController textView:shouldHandleEvent:]):
3495
3496 2006-10-25  Steve Falkenburg  <sfalken@apple.com>
3497
3498         Reviewed by Darin.
3499
3500         Printing fixes
3501
3502         * page/Frame.cpp:
3503         (WebCore::Frame::adjustPageHeight):
3504         * page/Frame.h:
3505         (WebCore::Frame::setupRootForPrinting):
3506         (WebCore::Frame::computePageRects):
3507
3508 2006-10-25  Anders Carlsson  <acarlsson@apple.com>
3509
3510         Reviewed by Geoff.
3511
3512         <rdar://problem/4799088>
3513         REGRESSION: Translation widget fails to convert data and reports a "Data unavailable" error.
3514
3515         * loader/mac/WebSubresourceLoader.h:
3516         * loader/mac/WebSubresourceLoader.mm:
3517         (-[WebCoreSubresourceHandle initWithLoader:]):
3518         Set the HTTP method before the HTTP body.
3519
3520 2006-10-25  Geoffrey Garen  <ggaren@apple.com>
3521
3522         Reviewed by Adam.
3523
3524         Renamed WebFrameLoader to FrameLoader, to match class name.
3525
3526         * WebCore.xcodeproj/project.pbxproj:
3527         * bridge/mac/FrameMac.mm:
3528         * bridge/mac/WebCoreFrameBridge.mm:
3529         * loader/mac/FrameLoader.mm: Added.
3530         * loader/mac/IconLoaderMac.mm:
3531         * loader/mac/WebDocumentLoader.mm:
3532         * loader/mac/WebFrameLoader.h: Removed.
3533         * loader/mac/WebFrameLoader.mm: Removed.
3534         * loader/mac/WebLoader.mm:
3535         * loader/mac/WebMainResourceLoader.mm:
3536         * loader/mac/WebNetscapePlugInStreamLoader.mm:
3537         * loader/mac/WebSubresourceLoader.mm:
3538
3539 2006-10-25  Darin Adler  <darin@apple.com>
3540
3541         - fix full builds
3542
3543         * WebCore.xcodeproj/project.pbxproj: Mark bridge/mac/WebCoreResourceLoader.h as private.
3544
3545 2006-10-25  David Smith  <catfish.man@gmail.com>
3546
3547         Reviewed by Mitz.
3548
3549         Fixed REGRESSION (r17280): Repro crash when clicking a link with target="_blank"
3550         http://bugs.webkit.org/show_bug.cgi?id=11411
3551
3552         * bridge/mac/WebCoreFrameBridge.mm:
3553         (-[WebCoreFrameBridge canTargetLoadInFrame:]): Check that the target has a frame before using it.
3554
3555 2006-10-25  Maciej Stachowiak  <mjs@apple.com>
3556
3557         Rubber stamped by Mitz.
3558
3559         - moved some files that are essentially part of the ResourceLoader implementation to platform/network/mac
3560
3561         * WebCore.xcodeproj/project.pbxproj:
3562         * bridge/mac/WebCoreResourceLoader.h: Moved to platform/network/mac.
3563         * bridge/mac/WebCoreResourceLoaderImp.h: Moved to platform/network/mac.
3564         * bridge/mac/WebCoreResourceLoaderImp.mm: Moved to platform/network/mac.
3565
3566 2006-10-25  Maciej Stachowiak  <mjs@apple.com>
3567
3568         Rubber stamped by Mark.
3569
3570         - remove no longer existing symbol that was breaking linking
3571
3572         * WebCore.exp:
3573
3574 2006-10-25  Maciej Stachowiak  <mjs@apple.com>
3575
3576         Reviewed by Mitz.
3577         
3578         - fixed "REGRESSION: Activity window doesn't always list all files until refresh"
3579         http://bugs.webkit.org/show_bug.cgi?id=11212
3580
3581         I couldn't figure out how to write a test case.
3582
3583         * bindings/js/kjs_window.cpp:
3584         (KJS::Window::clear): Avoid crashing if already detached.
3585         * bridge/mac/FrameMac.h:
3586         * bridge/mac/FrameMac.mm:
3587         (WebCore::FrameMac::clear): Change prototype to make this a proper
3588         overload for Frame::clear once again(!).
3589
3590 2006-10-24  Darin Adler  <darin@apple.com>
3591
3592         Reviewed by Anders.
3593
3594         - converted WebFrameLoaderClient to C++
3595         - renamed frame->frameLoader() function to frame->loader()
3596         - renamed [bridge impl] to [bridge _frame]
3597         - removed some bridge methods
3598
3599         * WebCore.exp: Added more exports.
3600         * WebCore.xcodeproj/project.pbxproj: Made FrameTree.h private instead of project-internal
3601         so it can be used in WebKit.
3602
3603         * bridge/mac/BrowserExtensionMac.mm:
3604         (WebCore::BrowserExtensionMac::createNewWindow):
3605         * bridge/mac/FrameMac.mm:
3606         (WebCore::FrameMac::createFrame):
3607         (WebCore::FrameMac::didFirstLayout):
3608         * bridge/mac/WebCoreAXObject.mm:
3609         (-[WebCoreAXObject rendererForView:]):
3610         * bridge/mac/WebCoreFrameBridge.h:
3611         * bridge/mac/WebCoreFrameBridge.mm:
3612         (-[WebCoreFrameBridge _shouldAllowAccessFrom:]):
3613         (-[WebCoreFrameBridge canTargetLoadInFrame:]):
3614         (-[WebCoreFrameBridge setOpener:]):
3615         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
3616         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
3617         (-[WebCoreFrameBridge setTitle:]):
3618         (-[WebCoreFrameBridge originalRequestURL]):
3619         (-[WebCoreFrameBridge isLoadTypeReload]):
3620         (-[WebCoreFrameBridge frameDetached]):
3621         (-[WebCoreFrameBridge tokenizerProcessedData]):
3622         (-[WebCoreFrameBridge receivedData:textEncodingName:]):
3623         (-[WebCoreFrameBridge objectLoadedFromCacheWithURL:response:data:]):
3624         (-[WebCoreFrameBridge reportClientRedirectToURL:delay:fireDate:lockHistory:isJavaScriptFormAction:]):
3625         (-[WebCoreFrameBridge reportClientRedirectCancelled:]):
3626         (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
3627         (-[WebCoreFrameBridge incomingReferrer]):
3628         (-[WebCoreFrameBridge isReloading]):
3629         (-[WebCoreFrameBridge handledOnloadEvents]):
3630         (-[WebCoreFrameBridge mainResourceURLResponse]):
3631         (-[WebCoreFrameBridge loadEmptyDocumentSynchronously]):
3632         (-[WebCoreFrameBridge _frame]):
3633         (-[WebCoreFrameBridge executionContextForView:]):
3634         * bridge/mac/WebCorePageBridge.mm:
3635         (-[WebCorePageBridge setMainFrame:]):
3636         * dom/Position.cpp:
3637         (WebCore::Position::upstream):
3638         * loader/mac/IconLoaderMac.mm:
3639         (IconLoader::notifyIconChanged):
3640         * loader/mac/WebDocumentLoader.mm:
3641         (WebCore::DocumentLoader::frameLoader):
3642         (WebCore::DocumentLoader::stopLoading):
3643         (WebCore::DocumentLoader::finishedLoading):
3644         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
3645         * loader/mac/WebFormState.mm:
3646         (WebCore::FormState::FormState):
3647         * loader/mac/WebFrameLoader.h:
3648         * loader/mac/WebFrameLoader.mm:
3649         (WebCore::FrameLoader::~FrameLoader):
3650         (WebCore::FrameLoader::prepareForLoadStart):
3651         (WebCore::FrameLoader::finalSetupForReplace):
3652         (WebCore::FrameLoader::safeLoad):
3653         (WebCore::FrameLoader::load):
3654         (WebCore::FrameLoader::startLoading):
3655         (WebCore::FrameLoader::stopLoadingSubframes):
3656         (WebCore::FrameLoader::stopLoading):
3657         (WebCore::FrameLoader::cancelPendingArchiveLoad):
3658         (WebCore::FrameLoader::defersCallbacksChanged):
3659         (WebCore::FrameLoader::setDefersCallbacks):
3660         (WebCore::FrameLoader::setDocumentLoader):
3661         (WebCore::FrameLoader::provisionalLoadStarted):
3662         (WebCore::FrameLoader::clearProvisionalLoad):
3663         (WebCore::FrameLoader::identifierForInitialRequest):
3664         (WebCore::FrameLoader::willSendRequest):
3665         (WebCore::FrameLoader::didReceiveAuthenticationChallenge):
3666         (WebCore::FrameLoader::didCancelAuthenticationChallenge):
3667         (WebCore::FrameLoader::didReceiveResponse):
3668         (WebCore::FrameLoader::didReceiveData):
3669         (WebCore::FrameLoader::didFinishLoad):
3670         (WebCore::FrameLoader::didFailToLoad):
3671         (WebCore::FrameLoader::privateBrowsingEnabled):
3672         (WebCore::FrameLoader::receivedMainResourceError):
3673         (WebCore::FrameLoader::clientRedirectCancelledOrFinished):
3674         (WebCore::FrameLoader::clientRedirected):
3675         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
3676         (WebCore::FrameLoader::closeOldDataSources):
3677         (WebCore::FrameLoader::opened):
3678         (WebCore::FrameLoader::commitProvisionalLoad):
3679         (WebCore::FrameLoader::download):
3680         (WebCore::FrameLoader::finishedLoading):
3681         (WebCore::FrameLoader::notifyIconChanged):
3682         (WebCore::FrameLoader::cancelledError):
3683         (WebCore::FrameLoader::fileDoesNotExistError):
3684         (WebCore::FrameLoader::willUseArchive):
3685         (WebCore::FrameLoader::isArchiveLoadPending):
3686         (WebCore::FrameLoader::handleUnimplementablePolicy):
3687         (WebCore::FrameLoader::cannotShowMIMEType):
3688         (WebCore::FrameLoader::interruptionForPolicyChangeError):
3689         (WebCore::FrameLoader::canShowMIMEType):
3690         (WebCore::FrameLoader::representationExistsForURLScheme):
3691         (WebCore::FrameLoader::generatedMIMETypeForURLScheme):
3692         (WebCore::FrameLoader::checkContentPolicy):
3693         (WebCore::FrameLoader::reloadAllowingStaleData):
3694         (WebCore::FrameLoader::reload):
3695         (WebCore::FrameLoader::didReceiveServerRedirectForProvisionalLoadForFrame):
3696         (WebCore::FrameLoader::finishedLoadingDocument):
3697         (WebCore::FrameLoader::committedLoad):
3698         (WebCore::FrameLoader::revertToProvisional):
3699         (WebCore::FrameLoader::setMainDocumentError):
3700         (WebCore::FrameLoader::mainReceivedCompleteError):
3701         (WebCore::FrameLoader::subframeIsLoading):
3702         (WebCore::FrameLoader::willChangeTitle):
3703         (WebCore::FrameLoader::didChangeTitle):
3704         (WebCore::FrameLoader::checkNewWindowPolicy):
3705         (WebCore::FrameLoader::continueAfterNewWindowPolicy):
3706         (WebCore::FrameLoader::checkNavigationPolicy):
3707         (WebCore::FrameLoader::continueAfterNavigationPolicy):
3708         (WebCore::FrameLoader::continueLoadRequestAfterNavigationPolicy):
3709         (WebCore::FrameLoader::didFirstLayout):
3710         (WebCore::FrameLoader::frameLoadCompleted):
3711         (WebCore::FrameLoader::transitionToCommitted):
3712         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3713         (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
3714         (WebCore::FrameLoader::sendRemainingDelegateMessages):
3715         (WebCore::FrameLoader::requestFromDelegate):
3716         (WebCore::FrameLoader::post):
3717         (WebCore::FrameLoader::detachChildren):
3718         (WebCore::FrameLoader::detachFromParent):
3719         (WebCore::FrameLoader::addExtraFieldsToRequest):
3720         (WebCore::FrameLoader::actionInformation):
3721         (WebCore::FrameLoader::checkLoadComplete):
3722         (WebCore::FrameLoader::setClient):
3723         (WebCore::FrameLoader::client):
3724         (WebCore::FrameLoaderClient::~FrameLoaderClient):
3725         * loader/mac/WebFrameLoaderClient.h:
3726         * loader/mac/WebLoader.mm:
3727         (WebCore::WebResourceLoader::frameLoader):
3728         * loader/mac/WebSubresourceLoader.mm:
3729         (-[WebCoreSubresourceHandle initWithLoader:]):
3730         * page/Frame.cpp:
3731         (WebCore::Frame::loader):
3732         * page/Frame.h:
3733         * platform/mac/SliderMac.mm:
3734         (Slider::focusPolicy):
3735
3736 2006-10-24  Darin Adler  <darin@apple.com>
3737
3738         Rubber stamped by Anders.
3739
3740         - get rid of the assertion firing while running the layout tests
3741
3742         This does not fix the real problem, which is that we need to map offsets within
3743         possibly-text-transformed text in the render tree to DOM tree offsets and vice
3744         versa -- but it gets the tests running again.
3745
3746         * dom/Position.cpp: (WebCore::Position::upstream): Commented out the assertion.
3747
3748 2006-10-24  Maciej Stachowiak  <mjs@apple.com>
3749
3750         Reviewed by Oliver.
3751
3752         - more ResourceLoader cleanup
3753             - moved HTTPHeaderMap out of ResourceRequest class, so ResourceResponse will be able to use it too
3754             - took out attempts to suppress setting of "HEAD" and "GET" methods, since underlying bugs are now fixed
3755         
3756         * loader/LoaderFunctions.h:
3757         * loader/mac/LoaderFunctionsMac.mm:
3758         (WebCore::ServeSynchronousRequest):
3759         * loader/mac/WebSubresourceLoader.mm:
3760         (-[WebCoreSubresourceHandle initWithLoader:]):
3761         * platform/network/HTTPHeaderMap.h: Added.
3762         * platform/network/ResourceLoader.cpp:
3763         (WebCore::ResourceLoader::requestHeaders):
3764         * platform/network/ResourceLoader.h:
3765         * platform/network/ResourceRequest.h:
3766         * platform/network/cf/ResourceLoaderCFNet.cpp:
3767         (WebCore::addHeadersFromHashMap):
3768         * xml/xmlhttprequest.cpp:
3769         (WebCore::XMLHttpRequest::send):
3770         * xml/xmlhttprequest.h:
3771
3772 2006-10-24  Justin Garcia  <justin.garcia@apple.com>
3773
3774         Reviewed by darin
3775
3776         <http://bugs.webkit.org/show_bug.cgi?id=10993>
3777         GMail Editor: Caret doesn't always position itself after list marker
3778         
3779         List creation uses moveParagraphs to push content into list items.  
3780         moveParagraphs uses a TextIterator to restore selections after moves.
3781         Some characters emitted by the TextIterator had bad ranges associated
3782         with them.  rangeFromLocationAndLength would skip past the range it
3783         should have used when asked for ranges of length 0.
3784
3785         * editing/TextIterator.cpp:
3786         (WebCore::TextIterator::TextIterator): No longer need to initialize a
3787         removed member variable.
3788         (WebCore::TextIterator::advance): An extra newline is emitted when leaving
3789         some blocks.  Use the same range for this newline as for the first newline.
3790         We should remove this code and just emit two '\n's.
3791         (WebCore::TextIterator::handleTextNode): Setup m_range.
3792         (WebCore::TextIterator::handleTextBox): Ditto.
3793         (WebCore::TextIterator::handleReplacedElement): Ditto.
3794         (WebCore::TextIterator::handleNonTextNode): Ditto.
3795         (WebCore::TextIterator::exitNode): Use an m_range from the last VisiblePosition
3796         in the block we're leaving to that VP after that one.
3797         (WebCore::TextIterator::emitCharacter): This function now takes in the start
3798         and the end of the range associated with the emited character, and sets up m_range.
3799         (WebCore::TextIterator::range): Return m_range.  If it is null (we are atEnd), 
3800         return the end of the range used to create the iterator, as a convenience to
3801         callers that use call range() on an iterator that is atEnd.
3802         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
3803         Same as the changes made to TextIterator's constructor.
3804         (WebCore::SimplifiedBackwardsTextIterator::advance): Use a null m_range instead of
3805         a null m_positionNode to signal that we're finished.
3806         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): Ditto.
3807         (WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement): Similar to changes
3808         made to TextIterator.
3809         (WebCore::SimplifiedBackwardsTextIterator::emitCharacter): Ditto.
3810         (WebCore::SimplifiedBackwardsTextIterator::emitNewline): Simplified.
3811         (WebCore::SimplifiedBackwardsTextIterator::range): Similar to the changes made to
3812         TextIterator::range.
3813         (WebCore::CharacterIterator::range): This function assumed that an iterator's
3814         range() was safe to modify.
3815         (WebCore::TextIterator::rangeFromLocationAndLength):
3816         If the range we're looking for starts in the current chunk, this function assumed
3817         that if the chunk started in a text node, it would end in the same text node.  This
3818         is no longer the case.
3819         If the range we're looking for starts in the middle of the current chunk, I assume
3820         that the chunk is inside a text node, because those are the only chunks with length
3821         greater than one at the moment.
3822         If the range we're looking for is a zero length range that starts/ends at the end of the
3823         current chunk, we used to return the start of the next chunk, but that's wrong and
3824         is what caused this bug.
3825         * editing/TextIterator.h:
3826         (WebCore::TextIterator::atEnd): The iterator is atEnd when m_range is null.
3827         (WebCore::SimplifiedBackwardsTextIterator::atEnd):
3828         * editing/visible_units.cpp:
3829         (WebCore::previousBoundary): Cleaned up by using a convenience function.
3830         (WebCore::nextBoundary): Ditto.
3831
3832 2006-10-24  Anders Carlsson  <acarlsson@apple.com>
3833
3834         Reviewed by Maciej.
3835
3836         * platform/network/mac/ResourceLoaderMac.mm:
3837         (WebCore::ResourceLoader::start):
3838         Don't retain the header dictionary.
3839
3840 2006-10-24  Geoffrey Garen  <ggaren@apple.com>
3841
3842         Reviewed by Anders.
3843
3844         Fixed http://bugs.webkit.org/show_bug.cgi?id=11404
3845         REGRESSION: Reproducible assertion failure in Shared<WebCore::StringImpl>::ref() 
3846         running svg/custom/svg/custom/gradient-attr-update.svg
3847         
3848         SVGRenderStyle wasn't ref-ing the shared objects it held onto. Oops.
3849
3850         * ksvg2/css/SVGRenderStyle.h:
3851         * ksvg2/css/SVGRenderStyleDefs.h:
3852
3853 2006-10-24  Anders Carlsson  <acarlsson@apple.com>
3854
3855         Reviewed by Mitz.
3856
3857         * platform/network/ResourceRequest.h:
3858         (WebCore::ResourceRequest::ResourceRequest):
3859         Set the http method to "GET" in the constructor that takes a String.
3860
3861 2006-10-24  Sam Weinig  <sam.weinig@gmail.com>
3862
3863         Reviewed by Tim H.
3864
3865         Move kcanvas/Render* and kcanvas/SVG* to rendering/Render*
3866         and rendering/SVG* respectively.  Fix Xcode project and
3867         CMakeLists.txt to account for the moves.
3868
3869         * CMakeLists.txt:
3870         * WebCore.xcodeproj/project.pbxproj:
3871         * kcanvas/RenderForeignObject.cpp: Removed.
3872         * kcanvas/RenderForeignObject.h: Removed.
3873         * kcanvas/RenderPath.cpp: Removed.
3874         * kcanvas/RenderPath.h: Removed.
3875         * kcanvas/RenderSVGContainer.cpp: Removed.
3876         * kcanvas/RenderSVGContainer.h: Removed.
3877         * kcanvas/RenderSVGImage.cpp: Removed.
3878         * kcanvas/RenderSVGImage.h: Removed.
3879         * kcanvas/RenderSVGInline.cpp: Removed.
3880         * kcanvas/RenderSVGInline.h: Removed.
3881         * kcanvas/RenderSVGInlineText.cpp: Removed.
3882         * kcanvas/RenderSVGInlineText.h: Removed.
3883         * kcanvas/RenderSVGTSpan.cpp: Removed.
3884         * kcanvas/RenderSVGTSpan.h: Removed.
3885         * kcanvas/RenderSVGText.cpp: Removed.
3886         * kcanvas/RenderSVGText.h: Removed.
3887         * kcanvas/SVGInlineFlowBox.cpp: Removed.
3888         * kcanvas/SVGInlineFlowBox.h: Removed.
3889         * kcanvas/SVGRootInlineBox.cpp: Removed.
3890         * kcanvas/SVGRootInlineBox.h: Removed.
3891
3892 2006-10-24  Geoffrey Garen  <ggaren@apple.com>
3893
3894         Rolling back in, now fixed:
3895         
3896         Nixed a few more redundant loading functions in Frame. Did my best to update
3897         the non-Mac builds.
3898
3899         * bridge/mac/FrameMac.h:
3900         * bridge/mac/FrameMac.mm:
3901         (WebCore::FrameMac::urlSelected): Kept always 'true' argument for userGesture
3902         always 'true', because changing it broke the world, and testing seems to
3903         indicate that the one caller that might have passed 'false' didn't need to.
3904         * page/Frame.cpp:
3905         (WebCore::Frame::requestFrame):
3906         (WebCore::Frame::frameLoader):
3907         (WebCore::Frame::redirectionTimerFired):
3908         * page/Frame.h:
3909         * platform/gdk/FrameGdk.cpp:
3910         * platform/gdk/FrameGdk.h:
3911         * platform/gdk/TemporaryLinkStubs.cpp:
3912         (FrameGdk::issueCopyCommand):
3913         * platform/qt/FrameQt.cpp:
3914         * platform/qt/FrameQt.h:
3915         * platform/win/TemporaryLinkStubs.cpp:
3916         (WebCore::FrameWin::shouldInterruptJavaScript):
3917         (WebCore::FrameWin::issueCopyCommand):
3918
3919 2006-10-24  Anders Carlsson  <acarlsson@apple.com>
3920
3921         Fix the build (Update for changes to ResourceLoader)
3922         
3923         * platform/network/cf/ResourceLoaderCFNet.cpp:
3924         (WebCore::addHeadersFromHashMap):
3925         (WebCore::ResourceLoader::start):
3926         (WebCore::ResourceLoader::cancel):
3927
3928 2006-10-24  Sam Weinig  <sam.weinig@gmail.com>
3929
3930         Reviewed by Mitz.
3931
3932         Change #includes using <kcanvas/*.h> to use "*.h" instead
3933         to prepare for moving the kcanvas files.
3934
3935         * kcanvas/RenderSVGContainer.h:
3936         * ksvg2/svg/SVGAElement.cpp:
3937         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
3938         * ksvg2/svg/SVGFETileElement.cpp:
3939         * ksvg2/svg/SVGStyledLocatableElement.cpp:
3940         * ksvg2/svg/SVGStyledTransformableElement.cpp:
3941
3942 2006-10-24  Maciej Stachowiak  <mjs@apple.com>
3943
3944         Reviewed by Darin.
3945
3946         - More movement towards the final network API.
3947         
3948         Changed ResourceLoader::create to take a ResurceRequest and start
3949         the load. Removed methods relating to setting request
3950         headers. Removed methods relating to metaData. Added some more
3951         convenience methods to ResourceRequest.
3952
3953         * dom/XMLTokenizer.cpp:
3954         (WebCore::openFunc):
3955         * loader/LoaderFunctions.h:
3956         * loader/icon/IconLoader.cpp:
3957         (IconLoader::startLoading):
3958         (IconLoader::didFinishLoading):
3959         * loader/icon/IconLoader.h:
3960         * loader/loader.cpp:
3961         (WebCore::Loader::servePendingRequests):
3962         * loader/mac/LoaderFunctionsMac.mm:
3963         (WebCore::ServeSynchronousRequest):
3964         * platform/gdk/FrameGdk.cpp:
3965         (WebCore::FrameGdkClientDefault::openURL):
3966         (WebCore::FrameGdkClientDefault::submitForm):
3967         * platform/network/ResourceLoader.cpp:
3968         (WebCore::ResourceLoader::ResourceLoader):
3969         (WebCore::ResourceLoader::create):
3970         (WebCore::ResourceLoader::responseHTTPHeadersAsString):
3971         (WebCore::ResourceLoader::url):
3972         (WebCore::ResourceLoader::postData):
3973         (WebCore::ResourceLoader::method):
3974         (WebCore::ResourceLoader::client):
3975         * platform/network/ResourceLoader.h:
3976         * platform/network/ResourceLoaderInternal.h:
3977         (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
3978         * platform/network/ResourceRequest.h:
3979         (WebCore::ResourceRequest::ResourceRequest):
3980         (WebCore::ResourceRequest::httpAccept):
3981         (WebCore::ResourceRequest::setHTTPAccept):
3982         (WebCore::ResourceRequest::addHTTPHeaderFields):
3983         * platform/network/mac/ResourceLoaderMac.mm:
3984         (WebCore::ResourceLoader::start):
3985         (WebCore::ResourceLoader::receivedResponse):
3986         * platform/qt/FrameQtClient.cpp:
3987         (WebCore::FrameQtClientDefault::openURL):
3988         (WebCore::FrameQtClientDefault::submitForm):
3989         * platform/win/TemporaryLinkStubs.cpp:
3990         (WebCore::ResourceLoader::retrieveResponseEncoding):
3991         * xml/XSLTProcessor.cpp:
3992         (WebCore::docLoaderFunc):
3993         * xml/xmlhttprequest.cpp:
3994         (WebCore::XMLHttpRequest::send):
3995         (WebCore::XMLHttpRequest::didFinishLoading):
3996         (WebCore::XMLHttpRequest::didReceiveData):
3997         * xml/xmlhttprequest.h:
3998
3999 2006-10-24  Anders Carlsson  <acarlsson@apple.com>
4000
4001         Reviewed by Geoff.
4002
4003         * loader/FormData.cpp:
4004         (WebCore::FormData::FormData):
4005         * loader/FormData.h:
4006         (WebCore::FormData::FormData):
4007         Add new constructor that takes a void* and a size.
4008
4009 2006-10-24  Geoffrey Garen  <ggaren@apple.com>
4010
4011         Rolling out my last change because it broke the world.
4012
4013         * bridge/mac/FrameMac.h:
4014         * bridge/mac/FrameMac.mm:
4015         (WebCore::FrameMac::openURL):
4016         (WebCore::FrameMac::openURLRequest):
4017         (WebCore::FrameMac::urlSelected):
4018         * page/Frame.cpp:
4019         (WebCore::Frame::openURL):
4020         (WebCore::Frame::frameLoader):
4021         (WebCore::Frame::requestFrame):
4022         (WebCore::Frame::redirectionTimerFired):
4023         * page/Frame.h:
4024         * platform/gdk/FrameGdk.cpp:
4025         (WebCore::FrameGdk::openURL):
4026         * platform/gdk/FrameGdk.h:
4027         * platform/gdk/TemporaryLinkStubs.cpp:
4028         * platform/qt/FrameQt.cpp:
4029         (WebCore::FrameQt::openURL):
4030         (WebCore::FrameQt::openURLRequest):
4031         * platform/qt/FrameQt.h:
4032         * platform/win/TemporaryLinkStubs.cpp:
4033         (WebCore::FrameWin::openURL):
4034         (WebCore::FrameWin::openURLRequest):
4035
4036 2006-10-24  Nikolas Zimmermann  <zimmermann@kde.org>
4037
4038         Reviewed by Adam.
4039
4040         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11396
4041
4042         Kill KRenderingFillPainter/KRenderingStrokePainter. Those are not needed
4043         anymore, since kcanvas/ksvg2 are tightly integrated. No LayoutTests fixed
4044         or broken.
4045
4046         * CMakeLists.txt:
4047         * WebCore.xcodeproj/project.pbxproj:
4048         * kcanvas/KCanvasTreeDebug.cpp:
4049         (WebCore::operator<<):
4050         (WebCore::writeStyle):
4051         * kcanvas/RenderPath.cpp:
4052         (WebCore::RenderPath::fillContains):
4053         * kcanvas/device/KRenderingFillPainter.cpp:
4054         * kcanvas/device/KRenderingFillPainter.h:
4055         * kcanvas/device/KRenderingStrokePainter.cpp:
4056         * kcanvas/device/KRenderingStrokePainter.h:
4057         * kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
4058         (WebCore::KRenderingPaintServerLinearGradientQt::setup):
4059         (WebCore::KRenderingPaintServerRadialGradientQt::setup):
4060         * kcanvas/device/qt/KRenderingPaintServerPatternQt.cpp:
4061         * kcanvas/device/qt/KRenderingPaintServerQt.cpp:
4062         (WebCore::KRenderingPaintServerQt::setPenProperties):
4063         * kcanvas/device/qt/KRenderingPaintServerQt.h:
4064         * kcanvas/device/qt/KRenderingPaintServerSolidQt.cpp:
4065         (WebCore::KRenderingPaintServerSolidQt::setup):
4066         * kcanvas/device/qt/RenderPathQt.cpp:
4067         (WebCore::getPathStroke):
4068         (WebCore::RenderPath::strokeBBox):
4069         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
4070         (WebCore::RenderPath::strokeBBox):
4071         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
4072         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
4073         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
4074         (WebCore::KRenderingPaintServerQuartzHelper::fillPath):
4075         (WebCore::KRenderingPaintServerQuartzHelper::clipToFillPath):
4076         * kcanvas/device/quartz/QuartzSupport.h:
4077         (WebCore::CGLineCapFromKC):
4078         (WebCore::CGLineJoinFromKC):
4079         * kcanvas/device/quartz/QuartzSupport.mm:
4080         (WebCore::applyStrokeStyleToContext):
4081         (WebCore::strokeBoundingBox):
4082         * ksvg2/css/SVGCSSStyleSelector.cpp:
4083         (WebCore::CSSStyleSelector::applySVGProperty):
4084         * ksvg2/css/SVGRenderStyle.h:
4085         (WebCore::SVGRenderStyle::InheritedFlags::):
4086         * ksvg2/css/SVGRenderStyleDefs.h:
4087         * ksvg2/misc/KCanvasRenderingStyle.cpp:
4088         (WebCore::KSVGPainterFactory::dashArrayFromRenderingStyle):
4089         * ksvg2/misc/KCanvasRenderingStyle.h:
4090         * ksvg2/svg/SVGFEImageElement.cpp:
4091
4092 2006-10-24  Geoffrey Garen  <ggaren@apple.com>
4093
4094         Reviewed by Anders.
4095
4096         Nixed a few more redundant loading functions in Frame. Did my best to update
4097         the non-Mac builds.
4098
4099         * bridge/mac/FrameMac.h:
4100         * bridge/mac/FrameMac.mm:
4101         (WebCore::FrameMac::urlSelected): Changed always 'true' argument for userGesture
4102         to actually check for a user gesture. New callers rely on this behavior,
4103         and it seems like the previous behavior must have been a bug.
4104         * page/Frame.cpp:
4105         (WebCore::Frame::requestFrame):
4106         (WebCore::Frame::frameLoader):
4107         (WebCore::Frame::redirectionTimerFired):
4108         * page/Frame.h:
4109         * platform/gdk/FrameGdk.cpp:
4110         * platform/gdk/FrameGdk.h:
4111         * platform/gdk/TemporaryLinkStubs.cpp:
4112         (FrameGdk::issueCopyCommand):
4113         * platform/qt/FrameQt.cpp:
4114         * platform/qt/FrameQt.h:
4115         * platform/win/TemporaryLinkStubs.cpp:
4116         (WebCore::FrameWin::shouldInterruptJavaScript):
4117         (WebCore::FrameWin::issueCopyCommand):
4118
4119 2006-10-24  Nikolas Zimmermann  <zimmermann@kde.org>
4120
4121         Reviewed by Maciej.
4122
4123         Fix Qt/Linux build.
4124
4125         - Remove BrowserExtensionQt, move it's methods to Page/FrameQt.
4126         - Fix CMakeLists.txt to include platform/network.
4127
4128         * CMakeLists.txt:
4129         * platform/qt/BrowserExtensionQt.cpp: Removed.
4130         * platform/qt/BrowserExtensionQt.h: Removed.
4131         * platform/qt/FrameQt.cpp:
4132         (WebCore::FrameQt::FrameQt):
4133         (WebCore::FrameQt::createNewWindow):
4134         (WebCore::FrameQt::goBackOrForward):
4135         (WebCore::FrameQt::historyURL):
4136         (WebCore::FrameQt::getHistoryLength):
4137         * platform/qt/FrameQt.h:
4138         * platform/qt/PageQt.cpp:
4139         (WebCore::Page::canRunModal):
4140         (WebCore::Page::canRunModalNow):
4141         (WebCore::Page::runModal):
4142
4143 2006-10-24  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
4144
4145         Reviewed by Tim H.
4146
4147         Fix for http://bugs.webkit.org/show_bug.cgi?id=11314
4148         Fix build when XSLT_SUPPORT is not defined
4149
4150         Fix unconditional use of XSLT support.
4151
4152         * dom/XMLTokenizer.cpp:
4153         (WebCore::XMLTokeni