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