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