a043cffa19f9957ce78319a89d70a6bdc378ccd7
[WebKit-https.git] / WebCore / ChangeLog
1 2006-05-05  Darin Adler  <darin@apple.com>
2
3         - fix the Windows build (this time for sure)
4
5         * platform/win/TemporaryLinkStubs.cpp:
6         (GraphicsContext::translate): Added.
7         (GraphicsContext::rotate): Ditto.
8         (GraphicsContext::scale): Ditto.
9
10 2006-05-05  Darin Adler  <darin@apple.com>
11
12         - fix the Windows build
13
14         * bridge/win/FrameWin.h: Add Element* parameter to createPlugin.
15         * platform/win/TemporaryLinkStubs.cpp: (FrameWin::createPlugin): Ditto.
16
17 2006-05-05  Darin Adler  <darin@apple.com>
18
19         - get the Windows build a little closer to building again
20
21         * platform/cairo/GraphicsContextCairo.cpp:
22         (WebCore::GraphicsContext::drawRect): Call alpha to check if the color is transparent.
23         Call setColor directly instead of setColorFromPen.
24         (WebCore::GraphicsContext::drawLine): Ditto.
25         (WebCore::GraphicsContext::drawEllipse): Ditto.
26         (WebCore::GraphicsContext::drawArc): Ditto.
27         (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
28         * platform/win/TemporaryLinkStubs.cpp: (JavaAppletWidget::JavaAppletWidget): Updated parameter types.
29
30 2006-05-05  Darin Adler  <darin@apple.com>
31
32         Reviewed by Adele.
33
34         - fixed data structure used to save/restore form element state to remove the
35           O(n^2) algorithm and remove anomalies in how it works
36         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8683
37           REGRESSION: imdb search button has "Submit" overload after going back
38
39         * manual-tests/form-value-restore.html: Added.
40
41         * bridge/mac/WebCoreFrameBridge.mm:
42         (-[WebCoreFrameBridge saveDocumentState]): Rewrote to call the new formElementsState
43         function on the document and also to convert null strings to NSNull instead of empty
44         NSString objects.
45         (-[WebCoreFrameBridge restoreDocumentState]): Ditto, with the setStateForNewFormElements
46         function.
47
48         * dom/Document.h: Added FormElementKey, FormElementKeyHash, and FormElementKeyHashTraits
49         for use in the hash map. Made readyState, inputEncoding, defaultCharset, charset,
50         characterSet, getElementByAccessKey, haveStylesheetsLoaded, usesDescendantRules,
51         usesSiblingRules, inCompatMode, inAlmostStrictMode, inStrictMode, preferredStylesheetSet,
52         selectedStylesheetSet, and getCSSTarget all const member functions. Removed the unused
53         nextState function. Renamed registerMaintainsState and deregisterMaintainsState to
54         registerFormElementWithState and HTMLGenericFormElement and changed them to use form
55         elements rather than arbitrary DOM nodes. Replaced docState with formElementsState and
56         setRestoreState and restoreState with setStateForNewFormElements, hasStateForNewFormElements,
57         and takeStateForFormElement. Replaced m_maintainsState with m_formElementsWithState,
58         m_state with m_stateForNewFormElements. Made m_elementsByAccessKey and m_accessKeyMapValid
59         mutable. Removed unused m_elementNames, m_elementNameAlloc, m_elementNameCount, m_attrNames,
60         m_attrNameAlloc, m_attrNameCount, m_namespaceURIs, m_namespaceURIAlloc, m_namespaceURICount.
61
62         * dom/Document.cpp:
63         (WebCore::Document::Document): Remove initialization of long-obsolete m_elementNames and
64         m_attrNames.
65         (WebCore::Document::~Document): Remove destruction of same.
66         (WebCore::Document::readyState): Made const.
67         (WebCore::Document::inputEncoding): Ditto.
68         (WebCore::Document::defaultCharset): Ditto.
69         (WebCore::Document::getElementByAccessKey): Ditto.
70         (WebCore::Document::preferredStylesheetSet): Ditto.
71         (WebCore::Document::selectedStylesheetSet): Ditto.
72         (WebCore::Document::getCSSTarget): Ditto.
73         (WebCore::Document::formElementsState): Added. Replaces the old docState function.
74         Builds a vector of strings, with 3 strings for each form element containing the
75         name, type, and state value.
76         (WebCore::Document::setStateForNewFormElements): Added. Converts the state vector
77         into a hash map, considering the scheme with 3 strings for form element used above.
78         (WebCore::Document::hasStateForNewFormElements): Added.
79         (WebCore::Document::takeStateForFormElement): Added. Given a name and type, looks
80         up the values in the hash map and "peels off" the last one.
81         (WebCore::FormElementKey::FormElementKey): Added.
82         (WebCore::FormElementKey::~FormElementKey): Added.
83         (WebCore::FormElementKey::operator=): Added.
84         (WebCore::FormElementKey::ref): Added.
85         (WebCore::FormElementKey::deref): Added.
86         (WebCore::FormElementKeyHash::hash): Added.
87         (WebCore::FormElementKeyHashTraits::deletedValue): Added.
88
89         * dom/Element.h: Removed state function.
90         * dom/Node.h: Removed maintainsState, state, and restoreState functions.
91         * dom/Node.cpp: Ditto.
92
93         * dom/QualifiedName.cpp: Reformatted.
94         (WebCore::hashComponents): Removed code to handle buffers that are not multiples
95         of 4 bytes, since a QualifiedName is guaranteed to be; also asserted that fact.
96
97         * html/HTMLParser.cpp:
98         (WebCore::HTMLParser::insertNode): Remove code to restore state; that's now handled
99         by closeRenderer.
100         (WebCore::HTMLParser::popOneBlock): Ditto.
101
102         * html/HTMLFormElement.cpp: Added include of HTMLInputElement.h.
103
104         * html/HTMLGenericFormElement.h: Changed form to be a const member function.
105         Changed type function to return a const AtomicString& instead of a String.
106         Added an override of closeRenderer. Removed state and findMatchingState functions.
107         Added stateValue and restoreState functions. Made m_form, m_disabled, and m_readOnly
108         be private instead of protected. Removed m_inited. Changed booleans to not use bit
109         fields since there are only two of them.
110         * html/HTMLGenericFormElement.cpp: Removed encodedElementName, state, and
111         findMatchingState functions.
112         (WebCore::HTMLGenericFormElement::stateValue): Added. No implementation. This will only be
113         called for subclasses that call registerFormElementWithState, and those will override and
114         implement it.
115         (WebCore::HTMLGenericFormElement::restoreState): Ditto.
116         (WebCore::HTMLGenericFormElement::closeRenderer): Added. Replaces code that was in the
117         HTML parser. Calls takeStateForFormElement, passing in the name and type, and if a
118         state is found, calls restoreState.
119
120         * html/HTMLButtonElement.h: Changed type to return a const AtomicString& instead
121         of a String.
122         * html/HTMLButtonElement.cpp:
123         (WebCore::HTMLButtonElement::type): Return a const AtomicString& instead of a
124         String.
125         (WebCore::HTMLButtonElement::defaultEventHandler): Use form() instead of m_form.
126         (WebCore::HTMLButtonElement::isSuccessfulSubmitButton): Use disabled() instead of
127         m_disabled.
128
129         * html/HTMLInputElement.h: Changed type to return a const AtomicString& instead
130         of a String. Removed maintainsState, state, and restoreState functions, and added
131         new stateValue and restoreState functions. Added m_inited (moved here from the generic
132         form element base class).
133         * html/HTMLInputElement.cpp:
134         (WebCore::HTMLInputElement::init): Call registerFormElementWithState. This was
135         formerly done by the HTML parser.
136         (WebCore::HTMLInputElement::~HTMLInputElement): Call deregisterFormElementWithState
137         by its new name.
138         (WebCore::HTMLInputElement::isKeyboardFocusable): Use form() instead of m_form.
139         (WebCore::HTMLInputElement::setType): Ditto.
140         (WebCore::HTMLInputElement::setInputType): Ditto. Also call inputType() != PASSWORD
141         instead of maintainsState(), since this is the only function that needs to know
142         the rule and it's no longer a function in the base class. Also call register and
143         deregister functions by their new names.
144         (WebCore::HTMLInputElement::type): Changed to return const AtomicString& instead
145         of String.
146         (WebCore::HTMLInputElement::stateValue): Renamed from state and changed to no
147         longer include the name and type, formerly obtained by calling the base class's
148         HTMLGenericFormElement::state, and to no longer modify the value() string by
149         adding a ".", which gets in the way of distinguishing null and empty values
150         and is slower and unnecessary.
151         (WebCore::HTMLInputElement::restoreState):  Changed because it takes a single
152         state and doesn't need to call findMatchingState, and also to no longer remove the last
153         character from the value when restoring state.
154         (WebCore::HTMLInputElement::parseMappedAttribute): Use form() instead of m_form.
155         (WebCore::HTMLInputElement::isSuccessfulSubmitButton): Use disabled() instead of
156         m_disabled.
157         (WebCore::HTMLInputElement::setChecked): Use form() instead of m_form.
158         (WebCore::HTMLInputElement::preDispatchEventHandler): Ditto.
159         (WebCore::HTMLInputElement::defaultEventHandler): Ditto.
160
161         * html/HTMLSelectElement.h: Changed type to return a const AtomicString& instead
162         of a String.
163         * html/HTMLSelectElement.cpp:
164         (WebCore::HTMLSelectElement::HTMLSelectElement): Call registerFormElementWithState.
165         This was formerly done by the HTML parser.
166         (WebCore::HTMLSelectElement::~HTMLSelectElement): Call deregisterFormElementWithState
167         by its new name.
168         (WebCore::HTMLSelectElement::type): Changed to return const AtomicString& instead
169         of String.
170         (WebCore::HTMLSelectElement::stateValue): Renamed from state and changed to no
171         longer include the name and type, formerly obtained by calling the base class's
172         HTMLGenericFormElement::state, and to build the string in a Vector<char> instead of
173         appending characters one at a time to a string.
174         (WebCore::HTMLSelectElement::restoreState):  Changed because it takes a single
175         state and doesn't need to call findMatchingState.
176         (WebCore::HTMLSelectElement::defaultEventHandler): Use form() instead of m_form.
177
178         * html/HTMLTextAreaElement.h: Changed type to return a const AtomicString& instead
179         of a String. Removed maintainsState, state, and restoreState functions, and added
180         new stateValue and restoreState functions.
181         * html/HTMLTextAreaElement.cpp:
182         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Call registerFormElementWithState.
183         This was formerly done by the HTML parser. Also use member initialization instead of
184         assignment.
185         (WebCore::HTMLTextAreaElement::~HTMLTextAreaElement): Call deregisterFormElementWithState
186         by its new name.
187         (WebCore::HTMLTextAreaElement::type): Changed to return const AtomicString& instead
188         of String.
189         (WebCore::HTMLTextAreaElement::stateValue): Renamed from state and changed to no
190         longer include the name and type, formerly obtained by calling the base class's
191         HTMLGenericFormElement::state, and to no longer modify the value() string by
192         adding a ".", which is unnecessary.
193         (WebCore::HTMLTextAreaElement::restoreState): Changed because it takes a single
194         state and doesn't need to call findMatchingState, and also to no longer remove the last
195         character from the value when restoring state.
196         (WebCore::HTMLTextAreaElement::updateValue): Changed to const.
197         (WebCore::HTMLTextAreaElement::value): Ditto.
198         (WebCore::HTMLTextAreaElement::defaultValue): Ditto.
199
200         * html/HTMLFieldSetElement.h: Changed type to return a const AtomicString& instead
201         of a String.
202         * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::type): Ditto.
203         * html/HTMLKeygenElement.h: Ditto.
204         * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::type): Ditto.
205         * html/HTMLLegendElement.h: Ditto.
206         * html/HTMLLegendElement.cpp: (WebCore::HTMLLegendElement::type):
207         * html/HTMLOptGroupElement.h: Ditto.
208         * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::type): Ditto.
209         * html/HTMLOptionElement.h: Ditto.
210         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::type): Ditto.
211
212         * ksvg2/svg/SVGAnimationElement.cpp: (SVGAnimationElement::closeRenderer):
213         Added missing call to base class.
214
215         * rendering/render_form.h: Removed element() functions that cast to the
216         appropriate derived element class. They do make some bits of code slightly
217         more readable, but they also require including too many headers. Removed
218         the includes of HTMLInputElement.h, HTMLSelectElement.h, HTMLTextAreaElement.h,
219         and KWQLineEdit.h, and added an include of GraphicsTypes.h.
220         * rendering/render_form.cpp:
221         (WebCore::RenderFormElement::updateFromElement): Changed use of element()
222         to instead use node() and cast.
223         (WebCore::RenderFormElement::clicked): Ditto.
224         (WebCore::RenderLineEdit::selectionChanged): Ditto.
225         (WebCore::RenderLineEdit::returnPressed): Ditto.
226         (WebCore::RenderLineEdit::performSearch): Ditto.
227         (WebCore::RenderLineEdit::addSearchResult): Ditto.
228         (WebCore::RenderLineEdit::calcMinMaxWidth): Ditto.
229         (WebCore::RenderLineEdit::setStyle): Ditto.
230         (WebCore::RenderLineEdit::updateFromElement): Ditto.
231         (WebCore::RenderLineEdit::valueChanged): Ditto.
232         (WebCore::RenderFileButton::calcMinMaxWidth): Ditto.
233         (WebCore::RenderFileButton::updateFromElement): Ditto.
234         (WebCore::RenderFileButton::returnPressed): Ditto.
235         (WebCore::RenderFileButton::valueChanged): Ditto.
236         (WebCore::RenderSelect::updateFromElement): Ditto.
237         (WebCore::RenderSelect::layout): Ditto.
238         (WebCore::RenderSelect::valueChanged): Ditto.
239         (WebCore::RenderSelect::selectionChanged): Ditto.
240         (WebCore::RenderSelect::updateSelection): Ditto.
241         (WebCore::RenderTextArea::destroy): Ditto.
242         (WebCore::RenderTextArea::calcMinMaxWidth): Ditto.
243         (WebCore::RenderTextArea::setStyle): Ditto.
244         (WebCore::RenderTextArea::updateFromElement): Ditto.
245         (WebCore::RenderTextArea::valueChanged): Ditto.
246         (WebCore::RenderTextArea::selectionChanged): Ditto.
247         (WebCore::RenderSlider::updateFromElement): Ditto.
248         (WebCore::RenderSlider::valueChanged): Ditto.
249
250 2006-05-05  Matt Gough  <matt@softchaos.com>
251
252         Reviewed by Darin.
253
254         http://bugzilla.opendarwin.org/show_bug.cgi?id=8563
255
256         Test: fast/doctypes/005-case-preserving.html
257
258         The doctype object in the DOM is now usable by client code
259         as opposed to always being exposed as nil. Now also ensures that
260         the 'name' of the component preserves the case of the original html source.
261         (i.e HtMl -> HtMl not HTML)
262
263         * dom/Document.h:
264         Changes comment by docType() to say it may return 0 for html
265         * html/HTMLDocument.cpp:
266         (WebCore::parseDocTypeDeclaration):
267         (WebCore::HTMLDocument::determineParseMode):
268         Preserves the case of the name component
269         (WebCore::HTMLDocument::doctype):removed
270         * html/HTMLDocument.h:
271         (WebCore::HTMLDocument::doctype):removed
272
273 2006-05-05  Rob Buis  <buis@kde.org>
274
275         Reviewed by Darin.
276
277         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8651:
278         [DOMHTMLSelectElement multiple] returns no when the select element is multiple
279
280         Correct the logic errors, which are clearly indicated by the changeset given
281         in the bug report.
282
283         * bindings/objc/DOMHTML.mm:
284         (-[DOMHTMLLinkElement disabled]):
285         (-[DOMHTMLSelectElement disabled]):
286         (-[DOMHTMLSelectElement multiple]):
287         (-[DOMHTMLOptGroupElement disabled]):
288         (-[DOMHTMLOptionElement defaultSelected]):
289         (-[DOMHTMLOptionElement disabled]):
290
291 2006-05-04  Darin Adler  <darin@apple.com>
292
293         Reviewed by Tim Omernick.
294
295         - fix storage leak I introduced yesterday
296
297         * platform/cg/GraphicsContextCG.cpp:
298         (WebCore::setCGFillColor): Added.
299         (WebCore::setCGStrokeColor): Added.
300         (WebCore::GraphicsContext::drawRect): Use setCGFillColor to avoid allocating
301         a CGColorRef object.
302         (WebCore::GraphicsContext::drawLine): Use setCGStrokeColor and setCGFillColor
303         to avoid allocating a CGColorRef object.
304         (WebCore::GraphicsContext::drawEllipse): Ditto.
305         (WebCore::GraphicsContext::drawArc): Ditto.
306         (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
307         (WebCore::GraphicsContext::fillRect): Ditto.
308
309 2006-05-04  Justin Garcia  <justin.garcia@apple.com>
310
311         Reviewed by harrison
312
313         * dom/Node.cpp:
314         (WebCore::Node::rootEditableElement):
315         Restored code to stop at the body tag.  Editing shouldn't be allowed to 
316         happen outside the body, so it needs to be the editable root even if the 
317         html element is contentEditable.
318         * editing/ReplaceSelectionCommand.cpp:
319         (WebCore::ReplaceSelectionCommand::shouldMergeEnd):
320         Now takes in more information so it can be "the decider".
321         (WebCore::ReplaceSelectionCommand::doApply):
322         Merging two paragraphs will destroy the moved one's block styles. Perform 
323         the end merge backward (from content already in the document to just inserted
324         content) if moving forward would move the paragraph that contained the start of 
325         the selection being pasted into, since we always want to preserve that paragraph's 
326         block style.
327         Moving backward in this case is also helpful because otherwise it would be
328         difficult to remember the position where inserted content began (since merging
329         would remove m_firstNodeInserted).  That position is needed in order to select 
330         the replacement and to add smart replace whitespace.
331         (WebCore::ReplaceSelectionCommand::removeEndBRIfNeeded):
332         If [br, 0] is at the end of a block, the br is not necessarily collapsed
333         in quirks mode.  [br, 0] needs to also not be at the start of a block.
334          
335         * editing/ReplaceSelectionCommand.h:
336
337 2006-05-04  Tim Omernick  <timo@apple.com>
338
339         Reviewed by Darin.
340
341         <rdar://problem/4537606> Give Java WebKit plugin access to its own DOM element
342
343         * bridge/mac/WebCoreFrameBridge.h:
344         Added DOMElement parameter to -viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:.
345
346         * bridge/JavaAppletWidget.h:
347         Constructor now takes the applet's element instead of its containing frame.
348
349         * bridge/mac/JavaAppletWidget.mm:
350         (JavaAppletWidget::JavaAppletWidget):
351         Pass the applet's element to viewForJavaAppletWithFrame:.
352
353         * rendering/RenderApplet.cpp:
354         (WebCore::RenderApplet::createWidgetIfNecessary):
355         Pass the element along to JavaAppletWidget.
356
357 2006-05-04  Tim Omernick  <timo@apple.com>
358
359         Reviewed by John Sullivan.
360
361         <rdar://problem/4480186> Give WebKit plugins access to their own DOM element
362
363         * bridge/mac/WebCoreFrameBridge.h:
364         Added DOMElement: parameter to -viewForPluginWithURL:attributeNames:attributueValues:MIMEType:
365
366         * bridge/mac/FrameMac.h:
367         * bridge/mac/FrameMac.mm:
368         (WebCore::FrameMac::createPlugin):
369         Added "element" parameter; wrap element in DOMElement and pass up to the bridge.
370
371         * page/Frame.h:
372         Added "element" parameter to createPlugin().
373         * page/Frame.cpp:
374         (WebCore::Frame::loadPlugin):
375         Get the plugin's DOM element and pass to createPlugin().
376
377 2006-05-04  Eric Seidel  <eseidel@apple.com>
378
379         Reviewed by timo.
380
381         Add drag & drop support to <input type="file">
382         http://bugzilla.opendarwin.org/show_bug.cgi?id=8733
383
384         Test: manual/input-type-file-drag-drop.html
385
386         * kwq/KWQFileButton.mm:
387         (-[WebFileChooserButton initWithWidget::]):
388         (-[WebCoreFileButton initWithWidget:]):
389         (-[WebCoreFileButton drawRect:]):
390         (-[WebCoreFileButton updateLabel]):
391         (-[WebCoreFileButton setFilename:]):
392         (-[WebCoreFileButton changeFilename:]):
393         (-[WebCoreFileButton chooseFilename:]):
394         (validFilenameFromPasteboard):
395         (-[WebCoreFileButton draggingEntered:]):
396         (-[WebCoreFileButton draggingExited:]):
397         (-[WebCoreFileButton performDragOperation:]):
398
399 2006-05-04  Beth Dakin  <bdakin@apple.com>
400
401         Reviewed by Hyatt.
402
403         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8732 
404         Backgrounds with background-size and background-origin do not 
405         always lay out correctly
406
407         * platform/cairo/ImageCairo.cpp:
408         (WebCore::Image::drawTiled): We no longer need to scale the source 
409         point since it will now come in with the scale already taken into 
410         account.
411         * platform/mac/ImageMac.mm:
412         (WebCore::Image::drawTiled): Same as above.
413         * rendering/RenderBox.cpp:
414         (WebCore::cacluateBackgroundSize): Now calculate the background 
415         size in a helper method.
416         (WebCore::RenderBox::paintBackgroundExtended): Calculate the 
417         background size before calculating cx, cy, cw, ch, sx, and sy so 
418         that they can all be calculated with the scaled image size taken 
419         into account.
420
421 2006-05-04  David Hyatt  <hyatt@apple.com>
422
423         Fix for 8693, crash when reloading PDF. Make sure to clear the truncator's
424         cached renderer.
425
426         Reviewed by beth
427
428         * bridge/mac/WebCoreStringTruncator.h:
429         * bridge/mac/WebCoreStringTruncator.mm:
430         (+[WebCoreStringTruncator clear]):
431         * platform/mac/WebTextRendererFactory.mm:
432         (-[WebTextRendererFactory clearCaches]):
433
434 2006-05-03  Darin Adler  <darin@apple.com>
435
436         Reviewed by Eric.
437
438         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8696
439           another round of GraphicsContext improvements
440
441         * WebCore.xcodeproj/project.pbxproj: Added GraphicsContextCG.cpp.
442         * html/CanvasRenderingContext2D.cpp:
443         (WebCore::CanvasRenderingContext2D::scale): Use new GraphicsContext function.
444         (WebCore::CanvasRenderingContext2D::rotate): Ditto.
445         (WebCore::CanvasRenderingContext2D::translate): Ditto.
446         * kwq/KWQComboBox.mm: Added include (not sure if this is needed for this patch,
447         but it's needed for one of my upcoming ones).
448
449         * platform/GraphicsContext.h: Changed fillColor and setFillColor to use Color
450         instead of RGBA32. Removed setColorFromFillColor and setColorFromPen. Added
451         scale, rotate, and translate functions.
452         * platform/GraphicsContext.cpp:
453         (WebCore::GraphicsContext::setFillColor): Changed to use Color instead of RGBA32.
454         (WebCore::GraphicsContext::fillColor): Ditto.
455
456         * platform/GraphicsTypes.h: Moved HorizontalAlignment here.
457         * platform/Widget.h: Removed HorizontalAlignment from here.
458
459         * platform/cg/GraphicsContextCG.cpp: Added. Started as a copy of GraphicsContextMac.mm.
460         (WebCore::GraphicsContext::drawRect): Rewrote to not rely on [NSGraphicsContext currentContext].
461         (WebCore::GraphicsContext::drawLine): Ditto.
462         (WebCore::GraphicsContext::drawEllipse): Ditto.
463         (WebCore::GraphicsContext::drawArc): Ditto.
464         (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
465         (WebCore::GraphicsContext::fillRect): Ditto.
466         (WebCore::GraphicsContext::setLineWidth):  Added check of paintingDisabled(). 
467         (WebCore::GraphicsContext::setMiterLimit): Ditto.
468         (WebCore::GraphicsContext::setAlpha): Ditto.
469         (WebCore::GraphicsContext::clearRect): Ditto.
470         (WebCore::GraphicsContext::strokeRect): Ditto.
471         (WebCore::GraphicsContext::setLineCap): Ditto.
472         (WebCore::GraphicsContext::setLineJoin): Ditto.
473         (WebCore::GraphicsContext::clip): Ditto.
474         (WebCore::GraphicsContext::scale): Added.
475         (WebCore::GraphicsContext::rotate): Added.
476         (WebCore::GraphicsContext::translate): Added.
477
478         * platform/mac/GraphicsContextMac.mm: Moved most of this file into GraphicsContextCG.cpp.
479         (WebCore::GraphicsContext::setCompositeOperation): Added check of paintingDisabled().
480
481         * platform/mac/WebCoreSystemInterface.h: Added declarations so this header
482         stands alone.
483
484 2006-05-03  Darin Adler  <darin@apple.com>
485
486         Reviewed by Justin.
487
488         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8159
489           REGRESSION: Clicking outside new text field focuses the field
490
491         This bug has always been present for "content editable" HTML, but
492         now affects <input type=text> as well. The problem is with the editing
493         concept of a "deep equivalent". When computing the deep equivalent,
494         the code can move from outside an editable area to inside. To fix this,
495         I removed all use of the "deep equivalent" concept.
496
497         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForCoordinates):
498         Changed argument names from _x and _y to just x and y. When the element
499         is the editable root, changed things so that clicks that are not within
500         the element at all return positions before or after the element, rather than
501         always choosing the closest point within the element. This gets us off on
502         the right foot, by not choosing a position inside an editable root when you
503         click outside that editable root. This code handles shadowParentNode as well,
504         and also calls positionForCoordinates on children rather than calling
505         positionForRenderer (which I believe is now a function that can be removed).
506
507         * editing/VisiblePosition.h: Removed the deepEquivalent function.
508         * editing/VisiblePosition.cpp:
509         (WebCore::VisiblePosition::previousVisiblePosition): Removed use of the
510         deepEquivalent function. Also, to make this function easier to understand
511         I separated out the case where the start point is "in rendered content"
512         and the case where it's not into two separate loops.
513         (WebCore::VisiblePosition::nextVisiblePosition): Ditto.
514         (WebCore::VisiblePosition::initDeepPosition): Removed use of the deepEquivalent
515         function. Also added code to make sure that this work never turns a position
516         outside an editable element into a position inside that editable element, or
517         vice versa. Reorganized the code a bit.
518
519         * dom/Position.cpp:
520         (WebCore::Position::upstream): Removed use of the deepEquivalent function.
521         (WebCore::Position::downstream): Ditto.
522
523         * editing/htmlediting.cpp:
524         (WebCore::editingIgnoresContent): Changed to use isReplaced instead of isWidget
525         and isImage to determine if editing should ignore content.
526         (WebCore::firstInSpecialElement): Rewrote isFirstVisiblePositionInSpecialElement
527         to have code to share with positionBeforeContainingSpecialElement. And changed
528         to allow both the position just before a table and the position just inside a
529         table to qualify. While this is slightly sloppy, the old code worked because
530         of the "deep equivalent" technique. This change is needed to get the desired
531         results even without that technique.
532         (WebCore::lastInSpecialElement): Ditto.
533         (WebCore::isFirstVisiblePositionInSpecialElement): Changed to use the new function.
534         (WebCore::positionBeforeContainingSpecialElement): Ditto.
535         (WebCore::isLastVisiblePositionInSpecialElement): Ditto.
536         (WebCore::positionAfterContainingSpecialElement): Ditto.
537
538         * dom/Node.cpp: (WebCore::Node::rootEditableElement): Rewrote to remove
539         special case for body tag.
540
541         - other changes
542
543         * html/HTMLElement.cpp:
544         (WebCore::HTMLElement::setOuterHTML): Added a FIXME about the fact
545         that this won't merge neighboring text nodes the way setOuterText does.
546         (WebCore::HTMLElement::setInnerText): Added a FIXME about the fact that
547         this creates a text node even when setting to empty text.
548         (WebCore::HTMLElement::setOuterText): Ditto.
549
550         * editing/DeleteSelectionCommand.cpp: Removed some #if 1 and #if 0.
551         * editing/ReplaceSelectionCommand.cpp: A little reformatting.
552         * rendering/render_button.h: Tiny formatting tweak.
553
554 2006-05-02  Adele Peterson  <adele@apple.com>
555
556         Reviewed by Beth.
557
558         Fix for <rdar://problem/4523671> 
559         REGRESSION (NativeTextField): Auto-complete popup list doesn't appear at the correct location after scrolling page.
560
561         * bindings/objc/DOMHTML.mm: (-[DOMHTMLInputElement _rectOnScreen]):
562         Use the documentView to compute the correct rect for the element when the view is scrolled.
563
564 2006-05-02  Justin Garcia  <justin.garcia@apple.com>
565
566         Reviewed by harrison
567         
568         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8704>
569         Fix a few end merge bugs
570         <rdar://problem/4424044>
571         REGRESSION: Extra line appears when typing
572
573         * bridge/mac/WebCoreFrameBridge.mm:
574         (-[WebCoreFrameBridge smartInsertForString:replacingRange:beforeString:afterString:]): 
575         Use renamed characterAfter.
576         * editing/InsertParagraphSeparatorCommand.cpp:
577         (WebCore::InsertParagraphSeparatorCommand::doApply):
578         Regenerate a VisiblePosition that became stale during a text node split.
579         Don't rebalance whitespace after the operation, 1) it has a bug that turns preserved
580         newlines into nbsps, 2) I think it should only be done during serialization, not after 
581         every command (since editable regions now always have -webkit-nbsp-mode:space on them).
582         Use a regular br for the placeholder as I think we can move away from -webkit-block-placeholders.
583         
584         * editing/RebalanceWhitespaceCommand.cpp: Added FIXMEs.
585         * editing/ReplaceSelectionCommand.cpp:
586         (WebCore::ReplaceSelectionCommand::shouldMergeStart): Removed FIXME.
587         (WebCore::ReplaceSelectionCommand::shouldMergeEnd): Can now use rendering information.
588         (WebCore::ReplaceSelectionCommand::doApply):
589         Call shouldMergeEnd after the insertion so that it can use rendering information.
590         Don't use positionAfterNode of the last node inserted to mark the position at the end 
591         of inserted content because canonicalization can send it into content that was already
592         in the document.
593         
594         * editing/ReplaceSelectionCommand.h:
595         * editing/VisiblePosition.cpp:
596         (WebCore::VisiblePosition::characterAfter): 
597         Renamed.  When two candidates are visually equivalent, the rightmost candidate will be 
598         the one inside the text node where the character will be.
599         
600         * editing/VisiblePosition.h:
601         * editing/htmlediting.cpp:
602         (WebCore::enclosingTableCell): Added.
603         (WebCore::enclosingList):
604         * editing/htmlediting.h:
605
606 2006-05-02  David Hyatt  <hyatt@apple.com>
607
608         Partial fix for the crash in bugzilla bug 8088.  There's a third crash
609         even after fixing this though.
610
611         Reviewed by darin
612
613         * platform/mac/WebTextRenderer.mm:
614         (WebCore::WidthMap::widths):
615         (WebCore::extendWidthMap):
616         * platform/mac/WebTextRendererFactory.mm:
617         (-[WebTextRendererFactory clearCaches]):
618
619 2006-05-02  Steve Falkenburg  <sfalken@apple.com>
620
621         Reviewed by eric.
622
623         * WebCore.vcproj/WebCore/WebCore.vcproj: defined NDEBUG in release build
624         * bridge/win/FrameWin.cpp:
625         (WebCore::FrameWin::FrameWin): turned on javascript.
626         * kwq/KWQKHTMLSettings.h: 
627         (KHTMLSettings::KHTMLSettings): initialized settings to 0
628
629 2006-05-02  David Hyatt  <hyatt@apple.com>
630
631         Make sure to updateLayout on all scrolling functions (in particular when
632         setting scrollLeft/Top).
633
634         Reviewed by eric
635
636         fast/overflow/008,html added as a test case.
637
638         * dom/Element.cpp:
639         (WebCore::Element::scrollIntoView):
640         (WebCore::Element::scrollIntoViewIfNeeded):
641         (WebCore::Element::setScrollLeft):
642         (WebCore::Element::setScrollTop):
643
644 2006-05-02  Anders Carlsson  <andersca@mac.com>
645
646         Reviewed by Dave Hyatt.
647         
648         http://bugzilla.opendarwin.org/show_bug.cgi?id=8688
649         file URLs aren't being serialized correctly when using window.location
650         
651         * platform/KURL.cpp:
652         (KURL::prettyURL):
653         Append "//" for file URLs.
654         
655 2006-05-01  David Hyatt  <hyatt@apple.com>
656
657         Convert WebTextRenderer to be a C++ class.  Change the factory so
658         that it uses pointer-based hashmaps instead of NSMutableDictionaries.
659         Convert uses of malloc/free to new/delete so that they start using
660         the fastMalloc/fastFree code.
661
662         Reviewed by darin
663
664         * bridge/mac/WebCoreStringTruncator.mm:
665         (stringWidth):
666         (truncateString):
667         * kwq/KWQComboBox.mm:
668         (QComboBox::sizeHint):
669         * kwq/KWQLineEdit.mm:
670         (QLineEdit::sizeForCharacterWidth):
671         * kwq/KWQListBox.mm:
672         (itemTextRenderer):
673         (groupLabelTextRenderer):
674         (QListBox::sizeForNumberOfLines):
675         (QListBox::clearCachedTextRenderers):
676         (-[KWQTableView drawRow:clipRect:]):
677         * platform/FontDataSet.h:
678         * platform/mac/FontMac.mm:
679         (WebCore::FontDataSet::~FontDataSet):
680         (WebCore::FontDataSet::getRenderer):
681         (WebCore::FontDataSet::invalidate):
682         (WebCore::Font::ascent):
683         (WebCore::Font::descent):
684         (WebCore::Font::lineSpacing):
685         (WebCore::Font::xHeight):
686         (WebCore::Font::selectionRectForText):
687         (WebCore::Font::drawText):
688         (WebCore::Font::drawHighlightForText):
689         (WebCore::Font::drawLineForText):
690         (WebCore::Font::drawLineForMisspelling):
691         (WebCore::Font::misspellingLineThickness):
692         (WebCore::Font::floatWidth):
693         (WebCore::Font::checkSelectionPoint):
694         * platform/mac/WebCoreTextRenderer.mm:
695         (WebCoreDrawTextAtPoint):
696         (WebCoreTextFloatWidth):
697         (WebCoreSetAlwaysUseATSU):
698         * platform/mac/WebTextRenderer.h:
699         (WebCore::WebTextRenderer::ascent):
700         (WebCore::WebTextRenderer::descent):
701         (WebCore::WebTextRenderer::lineSpacing):
702         (WebCore::WebTextRenderer::lineGap):
703         (WebCore::WebTextRenderer::misspellingLineThickness):
704         (WebCore::WebTextRenderer::misspellingLinePatternWidth):
705         (WebCore::WebTextRenderer::misspellingLinePatternGapWidth):
706         * platform/mac/WebTextRenderer.mm:
707         (WebCore::WebCoreInitializeFont):
708         (WebCore::WebCoreInitializeTextRun):
709         (WebCore::WebCoreInitializeEmptyTextStyle):
710         (WebCore::WebCoreInitializeEmptyTextGeometry):
711         (WebCore::widthForGlyph):
712         (WebCore::overrideLayoutOperation):
713         (WebCore::m_ATSUMirrors):
714         (WebCore::WebTextRenderer::~WebTextRenderer):
715         (WebCore::WebTextRenderer::xHeight):
716         (WebCore::WebTextRenderer::drawRun):
717         (WebCore::WebTextRenderer::floatWidthForRun):
718         (WebCore::WebTextRenderer::drawLineForCharacters):
719         (WebCore::WebTextRenderer::selectionRectForRun):
720         (WebCore::WebTextRenderer::drawHighlightForRun):
721         (WebCore::WebTextRenderer::drawLineForMisspelling):
722         (WebCore::WebTextRenderer::pointToOffset):
723         (WebCore::WebTextRenderer::setAlwaysUseATSU):
724         (WebCore::getSmallCapsRenderer):
725         (WebCore::findSubstituteFont):
726         (WebCore::rendererForAlternateFont):
727         (WebCore::computeWidthForSpace):
728         (WebCore::setUpFont):
729         (WebCore::CG_selectionRect):
730         (WebCore::CG_draw):
731         (WebCore::updateGlyphMapEntry):
732         (WebCore::extendGlyphMap):
733         (WebCore::extendWidthMap):
734         (WebCore::initializeATSUStyle):
735         (WebCore::createATSULayoutParameters):
736         (WebCore::disposeATSULayoutParameters):
737         (WebCore::addDirectionalOverride):
738         (WebCore::ATSU_selectionRect):
739         (WebCore::ATSU_draw):
740         (WebCore::ATSU_pointToOffset):
741         (WebCore::freeWidthMap):
742         (WebCore::freeGlyphMap):
743         (WebCore::glyphForCharacter):
744         (WebCore::advanceWidthIterator):
745         * platform/mac/WebTextRendererFactory.h:
746         * platform/mac/WebTextRendererFactory.mm:
747         (-[WebTextRendererFactory clearCaches]):
748         (-[WebTextRendererFactory init]):
749         (-[WebTextRendererFactory dealloc]):
750         (-[WebTextRendererFactory rendererWithFont:]):
751
752 2006-05-01  Justin Garcia  <justin.garcia@apple.com>
753
754         Reviewed by darin
755         
756         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8653>
757         Remove a use of hasMoreThanOneBlock, which uses info from the test rendering.
758
759         * editing/DeleteSelectionCommand.cpp:
760         (WebCore::DeleteSelectionCommand::initializePositionData):
761         Removed code that stopped the merge if the end of the selection to delete
762         was in a fully selected line, which was nonsense.
763         
764         (WebCore::DeleteSelectionCommand::mergeParagraphs):
765         Deletion does a bad job of updating the endpoints of the selection as it removes 
766         content.  If the endpoints have been flip flipped, bail.
767         If deletion has removed everything from the block that contained the
768         start of the selection to delete, we can't create a visible position inside 
769         that block to serve as a destination for the merge.  So, we insert a placeholder 
770         at that position to prop the block open to let content in.
771         
772         * editing/ReplaceSelectionCommand.cpp:
773         (WebCore::ReplaceSelectionCommand::doApply):
774         Added an assert and two early returns for cases where we'll crash.
775         Removed a use of !fragment.hasMoreThanOneBlock, which uses test rendering info 
776         and which was wrong.
777         If we've already inserted content during the start merge, insertionPos will be 
778         the position just after that content, so inserting new content before insertionPos 
779         will reverse its order.
780
781 2006-05-01  Mitz Pettel  <opendarwin.org@mitzpettel.com>
782
783         Reviewed by Darin.
784
785         - manual test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8658
786           Assertion failure in -[WebPluginContainerCheck _isForbiddenFileLoad]
787           (bridge is null) when clicking QuickTime object with href
788
789         * manual-tests/plugin-controller-datasource.html: Added.
790         * manual-tests/resources/orange.mov: Added.
791
792 2006-04-30  Rob Buis  <buis@kde.org>
793
794         Reviewed by eseidel.  Landed by eseidel.
795
796         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8651:
797         CGContextSetLineDash: invalid dash array: emmited during WebKit tests
798
799         Properly discard invalid stroke-dasharray properties like in
800         invalid-css.svg.  (Tests updated.)
801
802         * ksvg2/css/SVGCSSParser.cpp:
803         (WebCore::CSSParser::parseSVGStrokeDasharray):
804
805 2006-04-28  David Hyatt  <hyatt@apple.com>
806
807         Make image buffer sizes in the loader more accurate, since we know we store
808         buffers with 4 bytes per pixel.  Double sizes to account for this.  Also
809         deal better with animated GIFs that may have thousands of frames by adding
810         in a heuristic that will use the data size instead of a single frame RGBA32
811         buffer size if it's larger.
812
813         Reviewed by darin
814
815         * loader/Cache.cpp:
816         * loader/CachedImage.cpp:
817         (WebCore::CachedImage::data):
818
819 2006-04-28  Steve Falkenburg  <sfalken@apple.com>
820
821         Reviewed by eric.
822
823         No test necessary - fixing Win32 build, turned off C++ exceptions, turned off RTTI
824
825         * WebCore.vcproj/WebCore/WebCore.vcproj:
826         * bridge/win/FrameWin.cpp:
827         (WebCore::FrameWin::~FrameWin):
828         * bridge/win/PageWin.cpp:
829         (WebCore::Page::Page):
830         * page/Page.h:
831         * platform/win/TemporaryLinkStubs.cpp:
832         (FrameWin::saveDocumentState):
833         (Path::contains):
834         (Path::boundingRect):
835
836 2006-04-28  David Hyatt  <hyatt@apple.com>
837
838         Merge WebCoreTextRenderer into WebTextRenderer.  Merge WebCoreTextRendererFactory
839         into WebTextRendererFactory.  Change all callers to refer to the concrete classes
840         now.  Change WebCoreTextRenderer.h to be the public API that WebKit uses when
841         it calls in to WebCore.  Clean up the exports to remove things WebKit no longer
842         needs.
843
844         Reviewed by darin
845
846         * WebCore.exp:
847         * WebCore.xcodeproj/project.pbxproj:
848         * bridge/mac/WebCoreStringTruncator.mm:
849         (stringWidth):
850         (truncateString):
851         (+[WebCoreStringTruncator widthOfString:font:]):
852         * kwq/KWQComboBox.mm:
853         (QComboBox::sizeHint):
854         * kwq/KWQLineEdit.mm:
855         (QLineEdit::sizeForCharacterWidth):
856         * kwq/KWQListBox.mm:
857         (itemTextRenderer):
858         (groupLabelTextRenderer):
859         (QListBox::sizeForNumberOfLines):
860         (-[KWQTableView drawRow:clipRect:]):
861         * platform/Font.h:
862         * platform/FontDataSet.h:
863         * platform/mac/FontMac.mm:
864         (WebCore::FontDataSet::getWebCoreFont):
865         (WebCore::FontDataSet::getRenderer):
866         (WebCore::FontDataSet::determinePitch):
867         * platform/mac/WebCoreTextRenderer.h:
868         * platform/mac/WebCoreTextRendererFactory.mm:
869         (-[WebCoreTextRendererFactory init]):
870         * platform/mac/WebTextRenderer.h:
871         * platform/mac/WebTextRenderer.mm:
872         * platform/mac/WebTextRendererFactory.h:
873         * platform/mac/WebTextRendererFactory.mm:
874         (WebCoreInitializeFont):
875         (WebCoreInitializeTextRun):
876         (WebCoreInitializeEmptyTextStyle):
877         (WebCoreInitializeEmptyTextGeometry):
878         (-[WebTextRendererFactory clearCaches]):
879         (+[WebTextRendererFactory createSharedFactory]):
880         (+[WebTextRendererFactory sharedFactory]):
881         (-[WebTextRendererFactory init]):
882
883 2006-04-28  David Hyatt  <hyatt@apple.com>
884
885         Fix for 8586, move WebTextRenderer into WebCore.
886
887         Reviewed by darin
888
889         * WebCore.exp:
890         * WebCore.xcodeproj/project.pbxproj:
891         * bridge/mac/WebCoreStringTruncator.mm:
892         * platform/mac/WebCoreSystemInterface.h:
893         * platform/mac/WebCoreSystemInterface.mm:
894         * platform/mac/WebCoreTextRenderer.h:
895         * platform/mac/WebCoreTextRendererFactory.mm:
896         (+[WebCoreTextRendererFactory sharedFactory]):
897         * platform/mac/WebTextRenderer.h: Added.
898         * platform/mac/WebTextRenderer.mm: Added.
899         (widthForGlyph):
900         (-[WebTextRenderer initWithFont:]):
901         (destroy):
902         (-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
903         (-[WebTextRenderer drawLineForMisspelling:withWidth:]):
904         (findSubstituteFont):
905         (setUpFont):
906         (pathFromFont):
907         (drawGlyphs):
908         (CG_draw):
909         (extendGlyphMap):
910         (extendWidthMap):
911         (initializeATSUStyle):
912         (createATSULayoutParameters):
913         (getTextBounds):
914         (addDirectionalOverride):
915         (ATSU_draw):
916         (normalizeVoicingMarks):
917         (advanceWidthIterator):
918         (fillStyleWithAttributes):
919         * platform/mac/WebTextRendererFactory.h: Added.
920         * platform/mac/WebTextRendererFactory.mm: Added.
921         (getAppDefaultValue):
922         (getUserDefaultValue):
923         (getLCDScaleParameters):
924         (fontsChanged):
925         (+[WebTextRendererFactory createSharedFactory]):
926         (-[WebTextRendererFactory isFontFixedPitch:]):
927         (-[WebTextRendererFactory fontWithFamily:traits:size:]):
928         (FontCacheKeyCopy):
929         (-[WebTextRendererFactory cachedFontFromFamily:traits:size:]):
930
931 2006-04-28  Eric Seidel  <eseidel@apple.com>
932
933         Fix by beth.  Reviewed by darin.  Landed by eseidel.
934
935         Make hackish fix to avoid crash in Xcode and Filemaker.
936         <rdar://problem/4059059> Crash in RenderFlow::detach (XCode Documentation Window)
937
938         * bridge/mac/WebCoreFrameBridge.mm:
939         (-[WebCoreFrameBridge didNotOpenURL:pageCache:]):
940
941 2006-04-28  Alexey Proskuryakov  <ap@nypop.com>
942
943         Reviewed by hyatt.
944
945         - http://bugzilla.opendarwin.org/show_bug.cgi?id=5855
946           REGRESSION: revert SGML comment parsing fix (comment parsing causes most of usbank.com page to be missing)
947
948         * html/HTMLTokenizer.cpp:
949         (WebCore::HTMLTokenizer::parseComment): Revert one change made for acid2, 
950         <http://weblogs.mozillazine.org/hyatt/acid6.txt>.
951
952 2006-04-28  Darin Adler  <darin@apple.com>
953
954         Reviewed by Eric.
955
956         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8608
957           make GraphicsContext more suitable for cross-platform use, step 2
958
959         - Changed GraphicsContext to use NSGraphicsContext as little as possible.
960         - Removed the printing flag from GraphicsContext.
961         - Changed GraphicsContext to assume the NSGraphicsContext is always flipped,
962           and got rid of parameters to pass the flipped boolean around.
963
964         * WebCore.vcproj/WebCore/WebCore.vcproj: Add GraphicsTypes.h/cpp and remove
965         CompositeOperator.h/cpp.
966         * WebCore.xcodeproj/project.pbxproj: Ditto.
967
968         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::setDisplaysWithFocusAttributes):
969         * bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge drawRect:]):
970         * html/CanvasPattern.cpp: (WebCore::patternCallback):
971         * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createDrawingContext):
972         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
973         (WebCore::KRenderingDeviceContextQuartz::createGraphicsContext):
974         * platform/mac/WidgetMac.mm: (WebCore::Widget::lockDrawingFocus):
975         Update for changes to GraphicsContext constructor (no flipped or printing boolean).
976
977         * html/CanvasRenderingContext2D.h: Added a Path to the context state. Changed the
978         LineCap and LineJoin types to use the new ones in GraphicsTypes.h instead of defining
979         types here in this class. Changed m_platformContextStrokeStyleIsPattern and
980         m_platformContextFillStyleIsPattern to be named m_appliedStrokePattern and
981         m_appliedFillPattern and moved them outside the __APPLE__ ifdefs. Removed the
982         platformContext() function. Moved applyStrokePattern and applyFillPattern out of
983         the __APPLE__ ifdef.
984
985         * html/CanvasRenderingContext2D.cpp:
986         (WebCore::CanvasRenderingContext2D::State::State): Moved the stroke pattern
987         booleans out of Mac-specific ifdef.
988         (WebCore::CanvasRenderingContext2D::save): Changed to use GraphicsContext instead
989         of using CGContext directly.
990         (WebCore::CanvasRenderingContext2D::restore): Ditto.
991         (WebCore::CanvasRenderingContext2D::setStrokeStyle): Ditto.
992         (WebCore::CanvasRenderingContext2D::setFillStyle): Ditto.
993         (WebCore::CanvasRenderingContext2D::setLineWidth): Ditto.
994         (WebCore::CanvasRenderingContext2D::lineCap): Ditto.
995         (WebCore::CanvasRenderingContext2D::setLineCap): Ditto.
996         (WebCore::CanvasRenderingContext2D::lineJoin): Ditto.
997         (WebCore::CanvasRenderingContext2D::setLineJoin): Ditto.
998         (WebCore::CanvasRenderingContext2D::setMiterLimit): Ditto.
999         (WebCore::CanvasRenderingContext2D::shadowColor): Ditto.
1000         (WebCore::CanvasRenderingContext2D::setGlobalAlpha): Ditto.
1001         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation): Ditto.
1002         (WebCore::CanvasRenderingContext2D::scale): Update since platformContext() function
1003         no longer exists.
1004         (WebCore::CanvasRenderingContext2D::rotate): Ditto.
1005         (WebCore::CanvasRenderingContext2D::translate): Ditto.
1006         (WebCore::CanvasRenderingContext2D::beginPath): Changed to use GraphicsContext instead
1007         of using CGContext directly.
1008         (WebCore::CanvasRenderingContext2D::closePath): Ditto.
1009         (WebCore::CanvasRenderingContext2D::moveTo): Ditto.
1010         (WebCore::CanvasRenderingContext2D::lineTo): Ditto.
1011         (WebCore::CanvasRenderingContext2D::quadraticCurveTo): Ditto.
1012         (WebCore::CanvasRenderingContext2D::bezierCurveTo): Ditto.
1013         (WebCore::CanvasRenderingContext2D::arcTo): Ditto.
1014         (WebCore::CanvasRenderingContext2D::arc): Ditto.
1015         (WebCore::CanvasRenderingContext2D::rect): Ditto.
1016         (WebCore::CanvasRenderingContext2D::fill): Changed to use the current path from this class
1017         instead of relying on the CGContext's current path.
1018         (WebCore::CanvasRenderingContext2D::stroke): Ditto.
1019         (WebCore::CanvasRenderingContext2D::clip): Changed to use the current path and use the
1020         GraphicsContext instead of using CGContext directly.
1021         (WebCore::CanvasRenderingContext2D::clearRect): Changed to use GraphicsContext instead
1022         of using CGContext directly.
1023         (WebCore::CanvasRenderingContext2D::fillRect): Update since platformContext() function
1024         no longer exists.
1025         (WebCore::CanvasRenderingContext2D::strokeRect): Ditto.
1026         (WebCore::CanvasRenderingContext2D::setShadow): Ditto.
1027         (WebCore::CanvasRenderingContext2D::applyShadow): Ditto.
1028         (WebCore::CanvasRenderingContext2D::drawImage): Ditto.
1029         (WebCore::CanvasRenderingContext2D::drawImageFromRect): Ditto.
1030         (WebCore::CanvasRenderingContext2D::createPattern): Ditto.
1031         (WebCore::CanvasRenderingContext2D::applyStrokePattern): Made a tiny bit of this function
1032         cross-platform. The bulk is still Mac-specific.
1033         (WebCore::CanvasRenderingContext2D::applyFillPattern): Ditto.
1034
1035         * html/CanvasStyle.h: Changed to use GraphicsContext instead of CGContext. Now the
1036         platform-specific stuff is in the implementation, not the header.
1037         * html/CanvasStyle.cpp:
1038         (WebCore::CanvasStyle::applyStrokeColor): Moved the ifdefs inside the function, getting
1039         us one step closer to platform independence.
1040         (WebCore::CanvasStyle::applyFillColor): Ditto.
1041
1042         * html/html_imageimpl.cpp:
1043         (WebCore::HTMLAreaElement::getRect): Update for changes to the Path class.
1044         (WebCore::HTMLAreaElement::getRegion): Ditto.
1045
1046         * page/Frame.cpp:
1047         (WebCore::Frame::paint): Change to check printing flag on the document, rather than on
1048         the GraphicsContext, since there is no printing flag for GraphicsContext any more.
1049         (WebCore::Frame::adjustPageHeight): Update for change to GraphicsContext constructor.
1050
1051         * platform/GraphicsContext.h: Define a type called PlatformGraphicsContext so the
1052         platform-specific getter and constructor don't have to be ifdef'd. Added clearRect,
1053         strokeRect, setLineWidth, setLineCap, setLineJoin, setMiterLimit, setAlpha, setCompositeOperation,
1054         and clip functions. Removed the isForPrinting parameter from createGraphicsContextPrivate.
1055         * platform/GraphicsContext.cpp:
1056         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate): Removed isForPrinting.
1057         (WebCore::GraphicsContext::createGraphicsContextPrivate): Ditto.
1058         * platform/mac/GraphicsContextMac.mm:
1059         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1060         Removed NSGraphicsContext.
1061         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
1062         Ditto.
1063         (WebCore::GraphicsContext::GraphicsContext): Removed constructor that
1064         takes an NSGraphicsContext. Removed the flipText and forPrinting parameters
1065         to the other constructor.
1066         (WebCore::GraphicsContext::savePlatformState): Removed NSGraphicsContext code.
1067         (WebCore::GraphicsContext::restorePlatformState): Ditto.
1068         (WebCore::GraphicsContext::drawRect): Updated assertion to more-precisely
1069         reflect the limitation of the current version of this function.
1070         (WebCore::GraphicsContext::setColorFromFillColor): Ditto.
1071         (WebCore::GraphicsContext::setColorFromPen): Ditto.
1072         (WebCore::GraphicsContext::drawLine): Updated assertion to more-precisely
1073         reflect the limitation of the current version of this function.
1074         (WebCore::setCompositeOperation):
1075         (WebCore::GraphicsContext::fillRect): Ditto.
1076         (WebCore::GraphicsContext::setLineWidth): Added.
1077         (WebCore::GraphicsContext::setMiterLimit): Added.
1078         (WebCore::GraphicsContext::setAlpha): Added.
1079         (WebCore::GraphicsContext::setCompositeOperation): Added.
1080         (WebCore::GraphicsContext::clearRect): Added.
1081         (WebCore::GraphicsContext::strokeRect): Added.
1082         (WebCore::GraphicsContext::setLineCap): Added.
1083         (WebCore::GraphicsContext::setLineJoin): Added.
1084         (WebCore::GraphicsContext::clip): Added.
1085
1086         * platform/CompositeOperator.cpp: Removed.
1087         * platform/CompositeOperator.h: Removed.
1088         * platform/GraphicsTypes.cpp: Added. Includes CompositeOperator, LineCap, and LineJoin.
1089         * platform/GraphicsTypes.h: Added.
1090
1091         * platform/Image.h: Changed include to GraphicsTypes.h from CompositeOperator.h.
1092
1093         * platform/Path.h: Removed constructors that take a Rect and an array of points. Made
1094         the Path mutable. Changed the types for contains and boundingRect to be float-based
1095         instead of int-based. Changed translate to take a FloatSize instead of two integers.
1096         Added clear, moveTo, addLineTo, addQuadCurveTo, addBezierCurveTo, addArcTo, closeSubpath,
1097         addArc, addRect, addEllipse, and platformPath functions. Defined a PlatformPath type
1098         so we don't have to ifdef the header so much.
1099         * platform/cg/PathCG.cpp:
1100         (WebCore::Path::Path): Changed class to always have a mutable path.
1101         (WebCore::Path::operator=): Changed to make a mutable copy.
1102         (WebCore::Path::contains): Changed to take a FloatPoint instead of IntPoint.
1103         (WebCore::Path::translate): Changed to use a FloatSize instead of two ints.
1104         (WebCore::Path::boundingRect): Changed to return a FloatRect.
1105         (WebCore::Path::moveTo): Added.
1106         (WebCore::Path::addLineTo): Added.
1107         (WebCore::Path::addQuadCurveTo): Added.
1108         (WebCore::Path::addBezierCurveTo): Added.
1109         (WebCore::Path::addArcTo): Added.
1110         (WebCore::Path::closeSubpath): Added.
1111         (WebCore::Path::addArc): Added.
1112         (WebCore::Path::addRect): Added.
1113         (WebCore::Path::addEllipse): Added.
1114         (WebCore::Path::clear): Added.
1115
1116         * platform/mac/ImageMac.mm:
1117         (WebCore::fillSolidColorInRect): Changed to take a GraphicsContext instead of
1118         a CGContext.
1119         (WebCore::Image::checkForSolidColor): Changed to use the new setCompositeOperation
1120         in GraphicsContex.
1121         (WebCore::Image::draw): Changed to use the new PDF image and fillSolidColorInRect
1122         function that take GraphicsContext instead of CGContext.
1123         (WebCore::Image::drawTiled): Ditto.
1124
1125         * platform/mac/PDFDocumentImage.h: Made most functions private. Changed to
1126         use GraphicsContext and FloatRect instead of CGContext and NSRect. Also
1127         removed the unused alpha and flipped booleans.
1128         * platform/mac/PDFDocumentImage.mm:
1129         (WebCore::PDFDocumentImage::bounds): Update for change in types.
1130         (WebCore::PDFDocumentImage::adjustCTM): Ditto.
1131         (WebCore::PDFDocumentImage::setCurrentPage): Ditto.
1132         (WebCore::PDFDocumentImage::draw): Ditto.
1133
1134         * platform/win/TemporaryLinkStubs.cpp: Added lots of new stubs.
1135
1136         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): Changed to get
1137         printing boolean from document instead graphics context.
1138         * rendering/RenderBlock.cpp:
1139         (WebCore::RenderBlock::paintChildren): Ditto.
1140         (WebCore::RenderBlock::paintObject): Ditto.
1141         * rendering/RenderFlow.cpp: (WebCore::RenderFlow::paintLines): Ditto.
1142         * rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::paint): Ditto.
1143         * rendering/RenderImage.cpp: (WebCore::RenderImage::paint): Ditto.
1144         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintButton): Ditto.
1145         * rendering/render_list.cpp: (WebCore::RenderListMarker::paint): Ditto.
1146         * rendering/render_replaced.cpp: (WebCore::RenderWidget::paint): Ditto.
1147
1148 2006-04-28  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1149
1150         Reviewed by hyatt, landed by ap.
1151
1152         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6769
1153           REGRESSION: Incomplete repaint when a cell's extra bottom margin grows
1154
1155         Test: fast/repaint/table-extra-bottom-grow.html
1156
1157         * rendering/RenderBlock.cpp:
1158         (WebCore::RenderBlock::overflowRect): Changed to not add the top/left overflow twice and
1159         allow the normal overflow height to overlap with the bottom extra height.
1160         * rendering/RenderTableRow.cpp:
1161         (WebCore::RenderTableRow::layout): Removed the code that resets the extra heights.
1162         * rendering/RenderTableSection.cpp:
1163         (WebCore::RenderTableSection::layoutRows): If the top extra height changed or the
1164         bottom extra height increased, just repaint the entire cell.
1165
1166 2006-04-28  Eric Seidel  <eseidel@apple.com>
1167
1168         Reviewed by andersca.
1169
1170         Remove KCanvasContainerQuartz, pushing all logic into KCanvasContainer.
1171         
1172         No tests affected.
1173
1174         * kcanvas/KCanvasContainer.cpp:
1175         (WebCore::KCanvasContainer::canHaveChildren):
1176         (WebCore::KCanvasContainer::requiresLayer):
1177         (WebCore::KCanvasContainer::lineHeight):
1178         (WebCore::KCanvasContainer::baselinePosition):
1179         (WebCore::KCanvasContainer::calcMinMaxWidth):
1180         (WebCore::KCanvasContainer::layout):
1181         (WebCore::KCanvasContainer::paint):
1182         (WebCore::KCanvasContainer::setViewport):
1183         (WebCore::KCanvasContainer::viewport):
1184         (WebCore::KCanvasContainer::setViewBox):
1185         (WebCore::KCanvasContainer::viewBox):
1186         (WebCore::KCanvasContainer::setAlign):
1187         (WebCore::KCanvasContainer::align):
1188         (WebCore::KCanvasContainer::viewportTransform):
1189         (WebCore::KCanvasContainer::getAbsoluteRepaintRect):
1190         (WebCore::KCanvasContainer::absoluteTransform):
1191         (WebCore::KCanvasContainer::getAspectRatio):
1192         * kcanvas/KCanvasContainer.h:
1193         (WebCore::KCanvasContainer::renderName):
1194         * kcanvas/device/KRenderingDevice.h:
1195         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
1196         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
1197         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
1198         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
1199         (WebCore::KRenderingDeviceQuartz::createPaintServer):
1200         * ksvg2/svg/SVGAElement.cpp:
1201         (WebCore::SVGAElement::createRenderer):
1202         * ksvg2/svg/SVGGElement.cpp:
1203         (SVGGElement::createRenderer):
1204         * ksvg2/svg/SVGMarkerElement.cpp:
1205         (WebCore::SVGMarkerElement::createRenderer):
1206         * ksvg2/svg/SVGMaskElement.cpp:
1207         (WebCore::SVGMaskElement::createRenderer):
1208         * ksvg2/svg/SVGPatternElement.cpp:
1209         (WebCore::SVGPatternElement::createRenderer):
1210         * ksvg2/svg/SVGSVGElement.cpp:
1211         (WebCore::SVGSVGElement::createRenderer):
1212         * ksvg2/svg/SVGSwitchElement.cpp:
1213         (WebCore::SVGSwitchElement::createRenderer):
1214         * ksvg2/svg/SVGUseElement.cpp:
1215         (SVGUseElement::createRenderer):
1216
1217 2006-04-27  Eric Seidel  <eseidel@apple.com>
1218
1219         Reviewed by andersca.
1220
1221         Make WebCore accept any */*+xml type as XML.
1222         http://bugzilla.opendarwin.org/show_bug.cgi?id=5998
1223         <rdar://problem/4031511> XmlHttpRequest doesn't allow responses with Content-Type: application/soap+xml
1224
1225         Test: http/tests/xmlhttprequest/supported-xml-content-types.html
1226
1227         * dom/DOMImplementation.cpp:
1228         (WebCore::DOMImplementation::isXMLMIMEType):
1229
1230 2006-04-27  Eric Seidel  <eseidel@apple.com>
1231
1232         * WebCore.vcproj/WebCore/WebCore.vcproj: Fix break from last checkin.
1233
1234 2006-04-27  Geoffrey Garen  <ggaren@apple.com>
1235
1236         Reviewed by Maciej.
1237
1238         - Added global constructor autogeneration for the following,
1239         many of which are required by *.live.com: Node, Element, Range,
1240         CSSRule, CSSValue, CSSPrimitiveValue, CSSStyleDeclaration, Event,
1241         MutationEvent, NodeFilter
1242
1243         It works like so:
1244         
1245         - The autogenerator knows about the "Constructor" data type, which
1246         gets special treatment because it exists purely in the
1247         bindings. It also knows about the "GenerateConstructor" interface
1248         attribute, which does just that.
1249
1250         - The window interface has many Constructor attributes
1251
1252         - The hash table generator swizzles empty tables to tables with one
1253         empty bucket, to prevent crashes in Lookup::findEntry. (The old
1254         generator used to work this way, too.)
1255
1256         - Window object property lookup gets special treatment to allow
1257         shadowing of its built-in global constructor properties. We'll
1258         need to expand this mechanism in the future and make it more
1259         flexible, but it works for now.
1260         
1261         * DerivedSources.make:
1262         * WebCore.vcproj/WebCore/WebCore.vcproj:
1263         * WebCore.xcodeproj/project.pbxproj:
1264         * bindings/js/kjs_css.cpp:
1265         (KJS::toJS):
1266         * bindings/js/kjs_css.h:
1267         * bindings/js/kjs_window.cpp: Removed 'namedFrameGetter' and its use
1268         because they were bogus; added FIXME describing what they were
1269         attempting to do.
1270         (KJS::Window::getValueProperty):
1271         (KJS::Window::getOverridePropertySlot):
1272         (KJS::Window::getOwnPropertySlot):
1273         * bindings/js/kjs_window.h:
1274         (KJS::Window::):
1275         * bindings/scripts/CodeGeneratorJS.pm:
1276         * css/CSSPrimitiveValue.idl:
1277         * css/CSSRule.idl:
1278         * css/CSSStyleDeclaration.idl: Added.
1279         * css/CSSValue.idl:
1280         * dom/Document.idl:
1281         * dom/Element.idl:
1282         * dom/Event.idl:
1283         * dom/MutationEvent.idl:
1284         * dom/Node.idl:
1285         * dom/NodeFilter.idl:
1286         * dom/Range.idl:
1287         * page/DOMWindow.idl:
1288
1289 2006-04-27  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1290
1291         Reviewed by darin
1292         
1293         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8607>
1294         Automate repaint tests
1295
1296         * manual-tests/backgroundSizeRepaint.html: Removed.
1297         * manual-tests/border-repaint-glitch.html: Removed.
1298         * manual-tests/bugzilla-3509.html: Removed.
1299         * manual-tests/bugzilla-5699.html: Removed.
1300         * manual-tests/bugzilla-6278.html: Removed.
1301         * manual-tests/bugzilla-6388.html: Removed.
1302         * manual-tests/bugzilla-6473.html: Removed.
1303         * manual-tests/bugzilla-7235.html: Removed.
1304         * manual-tests/inline-outline-repaint.html: Removed.
1305         * manual-tests/outline-repaint-glitch.html: Removed.
1306         * manual-tests/repaint-resized-overflow.html: Removed.
1307         * manual-tests/table-cell-move.html: Removed.
1308
1309 2006-04-27  Justin Garcia  <justin.garcia@apple.com>
1310
1311         Reviewed by darin
1312         
1313         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8624>
1314         Placeholders aren't always removed during paste
1315         <rdar://problem/4059807>
1316         Seed: Mail: pasting quoted content sometimes adds a phantom newline
1317
1318         * editing/CompositeEditCommand.cpp: Added a FIXME.
1319         * editing/ReplaceSelectionCommand.cpp:
1320         (WebCore::ReplaceSelectionCommand::doApply):
1321         Removed two no-op setEndingSelection calls.
1322         Store away a br at the position where we'll start inserting content in case the 
1323         br a) is made unnecessary by the insertion (it's collapsed away) b) was acting 
1324         as a placeholder and should therefore be displaced by inserted content or c) was
1325         acting as a line break and, as a result of the insertion, is now acting as a 
1326         placeholder.  
1327         Don't only store away brs that have the webkit-block-placeholder class on them.
1328         Any br that does any of the three things just mentioned should be removed.
1329         The linePlaceholder removal was run after the code that makes sure to interpret 
1330         incoming brs strictly, and was negating that work in certain cases.
1331         
1332         (WebCore::ReplaceSelectionCommand::removeEndBRIfNeeded): Described above.
1333         * editing/ReplaceSelectionCommand.h:
1334         * editing/VisiblePosition.cpp:
1335         (WebCore::isEqualIgnoringAffinity): 
1336         Added a workaround for 8622.  We want this function to return true even if one of 
1337         the two visible positions has been incorrectly canonicalized.
1338
1339 2006-04-26  Tim Omernick  <timo@apple.com>
1340
1341         Reviewed by Hyatt.
1342
1343         <rdar://problem/4068375> Flash inserted via innerHTML Fails to Show when CSS Display
1344         Style is Toggled via Javascript
1345
1346         * html/html_objectimpl.cpp:
1347         (WebCore::HTMLObjectElement::setComplete):
1348         Set needWidgetUpdate when finished parsing, even if the object element is not in
1349         a document.  That way, when the element attaches to a document, it will update its
1350         widget (creating the plug-in view if necessary).  This is important when the object
1351         is being inserted via setInnerHTML, since the parsed nodes are not added to the
1352         document until the whole HTML string is parsed.
1353
1354 2006-04-26  Geoffrey Garen  <ggaren@apple.com>
1355
1356         Reviewed by Hyatt.
1357
1358         - Fixed http://bugzilla.opendarwin.org/post_bug.cgi
1359         REGRESSION (r14048): Google calendar not parsing
1360         
1361         * html/HTMLParser.cpp:
1362         (WebCore::HTMLParser::handleError): Rolling out grandparent NULL check
1363         because it caused this regression and there's no test case
1364         justifying it.
1365         
1366 2006-04-26  Justin Garcia  <justin.garcia@apple.com>
1367
1368         Reviewed by hyatt
1369         
1370         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8459>
1371         REGRESSION: Content lost during a delete/merge of whitespace:pre text
1372
1373         * editing/CompositeEditCommand.cpp:
1374         (WebCore::CompositeEditCommand::prune): 
1375         The function would prune a rendered leaf because it assumed that the 
1376         first node passed to it would be a container.
1377         The old code ascended using the DOM tree, and would remove the <b> when
1378         pruning the <div> in <b><div></div>foo</b>.  Now ascends using the render tree.
1379
1380 2006-04-26  Geoffrey Garen  <ggaren@apple.com>
1381
1382         This time for sure. Fixed Windows build too.
1383         
1384         * WebCore.vcproj/WebCore/WebCore.vcproj:
1385         * WebCore.xcodeproj/project.pbxproj:
1386
1387 2006-04-26  Geoffrey Garen  <ggaren@apple.com>
1388
1389         Reviewed by TimO.
1390
1391         Build fix.
1392
1393         * bindings/js/kjs_dom.cpp:
1394         * bindings/js/kjs_domnode.h:
1395
1396 2006-04-26  Geoffrey Garen  <ggaren@apple.com>
1397
1398         Reviewed by OMG DETHBAKIN.
1399
1400         - Start autogenerating Node. This fixes many missing attributes in our
1401         DOM by making prototypes hold their relevant constants as properties.
1402
1403         * DerivedSources.make:
1404         * WebCore.xcodeproj/project.pbxproj:
1405         * bindings/js/kjs_dom.cpp:
1406         (KJS::DOMEventTargetNode::DOMEventTargetNode):
1407         (KJS::toJS):
1408         * bindings/js/kjs_dom.h:
1409         (KJS::DOMEventTargetNode::):
1410         * bindings/js/kjs_domnode.h: Had to break DOMNode into a separate
1411         header to avoid circular dependency in header includes. Gave it an
1412         old-school file name to keep distinguishing beteween old school and
1413         news school files easy.
1414         (KJS::DOMNode::impl):
1415         (KJS::DOMNode::classInfo):
1416         (KJS::DOMNode::):
1417         * bindings/js/kjs_window.cpp:
1418         (KJS::Window::getValueProperty):
1419         * bindings/scripts/CodeGeneratorJS.pm:
1420         * dom/DocumentType.idl:
1421         * dom/Entity.idl:
1422         * dom/Node.idl: Added.
1423         * dom/Notation.idl:
1424         * dom/ProcessingInstruction.idl:
1425
1426 2006-04-26  Geoffrey Garen  <ggaren@apple.com>
1427
1428         Reviewed by Darin.
1429
1430         Committing the project file change jhaygood suggesed in
1431         http://bugzilla.opendarwin.org/show_bug.cgi?id=8044
1432         WebKit Visual Studio 2005 project shouldn't use the SolutionDir
1433         
1434         Instead of his patch, I used the following commands:
1435
1436         sed -e 's/$(SolutionDir)/$(ProjectDir)\\../g' Image\ Viewer/Image\
1437         Viewer.vcproj > Image\ Viewer/Image\ Viewer.vcproj_ && mv Image\
1438         Viewer/Image\ Viewer.vcproj_ Image\ Viewer/Image\ Viewer.vcproj
1439
1440         sed -e 's/$(SolutionDir)/$(ProjectDir)\\../g'
1441         WebCore/WebCore.vcproj > WebCore/WebCore.vcproj_ && mv
1442         WebCore/WebCore.vcproj_ WebCore/WebCore.vcproj
1443
1444         * Viewer.vcproj:
1445         * WebCore.vcproj/WebCore/WebCore.vcproj:
1446
1447 2006-04-25  Justin Garcia  <justin.garcia@apple.com>
1448
1449         Reviewed by harrison
1450
1451         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8583>
1452         Moving paste code around and some small fixes
1453         
1454         Moved code to make it easier to do the start merge after the fact, 
1455         with moveParagraph, instead of in the middle of the paste operation.
1456
1457         * editing/CompositeEditCommand.cpp:
1458         (WebCore::CompositeEditCommand::moveParagraph):
1459         * editing/ReplaceSelectionCommand.cpp:
1460         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
1461         (WebCore::ReplaceSelectionCommand::shouldMergeStart):
1462         Moved code to make this decision to its own function.  Moved special case
1463         checks to the top.  Added m_forceMergeStart to override the special cases 
1464         because moveParagraph uses ReplaceSelectionCommand and expects a merge.
1465         
1466         (WebCore::ReplaceSelectionCommand::shouldMergeEnd): 
1467         No functional changes, just moved code here.
1468         (WebCore::ReplaceSelectionCommand::doApply):
1469         Do the end merge in the opposite direction.  Merging two paragraphs destroys
1470         the moved one's block level styles, and we prefer to use the styles of the 
1471         one that was in the document, not the one that's being pasted.
1472         
1473         * editing/ReplaceSelectionCommand.h:
1474         * editing/Selection.h:
1475         (WebCore::Selection::visibleStart): Added.
1476         (WebCore::Selection::visibleEnd): Added.
1477         * editing/htmlediting.cpp:
1478         (WebCore::enclosingList): Added.
1479         (WebCore::isMailBlockquote): 
1480         Don't require a renderer so that this can be used on nodes in fragments.
1481         
1482         * editing/htmlediting.h:
1483
1484 2006-04-25  Geoffrey Garen  <ggaren@apple.com>
1485
1486         Reviewed by Maciej.
1487
1488         - Removed special handling of attributes in the DOM. To match
1489         WinIE, we used to make all attributes available as properties of
1490         their elements in the DOM, but that has caused us more
1491         compatibility woes than it has solved, so, after talking with Darin
1492         and Maciej, I'm taking it out. (Firefox does not support it.)
1493
1494         A layout test regression caused by this change led me to do the
1495         following as well:
1496         
1497         - Implemented DOM properties missing on EMBED elements: align, height,
1498         name, width, src, type. Since align, height, name, and width are
1499         common to all plugin elements, I factored them and some other common
1500         functionality out into a new abstract base class, HTMLPlugInElement.
1501
1502         - Removed extraneous attribute-to-style mappings on EMBED elements:
1503         valign, border. Why they were there in the first place is a question
1504         for the ages. Neither FF nor IE supports them.
1505
1506         * bindings/js/kjs_dom.cpp:
1507         (KJS::getRuntimeObject):
1508         * bindings/js/kjs_html.cpp:
1509         (KJS::):
1510         (KJS::JSHTMLElement::classInfo):
1511         (KJS::JSHTMLElement::accessors):
1512         (KJS::JSHTMLElement::embedGetter):
1513         (KJS::JSHTMLElement::embedSetter):
1514         * bindings/js/kjs_html.h:
1515         (KJS::JSHTMLElement::):
1516         * bindings/scripts/CodeGeneratorJS.pm:
1517         * dom/Element.idl:
1518         * html/html_objectimpl.cpp:
1519         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
1520         (WebCore::HTMLPlugInElement::align):
1521         (WebCore::HTMLPlugInElement::setAlign):
1522         (WebCore::HTMLPlugInElement::height):
1523         (WebCore::HTMLPlugInElement::setHeight):
1524         (WebCore::HTMLPlugInElement::name):
1525         (WebCore::HTMLPlugInElement::setName):
1526         (WebCore::HTMLPlugInElement::width):
1527         (WebCore::HTMLPlugInElement::setWidth):
1528         (WebCore::HTMLPlugInElement::mapToEntry):
1529         (WebCore::HTMLPlugInElement::parseMappedAttribute):
1530         (WebCore::HTMLPlugInElement::checkDTD):
1531         (WebCore::HTMLAppletElement::HTMLAppletElement):
1532         (WebCore::HTMLAppletElement::~HTMLAppletElement):
1533         (WebCore::HTMLAppletElement::parseMappedAttribute):
1534         (WebCore::HTMLAppletElement::insertedIntoDocument):
1535         (WebCore::HTMLAppletElement::removedFromDocument):
1536         (WebCore::HTMLAppletElement::getInstance):
1537         (WebCore::HTMLAppletElement::closeRenderer):
1538         (WebCore::HTMLAppletElement::detach):
1539         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
1540         (WebCore::HTMLEmbedElement::~HTMLEmbedElement):
1541         (WebCore::HTMLEmbedElement::getInstance):
1542         (WebCore::HTMLEmbedElement::mapToEntry):
1543         (WebCore::HTMLEmbedElement::parseMappedAttribute):
1544         (WebCore::HTMLEmbedElement::attach):
1545         (WebCore::HTMLEmbedElement::detach):
1546         (WebCore::HTMLEmbedElement::insertedIntoDocument):
1547         (WebCore::HTMLEmbedElement::removedFromDocument):
1548         (WebCore::HTMLEmbedElement::src):
1549         (WebCore::HTMLEmbedElement::setSrc):
1550         (WebCore::HTMLEmbedElement::type):
1551         (WebCore::HTMLEmbedElement::setType):
1552         (WebCore::HTMLObjectElement::HTMLObjectElement):
1553         (WebCore::HTMLObjectElement::~HTMLObjectElement):
1554         (WebCore::HTMLObjectElement::getInstance):
1555         (WebCore::HTMLObjectElement::parseMappedAttribute):
1556         (WebCore::HTMLObjectElement::rendererIsNeeded):
1557         (WebCore::HTMLObjectElement::attach):
1558         (WebCore::HTMLObjectElement::closeRenderer):
1559         (WebCore::HTMLObjectElement::detach):
1560         (WebCore::HTMLObjectElement::insertedIntoDocument):
1561         (WebCore::HTMLObjectElement::removedFromDocument):
1562         (WebCore::HTMLObjectElement::recalcStyle):
1563         * html/html_objectimpl.h:
1564         (WebCore::HTMLPlugInElement::endTagRequirement):
1565         (WebCore::HTMLAppletElement::tagPriority):
1566         (WebCore::HTMLEmbedElement::tagPriority):
1567         (WebCore::HTMLObjectElement::tagPriority):
1568
1569 2006-04-25  Beth Dakin  <bdakin@apple.com>
1570
1571         Reviewed by Maciej.
1572
1573         Fix for <rdar://problem/4518632> getComputedStyle returns 'auto' 
1574         for dimensions like 'margin-left'
1575
1576         * css/CSSComputedStyleDeclaration.cpp:
1577         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): For 
1578         margin and padding, to match Firefox we now go to the renderer to 
1579         get the property value instead of calling valueForLength() on the 
1580         style attribute. valueForLength() will return the string 'auto' if 
1581         that was what was specified in the CSS, or a percentage if it was 
1582         specified as a percent. But to match Firefox, we always want to 
1583         return a pixel value for margin and padding.
1584
1585 2006-04-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1586
1587         Reviewed by darin.  Landed by eseidel.
1588
1589         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8452
1590           mangleme(0x58c22e11): Random crashes
1591
1592         Test: fast/frames/empty-cols-attribute.html
1593
1594         * platform/StringImpl.cpp:
1595         (WebCore::StringImpl::toLengthArray): If the string is empty, return 0
1596         but set len to 1. This gives the same behavior you get if you don't specify
1597         the attribute at all, matching WinIE and Firefox. Previously, the empty
1598         string resulted in len being set to 0 (and a memory smasher in
1599         RenderFrameSet::layout()).
1600         * rendering/render_frames.cpp:
1601         (WebCore::RenderFrameSet::layout): Added an assert.
1602
1603 2006-04-26  Oliver Hunt  <ojh16@student.canterbury.ac.nz>
1604
1605         Reviewed by eseidel.  Landed by eseidel.
1606
1607         * WebCore.xcodeproj/project.pbxproj:
1608         * kcanvas/KCanvasFilters.cpp:
1609         (WebCore::operator<<):
1610         * kcanvas/KCanvasFilters.h:
1611         (WebCore::KCComponentTransferFunction::KCComponentTransferFunction):
1612         * kcanvas/device/quartz/KCanvasFilterQuartz.h:
1613         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1614         (WebCore::getVectorForChannel):
1615         (WebCore::genImageFromTable):
1616         (WebCore::filterForComponentFunc):
1617         (WebCore::setParametersForComponentFunc):
1618         (WebCore::getFilterForFunc):
1619         (WebCore::KCanvasFEComponentTransferQuartz::getFunctionFilter):
1620         (WebCore::KCanvasFEComponentTransferQuartz::getCIFilter):
1621         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
1622         (WebCore::KRenderingDeviceQuartz::createFilterEffect):
1623         * kcanvas/device/quartz/filters/WKComponentMergeFilter.cikernel: Added.
1624         * kcanvas/device/quartz/filters/WKComponentMergeFilter.h: Added.
1625         * kcanvas/device/quartz/filters/WKComponentMergeFilter.m: Added.
1626         (+[WKComponentMergeFilter initialize]):
1627         (+[WKComponentMergeFilter filterWithName:]):
1628         (-[WKComponentMergeFilter init]):
1629         (-[WKComponentMergeFilter outputImage]):
1630         * kcanvas/device/quartz/filters/WKDiscreteTransferFilter.cikernel: Added.
1631         * kcanvas/device/quartz/filters/WKDiscreteTransferFilter.h: Added.
1632         * kcanvas/device/quartz/filters/WKDiscreteTransferFilter.m: Added.
1633         (+[WKDiscreteTransferFilter initialize]):
1634         (+[WKDiscreteTransferFilter filterWithName:]):
1635         (-[WKDiscreteTransferFilter init]):
1636         (-[WKDiscreteTransferFilter outputImage]):
1637         * kcanvas/device/quartz/filters/WKGammaTransferFilter.cikernel: Added.
1638         * kcanvas/device/quartz/filters/WKGammaTransferFilter.h: Added.
1639         * kcanvas/device/quartz/filters/WKGammaTransferFilter.m: Added.
1640         (+[WKGammaTransferFilter initialize]):
1641         (+[WKGammaTransferFilter filterWithName:]):
1642         (-[WKGammaTransferFilter init]):
1643         (-[WKGammaTransferFilter outputImage]):
1644         * kcanvas/device/quartz/filters/WKIdentityTransferFilter.h: Added.
1645         * kcanvas/device/quartz/filters/WKIdentityTransferFilter.m: Added.
1646         (+[WKIdentityTransferFilter initialize]):
1647         (+[WKIdentityTransferFilter filterWithName:]):
1648         (-[WKIdentityTransferFilter init]):
1649         (-[WKIdentityTransferFilter outputImage]):
1650         * kcanvas/device/quartz/filters/WKLinearTransferFilter.cikernel: Added.
1651         * kcanvas/device/quartz/filters/WKLinearTransferFilter.h: Added.
1652         * kcanvas/device/quartz/filters/WKLinearTransferFilter.m: Added.
1653         (+[WKLinearTransferFilter initialize]):
1654         (+[WKLinearTransferFilter filterWithName:]):
1655         (-[WKLinearTransferFilter init]):
1656         (-[WKLinearTransferFilter outputImage]):
1657         * kcanvas/device/quartz/filters/WKTableTransferFilter.cikernel: Added.
1658         * kcanvas/device/quartz/filters/WKTableTransferFilter.h: Added.
1659         * kcanvas/device/quartz/filters/WKTableTransferFilter.m: Added.
1660         (+[WKTableTransferFilter initialize]):
1661         (+[WKTableTransferFilter filterWithName:]):
1662         (-[WKTableTransferFilter init]):
1663         (-[WKTableTransferFilter outputImage]):
1664         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
1665         (SVGComponentTransferFunctionElement::parseMappedAttribute):
1666         (SVGComponentTransferFunctionElement::transferFunction):
1667
1668 2006-04-25  Eric Seidel  <eseidel@apple.com>
1669
1670         Reviewed by ggaren.
1671
1672         Make trunk match the branch.  Now nodes are fully removed
1673         from the tree before calling detach.  There is (thankfully) no
1674         good way to test this, as no one should depend on this behavior.
1675         This change was made are part of fixing:
1676         <rdar://problem/4427024> repro crash on www.formassembly.com in khtml::RenderBlock::addChildToFlow
1677         <rdar://problem/4233435> CrashTracer: 2698 crashes in Safari at com.apple.WebCore: khtml::RenderBlock::addChildToFlow + 156
1678         on the branch.
1679
1680         * dom/ContainerNode.cpp:
1681         (WebCore::ContainerNode::removeChildren):
1682
1683 2006-04-25  Maciej Stachowiak  <mjs@apple.com>
1684
1685         Reviewed by Adele.
1686
1687         - don't have a fini method, since trying to call it will actually call the subclass method
1688         and mess up the bridge count.
1689
1690         * bridge/mac/WebCoreFrameBridge.mm:
1691         (-[WebCoreFrameBridge dealloc]):
1692         (-[WebCoreFrameBridge finalize]):
1693
1694 2006-04-25  Steve Falkenburg  <sfalkenburg@apple.com>
1695
1696         Reviewed by eseidel.
1697
1698         No test case needed
1699
1700         * platform/win/TemporaryLinkStubs.cpp:
1701         (KWQFileButton::setFrameGeometry):
1702
1703 2006-04-25  Eric Seidel  <eseidel@apple.com>
1704
1705         Reviewed by mjs.
1706
1707         Fix reproducible crash in html parser code.
1708         http://bugzilla.opendarwin.org/show_bug.cgi?id=7137
1709
1710         Test: fast/parser/remove-current-node-parent.html
1711
1712         * html/HTMLParser.cpp:
1713         (WebCore::HTMLParser::handleError):
1714
1715 2006-04-25  Maciej Stachowiak  <mjs@apple.com>
1716
1717         Reviewed by Eric.
1718
1719         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=8575
1720         New KWQFileButton leaks reported by buildbot
1721
1722         * kwq/KWQFileButton.mm:
1723         (KWQFileButton::KWQFileButton): Add a missing release
1724
1725 2006-04-24  David Hyatt  <hyatt@apple.com>
1726
1727         Fix for 8336, focus ring redrawing on top of itself.  Make sure
1728         not to include empty rects when doing the focus ring drawing, since
1729         that results in a draw with no clip set.
1730
1731         Reviewed by adele
1732
1733         * platform/mac/GraphicsContextMac.mm:
1734         (WebCore::GraphicsContext::drawFocusRing):
1735
1736 2006-04-24  Eric Seidel  <eseidel@apple.com>
1737
1738         Reviewed by ggaren.
1739
1740         Fix for 5th worst unresolved crasher:
1741         <rdar://problem/4129744> [REGRESSION]CrashTracer: ..400 crashes at com.apple.WebCore: DOM::NodeImpl::createRendererIfNeeded + 44
1742
1743         Test: fast/dom/remove-style-element.html
1744
1745         * dom/ContainerNode.cpp:
1746         (WebCore::ContainerNode::removeChildren):
1747
1748 2006-04-24  Eric Seidel  <eseidel@apple.com>
1749
1750         Reviewed by mjs.
1751
1752         Speculative fix for our 7th worst crasher.
1753         Also added ASSERTs to help us better understand the issue.
1754         <rdar://problem/4153404> CrashTracer: 2412 crashes in Safari at com.apple.WebCore: khtml::RenderStyle::RenderStyle[unified] + 44
1755
1756         * dom/Document.cpp:
1757         (WebCore::Document::recalcStyle):
1758         (WebCore::Document::setInPageCache):
1759         * dom/Document.h:
1760         * dom/Element.cpp:
1761         (WebCore::Element::recalcStyle):
1762
1763 2006-04-24  Adele Peterson  <adele@apple.com>
1764
1765         Reviewed by Hyatt.
1766
1767         Fix for <rdar://problem/4503438> REGRESSION (NativeTextField): Can't insert caret when 
1768         selection is active in field (Business/Unit)
1769
1770         * css/html4.css: Added -webkit-user-select:text for input elements.
1771
1772 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
1773
1774         Build fix:
1775         
1776         - move some prematurely moved code back
1777
1778         * bridge/mac/WebCoreFrameBridge.h:
1779         * bridge/mac/WebCoreFrameBridge.mm:
1780         (-[WebCoreFrameBridge fini]):
1781
1782 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
1783
1784         Reviewed by Darin.
1785
1786         - move more code from WebFrameBridge to WebCoreFrameBridge
1787
1788         * bridge/mac/WebCoreFrameBridge.h:
1789         * bridge/mac/WebCoreFrameBridge.mm:
1790         (-[WebCoreFrameBridge domain]):
1791         (-[WebCoreFrameBridge canTargetLoadInFrame:]):
1792         (-[WebCoreFrameBridge fini]):
1793         (-[WebCoreFrameBridge dealloc]):
1794         (-[WebCoreFrameBridge finalize]):
1795         (_getPreSmartSet):
1796         (_getPostSmartSet):
1797         (-[WebCoreFrameBridge isCharacterSmartReplaceExempt:isPreviousCharacter:]):
1798         (-[WebCoreFrameBridge _retrieveKeyboardUIModeFromPreferences:]):
1799         (-[WebCoreFrameBridge keyboardUIMode]):
1800
1801 2006-04-24  Adele Peterson  <adele@apple.com>
1802
1803         Reviewed by Tim O.
1804
1805         Fix to send textFieldDidBeginEditing on the first editing change instead of on focus.
1806         This matches our old behavior.
1807
1808         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::dispatchFocusEvent):
1809         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::subtreeHasChanged):
1810
1811 2006-04-24  Beth Dakin  <bdakin@apple.com>
1812
1813         Reviewed by Eric.
1814
1815         Fix for <rdar://problem/4513383> REGRESSION: Crash in 
1816         WebCore::shouldEmitTabBeforeNode() when iterating through document 
1817         text
1818
1819         * editing/TextIterator.cpp:
1820         (WebCore::shouldEmitTabBeforeNode): Need to nil-check the renderer.
1821
1822 2006-04-23  Geoffrey Garen  <ggaren@apple.com>
1823
1824         Reviewed by Maciej.
1825
1826         * bindings/scripts/CodeGeneratorJS.pm: Removed confusing 'JS' prefix
1827         from string descriptions of DOM prototypes, so the prototype for, e.g.,
1828         Document serializes as 'Document,' not 'JSDocument.'
1829
1830 2006-04-23  Geoffrey Garen  <ggaren@apple.com>
1831
1832         Reviewed by Darin.
1833
1834         - Took the larger snippets of C++ in the code generator and broke
1835         them into HERE documents in the hopes of improving readability.
1836         
1837         * bindings/scripts/CodeGeneratorJS.pm: I indented variable names
1838         level with their corresponding HERE documents to clearly
1839         "sandwich" the HERE documents between opening and closing EOF
1840         statements.
1841
1842 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
1843
1844         Reviewed by Darin.
1845         
1846         - push WebFileButton and WebStringTruncator code down to WebCore
1847         http://bugzilla.opendarwin.org/show_bug.cgi?id=8552
1848
1849         * WebCore.exp:
1850         * WebCore.xcodeproj/project.pbxproj:
1851         * bridge/mac/WebCoreFrameBridge.h:
1852         * bridge/mac/WebCoreStringTruncator.h: Added.
1853         * bridge/mac/WebCoreStringTruncator.mm: Added.
1854         (stringWidth):
1855         (truncateString):
1856         (+[WebCoreStringTruncator widthOfString:font:]):
1857         * bridge/mac/WebCoreViewFactory.h:
1858         * kwq/KWQFileButton.h:
1859         * kwq/KWQFileButton.mm:
1860         (-[WebFileChooserButton initWithWidget::]):
1861         (-[WebCoreFileButton positionButton]):
1862         (-[WebCoreFileButton initWithWidget:]):
1863         (-[WebCoreFileButton initWithFrame:]):
1864         (-[WebCoreFileButton dealloc]):
1865         (-[WebCoreFileButton isFlipped]):
1866         (-[WebCoreFileButton drawRect:]):
1867         (-[WebCoreFileButton updateLabel]):
1868         (-[WebCoreFileButton setFilename:]):
1869         (-[WebCoreFileButton filename]):
1870         (-[WebCoreFileButton setFrameSize:]):
1871         (-[WebCoreFileButton bestVisualFrameSizeForCharacterCount:]):
1872         (-[WebCoreFileButton visualFrame]):
1873         (-[WebCoreFileButton setVisualFrame:]):
1874         (-[WebCoreFileButton baseline]):
1875         (-[WebCoreFileButton beginSheet]):
1876         (-[WebCoreFileButton chooseFilename:]):
1877         (-[WebCoreFileButton cancel]):
1878         (-[WebCoreFileButton chooseButtonPressed:]):
1879         (-[WebCoreFileButton mouseDown:]):
1880         (-[WebCoreFileButton acceptsFirstResponder]):
1881         (-[WebCoreFileButton becomeFirstResponder]):
1882         (-[WebCoreFileButton nextKeyView]):
1883         (-[WebCoreFileButton previousKeyView]):
1884         (-[WebCoreFileButton nextValidKeyView]):
1885         (-[WebCoreFileButton previousValidKeyView]):
1886         (-[WebCoreFileButton performClick]):
1887         (-[WebFileChooserButton initWithWidget:]):
1888         (-[WebFileChooserButton nextValidKeyView]):
1889         (-[WebFileChooserButton previousValidKeyView]):
1890         (-[WebFileChooserButton resignFirstResponder]):
1891         (KWQFileButton::KWQFileButton):
1892         (KWQFileButton::setFilename):
1893         (KWQFileButton::click):
1894         (KWQFileButton::sizeForCharacterWidth):
1895         (KWQFileButton::frameGeometry):
1896         (KWQFileButton::setFrameGeometry):
1897         (KWQFileButton::baselinePosition):
1898         (KWQFileButton::filenameChanged):
1899
1900 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
1901
1902         Reviewed by Eric.
1903
1904         - remove WebCoreCookieAdapter, instead make mac implementation of
1905         CookieJar use Foundation directly.
1906
1907         * WebCore.exp:
1908         * WebCore.xcodeproj/project.pbxproj:
1909         * platform/mac/CookieJar.mm:
1910         (WebCore::cookies):
1911         (WebCore::setCookies):
1912         (WebCore::cookiesEnabled):
1913         * platform/mac/WebCoreCookieAdapter.h: Removed.
1914         * platform/mac/WebCoreCookieAdapter.m: Removed.
1915
1916 2006-04-21  Rob Buis  <buis@kde.org>
1917
1918         Reviewed by hyatt.  Landed by eseidel.
1919
1920         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8170:
1921         SVG CSS property values with extra items do not get treated
1922         as invalid (they should)
1923
1924         Fixes the handling of invalid svg css properties similar
1925         to how invalid html css properties are handled, ie. discard
1926         the property if there are more values in the value list than
1927         expected.
1928
1929         Test: svg/custom/invalid-css.svg
1930
1931         * ksvg2/css/SVGCSSParser.cpp:
1932         (WebCore::CSSParser::parseSVGValue):
1933
1934 2006-04-23  Michael Emmel  <mike.emmel@gmail.com>
1935
1936         Reviewed by mjs.  Landed by eseidel.
1937
1938         http://bugzilla.opendarwin.org/show_bug.cgi?id=8517
1939         No test necessary, no functional change.
1940
1941         * DerivedSources.make: use VPATH more consistently.
1942
1943 2006-04-23  Jon Shier  <jshier@iastate.edu>
1944         
1945         Reviewed by ggaren.  Landed by eseidel.
1946         
1947         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8511
1948         onerror JS property does not register listener properly
1949
1950         Test: fast/dom/onerror-img.html       
1951  
1952         * bindings/js/kjs_dom.cpp:  
1953         (KJS::DOMEventTargetNode::getValueProperty): changed khtmlErrorEvent to errorEvent.
1954         (KJS::DOMEventTargetNode::putValueProperty): ditto.
1955         * bindings/js/kjs_window.cpp:
1956         (KJS::Window::getValueProperty): ditto.
1957         (KJS::Window::put):
1958         * dom/EventNames.h: Removed khtmlError macro.
1959         
1960 2006-04-23  Eric Seidel  <eseidel@apple.com>
1961
1962         Reviewed by hyatt.
1963
1964         Reproducible crasher with <li value=1234567890 type=A>
1965         http://bugzilla.opendarwin.org/show_bug.cgi?id=8542
1966
1967         Fixed our alphabetical list generation to match WinIE (not FireFox)
1968         Previously our alphabetical lists were completely wrong past 26 items.
1969
1970         Tests:
1971         * fast/lists/alpha-list-wrap.html
1972         * fast/lists/li-style-alpha-huge-value-crash.html
1973
1974         * rendering/render_list.cpp:
1975         (WebCore::toLetterString):
1976         (WebCore::toHebrew):
1977         (WebCore::RenderListMarker::calcMinMaxWidth):
1978
1979 2006-04-22  Geoffrey Garen  <ggaren@apple.com>
1980
1981         Reviewed by Darin.
1982
1983         - Finished autogeneration of Element
1984
1985         * bindings/js/kjs_dom.cpp: Removed DOMElement class
1986         * bindings/js/kjs_dom.h: ditto
1987         * bindings/scripts/CodeGeneratorJS.pm: added support for special
1988         attribute lookup that elements do
1989         * dom/Element.idl: added new attribute, 
1990         "IncludeAttributesInPropertyLookup," which tells the code generator 
1991         to include HTML element attributes in property lookup
1992
1993 2006-04-22  Michael Emmel  <mike.emmel@gmail.com>
1994
1995         Reviewed by Maciej.
1996
1997         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8529
1998           Extra Qaulification in header
1999         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8530
2000           Missing assert.h include
2001
2002         * rendering/RenderObject.h: Removed erroneous RenderObject::
2003         prefix from a member function name.
2004         * rendering/RenderText.h: Removed erroneous RenderText::
2005         prefix from a member function name.
2006
2007         * platform/Arena.cpp: Added <assert.h> to list of includes.
2008         * platform/KURL.cpp: Ditto.
2009         * platform/StringImpl.cpp: Ditto.
2010         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Ditto.
2011         * platform/image-decoders/png/PNGImageDecoder.cpp: Ditto.
2012
2013 2006-04-22  Darin Adler  <darin@apple.com>
2014
2015         * doc: Added.
2016
2017 2006-04-22  Maciej Stachowiak  <mjs@apple.com>
2018
2019         Reviewed by Eric.
2020
2021         - push down a bunch of WebCoreFrameBridge code to C++ (plus some reformatting)
2022
2023         * bridge/mac/WebCoreFrameBridge.mm:
2024         (-[WebCoreFrameBridge isDescendantOfFrame:]):
2025         (-[WebCoreFrameBridge traverseNextFrameStayWithin:]):
2026         (-[WebCoreFrameBridge nextFrameWithWrap:]):
2027         (-[WebCoreFrameBridge previousFrameWithWrap:]):
2028         (+[WebCoreFrameBridge bridgeForDOMDocument:]):
2029         (-[WebCoreFrameBridge parent]):
2030         (-[WebCoreFrameBridge addData:]):
2031         (-[WebCoreFrameBridge didNotOpenURL:pageCache:]):
2032         (-[WebCoreFrameBridge restoreDocumentState]):
2033         (-[WebCoreFrameBridge _stringWithDocumentTypeStringAndMarkupString:]):
2034         (-[WebCoreFrameBridge nodesFromList:]):
2035         (-[WebCoreFrameBridge markupStringFromNode:nodes:]):
2036         (-[WebCoreFrameBridge markupStringFromRange:nodes:]):
2037         (-[WebCoreFrameBridge rangeByExpandingSelectionWithGranularity:]):
2038         (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:direction:granularity:]):
2039         (-[WebCoreFrameBridge alterCurrentSelection:direction:granularity:]):
2040         (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:verticalDistance:]):
2041         (-[WebCoreFrameBridge alterCurrentSelection:verticalDistance:]):
2042         (-[WebCoreFrameBridge replaceMarkedTextWithText:]):
2043         (-[WebCoreFrameBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
2044         (-[WebCoreFrameBridge increaseSelectionListLevel]):
2045         (-[WebCoreFrameBridge decreaseSelectionListLevel]):
2046         (-[WebCoreFrameBridge insertLineBreak]):
2047         (-[WebCoreFrameBridge insertParagraphSeparator]):
2048         (-[WebCoreFrameBridge insertParagraphSeparatorInQuotedContent]):
2049         (-[WebCoreFrameBridge insertText:selectInsertedText:]):
2050         (-[WebCoreFrameBridge deleteSelectionWithSmartDelete:]):
2051         (-[WebCoreFrameBridge ensureSelectionVisible]):
2052         (-[WebCoreFrameBridge RenderObject::nodeInfoAtPoint:allowShadowContent:]):
2053         * page/Frame.cpp:
2054         (WebCore::Frame::nodeInfoAtPoint):
2055         (WebCore::Frame::hasSelection):
2056         (WebCore::Frame::documentTypeString):
2057         * page/Frame.h:
2058         * page/FrameTree.cpp:
2059         (WebCore::FrameTree::traverseNextWithWrap):
2060         (WebCore::FrameTree::traversePreviousWithWrap):
2061         (WebCore::FrameTree::deepLastChild):
2062         * page/FrameTree.h:
2063
2064 2006-04-22  Beth Dakin  <bdakin@apple.com>
2065
2066         Reviewed by Hyatt.
2067
2068         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6141 
2069         DOMCSSPrimitiveValue is always returning values in pixels when 
2070         using getComputedStyle:
2071
2072         getFloatValue() took a unit type as a parameter, ignored it, and 
2073         returned m_value.num. This patch writes a second version of the 
2074         function that actually converts m_value.num to the specified unites 
2075         before returning it. Where a conversion is not required, I removed 
2076         the unit type from the caller so that it would go directly to the 
2077         inline version of the function.
2078
2079         * css/css_valueimpl.cpp:
2080         (WebCore::CSSPrimitiveValue::computeLengthFloat): Remove type 
2081         parameter since a conversion is not needed.
2082         (WebCore::scaleFactorForConversion): Helper function for 
2083         conversion.
2084         (WebCore::CSSPrimitiveValue::getFloatValue): This version of 
2085         getFloatValue() takes a unit type parameter and converts 
2086         m_value.num.
2087         * css/css_valueimpl.h:
2088         (WebCore::CSSPrimitiveValue::getFloatValue): This version does not 
2089         take a parameter and just returns m_value.num.
2090         * css/cssparser.cpp:
2091         (WebCore::BorderImageParseContext::commitBorderImage): Remove type 
2092         parameter since a conversion is not needed.
2093         * css/cssstyleselector.cpp:
2094         (WebCore::convertToLength): Same.
2095         (WebCore::CSSStyleSelector::applyProperty): Same.
2096         (WebCore::CSSStyleSelector::mapBackgroundSize): Same.
2097         (WebCore::CSSStyleSelector::mapBackgroundXPosition): Same.
2098         (WebCore::CSSStyleSelector::mapBackgroundYPosition): Same.
2099         * editing/ApplyStyleCommand.cpp:
2100         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Same.
2101         * ksvg2/css/SVGCSSStyleSelector.cpp:
2102         (WebCore::CSSStyleSelector::applySVGProperty): Same.
2103         * ksvg2/misc/KCanvasRenderingStyle.cpp:
2104         (WebCore::KSVGPainterFactory::cssPrimitiveToLength): Same.
2105
2106 2006-04-21  Geoffrey Garen  <ggaren@apple.com>
2107
2108         Reviewed by John.
2109
2110         - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=8509
2111         javascript:document.importNode(null)
2112         
2113         * dom/Document.cpp:
2114         (WebCore::Document::importNode): Throw an error if the node is null.
2115         This happens when the object provided in the JavaScript call is not
2116         a node.
2117         (WebCore::Document::adoptNode): Set the DOM exception code in all error
2118         cases instead of just a few, because that's what the spec requires.
2119
2120 2006-04-21  Geoffrey Garen  <ggaren@apple.com>
2121
2122         Reviewed by John.
2123
2124         - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=8510
2125         submit event doesn't bubble - it's supposed to.
2126
2127         * html/HTMLElement.cpp:
2128         (WebCore::HTMLElement::parseMappedAttribute): Added recognition for the
2129         onsubmit attribute, so elements can use it
2130         * html/HTMLFormElement.cpp:
2131         (WebCore::HTMLFormElement::prepareSubmit): Changed bubbling attribute
2132         to 'true'
2133
2134 2006-04-21  Geoffrey Garen  <ggaren@apple.com>
2135
2136         Reviewed by TimO.
2137
2138         - Fixed: error event does not bubble
2139
2140         I discovered this bug while working on the "submit event does not
2141         bubble" bug. The DOM spec says the event should bubble, and that's how
2142         it works in Firefox.
2143
2144         The DOM Spec also says that the error event is "valid for
2145         OBJECT elements, BODY elements, and FRAMESET element." But it doesn't
2146         say "valid ONLY." Firefox supports it on all elements and web
2147         developers tend to think it will work for things like <img> and
2148         <script>, so I went whole hog here.
2149
2150         * html/HTMLElement.cpp:
2151         (WebCore::HTMLElement::parseMappedAttribute): Make onerror a mapped
2152         attribute for all elements, so containing elements can register for
2153         the event.
2154         * html/HTMLTokenizer.cpp:
2155         (WebCore::HTMLTokenizer::notifyFinished): make onerror bubble
2156         * html/html_headimpl.cpp:
2157         (WebCore::HTMLScriptElement::parseMappedAttribute): Remove special
2158         case for onerror because HTMLElement will take care of it
2159         (WebCore::HTMLScriptElement::notifyFinished): make onerror bubble
2160         * html/html_imageimpl.cpp:
2161         (WebCore::HTMLImageElement::parseMappedAttribute): Remove special
2162         case for onerror because HTMLElement will take care of it
2163
2164 2006-04-21  Adele Peterson  <adele@apple.com>
2165
2166         Test for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8181
2167         REGRESSION: After tabbing in page's field, attempting to tab from Google toolbar search to page fails on first try
2168
2169         * manual-tests/tabbing-input-google.html: Added.
2170
2171 2006-04-21  Kevin M. Ollivier  <kevino@theolliviers.com>
2172
2173         Reviewed by Darin.
2174
2175         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8507
2176           Compilation fixes for building on gcc 4.0.2, and without precomp headers
2177
2178         * platform/Cursor.h: Created a fallback case that typedefs PlatformCursor
2179         to void * if it isn't defined to anything else. (Useful to help get new ports
2180         initially compiling.)
2181         
2182         * bindings/js/kjs_window.cpp:
2183         * rendering/RenderTextField.cpp:
2184         * rendering/RenderBox.cpp:
2185         Add missing headers to resolve issues when compiling without precompiled
2186         headers.
2187         
2188         * rendering/RenderText.h: Declare the InlineTextBox class before 
2189         friend declaration to resolve compilation issues with gcc 4.0.2.
2190         
2191 2006-04-21  Adele Peterson  <adele@apple.com>
2192
2193         Reviewed by Darin.
2194
2195         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8213
2196         REGRESSION: Can't tab out of text field if iframe comes after it
2197
2198         Test: fast/forms/tabbing-input-iframe.html
2199
2200         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::nextKeyViewInFrame):
2201           If the next focusable node is a RenderWidget without a view, then continue in the loop.  We used to break out in this case. 
2202           I also made some formatting changes and reorganized the function to make it easier to read.
2203
2204 2006-04-21  Adele Peterson  <adele@apple.com>
2205
2206         Reviewed by Beth.
2207
2208         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8496
2209         REGRESSION: Dragging to select text around a text field causes the text field to scroll.
2210
2211         Test: manual-tests/text-field-autoscroll.html
2212
2213         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::handleMouseMoveEvent): Start the frame's autoscroll timer
2214         even when we're calling over the bridge to handle the autoscroll.
2215         * page/Frame.cpp: (WebCore::Frame::stopAutoscrollTimer): Clear out pointer to layer.
2216
2217 2006-04-21  Geoffrey Garen  <ggaren@apple.com>
2218
2219         - And again.
2220
2221         * WebCore.vcproj/WebCore/WebCore.vcproj:
2222
2223 2006-04-21  Geoffrey Garen  <ggaren@apple.com>
2224
2225         - Futile attempt to fix Windows build.
2226         
2227         * WebCore.vcproj/WebCore/WebCore.vcproj:
2228
2229 2006-04-20  Geoffrey Garen  <ggaren@apple.com>
2230
2231         Reviewed by Maciej.
2232
2233         - Added autogeneration of JS bindings for CSSRule, CSSValue,
2234         Event, and NodeFilter.  
2235
2236         - Made related prototype objects hold the relevant constants, to
2237         match Mozilla and the DOM 2 spec. (Previously, only the related
2238         constructor objects held those constants, in accordance with the
2239         DOM 3 spec.)
2240
2241         - Fixed up remaining Windows build issues.
2242
2243         * DerivedSources.make: Added new autogenerated files
2244         * WebCore.xcodeproj/project.pbxproj: ditto
2245         * bindings/js/kjs_css.cpp:
2246         (KJS::DOMCSSRule::classInfo):
2247         (KJS::DOMCSSRule::getOwnPropertySlot): scope call to classInfo()
2248         because it's virtual and DOMCSSRule has a derrived class now.
2249         (KJS::DOMCSSRule::put): ditto
2250         (KJS::DOMCSSRuleFunc::callAsFunction):
2251         (KJS::toJS):
2252         * bindings/js/kjs_css.h:
2253         * bindings/js/kjs_events.cpp:
2254         (KJS::toJS):
2255         * bindings/js/kjs_events.h:
2256         * bindings/js/kjs_html.cpp:
2257         (KJS::OptionConstructorImp::OptionConstructorImp):
2258         * bindings/js/kjs_traversal.cpp:
2259         (KJS::toJS):
2260         * bindings/js/kjs_traversal.h:
2261         * bindings/js/kjs_window.cpp: 
2262         (KJS::Window::getValueProperty): added CSSValue global object
2263         * bindings/js/kjs_window.h:
2264         (KJS::Window::):
2265         * bindings/scripts/CodeGeneratorJS.pm: Changed generator to write
2266         constants to prototype objects (previously only wrote constants to
2267         constructor objects)
2268         * css/CSSPrimitiveValue.idl: Removed LegacyParent since CSSValue now
2269         exists in IDL
2270         * css/CSSRule.idl: Added.
2271         * css/CSSValue.idl: Added.
2272         * css/css_ruleimpl.h:
2273         (WebCore::CSSRule::):
2274         * css/css_valueimpl.h:
2275         * dom/Event.idl: Added.
2276         * dom/MutationEvent.idl: Removed LegacyParent since Event now exists
2277         in IDL
2278         * dom/NodeFilter.idl: Added.
2279         * dom/UIEvent.idl: Removed LegacyParent since event now exists in IDL
2280         * dom/dom2_eventsimpl.h:
2281         (WebCore::Event::):
2282
2283 2006-04-21  Darin Adler  <darin@apple.com>
2284
2285         - one more attempt to fix Windows build
2286
2287         * platform/cairo/GraphicsContextCairo.cpp:
2288         (WebCore::GraphicsContext::fillRect): Update to use Color and match
2289         the similar function on GraphicsContextMac.
2290
2291 2006-04-21  Beth Dakin  <bdakin@apple.com>
2292
2293         Reviewed by Hyatt.
2294
2295         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8495 
2296         REGRESSION: Sidebar on cnn.com is hosed
2297
2298         * platform/mac/ImageMac.mm:
2299         (WebCore::Image::drawTiled): Use the size of the destination rect, 
2300         not the oneTileRect in the no-pattern case.
2301         * rendering/RenderBox.cpp:
2302         (WebCore::RenderBox::paintBackgroundExtended): Initialize 
2303         scaledWidth and scaledHeight to the appropriate value (was wrong in 
2304         scroll case), adjust position at appropriate times, and take out 
2305         no-repeat clause for now since we don't have enough test cases yet 
2306         to be sure we won't cause massive regressions. 
2307
2308 2006-04-21  Darin Adler  <darin@apple.com>
2309
2310         - attempt to fix Windows build after my last check-in
2311
2312         * WebCore.vcproj/Image Viewer/ImageView.cpp: Changed calls to use the
2313         new IntRect-based API.
2314
2315         * html/CanvasPattern.cpp: (WebCore::CanvasPattern::CanvasPattern):
2316         Put appropriate ifdefs around the m_platformImage initializer.
2317
2318         * page/Frame.cpp: Make Frame::adjustPageHeight Mac-OS-X-only for now
2319         since it's used for printing and we don't have printing going on any
2320         other platforms yet.
2321
2322         * platform/cairo/GraphicsContextCairo.cpp: Take out constructor that
2323         takes only the "for printing" boolean for now.
2324
2325         * platform/cairo/ImageCairo.cpp: Include the GraphicsContext.h header.
2326
2327         * platform/win/TemporaryLinkStubs.cpp: (GraphicsContext::setShadow):
2328         Fix up this stub and remove the GraphicsContext empty constructor stub.
2329
2330 2006-04-21  Darin Adler  <darin@apple.com>
2331
2332         - fix build
2333
2334         * WebCore.xcodeproj/project.pbxproj: Replaced absolute path on my system
2335         with a build-result-relative path; also removed some source files from the
2336         list of resources to install!
2337
2338 2006-04-20  Darin Adler  <darin@apple.com>
2339
2340         Reviewed by Hyatt.
2341
2342         - make <canvas> element and related API behave more like the draft of
2343           the WhatWG Web Application specification, checking parameter validity
2344           and raising exceptions
2345         - changed HTMLCanvasElement bindings to be auto-generated, fixing all
2346           issues so we can generate bindings for classes drived from HTMLElement
2347         - change GraphicsContext API to use IntRect/Point/Size in more cases
2348         - change GraphicsContext so it is closer to truly wrapping a graphics
2349           context rather than representing the current NSGraphicsContext; there
2350           are still some things like text and rectangle fills that are tied to
2351           NSGraphicsContext, but we're most of the way there
2352         - removed Brush class since it just amounted to a color, using an RGBA32
2353           instead where we used to use a Brush
2354
2355         * DerivedSources.make: Added JSHTMLCanvasElement.h.
2356         * WebCore.xcodeproj/project.pbxproj: Added new files.
2357
2358         * bindings/js/JSCanvasRenderingContext2DBase.h: Added toJS.
2359         * bindings/js/JSCanvasRenderingContext2DBase.cpp:
2360         (WebCore::JSCanvasRenderingContext2DBaseProtoFunc::callAsFunction):
2361         Added exception code handling for strokeRect, drawImage, and createPattern.
2362         Added version of createPattern that takes a canvas. Use TYPE_MISMATCH_ERR
2363         instead of JavaScript TypeError when parameter is neither an image or canvas
2364         element. Adapt for new HTMLCanvasElement binding.
2365         (WebCore::toJS): Added. Converts context object to JS wrapper.
2366
2367         * bindings/js/JSHTMLElementWrapperFactory.h: Added.
2368         * bindings/js/JSHTMLElementWrapperFactory.cpp: Added. Creates a JavaScript
2369         wrapper for an arbitrary HTML element. Better than putting this all in the
2370         DOM node class toJS function.
2371
2372         * bindings/js/JSXMLSerializer.cpp: Tweaked to make it build.
2373         * bindings/js/kjs_dom.cpp: (KJS::toJS): Changed to call the
2374         JSHTMLElementWrapperFactory function createJSWrapper, instead
2375         of always creating a JSHTMLElement.
2376
2377         * bindings/js/kjs_html.h: Removed canvas-related stuff. Added HTMLElement
2378         prototype.
2379         * bindings/js/kjs_html.cpp:
2380         (KJS::JSHTMLElement::classInfo): Removed canvas element.
2381         (KJS::JSHTMLElement::accessors): Ditto.
2382         (KJS::JSHTMLElementProtoFunc::callAsFunction): Added, to help the auto-binding
2383         machiner cope with HTMLElement.
2384         (KJS::HTMLElementFunction::callAsFunction): Removed canvas element.
2385
2386         * bindings/scripts/CodeGeneratorJS.pm: Added types needed for HTMLCanvasElement.
2387
2388         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::setDisplaysWithFocusAttributes):
2389         Changed to create a GraphicsContext with the new constructor that takes
2390         a CGContextRef.
2391         * bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge drawRect:]):
2392         Changed to create a GraphicsContext with the new constructor that takes
2393         a NSGraphicsContext.
2394         * page/Frame.cpp: (WebCore::Frame::adjustPageHeight): Changed to create a
2395         GraphicsContext with the new constructor that takes a CGContextRef.
2396
2397         * editing/SelectionController.cpp: (WebCore::SelectionController::paintCaret):
2398         Eliminated a use of obsolete class Brush.
2399
2400         * html/CanvasPattern.h:
2401         * html/CanvasPattern.cpp:
2402         (WebCore::CanvasPattern::parseRepetitionType): Added. Parses a repetition
2403         type. Different from the old logic in that it is case-sensitive and rejects
2404         anything other than null, empty string, or the four repeat types.
2405         (WebCore::CanvasPattern::CanvasPattern): Added constructor that takes
2406         a CGImageRef. Changed constructor to take two booleans instead of the repetition
2407         type string. It's the caller's responsibility to parse the string.
2408         (WebCore::CanvasPattern::~CanvasPattern): Release the CGImage.
2409         (WebCore::patternCallback): Handle the CGImage case. Also changed the code
2410         to create a GraphicsContext as needed and call the image drawing code with that.
2411         (WebCore::CanvasPattern::createPattern): Handle both the image element case and
2412         the canvas element case.
2413         
2414         * html/CanvasRenderingContext2D.h:
2415         * html/CanvasRenderingContext2D.cpp:
2416         (WebCore::CanvasRenderingContext2D::State::State): Change line cap, line join,
2417         and global composite to store enum values instead of strings.
2418         (WebCore::CanvasRenderingContext2D::setLineWidth): Do nothing if width is NaN
2419         or <= 0.
2420         (WebCore::CanvasRenderingContext2D::lineCap): Return a string based on a
2421         stored enum, rather than returning a stored string.
2422         (WebCore::CanvasRenderingContext2D::setLineCap): Do nothing if the string is
2423         not one of the standard line cap types. Also case sensitive and stores enum
2424         rather than the string.
2425         (WebCore::CanvasRenderingContext2D::lineJoin): Return a string based on a
2426         stored enum, rather than returning a stored string.
2427         (WebCore::CanvasRenderingContext2D::setLineJoin): Do nothing if the string is
2428         not one of the standard line join types. Also case sensitive and stores enum
2429         rather than the string.
2430         (WebCore::CanvasRenderingContext2D::setMiterLimit): Do nothing if limit is NaN
2431         or <= 0.
2432         (WebCore::CanvasRenderingContext2D::setGlobalAlpha): Do nothing if alpha is NaN
2433         or < 0 or > 1.
2434         (WebCore::CanvasRenderingContext2D::globalCompositeOperation): Return a string
2435         based on a stored enum, rather than returning a stored string.
2436         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation): Do nothing if
2437         the string is not one of the standard compositing modes. Also case sensitive and
2438         stores enum rather than the string.
2439         (WebCore::CanvasRenderingContext2D::arcTo): Generate INDEX_SIZE_ERR exception
2440         if radius is NaN or <= 0.
2441         (WebCore::CanvasRenderingContext2D::arc): Ditto.
2442         (WebCore::CanvasRenderingContext2D::rect): Generate INDEX_SIZE_ERR exception
2443         if width or height is NaN or <= 0.
2444         (WebCore::CanvasRenderingContext2D::clearRect): Ditto.
2445         (WebCore::CanvasRenderingContext2D::fillRect): Ditto.
2446         (WebCore::CanvasRenderingContext2D::strokeRect): Ditto, same for line width.
2447         Changed the case where the line width is not specified to share code with the
2448         case where it is.
2449         (WebCore::size): Renamed from imageSize, since C++ overloads based on parameter
2450         types anyway.
2451         (WebCore::CanvasRenderingContext2D::drawImage): Generate INDEX_SIZE_ERR exception
2452         if the source rect is not entirely inside the image rect, or if the width or height
2453         of either the source or destination rect is NaN or <= 0. Changed image drawing
2454         code to be platform-independent for the image element case, but not yet for the
2455         canvas case.
2456         (WebCore::CanvasRenderingContext2D::drawImageFromRect): Change code to parse the
2457         composite operation to use the new code shared with Image.
2458         (WebCore::CanvasRenderingContext2D::createPattern): Added code to parse the
2459         repetition type separately before creating the pattern. Added an overload for
2460         canvas elements.
2461         (WebCore::CanvasRenderingContext2D::drawingContext): Changed to return a
2462         GraphicsContext*.
2463         (WebCore::CanvasRenderingContext2D::platformContext): Added. Now does what
2464         drawingContext used to do.
2465
2466         * html/CanvasRenderingContext2D.idl: Added exception declarations as needed
2467         for changes above.
2468
2469         * html/HTMLCanvasElement.h:
2470         * html/HTMLCanvasElement.cpp:
2471         (WebCore::HTMLCanvasElement::HTMLCanvasElement): Changed m_drawingContext
2472         to be a GraphicsContext instead of a CGContextRef.
2473         (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Ditto.
2474         (WebCore::HTMLCanvasElement::getContext): Removed special cases for null
2475         and empty string. Only give a 2D graphics context if the string is "2d".
2476         (WebCore::HTMLCanvasElement::reset): Updated for change to GraphicsContext
2477         from CGContextRef.
2478         (WebCore::HTMLCanvasElement::paint): Ditto.
2479         (WebCore::HTMLCanvasElement::createDrawingContext): Changed to create a
2480         GraphicsContext* instead of a CGContextRef.
2481         (WebCore::HTMLCanvasElement::drawingContext): Changed to return a
2482         GraphicsContext* instead of a CGContextRef.
2483         (WebCore::HTMLCanvasElement::createPlatformImage): Updated for changes above.
2484
2485         * html/HTMLCanvasElement.idl: Added.
2486
2487         * html/HTMLParser.h:
2488         * html/HTMLParser.cpp:
2489         (WebCore::HTMLParser::canvasCreateErrorCheck): Added. An attempt to implement the
2490         fallback behavior for canvas elements when JavaScript is off.
2491         (WebCore::HTMLParser::getNode): Sorted list of functions. Added case for canvas.
2492
2493         * html/html_imageimpl.h:
2494         * html/html_imageimpl.cpp:
2495         (WebCore::HTMLImageElement::HTMLImageElement): Changed m_compositeOperator to be
2496         an enum instead of a string.
2497         (WebCore::HTMLImageElement::parseMappedAttribute): Parse the enum here.
2498
2499         * kcanvas/KCanvasResources.h:
2500         * kcanvas/KCanvasResources.cpp: (WebCore::KCanvasMarker::draw): Changed to take a
2501         GraphicsContext parameter.
2502
2503         * kcanvas/RenderPath.h: Added GraphicsContext parameter to drawMarkersIfNeeded.
2504
2505         * kcanvas/RenderPath.cpp: (WebCore::RenderPath::paint):
2506         * kcanvas/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint):
2507         * kcanvas/RenderSVGText.cpp: (WebCore::RenderSVGText::paint):
2508         Changed to generate and use an appropriate GraphicsContext.
2509
2510         * kcanvas/device/quartz/KCanvasItemQuartz.h: Added GraphicsContext parameter to
2511         drawMarkersIfNeeded.
2512         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
2513         (WebCore::DrawMarkersData::DrawMarkersData): Added GraphicsContext*.
2514         (WebCore::drawMarkerWithData): Pass along a GraphicsContext*.
2515         (WebCore::drawStartAndMidMarkers): Ditto.
2516         (WebCore::KCanvasItemQuartz::drawMarkersIfNeeded): Pass a long a GraphicsContext*.
2517
2518         * kcanvas/device/KRenderingDevice.h: Added a pure virtual createGraphicsContext
2519         to bridge back to a GraphicsContext. Long term that class will replace this one.
2520         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
2521         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
2522         (WebCore::KRenderingDeviceContextQuartz::createGraphicsContext): Added.
2523
2524         * ksvg2/svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::drawMaskerContent):
2525         Create and pass a GraphicsContext -- old code used the default constructor for
2526         GraphicsContext which meant "current context", and that no longer exists.
2527         * ksvg2/svg/SVGPatternElement.cpp:
2528         (WebCore::SVGPatternElement::drawPatternContentIntoTile): Ditto.
2529
2530         * platform/Brush.h: Removed.
2531         * platform/CompositeOperator.h: Added.
2532         * platform/CompositeOperator.cpp: Added.
2533
2534         * platform/Font.h: Changed calls to use IntPoint instead of pairs of ints.
2535         Also removed the const from all the uses of GraphicsContext*.
2536
2537         * platform/GraphicsContext.h: Eliminated default constructor and constructor
2538         that takes only a boolean. Replaced with constructors that take platform
2539         graphics contexts only. Replaced brush-related calls with fill color calls.
2540         Replaced use of Brush with use of Color. Changed Image::CompositeOperator to
2541         just plain CompositeOperator. Changed tuples of ints into IntRect and IntPoint.
2542         Moved setFocusRingClip and clearFocusRingClip out of ifdefs. Removed unused
2543         getCompositeOperation and string-based setCompositeOperation. Moved
2544         currentCGContext and the other setCompositeOperation out of the GraphicsContext
2545         class and made them global functions. Fixed platformContext so it won't always
2546         return the CGContextRef of the current NSGraphicsContext. Instead, it will
2547         return the appropriate CGContextRef for the GraphicsContext. This eliminates
2548         the need to use void* for the image-drawing functions.
2549
2550         * platform/GraphicsContext.cpp:
2551         (WebCore::GraphicsContextState::GraphicsContextState): Replaced Brush with
2552         an RGBA fill color.
2553         (WebCore::GraphicsContext::setFillColor): Renamed from setBrush.
2554         (WebCore::GraphicsContext::fillColor): Renamed from brush.
2555         (WebCore::GraphicsContext::drawImage): Changed to use IntRect.
2556         (WebCore::GraphicsContext::drawTiledImage): Moved here from GraphicsContextMac.mm.
2557         (WebCore::GraphicsContext::drawText): Changed to use IntPoint.
2558         (WebCore::GraphicsContext::drawHighlightForText): Ditto.
2559         (WebCore::GraphicsContext::drawLineForText): Ditto.
2560         (WebCore::GraphicsContext::drawLineForMisspelling): Ditto.
2561
2562         * platform/Image.h: Removed CompositeOperator and related functions.
2563         Removed void* context parameters from draw functions.
2564
2565         * platform/Image.cpp: Removed compositeOperatorFromString.
2566
2567         * platform/Widget.h: Added a GraphicsContext* return value from lockDrawingFocus
2568         that you pass back to unlockDrawingFocus (for deletion).
2569
2570         * platform/mac/FontMac.mm:
2571         (WebCore::Font::selectionRectForText): Changed parameter to point and removed
2572         const on GraphicsContext* parameter.
2573         (WebCore::Font::drawText): Ditto.
2574         (WebCore::Font::drawHighlightForText): Ditto.
2575         (WebCore::Font::drawLineForText): Ditto.
2576         (WebCore::Font::drawLineForMisspelling): Ditto.
2577         (WebCore::Font::misspellingLineThickness): Removed const.
2578
2579         * platform/mac/GraphicsContextMac.mm:
2580         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2581         Added fields to store a CGContextRef and an NSGraphicsContext.
2582         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
2583         Release both the CGContextRef and the NSGraphicsContext.
2584         (WebCore::GraphicsContext::GraphicsContext): Implement to set up both the
2585         CGContextRef and the NSGraphicsContext in one case, and only the CGContextRef
2586         in the other.
2587         (WebCore::GraphicsContext::savePlatformState): Implement for the CGContext-only
2588         case.
2589         (WebCore::GraphicsContext::restorePlatformState): Ditto.
2590         (WebCore::GraphicsContext::drawRect): Assert that the NS context is present
2591         and 
2592         (WebCore::GraphicsContext::setColorFromFillColor): Renamed from
2593         setColorFromBrush.
2594         (WebCore::GraphicsContext::setColorFromPen): Added assertion.
2595         (WebCore::GraphicsContext::drawLine): Added assertion.
2596         (WebCore::GraphicsContext::drawEllipse): Get CGContext from the platformContext
2597         function instead of currentCGContext, and changed to use fillColor.
2598         (WebCore::GraphicsContext::drawArc): Ditto.
2599         (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
2600         (WebCore::setCompositeOperation): Changed to global function and also changed
2601         to do the work here -- no need to use WebCoreImageRendererFactory.
2602         (WebCore::GraphicsContext::drawImage): Move most of this into GraphicsContext.cpp.
2603         Remove the void* context parameter. Changed to take rects instead of separate coordinates.
2604         (WebCore::GraphicsContext::fillRect): Changed to take color instead of Brush.
2605         (WebCore::GraphicsContext::addClip): Added assertion.
2606         (WebCore::GraphicsContext::addRoundedRectClip): Get CGContextRef from the platformContext
2607         function instead of currentCGContext.
2608         (WebCore::GraphicsContext::createRenderingDeviceContext): Ditto.
2609         (WebCore::GraphicsContext::beginTransparencyLayer): Ditto.
2610         (WebCore::GraphicsContext::endTransparencyLayer): Ditto.
2611         (WebCore::GraphicsContext::setShadow): Change to take size instead of x,y. Also get
2612         CGCOntextRef from the platformContext function instead of currentCGContext.
2613         (WebCore::GraphicsContext::clearShadow): Get CGContextRef from the platformContext
2614         function instead of currentCGContext.
2615         (WebCore::GraphicsContext::platformContext): Added. Returns m_data->m_cgContext.
2616
2617         * platform/mac/ImageMac.mm:
2618         (WebCore::fillSolidColorInRect): Updated for change in CompositeOperator type.
2619         (WebCore::Image::checkForSolidColor): Ditto.
2620         (WebCore::Image::draw): Removed void* context parameter and replaced it with
2621         a GraphicsContext* parameter. Renamed from drawInRect.
2622         (WebCore::Image::drawTiled): Ditto. Renamed from tileInRect and scaleAndTileInRect.
2623
2624         * platform/mac/PDFDocumentImage.h: Updated for change in CompositeOperator type.
2625         * platform/mac/PDFDocumentImage.mm: (WebCore::PDFDocumentImage::draw): Ditto.
2626
2627         * platform/mac/WidgetMac.mm:
2628         (WebCore::Widget::lockDrawingFocus): Changed to return a GraphicsContext*.
2629         (WebCore::Widget::unlockDrawingFocus): Changed to take a GraphicsContext*.
2630
2631         * rendering/InlineTextBox.cpp:
2632         (WebCore::InlineTextBox::selectionRect): Changed to pass IntPoint.
2633         (WebCore::InlineTextBox::paint): Changed to pass IntSize.
2634         (WebCore::InlineTextBox::paintSelection): More of the same.
2635         (WebCore::InlineTextBox::paintMarkedTextBackground): Ditto.
2636         (WebCore::InlineTextBox::paintDecoration): Ditto.
2637         (WebCore::InlineTextBox::paintSpellingMarker): Ditto.
2638         (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
2639         (WebCore::InlineTextBox::paintMarkedTextUnderline): Ditto.
2640         (WebCore::InlineTextBox::positionForOffset): Ditto.
2641         * rendering/RenderBlock.cpp:
2642         (WebCore::RenderBlock::fillHorizontalSelectionGap): Ditto.
2643         (WebCore::RenderBlock::fillVerticalSelectionGap): Ditto.
2644         (WebCore::RenderBlock::fillLeftSelectionGap): Ditto.
2645         (WebCore::RenderBlock::fillRightSelectionGap): Ditto.
2646         * rendering/RenderBox.cpp:
2647         (WebCore::RenderBox::paintBackgroundExtended): Ditto.
2648         (WebCore::RenderBox::outlineBox): Ditto.
2649         * rendering/RenderImage.cpp:
2650         (WebCore::RenderImage::paint): Ditto.
2651         * rendering/RenderLayer.cpp:
2652         (WebCore::setClip): Take out ifdefs. We'll do that inside GraphicsContext instead.
2653         (WebCore::restoreClip): Ditto.
2654         * rendering/RenderObject.cpp:
2655         (WebCore::RenderObject::drawBorder): More of the same.
2656         (WebCore::RenderObject::paintBorderImage): Ditto.
2657         * rendering/render_line.cpp:
2658         (WebCore::InlineFlowBox::paintDecorations): Ditto.
2659         (WebCore::EllipsisBox::paint): Ditto.
2660         * rendering/render_list.cpp:
2661         (WebCore::RenderListMarker::paint): Ditto.
2662
2663         * rendering/render_frames.cpp: (WebCore::RenderFrameSet::userResize): Set up a graphics
2664         context by calling lockDrawingFocus. Also changed a color here to be a constant.
2665
2666         * platform/cairo/GraphicsContextCairo.cpp:
2667         (WebCore::GraphicsContext::drawImage): Update for parameter type changes.
2668         (WebCore::GraphicsContext::drawScaledAndTiledImage):
2669         (WebCore::GraphicsContext::setFocusRingClip):
2670         (WebCore::GraphicsContext::clearFocusRingClip):
2671         * platform/cairo/ImageCairo.cpp:
2672         (WebCore::setCompositingOperation):
2673         (WebCore::Image::tileInRect):
2674         (WebCore::Image::scaleAndTileInRect):
2675
2676 2006-04-20  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2677
2678         Reviewed by Darin.
2679
2680         WebCore part of:
2681         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8276
2682           REGRESSION (NativeTextField): Pasting a Finder item into a text field results in
2683             a file: URL being pasted instead of just the file name
2684         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8283
2685           REGRESSION: File's path doesn't appear after dragging file into input field
2686
2687         * bridge/mac/WebCoreFrameBridge.h:
2688         * bridge/mac/WebCoreFrameBridge.mm:
2689         (-[WebCoreFrameBridge isDragCaretRichlyEditable]): Added.
2690         * manual-tests/plain-text-paste.html: Added.
2691         * manual-tests/resources/plain-text-paste: Added.
2692         * manual-tests/resources/plain-text-paste/1.textClipping: Added.
2693         * manual-tests/resources/plain-text-paste/2.textClipping: Added.
2694         * manual-tests/resources/plain-text-paste/3.gif: Added.
2695         * manual-tests/resources/plain-text-paste/4.txt: Added.
2696         * manual-tests/resources/plain-text-paste/5.webloc: Added.
2697
2698 2006-04-20  Darin Adler  <darin@apple.com>
2699
2700         Reviewed by Adele.
2701
2702         - WebCore part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
2703           eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique
2704
2705         * platform/mac/WebCoreGraphicsBridge.h: Removed.
2706         * platform/mac/WebCoreGraphicsBridge.m: Removed.
2707         * platform/mac/WebCoreSystemInterface.h: Added.
2708         * platform/mac/WebCoreSystemInterface.mm: Added.
2709
2710         * WebCore.exp: Add new SystemInterface globals, remove WebCoreGraphicsBridge.
2711
2712         * WebCore.xcodeproj/project.pbxproj: Updated for removed and added files.
2713         Sorted files.
2714
2715         * bridge/mac/FrameMac.mm: Removed unneeded include of WebCoreGraphicsBridge.h.
2716
2717         * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::setDragImage):
2718         Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
2719         call wkSetDragImage.
2720
2721         * platform/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawFocusRing):
2722         Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
2723         call wkDrawFocusRing.
2724
2725         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintTextField):
2726         Call wkDrawBezeledTextFieldCell from WebCoreSystemInterface instead of using
2727         WebGraphicsBridge to do the same thing.
2728
2729 2006-04-20  Adele Peterson  <adele@apple.com>
2730
2731         Reviewed by Hyatt.
2732
2733         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8273
2734         REGRESSION: Read only input text field renders at the wrong height when value attribute is not present
2735
2736         Test: fast/forms/input-readonly-empty.html
2737
2738         * rendering/RenderBlock.h: Added hasLineIfEmpty.
2739         * rendering/RenderBlock.cpp:
2740         (WebCore::RenderBlock::hasLineIfEmpty): Added.  Checks for rootEditableElement as well as 
2741          a shadowNode who has an input element as a parent.
2742         (WebCore::RenderBlock::getBaselineOfLastLineBox): Calls hasLineIfEmpty instead of just checking for the rootEditableElement.
2743         * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): ditto.
2744
2745 2006-04-20  Darin Adler  <darin@apple.com>
2746
2747         Reviewed by Timothy.
2748
2749         Removed TO_NODE_OFFSET and TO_NODE_ADDRESS macros. These can just be done inline with pointer math.
2750
2751         * platform/DeprecatedString.cpp:
2752         (allocateNode):
2753         (freeHandle):
2754
2755 2006-04-19  Adele Peterson  <adele@apple.com>
2756
2757         Rubber-stamped by Darin.
2758
2759         Removed optimizations recently added in setInnerHTML and setInnerText.  The setInnerHTML change broke a first-letter style test.
2760         The setInnerText change caused an empty text node to get added when setting inner text to an empty string.  The bug that this
2761         change went in with remains fixed.
2762
2763         * html/HTMLElement.cpp:
2764         (WebCore::HTMLElement::setInnerHTML):
2765         (WebCore::HTMLElement::setInnerText):
2766
2767 2006-04-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2768
2769         Reviewed by Haytt.
2770
2771         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6770
2772           REGRESSION: Incomplete repaint when block with clipping grows
2773
2774         * manual-tests/repaint-resized-overflow.html: Added.
2775         * rendering/RenderLayer.cpp:
2776         (WebCore::RenderLayer::RenderLayer):
2777         (WebCore::RenderLayer::computeRepaintRects): Set the m_repaintOverflowOnResize
2778         flag to true if our object itself needs layout or if we're an overflow
2779         and have a normal child that needs layout, in which case if we end up
2780         resizing it will be because of the child, and that child might have not repainted
2781         itself correctly during its own layout.
2782         (WebCore::RenderLayer::updateLayerPositions): Do a full repaint if
2783         m_repaintOverflowOnResize is set and we resized but didn't move.
2784         * rendering/RenderLayer.h:
2785
2786 2006-04-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2787
2788         Reviewed by Hyatt.
2789
2790         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8352
2791           CSS text-shadow does not repaint completely when changed
2792
2793         * manual-tests/dynamic-shadow.html: Added.
2794         * rendering/render_style.cpp:
2795         (WebCore::RenderStyle::diff): Changed to return Layout when text-shadow
2796         changes.
2797
2798 2006-04-19  Adele Peterson  <adele@apple.com>
2799
2800         Reviewed by Darin.
2801
2802         Added readOnly methods for HTMLInputElement and HTMLTextAreaElement so the DOM bindings can call
2803         a method with the same name.  This will make it easier to autogenerate the DOM bindings in the future.
2804  
2805         * html/HTMLInputElement.h: (WebCore::HTMLInputElement::readOnly): Added. Calls isReadOnlyControl.
2806         * html/HTMLTextAreaElement.h: (WebCore::HTMLTextAreaElement::readOnly): ditto.
2807         * bindings/js/kjs_html.cpp:
2808         (KJS::JSHTMLElement::inputGetter): Calls readOnly instead of isReadOnlyControl.
2809         (KJS::JSHTMLElement::textAreaGetter): ditto.
2810         * bindings/objc/DOMHTML.mm:
2811         (-[DOMHTMLInputElement readOnly]): ditto.
2812         (-[DOMHTMLTextAreaElement readOnly]): Calls readOnly instead of getting the attribute directly.
2813         (-[DOMHTMLTextAreaElement setReadOnly:]): Calls setReadOnly instead of setting the attribute directly.
2814
2815 2006-04-19  Adele Peterson  <adele@apple.com>
2816
2817         Reviewed by Hyatt.
2818
2819         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8297
2820         REGRESSION: Input element extends outside of DIV element at http://www.macdock.com/
2821
2822         * platform/Font.h: Added runRounding parameter to floatWidth.
2823         * platform/mac/FontMac.mm: (WebCore::Font::floatWidth): ditto.
2824         * platform/win/FontWin.cpp: (WebCore::Font::floatWidth): ditto.
2825         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::calcMinMaxWidth):
2826           Use new floatWidth parameter to turn off run rounding.
2827
2828 2006-04-19  Adele Peterson  <adele@apple.com>
2829
2830         Reviewed by Beth.
2831
2832         Fix for Windows build.
2833
2834         * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::determineState):
2835         Use isReadOnlyControl instead of isReadOnly.
2836
2837  2006-04-19  Adele Peterson  <adele@apple.com>
2838  
2839          Reviewed by Beth.
2840  
2841          Fix to make readonly text fields have dimmed borders to match AppKit behavior.
2842  
2843          Test: fast/forms/input-readonly-dimmed.html
2844  
2845          * dom/Node.h: (WebCore::Node::isReadOnlyControl): Changed from const version of isReadOnly.
2846          * dom/Node.cpp:
2847          (WebCore::Node::isReadOnlyNode): Changed from isReadOnly.
2848          (WebCore::Node::setNodeValue): Uses isReadOnlyNode instead of isReadOnly.
2849          (WebCore::Node::checkSetPrefix): ditto.
2850          (WebCore::Node::checkAddChild): ditto.
2851          * dom/Attr.cpp: (WebCore::Attr::setValue): ditto.
2852          * dom/CharacterData.cpp:
2853          (WebCore::CharacterData::setData): ditto.
2854          (WebCore::CharacterData::appendData): ditto.
2855          (WebCore::CharacterData::checkCharDataOperation): ditto.
2856          * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChild): ditto.
2857          * dom/Element.cpp: (WebCore::Element::setAttribute): ditto.
2858          * dom/NamedAttrMap.cpp:
2859          (WebCore::NamedAttrMap::setNamedItem): ditto.
2860          (WebCore::NamedAttrMap::removeNamedItem): ditto.
2861          * dom/NamedAttrMap.h: (WebCore::NamedAttrMap::isReadOnlyNode): ditto.
2862          * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::isReadOnlyNode): ditto.
2863          * dom/Range.cpp:
2864          (WebCore::Range::checkDeleteExtract): ditto.
2865          (WebCore::Range::containedByReadOnly): ditto.
2866          * dom/Text.cpp: (WebCore::Text::splitText): ditto.
2867          * dom/dom_xmlimpl.cpp: (WebCore::ProcessingInstruction::setData): ditto.
2868  
2869          * bindings/js/kjs_html.cpp:
2870          (KJS::JSHTMLElement::inputGetter): Uses isReadOnlyControl instead of isReadOnly.
2871          (KJS::JSHTMLElement::textAreaGetter): ditto.
2872          * bindings/objc/DOMHTML.mm: (-[DOMHTMLInputElement readOnly]): ditto.
2873          * rendering/render_form.cpp:
2874          (WebCore::RenderLineEdit::updateFromElement): ditto.
2875          (WebCore::RenderTextArea::updateFromElement): ditto.
2876          * rendering/RenderTextField.cpp:
2877          (WebCore::RenderTextField::createDivStyle): ditto.
2878          (WebCore::RenderTextField::updateFromElement): ditto.
2879  
2880          * html/HTMLGenericFormElement.cpp: (WebCore::HTMLGenericFormElement::parseMappedAttribute): 
2881            When readonly attribute changes, update the theme so the control will repaint.
2882          * html/HTMLGenericFormElement.h: (WebCore::HTMLGenericFormElement::isReadOnlyControl): Renamed from readOnly.
2883          * html/HTMLInputElement.h: Removed isReadOnly, since isReadOnlyControl now exists on HTMLGenericFormElement.
2884          * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isReadOnlyControl): Renamed from isReadOnly.
2885          * rendering/RenderTheme.h: (WebCore::): Added ReadOnlyState to ControlState enum.
2886          * rendering/RenderThemeMac.h: Removed NSTextFieldCell since it was only being used to store the enabled state.
2887            Removed setTextFieldState since it was updating the enabled state of the cell, which is only used in one place.
2888          * rendering/RenderThemeMac.mm:
2889          (WebCore::RenderThemeMac::RenderThemeMac): No longer initialized the NSTextFieldCell.
2890          (WebCore::RenderThemeMac::adjustRepaintRect): No longer calls setTextFieldState.
2891          (WebCore::RenderThemeMac::paintTextField): Uses the enabled state and the readonly state to determine whether to draw
2892           a dimmed version of the aqua border.
2893  
2894 2006-04-19  Beth Dakin  <bdakin@apple.com>
2895
2896         Reviewed by Hyatt.
2897
2898         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8467 Block 
2899         with percentage background-size doesn't repaint properly when it 
2900         grows
2901
2902         * manual-tests/backgroundSizeRepaint.html: Added.
2903         * manual-tests/resources/apple.jpg: Added.
2904         * rendering/RenderObject.cpp:
2905         (WebCore::RenderObject::mustRepaintBackgroundOrBorder): We must 
2906         return true if we have a percentage background-size.
2907
2908 2006-04-19  David Hyatt  <hyatt@apple.com>
2909
2910         Fix for a regression in the new text fields.  Don't allow the repaint
2911         rect created by dynamic line layout changes to spill out of an overflow
2912         area's clip region.
2913
2914         (There is no test, since we have no way of testing cases where we repaint
2915          too much rather than too little.)
2916
2917         Reviewed by darin
2918
2919         * rendering/bidi.cpp:
2920         (WebCore::RenderBlock::layoutInlineChildren):
2921
2922 2006-04-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2923
2924         Fix for bug 8449, incomplete repaint of table cell that moved.  This
2925         fix also solves some of the textfield repainting problems (e.g., on
2926         google.com and lxr.mozilla.org).
2927
2928         Reviewed by hyatt
2929
2930         * manual-tests/table-cell-move.html: Added.
2931         * rendering/RenderCanvas.cpp:
2932         (WebCore::RenderCanvas::repaintViewRectangle):
2933         * rendering/RenderTableSection.cpp:
2934         (WebCore::RenderTableSection::layoutRows):
2935
2936 2006-04-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2937
2938         Reviewed by Eric, landed by ap.
2939
2940         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8469
2941           CRASH: WebCore::CSSParser::parseDashboardRegions when attr() is passed
2942
2943         Test: fast/css/dashboard-regions-attr-crash.html
2944
2945         * css/cssparser.cpp:
2946         (WebCore::CSSParser::parseDashboardRegions): Added null check for args.
2947
2948 2006-04-18  Rob Buis  <buis@kde.org>
2949
2950         Reviewed by eseidel & darin.  Landed by eseidel.
2951
2952         No automated tests possible (from javascript).
2953
2954         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6664:
2955         Inspector does not highlight SVG elements properly
2956
2957         Make sure RenderObject::absoluteBoundingBoxRect works for
2958         svg specific render objects by overriding absoluteRects.
2959         This fixes highlighting in the Inspector of svg shapes, paths,
2960         images and text.
2961
2962         * kcanvas/RenderPath.cpp:
2963         (WebCore::RenderPath::absoluteRects):
2964         * kcanvas/RenderPath.h:
2965         * kcanvas/RenderSVGImage.cpp:
2966         (WebCore::RenderSVGImage::getAbsoluteRepaintRect):
2967         (WebCore::RenderSVGImage::absoluteRects):
2968         * kcanvas/RenderSVGImage.h:
2969         * kcanvas/RenderSVGText.cpp:
2970         (WebCore::RenderSVGText::absoluteRects):
2971         * kcanvas/RenderSVGText.h:
2972
2973 2006-04-17  Rob Buis  <buis@kde.org>
2974
2975         Reviewed by eseidel.  Landed by eseidel.
2976
2977         Test: svg/custom/tref-update.svg
2978
2979         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6427:
2980         <tref> element not implemented
2981
2982         Implementation of <tref> element.
2983
2984         * WebCore.xcodeproj/project.pbxproj:
2985         * ksvg2/svg/SVGTRefElement.cpp: Added.
2986         (SVGTRefElement::SVGTRefElement):
2987         (SVGTRefElement::~SVGTRefElement):
2988         (SVGTRefElement::parseMappedAttribute):
2989         (SVGTRefElement::closeRenderer):
2990         (SVGTRefElement::childShouldCreateRenderer):
2991         (SVGTRefElement::createRenderer):
2992         * ksvg2/svg/SVGTRefElement.h: Added.
2993         (WebCore::SVGTRefElement::rendererIsNeeded):
2994         * ksvg2/svg/SVGTSpanElement.cpp:
2995         (SVGTSpanElement::childShouldCreateRenderer):
2996         * ksvg2/svg/SVGTextElement.cpp:
2997         (WebCore::SVGTextElement::childShouldCreateRenderer):
2998         * ksvg2/svg/svgtags.in:
2999
3000 2006-04-18  Darin Adler  <darin@apple.com>
3001
3002         * rendering/render_form.cpp: (WebCore::RenderSelect::updateFromElement):
3003         Roll out accidentally-landed change for bug 8398.
3004
3005 2006-04-18  Beth Dakin  <bdakin@apple.com>
3006
3007         Reviewed by Darin.
3008
3009         Fix for a leak exposed by background-size and detected by the 
3010         layout tests.
3011
3012         * css/css_valueimpl.cpp:
3013         (WebCore::CSSPrimitiveValue::cleanup): We must deref pairs.
3014
3015 2006-04-18  Beth Dakin  <bdakin@apple.com>
3016
3017         Reviewed by Eric.
3018
3019         Build fix for Windows. Just a few typos from background-size patch.
3020
3021         * platform/cairo/GraphicsContextCairo.cpp:
3022         (WebCore::GraphicsContext::drawTiledImage):
3023         * platform/cairo/ImageCairo.cpp:
3024         (WebCore::Image::tileInRect):
3025
3026 2006-04-18  Beth Dakin  <bdakin@apple.com>
3027
3028         Reviewed by Hyatt.
3029
3030         Implementation of CSS3 background-size property. See 
3031         http://bugzilla.opendarwin.org/show_bug.cgi?id=8353 for details.
3032
3033         * Viewer/ImageView.cpp: Adjust parameters to drawTiledImage()
3034         * css/CSSComputedStyleDeclaration.cpp: Add background-size
3035         * css/CSSPropertyNames.in: Same.
3036         * css/css_valueimpl.h: Add a constructor for Pair that takes the 
3037         two halves of the pair.
3038         * css/cssparser.cpp: Parse background-size. Still need to take care 
3039         of parsing the shorthand.
3040         * css/cssparser.h: Same.
3041         * css/cssstyleselector.cpp: Address background-size.
3042         * css/cssstyleselector.h: Same.
3043         * platform/GraphicsContext.h: drawTiledImage() now takes the 
3044         tileSize so that it can appropriately scale.
3045         * platform/Image.h: Same as above, but for tileInRect()
3046         * platform/cairo/GraphicsContextCairo.cpp:
3047         (WebCore::GraphicsContext::drawTiledImage):
3048         * platform/cairo/ImageCairo.cpp:
3049         (WebCore::Image::tileInRect): Take care of scaling image in 
3050         necessary in Cairo.
3051         * platform/mac/GraphicsContextMac.mm:
3052         (WebCore::GraphicsContext::drawTiledImage): 
3053         * platform/mac/ImageMac.mm:
3054         (WebCore::Image::tileInRect): Take care of scaling image if 
3055         necessary in CG.
3056         * rendering/RenderBox.cpp:
3057         (WebCore::RenderBox::paintBackgroundExtended): Compute appropriate 
3058         scale if background-size is set. If no-repeat is set, just call 
3059         drawImage() directly.
3060         * rendering/render_style.cpp: Add background-size to the style.
3061         (WebCore::m_next):
3062         (WebCore::BackgroundLayer::BackgroundLayer):
3063         (WebCore::BackgroundLayer::operator=):
3064         (WebCore::BackgroundLayer::operator==):
3065         (WebCore::BackgroundLayer::fillUnsetProperties):
3066         (WebCore::BackgroundLayer::cullEmptyLayers):
3067         * rendering/render_style.h: Same.
3068         (WebCore::BackgroundLayer::backgroundSize):
3069         (WebCore::BackgroundLayer::isBackgroundSizeSet):
3070         (WebCore::BackgroundLayer::setBackgroundSize):
3071         (WebCore::BackgroundLayer::clearBackgroundSize):
3072         (WebCore::RenderStyle::backgroundSize):
3073         (WebCore::RenderStyle::initialBackgroundSize):
3074
3075 2006-04-17  Justin Garcia  <justin.garcia@apple.com>
3076
3077         Reviewed by harrison
3078
3079         * editing/CompositeEditCommand.cpp:
3080         (WebCore::CompositeEditCommand::moveParagraph): The placeholder that's inserted 
3081         to keep content from collapsing due to pruning was inserted at the position after 
3082         the moved paragraph.  That's only appropriate when moving the paragraph backward 
3083         into the previous paragraph.
3084         
3085         * editing/ReplaceSelectionCommand.cpp:
3086         (WebCore::ReplaceSelectionCommand::doApply): The last paragraph of the incoming
3087         fragment should be merged with the paragraph after the end of the selection being pasted
3088         into even if the incoming fragment has only one block.   This fixes a bug and gets
3089         rid of a use of the info gathered during the test insertion.
3090
3091 2006-04-17  Adele Peterson  <adele@apple.com>
3092
3093         Reviewed by Darin.
3094
3095         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8407
3096         REGRESSION (NativeTextField): Leading and trailing spaces trimmed from text field value attribute
3097
3098         Test: fast/forms/input-spaces.html
3099
3100         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::createDivStyle): 
3101         Use white-space:pre for the inner div to avoid collapsing spaces in the text field.
3102
3103 2006-04-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3104
3105         Reviewed by Darin.
3106
3107         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8437
3108           iExploder(#293): Crash in StringImpl::hash()
3109
3110         * manual-tests/applet-param-no-name.html: Added.
3111         * rendering/RenderApplet.cpp:
3112         (WebCore::RenderApplet::createWidgetIfNecessary): Skip param elements with
3113         empty name.
3114
3115 2006-04-18  Darin Adler  <darin@apple.com>
3116
3117         - try to fix the Windows build
3118
3119         * platform/cairo/GraphicsContextCairo.cpp: (WebCore::setColor):
3120         Update for changes to getRGBA.
3121
3122 2006-04-17  Alexey Proskuryakov  <ap@nypop.com>
3123
3124         Reviewed by Darin.
3125
3126         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8440
3127         iExploder(#3327): Crash in StringImpl::initWithQChar()
3128
3129         Test: fast/parser/number-sign-in-map-name.html
3130
3131         * html/html_imageimpl.cpp:
3132         (WebCore::HTMLMapElement::parseMappedAttribute): Fixed handling of names starting with a '#'.
3133
3134 2006-04-17  Adele Peterson  <adele@apple.com>
3135
3136         Reviewed by Darin.
3137
3138         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8269
3139         REGRESSION: disabled text field does not display greyed-out text
3140
3141         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::createDivStyle): 
3142         For disabled text fields, lighten or darken text color based on background color.
3143         Tries to get as close as possible to logic in AppKit for old text fields.
3144         * platform/Color.h: Removed hsv and setHsv since they were just used within Color.cpp.
3145         * platform/Color.cpp:
3146         (WebCore::parseHexColor): Cleanup.
3147         (WebCore::differenceSquared): Added. Returns the difference squared of two colors.
3148         (WebCore::convertRGBToHSV): Added static function. Replaces hsv and setHSV, and fixes bug in old implementation of the algorithm.
3149         (WebCore::convertHSVToRGB): ditto.
3150         (WebCore::Color::light): No longer takes in a factor, since all callers use the same factor.  Uses new conversion functions.
3151         (WebCore::Color::dark): ditto.
3152         * rendering/InlineTextBox.cpp: Removed simpleDifferenceBetweenColors.
3153         (WebCore::correctedTextColor):  Uses differenceSquared instead of simpleDifferenceBetweenColors.
3154
3155 2006-04-17  David Hyatt  <hyatt@apple.com>
3156
3157         Fix for bug 8270, text highlights outside of textfield when it shouldn't.
3158
3159         Reviewed by darin
3160
3161         Added fast/forms/input-double-click-selection-gap-bug.html
3162
3163         * rendering/RenderBlock.cpp:
3164         (WebCore::RenderBlock::fillInlineSelectionGaps):
3165
3166 2006-04-17  David Hyatt  <hyatt@apple.com>
3167
3168         Fix for bug 8848, caret off by 1 pixel on numerous pixel tests.
3169
3170         Reviewed by darin
3171
3172         * rendering/InlineTextBox.cpp:
3173         (WebCore::InlineTextBox::positionForOffset):
3174         * rendering/RenderText.cpp:
3175         (WebCore::RenderText::caretRect):
3176
3177 2006-04-17  Timothy Hatcher  <timothy@apple.com>
3178
3179         Reviewed by Darin.
3180
3181         <rdar://problem/4506601> TOT WebCore fails to build ppc64
3182
3183         Switch many CG calls to use CGFloat for colors and gradients
3184
3185         * bindings/objc/DOMCSS.mm:
3186         (-[DOMRGBColor dealloc]): cast _internal to uintptr_t
3187         (-[DOMRGBColor finalize]): cast _internal to uintptr_t
3188         (-[DOMRGBColor red]): cast _internal to uintptr_t
3189         (-[DOMRGBColor green]): cast _internal to uintptr_t
3190         (-[DOMRGBColor blue]): cast _internal to uintptr_t
3191         (-[DOMRGBColor alpha]): cast _internal to uintptr_t
3192         (-[DOMRGBColor _color]): cast _internal to uintptr_t
3193         * bridge/mac/FrameMac.mm:
3194         (WebCore::regExpForLabels): use CFIndex as the type returned from indexOfObject:
3195         * bridge/mac/WebCoreFrameBridge.mm:
3196         (-[WebCoreFrameBridge baseWritingDirectionForSelectionStart]): workaround for <rdar://problem/4509035>
3197         * config.h: define CGFloat if it isn't defined already
3198         * html/CanvasGradient.cpp:
3199         (WebCore::CanvasGradient::addColorStop):
3200         (WebCore::gradientCallback):
3201         (WebCore::CanvasGradient::platformShading):
3202         * html/CanvasRenderingContext2D.cpp:
3203         (WebCore::CanvasRenderingContext2D::setShadow):
3204         (WebCore::CanvasRenderingContext2D::applyShadow):
3205         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
3206         (WebCore::CanvasRenderingContext2D::applyFillPattern):
3207         * html/CanvasStyle.cpp:
3208         (WebCore::CanvasStyle::applyStrokeColor):
3209         (WebCore::CanvasStyle::applyFillColor):
3210         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
3211         (WebCore::alphaImageForImage):
3212         (WebCore::KCanvasFEColorMatrixQuartz::getCIFilter):
3213         * kcanvas/device/quartz/KCanvasMaskerQuartz.mm:
3214         (WebCore::applyLuminanceToAlphaFilter):
3215         (WebCore::applyExpandAlphatoGrayscaleFilter):
3216         (WebCore::transformImageIntoGrayscaleMask):
3217         * kcanvas/device/quartz/KCanvasPathQuartz.mm:
3218         (WebCore::scratchContext):
3219         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
3220         (WebCore::cgGradientCallback):
3221         (WebCore::CGShadingRefForLinearGradient):
3222         (WebCore::CGShadingRefForRadialGradient):
3223         (WebCore::KRenderingPaintServerGradientQuartz::updateQuartzGradientStopsCache):
3224         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
3225         (WebCore::):
3226         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
3227         (WebCore::KRenderingPaintServerPatternQuartz::setup):
3228         * kcanvas/device/quartz/QuartzSupport.mm:
3229         (WebCore::applyStrokeStyleToContext):
3230         * kwq/WebCoreAXObject.mm:
3231         (CreateCGColorIfDifferent):
3232         * platform/Color.cpp:
3233         (WebCore::Color::getRGBA): new name, was getRgbaF. getRGBA uses float and has a double overload
3234         * platform/Color.h:
3235         * platform/mac/ClipboardMac.h: no need to define NSDragOperation
3236         * platform/mac/ColorMac.mm:
3237         (+[WebCoreControlTintObserver WebCore]):
3238         * platform/mac/GraphicsContextMac.mm:
3239         (WebCore::GraphicsContext::drawLine):
3240         * platform/mac/ImageMac.mm:
3241         (WebCore::Image::checkForSolidColor):
3242         (WebCore::Image::tileInRect):
3243         (WebCore::Image::scaleAndTileInRect):
3244         * platform/mac/TextEncodingMac.cpp:
3245         (WebCore::TextEncoding::fromUnicode):
3246
3247 2006-04-17  Justin Garcia  <justin.garcia@apple.com>
3248
3249         Reviewed by darin
3250         
3251         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8402>
3252         Fix interchange newline handling and avoid use of test rendering info
3253
3254         * editing/ReplaceSelectionCommand.cpp:
3255         (WebCore::ReplaceSelectionCommand::doApply):
3256         Fixed bugs in handling of interchange newlines at the end of incoming 
3257         fragments.  Removed the use of !fragment.isBlockFlow since it isn't 
3258         correct and relies on information gathered during the test insertion, which 
3259         we're trying to get rid of. 
3260         * editing/VisiblePosition.h:
3261         (WebCore::VisiblePosition::rootEditableElement): Added for convenience.
3262
3263 2006-04-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3264
3265         Reviewed by Darin.
3266
3267         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8408
3268           Paint the highlight behind selected list markers
3269
3270         Test: fast/lists/markers-in-selection.html
3271
3272         * rendering/RenderObject.h: Added selectionColorImageOverlayAlpha constant -
3273         the maximum opacity of the selection color when painted over images.
3274         * rendering/render_list.cpp:
3275         (WebCore::RenderListMarker::RenderListMarker):
3276         (WebCore::RenderListMarker::paint): Paint the selection highlight
3277         if selected: over the marker for image markers, under the marker for all other
3278         markers.
3279         (WebCore::RenderListMarker::setSelectionState): Added.
3280         (WebCore::RenderListMarker::selectionRect): Added.
3281         (WebCore::RenderListMarker::selectionColor): Added. Ensures that the selection
3282         color is transparent for image markers.
3283         * rendering/render_list.h:
3284         (WebCore::RenderListMarker::selectionState):
3285         (WebCore::RenderListMarker::canBeSelectionLeaf):
3286         * rendering/render_replaced.cpp
3287         (WebCore::RenderReplaced::selectionColor): Changed to use the selectionColorImageOverlayAlpha
3288         constant.
3289
3290 2006-04-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3291
3292         Reviewed by Darin.
3293
3294         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8420
3295           iExploder(#12): Assertion failure in RenderContainer::removeChildNode
3296
3297         Test: fast/forms/button-inner-block-reuse.html
3298
3299         Buttons have a distinguished anonymous child that holds all their other
3300         descendants. Descendants ended up in a sibling anonymous block as the
3301         initial anonymous child was being reused to hold the initial part of an
3302         inline that got split.
3303
3304         * rendering/RenderInline.cpp:
3305         (WebCore::RenderInline::splitFlow): Check if the anonymous block's parent
3306         allows us to reuse it.
3307         * rendering/RenderObject.h:
3308         (WebCore::RenderObject::allowsReusingAnonymousChild): Added. Returns true.
3309         * rendering/render_button.h:
3310         (WebCore::RenderButton::allowsReusingAnonymousChild): Added. Returns false.
3311
3312 2006-04-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3313
3314         Reviewed by Justin.
3315
3316         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8394
3317           Editable region does not accept dropped text if there is no selection
3318
3319         Test: editing/pasteboard/drop-text-without-selection.html
3320
3321         * bridge/mac/WebCoreFrameBridge.mm:
3322         (-[WebCoreFrameBridge documentFragmentWithText:]): Changed to allow
3323         creating a fragment regardless of the selection.
3324
3325 2006-04-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3326
3327         Reviewed by Darin.
3328
3329         - WebCore part of fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8324
3330           REGRESSION: textarea :focus not applied immediately
3331
3332         * bridge/mac/WebCoreFrameBridge.h:
3333         * kwq/KWQComboBox.mm:
3334         (-[KWQPopUpButton becomeFirstResponder]): Added call to formControlIsBecomingFirstResponder:.
3335         (-[KWQPopUpButton resignFirstResponder]): Cleaned up.
3336         * kwq/KWQListBox.mm: Ditto.
3337         (-[KWQTableView becomeFirstResponder]):
3338         (-[KWQTableView resignFirstResponder]):
3339         * kwq/KWQSlider.mm:
3340         (-[KWQSlider becomeFirstResponder]): Added call to formControlIsBecomingFirstResponder: and
3341         cleaned up.
3342         (-[KWQSlider resignFirstResponder]): Cleaned up.
3343         * platform/mac/WebCoreTextArea.mm:
3344         (-[WebCoreTextView becomeFirstResponder]): Added call to formControlIsBecomingFirstResponder:.
3345         (-[WebCoreTextView resignFirstResponder]): Cleaned up.
3346         * platform/mac/WebCoreTextField.mm:
3347         (-[KWQTextFieldController setHasFocus:]): Added call to formControlIsBecomingFirstResponder:.
3348         * manual-tests/textarea-focus.html: Added.
3349
3350 2006-04-16  Darin Adler  <darin@apple.com>
3351
3352         Reviewed by Adele and Justin.
3353
3354         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8298
3355           REGRESSION: Crash occurs when attempting to drag selection into
3356           Depart/Return input fields at http://www.travelocity.com/
3357         - remove the mutation event listener that's installed all the time,
3358           since it slows things down a bit
3359
3360         Calling SelectionController::nodeWillBeRemoved from Document::notifyBeforeNodeRemoval
3361         fixes the crash, which was happening because the call that was removing the text
3362         node, removeChildren, does not send a "node removed" mutation event (it sends a
3363         "subtree modified" mutation event instead). So this change alone fixes the crash.
3364
3365         But I also changed setInnerText to not blow away the text node each time the value
3366         is changed, and that makes the test case behave even better -- you don't even lose
3367         the selection; it works as it did with the NSTextField-based text field.
3368
3369         * manual-tests/input-empty-on-focus.html: Added.
3370
3371         * page/Frame.h: Tweaked a few comments and functions related to selection.
3372         * page/Frame.cpp: (WebCore::Frame::dragCaret): Made non-const.
3373
3374         * dom/Document.cpp: (WebCore::Document::notifyBeforeNodeRemoval):
3375         Call nodeWillBeRemoved on the two selection controllers before removing
3376         a node from the document.
3377
3378         * editing/SelectionController.h: Tweak formatting. Remove MutationListener
3379         class and m_mutationListener field.
3380         * editing/SelectionController.cpp:
3381         (WebCore::SelectionController::SelectionController): Remove code to set up
3382         the mutation event listener.
3383         (WebCore::SelectionController::setSelection): Remove code to maintain the
3384         mutation event listener.
3385
3386         * html/HTMLElement.cpp:
3387         (WebCore::HTMLElement::setInnerHTML): In cases where the container has only a
3388         single child use replaceChild, and in cases where the HTML being inserted
3389         also has only a single child and both are text nodes use setData. It's common
3390         to use setInnerHTML to set something that's just text.
3391         (WebCore::HTMLElement::setInnerText): Same as above, but simpler since the
3392         thing we're replacing with is always text.
3393
3394 2006-04-16  Kevin Ollivier  <kevino@theolliviers.com>
3395
3396         Reviewed by Darin.
3397
3398         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8417
3399           make-css-file-arrays.pl hangs when run on Linux
3400
3401         * css/make-css-file-arrays.pl: Remove the "-" parameter from the invocation of cpp,
3402         which means "send output to stdout". It's optional on Mac OS X, and is causing a
3403         hang on Linux.
3404         * rendering/RenderArena.cpp: Added a missing include of <assert.h>.
3405
3406 2006-04-15  Darin Adler  <darin@apple.com>
3407
3408         - removed references to a couple files that are obsolete
3409           but were still in the Windows project file
3410
3411         * WebCore.vcproj/WebCore/WebCore.vcproj: Remove kjs_views.h and .cpp.
3412
3413 2006-04-15  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3414
3415         Reviewed by Maciej.
3416
3417         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8405
3418           REGRESSION: Web Inspector's Style pane is blank
3419
3420         * bindings/js/kjs_window.cpp:
3421         (KJS::Window::isSafeScript): Use isEmpty() instead of isNull() for checking
3422         the domain to determine if the document in a local file. 
3423
3424 2006-04-14  David Hyatt  <hyatt@apple.com>
3425
3426         CSS vendor-specific property/value cleanup.  Properly qualify background-clip,
3427         background-origin, border-image and the border-radius properties.  Make sure
3428         our overflow extensions of marquee and overlay are qualified as well.  Rename
3429         the -khtml- extension to -webkit.
3430
3431         Reviewed by beth
3432
3433         * bindings/js/kjs_css.cpp:
3434         (KJS::cssPropertyName):
3435         * bindings/objc/DOMCSS.mm:
3436         (-[DOMCSSStyleDeclaration _fontSizeDelta]):
3437         (-[DOMCSSStyleDeclaration _setFontSizeDelta:]):
3438         * bindings/objc/DOMHTML.mm:
3439         (-[DOMHTMLInputElement _setAutofilled:]):
3440         * bridge/mac/FrameMac.h:
3441         * bridge/mac/FrameMac.mm:
3442         * css/CSSComputedStyleDeclaration.cpp:
3443         (WebCore::):
3444         (WebCore::valueForTextAlign):
3445         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3446         * css/CSSGrammar.y:
3447         * css/CSSPropertyNames.in:
3448         * css/CSSValueKeywords.in:
3449         * css/css_base.cpp:
3450         (WebCore::CSSSelector::extractPseudoType):
3451         * css/css_valueimpl.cpp:
3452         (WebCore::):
3453         * css/css_valueimpl.h:
3454         * css/cssparser.cpp:
3455         (WebCore::CSSParser::parseRule):
3456         (WebCore::CSSParser::parseValue):
3457         (WebCore::CSSParser::parseColor):
3458         (WebCore::CSSParser::parseDeclaration):
3459         (WebCore::CSSParser::parseBackgroundShorthand):
3460         (WebCore::CSSParser::parseBackgroundColor):
3461         (WebCore::CSSParser::parseBackgroundProperty):
3462         (WebCore::CSSParser::parseFontFamily):
3463         (WebCore::CSSParser::parseShadow):
3464         * css/cssstyleselector.cpp:
3465         (WebCore::CSSStyleSelector::applyDeclarations):
3466         (WebCore::CSSStyleSelector::applyProperty):
3467         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
3468         * css/cssstyleselector.h:
3469         * css/html4.css:
3470         * css/quirks.css:
3471         * css/tokenizer.flex:
3472         * editing/ApplyStyleCommand.cpp:
3473         (WebCore::StyleChange::init):
3474         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
3475         (WebCore::ApplyStyleCommand::removeInlineStyle):
3476         * editing/CompositeEditCommand.cpp:
3477         (WebCore::blockPlaceholderClassString):
3478         * editing/JSEditor.cpp:
3479         * editing/ReplaceSelectionCommand.cpp:
3480         (WebCore::ReplaceSelectionCommand::fixupNodeStyles):
3481         (WebCore::styleForNode):
3482         * editing/htmlediting.cpp:
3483         (WebCore::rebalanceWhitespaceInTextNode):
3484         * html/HTMLElement.cpp:
3485         (WebCore::HTMLElement::addHTMLAlignment):
3486         (WebCore::HTMLElement::setContentEditable):
3487         * html/html_blockimpl.cpp:
3488         (WebCore::HTMLDivElement::parseMappedAttribute):
3489         (WebCore::HTMLParagraphElement::parseMappedAttribute):
3490         (WebCore::HTMLMarqueeElement::parseMappedAttribute):
3491         * html/html_inlineimpl.cpp:
3492         (WebCore::HTMLFontElement::parseMappedAttribute):
3493         * html/html_tableimpl.cpp:
3494         (WebCore::HTMLTablePartElement::parseMappedAttribute):
3495         (WebCore::HTMLTableCellElement::parseMappedAttribute):
3496         * page/Frame.cpp:
3497         (WebCore::Frame::canMouseDownStartSelect):
3498         * page/Frame.h:
3499         * rendering/RenderObject.cpp:
3500         (WebCore::RenderObject::draggableNode):
3501
3502 2006-04-14  Eric Seidel  <eseidel@apple.com>
3503
3504         Reviewed by beth.
3505
3506         Fix win32 build.
3507
3508         * WebCore.vcproj/WebCore/WebCore.vcproj:
3509         * page/FramePrivate.h:
3510
3511 2006-04-04  Eric Seidel  <eseidel@apple.com>
3512
3513         Reviewed by darin.
3514
3515         Fix build-warnings in cairo code.
3516         http://bugzilla.opendarwin.org/show_bug.cgi?id=8176
3517
3518         * platform/cairo/cairo/src/cairo-win32-surface.c:
3519         (_cairo_win32_print_gdi_error):
3520         (_cairo_win32_surface_create_for_dc):
3521         (_composite_alpha_blend):
3522         (cairo_win32_surface_create):
3523         * platform/cairo/pixman/src/iccolor.c:
3524         (pixman_pixel_to_color):
3525
3526 2006-04-14  David Hyatt  <hyatt@apple.com>
3527
3528         Fix for 8333, make sure newlines in whitespace:pre (and friends) get
3529         line boxes created for them.  This resolves all the weird selection/navigation
3530         issues that arise by not creating lines (and thus not having navigable positions
3531         on those lines).
3532
3533         This checkin is also removing all of the layout test hacks that have piled
3534         up, so layout test results are being regenerated completely.
3535
3536         Reviewed by eric
3537
3538         * dom/Position.cpp:
3539         (WebCore::Position::downstream):
3540         * editing/CompositeEditCommand.cpp:
3541         (WebCore::CompositeEditCommand::moveParagraph):
3542         * editing/DeleteSelectionCommand.cpp:
3543         (WebCore::DeleteSelectionCommand::doApply):
3544         * editing/visible_units.cpp:
3545         (WebCore::startOfParagraph):
3546         (WebCore::endOfParagraph):
3547         * kwq/RenderTreeAsText.cpp:
3548         (getTagName):
3549         (operator<<):
3550         * rendering/InlineTextBox.cpp:
3551         (WebCore::InlineTextBox::selectionState):
3552         (WebCore::InlineTextBox::isLineBreak):
3553         (WebCore::InlineTextBox::nodeAtPoint):
3554         (WebCore::InlineTextBox::paint):
3555         (WebCore::InlineTextBox::offsetForPosition):
3556         (WebCore::InlineTextBox::positionForOffset):
3557         * rendering/InlineTextBox.h:
3558         * rendering/RenderBR.cpp:
3559         * rendering/RenderBR.h:
3560         * rendering/RenderText.cpp:
3561         (WebCore::RenderText::atLineWrap):
3562         (WebCore::RenderText::caretRect):
3563         (WebCore::RenderText::height):
3564         (WebCore::RenderText::inlineBox):
3565         * rendering/bidi.cpp:
3566         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
3567         (WebCore::RenderBlock::layoutInlineChildren):
3568         (WebCore::RenderBlock::findNextLineBreak):
3569         * rendering/render_line.h:
3570         (WebCore::InlineBox::isLineBreak):
3571
3572 2006-04-13  Darin Adler  <darin@apple.com>
3573
3574         Reviewed by Geoff.
3575
3576         - moved a few things out of kwq and cleaned up the
3577           Java-applet-related renderers
3578
3579         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for file location
3580         and name changes.
3581         * WebCore.xcodeproj/project.pbxproj: Ditto.
3582
3583         * kwq/JavaAppletWidget.h: Moved.
3584         * kwq/JavaAppletWidget.mm: Moved.
3585         * kwq/RegularExpression.cpp: Moved.
3586         * kwq/RegularExpression.h: Moved.
3587         * kwq/RenderTreeAsText.cpp: Moved.
3588         * kwq/RenderTreeAsText.h: Moved.
3589         * rendering/render_applet.cpp: Moved.
3590         * rendering/render_applet.h: Moved.
3591
3592         * bridge/JavaAppletWidget.h: Moved here.
3593         * bridge/mac/JavaAppletWidget.mm: Moved here.
3594         * platform/RegularExpression.cpp: Moved here.
3595         * platform/RegularExpression.h: Moved here.
3596         * rendering/RenderTreeAsText.cpp: Moved here.
3597         * rendering/RenderTreeAsText.h: Moved here.
3598
3599         * rendering/RenderApplet.h: Moved here and made changes.
3600         Removed unused element() function.
3601         * rendering/RenderApplet.cpp: Moved here and made changes.
3602         (WebCore::RenderApplet::RenderApplet): Changed parameter type to
3603         be more precise (HTMLAppletElement).
3604         (WebCore::RenderApplet::intrinsicWidth): Removed unnecessary type
3605         cast and simplified.
3606         (WebCore::RenderApplet::intrinsicHeight): Ditto.
3607         (WebCore::RenderApplet::createWidgetIfNecessary): Straightened out
3608         the if statements and changed to use node() instead of element().
3609         (WebCore::RenderApplet::layout): Removed unneeded check before
3610         calling createWidgetIfNecessary.
3611
3612         * rendering/RenderEmptyApplet.h: Moved here and made changes.
3613         Removed unneeded overrides of intrinsicWidth and intrinsicHeight.
3614         * rendering/RenderEmptyApplet.cpp: Moved here and made changes.
3615         (WebCore::RenderEmptyApplet::RenderEmptyApplet): Added code to
3616         set the intrinsic width and height.
3617
3618         * rendering/render_replaced.cpp:
3619         (WebCore::RenderWidget::RenderWidget): Initialize m_widget
3620         with contructor syntax.
3621         (WebCore::RenderWidget::paint): Changed _tx and _ty to be just
3622         tx and ty. Rearranged the code so the transparent wash will draw
3623         even if m_widget is 0.
3624
3625         * html/html_objectimpl.cpp: Update includes for new file names.
3626
3627 2006-04-12  Geoffrey Garen  <ggaren@apple.com>
3628
3629         Reviewed by Darin.
3630
3631         - Fixed <rdar://problem/4478467> document.defaultView should return 
3632         the window object
3633         
3634         Also made part of the window object autogenerated by IDL file.
3635         
3636         * DerivedSources.make: Added /page to IDL file search path, added
3637         JSDOMWindow.h, removed kjs_views.lut.h
3638         * WebCore.xcodeproj/project.pbxproj: Added missing files, removed
3639         obsolete files
3640         * bindings/js/kjs_dom.cpp:
3641         * bindings/js/kjs_events.cpp:
3642         * bindings/js/kjs_proxy.cpp:
3643         (WebCore::KJSProxy::initScriptIfNeeded):
3644         * bindings/js/kjs_views.cpp: Removed.
3645         * bindings/js/kjs_views.h: Removed.
3646         * bindings/js/kjs_window.cpp: Removed document property -- it now
3647         belongs to JSDOMWindow. Added toJS and toDOMWindow.
3648         (KJS::Window::Window):
3649         (KJS::Window::impl):
3650         (KJS::Window::getValueProperty):
3651         (KJS::Window::clear): Added call to setPrototype to ensure
3652         that the prototype gets cleared during navigation. (Previously
3653         this wasn't an issue because the window object had no real prototype.)
3654         (WebCore::toJS):
3655         (WebCore::toDOMWindow):
3656         * bindings/js/kjs_window.h:
3657         (KJS::Window::):
3658         * bindings/objc/DOMCSS.mm: Added NULL checks for the AbstractView
3659         (Presumably this is an issue after the window is closed.) Typedef-ed
3660         AbstractView as DOMWindow. I could have just replaced AbstractView
3661         with DOMWindow, but I think it's clearer to say, "There's this thing
3662         called the AbstractView, but really it's just the window."
3663         (-[DOMDocument getComputedStyle::]):
3664         (-[DOMDocument getMatchedCSSRules::]):
3665         * bindings/objc/DOMViews.mm:
3666         * bindings/objc/DOMViewsInternal.h:
3667         * bindings/scripts/CodeGeneratorJS.pm: Removed unused
3668         GetLegacyImplementationIncludes. Added support for DOMWindow and new
3669         "DoNotCache" attribute. Replaced C macros with text because (1) it
3670         makes the generated source easier to read and debug and (2) it made 
3671         it much easier to implement the DoNotCache attribute.
3672         * bindings/scripts/IDLParser.pm: Return a hash reference instead of
3673         a hash, because otherwise an interface with more than one attribute
3674         returns too many arguments to be processed.
3675         * bridge/mac/FrameMac.mm:
3676         * dom/AbstractView.cpp: Removed.
3677         * dom/AbstractView.h: Removed.
3678         * dom/Document.cpp:
3679         (WebCore::Document::Document):
3680         (WebCore::Document::defaultView):
3681         * dom/Document.h:
3682         * dom/Document.idl:
3683         * dom/KeyboardEvent.idl:
3684         * dom/MouseEvent.idl:
3685         * dom/Position.cpp:
3686         * dom/UIEvent.idl:
3687         * dom/dom2_eventsimpl.h:
3688         * page/DOMWindow.cpp: Added.
3689         (WebCore::DOMWindow::DOMWindow):
3690         (WebCore::DOMWindow::frame):
3691         (WebCore::DOMWindow::disconnectFrame):
3692         (WebCore::DOMWindow::document):
3693         (WebCore::DOMWindow::getComputedStyle):
3694         (WebCore::DOMWindow::getMatchedCSSRules):
3695         * page/DOMWindow.h: Added.
3696         * page/DOMWindow.idl: Added.
3697         * page/Frame.cpp:
3698         (WebCore::Frame::~Frame): Disconnect the new DOMWindow object in
3699         addition to the Window object. Maybe we can unify this in the future.
3700         (WebCore::Frame::tree):
3701         (WebCore::Frame::domWindow):
3702         * page/Frame.h:
3703         * page/FramePrivate.h:
3704
3705 2006-04-13  Alexey Proskuryakov  <ap@nypop.com>
3706
3707         Reviewed by Darin.
3708
3709         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7602
3710         Only use fixupChar for entities
3711
3712         * html/HTMLTokenizer.cpp: Only use fixUpChar() when handling entities.
3713         (WebCore::HTMLTokenizer::parseSpecial):
3714         (WebCore::HTMLTokenizer::parseText):
3715         (WebCore::HTMLTokenizer::parseTag):
3716         (WebCore::HTMLTokenizer::write):
3717         * platform/StreamingTextDecoder.cpp:
3718         (WebCore::StreamingTextDecoder::convert): Remove the special case for Latin-1, because it is already handled 
3719         via effectiveEncoding().
3720         * platform/StreamingTextDecoder.h: Remove convertLatin1().
3721
3722 2006-04-13  Darin Adler  <darin@apple.com>
3723
3724         * platform/mac/GraphicsContextMac.mm: Fix one no-SVG compile problem by adding
3725         a "using namespace std".
3726
3727 2006-04-12  Darin Adler  <darin@apple.com>
3728
3729         Rubber-stamped by Anders.
3730
3731         - fix Windows build
3732
3733         * WebCore.vcproj/Image\ Viewer/Image\ Viewer.vcproj: Add loader directory.
3734
3735         - use std::min/max exclusively intead of kMin/Max
3736         - eliminate KWQDef.h since all it had left in it was kMin/Max
3737
3738         * WebCore.vcproj/WebCore/WebCore.vcproj: Remove KWQDef.h.
3739         * WebCore.xcodeproj/project.pbxproj: Ditto.
3740
3741         * kwq/KWQDef.h: Removed.
3742
3743         * bridge/mac/FrameMac.mm:
3744         (WebCore::FrameMac::attributedString):
3745         * bridge/mac/WebCoreFrameBridge.mm:
3746         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
3747         * css/cssstyleselector.cpp:
3748         (WebCore::CSSStyleSelector::applyProperty):
3749         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
3750         (WebCore::CSSStyleSelector::fontSizeForKeyword):
3751         * dom/Document.cpp:
3752         (WebCore::Document::minimumLayoutDelay):
3753         (WebCore::Document::addMarker):
3754         * dom/StyledElement.cpp:
3755         (WebCore::StyledElement::addCSSColor):
3756         * dom/xml_tokenizer.cpp:
3757         (WebCore::OffsetBuffer::readOutBytes):
3758         * editing/ApplyStyleCommand.cpp:
3759         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
3760         * editing/CompositeEditCommand.cpp:
3761         (WebCore::CompositeEditCommand::deleteInsignificantText):
3762         * editing/TextIterator.cpp:
3763         (WebCore::TextIterator::handleTextNode):
3764         (WebCore::TextIterator::handleTextBox):
3765         (WebCore::CharacterIterator::string):
3766         (WebCore::findPlainText):
3767         * editing/htmlediting.cpp:
3768         (WebCore::rangeCompliantEquivalent):
3769         * editing/markup.cpp:
3770         (WebCore::renderedText):
3771         * editing/visible_units.cpp:
3772         (WebCore::startOfParagraph):
3773         * html/HTMLSelectElement.cpp:
3774         (WebCore::HTMLSelectElement::parseMappedAttribute):
3775         * html/HTMLTokenizer.cpp:
3776         (WebCore::HTMLTokenizer::parseComment):
3777         (WebCore::HTMLTokenizer::parseEntity):
3778         (WebCore::HTMLTokenizer::parseTag):
3779         (WebCore::HTMLTokenizer::enlargeBuffer):
3780         (WebCore::HTMLTokenizer::enlargeScriptBuffer):
3781         * html/html_imageimpl.cpp:
3782         (WebCore::HTMLAreaElement::getRegion):
3783         * html/html_tableimpl.cpp:
3784         (WebCore::HTMLTableElement::parseMappedAttribute):
3785         * ksvg2/css/SVGCSSParser.cpp:
3786         (WebCore::CSSParser::parseSVGPaint):
3787         (WebCore::CSSParser::parseSVGColor):
3788         * kwq/KWQComboBox.mm:
3789         (QComboBox::sizeHint):
3790         * kwq/KWQListBox.mm:
3791         (QListBox::sizeForNumberOfLines):
3792         * kwq/KWQSlider.mm:
3793         (QSlider::setValue):
3794         * loader/Cache.cpp:
3795         (WebCore::Cache::setSize):
3796         * page/Frame.cpp:
3797         (WebCore::Frame::forceLayoutWithPageWidthRange):
3798         * platform/DeprecatedPtrListImpl.h:
3799         * platform/DeprecatedString.cpp:
3800         (ucstrcmp):
3801         * platform/DeprecatedString.h:
3802         * platform/DeprecatedValueListImpl.h:
3803         * platform/mac/GraphicsContextMac.mm:
3804         (WebCore::GraphicsContext::addRoundedRectClip):
3805         * platform/mac/WebCoreTextArea.mm:
3806         (-[WebCoreTextView _trackResizeFromMouseDown:]):
3807         * rendering/InlineTextBox.cpp:
3808         (WebCore::InlineTextBox::isSelected):
3809         (WebCore::InlineTextBox::selectionRect):
3810         (WebCore::InlineTextBox::placeEllipsisBox):
3811         (WebCore::InlineTextBox::selectionStartEnd):
3812         (WebCore::InlineTextBox::paintMarkedTextBackground):
3813         (WebCore::InlineTextBox::paintSpellingMarker):
3814         (WebCore::InlineTextBox::paintTextMatchMarker):
3815         (WebCore::InlineTextBox::paintMarkedTextUnderline):
3816         * rendering/RenderBlock.cpp:
3817         (WebCore::RenderBlock::overflowRect):
3818         (WebCore::RenderBlock::layoutBlock):
3819         (WebCore::RenderBlock::collapseMargins):
3820         (WebCore::RenderBlock::clearFloatsIfNeeded):
3821         (WebCore::RenderBlock::estimateVerticalPosition):
3822         (WebCore::RenderBlock::determineHorizontalPosition):
3823         (WebCore::RenderBlock::setCollapsedBottomMargin):
3824         (WebCore::RenderBlock::handleBottomOfBlock):
3825         (WebCore::RenderBlock::layoutBlockChildren):
3826         (WebCore::RenderBlock::fillVerticalSelectionGap):
3827         (WebCore::RenderBlock::fillLeftSelectionGap):
3828         (WebCore::RenderBlock::fillRightSelectionGap):
3829         (WebCore::RenderBlock::positionNewFloats):
3830         (WebCore::RenderBlock::nearestFloatBottom):
3831         (WebCore::RenderBlock::lowestPosition):
3832         (WebCore::RenderBlock::rightmostPosition):
3833         (WebCore::RenderBlock::leftmostPosition):
3834         (WebCore::RenderBlock::getClearDelta):
3835         (WebCore::RenderBlock::calcMinMaxWidth):
3836         (WebCore::RenderBlock::calcInlineMinMaxWidth):
3837         (WebCore::RenderBlock::calcBlocminMaxWidth):
3838         * rendering/RenderBlock.h:
3839         * rendering/RenderBox.cpp:
3840         (WebCore::RenderBox::calcBorderBoxWidth):
3841         (WebCore::RenderBox::calcBorderBoxHeight):
3842         (WebCore::RenderBox::calcContentBoxWidth):
3843         (WebCore::RenderBox::calcContentBoxHeight):
3844         (WebCore::RenderBox::paintRootBoxDecorations):
3845         (WebCore::RenderBox::paintBoxDecorations):
3846         (WebCore::RenderBox::calcWidth):
3847         (WebCore::RenderBox::calcWidthUsing):
3848         (WebCore::RenderBox::calcHeight):
3849         (WebCore::RenderBox::calcPercentageHeight):
3850         (WebCore::RenderBox::calcReplacedWidth):
3851         (WebCore::RenderBox::calcReplacedHeight):
3852         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
3853         (WebCore::RenderBox::calcAbsoluteVerticalValues):
3854         * rendering/RenderCanvas.cpp:
3855         (WebCore::RenderCanvas::layout):
3856         * rendering/RenderFlexibleBox.cpp:
3857         (WebCore::RenderFlexibleBox::calcMinMaxWidth):
3858         (WebCore::RenderFlexibleBox::layoutHorizontalBox):
3859         (WebCore::RenderFlexibleBox::layoutVerticalBox):
3860         (WebCore::RenderFlexibleBox::allowedChildFlex):
3861         * rendering/RenderFlow.cpp:
3862         (WebCore::RenderFlow::paintLines):
3863         (WebCore::RenderFlow::lowestPosition):
3864         (WebCore::RenderFlow::rightmostPosition):
3865         (WebCore::RenderFlow::leftmostPosition):
3866         (WebCore::RenderFlow::paintOutlineForLine):
3867         * rendering/RenderImage.cpp:
3868         (WebCore::RenderImage::imageChanged):
3869         (WebCore::RenderImage::calcReplacedWidth):
3870         (WebCore::RenderImage::calcReplacedHeight):
3871         * rendering/RenderLayer.cpp:
3872         (WebCore::RenderLayer::scrollRectToVisible):
3873         (WebCore::RenderLayer::computeScrollDimensions):
3874         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
3875         (WebCore::RenderLayer::absoluteBoundingBox):
3876         (WebCore::Marquee::marqueeSpeed):
3877         (WebCore::Marquee::computePosition):
3878         (WebCore::Marquee::timerFired):
3879         * rendering/RenderObject.cpp:
3880         (WebCore::RenderObject::drawBorder):
3881         (WebCore::RenderObject::paintBorderImage):
3882         (WebCore::RenderObject::paintBorder):
3883         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
3884         * rendering/RenderTable.cpp:
3885         (WebCore::RenderTable::calcWidth):
3886         (WebCore::RenderTable::layout):
3887         (WebCore::RenderTable::paintBoxDecorations):
3888         * rendering/RenderTableCell.cpp:
3889         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3890         * rendering/RenderTableSection.cpp:
3891         (WebCore::RenderTableSection::layoutRows):
3892         (WebCore::RenderTableSection::lowestPosition):
3893         (WebCore::RenderTableSection::rightmostPosition):
3894         (WebCore::RenderTableSection::leftmostPosition):
3895         * rendering/RenderText.cpp:
3896         (WebCore::RenderText::caretRect):
3897         (WebCore::RenderText::calcMinMaxWidth):
3898         (WebCore::RenderText::minXPos):
3899         (WebCore::RenderText::width):
3900         (WebCore::RenderText::caretMinOffset):
3901         (WebCore::RenderText::caretMaxOffset):
3902         * rendering/bidi.cpp:
3903         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
3904         (WebCore::RenderBlock::layoutInlineChildren):
3905         (WebCore::RenderBlock::checkLinesForOverflow):
3906         * rendering/render_form.cpp:
3907         (WebCore::RenderLineEdit::setSelectionStart):
3908         (WebCore::RenderLineEdit::setSelectionEnd):
3909         (WebCore::RenderLineEdit::setSelectionRange):
3910         (WebCore::RenderFieldset::layoutLegend):
3911         (WebCore::RenderFieldset::paintBoxDecorations):
3912         (WebCore::RenderSelect::layout):
3913         (WebCore::RenderTextArea::calcMinMaxWidth):
3914         (WebCore::RenderSlider::updateFromElement):
3915         * rendering/render_frames.cpp:
3916         (WebCore::RenderFrameSet::layout):
3917         * rendering/render_line.cpp:
3918         (WebCore::InlineFlowBox::placeBoxesHorizontally):
3919         (WebCore::InlineFlowBox::verticallyAlignBoxes):
3920         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
3921         (WebCore::InlineFlowBox::placeBoxesVertically):
3922         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
3923         * rendering/render_line.h:
3924         (WebCore::RootInlineBox::selectionHeight):
3925         * rendering/render_list.cpp:
3926         (WebCore::RenderListItem::positionListMarker):
3927         * rendering/render_replaced.cpp:
3928         (WebCore::RenderReplaced::shouldPaint):
3929         * rendering/table_layout.cpp:
3930         (WebCore::FixedTableLayout::calcMinMaxWidth):
3931         (WebCore::AutoTableLayout::recalcColumn):
3932         (WebCore::AutoTableLayout::calcMinMaxWidth):
3933         (WebCore::AutoTableLayout::calcEffectiveWidth):
3934         (WebCore::AutoTableLayout::layout):
3935         Use min/max instead of kMin/kMax.
3936
3937 2006-04-12  Darin Adler  <darin@apple.com>
3938
3939         Rubber-stamped by Anders.
3940
3941         - get ready for some more de-KWQ-ing done by the renaming script in two ways
3942             1) stop using forwarding headers for things within WebCore
3943             2) remove a bit of unused stuff
3944
3945         * loader/CachedImage.h:
3946         * loader/CachedImage.cpp:
3947         * loader/DocLoader.cpp:
3948         * loader/DocLoader.h:
3949         * page/Frame.cpp:
3950         * xml/XSLTProcessor.cpp:
3951         Removed unused showAnimations functions and data. We can add back later if we need it.
3952         And if we do, we won't use a typedef from KHTMLSettings.
3953
3954         * ForwardingHeaders/java: Removed.
3955         * ForwardingHeaders/java/kjavaappletwidget.h: Removed.
3956         * ForwardingHeaders/khtml_settings.h: Removed.
3957         * ForwardingHeaders/kio: Removed.
3958         * ForwardingHeaders/kio/global.h: Removed.
3959         * ForwardingHeaders/ksslkeygen.h: Removed.
3960         * ForwardingHeaders/q3ptrlist.h: Removed.
3961         * ForwardingHeaders/q3valuelist.h: Removed.
3962         * ForwardingHeaders/qcombobox.h: Removed.
3963         * ForwardingHeaders/qfontmetrics.h: Removed.
3964         * ForwardingHeaders/qlineedit.h: Removed.
3965         * ForwardingHeaders/qmatrix.h: Removed.
3966         * ForwardingHeaders/qptrlist.h: Removed.
3967         * ForwardingHeaders/qptrqueue.h: Removed.
3968         * ForwardingHeaders/qregexp.h: Removed.
3969         * ForwardingHeaders/qscrollbar.h: Removed.
3970         * ForwardingHeaders/qtextedit.h: Removed.
3971         * ForwardingHeaders/qtextstream.h: Removed.
3972         * ForwardingHeaders/qvaluelist.h: Removed.
3973         * ForwardingHeaders/qwmatrix.h: Removed.
3974
3975         * WebCore+SVG/DOMList.h:
3976         * bindings/js/kjs_dom.cpp:
3977         * bindings/js/kjs_dom.h:
3978         * bindings/js/kjs_window.cpp:
3979         * css/css_stylesheetimpl.h:
3980         * css/css_valueimpl.cpp:
3981         * css/css_valueimpl.h:
3982         * css/cssstyleselector.cpp:
3983         * dom/CharacterData.cpp:
3984         * dom/Document.cpp:
3985         * dom/Document.h:
3986         * dom/EventTargetNode.cpp:
3987         * dom/Node.cpp:
3988         * editing/BreakBlockquoteCommand.h:
3989         * editing/htmlediting.cpp:
3990         * html/FormDataList.h:
3991         * html/HTMLKeygenElement.cpp:
3992         * html/HTMLTokenizer.h:
3993         * html/html_objectimpl.cpp:
3994         * kcanvas/KCanvasFilters.cpp:
3995         * kcanvas/KCanvasMatrix.cpp:
3996         * kcanvas/KCanvasMatrix.h:
3997         * kcanvas/KCanvasPath.cpp:
3998         * kcanvas/KCanvasPath.h:
3999         * kcanvas/KCanvasResources.cpp:
4000         * kcanvas/KCanvasTreeDebug.h:
4001         * kcanvas/RenderForeignObject.h:
4002         * kcanvas/RenderPath.h:
4003         * kcanvas/RenderSVGImage.h:
4004         * kcanvas/RenderSVGText.h:
4005         * kcanvas/device/KRenderingPaintServerGradient.cpp:
4006         * kcanvas/device/KRenderingPaintServerPattern.cpp:
4007         * kcanvas/device/KRenderingPaintServerSolid.cpp:
4008         * kcanvas/device/quartz/KCanvasItemQuartz.h:
4009         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
4010         * ksvg2/svg/SVGColor.cpp:
4011         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
4012         * ksvg2/svg/SVGDocument.h:
4013         * ksvg2/svg/SVGFEBlendElement.cpp:
4014         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
4015         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
4016         * ksvg2/svg/SVGFECompositeElement.cpp:
4017         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
4018         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
4019         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
4020         * ksvg2/svg/SVGFELightElement.cpp:
4021         * ksvg2/svg/SVGFEMergeElement.cpp:
4022         * ksvg2/svg/SVGFEOffsetElement.cpp:
4023         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
4024         * ksvg2/svg/SVGFETileElement.cpp:
4025         * ksvg2/svg/SVGFETurbulenceElement.cpp:
4026         * ksvg2/svg/SVGFitToViewBox.cpp:
4027         * ksvg2/svg/SVGLengthList.cpp:
4028         * ksvg2/svg/SVGMatrix.h:
4029         * ksvg2/svg/SVGNumberList.cpp:
4030         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
4031         * ksvg2/svg/SVGSVGElement.cpp:
4032         * ksvg2/svg/SVGStringList.cpp:
4033         * ksvg2/svg/SVGStyledElement.h:
4034         * ksvg2/svg/SVGStyledTransformableElement.cpp:
4035         * ksvg2/svg/SVGTransformable.cpp:
4036         * ksvg2/svg/SVGURIReference.h:
4037         * ksvg2/svg/svgpathparser.cpp:
4038         * kwq/KWQKHTMLSettings.h:
4039         * loader/Cache.h:
4040         * loader/CachedObject.h:
4041         * loader/Decoder.cpp:
4042         * loader/FormData.h:
4043         * loader/loader.h:
4044         * page/Frame.h:
4045         * page/FramePrivate.h:
4046         * platform/Font.cpp:
4047         * platform/SegmentedString.h:
4048         * platform/mac/FontMac.mm:
4049         * platform/mac/WebCoreTextField.mm:
4050         * rendering/RenderBlock.cpp:
4051         * rendering/RenderObject.cpp:
4052         * rendering/RenderTable.cpp:
4053         * rendering/RenderTableCell.cpp:
4054         * rendering/RenderTableCol.cpp:
4055         * rendering/RenderTableSection.cpp:
4056         * rendering/bidi.h:
4057         * rendering/break_lines.cpp:
4058         * rendering/render_applet.cpp:
4059         * rendering/render_form.cpp:
4060         * rendering/render_form.h:
4061         * rendering/render_frames.cpp:
4062         * rendering/render_style.h:
4063         * xml/xmlhttprequest.cpp:
4064         Updated includes.
4065
4066         * WebCore.xcodeproj/project.pbxproj: Resorted a couple things.
4067
4068 2006-04-12  Adele Peterson  <adele@apple.com>
4069
4070         Reviewed by Darin and Tim O.
4071
4072         WebCore part of fix for:
4073         http://bugzilla.opendarwin.org/show_bug.cgi?id=8061
4074         REGRESSION: New text fields need to send callbacks used by autocomplete
4075
4076         Fix for:
4077         http://bugzilla.opendarwin.org/show_bug.cgi?id=8156
4078         FrameMac::submitForm is busted after Vector changes
4079
4080         * bindings/objc/DOMHTML.mm:
4081