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