2006-12-18 Kirby White <KWhiteRight@gmail.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2006-12-18  Kirby White  <KWhiteRight@gmail.com>
2
3         Reviewed by Darin.
4
5         Changed hidden input controls to reset to their initial values
6         when the form is reset.  Also added layout tests for resetting
7         other input controls.
8
9         Fixes http://bugs.webkit.org/show_bug.cgi?id=11866
10
11         * html/HTMLInputElement.cpp:
12         (WebCore::HTMLInputElement::setValue):
13         (WebCore::HTMLInputElement::storesValueSeparateFromAttribute):
14
15 2006-12-18  Alice Liu  <alice.liu@apple.com>
16
17         Oops forgot a file. 
18
19         * editing/EditorDeleteAction.h: Added.
20         (WebCore::):
21
22 2006-12-18  Alice Liu  <alice.liu@apple.com>
23
24         Reviewed by Adam.
25
26         Have the Editor handle deletion instead of WebHTMLView
27
28         * WebCore.exp:
29         Exposed Editor::deleteWithDirection and ::deleteRange()
30
31         * WebCore.xcodeproj/project.pbxproj:
32         Added EditorDeleteAction.h
33
34         * editing/Editor.cpp:
35         (WebCore::Editor::deleteRange):
36         (WebCore::Editor::deleteWithDirection):
37         Implemented
38
39         (WebCore::Editor::deleteSelectionWithSmartDelete):
40         Overloaded to take no params, in which case canSmartCopyOrDelete is called
41
42         (WebCore::execCopy):
43         (WebCore::execCut):
44         (WebCore::execDelete):
45         (WebCore::execPaste):
46         Call the editor instead of asking frame to cut/copy/paste/delete
47
48         (WebCore::execBackwardDelete):
49         (WebCore::execForwardDelete):
50         Call deleteWithDirection instead of just executing a TypingCommand
51
52         (WebCore::CommandEntry::):
53         distinguished delete (which deletes selection) from backwards delete (single character, no selection)
54
55         (WebCore::Editor::cut):
56         (WebCore::Editor::performDelete):
57         Trivial changes
58
59         * editing/Editor.h:
60         Added some functons.
61         (WebCore::Editor::setStartNewKillRingSequence):
62         (WebCore::Editor::propogateDOMException):
63         (WebCore::Editor::addToKillRing):
64         * editing/mac/EditorMac.mm:
65         Factored out support for Kill Rings to this file
66
67         * platform/mac/PasteboardMac.mm:
68         Trivial change
69
70 2006-12-18  Kevin McCullough  <KMcCullough@apple.com>
71
72         Reviewed by Oliver.
73
74         - Removed CG header include
75
76         * platform/graphics/ImageSource.h:
77
78 2006-12-18  John Sullivan  <sullivan@apple.com>
79
80         Reviewed by Tim Hatcher
81
82         - fixed <rdar://problem/4887764> GMAIL: Crash occurs at WebCore::Range::cloneRange() 
83           when I ctrl-click in a empty list item
84
85         * editing/mac/EditorMac.mm:
86         (WebCore::isRangeUngrammatical):
87         bail out immediately for nil range (which selectionController()->toRange().get()
88         can return). Also save some work by bailing out immediately for collapsed ranges.
89
90 2006-12-18  Alice Liu  <alice.liu@apple.com>
91
92         Leopard build fix.
93
94         * platform/ContextMenu.cpp:
95         (WebCore::ContextMenu::checkOrEnableIfNeeded):
96
97 2006-12-17  Zack Rusin  <zack@kde.org>
98
99         Fix compilation after the const changes.
100
101         * platform/qt/ContextMenuItemQt.cpp:
102         (WebCore::ContextMenuItem::type):
103         (WebCore::ContextMenuItem::setTitle):
104         (WebCore::ContextMenuItem::setChecked):
105         (WebCore::ContextMenuItem::setEnabled):
106
107 2006-12-17  Nikolas Zimmermann  <zimmermann@kde.org>
108
109         Reviewed by Eric.
110
111         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10956
112
113         Long standing regression. The old code in FontMac.mm, used set the fill/stroke
114         color "[nsColor(graphicsContext->pen().color()) set];", and current code only
115         sets the fill color. Reverting to old behaviour fixes gradient-on-stroke-of-text.
116
117         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
118         (WebCore::SVGPaintServerGradient::setup):
119         * platform/mac/FontMac.mm:
120         (WebCore::Font::drawComplexText):
121         (WebCore::Font::drawGlyphs):
122
123 2006-12-17  Lars Naesbye Christensen  <larsnaesbye@stud.ku.dk>
124
125         Reviewed, tweaked and landed by Alexey.
126
127         http://bugs.webkit.org/show_bug.cgi?id=11798
128         [CSS 3] missing cursor support for 'none'
129
130         * Resources/noneCursor.png: Added.
131         * WebCore.xcodeproj/project.pbxproj:
132         * css/CSSComputedStyleDeclaration.cpp:
133         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
134         * css/CSSValueKeywords.in:
135         * css/cssparser.cpp: Also fixed previously broken -webkit-background-composite: copy.
136         * manual-tests/cursor.html:
137         * page/EventHandler.cpp:
138         (WebCore::selectCursor):
139         * platform/Cursor.h:
140         * platform/gdk/CursorGdk.cpp:
141         (WebCore::noneCursor):
142         * platform/mac/CursorMac.mm:
143         (WebCore::noneCursor):
144         * platform/qt/CursorQt.cpp:
145         (WebCore::noneCursor):
146         * platform/win/CursorWin.cpp:
147         (WebCore::noneCursor):
148         * rendering/RenderStyle.h:
149         (WebCore::):
150
151 2006-12-17  Nikolas Zimmermann  <zimmermann@kde.org>
152
153         Build fix, not reviewed.
154
155         This should hopefully fix Qt build.
156
157         * ksvg2/svg/SVGLength.cpp: Include math.h for Qt/Linux build.
158
159 2006-12-17  Nikolas Zimmermann  <zimmermann@kde.org>
160
161         Reviewed by Rob.
162
163         Remove SVGHelper class. Move the last static function "parseSeparatedList"
164         to the only place using it: SVGAnimationElement. Update all build files.
165
166         Remove any lazy_create macro usage, by what it does - cleaner.
167
168         * CMakeLists.txt:
169         * WebCore.pro:
170         * WebCore.xcodeproj/project.pbxproj:
171         * ksvg2/misc/KCanvasRenderingStyle.cpp:
172         * ksvg2/svg/SVGAElement.cpp:
173         * ksvg2/svg/SVGAnimationElement.cpp:
174         (WebCore::parseSeparatedList):
175         (WebCore::SVGAnimationElement::parseMappedAttribute):
176         * ksvg2/svg/SVGCircleElement.cpp:
177         * ksvg2/svg/SVGClipPathElement.cpp:
178         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
179         * ksvg2/svg/SVGCursorElement.cpp:
180         * ksvg2/svg/SVGEllipseElement.cpp:
181         * ksvg2/svg/SVGExternalResourcesRequired.cpp:
182         * ksvg2/svg/SVGFEBlendElement.cpp:
183         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
184         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
185         * ksvg2/svg/SVGFECompositeElement.cpp:
186         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
187         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
188         * ksvg2/svg/SVGFEFloodElement.cpp:
189         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
190         * ksvg2/svg/SVGFEImageElement.cpp:
191         * ksvg2/svg/SVGFELightElement.cpp:
192         * ksvg2/svg/SVGFEMergeElement.cpp:
193         * ksvg2/svg/SVGFEMergeNodeElement.cpp:
194         * ksvg2/svg/SVGFEOffsetElement.cpp:
195         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
196         * ksvg2/svg/SVGFETileElement.cpp:
197         * ksvg2/svg/SVGFilterElement.cpp:
198         * ksvg2/svg/SVGForeignObjectElement.cpp:
199         * ksvg2/svg/SVGGradientElement.cpp:
200         * ksvg2/svg/SVGHelper.cpp: Removed.
201         * ksvg2/svg/SVGHelper.h: Removed.
202         * ksvg2/svg/SVGImageElement.cpp:
203         * ksvg2/svg/SVGLength.cpp:
204         * ksvg2/svg/SVGLineElement.cpp:
205         * ksvg2/svg/SVGLinearGradientElement.cpp:
206         * ksvg2/svg/SVGMarkerElement.cpp:
207         * ksvg2/svg/SVGMaskElement.cpp:
208         * ksvg2/svg/SVGPathElement.cpp:
209         * ksvg2/svg/SVGPatternElement.cpp:
210         * ksvg2/svg/SVGPolyElement.cpp:
211         * ksvg2/svg/SVGRadialGradientElement.cpp:
212         * ksvg2/svg/SVGRectElement.cpp:
213         * ksvg2/svg/SVGStopElement.cpp:
214         * ksvg2/svg/SVGStyledElement.cpp:
215         * ksvg2/svg/SVGStyledTransformableElement.cpp:
216         * ksvg2/svg/SVGSymbolElement.cpp:
217         * ksvg2/svg/SVGTests.cpp:
218         * ksvg2/svg/SVGTextContentElement.cpp:
219         * ksvg2/svg/SVGTextElement.cpp:
220         * ksvg2/svg/SVGTextPositioningElement.cpp:
221         * ksvg2/svg/SVGTransformable.cpp:
222         * ksvg2/svg/SVGURIReference.cpp:
223         * ksvg2/svg/SVGUseElement.cpp:
224         * ksvg2/svg/SVGViewElement.cpp:
225         * ksvg2/svg/SVGZoomAndPan.cpp:
226
227 2006-12-17  Nikolas Zimmermann  <zimmermann@kde.org>
228
229         Reviewed by Rob.
230
231         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11813
232
233         Pass SVGLength around by value, remove any SVGLength* usage.
234         Bindings work fine, as the SVG POD JS Wrapper stuff is already in svn.
235
236         No new regressions, none fixed. But the code itself is much cleaner.
237         And some problems with width-full-percentage.svg have been fixed, viewport
238         clipping works in any case now, also for percentual width/height values set on <svg>.
239
240         * bindings/scripts/CodeGenerator.pm:
241         * bindings/scripts/CodeGeneratorJS.pm:
242         * ksvg2/misc/KCanvasRenderingStyle.cpp:
243         (WebCore::KSVGPainterFactory::cssPrimitiveToLength):
244         * ksvg2/svg/SVGAnimatedTemplate.h:
245         * ksvg2/svg/SVGCircleElement.cpp:
246         (WebCore::SVGCircleElement::SVGCircleElement):
247         (WebCore::SVGCircleElement::parseMappedAttribute):
248         (WebCore::SVGCircleElement::toPathData):
249         * ksvg2/svg/SVGCircleElement.h:
250         * ksvg2/svg/SVGCursorElement.cpp:
251         (WebCore::SVGCursorElement::SVGCursorElement):
252         (WebCore::SVGCursorElement::parseMappedAttribute):
253         * ksvg2/svg/SVGCursorElement.h:
254         * ksvg2/svg/SVGElement.cpp:
255         * ksvg2/svg/SVGEllipseElement.cpp:
256         (WebCore::SVGEllipseElement::SVGEllipseElement):
257         (WebCore::SVGEllipseElement::parseMappedAttribute):
258         (WebCore::SVGEllipseElement::toPathData):
259         * ksvg2/svg/SVGEllipseElement.h:
260         * ksvg2/svg/SVGFilterElement.cpp:
261         (WebCore::SVGFilterElement::SVGFilterElement):
262         (WebCore::SVGFilterElement::parseMappedAttribute):
263         (WebCore::SVGFilterElement::canvasResource):
264         * ksvg2/svg/SVGFilterElement.h:
265         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
266         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
267         (WebCore::SVGFilterPrimitiveStandardAttributes::parseMappedAttribute):
268         (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
269         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
270         * ksvg2/svg/SVGFitToViewBox.cpp:
271         (WebCore::SVGFitToViewBox::parseViewBox):
272         * ksvg2/svg/SVGForeignObjectElement.cpp:
273         (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
274         (WebCore::SVGForeignObjectElement::parseMappedAttribute):
275         (WebCore::SVGForeignObjectElement::createRenderer):
276         (WebCore::SVGForeignObjectElement::childShouldCreateRenderer):
277         * ksvg2/svg/SVGForeignObjectElement.h:
278         * ksvg2/svg/SVGHelper.cpp:
279         (WebCore::SVGHelper::parseSeparatedList):
280         * ksvg2/svg/SVGHelper.h:
281         * ksvg2/svg/SVGImageElement.cpp:
282         (WebCore::SVGImageElement::SVGImageElement):
283         (WebCore::SVGImageElement::parseMappedAttribute):
284         * ksvg2/svg/SVGImageElement.h:
285         * ksvg2/svg/SVGLength.cpp:
286         (WebCore::storeUnit):
287         (WebCore::extractMode):
288         (WebCore::extractType):
289         (WebCore::lengthTypeToString):
290         (WebCore::stringToLengthType):
291         (WebCore::SVGLength::SVGLength):
292         (WebCore::SVGLength::unitType):
293         (WebCore::SVGLength::value):
294         (WebCore::SVGLength::setValue):
295         (WebCore::SVGLength::setValueInSpecifiedUnits):
296         (WebCore::SVGLength::setValueAsString):
297         (WebCore::SVGLength::valueAsString):
298         (WebCore::SVGLength::newValueSpecifiedUnits):
299         (WebCore::SVGLength::convertToSpecifiedUnits):
300         (WebCore::SVGLength::isFraction):
301         (WebCore::SVGLength::dpi):
302         (WebCore::SVGLength::PercentageOfViewport):
303         * ksvg2/svg/SVGLength.h:
304         (WebCore::):
305         (WebCore::SVGLength::):
306         * ksvg2/svg/SVGLength.idl:
307         * ksvg2/svg/SVGLengthList.cpp:
308         (WebCore::SVGLengthList::SVGLengthList):
309         (WebCore::SVGLengthList::parse):
310         * ksvg2/svg/SVGLengthList.h:
311         * ksvg2/svg/SVGLineElement.cpp:
312         (WebCore::SVGLineElement::SVGLineElement):
313         (WebCore::SVGLineElement::parseMappedAttribute):
314         (WebCore::SVGLineElement::toPathData):
315         * ksvg2/svg/SVGLineElement.h:
316         * ksvg2/svg/SVGLinearGradientElement.cpp:
317         (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
318         (WebCore::SVGLinearGradientElement::parseMappedAttribute):
319         (WebCore::SVGLinearGradientElement::buildGradient):
320         * ksvg2/svg/SVGLinearGradientElement.h:
321         * ksvg2/svg/SVGMarkerElement.cpp:
322         (WebCore::SVGMarkerElement::SVGMarkerElement):
323         (WebCore::SVGMarkerElement::parseMappedAttribute):
324         (WebCore::SVGMarkerElement::canvasResource):
325         * ksvg2/svg/SVGMarkerElement.h:
326         * ksvg2/svg/SVGMaskElement.cpp:
327         (WebCore::SVGMaskElement::SVGMaskElement):
328         (WebCore::SVGMaskElement::attributeChanged):
329         (WebCore::SVGMaskElement::parseMappedAttribute):
330         (WebCore::SVGMaskElement::drawMaskerContent):
331         * ksvg2/svg/SVGMaskElement.h:
332         * ksvg2/svg/SVGPatternElement.cpp:
333         (WebCore::SVGPatternElement::SVGPatternElement):
334         (WebCore::SVGPatternElement::parseMappedAttribute):
335         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
336         (WebCore::SVGPatternElement::notifyAttributeChange):
337         (WebCore::SVGPatternElement::getCTM):
338         * ksvg2/svg/SVGPatternElement.h:
339         * ksvg2/svg/SVGRadialGradientElement.cpp:
340         (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
341         (WebCore::SVGRadialGradientElement::parseMappedAttribute):
342         (WebCore::SVGRadialGradientElement::buildGradient):
343         * ksvg2/svg/SVGRadialGradientElement.h:
344         * ksvg2/svg/SVGRectElement.cpp:
345         (WebCore::SVGRectElement::SVGRectElement):
346         (WebCore::SVGRectElement::parseMappedAttribute):
347         (WebCore::SVGRectElement::toPathData):
348         * ksvg2/svg/SVGRectElement.h:
349         * ksvg2/svg/SVGSVGElement.cpp:
350         (WebCore::SVGSVGElement::SVGSVGElement):
351         (WebCore::SVGSVGElement::viewport):
352         (WebCore::SVGSVGElement::parseMappedAttribute):
353         (WebCore::SVGSVGElement::createSVGLength):
354         (WebCore::SVGSVGElement::getCTM):
355         (WebCore::SVGSVGElement::getScreenCTM):
356         * ksvg2/svg/SVGSVGElement.h:
357         * ksvg2/svg/SVGStyledElement.cpp:
358         * ksvg2/svg/SVGStyledElement.h:
359         * ksvg2/svg/SVGTextContentElement.cpp:
360         (WebCore::SVGTextContentElement::SVGTextContentElement):
361         (WebCore::SVGTextContentElement::parseMappedAttribute):
362         * ksvg2/svg/SVGTextContentElement.h:
363         * ksvg2/svg/SVGTextElement.cpp:
364         * ksvg2/svg/SVGTextPositioningElement.cpp:
365         (WebCore::SVGTextPositioningElement::parseMappedAttribute):
366         * ksvg2/svg/SVGUseElement.cpp:
367         (WebCore::SVGUseElement::SVGUseElement):
368         (WebCore::SVGUseElement::parseMappedAttribute):
369         (WebCore::SVGUseElement::closeRenderer):
370         * ksvg2/svg/SVGUseElement.h:
371         * page/EventHandler.cpp:
372         (WebCore::selectCursor):
373         * rendering/RenderForeignObject.cpp:
374         (WebCore::RenderForeignObject::translationForAttributes):
375         * rendering/RenderPath.cpp:
376         * rendering/RenderPath.h:
377         * rendering/RenderSVGContainer.cpp:
378         (WebCore::RenderSVGContainer::layout):
379         (WebCore::RenderSVGContainer::calcViewport):
380         * rendering/RenderSVGImage.cpp:
381         (WebCore::RenderSVGImage::relativeBBox):
382         (WebCore::RenderSVGImage::getAbsoluteRepaintRect):
383         (WebCore::RenderSVGImage::translationForAttributes):
384         * rendering/RenderSVGText.cpp:
385         (WebCore::RenderSVGText::layout):
386         * rendering/SVGInlineFlowBox.cpp:
387         (WebCore::translateBox):
388         (WebCore::placePositionedBoxesHorizontally):
389         (WebCore::placeBoxesVerticallyWithAbsBaseline):
390
391 2006-12-16  Sam Weinig  <sam@webkit.org>
392
393         Reviewed by Maciej.
394
395         Patch for http://bugs.webkit.org/show_bug.cgi?id=11856
396         Update renderName() methods to return current class names.
397
398         * rendering/RenderPath.h:
399         (WebCore::RenderPath::renderName): Returns "RenderPath" instead of "KCanvasItem".
400         * rendering/RenderSVGContainer.h:
401         (WebCore::RenderSVGContainer::renderName): Returns "RenderSVGContainer" instead of "KCanvasContainer".
402         * rendering/RenderTextControl.h:
403         (WebCore::RenderTextControl::renderName): Returns "RenderTextControl" instead of "RenderTextField".
404
405 2006-12-16  Sam Weinig  <sam@webkit.org>
406
407         Reviewed by Mitz.
408
409         Patch for http://bugs.webkit.org/show_bug.cgi?id=11844
410         Code Cleanup for more of the rendering code
411
412         * WebCore.xcodeproj/project.pbxproj:
413         * rendering/RenderCounter.cpp:
414         (WebCore::RenderCounter::calcMinMaxWidth):
415         * rendering/RenderText.cpp:
416         (WebCore::RenderText::RenderText):
417         (WebCore::RenderText::setStyle):
418         (WebCore::RenderText::destroy):
419         (WebCore::RenderText::attachTextBox):
420         (WebCore::RenderText::findNextInlineTextBox):
421         (WebCore::RenderText::positionForCoordinates):
422         (WebCore::firstRendererOnNextLine):
423         (WebCore::lastRendererOnPrevLine):
424         (WebCore::RenderText::caretRect):
425         (WebCore::RenderText::posOfChar):
426         (WebCore::RenderText::allAscii):
427         (WebCore::RenderText::shouldUseMonospaceCache):
428         (WebCore::RenderText::cacheWidths):
429         (WebCore::RenderText::widthFromCache):
430         (WebCore::RenderText::trimmedMinMaxWidth):
431         (WebCore::RenderText::calcMinMaxWidth):
432         (WebCore::isSpaceAccordingToStyle):
433         (WebCore::RenderText::containsOnlyWhitespace):
434         (WebCore::RenderText::minXPos):
435         (WebCore::RenderText::setSelectionState):
436         (WebCore::RenderText::setTextWithOffset):
437         (WebCore::RenderText::setText):
438         (WebCore::RenderText::position):
439         (WebCore::RenderText::width):
440         (WebCore::RenderText::getAbsoluteRepaintRect):
441         (WebCore::RenderText::selectionRect):
442         (WebCore::RenderText::verticalPositionHint):
443         (WebCore::RenderText::font):
444         (WebCore::RenderText::caretMinOffset):
445         (WebCore::RenderText::caretMaxOffset):
446         (WebCore::RenderText::previousOffset):
447         (WebCore::RenderText::nextOffset):
448         (WebCore::RenderText::inlineBox):
449         * rendering/RenderText.h:
450         (WebCore::RenderText::isTextFragment):
451         (WebCore::RenderText::data):
452         (WebCore::RenderText::string):
453         (WebCore::RenderText::paint):
454         (WebCore::RenderText::layout):
455         (WebCore::RenderText::nodeAtPoint):
456         (WebCore::RenderText::length):
457         (WebCore::RenderText::text):
458         (WebCore::RenderText::stringLength):
459         * rendering/RenderTextControl.cpp:
460         (WebCore::RenderTextControl::setStyle):
461         (WebCore::disabledTextColor):
462         (WebCore::RenderTextControl::createInnerBlockStyle):
463         (WebCore::RenderTextControl::createInnerTextStyle):
464         (WebCore::RenderTextControl::createResultsButtonStyle):
465         (WebCore::RenderTextControl::createCancelButtonStyle):
466         (WebCore::RenderTextControl::showPlaceholderIfNeeded):
467         (WebCore::RenderTextControl::hidePlaceholderIfNeeded):
468         (WebCore::RenderTextControl::createSubtreeIfNeeded):
469         (WebCore::RenderTextControl::updateFromElement):
470         (WebCore::RenderTextControl::selectionStart):
471         (WebCore::RenderTextControl::setSelectionRange):
472         (WebCore::RenderTextControl::visiblePositionForIndex):
473         (WebCore::RenderTextControl::subtreeHasChanged):
474         (WebCore::RenderTextControl::textWithHardLineBreaks):
475         (WebCore::RenderTextControl::calcHeight):
476         (WebCore::RenderTextControl::nodeAtPoint):
477         (WebCore::RenderTextControl::layout):
478         (WebCore::RenderTextControl::calcMinMaxWidth):
479         (WebCore::RenderTextControl::addSearchResult):
480         (WebCore::RenderTextControl::showPopup):
481         (WebCore::RenderTextControl::itemText):
482         (WebCore::RenderTextControl::itemIsEnabled):
483         (WebCore::RenderTextControl::listSize):
484         (WebCore::RenderTextControl::scroll):
485         * rendering/RenderTextControl.h:
486         (WebCore::RenderTextControl::renderName):
487         (WebCore::RenderTextControl::removeLeftoverAnonymousBoxes):
488         * rendering/RenderTextFragment.cpp:
489         (WebCore::RenderTextFragment::RenderTextFragment):
490         (WebCore::RenderTextFragment::originalString):
491         * rendering/RenderTextFragment.h:
492         (WebCore::RenderTextFragment::isTextFragment):
493         * rendering/RenderTheme.cpp:
494         (WebCore::RenderTheme::adjustStyle):
495         (WebCore::RenderTheme::isControlStyled):
496         (WebCore::RenderTheme::stateChanged):
497         (WebCore::RenderTheme::adjustCheckboxStyle):
498         (WebCore::RenderTheme::adjustRadioStyle):
499         * rendering/RenderTheme.h:
500         (WebCore::):
501         * rendering/RenderThemeMac.h:
502         * rendering/RenderThemeMac.mm:
503         (WebCore::RenderThemeMac::RenderThemeMac):
504         (WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor):
505         (WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor):
506         (WebCore::RenderThemeMac::activeListBoxSelectionBackgroundColor):
507         (WebCore::RenderThemeMac::systemFont):
508         (WebCore::RenderThemeMac::isControlStyled):
509         (WebCore::RenderThemeMac::adjustRepaintRect):
510         (WebCore::RenderThemeMac::updateCheckedState):
511         (WebCore::RenderThemeMac::controlSupportsTints):
512         (WebCore::RenderThemeMac::setFontFromControlSize):
513         (WebCore::RenderThemeMac::paintCheckbox):
514         (WebCore::RenderThemeMac::checkboxMargins):
515         (WebCore::RenderThemeMac::setCheckboxCellState):
516         (WebCore::RenderThemeMac::setCheckboxSize):
517         (WebCore::RenderThemeMac::paintRadio):
518         (WebCore::RenderThemeMac::radioMargins):
519         (WebCore::RenderThemeMac::setRadioCellState):
520         (WebCore::RenderThemeMac::setRadioSize):
521         (WebCore::RenderThemeMac::adjustButtonStyle):
522         (WebCore::RenderThemeMac::buttonMargins):
523         (WebCore::RenderThemeMac::setButtonSize):
524         (WebCore::RenderThemeMac::setButtonCellState):
525         (WebCore::RenderThemeMac::adjustTextFieldStyle):
526         (WebCore::RenderThemeMac::adjustTextAreaStyle):
527         (WebCore::RenderThemeMac::popupButtonMargins):
528         (WebCore::RenderThemeMac::popupButtonPadding):
529         (WebCore::TopGradientInterpolate):
530         (WebCore::BottomGradientInterpolate):
531         (WebCore::MainGradientInterpolate):
532         (WebCore::TrackGradientInterpolate):
533         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
534         (WebCore::RenderThemeMac::paintMenuListButton):
535         (WebCore::RenderThemeMac::adjustMenuListStyle):
536         (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
537         (WebCore::RenderThemeMac::paintSliderTrack):
538         (WebCore::RenderThemeMac::paintSliderThumb):
539         (WebCore::RenderThemeMac::paintSearchField):
540         (WebCore::RenderThemeMac::setSearchCellState):
541         (WebCore::RenderThemeMac::adjustSearchFieldStyle):
542         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
543         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
544         * rendering/RenderTreeAsText.cpp:
545         (WebCore::operator<<):
546         (WebCore::writeIndent):
547         (WebCore::printBorderStyle):
548         (WebCore::getTagName):
549         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
550         (WebCore::writeTextRun):
551         (WebCore::write):
552         (WebCore::writeLayers):
553         (WebCore::nodePosition):
554         (WebCore::writeSelection):
555         * rendering/RenderTreeAsText.h:
556         * rendering/RenderView.cpp:
557         (WebCore::RenderView::RenderView):
558         (WebCore::RenderView::calcMinMaxWidth):
559         (WebCore::RenderView::layout):
560         (WebCore::RenderView::absolutePosition):
561         (WebCore::RenderView::paint):
562         (WebCore::RenderView::repaintViewRectangle):
563         (WebCore::rendererAfterPosition):
564         (WebCore::RenderView::selectionRect):
565         (WebCore::RenderView::setSelection):
566         (WebCore::RenderView::selectionStartEnd):
567         (WebCore::RenderView::updateWidgetPositions):
568         (WebCore::RenderView::addWidget):
569         (WebCore::RenderView::removeWidget):
570         (WebCore::RenderView::viewRect):
571         (WebCore::RenderView::docHeight):
572         (WebCore::RenderView::docWidth):
573         (WebCore::RenderView::setBestTruncatedAt):
574         * rendering/RenderView.h:
575         (WebCore::RenderView::renderName):
576         (WebCore::RenderView::selectionStart):
577         (WebCore::RenderView::selectionEnd):
578         * rendering/RenderWidget.cpp:
579         (WebCore::RenderWidget::destroy):
580         (WebCore::RenderWidget::resizeWidget):
581         (WebCore::RenderWidget::setStyle):
582         (WebCore::RenderWidget::paint):
583         (WebCore::RenderWidget::updateWidgetPosition):
584         (WebCore::RenderWidget::setSelectionState):
585         * rendering/RootInlineBox.cpp:
586         (WebCore::RootInlineBox::placeEllipsis):
587         (WebCore::RootInlineBox::fillLineSelectionGap):
588         (WebCore::RootInlineBox::selectionState):
589         (WebCore::RootInlineBox::firstSelectedBox):
590         (WebCore::RootInlineBox::lastSelectedBox):
591         (WebCore::RootInlineBox::selectionTop):
592         (WebCore::RootInlineBox::closestLeafChildForXPos):
593         * rendering/RootInlineBox.h:
594         (WebCore::RootInlineBox::isRootInlineBox):
595         (WebCore::RootInlineBox::setVerticalOverflowPositions):
596         (WebCore::RootInlineBox::setHorizontalOverflowPositions):
597         (WebCore::RootInlineBox::setVerticalSelectionPositions):
598         (WebCore::RootInlineBox::lineBreakObj):
599         (WebCore::RootInlineBox::lineBreakPos):
600         (WebCore::RootInlineBox::setLineBreakPos):
601         (WebCore::RootInlineBox::blockHeight):
602         (WebCore::RootInlineBox::setBlockHeight):
603         (WebCore::RootInlineBox::endsWithBreak):
604         (WebCore::RootInlineBox::setEndsWithBreak):
605         * rendering/SVGInlineFlowBox.cpp:
606         (WebCore::SVGInlineFlowBox::paint):
607         (WebCore::paintSVGInlineFlow):
608         (WebCore::translateBox):
609         (WebCore::placePositionedBoxesHorizontally):
610         (WebCore::placeBoxesVerticallyWithAbsBaseline):
611         (WebCore::placeSVGFlowVertically):
612         * rendering/SVGInlineFlowBox.h:
613         * rendering/SVGRenderTreeAsText.cpp:
614         (WebCore::TextStreamSeparator::TextStreamSeparator):
615         (WebCore::operator<<):
616         (WebCore::hasFractions):
617         (WebCore::writeIndent):
618         (WebCore::writeStyle):
619         (WebCore::getTagName):
620         (WebCore::write):
621         (WebCore::writeRenderResources):
622         * rendering/SVGRenderTreeAsText.h:
623         (WebCore::operator<<):
624         * rendering/SVGRootInlineBox.cpp:
625         (WebCore::SVGRootInlineBox::paint):
626         (WebCore::SVGRootInlineBox::placeBoxesHorizontally):
627         * rendering/SVGRootInlineBox.h:
628         * rendering/TableLayout.h:
629
630 2006-12-16  Adam Roben  <aroben@apple.com>
631
632         Build fixes.
633
634         * platform/ContextMenuItem.h: Fixed const declarations.
635         * platform/mac/ContextMenuItemMac.mm: Dito.
636         (WebCore::ContextMenuItem::type):
637         (WebCore::ContextMenuItem::setTitle):
638         (WebCore::ContextMenuItem::setChecked):
639         (WebCore::ContextMenuItem::setEnabled):
640
641 2006-12-16  Adele Peterson  <adele@apple.com>
642
643         Reviewed by Maciej.
644
645         Fix for http://bugs.webkit.org/show_bug.cgi?id=11189
646         <rdar://problem/4770249> REGRESSION (NativeListBox): When a list box has focus, pressing command- A (select all) doesn't selected all items in list
647
648         Test: fast/forms/listbox-select-all.html
649
650         * dom/Node.h: We should try to find a more appropriate place to put these methods.
651         (WebCore::Node::canSelectAll): Added.
652         (WebCore::Node::selectAll): Added.
653         * editing/SelectionController.cpp: (WebCore::SelectionController::selectAll): Before selecting editable content, give the focused node
654           a chance to select its content.
655         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::selectAll): Selects all items in a multi-select list box.  Single-select
656           list boxes will just do nothing, but we still want the select to handle this case when it has focus, rather than selecting other content.
657         * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::canSelectAll): Returns true for list boxes.
658
659 2006-12-16  Zack Rusin  <zack@kde.org>
660
661         Add a stub for SearchPopupMenu for Qt code.
662
663         * platform/qt/SearchPopupMenuQt.cpp: Added.
664         (WebCore::SearchPopupMenu::SearchPopupMenu):
665         (WebCore::SearchPopupMenu::saveRecentSearches):
666         (WebCore::SearchPopupMenu::loadRecentSearches):
667
668 2006-12-16  Zack Rusin  <zack@kde.org>
669
670         Make it compile after last nights changes.
671
672         * WebCore.pro:
673         * loader/qt/DocumentLoaderQt.cpp:
674         (WebCore::DocumentLoader::stopLoading):
675         (WebCore::DocumentLoader::prepareForLoadStart):
676         * platform/qt/ContextMenuItemQt.cpp:
677         (WebCore::ContextMenuItem::ContextMenuItem):
678         (WebCore::ContextMenuItem::releasePlatformDescription):
679         (WebCore::ContextMenuItem::type):
680         (WebCore::ContextMenuItem::setType):
681         (WebCore::ContextMenuItem::action):
682         (WebCore::ContextMenuItem::setAction):
683         (WebCore::ContextMenuItem::setTitle):
684         (WebCore::ContextMenuItem::platformSubMenu):
685         (WebCore::ContextMenuItem::setSubMenu):
686         (WebCore::ContextMenuItem::setChecked):
687         (WebCore::ContextMenuItem::setEnabled):
688         * platform/qt/ContextMenuQt.cpp:
689         (WebCore::ContextMenu::appendItem):
690         (WebCore::ContextMenu::insertItem):
691         * platform/qt/TemporaryLinkStubs.cpp:
692
693 2006-12-16  Adele Peterson  <adele@apple.com>
694
695         One more...
696
697         * editing/ReplaceSelectionCommand.cpp:
698         (WebCore::ReplacementFragment::ReplacementFragment):
699
700 2006-12-16  Adele Peterson  <adele@apple.com>
701
702         Missed one instance of isNonWidgetTextField.
703
704         * editing/DeleteSelectionCommand.cpp:
705         (WebCore::DeleteSelectionCommand::doApply):
706
707 2006-12-16  Hunter L. Williams <hlwebkit@gmail.com>
708
709         Reviewed by Adele.
710
711         Fix mouse wheel scrolling in <textarea> controls.
712
713         * rendering/RenderTextControl.cpp:
714         * rendering/RenderTextControl.h:
715         Override |scroll| on RenderTextControl to forward the call to the RenderObject of the 
716         inner m_innerText, which has a layer that can be scrolled.
717
718 2006-12-16  Adele Peterson  <adele@apple.com>
719
720         RS by Adam.
721
722         Removed RenderLineEdit, TextField, WebCoreTextField classes, and use of isNonWidgetTextField,
723
724         * WebCore.xcodeproj/project.pbxproj:
725         * html/HTMLInputElement.cpp:
726         (WebCore::HTMLInputElement::isKeyboardFocusable):
727         (WebCore::HTMLInputElement::isMouseFocusable):
728         (WebCore::HTMLInputElement::focus):
729         (WebCore::HTMLInputElement::updateFocusAppearance):
730         (WebCore::HTMLInputElement::aboutToUnload):
731         (WebCore::HTMLInputElement::dispatchFocusEvent):
732         (WebCore::HTMLInputElement::dispatchBlurEvent):
733         (WebCore::HTMLInputElement::setValue):
734         (WebCore::HTMLInputElement::defaultEventHandler):
735         * html/HTMLInputElement.h:
736         (WebCore::HTMLInputElement::isTextField):
737         * html/HTMLTextFieldInnerElement.cpp:
738         (WebCore::HTMLTextFieldInnerTextElement::defaultEventHandler):
739         * platform/TextField.h: Removed.
740         * platform/mac/TextFieldMac.mm: Removed.
741         * platform/mac/WebCoreTextField.h: Removed.
742         * platform/mac/WebCoreTextField.mm: Removed.
743         * rendering/RenderLineEdit.cpp: Removed.
744         * rendering/RenderLineEdit.h: Removed.
745
746 2006-12-16  Adele Peterson  <adele@apple.com>
747
748         Two more files I forgot to svn add for search fields.
749
750         * platform/SearchPopupMenu.h: Added.
751         (WebCore::SearchPopupMenu::create):
752         * platform/mac/SearchPopupMenuMac.mm: Added.
753         (WebCore::SearchPopupMenu::SearchPopupMenu):
754         (WebCore::autosaveKey):
755         (WebCore::SearchPopupMenu::saveRecentSearches):
756         (WebCore::SearchPopupMenu::loadRecentSearches):
757
758 2006-12-16  Adele Peterson  <adele@apple.com>
759
760         Reviewed by Adam.
761
762         * platform/PopupMenuClient.h: Added. Broken out of PopupMenu class.
763         (WebCore::PopupMenuClient::~PopupMenuClient):
764
765 2006-12-16  Adele Peterson  <adele@apple.com>
766
767         Reviewed by Adam.
768
769         WebCore part of fix for:
770         <rdar://problem/4463829> Switch to use new search field implementation for <input type="search">
771
772         * WebCore.xcodeproj/project.pbxproj: Added SearchPopupMenu.h, SearchPopupMenuMac.mm, and PopupMenuClient.h.
773
774         Added pseudo classes and corresponding values for -webkit appearance for the cancel button and for the three types of "decoration" that 
775         correspond to the different functions of the magnifier glass in the search field.  One for the button that will show and hide the
776         recent searches menu.  One for decoration when the results attribute is set, but no results are saved.  And one for decoration
777         when no results attribute is set.  We added these different pseudo elements so that RenderTextControl can decide which pseudo class
778         is appropriate, and each theme can decide for itself which kind of image is appropriate for each function.
779         
780         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType):
781         * css/CSSSelector.h: (WebCore::CSSSelector::): Added to PseudoType enum.
782         * css/CSSValueKeywords.in: Added searchfield-decoration, searchfield-results-decoration, searchfield-results-button, searchfield-cancel-button values.
783         * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): Added cases for -webkit-search-cancel-button, 
784           -webkit-search-decoration, -webkit-search-results-decoration, -webkit-search-results-button
785         * rendering/RenderStyle.cpp: Addes new pseudoBits for matching pseudoIds.
786         (WebCore::):
787         (WebCore::pseudoBit):
788         * rendering/RenderStyle.h: Added new appearance values and pseudoIds.
789         (WebCore::):
790         (WebCore::RenderStyle::):
791         * css/html4.css: Added style for input[type=search], and the new pseudo elements.
792
793         The structure of the shadow DOM for new search field adds an intermediate block that contains 3 inline-blocks for the magnifier, text element, and cancel button.
794         Since the tree has become deeper, some editing and event code that used to check for a shadowParent, really needs to check the shadowAncestorNode.
795
796         * editing/Editor.cpp: (WebCore::Editor::dispatchCPPEvent): Check shadowAncestorNode instead of shadowParentNode.
797         * editing/Selection.cpp: (WebCore::Selection::adjustForEditableContent): ditto.
798         * editing/htmlediting.cpp:
799         (WebCore::firstEditablePositionAfterPositionInRoot): ditto.
800         (WebCore::lastEditablePositionBeforePositionInRoot): ditto.
801         * editing/ReplaceSelectionCommand.cpp:
802         (WebCore::ReplacementFragment::ReplacementFragment): ditto.
803         (WebCore::ReplaceSelectionCommand::shouldMerge): Nil check enclosingBlock call.  I ran into this while testing search fields in mixed editability.
804         (WebCore::ReplaceSelectionCommand::doApply): ditto.
805
806         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): Remove use of RenderLineEdit.
807         * html/HTMLInputElement.cpp:
808         (WebCore::HTMLInputElement::selectionStart): ditto.
809         (WebCore::HTMLInputElement::selectionEnd): ditto.
810         (WebCore::HTMLInputElement::setSelectionStart): ditto.
811         (WebCore::HTMLInputElement::setSelectionEnd): ditto.
812         (WebCore::HTMLInputElement::select): ditto.
813         (WebCore::HTMLInputElement::setSelectionRange): ditto.
814         (WebCore::HTMLInputElement::parseMappedAttribute): ditto.
815         (WebCore::HTMLInputElement::createRenderer): ditto.
816         (WebCore::HTMLInputElement::defaultEventHandler): ditto.
817         (WebCore::HTMLInputElement::addSearchResult): Added. Calls addSearchResult on the renderer.
818         * html/HTMLInputElement.h:
819         (WebCore::HTMLInputElement::isNonWidgetTextField): Added case for search field.
820         (WebCore::HTMLInputElement::isSearchField): Added.
821
822         * platform/PopupMenu.h: Broke PopupMenuClient out into a separate file.
823         * platform/PopupMenuClient.h: Added.
824         (WebCore::PopupMenuClient::~PopupMenuClient):
825         * platform/graphics/Icon.h:
826
827         * platform/SearchPopupMenu.h: Added. Saves and loads recent search vector.
828         (WebCore::SearchPopupMenu::create):
829         * platform/mac/SearchPopupMenuMac.mm: Added.
830         (WebCore::SearchPopupMenu::SearchPopupMenu):
831         (WebCore::autosaveKey):
832         (WebCore::SearchPopupMenu::saveRecentSearches):
833         (WebCore::SearchPopupMenu::loadRecentSearches):
834
835         * html/HTMLTextFieldInnerElement.h: Reorganized this class.
836           Added subclasses HTMLTextFieldInnerTextElement, HTMLSearchFieldResultsButtonElement, HTMLSearchFieldCancelButtonElement
837         (WebCore::HTMLTextFieldInnerElement::isMouseFocusable): Added.  Returns false so setFocusNodeIfNeeded 
838          will try to focus the input element instead of nodes in the shadow tree.
839         (WebCore::HTMLTextFieldInnerElement::isShadowNode): Now returns whether or not a shadowParent has been specified.
840          * html/HTMLTextFieldInnerElement.cpp:
841         (WebCore::HTMLTextFieldInnerTextElement::HTMLTextFieldInnerTextElement):
842         (WebCore::HTMLTextFieldInnerTextElement::defaultEventHandler): Moved this from the old HTMLTextFieldInnerElement class.
843         (WebCore::HTMLSearchFieldResultsButtonElement::HTMLSearchFieldResultsButtonElement):
844         (WebCore::HTMLSearchFieldResultsButtonElement::defaultEventHandler): Shows and hides recent searches menu.
845         (WebCore::HTMLSearchFieldCancelButtonElement::HTMLSearchFieldCancelButtonElement):
846         (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler): On mouse up, clears the value from the text field.
847
848        * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::listSize): Changed return type to unsigned.
849         * rendering/RenderMenuList.h: (WebCore::RenderMenuList::valueShouldChangeOnHotTrack): Added.
850         
851         * WebCore.exp: Export _wkDrawTextFieldCellFocusRing.
852         * platform/mac/WebCoreSystemInterface.h: Added wkDrawTextFieldCellFocusRing
853         * platform/mac/WebCoreSystemInterface.mm: ditto.
854
855         * rendering/RenderTextControl.h:
856         (WebCore::RenderTextControl::popupIsVisible): Added so HTMLSearchFieldResultsButtonElement knows whether or not the menu is already up.
857         (WebCore::RenderTextControl::shouldPopOver): Added as a PopupClient method so the results menu shows up under the control instead of over.
858         (WebCore::RenderTextControl::valueShouldChangeOnHotTrack):
859         * rendering/RenderTextControl.cpp:
860         (WebCore::RenderTextControl::RenderTextControl): Initialize m_placeholderIsVisible, m_searchPopup, and m_searchPopupIsVisible.
861         (WebCore::RenderTextControl::~RenderTextControl): Detach the node at the top of the shadow tree (m_innerBlock for search fields, and m_innerText for other text controls).
862         (WebCore::RenderTextControl::setStyle): Sets style on new elements.
863         (WebCore::disabledTextColor): Added so this can be used in setPlaceholder.
864         (WebCore::RenderTextControl::createInnerBlockStyle): Added.
865         (WebCore::RenderTextControl::createInnerTextStyle): Added.
866         (WebCore::RenderTextControl::createResultsButtonStyle): Added.
867         (WebCore::RenderTextControl::createCancelButtonStyle): Added.
868         (WebCore::RenderTextControl::showPlaceholderIfNeeded): Added. Shows the placeholder if there's no value and the field doesn't have focus.
869         (WebCore::RenderTextControl::hidePlaceholderIfNeeded): Added. Clears the placeholder if there's a value or the field has focus. 
870         (WebCore::RenderTextControl::createSubtreeIfNeeded): Added. Creates all of the shadow tree elements.
871         (WebCore::RenderTextControl::updateFromElement): Calls showPlaceholderIfNeeded.
872         (WebCore::RenderTextControl::visiblePositionForIndex): Renaming (m_div to m_innerText).
873         (WebCore::RenderTextControl::indexForVisiblePosition): ditto.
874         (WebCore::RenderTextControl::updateCancelButtonVisibility): Shows and hides cancel button based on the value of the control.
875         (WebCore::RenderTextControl::subtreeHasChanged): Fires onSearch if the incremental attribute is set.
876         (WebCore::RenderTextControl::text): Renaming.
877         (WebCore::RenderTextControl::textWithHardLineBreaks): ditto.
878         (WebCore::RenderTextControl::calcHeight): Take the size of the results button and cancel button into account when calculating height.
879         (WebCore::RenderTextControl::nodeAtPoint): Act as if we've hit the shadow tree elements based on the x coordinate of the mouse event.
880         (WebCore::RenderTextControl::layout): Set the height and width of the text block taking the other shadow tree elements into account.
881         (WebCore::RenderTextControl::calcMinMaxWidth): Take new shadow tree elements into account when calculating width.
882         (WebCore::RenderTextControl::forwardEvent): Forward events to appropriate shadow nodes.
883         (WebCore::RenderTextControl::scrollWidth): Renaming.
884         (WebCore::RenderTextControl::scrollHeight): ditto.
885         (WebCore::RenderTextControl::scrollLeft): ditto.
886         (WebCore::RenderTextControl::scrollTop): ditto.
887         (WebCore::RenderTextControl::setScrollLeft): ditto.
888         (WebCore::RenderTextControl::setScrollTop): ditto.
889         (WebCore::RenderTextControl::autosaveName): ditto.
890         (WebCore::RenderTextControl::addSearchResult): Added. Saves value to search result list.
891         (WebCore::RenderTextControl::onSearch): Added. Dispatches search event.
892         (WebCore::RenderTextControl::showPopup): Added. Loads searches, and displays menu.
893         (WebCore::RenderTextControl::hidePopup): Added PopupClient method.
894         (WebCore::RenderTextControl::valueChanged): Added PopupClient method. Interprets the selected menu item index, and either sets the value and 
895          fires onSearch, or clears all recent searches for this autosave name.
896         (WebCore::RenderTextControl::itemText): Added PopupClient method.
897         (WebCore::RenderTextControl::itemIsEnabled): Added PopupClient method.
898         (WebCore::RenderTextControl::itemStyle): ditto.
899         (WebCore::RenderTextControl::clientStyle): ditto.
900         (WebCore::RenderTextControl::clientDocument): ditto.
901         (WebCore::RenderTextControl::clientPaddingLeft): ditto.
902         (WebCore::RenderTextControl::clientPaddingRight): ditto.
903         (WebCore::RenderTextControl::listSize): ditto.
904         (WebCore::RenderTextControl::selectedIndex): ditto.
905         (WebCore::RenderTextControl::itemIsSeparator): ditto.
906         (WebCore::RenderTextControl::itemIsLabel): ditto.
907         (WebCore::RenderTextControl::itemIsSelected): ditto.
908         (WebCore::RenderTextControl::setTextFromItem): ditto.
909
910         * rendering/RenderTheme.cpp: Added search field theme.
911         (WebCore::RenderTheme::adjustStyle):
912         (WebCore::RenderTheme::paint):
913         (WebCore::RenderTheme::paintBorderOnly):
914         (WebCore::RenderTheme::paintDecorations):
915         (WebCore::RenderTheme::isControlStyled): Returns false for search fields, until we've worked out the kinks.
916         (WebCore::RenderTheme::adjustSearchFieldStyle):
917         (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
918         (WebCore::RenderTheme::adjustSearchFieldDecorationStyle):
919         (WebCore::RenderTheme::adjustSearchFieldResultsDecorationStyle):
920         (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
921         * rendering/RenderTheme.h:
922         (WebCore::RenderTheme::paintSearchField):
923         (WebCore::RenderTheme::paintSearchFieldCancelButton):
924         (WebCore::RenderTheme::paintSearchFieldDecoration):
925         (WebCore::RenderTheme::paintSearchFieldResultsDecoration):
926         (WebCore::RenderTheme::paintSearchFieldResultsButton):
927         * rendering/RenderThemeMac.h:
928         * rendering/RenderThemeMac.mm:
929         (WebCore::RenderThemeMac::RenderThemeMac):
930         (WebCore::RenderThemeMac::sizeForSystemFont): Added.  Compares style's font to systemFontSizeForControlSize to determine
931          what controlSize to use after a style's font has already been initially adjusted.
932         (WebCore::RenderThemeMac::controlSizeForSystemFont): Added. ditto.
933         (WebCore::RenderThemeMac::paintCheckbox):
934         (WebCore::RenderThemeMac::paintRadio):
935         (WebCore::RenderThemeMac::menuListSizes): 
936         (WebCore::RenderThemeMac::minimumMenuListSize): Uses sizeForSystemFont instead of hardcoded adjusted font sizes.
937         (WebCore::RenderThemeMac::paintSearchField):
938         (WebCore::RenderThemeMac::setSearchCellState):
939         (WebCore::RenderThemeMac::adjustSearchFieldStyle):
940         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
941         (WebCore::RenderThemeMac::cancelButtonSizes):
942         (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
943         (WebCore::RenderThemeMac::resultsButtonSizes):
944         (WebCore::RenderThemeMac::adjustSearchFieldDecorationStyle):
945         (WebCore::RenderThemeMac::paintSearchFieldDecoration):
946         (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationStyle):
947         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
948         (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
949         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
950
951 2006-12-16  Beth Dakin  <bdakin@apple.com>
952
953         Reviewed by Adam (and partially Geoff).
954
955         Primarily, this patch gives WebCore context menus the ability to
956         enable/disable and set state. It does a few other things along the
957         way, though. Some of the more noticeable things:
958                -Re-architects the ContextMenuItem class a bit so that the
959                 ownership model is a bit less confusing. ContextMenuItem is
960                 now *purely* a wrapper for the platformDescription. There
961                 are no other member variables. If you ever need the
962                 platformDescription outside of the MenuItem class, you have
963                 to call releasePlatformDescription(), which transfers
964                 ownership of the platformDescription to the caller.
965                -Moves fontForSelection() from FrameMac into Editor.cpp.
966                 Turns out I don't need to use this function for my patch
967                 after all, but it doesn't seem like a terrible idea to move
968                 it anyway since we seem to be moving things from FrameMac
969                 into Editor these days anyway.
970
971         * WebCore.exp:
972         * editing/Editor.cpp:
973         (WebCore::Editor::fontForSelection): Moved in from FrameMac.
974         * editing/Editor.h: Same, and name change.
975         * editing/mac/EditorMac.mm: Name change.
976         * page/ContextMenuClient.h: contextMenuItemSelected() has to take a
977         pointer to the parent context menu since ContextMenuItem no longer
978         holds on to it.
979         * page/ContextMenuController.cpp: Same.
980         (WebCore::ContextMenuController::contextMenuItemSelected): Same.
981         * page/mac/FrameMac.h: Move fontForSelection to Editor
982         * page/mac/FrameMac.mm: Same.
983         * page/mac/WebCoreFrameBridge.mm:
984         (-[WebCoreFrameBridge fontForSelection:]): Account for above.
985         * platform/ContextMenu.cpp:
986         (WebCore::separatorItem): Can't be const because appendItem now
987         expects a non-const menu item.
988         (WebCore::createAndAppendFontSubMenu): Change name for clarity.
989         (WebCore::createAndAppendSpellingAndGrammarSubMenu): Same.
990         (WebCore::createAndAppendSpellingSubMenu): Same.
991         (WebCore::createAndAppendSpeechSubMenu): Same.
992         (WebCore::createAndAppendWritingDirectionSubMenu): Same.
993         (WebCore::ContextMenu::populate): Account for above.
994         (WebCore::triStateToBool): New helper.
995         (WebCore::ContextMenu::checkOrEnableIfNeeded): Transfers
996         logic from WebHTMLView into WebCore to determine if menu items are
997         enabled or disabled and to determine if they require a check.
998         * platform/ContextMenu.h:
999         * platform/ContextMenuItem.h: Re-factored stuff so that our only
1000         member variable is the platform description.
1001         (WebCore::): Get rid of if-def.
1002         * platform/cf/RetainPtr.h: Add releaseRef like in PassRefPtr.
1003         (WebCore::RetainPtr::releaseRef):
1004         * platform/mac/ContextMenuItemMac.mm: Same as .h
1005         (WebCore::ContextMenuItem::ContextMenuItem): Same.
1006         (WebCore::ContextMenuItem::releasePlatformDescription): Same.
1007         (WebCore::ContextMenuItem::type): Same.
1008         (WebCore::ContextMenuItem::platformSubMenu): Same.
1009         (WebCore::ContextMenuItem::setType): Same.
1010         (WebCore::ContextMenuItem::setTitle): Same.
1011         (WebCore::ContextMenuItem::setSubMenu): Same.
1012         (WebCore::ContextMenuItem::setChecked): Same.
1013         (WebCore::ContextMenuItem::setEnabled): Same.
1014         * platform/mac/ContextMenuMac.mm:
1015         (-[WebCoreMenuTarget forwardContextMenuAction:]): Don't set the
1016         parent menu.
1017         (WebCore::setMenuItemTarget):
1018         (WebCore::ContextMenu::appendItem): Call releasePlatformDescription
1019         (WebCore::ContextMenu::insertItem): Same.
1020
1021 2006-12-15  MorganL  <morganl.webkit@yahoo.com>
1022
1023         Reviewed by Oliver.
1024
1025         Allow images to load into frames again.  Tidy up code a bit and
1026         add some much needed documentation.
1027
1028         * platform/MimeTypeRegistry.cpp:
1029         (WebCore::initialiseSupportedImageMIMETypes):
1030         (WebCore::initialiseSupportedNonImageMimeTypes):
1031         * platform/MimeTypeRegistry.h:
1032
1033 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
1034
1035         Fix build.
1036
1037         * loader/DocumentLoader.cpp:
1038         (WebCore::DocumentLoader::response):
1039         (WebCore::DocumentLoader::setResponse):
1040         (WebCore::DocumentLoader::isStopping):
1041         (WebCore::DocumentLoader::mainDocumentError):
1042         * loader/DocumentLoader.h:
1043
1044 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
1045
1046         Reviewed by Geoff.
1047
1048         More loader cleanup.
1049
1050         * loader/DocumentLoader.h:
1051         (WebCore::DocumentLoader::isStopping):
1052         (WebCore::DocumentLoader::response):
1053         (WebCore::DocumentLoader::mainDocumentError):
1054         (WebCore::DocumentLoader::setResponse):
1055         * loader/FrameLoader.h:
1056         * loader/FrameLoaderClient.h:
1057         * loader/mac/DocumentLoaderMac.mm:
1058         (WebCore::DocumentLoader::DocumentLoader):
1059         (WebCore::DocumentLoader::stopLoading):
1060         (WebCore::DocumentLoader::receivedData):
1061         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
1062         (WebCore::DocumentLoader::prepareForLoadStart):
1063         * loader/mac/FrameLoaderMac.mm:
1064         (WebCore::FrameLoader::commitProvisionalLoad):
1065         (WebCore::FrameLoader::setResponse):
1066         * loader/mac/ImageDocumentMac.mm:
1067         (WebCore::finishImageLoad):
1068
1069 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
1070
1071         * loader/DocumentLoader.h:
1072         Whoops, didn't mean to commit this.
1073         
1074 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
1075
1076         Reviewed by Darin and Brady (in no particular order).
1077         
1078         More loader cleanup.
1079         
1080         * loader/FrameLoader.h:
1081         * loader/mac/FrameLoaderMac.mm:
1082         (WebCore::FrameLoader::cancelledError):
1083         (WebCore::FrameLoader::fileDoesNotExistError):
1084         (WebCore::FrameLoader::cannotShowMIMEType):
1085         (WebCore::FrameLoader::interruptionForPolicyChangeError):
1086         * loader/mac/MainResourceLoaderMac.mm:
1087         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
1088
1089 2006-12-16  Alexey Proskuryakov  <ap@webkit.org>
1090
1091         Try to fix Windows buid.
1092
1093         * WebCore.vcproj/WebCore/WebCore.vcproj: Added EventTarget.{h,cpp}
1094
1095 2006-12-15  Alexey Proskuryakov  <ap@webkit.org>
1096
1097         Reviewed by Darin.
1098
1099         http://bugs.webkit.org/show_bug.cgi?id=11610
1100         XMLHttpRequest.onreadystatechange doesn't provide access to the request object
1101
1102         Created a separate EventTarget class, now that EventTargetNode isn't the only kind.
1103
1104         Test: http/tests/xmlhttprequest/event-target.html
1105
1106         * WebCore.xcodeproj/project.pbxproj: Added EventTarget.{h,cpp}
1107
1108         * bindings/js/kjs_dom.cpp:
1109         (KJS::toJS): Added an EventTarget variant.
1110         * bindings/js/kjs_dom.h: Added toJS() for EventTarget; some minor style fixes.
1111
1112         * bindings/objc/DOM.mm:
1113         (+[DOMNode _eventTargetWith:WebCore::]):
1114         * bindings/scripts/CodeGeneratorObjC.pm:
1115         Added an EventTarget->DOMEventTarget converter in DOMNode (WebCoreInternal). 
1116         It only works for nodes, since we don't have an ObjC binding for XMLHttpRequest.
1117         Corrected spelling of internalHeaderContent.
1118
1119         * dom/Event.cpp:
1120         (WebCore::Event::setTarget):
1121         * dom/Event.h:
1122         (WebCore::Event::target):
1123         (WebCore::Event::currentTarget):
1124         (WebCore::Event::setCurrentTarget):
1125         These methods now work with EventTargets instead of Nodes.
1126
1127         * dom/EventTarget.cpp: Added.
1128         (WebCore::EventTarget::~EventTarget):
1129         (WebCore::EventTarget::toNode):
1130         (WebCore::EventTarget::toXMLHttpRequest):
1131         * dom/EventTarget.h: Added.
1132         (WebCore::EventTarget::ref):
1133         (WebCore::EventTarget::deref):
1134         Originally, my intention was to share much of the implementation between 
1135         EventTargetNode and XHR, but now I don't see anything substantial worth sharing.
1136
1137         * dom/EventTargetNode.cpp:
1138         (WebCore::EventTargetNode::dispatchGenericEvent): Cast Node to EventTargetNode.
1139
1140         * dom/EventTargetNode.h: Made EventTarget methods virtual.
1141         (WebCore::EventTargetNode::toNode): Added poor man's RTTI to upcast from EventTarget.
1142         (WebCore::EventTargetNode::refEventTarget):
1143         (WebCore::EventTargetNode::derefEventTarget):
1144
1145         * dom/MouseEvent.cpp:
1146         (WebCore::MouseEvent::toElement):
1147         (WebCore::MouseEvent::fromElement):
1148         * dom/MouseRelatedEvent.cpp:
1149         (WebCore::MouseRelatedEvent::receivedTarget):
1150         * html/HTMLAnchorElement.cpp:
1151         (WebCore::HTMLAnchorElement::defaultEventHandler):
1152         * html/HTMLLabelElement.cpp:
1153         (WebCore::HTMLLabelElement::defaultEventHandler):
1154         * page/ContextMenuController.cpp:
1155         (WebCore::ContextMenuController::handleContextMenuEvent):
1156         * rendering/RenderSlider.cpp:
1157         (WebCore::RenderSlider::mouseEventIsInThumb):
1158         Cast from EventTarget to Node as appropriate.
1159
1160         * xml/xmlhttprequest.cpp:
1161         (WebCore::XMLHttpRequest::dispatchEvent):
1162         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
1163         Set target and currentTarget before dispatching.
1164
1165         * xml/xmlhttprequest.h: Made EventTarget methods virtual, added a bool tempEvent parameter
1166         to match EventTargetNode.
1167         (WebCore::XMLHttpRequest::toXMLHttpRequest): Added poor man's RTTI to upcast from EventTarget.
1168         (WebCore::XMLHttpRequest::refEventTarget):
1169         (WebCore::XMLHttpRequest::derefEventTarget):
1170
1171 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
1172
1173         Reviewed by Darin.
1174
1175         More loader cleanup, use KURL instead of NSURL in a couple of places.
1176
1177         * loader/DocumentLoader.h:
1178         * loader/FrameLoader.h:
1179         * loader/FrameLoaderClient.h:
1180         * loader/ResourceLoader.h:
1181         * loader/mac/DocumentLoaderMac.mm:
1182         (WebCore::DocumentLoader::DocumentLoader):
1183         (WebCore::DocumentLoader::prepareForLoadStart):
1184         * loader/mac/FrameLoaderMac.mm:
1185         (WebCore::FrameLoader::willUseArchive):
1186         * loader/mac/ResourceLoaderMac.mm:
1187         (WebCore::ResourceLoader::load):
1188
1189 2006-12-15  Marvin Decker  <marv.decker@gmail.com>
1190
1191         Reviewed by Darin and Alexey.
1192
1193         Fix the Windows build, move various Client implementations out of
1194         WebCore and into WebKit.
1195
1196         * WebCore.vcproj/WebCore/WebCore.vcproj:
1197         * bridge/win/ChromeClientWin.h: Removed.
1198         * bridge/win/ContextMenuClientWin.h: Removed.
1199         * bridge/win/EditorClientWin.h: Removed.
1200         * bridge/win/FrameWin.cpp:
1201         (WebCore::FrameWin::FrameWin):
1202         * bridge/win/FrameWin.h:
1203         * loader/win/FrameLoaderClientWin.cpp: Removed.
1204         * loader/win/FrameLoaderClientWin.h: Removed.
1205         * platform/network/win/ResourceHandleWin.cpp:
1206         (WebCore::ResourceHandle::start):
1207         * platform/win/TemporaryLinkStubs.cpp:
1208         (WebCore::DocumentLoader::URL):
1209         (WebCore::FrameLoader::load):
1210         (WebCore::FrameLoader::createFrame):
1211         (WebCore::FrameLoader::loadResourceSynchronously):
1212         (WebCore::Pasteboard::writeSelection):
1213         (WebCore::Pasteboard::writeURL):
1214         (WebCore::Pasteboard::clear):
1215         (WebCore::Pasteboard::~Pasteboard):
1216         (WebCore::PolicyCheck::call):
1217         (WebCore::PopupMenu::PopupMenu):
1218         (WebCore::ResourceHandle::loadsBlocked):
1219         (WebCore::ResourceLoader::cancel):
1220
1221 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
1222
1223         Reviewed by Maciej.
1224
1225         http://bugs.webkit.org/show_bug.cgi?id=11842
1226         REGRESSION: Using Safari's snippet editor leaves applewebdata: URLs in history
1227         
1228         * loader/mac/DocumentLoaderMac.mm:
1229         (WebCore::DocumentLoader::URLForHistory):
1230         Don't return appleweburls without an unreachable url.
1231
1232 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
1233
1234         Reviewed by Darin.
1235
1236         Replace more instances of NSError with ResourceError.
1237         
1238         Also remove a check for a selector that was added pre-Tiger.
1239         
1240         * WebCore.exp:
1241         * loader/DocumentLoader.h:
1242         * loader/FrameLoader.h:
1243         * loader/ResourceLoader.h:
1244         * loader/mac/DocumentLoaderMac.mm:
1245         (WebCore::DocumentLoader::setMainDocumentError):
1246         (WebCore::DocumentLoader::mainDocumentError):
1247         (WebCore::DocumentLoader::clearErrors):
1248         (WebCore::DocumentLoader::mainReceivedError):
1249         * loader/mac/FrameLoaderMac.mm:
1250         (WebCore::FrameLoader::cancelMainResourceLoad):
1251         (WebCore::FrameLoader::opened):
1252         (WebCore::FrameLoader::mainReceivedError):
1253         (WebCore::FrameLoader::cancelledError):
1254         (WebCore::FrameLoader::fileDoesNotExistError):
1255         (WebCore::FrameLoader::handleUnimplementablePolicy):
1256         (WebCore::FrameLoader::setMainDocumentError):
1257         (WebCore::FrameLoader::mainReceivedCompleteError):
1258         (WebCore::FrameLoader::sendRemainingDelegateMessages):
1259         (WebCore::FrameLoader::requestFromDelegate):
1260         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
1261         (WebCore::FrameLoader::loadResourceSynchronously):
1262         * loader/mac/ResourceLoaderMac.mm:
1263         (WebCore::ResourceLoader::willSendRequest):
1264         (WebCore::ResourceLoader::didCancel):
1265         (WebCore::ResourceLoader::cancel):
1266         (WebCore::ResourceLoader::cancelledError):
1267         * loader/mac/SubresourceLoaderMac.mm:
1268         (WebCore::SubresourceLoader::didCancel):
1269
1270 2006-12-15  Rob Buis  <buis@kde.org>
1271
1272         Reviewed by Darin.
1273
1274         http://bugs.webkit.org/show_bug.cgi?id=11824
1275         CSSStyleSheet.title property is always null
1276
1277         Set title on the stylesheet just after creating it, for the HTML
1278         elements <link> and <style>.
1279
1280         * css/StyleSheet.h:
1281         (WebCore::StyleSheet::setTitle):
1282         * dom/Element.cpp:
1283         (WebCore::Element::title):
1284         * dom/Element.h:
1285         * dom/StyleElement.cpp:
1286         (WebCore::StyleElement::childrenChanged):
1287         * dom/StyleElement.h:
1288         * html/HTMLElement.cpp:
1289         * html/HTMLElement.h:
1290         * html/HTMLLinkElement.cpp:
1291         (WebCore::HTMLLinkElement::parseMappedAttribute):
1292         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1293         * html/HTMLStyleElement.cpp:
1294         (WebCore::HTMLStyleElement::parseMappedAttribute):
1295         * ksvg2/svg/SVGStyleElement.cpp:
1296         (WebCore::SVGStyleElement::setTitle):
1297         (WebCore::SVGStyleElement::parseMappedAttribute):
1298         * ksvg2/svg/SVGStyleElement.h:
1299
1300 2006-12-15  Lars Knoll  <lars@trolltech.com>
1301
1302         Reviewed by Zack
1303
1304         Fix compilation.
1305
1306         * loader/SubresourceLoader.h:
1307         * platform/qt/PopupMenuQt.cpp:
1308         (WebCore::PopupMenu::PopupMenu):
1309
1310 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
1311
1312         Reviewed by Maciej.
1313
1314         Use char* pointer + length instead of NSData in a bunch of places.
1315
1316         * loader/DocumentLoader.h:
1317         * loader/FrameLoader.h:
1318         * loader/FrameLoaderClient.h:
1319         * loader/MainResourceLoader.h:
1320         * loader/NetscapePlugInStreamLoader.h:
1321         * loader/ResourceLoader.h:
1322         (WebCore::ResourceLoader::willStopBufferingData):
1323         * loader/SubresourceLoader.h:
1324         * loader/mac/DocumentLoaderMac.mm:
1325         (WebCore::DocumentLoader::commitLoad):
1326         (WebCore::DocumentLoader::receivedData):
1327         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
1328         * loader/mac/FrameLoaderMac.mm:
1329         (WebCore::FrameLoader::didReceiveData):
1330         (WebCore::FrameLoader::receivedData):
1331         (WebCore::FrameLoader::committedLoad):
1332         * loader/mac/MainResourceLoaderMac.mm:
1333         (WebCore::MainResourceLoader::addData):
1334         (WebCore::MainResourceLoader::didReceiveData):
1335         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
1336         (WebCore::NetscapePlugInStreamLoader::didReceiveData):
1337         * loader/mac/ResourceLoaderMac.mm:
1338         (WebCore::ResourceLoader::addData):
1339         (WebCore::ResourceLoader::didReceiveData):
1340         (WebCore::ResourceLoader::willStopBufferingData):
1341         * loader/mac/SubresourceLoaderMac.mm:
1342         (WebCore::SubresourceLoader::didReceiveData):
1343         * platform/network/ResourceHandleClient.h:
1344         (WebCore::ResourceHandleClient::willStopBufferingData):
1345         * platform/network/mac/ResourceHandleMac.mm:
1346         (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
1347
1348 2006-12-14  Adele Peterson  <adele@apple.com>
1349
1350         Reviewed by Adam. 
1351
1352         Added PopupMenuClient class so the PopupMenu class no longer needs to know
1353         about the RenderMenuList or the DOM.
1354
1355         * platform/PopupMenu.h:
1356         (WebCore::PopupMenuClient::~PopupMenuClient):
1357         (WebCore::PopupMenu::create): Made this protected so PopupMenu can be subclassed.
1358         (WebCore::PopupMenu::disconnectClient): Renamed from disconnectMenuList.
1359         (WebCore::PopupMenu::client): Added.
1360         * platform/mac/PopupMenuMac.mm:
1361         (WebCore::PopupMenu::PopupMenu): Created using PopupMenuClient instead of RenderMenuList.
1362         (WebCore::PopupMenu::populate): Asks the client for info about the list items instead of looking at the DOM or the renderer. 
1363         (WebCore::PopupMenu::show): ditto.
1364         (WebCore::PopupMenu::hide): ditto.
1365         * rendering/RenderMenuList.h: Now also inherits from PopupMenuClient.
1366         (WebCore::RenderMenuList::shouldPopOver): Added.  Tells the popup whether the menu should pop over the client, or under.
1367         * rendering/RenderMenuList.cpp:
1368         (WebCore::RenderMenuList::~RenderMenuList): Calls disconnectClient().
1369         (WebCore::RenderMenuList::calcMinMaxWidth): Removed unnecessary (and harmful) call to updateFromElement. updateFromElmeent
1370          can add children, and you don't want to do that in the middle of calculating width.
1371         (WebCore::RenderMenuList::itemText): Added PopupClient method to provide information about the items in the menu list.
1372         (WebCore::RenderMenuList::itemIsEnabled): ditto.
1373         (WebCore::RenderMenuList::itemStyle): ditto.
1374         (WebCore::RenderMenuList::clientStyle): ditto.
1375         (WebCore::RenderMenuList::clientDocument): ditto.
1376         (WebCore::RenderMenuList::clientPaddingLeft): ditto.
1377         (WebCore::RenderMenuList::clientPaddingRight): ditto.
1378         (WebCore::RenderMenuList::listSize): ditto.
1379         (WebCore::RenderMenuList::selectedIndex): ditto.
1380         (WebCore::RenderMenuList::itemIsSeparator): ditto.
1381         (WebCore::RenderMenuList::itemIsLabel): ditto.
1382         (WebCore::RenderMenuList::itemIsSelected): ditto.
1383         (WebCore::RenderMenuList::setTextFromItem): ditto.
1384
1385 2006-12-14  Geoffrey Garen  <ggaren@apple.com>
1386
1387         Fixed <rdar://problem/4882713> GMAIL (REGRESSION): Can't apply font style, 
1388         foreground or background to selected text
1389         
1390         Also <rdar://problem/4883751> REGRESSION: Caret fails to insert itself 
1391         automatically in a new note window
1392         
1393         I'm rolling out my change to move focus to the page level because it caused
1394         too many unexpected and bizarre regressions. Our code relies on focus
1395         being per-document so that it can make focus changes that are effectively
1396         no-ops, and so that it can conflate focus and selection in some cases (a bad 
1397         idea, since they're not the same).
1398         
1399         Hopefully we can revisit this, along with hover and active, in the future.
1400
1401         * dom/Document.cpp:
1402         (WebCore::widgetForNode):
1403         (WebCore::relinquishesEditingFocus):
1404         (WebCore::acceptsEditingFocus):
1405         (WebCore::clearSelectionIfNeeded):
1406         (WebCore::Document::removedLastRef):
1407         (WebCore::Document::detach):
1408         (WebCore::Document::focusedNodeDetached):
1409         (WebCore::Document::setFocusedNode):
1410         * dom/Document.h:
1411         (WebCore::Document::focusedNode):
1412         * page/FocusController.cpp:
1413         * page/FocusController.h:
1414
1415 2006-12-14  Maciej Stachowiak  <mjs@apple.com>
1416
1417         Reviewed by Geoff.
1418
1419         - fix failing drag & drop layout tests
1420
1421         * platform/mac/KURLMac.mm:
1422         (WebCore::KURL::getNSURL): Turn empty KURL into empty NSURL, but null KURL into
1423         nil.
1424
1425 2006-12-14  Steve Falkenburg  <sfalken@apple.com>
1426
1427         Build fix.
1428
1429         * loader/MainResourceLoader.h:
1430
1431 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
1432
1433         Reviewed by John.
1434
1435         Convert a bunch of NSErrors to ResourceError.
1436         
1437         Make the ResourceError accessor functions const.
1438         
1439         * WebCore.exp:
1440         * WebCore.xcodeproj/project.pbxproj:
1441         * loader/FrameLoader.h:
1442         * loader/FrameLoaderClient.h:
1443         * loader/MainResourceLoader.h:
1444         * loader/NetscapePlugInStreamLoader.h:
1445         * loader/ResourceLoader.h:
1446         * loader/SubresourceLoader.h:
1447         * loader/mac/FrameLoaderMac.mm:
1448         (WebCore::FrameLoader::didFailToLoad):
1449         (WebCore::FrameLoader::receivedMainResourceError):
1450         (WebCore::FrameLoader::interruptionForPolicyChangeError):
1451         * loader/mac/MainResourceLoaderMac.mm:
1452         (WebCore::MainResourceLoader::receivedError):
1453         (WebCore::MainResourceLoader::didCancel):
1454         (WebCore::MainResourceLoader::interruptionForPolicyChangeError):
1455         (WebCore::MainResourceLoader::didFail):
1456         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
1457         (WebCore::NetscapePlugInStreamLoader::didFail):
1458         (WebCore::NetscapePlugInStreamLoader::didCancel):
1459         * loader/mac/ResourceLoaderMac.mm:
1460         (WebCore::ResourceLoader::didFail):
1461         (WebCore::ResourceLoader::didCancel):
1462         * loader/mac/SubresourceLoaderMac.mm:
1463         (WebCore::SubresourceLoader::didFail):
1464         (WebCore::SubresourceLoader::didCancel):
1465         * platform/network/ResourceError.h:
1466         (WebCore::ResourceError::domain):
1467         (WebCore::ResourceError::errorCode):
1468         (WebCore::ResourceError::failingURL):
1469         (WebCore::ResourceError::localizedDescription):
1470         (WebCore::ResourceError::unpackPlatformErrorIfNeeded):
1471
1472 2006-12-14  George Staikos  <staikos@kde.org>
1473
1474         Link, after the last loader changes.  Please update this directory with stubs when modifying the loader.
1475
1476         * loader/qt/FrameLoaderQt.cpp:
1477         (WebCore::FrameLoader::loadResourceSynchronously):
1478
1479 2006-12-14  Justin Garcia  <justin.garcia@apple.com>
1480
1481         Reviewed by harrison
1482
1483         <rdar://problem/4866671>
1484         CrashTracer: 1 crashes in Mail after deleting a list item at WebCore::DeleteSelectionCommand::doApply()
1485         
1486         Don't allow VisiblePositions inside -webkit-user-select:none regions.
1487         Renamed inRenderedContent to isCandidate.
1488
1489         * dom/Document.cpp:
1490         (WebCore::Document::updateSelection):
1491         * dom/Position.cpp:
1492         (WebCore::Position::previousCharacterPosition):
1493         (WebCore::Position::nextCharacterPosition):
1494         (WebCore::nodeIsUserSelectNone):
1495         (WebCore::Position::isCandidate):
1496         (WebCore::Position::rendersInDifferentPosition):
1497         * dom/Position.h:
1498         * editing/InsertParagraphSeparatorCommand.cpp:
1499         (WebCore::InsertParagraphSeparatorCommand::doApply):
1500         * editing/InsertTextCommand.cpp:
1501         (WebCore::InsertTextCommand::input):
1502         * editing/VisiblePosition.cpp:
1503         (WebCore::VisiblePosition::canonicalPosition):
1504         * editing/htmlediting.cpp:
1505         (WebCore::nextCandidate):
1506         (WebCore::nextVisuallyDistinctCandidate):
1507         (WebCore::previousCandidate):
1508         (WebCore::previousVisuallyDistinctCandidate):
1509         * editing/visible_units.cpp:
1510         (WebCore::previousLinePosition):
1511         (WebCore::nextLinePosition):
1512         (WebCore::startOfParagraph):
1513         * page/Frame.cpp:
1514         (WebCore::Frame::styleForSelectionStart):
1515
1516 2006-12-14  David Hyatt  <hyatt@apple.com>
1517
1518         Get rid of the containsStart check and just rely on the selectionState
1519         bits.  This allows selection gap filling to behave properly in the presence
1520         of inline blocks and inline tables on lines when the selection originates
1521         inside the inline block.
1522
1523         Reviewed by ggaren
1524
1525         * rendering/RenderBlock.cpp:
1526         (WebCore::RenderBlock::fillInlineSelectionGaps):
1527
1528 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
1529
1530         Reviewed by John.
1531         
1532         General loader cleanup, convert NSURLResponse to ResourceResponse in some places.
1533         
1534         * loader/DocumentLoader.h:
1535         * loader/SubresourceLoader.h:
1536         * loader/mac/DocumentLoaderMac.mm:
1537         (WebCore::DocumentLoader::addResponse):
1538         * loader/mac/FrameLoaderMac.mm:
1539         (WebCore::FrameLoader::opened):
1540         * loader/mac/SubresourceLoaderMac.mm:
1541         (WebCore::SubresourceLoader::create):
1542
1543 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
1544
1545         Reviewed by Darin.
1546
1547         Add loadResourceSynchronously to ResourceHandle and have FrameLoader use it instead of
1548         calling NSURLConnection directly.
1549
1550         Add an isNull flag to ResourceError so we can convert correctly between nil NSErrors and ResourceErrors.
1551
1552         Get rid of ServeSynchronousRequest and use the loader instead.
1553         
1554         * WebCore.exp:
1555         * dom/XMLTokenizer.cpp:
1556         (WebCore::openFunc):
1557         * loader/FrameLoader.h:
1558         * loader/LoaderFunctions.h:
1559         * loader/mac/FrameLoaderMac.mm:
1560         (WebCore::FrameLoader::canLoad):
1561         (WebCore::FrameLoader::loadResourceSynchronously):
1562         * loader/mac/LoaderFunctionsMac.mm:
1563         * platform/network/ResourceError.h:
1564         (WebCore::ResourceError::ResourceError):
1565         (WebCore::ResourceError::isNull):
1566         * platform/network/ResourceHandle.h:
1567         * platform/network/ResourceRequest.cpp:
1568         (WebCore::ResourceRequest::isConditional):
1569         * platform/network/ResourceRequest.h:
1570         * platform/network/mac/ResourceErrorMac.mm:
1571         (-[NSError WebCore]):
1572         * platform/network/mac/ResourceHandleMac.mm:
1573         (WebCore::ResourceHandle::loadResourceSynchronously):
1574         * xml/XSLTProcessor.cpp:
1575         (WebCore::docLoaderFunc):
1576         * xml/xmlhttprequest.cpp:
1577         (WebCore::XMLHttpRequest::send):
1578
1579 2006-12-14  Nikolas Zimmermann  <zimmermann@kde.org>
1580
1581         Reviewed by Darin.
1582
1583         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11830
1584
1585         Fix fundamental problems with JS SVG POD types.
1586         (currently: FloatPoint/FloatRect/AffineTransform)
1587
1588         This doesn't affect any testcase, but when I wrote my SVGLength* -> SVGLength
1589         the problem got visible (aka. baseVal-animVal-equality.svg broke and more)
1590         With that patch applied first, none breaks - so SVG POD JS wrappers do work now.
1591
1592         In detail:
1593         - Fix setBaseValue() confusion. ONLY use the hash map in SVGDocumentExtension
1594           when we're animating a property. Add "start##Property" / "stop##Property" methods
1595           which take care, of moving "animVal" -> "baseVal" hash, and back after animation stopped.
1596
1597           These new methods are not yet used anywhere, but finally the "animated property" system is complete.
1598
1599         - Offer a new JSSVGPODTypeWrapper class, wrapping around non-pointer POD types like FloatPoint etc.
1600           to be used in the generated JS bindings. Currently if you modified ie the "x" property of a SVGPoint
1601           from JS, you only actually modified the "m_x" object stored in the JSSVGPoint wrapper.
1602
1603           If you take SVGLength as example (more frequently used in the JS SVG bindings, that's why I'm using it)
1604           "document.rootElement.width.baseVal.value = 100;" only modified the "SVGLength m_impl" object stored in
1605           JSSVGLength, but the "SVGSVGElement" didn't notice it width got changed. The new commitChanges() logic
1606           fixes these problems.
1607
1608         It's quite hard too describe the actual changes, if one is not familiar with the code. This is the result
1609         of endless discussions with Eric Seidel, and we hope this is a decent solution adressing all issues.
1610
1611         * WebCore.xcodeproj/project.pbxproj:
1612         * bindings/js/JSSVGMatrixCustom.cpp:
1613         (WebCore::JSSVGMatrix::inverse):
1614         (WebCore::JSSVGMatrix::rotateFromVector):
1615         * bindings/js/JSSVGPODTypeWrapper.h: Added.
1616         (WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper):
1617         (WebCore::JSSVGPODTypeWrapper::~JSSVGPODTypeWrapper):
1618         (WebCore::JSSVGPODTypeWrapper::operator PODType&):
1619         (WebCore::JSSVGPODTypeWrapper::commitChange):
1620         (WebCore::JSSVGPODTypeWrapperCreator::JSSVGPODTypeWrapperCreator):
1621         (WebCore::JSSVGPODTypeWrapperCreator::~JSSVGPODTypeWrapperCreator):
1622         (WebCore::JSSVGPODTypeWrapperCreator::commitChange):
1623         * bindings/scripts/CodeGeneratorJS.pm:
1624         * ksvg2/misc/SVGDocumentExtensions.h:
1625         (WebCore::SVGDocumentExtensions::removeBaseValue):
1626         * ksvg2/svg/SVGElement.h:
1627
1628 2006-12-14  Alexey Proskuryakov  <ap@webkit.org>
1629
1630         Reviewed by Darin.
1631
1632         http://bugs.webkit.org/show_bug.cgi?id=11828
1633         Fix a leak of NSURLRequest on each update - RetainPtr retains the object itself.
1634
1635         * platform/network/mac/ResourceRequestMac.mm:
1636         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1637
1638 2006-12-14  Simon Hausmann  <hausmann@kde.org>
1639
1640         Reviewed by Zack Rusin.
1641
1642         * WebCore.pro: Clean up the xpath grammar generation rule.
1643
1644 2006-12-14  Zack Rusin  <zack@kde.org>
1645
1646         Make it link with temporary stubs.
1647
1648         * loader/qt/DocumentLoaderQt.cpp:
1649         (WebCore::DocumentLoader::originalRequest):
1650         (WebCore::DocumentLoader::originalRequestCopy):
1651         (WebCore::DocumentLoader::request):
1652         (WebCore::DocumentLoader::initialRequest):
1653         (WebCore::DocumentLoader::actualRequest):
1654         (WebCore::DocumentLoader::URL):
1655
1656 2006-12-14  Zack Rusin  <zack@kde.org>
1657
1658         Compilation fixes for the Qt port after last nights
1659         changes.
1660
1661         * loader/qt/DocumentLoaderQt.cpp:
1662         (WebCore::DocumentLoader::URL):
1663         (WebCore::DocumentLoader::unreachableURL):
1664         * loader/qt/FrameLoaderQt.cpp:
1665         (WebCore::PolicyCheck::call):
1666         * platform/network/ResourceRequest.h:
1667         (WebCore::ResourceRequest::setHTTPReferrer):
1668
1669 2006-12-14  Rob Buis  <buis@kde.org>
1670
1671         Reviewed by Oliver.
1672
1673         http://bugs.webkit.org/show_bug.cgi?id=11726
1674         SVG Image do not take into account clip/overflow when hit testing
1675
1676         Take into account the overflowRect when hit-testing <svg> container.
1677
1678         * rendering/RenderSVGContainer.cpp:
1679         (WebCore::RenderSVGContainer::viewportTransform):
1680         (WebCore::RenderSVGContainer::nodeAtPoint):
1681         * rendering/RenderSVGContainer.h:
1682
1683 2006-12-13  David Hyatt  <hyatt@apple.com>
1684
1685         Fix for bug 11825, dragging elements via -khtml-user-drag is broken (affects Dashboard).  Make sure
1686         to clear the paintingRoot properly when recurring into children.  It would be nice to find a design
1687         that prevented this mistake from being made and didn't require explicit clearing of the root.
1688
1689         Reviewed by olliej
1690
1691         * rendering/InlineFlowBox.cpp:
1692         (WebCore::InlineFlowBox::paint):
1693         * rendering/RenderBlock.cpp:
1694         (WebCore::RenderBlock::paintChildren):
1695         * rendering/RenderBox.cpp:
1696         (WebCore::RenderBox::paint):
1697         * rendering/RenderTable.cpp:
1698         (WebCore::RenderTable::paint):
1699
1700 2006-12-13  Anders Carlsson  <acarlsson@apple.com>
1701
1702         * loader/FrameLoader.h:
1703         id is mac-only.
1704         
1705 2006-12-13  Brady Eidson  <beidson@apple.com>
1706
1707         Implicitly reviewed by Darin, Hyatt, Maciej, and others!
1708
1709         Fixes a document tear down crash.
1710         Changes a few long standing assertions to our new style
1711
1712         * dom/Document.cpp:
1713         (WebCore::Document::~Document):
1714         (WebCore::Document::topDocument):
1715
1716 2006-12-13  Maciej Stachowiak  <mjs@apple.com>
1717
1718         Reviewed by Anders.
1719
1720         - converted many places to use ResourceRequest instead of NSURLRequest
1721
1722         * WebCore.exp:
1723         * loader/DocumentLoader.h:
1724         * loader/FrameLoader.cpp:
1725         (WebCore::FrameLoader::stopPolicyCheck):
1726         * loader/FrameLoader.h:
1727         (WebCore::PolicyCheck::request):
1728         * loader/FrameLoaderClient.h:
1729         * loader/MainResourceLoader.h:
1730         * loader/mac/DocumentLoaderMac.mm:
1731         (WebCore::DocumentLoader::DocumentLoader):
1732         (WebCore::DocumentLoader::originalRequest):
1733         (WebCore::DocumentLoader::originalRequestCopy):
1734         (WebCore::DocumentLoader::request):
1735         (WebCore::DocumentLoader::initialRequest):
1736         (WebCore::DocumentLoader::actualRequest):
1737         (WebCore::DocumentLoader::URL):
1738         (WebCore::DocumentLoader::unreachableURL):
1739         (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
1740         (WebCore::DocumentLoader::setRequest):
1741         (WebCore::DocumentLoader::stopLoading):
1742         (WebCore::DocumentLoader::setLastCheckedRequest):
1743         (WebCore::DocumentLoader::lastCheckedRequest):
1744         (WebCore::DocumentLoader::URLForHistory):
1745         * loader/mac/FrameLoaderMac.mm:
1746         (WebCore::FrameLoader::load):
1747         (WebCore::FrameLoader::startLoadingMainResource):
1748         (WebCore::FrameLoader::applyUserAgent):
1749         (WebCore::FrameLoader::originalRequest):
1750         (WebCore::FrameLoader::receivedMainResourceError):
1751         (WebCore::FrameLoader::callContinueFragmentScrollAfterNavigationPolicy):
1752         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
1753         (WebCore::FrameLoader::commitProvisionalLoad):
1754         (WebCore::FrameLoader::initialRequest):
1755         (WebCore::FrameLoader::setRequest):
1756         (WebCore::FrameLoader::checkNavigationPolicy):
1757         (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL):
1758         (WebCore::FrameLoader::reloadAllowingStaleData):
1759         (WebCore::FrameLoader::reload):
1760         (WebCore::FrameLoader::checkNewWindowPolicy):
1761         (WebCore::FrameLoader::continueAfterNewWindowPolicy):
1762         (WebCore::FrameLoader::continueAfterNavigationPolicy):
1763         (WebCore::FrameLoader::callContinueLoadAfterNavigationPolicy):
1764         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1765         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1766         (WebCore::FrameLoader::callContinueLoadAfterNewWindowPolicy):
1767         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1768         (WebCore::FrameLoader::post):
1769         (WebCore::FrameLoader::addExtraFieldsToRequest):
1770         (WebCore::FrameLoader::isReloading):
1771         (WebCore::FrameLoader::referrer):
1772         (WebCore::FrameLoader::loadEmptyDocumentSynchronously):
1773         (WebCore::FrameLoader::loadResourceSynchronously):
1774         (WebCore::FrameLoader::originalRequestURL):
1775         (WebCore::PolicyCheck::set):
1776         (WebCore::PolicyCheck::call):
1777         (WebCore::PolicyCheck::clearRequest):
1778         * loader/mac/MainResourceLoaderMac.mm:
1779         (WebCore::MainResourceLoader::callContinueAfterNavigationPolicy):
1780         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
1781         (WebCore::MainResourceLoader::isPostOrRedirectAfterPost):
1782         * loader/mac/SubresourceLoaderMac.mm:
1783         (WebCore::SubresourceLoader::create):
1784         * loader/mac/WebDataProtocol.h:
1785         * loader/mac/WebDataProtocol.mm:
1786         * platform/KURL.cpp:
1787         (WebCore::operator!=):
1788         * platform/KURL.h:
1789         * platform/mac/KURLMac.mm:
1790         (WebCore::KURL::getNSURL):
1791         * platform/network/FormData.h:
1792         (WebCore::operator==):
1793         (WebCore::operator!=):
1794         * platform/network/ResourceRequest.cpp:
1795         (WebCore::operator==):
1796         * platform/network/ResourceRequest.h:
1797         * platform/network/mac/ResourceRequestMac.mm:
1798         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1799
1800 2006-12-13  Geoffrey Garen  <ggaren@apple.com>
1801
1802         Reviewed by Darin Adler, Dave Hyatt.
1803         
1804         Beefed up FocusController to handle frame focus. Changed implementors to
1805         use FocusController, rather than the widget hierarchy, to focus frames.
1806
1807         (WebCore::FocusController::focusedNode): Made a minor change to focus a frame
1808         before focusing the element inside of it. This matches FF.
1809         (WebCore::FocusController::focusedFrame):
1810         * platform/Widget.h:
1811
1812 2006-12-13  Justin Garcia  <justin.garcia@apple.com>
1813
1814         Reviewed by adele
1815
1816         <rdar://problem/4818145>
1817         Cannot setSelectedDOMRange to non-editable island unless it has editable content on both sides
1818         
1819         There are editable positions before/after a "non-editable island" if its 
1820         a table, but the code in canonicalPosition was not using 
1821         editableRootForPosition to find root editable elements.
1822         
1823         * editing/VisiblePosition.cpp:
1824         (WebCore::VisiblePosition::canonicalPosition): Use editableRootForPosition
1825         to fix the table case.
1826
1827 2006-12-13  Steve Falkenburg  <sfalken@apple.com>
1828
1829         Reviewed by Adam.
1830
1831         Added missing forwarding headers.        
1832
1833         * ForwardingHeaders/kjs/value.h: Added.
1834         * ForwardingHeaders/wtf/HashTable.h: Added.
1835
1836 2006-12-13  Lars Knoll <lars@trolltech.com>
1837
1838         Reviewed by Maciej, Zack.
1839
1840         Make the Qt cbuild compile again.
1841
1842         * WebCore.pro:
1843         * loader/qt/ResourceLoaderQt.cpp:
1844         * platform/network/qt/ResourceHandleQt.cpp:
1845         (WebCore::ResourceHandle::start):
1846         (WebCore::ResourceHandle::loadsBlocked):
1847         * platform/qt/FrameQtClient.cpp:
1848         (WebCore::FrameQtClient::openURL):
1849         (WebCore::FrameQtClient::submitForm):
1850
1851 2006-12-12  Adam Roben  <aroben@apple.com>
1852
1853         Reviewed by Anders.
1854
1855         Changed #import to #include to match the rest of our ForwardingHeaders.
1856
1857         * ForwardingHeaders/wtf/StringExtras.h:
1858
1859 2006-12-12  Justin Garcia  <justin.garcia@apple.com>
1860
1861         Reviewed by harrison
1862         
1863         <rdar://problem/4757667>
1864         GoogleDocs: Style menu does not open
1865
1866         * bindings/js/kjs_window.cpp:
1867         (KJS::Selection::getValueProperty): Added rangeCount.
1868         * bindings/js/kjs_window.h:
1869         (KJS::Selection::):
1870         * editing/SelectionController.h:
1871         (WebCore::SelectionController::rangeCount): Added.
1872
1873 2006-12-12  Alice Liu  <alice.liu@apple.com>
1874
1875         Reviewed by Oliver.
1876
1877         * bindings/js/JSSVGMatrixCustom.cpp:
1878         added #ifdef SVG_SUPPORT
1879
1880 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
1881
1882         Suggested by Darin.
1883
1884         * loader/ResourceLoader.cpp:
1885         Move down include of ResourceHandle.h.
1886
1887 2006-12-12  Geoffrey Garen  <ggaren@apple.com>
1888
1889         Reviewed by Adam Roben, Dave Hyatt, Darin Adler.
1890         
1891         Factored focus control into a FocusController class. I inted to use this
1892         class for handling window active state and the focused frame, as well.
1893
1894         Layout tests pass.
1895
1896         * WebCore.xcodeproj/project.pbxproj:
1897         * dom/Document.cpp:
1898         (WebCore::Document::view):
1899         (WebCore::Document::page): New helper function.
1900         * dom/Document.h: Moved setters before getters.
1901         (WebCore::Document::hoverNode):
1902         (WebCore::Document::activeNode):
1903         * dom/Node.cpp:
1904         (WebCore::Node::detach): Use the FocusController.
1905         * page/FocusController.cpp: Added.
1906         (WebCore::shouldFocus): renamed and refactored this helper function.
1907         (WebCore::shouldUnfocus): ditto.
1908         * page/FocusController.h: Added.
1909
1910 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
1911
1912         Rubber Stamped by Geoff.
1913
1914         * platform/Base64.cpp:
1915         * platform/Base64.h:
1916         Put functions inside of the WebCore namespace.
1917
1918 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
1919
1920         Try fixing the non-Mac builds.
1921         
1922         * loader/ResourceLoader.cpp:
1923         (WebCore::ResourceLoader::willSendRequest):
1924         (WebCore::ResourceLoader::didReceiveResponse):
1925         (WebCore::ResourceLoader::didReceiveData):
1926         (WebCore::ResourceLoader::didFinishLoading):
1927         (WebCore::ResourceLoader::didFail):
1928         * loader/SubresourceLoader.cpp:
1929         (WebCore::SubresourceLoader::create):
1930         * loader/SubresourceLoader.h:
1931
1932 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
1933
1934         Reviewed by Darin.
1935
1936         Turn ResourceLoader into a ResourceHandleClient and stop using NSURLConnection in the loader.
1937
1938         * WebCore.exp:
1939         Add new methods needed by WebKit.
1940         
1941         * WebCore.xcodeproj/project.pbxproj:
1942         Make ResourceHandle.h a private header.
1943         
1944         * loader/FrameLoaderClient.h:
1945         Change the download method to take a ResourceHandle instead of an NSURLConnection.
1946         
1947         * loader/MainResourceLoader.h:
1948         Get rid of the proxy instance variable, that's handled by ResourceHandlw now.
1949         
1950         * loader/ResourceLoader.h:
1951         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
1952         (WebCore::ResourceLoader::didCancelAuthenticationChallenge):
1953         (WebCore::ResourceLoader::willStopBufferingData):
1954         (WebCore::ResourceLoader::willCacheResponse):
1955         (WebCore::ResourceLoader::receivedCredential):
1956         (WebCore::ResourceLoader::receivedRequestToContinueWithoutCredential):
1957         (WebCore::ResourceLoader::receivedCancellation):
1958         (WebCore::ResourceLoader::handle):
1959         * loader/SubresourceLoader.h:
1960         Make ResourceLoader a ResourceHandleClient, moving the methods from SubresourceLoader.
1961         
1962         * loader/mac/MainResourceLoaderMac.mm:
1963         (WebCore::MainResourceLoader::MainResourceLoader):
1964         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1965         (WebCore::MainResourceLoader::loadNow):
1966         (WebCore::MainResourceLoader::load):
1967         Use a ResourceHandle instead of an NSURLConnection.
1968         
1969         * loader/mac/ResourceLoaderMac.mm:
1970         (WebCore::ResourceLoader::~ResourceLoader):
1971         (WebCore::ResourceLoader::releaseResources):
1972         (WebCore::ResourceLoader::load):
1973         (WebCore::ResourceLoader::setDefersLoading):
1974         (WebCore::ResourceLoader::resourceData):
1975         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
1976         (WebCore::ResourceLoader::didCancel):
1977         (WebCore::ResourceLoader::willSendRequest):
1978         (WebCore::ResourceLoader::didReceiveResponse):
1979         (WebCore::ResourceLoader::didReceiveData):
1980         (WebCore::ResourceLoader::didFinishLoading):
1981         (WebCore::ResourceLoader::didFail):
1982         Remove the WebCoreResourceLoaderAsDelegate class, use a ResourceHandle instead of an NSURLConnection.
1983         
1984         * loader/mac/SubresourceLoaderMac.mm:
1985         Remove ResourceHandleClient methods.
1986         
1987         * platform/network/ResourceHandle.cpp:
1988         (WebCore::ResourceHandle::ResourceHandle):
1989         (WebCore::ResourceHandle::create):
1990         * platform/network/ResourceHandle.h:
1991         * platform/network/ResourceHandleInternal.h:
1992         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1993         Add an extra argument denoting whether this ResourceHandle can possibly be "converted" into one used for downloads.
1994         
1995         * platform/network/mac/ResourceHandleMac.mm:
1996         (WebCore::ResourceHandle::~ResourceHandle):
1997         (WebCore::ResourceHandle::start):
1998         (WebCore::ResourceHandle::releaseProxy):
1999         (WebCore::ResourceHandle::connection):
2000         New methods for creating a NSURLConnectionDelegateProxy which is used when creating a NSURLDownload from an existing
2001         connection.
2002
2003 2006-12-12  Anders Carlsson  <acarlsson@apple.com>
2004
2005         Reviewed by Geoff.
2006
2007         * loader/mac/SubresourceLoaderMac.mm:
2008         (WebCore::SubresourceLoader::load):
2009         * platform/network/mac/ResourceHandleMac.mm:
2010         (WebCore::ResourceHandle::start):
2011         Move the didTellBridgeAboutLoad call to SubresourceLoader in preparation for getting rid of
2012         the DocLoader parameter to ResourceHandle::create.
2013
2014 2006-12-12  George Staikos  <staikos@kde.org>
2015
2016         Make the last checkin compile.
2017
2018         * WebCore.pro:
2019         * ksvg2/svg/SVGTransform.cpp:
2020
2021 2006-12-12  Nikolas Zimmermann  <zimmermann@kde.org>
2022
2023         Reviewed by Sam Weinig & Rob Buis.
2024
2025         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11797
2026
2027         Remove SVGMatrix, replace it by AffineTransform usage everywhere.
2028         Changed AffineTransform API to be able to be used within generation
2029         (m11() -> a(), m12() -> b(), ...). Add some methods needed for SVG.
2030
2031         The actual SVGMatrix -> AffineTransformation patch has been created
2032         by Rob - I just adapted it to the autogenerated POD style.
2033
2034         * WebCore.xcodeproj/project.pbxproj:
2035         * bindings/js/JSSVGMatrixCustom.cpp: Added.
2036         (WebCore::JSSVGMatrix::inverse):
2037         (WebCore::JSSVGMatrix::rotateFromVector):
2038         * bindings/objc/DOMInternal.h:
2039         * bindings/scripts/CodeGeneratorJS.pm:
2040         * bindings/scripts/CodeGeneratorObjC.pm:
2041         * ksvg2/misc/KSVGTimeScheduler.cpp:
2042         * ksvg2/misc/SVGImageLoader.cpp:
2043         * ksvg2/svg/SVGAnimateTransformElement.cpp:
2044         (WebCore::SVGAnimateTransformElement::handleTimerEvent):
2045         (WebCore::SVGAnimateTransformElement::calculateRotationFromMatrix):
2046         (WebCore::SVGAnimateTransformElement::initialMatrix):
2047         (WebCore::SVGAnimateTransformElement::transformMatrix):
2048         * ksvg2/svg/SVGAnimateTransformElement.h:
2049         * ksvg2/svg/SVGClipPathElement.cpp:
2050         (WebCore::SVGClipPathElement::canvasResource):
2051         * ksvg2/svg/SVGFitToViewBox.cpp:
2052         (WebCore::SVGFitToViewBox::viewBoxToViewTransform):
2053         * ksvg2/svg/SVGFitToViewBox.h:
2054         * ksvg2/svg/SVGLengthList.cpp:
2055         * ksvg2/svg/SVGLinearGradientElement.cpp:
2056         (WebCore::SVGLinearGradientElement::buildGradient):
2057         * ksvg2/svg/SVGLocatable.cpp:
2058         (WebCore::SVGLocatable::getCTM):
2059         (WebCore::SVGLocatable::getScreenCTM):
2060         (WebCore::SVGLocatable::getTransformToElement):
2061         * ksvg2/svg/SVGLocatable.h:
2062         * ksvg2/svg/SVGMarkerElement.cpp:
2063         * ksvg2/svg/SVGMatrix.cpp: Removed.
2064         * ksvg2/svg/SVGMatrix.h: Removed.
2065         * ksvg2/svg/SVGMatrix.idl:
2066         * ksvg2/svg/SVGNumberList.cpp:
2067         * ksvg2/svg/SVGPatternElement.cpp:
2068         (WebCore::SVGPatternElement::notifyAttributeChange):
2069         (WebCore::SVGPatternElement::getCTM):
2070         * ksvg2/svg/SVGPatternElement.h:
2071         * ksvg2/svg/SVGPoint.idl:
2072         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
2073         (WebCore::SVGPreserveAspectRatio::getCTM):
2074         * ksvg2/svg/SVGPreserveAspectRatio.h:
2075         * ksvg2/svg/SVGRadialGradientElement.cpp:
2076         (WebCore::SVGRadialGradientElement::buildGradient):
2077         * ksvg2/svg/SVGSVGElement.cpp:
2078         (WebCore::SVGSVGElement::viewport):
2079         (WebCore::SVGSVGElement::createSVGMatrix):
2080         (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
2081         (WebCore::SVGSVGElement::getCTM):
2082         (WebCore::SVGSVGElement::getScreenCTM):
2083         * ksvg2/svg/SVGSVGElement.h:
2084         * ksvg2/svg/SVGStyledElement.cpp:
2085         * ksvg2/svg/SVGStyledLocatableElement.cpp:
2086         (WebCore::SVGStyledLocatableElement::getCTM):
2087         (WebCore::SVGStyledLocatableElement::getScreenCTM):
2088         * ksvg2/svg/SVGStyledLocatableElement.h:
2089         * ksvg2/svg/SVGStyledTransformableElement.cpp:
2090         (WebCore::SVGStyledTransformableElement::localMatrix):
2091         (WebCore::SVGStyledTransformableElement::getCTM):
2092         (WebCore::SVGStyledTransformableElement::getScreenCTM):
2093         (WebCore::SVGStyledTransformableElement::updateLocalTransform):
2094         (WebCore::SVGStyledTransformableElement::attach):
2095         * ksvg2/svg/SVGStyledTransformableElement.h:
2096         * ksvg2/svg/SVGTextElement.cpp:
2097         (WebCore::SVGTextElement::localMatrix):
2098         (WebCore::SVGTextElement::updateLocalTransform):
2099         (WebCore::SVGTextElement::attach):
2100         (WebCore::SVGTextElement::getScreenCTM):
2101         (WebCore::SVGTextElement::getCTM):
2102         * ksvg2/svg/SVGTextElement.h:
2103         * ksvg2/svg/SVGTransform.cpp:
2104         (SVGTransform::SVGTransform):
2105         (SVGTransform::matrix):
2106         (SVGTransform::setMatrix):
2107         (SVGTransform::setTranslate):
2108         (SVGTransform::setScale):
2109         (SVGTransform::setRotate):
2110         (SVGTransform::setSkewX):
2111         (SVGTransform::setSkewY):
2112         * ksvg2/svg/SVGTransform.h:
2113         * ksvg2/svg/SVGTransformList.cpp:
2114         (SVGTransformList::createSVGTransformFromMatrix):
2115         (SVGTransformList::concatenate):
2116         * ksvg2/svg/SVGTransformList.h:
2117         * ksvg2/svg/SVGTransformable.cpp:
2118         (WebCore::SVGTransformable::getCTM):
2119         (WebCore::SVGTransformable::getScreenCTM):
2120         (WebCore::SVGTransformable::parseTransformAttribute):
2121         * ksvg2/svg/SVGTransformable.h:
2122         * platform/graphics/AffineTransform.cpp:
2123         (WebCore::AffineTransform::multiply):
2124         (WebCore::AffineTransform::scale):
2125         (WebCore::AffineTransform::scaleNonUniform):
2126         (WebCore::AffineTransform::rotateFromVector):
2127         (WebCore::AffineTransform::flipX):
2128         (WebCore::AffineTransform::flipY):
2129         (WebCore::AffineTransform::skewX):
2130         (WebCore::AffineTransform::skewY):
2131         * platform/graphics/AffineTransform.h:
2132         * platform/graphics/cairo/AffineTransformCairo.cpp:
2133         (WebCore::AffineTransform::a):
2134         (WebCore::AffineTransform::setA):
2135         (WebCore::AffineTransform::b):
2136         (WebCore::AffineTransform::setB):
2137         (WebCore::AffineTransform::c):
2138         (WebCore::AffineTransform::setC):
2139         (WebCore::AffineTransform::d):
2140         (WebCore::AffineTransform::setD):
2141         (WebCore::AffineTransform::e):
2142         (WebCore::AffineTransform::setE):
2143         (WebCore::AffineTransform::f):
2144         (WebCore::AffineTransform::setF):
2145         (WebCore::AffineTransform::inverse):
2146         * platform/graphics/cg/AffineTransformCG.cpp:
2147         (WebCore::AffineTransform::a):
2148         (WebCore::AffineTransform::setA):
2149         (WebCore::AffineTransform::b):
2150         (WebCore::AffineTransform::setB):
2151         (WebCore::AffineTransform::c):
2152         (WebCore::AffineTransform::setC):
2153         (WebCore::AffineTransform::d):
2154         (WebCore::AffineTransform::setD):
2155         (WebCore::AffineTransform::e):
2156         (WebCore::AffineTransform::setE):
2157         (WebCore::AffineTransform::f):
2158         (WebCore::AffineTransform::setF):
2159         (WebCore::AffineTransform::inverse):
2160         * platform/graphics/qt/AffineTransformQt.cpp:
2161         (WebCore::AffineTransform::a):
2162         (WebCore::AffineTransform::setA):
2163         (WebCore::AffineTransform::b):
2164         (WebCore::AffineTransform::setB):
2165         (WebCore::AffineTransform::c):
2166         (WebCore::AffineTransform::setC):
2167         (WebCore::AffineTransform::d):
2168         (WebCore::AffineTransform::setD):
2169         (WebCore::AffineTransform::e):
2170         (WebCore::AffineTransform::setE):
2171         (WebCore::AffineTransform::f):
2172         (WebCore::AffineTransform::setF):
2173         (WebCore::AffineTransform::inverse):
2174         * rendering/RenderForeignObject.cpp:
2175         (WebCore::RenderForeignObject::paint):
2176         (WebCore::RenderForeignObject::nodeAtPoint):
2177         * rendering/RenderPath.cpp:
2178         (WebCore::RenderPath::mapAbsolutePointToLocal):
2179         * rendering/RenderSVGImage.cpp:
2180         (WebCore::RenderSVGImage::paint):
2181         (WebCore::RenderSVGImage::nodeAtPoint):
2182         * rendering/RenderSVGText.cpp:
2183         (WebCore::RenderSVGText::computeAbsoluteRepaintRect):
2184         (WebCore::RenderSVGText::nodeAtPoint):
2185         (WebCore::RenderSVGText::paint):
2186         * rendering/SVGInlineFlowBox.cpp:
2187         (WebCore::paintSVGInlineFlow):
2188         * rendering/SVGRenderTreeAsText.cpp:
2189         (WebCore::operator<<):
2190
2191 2006-12-12  George Staikos  <staikos@kde.org>
2192
2193         Reviewed by Alexey.
2194
2195         Fix the Qt build again.
2196
2197         * WebCore.pro:
2198         * loader/qt/FrameLoaderQt.cpp:
2199         (WebCore::FrameLoader::createFrame):
2200         (WebCore::FrameLoader::load):
2201         * platform/qt/PasteboardQt.cpp:
2202         (WebCore::Pasteboard::writeSelection):
2203         (WebCore::Pasteboard::writeURL):
2204         (WebCore::Pasteboard::clear):
2205
2206 2006-12-12  Geoffrey Garen  <ggaren@apple.com>
2207
2208         Reviewed by Beth Dakin.
2209         
2210         Moved focus control to the page level. Fixed a minor bug where a node
2211         would retain keyboard focus even when removed from the document.
2212         
2213         We should probably move this, along with hover and active, into a separate
2214         FocusController. But I'm too tired right now.
2215
2216         * dom/Document.cpp: Migrated code to Page
2217         (WebCore::Document::removedLastRef):
2218         (WebCore::Document::detach):
2219         (WebCore::Document::setFocusedNode):
2220         (WebCore::Document::focusedNode):
2221         * dom/Document.h:
2222         * dom/Node.cpp:
2223         (WebCore::Node::detach): Clear ourselves from keyboard focus. This fixes
2224         the minor bug and was also necessary to prevent regressions caused by hanging
2225         on to a focused node after the document was replaced.
2226         * dom/Node.h:
2227         (WebCore::Node::inDetach):
2228         * page/Page.cpp: Migrated code from Document
2229         (WebCore::shouldAcquireEditingFocus):
2230         (WebCore::shouldRelinquishEditingFocus):
2231         (WebCore::clearSelectionIfNeeded):
2232         (WebCore::widgetForNode):
2233         (WebCore::Page::setFocusedNode):
2234         * page/Page.h:
2235         (WebCore::Page::focusedNode):
2236
2237 2006-12-11  Alexey Proskuryakov  <ap@webkit.org>
2238
2239         Reviewed by Darin.
2240
2241         http://bugs.webkit.org/show_bug.cgi?id=11053
2242         XMLHttpRequest should be an EventTarget
2243
2244         Test: http/tests/xmlhttprequest/event-target.html
2245
2246         * bindings/js/JSXMLHttpRequest.cpp:
2247         (KJS::JSXMLHttpRequest::mark):
2248         (KJS::JSXMLHttpRequest::~JSXMLHttpRequest):
2249         (KJS::JSXMLHttpRequestProtoFunc::callAsFunction):
2250         * bindings/js/JSXMLHttpRequest.h:
2251         (KJS::JSXMLHttpRequest::):
2252         * xml/xmlhttprequest.cpp:
2253         (WebCore::XMLHttpRequest::addEventListener):
2254         (WebCore::XMLHttpRequest::removeEventListener):
2255         (WebCore::XMLHttpRequest::dispatchEvent):
2256         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
2257         * xml/xmlhttprequest.h:
2258         (WebCore::XMLHttpRequest::eventListeners):
2259         Implement EventTarget methods (except for NS variations, which Firefox doesn't have either).
2260
2261 2006-12-11  Darin Adler  <darin@apple.com>
2262
2263         Reviewed by Geoff.
2264
2265         - fix http://bugs.webkit.org/show_bug.cgi?id=11809
2266           fast/dom/gc-8.html crash in alternate-thread marking code in ScriptInterpreter
2267
2268         DocumentType objects were getting filed under the wrong document in the
2269         DOM objects structure.
2270
2271         * bindings/js/kjs_binding.h: Added a destructor for debugging purposes only.
2272         * bindings/js/kjs_binding.cpp:
2273         (KJS::wrapperSet): Added. Set of outstanding wrappers for debugging.
2274         (KJS::addWrapper): Added.
2275         (KJS::removeWrapper): Added.
2276         (KJS::removeWrappers): Added.
2277         (KJS::DOMObject::~DOMObject): Added. Asserts that there is no outstanding reference
2278         to this wrapper since it's being destroyed.
2279         (KJS::ScriptInterpreter::putDOMObject): Added a call to ADD_WRAPPER.
2280         (KJS::ScriptInterpreter::forgetDOMObject): Added a call to REMOVE_WRAPPER.
2281         (KJS::ScriptInterpreter::forgetDOMNodeForDocument): Added a call to REMOVE_WRAPPER.
2282         (KJS::ScriptInterpreter::putDOMNodeForDocument): Added a call to ADD_WRAPPER.
2283         (KJS::ScriptInterpreter::forgetAllDOMNodesForDocument): Added a call to REMOVE_WRAPPERS.
2284         (KJS::ScriptInterpreter::updateDOMNodeDocument): Added calls to REMOVE_WRAPPER and
2285         ADD_WRAPPER so the out-of-order transaction doesn't upset the assertions in the functions
2286         we're calling. Another solution would be to reorder the two, but I think that would
2287         create a race where another thread could garbage collect after the forget but before the put.
2288         (KJS::ScriptInterpreter::wasRunByUserGesture): Tweaked formatting.
2289
2290         * dom/Document.cpp: (WebCore::Document::adoptNode): Removed call to updateDOMNodeDocument
2291         since setDocument now takes care of that.
2292         * dom/Node.cpp:
2293         (WebCore::Node::setDocument): Added call to updateDOMNodeDocument here.
2294         (WebCore::Node::checkAddChild): Removed call to updateDOMNodeDocument since setDocument
2295         now takes care of that.
2296
2297 2006-12-11  Alexey Proskuryakov  <ap@nypop.com>
2298
2299         Reviewed by Darin.
2300
2301         http://bugs.webkit.org/show_bug.cgi?id=9673
2302         Add support for window.atob() and window.btoa()
2303
2304         * WebCore.xcodeproj/project.pbxproj: Added Base64.{h,cpp}
2305         * bindings/js/kjs_window.cpp:
2306         (KJS::WindowFunc::callAsFunction):
2307         * bindings/js/kjs_window.h:
2308         (KJS::Window::):
2309         * platform/Base64.cpp: Added.
2310         (base64Encode):
2311         (base64Decode):
2312         * platform/Base64.h: Added.
2313         * ForwardingHeaders/wtf/StringExtras.h: Added.
2314         * platform/DeprecatedString.cpp: Use strncasecmp from StringExtras.
2315
2316 2006-12-11  Darin Adler  <darin@apple.com>
2317
2318         Reviewed by Brady.
2319
2320         - did some of the Mac-specific file moves mentioned in my recent mail to the WebKit list
2321
2322         * WebCore.xcodeproj/project.pbxproj: Updated project for file moves.
2323
2324         * bridge/mac/FrameMac.h: Moved to page/mac.
2325         * bridge/mac/FrameMac.mm: Ditto.
2326         * bridge/mac/WebCoreFrameBridge.h: Ditto.
2327         * bridge/mac/WebCoreFrameBridge.mm: Ditto.
2328         * bridge/mac/WebCoreFrameView.h: Ditto.
2329         * bridge/mac/WebCoreViewFactory.h: Ditto.
2330         * bridge/mac/WebCoreViewFactory.m: Ditto.
2331         * bridge/mac/WebDashboardRegion.h: Ditto.
2332         * bridge/mac/WebDashboardRegion.m: Ditto.
2333
2334         * bridge/mac/WebCoreKeyboardAccess.h: Moved to page/mac,
2335         renamed WebCoreKeyboardUIMode.h, and made a C++ header.
2336
2337         * page/EventHandler.h: Updated for change to WebCoreKeyboardAccess.
2338         * page/mac/EventHandlerMac.mm:
2339         (WebCore::EventHandler::tabsToLinks): Ditto.
2340         (WebCore::EventHandler::tabsToAllControls): Ditto.
2341         (WebCore::EventHandler::keyboardUIMode): Ditto.
2342
2343 2006-12-11  Beth Dakin  <bdakin@apple.com>
2344
2345         Reviewed by Adam.
2346
2347         Primarily, this patch implements/hooks-up actions for the sub-menu
2348         items in WebCore context menus. I fixed a few other things along
2349         the way too:
2350                 -Made BUILDING_ON_TIGER ifdef work within C++ as well as
2351                  Obj-C
2352                 -Fixed bug where we would throw and Obj-C exception and
2353                  fail to pop up menus with more than one separator item.
2354                 -Re-named some of the spelling/grammar tags since Tiger and
2355                  Leopard share more of the actions than initially
2356                  anticipated.
2357
2358         * WebCorePrefix.h: Make BUILDING_ON_TIGER available to C++
2359         * bridge/EditorClient.h: New functions to toggle
2360         spelling/grammar checking.
2361         * editing/Editor.cpp:
2362         (WebCore::Editor::toggleContinuousSpellChecking): Call into client.
2363         (WebCore::Editor::toggleGrammarChecking): Same.
2364         (WebCore::Editor::toggleBold): call execToggleBold()
2365         (WebCore::Editor::toggleUnderline): Create appropriate underline
2366         style and apply to selection.
2367         (WebCore::Editor::setBaseWritingDirection): Create appropriate
2368         writing direction and apply to selection.
2369         * editing/Editor.h:
2370         * editing/mac/EditorMac.mm: New functions to show spelling guesses,
2371         fonts, styles, and color panels.
2372         * page/ContextMenuClient.h: New functions for the speech sub-menu.
2373         * page/ContextMenuController.cpp:
2374         (WebCore::ContextMenuController::contextMenuItemSelected): Fill in
2375         editing sub-menu actions.
2376         * platform/ContextMenu.cpp:
2377         (WebCore::separatorItem): Helper function to create a separator 
2378         item.
2379         (WebCore::createFontSubMenu): Put very mac-specific things within a
2380         platform ifdef.
2381         (WebCore::createSpellingAndGrammarSubMenu): Re-named some of the
2382         spelling sub-menu tags.
2383         (WebCore::createSpellingSubMenu): Same.
2384         (WebCore::ContextMenu::populate): We can't share the separator
2385         item. When we do, menus with more than one separator throw and obj-
2386         c exception and fail to pop-up.
2387         * platform/ContextMenuItem.h:
2388         (WebCore::): Re-named some of the spelling sub-menu tags.
2389
2390 2006-12-11  Alice Liu  <alice.liu@apple.com>
2391
2392         Reviewed by Geoff, Adam.
2393
2394         Switch to use the Editor for copying URLs.  Also some Pasteboard and PlatformMouseEvent cleanup.
2395
2396         All layout tests pass as they would without this patch. 
2397
2398         * WebCore.exp:
2399         added Editor::copyURL to be called from WebKit
2400         
2401         * editing/Editor.cpp:
2402         (WebCore::Editor::tryDHTMLCopy):
2403         (WebCore::Editor::tryDHTMLCut):
2404         Pasteboard::clearTypes() changed to clear()
2405
2406         (WebCore::Editor::writeSelectionToPasteboard):        
2407         (WebCore::Editor::cut):
2408         (WebCore::Editor::copy):
2409         Changed signature of writeSelection to take raw pointer instead of PassRefPtr
2410
2411         (WebCore::Editor::copyURL):
2412         * editing/Editor.h:
2413         Added copyURL.
2414         
2415         * page/ContextMenuClient.h:
2416         * page/ContextMenuController.cpp:
2417         (WebCore::ContextMenuController::contextMenuItemSelected):
2418         Removed copyLinkToClipboard
2419         
2420         * platform/KURL.cpp:
2421         (WebCore::KURL::lastPathComponent):
2422         * platform/KURL.h:
2423         Added lastPathComponent. 
2424         
2425         * platform/Pasteboard.h:
2426         Changed some function names.
2427         Moved some functions out of class to static.
2428         
2429         * platform/PlatformMouseEvent.h:
2430         (WebCore::):
2431         Removed MouseEventType enum, added NoButton to MouseButton without disturbing other button values.
2432         
2433         * platform/mac/PasteboardMac.mm:
2434         Added writeURL, and moved some things around
2435         
2436         * platform/mac/WebCoreSystemInterface.h:
2437         * platform/mac/WebCoreSystemInterface.mm:
2438         Add some calls necessary for Pasteboard::writeURL to work
2439
2440 2006-12-11  Darin Adler  <darin@apple.com>
2441
2442         Reviewed by Brady.
2443
2444         - http://bugs.webkit.org/show_bug.cgi?id=11794
2445           fix lifetime problems affecting Frame's ownerElement pointer
2446
2447         * CMakeLists.txt:
2448         * WebCore.vcproj/WebCore/WebCore.vcproj:
2449         * WebCore.xcodeproj/project.pbxproj:
2450         * WebCoreSources.bkl:
2451         Updated for new source files.
2452
2453         * WebCore.exp: Updated for changes to entry point names.
2454
2455         * bridge/mac/FrameMac.h:
2456         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::FrameMac):
2457         * bridge/win/FrameWin.h:
2458         * bridge/win/FrameWin.cpp: (WebCore::FrameWin::FrameWin):
2459         * platform/qt/FrameQt.h:
2460         * platform/qt/FrameQt.cpp: (WebCore::FrameQt::FrameQt):
2461         Updated owner element type to HTMLFrameOwnerElement.
2462
2463         * bridge/mac/WebCoreFrameBridge.h: Removed non-C++ case since we don't
2464         use that any more. Updated owner element type to HTMLFrameOwnerElement.
2465
2466         * dom/Document.cpp: Added include so that the ownerElement function can
2467         compile (since it downcasts an HTMLFrameOwnerElement to an Element).
2468
2469         * html/HTMLFrameElement.cpp:
2470         (WebCore::containingFrameSetElement): Moved this function in here; it
2471         doesn't need to be a member function.
2472         (WebCore::HTMLFrameElement::attach): Updated to call this.
2473
2474         * html/HTMLFrameElementBase.h:
2475         * html/HTMLFrameElementBase.cpp:
2476         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Inherit from
2477         HTMLFrameOwnerElement. Removed contentFrame, contentDocument, and
2478         containingFrameSetElement. Removed friend classes.
2479
2480         * html/HTMLFrameOwnerElement.h: Added.
2481         * html/HTMLFrameOwnerElement.cpp: Added.
2482
2483         * html/HTMLEmbedElement.h:
2484         * html/HTMLEmbedElement.cpp:
2485         * html/HTMLObjectElement.h:
2486         * html/HTMLObjectElement.cpp:
2487         Remove now-unneeded contentDocument functions.
2488
2489         * html/HTMLPlugInElement.h:
2490         * html/HTMLPlugInElement.cpp:
2491         (WebCore::HTMLPlugInElement::HTMLPlugInElement): Inherit from
2492         HTMLFrameOwnerElement.
2493
2494         * loader/FormState.h:
2495         * loader/FormState.cpp: Use HTMLFormElement instead of just Element.
2496
2497         * loader/FrameLoader.h:
2498         * loader/FrameLoader.cpp:
2499         (WebCore::FrameLoader::requestFrame): Use HTMLFormElement.
2500         (WebCore::FrameLoader::loadSubframe): Ditto.
2501         (WebCore::FrameLoader::requestObject): Don't pass an element parameter
2502         to shouldUsePlugin, and remove now-unneeded type casts.
2503         (WebCore::FrameLoader::shouldUsePlugin): Removed unneeded element parameter.
2504         (WebCore::FrameLoader::handleFallbackContent): Use HTMLFrameOwnerElement.
2505         (WebCore::FrameLoader::updateBaseURLForEmptyDocument): Ditto.
2506         (WebCore::FrameLoader::isHostedByObjectElement): Ditto.
2507         * loader/mac/FrameLoaderMac.mm:
2508         (WebCore::FrameLoader::load): Use HTMLFormElement.
2509         (WebCore::FrameLoader::post): Ditto.
2510         (WebCore::FrameLoader::createFrame): Use HTMLFrameOwnerElement.
2511
2512         * page/Frame.h:
2513         * page/FramePrivate.h:
2514         * page/Frame.cpp:
2515         (WebCore::parentFromOwnerElement): Use HTMLFrameOwnerElement.
2516         (WebCore::Frame::Frame): Ditto. Also set m_contentFrame on the owner element.
2517         (WebCore::Frame::ownerElement): Ditto.
2518         (WebCore::Frame::ownerRenderer): Ditto.
2519         (WebCore::Frame::disconnectOwnerElement): Clear m_contentFrame on the owner
2520         element before disconnecting it.
2521         (WebCore::FramePrivate::FramePrivate): Use HTMLFrameOwnerElement.
2522
2523         * page/mac/EventHandlerMac.mm: Include HTMLFrameOwnerElement.h so that
2524         the code here will compile (no code changes needed).
2525
2526         * rendering/RenderFrame.cpp: (WebCore::RenderFrame::viewCleared):
2527         Updated so that RenderFrame doesn't need to be a friend of HTMLFrameElementBase.
2528
2529         * rendering/RenderPart.h:
2530         * rendering/RenderPart.cpp: (WebCore::RenderPart::RenderPart):
2531         Use HTMLFrameOwnerElement.
2532
2533         * rendering/RenderPartObject.h:
2534         * rendering/RenderPartObject.cpp:
2535         (WebCore::RenderPartObject::RenderPartObject): Use HTMLFrameOwnerElement.
2536         (WebCore::RenderPartObject::viewCleared): Updated so that RenderFrame doesn't
2537         need to be a friend of HTMLFrameElementBase.
2538
2539         - other changes
2540
2541         * platform/network/ResourceHandleInternal.h: Added Noncopyable and
2542         fixed indentation.
2543
2544 2006-12-11  David Hyatt  <hyatt@apple.com>
2545
2546         Fix failing layout test.  Remove WTF::Unicode::isSpace and just revert
2547         the caller to the old behavior.
2548
2549         Reviewed by darin
2550
2551         * platform/StringImpl.cpp:
2552         (WebCore::isSpace):
2553
2554 2006-12-11  Alexey Proskuryakov  <ap@webkit.org>
2555
2556         Reviewed by Adam.
2557
2558         http://bugs.webkit.org/show_bug.cgi?id=11807
2559         Merge EventHandler::m_bMousePressed and EventHandler::m_mousePressed
2560
2561         * page/EventHandler.cpp:
2562         (WebCore::EventHandler::EventHandler):
2563         (WebCore::EventHandler::handleMousePressEvent):
2564         (WebCore::EventHandler::handleMouseMoveEvent):
2565         (WebCore::EventHandler::handleMouseReleaseEvent):
2566         (WebCore::EventHandler::autoscrollTimerFired):
2567         * page/EventHandler.h:
2568         * page/mac/EventHandlerMac.mm:
2569         (WebCore::EventHandler::handleDrag):
2570         (WebCore::EventHandler::mouseMoved):
2571         Merge EventHandler::m_bMousePressed and EventHandler::m_mousePressed
2572
2573         (WebCore::EventHandler::lastEventIsMouseUp):
2574         Check that the "new" event is newer than the "old" one - that's not always the case 
2575         when running in DRT, as [NSApp currentEvent] isn't updated by eventSender.
2576
2577 2006-12-11  Nikolas Zimmermann  <zimmermann@kde.org>
2578
2579         Reviewed by Sam Weinig.
2580
2581         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11801
2582
2583         Autogenerate POD types for ObjC/JS.
2584
2585         This removes the need for the hand-written JSSVG*, DOMSVG* wrappers
2586         in bindings/js, bindings/objc. Makes it much easier to convert more
2587         SVG types to POD types (ie. SVGMatrix* -> AffineTransform etc.)
2588
2589         Affected test: svg/custom/SVGPoint-matrixTransform.svg
2590
2591         It's failing with this patch, as the SVGPoint matrixTransform() function
2592         got disabled, until the SVGMatrix -> AffineTransform transition patch
2593         is landed. Otherwhise we'd need to add special cases to both CodeGeneratorJS/ObjC.pm
2594         which would be a waste of time, as SVGMatrix is about to die.
2595
2596         Temporarily updating layout test result, as suggested by John Sullivan, so
2597         no-one notices that SVGPoint-matrixTransform.svg actually fails right now.
2598
2599         Expect that to be fixed again in the next hour(s).
2600
2601         * DerivedSources.make:
2602         * WebCore.xcodeproj/project.pbxproj:
2603         * bindings/js/JSSVGNumber.cpp: Removed.
2604         * bindings/js/JSSVGNumber.h: Removed.
2605         * bindings/js/JSSVGPoint.cpp: Removed.
2606         * bindings/js/JSSVGPoint.h: Removed.
2607         * bindings/js/JSSVGRect.cpp: Removed.
2608         * bindings/js/JSSVGRect.h: Removed.
2609         * bindings/objc/DOMSVGNumber.mm: Removed.
2610         * bindings/objc/DOMSVGPoint.mm: Removed.
2611         * bindings/objc/DOMSVGRect.mm: Removed.
2612         * bindings/scripts/CodeGeneratorJS.pm:
2613         * bindings/scripts/CodeGeneratorObjC.pm:
2614         * ksvg2/svg/SVGNumber.idl:
2615         * ksvg2/svg/SVGPoint.idl:
2616         * ksvg2/svg/SVGRect.idl:
2617
2618 2006-12-10  Lars Knoll <lars@trolltech.com>
2619
2620         Reviewed by Zack
2621
2622         Fix another issue with frame loading
2623
2624         * platform/network/qt/ResourceHandleManagerQt.cpp:
2625         (WebCore::ResourceHandleManager::cancel):
2626         (WebCore::ResourceHandleManager::receivedData):
2627         (WebCore::ResourceHandleManager::receivedFinished):
2628         (WebCore::FileLoader::request):
2629         * platform/qt/FrameQtClient.cpp:
2630         (WebCore::FrameQtClient::openURL):
2631
2632 2006-12-10  George Staikos  <staikos@kde.org>
2633
2634         Reviewed by Zack.
2635
2636         Make the xpath grammar hack more specific (and work on OS X) until
2637         it's cleaned up.
2638
2639         * WebCore.pro:
2640
2641 2006-12-10  Zack Rusin  <zack@kde.org>
2642
2643         Set the widgetclient correctly. This code
2644         should be platform independent!
2645
2646         * platform/qt/WidgetQt.cpp:
2647         (WebCore::WidgetPrivate::WidgetPrivate):
2648         (WebCore::Widget::setClient):
2649         (WebCore::Widget::client):
2650         (WebCore::Widget::focusPolicy):
2651
2652 2006-12-11  Lars Knoll <lars@trolltech.com>
2653
2654         Reviewed by Zack
2655
2656         Fix loading of local files.
2657
2658         * platform/network/qt/ResourceHandleManagerQt.cpp:
2659         (WebCore::FileLoader::request):
2660
2661 2006-12-10  Zack Rusin  <zack@kde.org>
2662
2663        Don't use my QTransform magic, affine QMatrix is fine for
2664        SVG so use setMatrix.
2665
2666         * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
2667         (WebCore::SVGPaintServerLinearGradient::setup):
2668         * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
2669         (WebCore::setup):
2670
2671 2006-12-10  Lars Knoll <lars@trolltech.com>
2672
2673         Reviewed by Zack
2674
2675         Make sure we call checkCompleted() on the FrameLoader
2676         to get the regression tests running.
2677
2678         * WebCore.pro:
2679         * loader/qt/FrameLoaderQt.cpp:
2680         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2681         (WebCore::FrameLoader::saveDocumentState):
2682         * page/qt/EventHandlerQt.cpp:
2683         (WebCore::EventHandler::handleDrag):
2684         * platform/qt/FrameQtClient.cpp:
2685         (WebCore::FrameQtClient::openURL):
2686         (WebCore::FrameQtClient::didReceiveResponse):
2687         (WebCore::FrameQtClient::didFinishLoading):
2688         (WebCore::FrameQtClient::didFail):
2689         * platform/qt/FrameQtClient.h:
2690
2691 2006-12-10  Zack Rusin  <zack@kde.org>
2692
2693         Enable the SVG build by default and make it build.
2694
2695         * WebCore.pro:
2696         * loader/qt/FrameLoaderQt.cpp: Output the method name
2697
2698 2006-12-10  Zack Rusin  <zack@kde.org>
2699
2700         Move the client classes to WebKitQt/WebCoreSupport.
2701
2702         * WebCore.pro:
2703         * loader/qt/FrameLoaderClientQt.cpp: Removed.
2704         * loader/qt/FrameLoaderClientQt.h: Removed.
2705         * platform/qt/ChromeClientQt.cpp: Removed.
2706         * platform/qt/ChromeClientQt.h: Removed.
2707         * platform/qt/ContextMenuClientQt.cpp: Removed.
2708         * platform/qt/ContextMenuClientQt.h: Removed.
2709         * platform/qt/EditorClientQt.cpp: Removed.
2710         * platform/qt/EditorClientQt.h: Removed.
2711
2712 2006-12-10  Lars Knoll <lars@trolltech.com>
2713
2714         Reviewed by Zack.
2715
2716         Add some stubs required to link.
2717
2718         * platform/qt/FrameQt.cpp:
2719         (WebCore::FrameQt::runJavaScriptAlert):
2720         (WebCore::FrameQt::runJavaScriptConfirm):
2721         (WebCore::FrameQt::runJavaScriptPrompt):
2722         (WebCore::FrameQt::bindingRootObject):
2723
2724 2006-12-10  Rob Buis  <buis@kde.org>
2725
2726         Reviewed by Darin.
2727
2728         http://bugs.webkit.org/show_bug.cgi?id=10996
2729         WebKit needs (possibly private) XML/SVG innerText support (for DumpRenderTree)
2730
2731         Create an internal method to create innerText functionality for non-HTML
2732         nodes. When called from DRT this omits CDATA nodes.
2733
2734         * dom/Element.cpp:
2735         (WebCore::Element::innerText):
2736         (WebCore::Element::outerText):
2737         * dom/Element.h:
2738         * dom/Element.idl:
2739         * html/HTMLElement.cpp:
2740         * html/HTMLElement.h:
2741
2742 2006-12-10  MorganL  <morganl.webkit@yahoo.com>
2743
2744         Reviewed by Maciej.
2745
2746         Fixes http://bugs.webkit.org/show_bug.cgi?id=11790
2747         No way to initialize ResourceResponse::m_httpHeaderFields
2748
2749         * platform/network/ResourceResponse.cpp: impl setHTTPHeaderField
2750         (WebCore::ResourceResponse::setHTTPHeaderField):
2751         * platform/network/ResourceResponse.h: decl setHTTPHeaderField
2752
2753 2006-12-10  Zack Rusin  <zack@kde.org>
2754
2755         Cleaning up the code after removals.
2756
2757         * platform/qt/FrameQt.cpp:
2758         * platform/qt/FrameQt.h: Remove virtual methods
2759         which have been moved to different objects
2760
2761 2006-12-10  Zack Rusin  <zack@kde.org>
2762
2763         Cleanup the FrameQtClient a little bit more. Remove
2764         unused methods.
2765
2766         * platform/qt/FrameQtClient.cpp:
2767         * platform/qt/FrameQtClient.h:
2768
2769 2006-12-09  Adam Roben  <aroben@apple.com>
2770
2771         Build fix.
2772
2773         * xml/XPathParser.cpp:
2774         (WebCore::XPath::charCat): Use C++ unsigned instead of uint.
2775
2776 2006-12-09  George Staikos  <staikos@kde.org>
2777
2778         Reviewed by Zack.
2779
2780         Make it not crash, and make it set the title on Qt platform.
2781
2782         * loader/qt/FrameLoaderClientQt.cpp:
2783         (WebCore::FrameLoaderClientQt::hasWebView):
2784         (WebCore::FrameLoaderClientQt::hasFrameView):
2785         (WebCore::FrameLoaderClientQt::didChangeTitle):
2786         * loader/qt/FrameLoaderQt.cpp:
2787         (WebCore::FrameLoader::setTitle):
2788         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2789
2790 2006-12-10  Zack Rusin  <zack@kde.org>
2791
2792         Renaming FrameQtClientDefault to FrameQtClient.
2793         Removing FrameQtClient. Adding FrameLoaderClient
2794         as an argument. Clenaing up the code a bit.
2795
2796         * platform/qt/FrameQt.cpp:
2797         (WebCore::FrameQt::FrameQt):
2798         * platform/qt/FrameQt.h:
2799         * platform/qt/FrameQtClient.cpp:
2800         (WebCore::FrameQtClient::FrameQtClient):
2801         (WebCore::FrameQtClient::~FrameQtClient):
2802         (WebCore::FrameQtClient::setFrame):
2803         (WebCore::FrameQtClient::openURL):
2804         (WebCore::FrameQtClient::submitForm):
2805         (WebCore::FrameQtClient::checkLoaded):
2806         (WebCore::FrameQtClient::runJavaScriptAlert):
2807         (WebCore::FrameQtClient::runJavaScriptConfirm):
2808         (WebCore::FrameQtClient::runJavaScriptPrompt):
2809         (WebCore::FrameQtClient::menubarVisible):
2810         (WebCore::FrameQtClient::toolbarVisible):
2811         (WebCore::FrameQtClient::statusbarVisible):
2812         (WebCore::FrameQtClient::personalbarVisible):
2813         (WebCore::FrameQtClient::locationbarVisible):
2814         (WebCore::FrameQtClient::loadFinished):
2815         (WebCore::FrameQtClient::didReceiveResponse):
2816         (WebCore::FrameQtClient::didFinishLoading):
2817         (WebCore::FrameQtClient::didFail):
2818         (WebCore::FrameQtClient::didReceiveData):
2819         (WebCore::FrameQtClient::traverseNextFrameStayWithin):
2820         (WebCore::FrameQtClient::numPendingOrLoadingRequests):
2821         (WebCore::FrameQtClient::receivedAllData):
2822         (WebCore::FrameQtClient::setTitle):
2823         * platform/qt/FrameQtClient.h:
2824
2825 2006-12-10  Zack Rusin  <zack@kde.org>
2826
2827         Fixes compilation after the last removals.
2828
2829         * WebCore.pro:
2830
2831 2006-12-10  Lars Knoll <lars@trolltech.com>
2832
2833         Reviewed by Zack.
2834
2835         Implement a decent network loader using QHttp.
2836
2837         * loader/qt/FrameLoaderQt.cpp:
2838         (WebCore::FrameLoader::load):
2839         * platform/network/ResourceHandle.cpp:
2840         (WebCore::ResourceHandle::request):
2841         * platform/network/ResourceHandle.h:
2842         * platform/network/ResourceHandleInternal.h:
2843         * platform/network/qt/ResourceHandleManager.cpp: Removed.
2844         * platform/network/qt/ResourceHandleManager.h: Removed.
2845         * platform/network/qt/ResourceHandleManagerKDE.cpp: Added.
2846         (WebCore::ResourceHandleManager::self):
2847         (WebCore::ResourceHandleManager::ResourceHandleManager):
2848         (WebCore::ResourceHandleManager::~ResourceHandleManager):
2849         (WebCore::ResourceHandleManager::slotData):
2850         (WebCore::ResourceHandleManager::slotMimetype):
2851         (WebCore::ResourceHandleManager::slotResult):
2852         (WebCore::ResourceHandleManager::remove):
2853         (WebCore::ResourceHandleManager::add):
2854         (WebCore::ResourceHandleManager::cancel):
2855         * platform/network/qt/ResourceHandleManagerKDE.h: Added.
2856         * platform/network/qt/ResourceHandleManagerQt.cpp: Added.
2857         (WebCore::ResourceHandleManager::ResourceHandleManager):
2858         (WebCore::ResourceHandleManager::~ResourceHandleManager):
2859         (WebCore::ResourceHandleManager::self):
2860         (WebCore::RequestQt::RequestQt):
2861         (WebCore::ResourceHandleManager::add):
2862         (WebCore::ResourceHandleManager::cancel):
2863         (WebCore::ResourceHandleManager::receivedResponse):
2864         (WebCore::ResourceHandleManager::receivedData):
2865         (WebCore::ResourceHandleManager::receivedFinished):
2866         (WebCore::LoaderThread::LoaderThread):
2867         (WebCore::LoaderThread::run):
2868         (WebCore::FileLoader::FileLoader):
2869         (WebCore::FileLoader::request):
2870         (WebCore::FileLoader::cancel):
2871         (WebCore::WebCoreHttp::WebCoreHttp):
2872         (WebCore::WebCoreHttp::~WebCoreHttp):
2873         (WebCore::WebCoreHttp::request):
2874         (WebCore::WebCoreHttp::scheduleNextRequest):
2875         (WebCore::WebCoreHttp::getConnection):
2876         (WebCore::WebCoreHttp::onResponseHeaderReceived):
2877         (WebCore::WebCoreHttp::onReadyRead):
2878         (WebCore::WebCoreHttp::onRequestFinished):
2879         (WebCore::WebCoreHttp::onStateChanged):
2880         (WebCore::WebCoreHttp::cancel):
2881         (WebCore::qHash):
2882         (WebCore::operator==):
2883         (WebCore::HostInfo::HostInfo):
2884         (WebCore::NetworkLoader::NetworkLoader):
2885         (WebCore::NetworkLoader::~NetworkLoader):
2886         (WebCore::NetworkLoader::request):
2887         (WebCore::NetworkLoader::connectionClosed):
2888         (WebCore::NetworkLoader::cancel):
2889         * platform/network/qt/ResourceHandleManagerQt.h: Added.
2890         (WebCore::LoaderThread::):
2891         (WebCore::LoaderThread::waitForSetup):
2892         * platform/network/qt/ResourceHandleQt.cpp:
2893         (WebCore::ResourceHandle::start):
2894         * platform/qt/FrameQt.cpp:
2895         (WebCore::FrameQt::FrameQt):
2896         (WebCore::FrameQt::keyEvent):
2897         * platform/qt/FrameQt.h:
2898         * platform/qt/FrameQtClient.cpp:
2899         (WebCore::FrameQtClientDefault::FrameQtClientDefault):
2900         (WebCore::FrameQtClientDefault::openURL):
2901         (WebCore::FrameQtClientDefault::submitForm):
2902         (WebCore::FrameQtClientDefault::didReceiveResponse):
2903         (WebCore::FrameQtClientDefault::didFinishLoading):
2904         (WebCore::FrameQtClientDefault::didFail):
2905         (WebCore::FrameQtClientDefault::didReceiveData):
2906         (WebCore::FrameQtClientDefault::receivedAllData):
2907         (WebCore::FrameQtClientDefault::setTitle):
2908         * platform/qt/FrameQtClient.h:
2909
2910 2006-12-09  George Staikos  <staikos@kde.org>
2911
2912         Reviewed by Zack.
2913
2914         Fix bison again on qmake build.
2915
2916         * WebCore.pro:
2917
2918 2006-12-09  Zack Rusin  <zack@kde.org>
2919
2920         Reviewed by Zack.
2921
2922         Use the correct filename.
2923
2924         * WebCore.pro: it's PasteboardQt.cpp
2925
2926 2006-12-09  Zack Rusin  <zack@kde.org>
2927
2928         Reviewed by Lars.
2929
2930         Correctly set the font on widgets.
2931
2932         * platform/qt/WidgetQt.cpp:
2933         (WebCore::Widget::setFont):
2934
2935 2006-12-09  Adam Treat  <treat@kde.org>
2936
2937         Reviewed by Zack
2938
2939         No more nil renderer warnings
2940
2941         * platform/qt/ScrollViewCanvasQt.cpp:
2942         (WebCore::ScrollViewCanvasQt::paintEvent):
2943
2944 2006-12-09  Friedemann Kleint  <fkleint@trolltech.com>
2945
2946         Reviewed by Zack
2947
2948         Removed compiler warnings about rounding issues
2949
2950         * platform/qt/FontPlatformDataQt.cpp:
2951         (WebCore::FontPlatformData::FontPlatformData):
2952         * platform/qt/FontQt.cpp:
2953         (WebCore::Font::drawComplexText):
2954
2955 2006-12-09  George Staikos  <staikos@kde.org>
2956
2957         Reviewed by Zack.
2958
2959         Qt 4.1 (especially Qtopia) build fixes
2960
2961         * platform/qt/FrameQtClient.cpp:
2962         * platform/qt/GraphicsContextQt.cpp:
2963         * platform/qt/PlatformKeyboardEventQt.cpp:
2964         * platform/qt/CursorQt.cpp:
2965         * platform/qt/WidgetQt.cpp:
2966         * platform/Cursor.h:
2967         * platform/Arena.h:
2968
2969 2006-12-09  Lars Knoll <lars@trolltech.com>
2970
2971         Reviewed by Zack
2972
2973         Make it possible to build WebKit with qmake.
2974
2975         * WebCore.pro: Added.
2976         * platform/graphics/qt/GraphicsContextQt.cpp:
2977
2978 2006-12-10  Lars Knoll <lars@trolltech.com>
2979
2980         Reviewed by Zack.
2981
2982         Compile after latest WebKit changes and don't depend
2983         on deprecated methods in Qt.
2984
2985         * platform/network/qt/ResourceHandleManager.cpp:
2986         (WebCore::ResourceHandleManager::remove):
2987         (WebCore::ResourceHandleManager::deliverJobData):
2988         * platform/network/qt/ResourceHandleQt.cpp:
2989         (WebCore::ResourceHandle::extractCharsetFromHeaders):
2990         * platform/qt/PlatformKeyboardEventQt.cpp:
2991         (WebCore::windowsKeyCodeForKeyEvent):
2992
2993 2006-12-10  Lars Knoll <lars@trolltech.com>
2994
2995         Reviewed by Zack.
2996
2997         Use the Qt image loading framework.
2998
2999         * CMakeLists.txt:
3000         * platform/graphics/ImageSource.h:
3001         * platform/graphics/qt/GraphicsContextQt.cpp:
3002         * platform/graphics/qt/ImageDecoderQt.cpp: Added.
3003         (WebCore::ImageDecoderQt::ImageData::ImageData):
3004         (WebCore::ImageDecoderQt::ReadContext::):
3005         (WebCore::ImageDecoderQt::ReadContext::ReadContext):
3006         (WebCore::ImageDecoderQt::ReadContext::read):
3007         (WebCore::ImageDecoderQt::ReadContext::readImageLines):
3008         (WebCore::ImageDecoderQt::ImageDecoderQt):
3009         (WebCore::ImageDecoderQt::~ImageDecoderQt):
3010         (WebCore::ImageDecoderQt::hasFirstImageHeader):
3011         (WebCore::ImageDecoderQt::reset):
3012         (WebCore::ImageDecoderQt::setData):
3013         (WebCore::ImageDecoderQt::isSizeAvailable):
3014         (WebCore::ImageDecoderQt::frameCount):
3015         (WebCore::ImageDecoderQt::repetitionCount):
3016         (WebCore::ImageDecoderQt::ImageDecoderQt::supportsAlpha):
3017         (WebCore::ImageDecoderQt::duration):
3018         (WebCore::ImageDecoderQt::frameBufferAtIndex):
3019         (WebCore::ImageDecoderQt::imageAtIndex):
3020         * platform/graphics/qt/ImageDecoderQt.h: Added.
3021         (WebCore::ImageDecoderQt::):
3022         * platform/graphics/qt/ImageSourceQt.cpp:
3023         (WebCore::):
3024         (WebCore::detectImageFormat):
3025         (WebCore::createDecoder):
3026         (WebCore::ImageSource::setData):
3027         (WebCore::ImageSource::createFrameAtIndex):
3028         (WebCore::ImageSource::frameDurationAtIndex):
3029         (WebCore::ImageSource::frameHasAlphaAtIndex):
3030
3031 2006-12-09  Lars Knoll  <lars@trolltech.com>
3032
3033         Reviewed by Maciej.
3034
3035         Remove an explicit ICU dependency.
3036
3037         * xml/XPathParser.cpp:
3038         (WebCore::XPath::charCat):
3039
3040 2006-12-09  Zack Rusin  <zack@kde.org>
3041
3042         Adjusting the build after the icu changes.
3043
3044         * CMakeLists.txt:
3045
3046 2006-12-09  Adam Roben  <aroben@apple.com>
3047
3048         Reviewed by Darin.
3049
3050         Changed all ForwardingHeaders to use #include instead of #import.
3051
3052         * ForwardingHeaders/kjs/JSLock.h:
3053         * ForwardingHeaders/kjs/SavedBuiltins.h:
3054         * ForwardingHeaders/kjs/collector.h:
3055         * ForwardingHeaders/kjs/dtoa.h:
3056         * ForwardingHeaders/kjs/internal.h:
3057         * ForwardingHeaders/kjs/interpreter.h:
3058         * ForwardingHeaders/kjs/lookup.h:
3059         * ForwardingHeaders/kjs/object.h:
3060         * ForwardingHeaders/kjs/property_map.h:
3061         * ForwardingHeaders/kjs/protect.h:
3062         * ForwardingHeaders/wtf/AlwaysInline.h:
3063         * ForwardingHeaders/wtf/Assertions.h:
3064         * ForwardingHeaders/wtf/FastMalloc.h:
3065         * ForwardingHeaders/wtf/GetPtr.h:
3066         * ForwardingHeaders/wtf/HashCountedSet.h:
3067         * ForwardingHeaders/wtf/HashMap.h:
3068         * ForwardingHeaders/wtf/HashSet.h:
3069         * ForwardingHeaders/wtf/HashTraits.h:
3070         * ForwardingHeaders/wtf/MathExtras.h:
3071         * ForwardingHeaders/wtf/Noncopyable.h:
3072         * ForwardingHeaders/wtf/OwnArrayPtr.h:
3073         * ForwardingHeaders/wtf/OwnPtr.h:
3074         * ForwardingHeaders/wtf/PassRefPtr.h:
3075         * ForwardingHeaders/wtf/Platform.h:
3076         * ForwardingHeaders/wtf/RefPtr.h:
3077         * ForwardingHeaders/wtf/Vector.h:
3078
3079 2006-12-09  Rob Buis  <buis@kde.org>
3080
3081         Reviewed by Darin.
3082
3083         http://bugs.webkit.org/show_bug.cgi?id=11625
3084         Investigate possibility to share code between HTMLStyleElement and SVGStyleElement
3085
3086         Add a class shared by both HTMLStyleElement and SVGStyleElement that
3087         encapsulates the common logic.
3088
3089         * CMakeLists.txt:
3090         * WebCore.xcodeproj/project.pbxproj:
3091         * dom/Document.cpp:
3092         (WebCore::Document::recalcStyleSelector):
3093         Generalize stylesheet processing of svg and html.
3094
3095         * dom/StyleElement.cpp: Added.
3096         (WebCore::StyleElement::StyleElement):
3097         (WebCore::StyleElement::sheet):
3098         (WebCore::StyleElement::insertedIntoDocument):
3099         (WebCore::StyleElement::removedFromDocument):
3100         (WebCore::StyleElement::childrenChanged):
3101         * dom/StyleElement.h: Added.
3102         (WebCore::StyleElement::~StyleElement):
3103         (WebCore::StyleElement::isLoading):
3104         Common base class for SVGStyleElement and HTMLStyleElement.
3105
3106         * html/HTMLStyleElement.cpp:
3107         (WebCore::HTMLStyleElement::HTMLStyleElement):
3108         (WebCore::HTMLStyleElement::parseMappedAttribute):
3109         (WebCore::HTMLStyleElement::insertedIntoDocument):
3110         (WebCore::HTMLStyleElement::removedFromDocument):
3111         (WebCore::HTMLStyleElement::childrenChanged):
3112         (WebCore::HTMLStyleElement::media):
3113         (WebCore::HTMLStyleElement::setMedia):
3114         (WebCore::HTMLStyleElement::type):
3115         (WebCore::HTMLStyleElement::setType):
3116         * html/HTMLStyleElement.h:
3117         Use new common class.
3118
3119         * ksvg2/svg/SVGElement.cpp:
3120         * ksvg2/svg/SVGElement.h:
3121         * ksvg2/svg/SVGSVGElement.cpp:
3122         (WebCore::SVGSVGElement::contentScriptType):
3123         (WebCore::SVGSVGElement::contentStyleType):
3124         * ksvg2/svg/SVGSVGElement.h:
3125         Do not use tryGetAttribute(NS) anymore.
3126
3127         * ksvg2/svg/SVGStyleElement.cpp:
3128         (WebCore::SVGStyleElement::SVGStyleElement):
3129         (WebCore::SVGStyleElement::xmlspace):
3130         (WebCore::SVGStyleElement::type):
3131         (WebCore::SVGStyleElement::media):
3132         (WebCore::SVGStyleElement::title):
3133         (WebCore::SVGStyleElement::insertedIntoDocument):
3134         (WebCore::SVGStyleElement::removedFromDocument):
3135         (WebCore::SVGStyleElement::childrenChanged):
3136         * ksvg2/svg/SVGStyleElement.h:
3137         Use new common class.
3138
3139 2006-12-08  David Hyatt  <hyatt@apple.com>
3140
3141         Land the new ICU abstraction layer (WTF::Unicode).  Patch
3142         by Lars with a couple of fixes thrown in by me.
3143
3144         Reviewed by hyatt
3145
3146         * ForwardingHeaders/wtf/icu/UnicodeIcu.h: Added.
3147         * ForwardingHeaders/wtf/unicode/Unicode.h: Added.
3148         * WebCore.xcodeproj/project.pbxproj:
3149         * css/cssparser.cpp:
3150         (WebCore::ParseString::lower):
3151         * dom/Document.cpp:
3152         (WebCore::isValidNameStart):
3153         (WebCore::isValidNamePart):
3154         * editing/TextIterator.cpp:
3155         (WebCore::CircularSearchBuffer::append):
3156         * html/HTMLFontElement.cpp:
3157         (WebCore::parseFontSizeNumber):
3158         * html/HTMLInputElement.cpp:
3159         (WebCore::numGraphemeClusters):
3160         (WebCore::numCharactersInGraphemeClusters):
3161         * html/HTMLSelectElement.cpp:
3162         (WebCore::stripLeadingWhiteSpace):
3163         * page/Frame.h:
3164         * platform/DeprecatedString.h:
3165         (WebCore::DeprecatedChar::isSpace):
3166         (WebCore::DeprecatedChar::lower):
3167         (WebCore::DeprecatedChar::upper):
3168         * platform/Font.cpp:
3169         (WebCore::WidthIterator::advance):
3170         (WebCore::WidthIterator::normalizeVoicingMarks):
3171         * platform/FontCache.h:
3172         * platform/FontData.h:
3173         * platform/GlyphMap.cpp:
3174         * platform/GlyphMap.h:
3175         * platform/GlyphWidthMap.h:
3176         * platform/KURL.cpp:
3177         (WebCore::encodeHostname):
3178         * platform/StringHash.h:
3179         (WTF::):
3180         * platform/StringImpl.cpp:
3181         (WebCore::isSpace):
3182         (WebCore::parseLength):
3183         (WebCore::StringImpl::isLower):
3184         (WebCore::StringImpl::lower):
3185         (WebCore::StringImpl::upper):
3186         (WebCore::StringImpl::secure):
3187         (WebCore::StringImpl::foldCase):
3188         (WebCore::StringImpl::capitalize):
3189         (WebCore::StringImpl::toInt):
3190         (WebCore::equalIgnoringCase):
3191         (WebCore::StringImpl::find):
3192         * platform/StringImpl.h:
3193         * platform/TextBoundaries.h:
3194         * platform/TextBreakIterator.h: Added.
3195         (WebCore::):
3196         * platform/TextBreakIteratorICU.cpp: Added.
3197         (WebCore::wordBreakIterator):
3198         (WebCore::characterBreakIterator):
3199         (WebCore::textBreakFirst):
3200         (WebCore::textBreakNext):
3201         (WebCore::textBreakPreceding):
3202         (WebCore::textBreakFollowing):
3203         (WebCore::textBreakCurrent):
3204         * platform/TextCodec.h:
3205         * platform/TextCodecLatin1.cpp:
3206         * platform/TextEncoding.cpp:
3207         (WebCore::TextEncoding::encode):
3208         * platform/TextEncoding.h:
3209         * platform/TextEncodingRegistry.cpp:
3210         (WebCore::buildTextEncodingNameMap):
3211         (WebCore::buildTextCodecMap):
3212         * platform/TextEncodingRegistry.h:
3213         * platform/UChar.h: Removed.
3214         * platform/graphics/GraphicsContext.h:
3215         * platform/qt/GlyphMapQt.cpp:
3216         * platform/qt/TextBreakIteratorQt.cpp: Added.
3217         (WebCore::TextBreakIterator::following):
3218         (WebCore::TextBreakIterator::preceding):
3219         (WebCore::WordBreakIteratorQt::first):
3220         (WebCore::WordBreakIteratorQt::next):
3221         (WebCore::WordBreakIteratorQt::previous):
3222         (WebCore::CharBreakIteratorQt::first):
3223         (WebCore::CharBreakIteratorQt::next):
3224         (WebCore::CharBreakIteratorQt::previous):
3225         (WebCore::wordBreakIterator):
3226         (WebCore::characterBreakIterator):
3227         (WebCore::textBreakFirst):
3228         (WebCore::textBreakNext):
3229         (WebCore::textBreakPreceding):
3230         (WebCore::textBreakFollowing):
3231         (WebCore::textBreakCurrent):
3232         * platform/qt/TextCodecQt.cpp: Added.
3233         (WebCore::getAtomicName):
3234         (WebCore::TextCodecQt::registerEncodingNames):
3235         (WebCore::newTextCodecQt):
3236         (WebCore::TextCodecQt::registerCodecs):
3237         (WebCore::TextCodecQt::TextCodecQt):
3238         (WebCore::TextCodecQt::~TextCodecQt):
3239         (WebCore::TextCodecQt::decode):
3240         (WebCore::TextCodecQt::encode):
3241         * platform/qt/TextCodecQt.h: Added.
3242         * rendering/RenderBlock.cpp:
3243         (WebCore::RenderBlock::updateFirstLetter):
3244         * rendering/RenderText.cpp:
3245         (WebCore::RenderText::previousOffset):
3246         (WebCore::RenderText::nextOffset):
3247         (WebCore::RenderText::widthFromCache):
3248         * rendering/RenderText.h:
3249         * rendering/bidi.cpp:
3250         (WebCore::BidiState::BidiState):
3251         (WebCore::BidiContext::BidiContext):
3252         (WebCore::bidiNext):
3253         (WebCore::bidiFirst):
3254         (WebCore::BidiIterator::direction):
3255         (WebCore::appendRun):
3256         (WebCore::embed):
3257         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
3258         (WebCore::RenderBlock::bidiReorderLine):
3259         (WebCore::RenderBlock::layoutInlineChildren):
3260         * rendering/bidi.h:
3261         (WebCore::BidiStatus::BidiStatus):
3262         (WebCore::BidiContext::dir):
3263         (WebCore::BidiContext::basicDir):
3264         (WebCore::BidiRun::BidiRun):
3265         * rendering/break_lines.h:
3266
3267 2006-12-08  Adam Roben  <aroben@apple.com>
3268
3269         Rolling out r17865 because it caused a performance regression.
3270
3271         * loader/TextResourceDecoder.cpp:
3272         (WebCore::findXMLEncoding):
3273         * platform/CString.cpp:
3274         (WebCore::CString::data):
3275         * platform/CString.h:
3276         * platform/TextStream.cpp:
3277         (WebCore::TextStream::operator<<):
3278         * platform/TextStream.h:
3279
3280 2006-12-08  Zack Rusin  <zack@kde.org>
3281
3282         Reviewed by Maciej.
3283
3284         Fix the Qt/KDE build after all the API changes.
3285
3286         * CMakeLists.txt:
3287         * editing/qt/EditorQt.cpp: Added.
3288         (WebCore::Editor::newGeneralClipboard):
3289         (WebCore::Editor::ignoreSpelling):
3290         (WebCore::Editor::learnSpelling):
3291         (WebCore::Editor::advanceToNextMisspelling):
3292         (WebCore::Editor::isSelectionMisspelled):
3293         (WebCore::Editor::isSelectionUngrammatical):
3294         (WebCore::Editor::guessesForUngrammaticalSelection):
3295         (WebCore::Editor::guessesForMisspelledSelection):
3296         (WebCore::Editor::markMisspellingsInAdjacentWords):
3297         (WebCore::Editor::markMisspellings):
3298         * loader/NavigationAction.h:
3299         * loader/qt/FrameLoaderClientQt.cpp:
3300         (WebCore::FrameLoaderClientQt::frameLoaderDestroyed):
3301         (WebCore::FrameLoaderClientQt::canHandleRequest):
3302         * loader/qt/FrameLoaderClientQt.h:
3303         * loader/qt/FrameLoaderQt.cpp:
3304         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3305         (WebCore::FrameLoader::load):
3306         * loader/qt/ResourceLoaderQt.cpp:
3307         * platform/ContextMenu.h:
3308         * platform/graphics/qt/GraphicsContextQt.cpp:
3309         * platform/graphics/qt/PathQt.cpp:
3310         (WebCore::Path::addArc):
3311         * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
3312         (WebCore::SVGPaintServerLinearGradient::setup):
3313         * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
3314         (WebCore::setup):
3315         * platform/network/ResourceHandle.h:
3316         (WebCore::ResourceHandle::getInternal):
3317         * platform/network/ResourceHandleInternal.h:
3318         * platform/network/qt/ResourceHandleManager.cpp:
3319         (WebCore::ResourceHandleManager::slotData):
3320         (WebCore::ResourceHandleManager::remove):
3321         * platform/network/qt/ResourceHandleQt.cpp:
3322         (WebCore::ResourceHandle::~ResourceHandle):
3323         (WebCore::ResourceHandle::start):
3324         * platform/qt/ChromeClientQt.cpp:
3325         (WebCore::ChromeClientQt::addMessageToConsole):
3326         (WebCore::ChromeClientQt::chromeDestroyed):
3327         * platform/qt/ChromeClientQt.h:
3328         * platform/qt/ContextMenuClientQt.cpp:
3329         (WebCore::ContextMenuClientQt::copyLinkToClipboard):
3330         (WebCore::ContextMenuClientQt::downloadURL):
3331         (WebCore::ContextMenuClientQt::copyImageToClipboard):
3332         (WebCore::ContextMenuClientQt::contextMenuDestroyed):
3333         (WebCore::ContextMenuClientQt::contextMenuItemSelected):
3334         * platform/qt/ContextMenuClientQt.h:
3335         * platform/qt/ContextMenuItemQt.cpp: Added.
3336         (WebCore::ContextMenuItem::ContextMenuItem):
3337         (WebCore::ContextMenuItem::~ContextMenuItem):
3338         (WebCore::ContextMenuItem::platformDescription):
3339         (WebCore::ContextMenuItem::action):
3340         (WebCore::ContextMenuItem::title):
3341         (WebCore::ContextMenuItem::setAction):
3342         (WebCore::ContextMenuItem::setTitle):
3343         (WebCore::ContextMenuItem::setSubMenu):
3344         * platform/qt/ContextMenuQt.cpp:
3345         (WebCore::ContextMenu::ContextMenu):
3346         (WebCore::ContextMenu::~ContextMenu):
3347         (WebCore::ContextMenu::appendItem):
3348         (WebCore::ContextMenu::itemCount):
3349         (WebCore::ContextMenu::insertItem):
3350         (WebCore::ContextMenu::setPlatformDescription):
3351         * platform/qt/CursorQt.cpp:
3352         (WebCore::copyCursor):
3353         * platform/qt/EditorClientQt.cpp:
3354         (WebCore::EditorClientQt::shouldInsertNode):
3355         (WebCore::WebCore::EditorClientQt::pageDestroyed):
3356         (WebCore::EditorClientQt::smartInsertDeleteEnabled):
3357         * platform/qt/EditorClientQt.h:
3358         * platform/qt/FrameQt.cpp:
3359         (WebCore::FrameQt::FrameQt):
3360         (WebCore::FrameQt::keyEvent):
3361         * platform/qt/FrameQt.h:
3362         * platform/qt/FrameQtClient.cpp:
3363         (WebCore::FrameQtClientDefault::openURL):
3364         (WebCore::FrameQtClientDefault::submitForm):
3365         * platform/qt/LoaderFunctionsQt.cpp:
3366         * platform/qt/PasteboardQt.cpp: Added.
3367         (WebCore::Pasteboard::Pasteboard):
3368         (WebCore::Pasteboard::generalPasteboard):
3369         (WebCore::Pasteboard::clearTypes):
3370         (WebCore::Pasteboard::writeSelection):
3371         (WebCore::Pasteboard::canSmartReplace):
3372         (WebCore::Pasteboard::plainText):
3373         (WebCore::Pasteboard::documentFragment):
3374
3375 === Safari-521.32 ===
3376
3377 2006-12-08  Rob Buis  <buis@kde.org>
3378
3379         Reviewed by Maciej.
3380
3381         http://bugs.webkit.org/show_bug.cgi?id=10188
3382         Form elements added via appendChild() are not accessible via form.element
3383
3384         Make sure looking up form elements works when the form is not appended
3385         to the document.
3386
3387         * html/HTMLFormElement.cpp:
3388         (WebCore::HTMLFormElement::registerFormElement):
3389
3390 2006-12-08  Rob Buis  <buis@kde.org>
3391
3392         Reviewed by Adele.
3393
3394         http://bugs.webkit.org/show_bug.cgi?id=11765
3395         REGRESSION: Clicking on a select with size other than 1 and no children results in a crash
3396
3397         Make sure returned value is -1 for selects without children.
3398
3399         * rendering/RenderListBox.cpp:
3400         (WebCore::RenderListBox::listIndexAtOffset):
3401
3402 2006-12-08  Adam Roben  <aroben@apple.com>
3403
3404         Reviewed by Anders.
3405
3406         This is a mo' better fix for ensuring we don't use macro definitions
3407         of min/max.
3408
3409         * config.h:
3410
3411 2006-12-08  Don Gibson  <dgibson77@gmail.com>
3412
3413         Reviewed and landed by Alexey.
3414
3415         http://bugs.webkit.org/show_bug.cgi?id=11759:
3416         Windows build bustage
3417
3418         * WebCore.vcproj/WebCore/WebCore.vcproj:
3419         * bridge/win/ContextMenuClientWin.h:
3420         * bridge/win/FrameWin.h:
3421         * loader/win/FrameLoaderWin.cpp:
3422         (WebCore::FrameLoader::submitForm):
3423         * platform/network/win/ResourceHandleWin.cpp:
3424         (WebCore::ResourceHandle::onRequestComplete):
3425         (WebCore::ResourceHandle::fileLoadTimer):
3426         (WebCore::ResourceHandle::cancel):
3427         * platform/win/MouseEventWin.cpp:
3428         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3429         * platform/win/TemporaryLinkStubs.cpp:
3430         (WebCore::fileButtonChooseFileLabel):
3431         (WebCore::inputElementAltText):
3432         (WebCore::copyCursor):
3433         (WebCore::resetButtonDefaultLabel):
3434         (WebCore::ContextMenuClientWin::contextMenuItemSelected):
3435         (WebCore::ContextMenuClientWin::copyLinkToClipboard):
3436         (WebCore::ContextMenuClientWin::downloadURL):
3437         (WebCore::ContextMenuClientWin::copyImageToClipboard):
3438         (WebCore::Editor::ignoreSpelling):
3439         (WebCore::Editor::learnSpelling):
3440         (WebCore::Editor::isSelectionUngrammatical):
3441         (WebCore::Editor::isSelectionMisspelled):
3442         (WebCore::Editor::guessesForMisspelledSelection):
3443         (WebCore::Editor::guessesForUngrammaticalSelection):
3444         (WebCore::Editor::markMisspellingsInAdjacentWords):
3445         (WebCore::FrameLoader::load):
3446         (WebCore::FrameWin::scheduleClose):
3447         (WebCore::FrameWin::respondToChangedSelection):
3448
3449 2006-12-08  Sam Weinig  <sam@webkit.org>
3450
3451         Reviewed by Geoff.
3452
3453         Fix for http://bugs.webkit.org/show_bug.cgi?id=11777
3454         Crash when using XMLSerializer.serializeToString() on
3455         documentless, DocumentType nodes.
3456
3457         Test: fast/dom/XMLSerializer-doctype.html
3458         Test: fast/dom/XMLSerializer-doctype2.html
3459
3460         * dom/DOMImplementation.cpp:
3461         (WebCore::DOMImplementation::createDocument): set the document of the 
3462         DocumentType node to the new document.
3463         * xml/XMLSerializer.cpp: Cleanup.
3464         (WebCore::XMLSerializer::serializeToString): now throws an exception
3465         for documentless nodes. 
3466         * xml/XMLSerializer.h: cleanup
3467         * xml/XMLSerializer.idl: add exception
3468
3469 2006-12-07  Justin Garcia  <justin.garcia@apple.com>
3470
3471         Reviewed by john
3472
3473         <rdar://problem/4836287>
3474         Cannot expand selection out of editable element when containing element is non-editable.
3475
3476         * editing/Selection.cpp:
3477         (WebCore::Selection::adjustForEditableContent): Restrict the selection endpoints
3478         to the same *highest* editable root.  This bug only happened when creating selections
3479         based in an editable region and extending into a higher editable root, so this change 
3480         doesn't expose any new kinds of deletions, but we should start thinking about how
3481         those deletions should behave.
3482         * editing/SelectionController.cpp:
3483         (WebCore::SelectionController::selectAll): Ditto.
3484
3485 2006-12-08  Beth Dakin  <bdakin@apple.com>
3486
3487         Reviewed by Maciej.
3488
3489         Add a new member variable to ContextMenuItem to hold on to the sub-
3490         menu. The new member variable is an OwnPtr<ContextMenu>
3491
3492         * platform/ContextMenu.cpp: Because of the OwnPtr in
3493         ContextMenuItem, we have to separate the declaration of
3494         ContextMenuItems away from the calls to appendItem(). Not doing so
3495         causes a build failure because OwnPtr inherits from Noncopyable.
3496         (WebCore::createFontSubMenu): Same.
3497         (WebCore::createSpellingAndGrammarSubMenu): Same.
3498         (WebCore::createSpellingSubMenu): Same.
3499         (WebCore::createSpeechSubMenu): Same.
3500         (WebCore::createWritingDirectionSubMenu): Same.
3501         (WebCore::ContextMenu::populate): Same.
3502         * platform/ContextMenuItem.h:  New member variable m_subMenu.
3503         * platform/mac/ContextMenuItemMac.mm: Take care of setting
3504         m_subMenu in addition to setting the submenu of the NSMenuItem when
3505         we have a sub-menu.
3506         (WebCore::menuToArray):
3507         (WebCore::ContextMenuItem::ContextMenuItem): Same.
3508         (WebCore::ContextMenuItem::platformSubMenu): Same.
3509         (WebCore::ContextMenuItem::setSubMenu): Same.
3510
3511 2006-12-08  MorganL  <morganl.webkit@yahoo.com>
3512
3513         Reviewed by Darin.
3514
3515         http://bugs.webkit.org/show_bug.cgi?id=11778
3516         CString::data() should be documented as returning a null terminated char array
3517
3518         * platform/CString.h:
3519         Add some basic documentation to CString.h
3520
3521 2006-12-08  Alexey Proskuryakov  <ap@webkit.org>
3522
3523         Reviewed by Geoff.
3524
3525         http://bugs.webkit.org/show_bug.cgi?id=11718
3526         REGRESSION: When I mouse up after dragging a selection outside of a iframe, the iframe
3527         continues to scroll automatically.
3528
3529         Test: manual-tests/autoscroll.html
3530
3531         * manual-tests/autoscroll.html: Added.
3532
3533         * page/EventHandler.cpp:
3534         (WebCore::EventHandler::handleMousePressEvent):
3535         Assign to m_mousePressNode earlier, so that it is available in the superframe as well.
3536         Reset m_mouseDownWasInSubframe to false when starting to handle a mousedown - previously, its value
3537         was only defined if the event was passed down to a widget or a subframe.
3538
3539         (WebCore::EventHandler::stopAutoscrollTimer):
3540         If the mouse down event was in a subframe, stop the subframe's timer.
3541
3542 2006-12-08  Alexey Proskuryakov  <ap@webkit.org>
3543
3544         Reviewed by Geoff.
3545
3546         http://bugs.webkit.org/show_bug.cgi?id=6275
3547         XMLHttpRequest.getResponseHeader should return a null string for non-existent headers
3548
3549         * bindings/js/JSXMLHttpRequest.cpp:
3550         (KJS::JSXMLHttpRequestProtoFunc::callAsFunction):
3551         Convert null getResponseHeader strings to JS null, rather than undefined.
3552
3553 2006-12-08  Alexey Proskuryakov  <ap@webkit.org>
3554
3555         Reviewed by Darin.
3556
3557         http://bugs.webkit.org/show_bug.cgi?id=9854
3558         HTTP Refresh header with quotes is parsed incorrectly
3559
3560         Test: http/tests/misc/redirect-with-quotes.php
3561
3562         * WebCore.xcodeproj/project.pbxproj:
3563         Added HTTPParsers.{h,cpp}. I intend to move Content-Type parsing here, as well.
3564
3565         * dom/Document.cpp:
3566         (WebCore::Document::processHttpEquiv):
3567         * loader/FrameLoader.cpp:
3568         (WebCore::FrameLoader::receivedFirstData):
3569         Use the new implementation in HTTPHeaders.
3570
3571         * platform/network/HTTPParsers.cpp: Added.
3572         (WebCore::skipWhiteSpace):
3573         (WebCore::parseHTTPRefresh):
3574         * platform/network/HTTPParsers.h: Added.
3575         Merged and rewrote existing implementations for better Firefox compatibility.
3576
3577 2006-12-08  Alexey Proskuryakov  <ap@webkit.org>