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