1 2008-01-03 Dan Bernstein <mitz@apple.com>
3 Reviewed by Darin Adler.
5 - fix http://bugs.webkit.org/show_bug.cgi?id=16548
6 <rdar://problem/5659452> REGRESSION(r28810): Font style and sizes are weird for Japanese text
8 * platform/graphics/win/FontCacheWin.cpp:
9 (WebCore::linkedFontEnumProc): Added. This callback is used to fetch
10 a valid LOGFONT for a given family.
11 (WebCore::getLinkedFonts): Added. Returns a vector of font families
12 linked to the given font family by the Windows registry key
13 HKLM\Software\...\FontLink\SystemLink. The registry values typically
14 differ based on the installed language version of Windows.
15 (WebCore::FontCache::getFontDataForCharacters): Changed to not use MLang
16 font mapping, which is Windows code page based, except for characters in
17 the range U+2000..U+200F. Instead, this function gets the font Uniscribe
18 would use for the character. However, that font might not actually
19 contain the character, in which case GDI font linking would substitute a
20 different font. Therefore, this function walks the linked font list
21 until it finds a font that actually contains the character.
23 2008-01-03 Darin Adler <darin@apple.com>
27 - fix http://bugs.webkit.org/show_bug.cgi?id=16723
28 tables/mozilla/bugs/bug30418.html test failing due to problems updating dynamic border rules
30 Test: fast/table/border-changes.html
32 * html/HTMLTableElement.h:
33 * html/HTMLTableElement.cpp:
34 (WebCore::HTMLTableElement::parseMappedAttribute): Check the border type before and after
35 parsing attributes, rather than doing this only for the rules attribute.
36 (WebCore::HTMLTableElement::cellBorders): Added.
37 (WebCore::HTMLTableElement::getSharedCellDecl): Changed to use cellBorders to factor out the
38 rule about what type of borders to use.
40 2008-01-02 Sam Weinig <sam@webkit.org>
44 Pass the prototype of WebCore JS objects up the constructor chain
45 rather than explicitly setting using setPrototype. This removes many
46 redundant settings of the prototype on construction. To avoid a CG
47 hazard, the prototype must be constructed before before calling the
48 constructor of the JS object.
50 - JS objects that inherit from DOMObject, which all bindings objects
51 (except Window) do, now can't implicitly have a jsNull prototype, but
52 must explicitly pass it up the construction chain.
54 * bindings/js/JSCSSRuleCustom.cpp:
56 * bindings/js/JSCSSValueCustom.cpp:
58 * bindings/js/JSDocumentCustom.cpp:
60 * bindings/js/JSEventCustom.cpp:
62 * bindings/js/JSEventTargetNode.cpp:
63 (WebCore::JSEventTargetNode::JSEventTargetNode):
64 * bindings/js/JSEventTargetNode.h:
65 * bindings/js/JSHTMLAllCollection.h:
66 (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
67 * bindings/js/JSHTMLAudioElementConstructor.cpp:
68 (WebCore::JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor):
69 * bindings/js/JSHTMLCollectionCustom.cpp:
70 (WebCore::getNamedItems):
72 * bindings/js/JSHTMLElementWrapperFactory.cpp:
73 (WebCore::createJSHTMLWrapper):
74 * bindings/js/JSHTMLFormElementCustom.cpp:
75 (WebCore::JSHTMLFormElement::nameGetter):
76 * bindings/js/JSHTMLInputElementBase.cpp:
77 (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
78 * bindings/js/JSHTMLInputElementBase.h:
79 * bindings/js/JSHTMLOptionElementConstructor.cpp:
80 (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
81 * bindings/js/JSLocation.cpp:
82 (WebCore::JSLocation::JSLocation):
83 * bindings/js/JSLocation.h:
84 * bindings/js/JSNamedNodesCollection.cpp:
85 (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
86 * bindings/js/JSNamedNodesCollection.h:
87 * bindings/js/JSNodeCustom.cpp:
89 * bindings/js/JSSVGElementWrapperFactory.cpp:
90 (WebCore::createJSSVGWrapper):
91 * bindings/js/JSSVGPathSegCustom.cpp:
93 * bindings/js/JSStyleSheetCustom.cpp:
95 * bindings/js/JSXMLHttpRequest.cpp:
96 (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
97 (KJS::JSXMLHttpRequestConstructorImp::construct):
98 (KJS::JSXMLHttpRequest::JSXMLHttpRequest):
99 * bindings/js/JSXMLHttpRequest.h:
100 * bindings/js/JSXSLTProcessor.cpp:
101 (KJS::JSXSLTProcessor::JSXSLTProcessor):
102 (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
103 (KJS::XSLTProcessorConstructorImp::implementsConstruct):
104 (KJS::XSLTProcessorConstructorImp::construct):
105 * bindings/js/JSXSLTProcessor.h:
106 * bindings/js/kjs_binding.h:
107 (KJS::DOMObject::DOMObject):
108 (KJS::cacheDOMObject):
109 (KJS::cacheSVGDOMObject):
110 * bindings/js/kjs_css.cpp:
111 (WebCore::JSRGBColor::JSRGBColor):
112 (WebCore::getJSRGBColor):
113 * bindings/js/kjs_css.h:
114 * bindings/js/kjs_events.cpp:
115 (WebCore::JSClipboard::JSClipboard):
117 * bindings/js/kjs_events.h:
118 * bindings/js/kjs_html.cpp:
119 (WebCore::ImageConstructorImp::ImageConstructorImp):
120 * bindings/js/kjs_navigator.cpp:
121 (KJS::Navigator::Navigator):
122 (KJS::PluginBase::PluginBase):
123 * bindings/js/kjs_navigator.h:
124 * bindings/js/kjs_window.cpp:
125 (KJS::Window::Window):
126 (KJS::Window::location):
127 (KJS::Window::getValueProperty):
128 * bindings/js/kjs_window.h:
129 * bindings/scripts/CodeGeneratorJS.pm:
131 2008-01-03 Holger Hans Peter Freyther <zecke@selfish.org>
135 -This is from http://bugs.webkit.org/show_bug.cgi?id=16115
137 Change the Gtk ContextMenuItem code to generate the GtkMenuItem
138 or GtkCheckMenuItem on the fly. Currently we will create a
139 GtkCheckMenuItem if the ContextMenuItem has been checked. What needs
140 to be done is to change WebCore to tell the platform code if an item
143 * platform/ContextMenuItem.h:
144 (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
145 * platform/gtk/ContextMenuGtk.cpp:
146 (WebCore::ContextMenu::appendItem):
147 * platform/gtk/ContextMenuItemGtk.cpp:
148 (WebCore::ContextMenuItem::ContextMenuItem):
149 (WebCore::ContextMenuItem::~ContextMenuItem):
150 (WebCore::ContextMenuItem::createNativeMenuItem):
151 (WebCore::ContextMenuItem::releasePlatformDescription):
152 (WebCore::ContextMenuItem::type):
153 (WebCore::ContextMenuItem::setType):
154 (WebCore::ContextMenuItem::action):
155 (WebCore::ContextMenuItem::setAction):
156 (WebCore::ContextMenuItem::platformSubMenu):
157 (WebCore::ContextMenuItem::setSubMenu):
158 (WebCore::ContextMenuItem::setChecked):
160 2008-01-03 Dan Bernstein <mitz@apple.com>
162 Rubber-stamped by Adam Roben.
164 - update the project hierarchy to match the on-disk organization of
165 the platform directory.
167 * WebCore.vcproj/WebCore.vcproj:
169 2008-01-03 Adam Roben <aroben@apple.com>
171 Fix a buffer overrun and a leak introduced in r29098
175 * platform/text/StringImpl.cpp:
176 (WebCore::StringImpl::StringImpl): Only allocate one buffer, and make
177 it be big enough to hold the string contents plus the null terminator.
179 2008-01-03 Simon Hausmann <hausmann@webkit.org>
183 Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.
187 2008-01-03 Alp Toker <alp@atoker.com>
189 Suggested by Mark Rowe.
191 Fix indentation and remove trailing whitespace.
193 * platform/network/curl/ResourceHandleManager.cpp:
195 2008-01-03 Luca Bruno <lethalman88@gmail.com>
197 Reviewed by Alp Toker.
199 Fix HTTP POST-based logins to sites like Facebook, GMail by ensuring
200 that the two POST methods don't conflict.
202 * platform/network/curl/ResourceHandleManager.cpp:
203 (WebCore::ResourceHandleManager::setupPOST):
205 2008-01-02 Darin Adler <darin@apple.com>
207 - touched some files to try to get the Windows buildbot building again
209 2008-01-02 Dan Bernstein <mitz@apple.com>
211 Reviewed by Sam Weinig.
213 - fix small caps rendering
215 Covered by an existing test,
217 * platform/graphics/win/FontDataWin.cpp:
218 (WebCore::FontData::smallCapsFontData):
220 2008-01-02 Antti Koivisto <antti@apple.com>
224 Calculate video position and size within the renderer box in WebCore. This
225 way the aspect ratio calculation is not needed in each MediaPlayer implementation.
227 This fixes video aspect ratio on Windows.
229 Covered by an existing pixel test.
231 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
232 (WebCore::MediaPlayerPrivate::createQTMovieView):
233 * rendering/RenderVideo.cpp:
234 (WebCore::RenderVideo::videoBox):
235 (WebCore::RenderVideo::paintReplaced):
236 (WebCore::RenderVideo::updatePlayer):
237 * rendering/RenderVideo.h:
239 2008-01-02 Ada Chan <adachan@apple.com>
243 * WebCore.vcproj/WebCore.vcproj:
245 2008-01-02 John Sullivan <sullivan@apple.com>
247 Reviewed by Dan Bernstein
249 - fixed <rdar://problem/5579010> REGRESSION: Safari inserts newlines in tab names when U+2028 is present
251 * loader/DocumentLoader.cpp:
252 (WebCore::canonicalizedTitle):
253 in the code that replaces control characters with white space, also replace the unicode line separator
254 and paragraph separator characters
256 2008-01-02 Darin Adler <darin@apple.com>
258 - fix buffer overruns seen on buildbot
260 * platform/text/StringImpl.cpp:
261 (WebCore::countCharacter): Added this.
262 (WebCore::StringImpl::toCoordsArray): Use countCharacter instead of incorrect find expression.
263 (WebCore::StringImpl::toLengthArray): Ditto.
264 (WebCore::StringImpl::replace): Added assertions.
266 2008-01-02 Darin Adler <darin@apple.com>
270 - fix http://bugs.webkit.org/show_bug.cgi?id=16657
271 Acid3 failure since table.caption and table.thead do not work for nodes added by appendChild
272 - fix http://bugs.webkit.org/show_bug.cgi?id=16659
273 Acid3 expects HTMLTableElement.rows to include a <tr> element that is an immediate child of the <table>
275 Tests: dom/html/level2/html/HTMLCollection07.html
276 dom/html/level2/html/HTMLCollection08.html
277 dom/html/level2/xhtml/HTMLCollection07.xhtml
278 dom/html/level2/xhtml/HTMLCollection08.xhtml
279 fast/dom/HTMLTableElement/early-acid3-65-excerpt.html
280 fast/dom/HTMLTableElement/early-acid3-66-excerpt.html
282 * GNUmakefile.am: Added HTMLTableRowsCollection.
283 * WebCore.pro: Ditto.
284 * WebCore.vcproj/WebCore.vcproj: Ditto.
285 * WebCore.xcodeproj/project.pbxproj: Ditto.
286 * WebCoreSources.bkl: Ditto.
288 * dom/XMLTokenizer.cpp: Took out stray include.
290 * html/HTMLCollection.cpp:
291 (WebCore::HTMLCollection::itemAfter): Removed all the table rows code, since we now use
292 a separate class for that collection. Also got rid of the distinct types for custom collections
293 that don't need them (use Other for both).
294 * html/HTMLCollection.h: Also made firstItem non-virtual because it doesn't need to be virtual.
296 * html/HTMLFormCollection.cpp:
297 (WebCore::HTMLFormCollection::HTMLFormCollection): Use Other instead of FormElements
298 for the HTMLCollection type.
300 * html/HTMLTableElement.cpp:
301 (WebCore::HTMLTableElement::HTMLTableElement): Eliminated m_head, m_foot, m_firstBody, and m_caption.
302 (WebCore::HTMLTableElement::caption): Added non-inline version. Finds the caption rather than
303 keeping a pointer to it.
304 (WebCore::HTMLTableElement::setCaption): Rewrote.
305 (WebCore::HTMLTableElement::tHead): Ditto.
306 (WebCore::HTMLTableElement::setTHead): Ditto.
307 (WebCore::HTMLTableElement::tFoot): Ditto.
308 (WebCore::HTMLTableElement::setTFoot): Ditto.
309 (WebCore::HTMLTableElement::createTHead): Ditto.
310 (WebCore::HTMLTableElement::deleteTHead): Ditto.
311 (WebCore::HTMLTableElement::createTFoot): Ditto.
312 (WebCore::HTMLTableElement::deleteTFoot): Ditto.
313 (WebCore::HTMLTableElement::createCaption): Ditto.
314 (WebCore::HTMLTableElement::deleteCaption): Ditto.
315 (WebCore::HTMLTableElement::lastBody): Added.
316 (WebCore::HTMLTableElement::insertRow): Rewrote to use a loop based on code in HTMLTableRowsCollection.
317 This is different from the old code mainly in how it handles rows outside any section.
318 (WebCore::HTMLTableElement::deleteRow): Ditto.
319 (WebCore::HTMLTableElement::addChild): Removed code to set the various members. Keeping pointers to
320 these was a possible source of serious bugs too, including crashes with stale pointers, although I
321 didn't write any test cases to prove those bugs existed.
322 (WebCore::HTMLTableElement::parseMappedAttribute): Changed the rules code to visit all cells, not
323 just the cells of the first body. I believe this fixed rendering on some table tests. I think the code
324 visits too many cells and also the use of recursion is overkill, but I didn't try to fix that.
325 (WebCore::HTMLTableElement::rows): Changed to use the new HTMLTableRowsCollection.
326 * html/HTMLTableElement.h: Changed functions to return PassRefPtr, which can be important if strange
327 things like DOM mutation events take things ot of the tree before they are safely referenced by
328 JavaScript wrappers. Also changed functions to take PassRefPtr and added exceptions. Removed unneeded
329 firstTBody and setTBody functions and childrenChanged function override, as well as unused Rules and
330 Frame enums. Removed m_head, m_foot, m_firstBody, and m_caption, and added lastBody function. Removed
331 unneeded friend declaration for HTMLTableCellElement.
332 * html/HTMLTableElement.idl: Allow the setteres for caption, tHead, and tFoot to raise exceptions.
334 * html/HTMLTableRowsCollection.cpp: Added. Implements the HTML 5 rule for which rows are in the
335 collection in which order.
336 * html/HTMLTableRowsCollection.h: Added.
338 * loader/FTPDirectoryDocument.cpp:
339 (WebCore::FTPDirectoryTokenizer::appendEntry): Use the standard insertRow function instead of
340 coming up with our own way of inserting a row. Simplifies things -- we can remove the code to
341 create a tbody element.
343 2008-01-02 Darin Adler <darin@apple.com>
345 Reviewed by Alice and Tim.
347 - try to fix GTK and Qt builds
349 * platform/win/ScrollViewWin.cpp:
350 (WebCore::ScrollView::scroll): Improve logic slightly for the case of
351 vertical scrolling when there's no vertical scroll bar.
353 * platform/gtk/ScrollViewGtk.cpp:
354 (WebCore::ScrollView::scroll): Copy the code from Windows. Maybe this
355 should be factored differently.
356 * platform/qt/ScrollViewQt.cpp:
357 (WebCore::ScrollView::scroll): Ditto.
359 2008-01-02 Darin Adler <darin@apple.com>
363 - http://bugs.webkit.org/show_bug.cgi?id=16712
364 change StringImpl to take and return PassRefPtr instead of raw pointers
366 Also eliminated use of const StringImpl. Since StringImpl is immutable there
367 is no distinction between a const and non-const one at the moment.
369 * WebCore.base.exp: Updated.
372 (WebCore::parseURL): Make String directly, not by making a StringImpl.
374 (WebCore::Attr::createTextChild): Convert AtomicString to String with domString,
376 (WebCore::Attr::setValue): Remove unneed call to impl() when passing a String
377 to a function that takes a String.
379 * dom/CDATASection.cpp: Removed unused constructor.
380 (WebCore::CDATASection::cloneNode): Added a now-needed .get().
381 (WebCore::CDATASection::createNew): Changed function to take a PassRefPtr.
382 * dom/CDATASection.h:
384 * dom/CharacterData.cpp:
385 (WebCore::CharacterData::CharacterData): Removed unneeded initialization and
386 ref() now that the string is a RefPtr. Also updated to not call "new StringImpl".
387 (WebCore::CharacterData::~CharacterData): Removed unneeded deref() since it's
389 (WebCore::CharacterData::setData): More of that.
390 (WebCore::CharacterData::substringData): Ditto.
391 (WebCore::CharacterData::appendData): Ditto.
392 (WebCore::CharacterData::insertData): Ditto.
393 (WebCore::CharacterData::deleteData): Ditto.
394 (WebCore::CharacterData::replaceData): Ditto.
395 (WebCore::CharacterData::nodeValue): Ditto.
396 (WebCore::CharacterData::dispatchModifiedEvent): Ditto.
397 (WebCore::CharacterData::dump): Ditto.
398 * dom/CharacterData.h: Changed to use a RefPtr. I could have used a String
399 instead, but since String adds extra branches to handle 0, I figured it was
400 more conservative to just use RefPtr. Later it would be good to figure out
401 which is preferred style and be more consistent. Maybe we'll phase out
402 StringImpl, or maybe we'll go the other way and use it more since it can be
405 * dom/DOMImplementation.cpp:
406 (WebCore::addString): Changed set to use String rather than StringImpl.
407 (WebCore::isSVG10Feature): Ditto.
408 (WebCore::isSVG11Feature): Ditto.
409 (WebCore::DOMImplementation::createDocument): Replaced custom code to
410 find a colon with a call to String::find.
413 (WebCore::Range::insertNode): Updated since the result of splitText is now
417 (WebCore::Text::splitText): Updated since str is now a RefPtr. Also made the
418 result of this function be a PassRefPtr.
419 (WebCore::Text::createRenderer): Ditto.
420 (WebCore::Text::createNew): Made the parameter and result both be PassRefPtr.
423 * html/HTMLElement.cpp:
424 (WebCore::HTMLElement::nodeName): Use String::upper.
426 * html/HTMLInputElement.cpp:
427 (WebCore::numGraphemeClusters): Remove now-unneeded const.
428 (WebCore::numCharactersInGraphemeClusters): Ditto.
430 * html/HTMLTokenizer.cpp:
431 (WebCore::HTMLTokenizer::processToken): Updated for function name change.
433 * platform/text/AtomicString.cpp:
434 (WebCore::CStringTranslator::translate): Updated since there is no longer
435 a constructor that takes a string.
437 * platform/text/PlatformString.h: Added new constructors that take
438 PassRefPtr and RefPtr. Removed misleading comment.
440 * platform/text/String.cpp:
441 (WebCore::String::String): Changed to use StringImpl::create, which handles
442 the empty string automatically.
443 (WebCore::String::append): Ditto.
444 (WebCore::String::charactersWithNullTermination): Similar.
445 (WebCore::String::format): Ditto.
447 * platform/text/StringHash.h: Took out unneeded const.
449 * platform/text/StringImpl.cpp:
450 (WebCore::deleteUCharVector): Changed to take a const pointer since the
451 buffers are now const UChar buffers.
452 (WebCore::StringImpl::StringImpl): Removed some constructors. Got rid of the
453 separate init functions. The constructors are now private and used only in
454 the create functions and one or two other places.
455 (WebCore::StringImpl::containsOnlyWhitespace): Removed now-meaningless const.
456 (WebCore::StringImpl::substring): Ditto. Also changed return value to be a
458 (WebCore::StringImpl::characterStartingAt): Ditto.
459 (WebCore::StringImpl::toLength): Ditto.
460 (WebCore::StringImpl::toCoordsArray): Ditto.
461 (WebCore::StringImpl::toLengthArray): Ditto.
462 (WebCore::StringImpl::isLower): Ditto.
463 (WebCore::StringImpl::lower): Ditto. Changed to use Vector and adopt so we
464 don't have to use new directly here. Makes empty string handling more consistent.
465 (WebCore::StringImpl::upper): Ditto.
466 (WebCore::StringImpl::secure): Ditto.
467 (WebCore::StringImpl::foldCase): Ditto.
468 (WebCore::StringImpl::stripWhiteSpace): Ditto.
469 (WebCore::StringImpl::simplifyWhiteSpace): Ditto.
470 (WebCore::StringImpl::capitalize): Ditto.
471 (WebCore::StringImpl::toInt): Removed now-meaningless const.
472 (WebCore::StringImpl::toInt64): Ditto.
473 (WebCore::StringImpl::toUInt64): Ditto.
474 (WebCore::StringImpl::toDouble): Ditto.
475 (WebCore::StringImpl::toFloat): Ditto.
476 (WebCore::StringImpl::find): Ditto.
477 (WebCore::StringImpl::reverseFind): Ditto.
478 (WebCore::StringImpl::endsWith): Ditto.
479 (WebCore::StringImpl::replace): Ditto.
480 (WebCore::equal): Ditto.
481 (WebCore::equalIgnoringCase): Ditto.
482 (WebCore::StringImpl::ascii): Ditto.
483 (WebCore::StringImpl::defaultWritingDirection): Ditto.
484 (WebCore::StringImpl::createStrippingNullCharacters): Ditto.
485 (WebCore::StringImpl::adopt): Added special case so this uses the shared
486 empty string like other functions. Also optimized the common case where the
487 vector happens to already have the right size so we don't do a fastRealloc
488 at all in those cases.
489 (WebCore::StringImpl::create): Added. These are now the public functions for
490 creating new StringImpl objects. They all implement the shared empty string.
491 (WebCore::StringImpl::createWithTerminatingNullCharacter):
492 * platform/text/StringImpl.h:
494 * platform/text/cf/StringCF.cpp:
495 (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
496 * platform/text/cf/StringImplCF.cpp:
497 (WebCore::StringImpl::createCFString): Removed now-obsolete const.
498 * platform/text/mac/StringImplMac.mm:
499 (WebCore::StringImpl::operator NSString *): Ditto.
500 * platform/text/mac/StringMac.mm:
501 (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
502 * platform/text/qt/StringQt.cpp:
503 (WebCore::String::String): Ditto.
504 * platform/text/wx/StringWx.cpp:
505 (WebCore::String::String): Ditto.
506 * rendering/RenderBR.cpp:
507 (WebCore::RenderBR::RenderBR): Ditto.
509 * rendering/RenderSVGInlineText.cpp:
510 (WebCore::RenderSVGInlineText::RenderSVGInlineText): Use PassRefPtr.
511 * rendering/RenderSVGInlineText.h:
513 * rendering/RenderText.cpp:
514 (WebCore::charactersAreAllASCII): Removed now-unneeded const.
515 * rendering/RenderTextFragment.cpp:
516 (WebCore::RenderTextFragment::originalText): Use RefPtr.
518 2008-01-02 Timothy Hatcher <timothy@apple.com>
520 Reviewed by Oliver Hunt.
522 <rdar://problem/5618086> WebInspector does not expand the DOM tree after being closed
524 Closing the Web Inspector causes the DOM tree outline to be torn down, clearing the
525 internal element lookup tables. The represented DOM node object still holds the identifier
526 it was assigned, and a later call to findTreeElement will use that original identifier
527 against a cleared lookup table. In that case we need to fallback on DOM ancestor lookup.
529 * page/inspector/treeoutline.js:
530 (TreeOutline.prototype.findTreeElement): If the DOM node already had a __treeElementIdentifier,
531 but the TreeOutline no longer has the element in the _knownTreeElements list do an ancestor lookup
532 instead of an early return.
534 2008-01-02 Alice Liu <alice.liu@apple.com>
538 Fixed <rdar://5283861> (problems scrolling in gmail message content area)
540 * platform/ScrollView.h:
541 * platform/win/ScrollViewWin.cpp:
542 (WebCore::ScrollView::scroll):
543 Changed return value to bool to reflect success of scroll attempt
545 2008-01-02 Alexey Proskuryakov <ap@webkit.org>
547 Fixed a typo (pointed out in review, but I somehow missed it at first).
549 * editing/EditorCommand.cpp: (WebCore::executeDelete):
551 2008-01-02 Alexey Proskuryakov <ap@webkit.org>
555 Resolved several FIXMEs in EditorCommand.
556 Made recently added commands hidden from JS again.
557 Removed BackwardDelete implementation, which used to be dead code, but got exposed now.
559 Tests: editing/execCommand/delete-no-scroll.html
560 editing/execCommand/forward-delete-no-scroll.html
561 editing/execCommand/insert-line-break-no-scroll.html
563 * editing/EditorCommand.cpp:
564 (WebCore::executeDelete):
565 (WebCore::executeForwardDelete):
566 (WebCore::executeInsertLineBreak):
567 (WebCore::supportedFromMenuOrKeyBinding):
568 (WebCore::CommandEntry::):
570 2008-01-02 Alexey Proskuryakov <ap@webkit.org>
574 http://bugs.webkit.org/show_bug.cgi?id=14555
575 action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice
577 http://bugs.webkit.org/show_bug.cgi?id=14774
578 Submitted data only includes first input item
580 Reworked encoding of mailto URLs to match other browsers.
581 Moved most of related logic from FrameLoader::submitForm() to HTMLFormElement::submit().
583 Tests: fast/forms/mailto/advanced-get.html
584 fast/forms/mailto/advanced-put.html
585 fast/forms/mailto/get-multiple-items-text-plain.html
586 fast/forms/mailto/get-multiple-items-x-www-form-urlencoded.html
587 fast/forms/mailto/get-multiple-items.html
588 fast/forms/mailto/get-non-ascii.html
589 fast/forms/mailto/get-non-ascii-text-plain.html
590 fast/forms/mailto/get-overwrite-query.html
591 fast/forms/mailto/post-append-query.html
592 fast/forms/mailto/post-multiple-items-multipart-form-data.html
593 fast/forms/mailto/post-multiple-items-text-plain.html
594 fast/forms/mailto/post-multiple-items-x-www-form-urlencoded.html
595 fast/forms/mailto/post-multiple-items.html
597 * html/HTMLFormElement.cpp:
598 (WebCore::HTMLFormElement::submit):
599 * loader/FrameLoader.cpp:
600 (WebCore::FrameLoader::submitForm):
602 2008-01-02 Mark Rowe <mrowe@apple.com>
606 * GNUmakefile.am: Remove files before generating them, not after.
608 2008-01-02 Mark Rowe <mrowe@apple.com>
610 Rubber-stamped by Alp Toker.
612 Add missing dependencies to some GNUmakefile.am rules.
616 2008-01-02 Mark Rowe <mrowe@apple.com>
618 Reviewed by Alp Toker.
620 Autotools build fix. Make can expand $@ to any of the targets for the rule,
621 while we always want to use the name of the .cpp file as the output file.
625 2008-01-02 Luca Bruno <lethalman88@gmail.com>
627 Reviewed by Alp Toker.
629 http://bugs.webkit.org/show_bug.cgi?id=16115
630 [GTK] ContextMenu and ContextMenuItem lacks an implementation
632 Add context menu support.
634 Based on a patch by Holger Freyther.
636 * platform/gtk/ContextMenuGtk.cpp:
637 (WebCore::menuItemActivated):
638 (WebCore::ContextMenu::ContextMenu):
639 (WebCore::ContextMenu::~ContextMenu):
640 (WebCore::ContextMenu::appendItem):
641 (WebCore::ContextMenu::setPlatformDescription):
642 (WebCore::ContextMenu::releasePlatformDescription):
643 * platform/gtk/ContextMenuItemGtk.cpp:
644 (WebCore::ContextMenuItem::ContextMenuItem):
645 (WebCore::ContextMenuItem::~ContextMenuItem):
646 (WebCore::ContextMenuItem::releasePlatformDescription):
647 (WebCore::ContextMenuItem::type):
648 (WebCore::ContextMenuItem::action):
649 (WebCore::ContextMenuItem::setAction):
650 (WebCore::ContextMenuItem::platformSubMenu):
651 (WebCore::ContextMenuItem::setSubMenu):
652 (WebCore::ContextMenuItem::setChecked):
653 (WebCore::ContextMenuItem::setEnabled):
655 2008-01-02 Alp Toker <alp@atoker.com>
657 GTK+ autotools build fix. Track changes in r29073.
661 2008-01-01 Darin Adler <darin@apple.com>
665 * bindings/js/kjs_binding.cpp:
666 (KJS::setDOMException): Initialize to avoid uninitialized variable warning.
667 Removed default so we get a warning if there's a missing case.
669 2008-01-01 David D. Kilzer <ddkilzer@webkit.org>
671 Scripting MIME Types application/ecmascript, application/javascript not viewable
672 <http://bugs.webkit.org/show_bug.cgi?id=11063>
676 This patch consolidates the list of acceptable MIME types for JavaScript
677 source into the MIMETypeRegistry class, and replaces checks for these
678 types with a call to MIMETypeRegistry::isSupportedJavaScriptMIMEType().
680 No tests added since viewing JavaScript source is not testable.
682 * dom/DOMImplementation.cpp:
683 (WebCore::DOMImplementation::isTextMIMEType): Use
684 MIMETypeRegistry::isSupportedJavaScriptMIMEType() instead of a single
685 hard-coded MIME type, "application/x-javascript".
687 * html/HTMLScriptElement.cpp:
688 (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript): Moved list of
689 JavaScript MIME types from here to
690 MIMETypeRegistry::initialiseSupportedJavaScriptMIMETypes().
692 * platform/MIMETypeRegistry.cpp:
693 (WebCore::initialiseSupportedJavaScriptMIMETypes): Added. List of
694 MIME types came from HTMLScriptElement::shouldExecuteAsJavaScript().
695 (WebCore::initialiseSupportedNonImageMimeTypes): Remove single
696 hard-coded MIME type, "application/x-javascript", from the list.
697 (WebCore::initialiseMIMETypeRegistry): Initialise
698 supportedJavaScriptMIMETypes, then pre-populate supportedNonImageMIMETypes
699 with values in supportedJavaScriptMIMETypes.
700 (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): Added.
702 * platform/MIMETypeRegistry.h: Added isSupportedJavaScriptMIMEType().
704 2008-01-01 Sam Weinig <sam@webkit.org>
708 Patch for http://bugs.webkit.org/show_bug.cgi?id=16691
709 Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)
711 - Create JS objects for all the different types of exceptions, each with there own prototype and constructor.
712 - Abstract all the logic and storage for exception classes in to an ExceptionBase class.
713 - Move specialized ExceptionCodes into the exception classes. (ie. the EventExceptionCode enum is now in EventException).
715 Tests: fast/dom/DOMException/EventException.html
716 fast/dom/DOMException/RangeException.html
717 fast/dom/DOMException/XPathException.html
718 http/tests/xmlhttprequest/XMLHttpRequestException.html
719 svg/custom/SVGException.html
721 * DerivedSources.make:
723 * WebCore.vcproj/WebCore.vcproj:
724 * WebCore.xcodeproj/project.pbxproj:
725 * WebCoreSources.bkl:
726 * bindings/js/JSSVGMatrixCustom.cpp:
727 (WebCore::JSSVGMatrix::inverse):
728 (WebCore::JSSVGMatrix::rotateFromVector):
729 * bindings/js/kjs_binding.cpp:
730 (KJS::setDOMException):
731 * bindings/scripts/CodeGeneratorJS.pm: Use the constant values defined
732 in the IDL as the ObjC bindings do.
733 * bindings/scripts/CodeGeneratorObjC.pm:
734 * dom/DOMCoreException.cpp: Removed.
735 * dom/DOMCoreException.h:
736 (WebCore::DOMCoreException::DOMCoreException):
737 * dom/DOMCoreException.idl:
739 * dom/EventException.h: Copied from WebCore/dom/DOMCoreException.h.
740 (WebCore::EventException::EventException):
741 (WebCore::EventException::):
742 * dom/EventException.idl: Copied from WebCore/dom/DOMCoreException.idl.
743 * dom/EventTargetNode.cpp:
744 (WebCore::EventTargetNode::dispatchEvent):
745 * dom/ExceptionBase.cpp: Copied from WebCore/dom/DOMCoreException.cpp.
746 (WebCore::ExceptionBase::ExceptionBase):
747 (WebCore::ExceptionBase::toString):
748 * dom/ExceptionBase.h: Copied from WebCore/dom/DOMCoreException.h.
749 (WebCore::ExceptionBase::code):
750 * dom/ExceptionCode.cpp:
751 (WebCore::getExceptionCodeDescription):
752 * dom/ExceptionCode.h:
755 (WebCore::Range::insertNode):
756 (WebCore::Range::checkNodeWOffset):
757 (WebCore::Range::checkNodeBA):
758 (WebCore::Range::selectNode):
759 (WebCore::Range::selectNodeContents):
760 (WebCore::Range::surroundContents):
761 * dom/RangeException.h:
762 (WebCore::RangeException::RangeException):
763 (WebCore::RangeException::):
764 * dom/RangeException.idl:
765 * page/DOMWindow.idl:
767 (WebCore::SVGColor::setRGBColor):
768 * svg/SVGException.h:
769 (WebCore::SVGException::SVGException):
770 (WebCore::SVGException::):
771 * svg/SVGException.idl:
772 * svg/SVGLocatable.cpp:
773 (WebCore::SVGLocatable::getTransformToElement):
774 * xml/XMLHttpRequest.cpp:
775 (WebCore::XMLHttpRequest::dispatchEvent):
776 (WebCore::XMLHttpRequest::open):
777 (WebCore::XMLHttpRequest::send):
778 * xml/XMLHttpRequest.h:
779 * xml/XMLHttpRequestException.h: Copied from WebCore/dom/DOMCoreException.h.
780 (WebCore::XMLHttpRequestException::XMLHttpRequestException):
781 (WebCore::XMLHttpRequestException::):
782 * xml/XMLHttpRequestException.idl: Copied from WebCore/dom/DOMCoreException.idl.
783 * xml/XPathEvaluator.h:
784 * xml/XPathException.h: Copied from WebCore/dom/DOMCoreException.h.
785 (WebCore::XPathException::XPathException):
786 (WebCore::XPathException::):
787 * xml/XPathException.idl: Copied from WebCore/dom/DOMCoreException.idl.
788 * xml/XPathParser.cpp:
789 (WebCore::XPath::Parser::parseStatement):
790 * xml/XPathResult.cpp:
791 (WebCore::XPathResult::convertTo):
792 (WebCore::XPathResult::numberValue):
793 (WebCore::XPathResult::stringValue):
794 (WebCore::XPathResult::booleanValue):
795 (WebCore::XPathResult::singleNodeValue):
796 (WebCore::XPathResult::snapshotLength):
797 (WebCore::XPathResult::iterateNext):
798 (WebCore::XPathResult::snapshotItem):
800 2008-01-01 Sam Weinig <sam@webkit.org>
802 Remove JSDomExceptionConstructor.lut.h from clean step
803 as it no longer exists.
807 2008-01-01 Dan Bernstein <mitz@apple.com>
811 * WebCore.vcproj/WebCore.vcproj:
813 2008-01-01 Sam Weinig <sam@webkit.org>
815 Try again to fix the builds
817 * DerivedSources.make:
819 2008-01-01 Sam Weinig <sam@webkit.org>
824 * WebCore.vcproj/WebCore.vcproj:
825 * WebCoreSources.bkl:
827 2008-01-01 Eric Seidel <eric@webkit.org>
831 Don't replace \ with / in data: urls
832 http://bugs.webkit.org/show_bug.cgi?id=16692
834 Test: fast/loader/url-data-replace-backslash.html
837 (WebCore::KURL::init):
839 2008-01-01 Alp Toker <alp@atoker.com>
841 GTK+ autotools build fix. Track changes in r29051, r29058 and pass the
842 correct parameter to AM_INIT_AUTOMAKE.
846 2007-12-31 Sam Weinig <sam@webkit.org>
850 Patch for http://bugs.webkit.org/show_bug.cgi?id=16637
851 Acid3 expects ExeceptionCode constants to be defined on DOMException objects
853 - Make DOMException a real JS object.
855 Test: fast/dom/DOMException/prototype-object.html
857 * DerivedSources.make:
858 * WebCore.xcodeproj/project.pbxproj:
860 This is no longer needed as the autogenerated classes now includes the
862 * bindings/js/JSDOMExceptionConstructor.cpp: Removed.
863 * bindings/js/JSDOMExceptionConstructor.h: Removed.
865 Create on demand and use the new class for DOMExceptions.
866 * bindings/js/kjs_binding.cpp:
867 (KJS::setDOMException):
869 Remove no longer needed custom constructor getter.
870 * bindings/js/kjs_window.cpp:
871 (KJS::Window::getValueProperty):
873 Don't expose DOMCoreException as the name of class by special casing
874 the user visible class name to be DOMException.
875 * bindings/scripts/CodeGeneratorJS.pm:
877 The DOMException class/file needs to be named DOMCoreException because there is
878 name conflict with one of the Objective-C bindings classes. It should be renamed
879 to DOMException when the Objective-C bindings are moved into WebKit.
880 * dom/DOMCoreException.cpp: Added.
881 (WebCore::DOMCoreException::DOMCoreException):
882 (WebCore::DOMCoreException::toString):
883 * dom/DOMCoreException.h: Added.
884 (WebCore::DOMCoreException::):
885 (WebCore::DOMCoreException::code):
886 (WebCore::DOMCoreException::name):
887 (WebCore::DOMCoreException::message):
888 * dom/DOMCoreException.idl: Added.
889 * page/DOMWindow.idl:
891 2007-12-31 Sam Weinig <sam@webkit.org>
893 Re-enable querySelector and querySelectorAll and touch the necessary files to not
894 kill the windows build.
896 * WebCore.vcproj/build-generated-files.sh:
897 * bindings/scripts/CodeGeneratorCOM.pm:
901 2007-12-31 Darin Adler <darin@apple.com>
905 * dom/Document.idl: Temporarily disable querySelector and querySelectorAll, since they are showing
906 up as pure virtual functions. Sam can fix this later.
907 * dom/Element.idl: Ditto.
909 2007-12-31 Dan Bernstein <mitz@apple.com>
911 Reviewed by Darin Adler.
913 - fix http://bugs.webkit.org/show_bug.cgi?id=14134
914 <rdar://problem/5655160> REGRESSION (r25353): Whitespace nodes ignored between inline list items
916 Test: fast/dynamic/create-renderer-for-whitespace-only-text.html
919 (WebCore::Node::attach): Added code to check if this node's renderer
920 has become the "previous renderer" of any sibling text node, and if so,
921 ensure that that node gets a renderer if it now needs one.
922 (WebCore::Node::createRendererIfNeeded): Removed the assertion that the
923 node is not attached.
925 2007-12-31 Darin Adler <darin@apple.com>
929 - fix http://bugs.webkit.org/show_bug.cgi?id=16641
930 Acid3 reveals HTMLFormElement.elements fails to update when element name changes
932 Test: fast/dom/HTMLFormElement/elements-not-in-document.html
934 This was a bug specific to forms that are not in the document tree.
935 The fix was to change the code to increment the document version number to match
936 up with other document change tracking. Maybe at some point we can clean these up
937 so we don't have so many competing change notification systems.
939 * dom/ContainerNode.cpp:
940 (WebCore::ContainerNode::replaceChild): Removed bogus comment.
941 (WebCore::ContainerNode::addChild): Added an explicit incDOMTreeVersion
942 call here, since this code path bypasses the subtree-modified event code.
945 (WebCore::Element::setAttribute): Remove the inDocument() check -- not all HTML
946 collections are for things in the document.
947 (WebCore::Element::setAttributeMap): Ditto.
949 * dom/EventTargetNode.cpp:
950 (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): Added a call to
951 incDOMTreeVersion here; covers most cases of tree structure changes.
954 (WebCore::Node::attach): Remove call to incDOMTreeVersion -- creating a renderer
955 has nothing to do with changes to the DOM tree!
956 (WebCore::Node::detach): Ditto.
958 * html/HTMLFormElement.cpp:
959 (WebCore::HTMLFormElement::registerFormElement): Remove call to incDOMTreeVersion.
960 This is handled at a lower level and doesn't need to be here.
961 (WebCore::HTMLFormElement::removeFormElement): Ditto.
963 2007-12-31 Henry Mason <hmason@mac.com>
967 Patch for http://bugs.webkit.org/show_bug.cgi?id=14994
968 Support for MessageEvent and cross-domain messaging
970 Test: http/tests/messaging/cross-domain-message-send.html
972 * DerivedSources.make:
974 * WebCore.vcproj/WebCore.vcproj:
975 * WebCore.xcodeproj/project.pbxproj:
976 * WebCoreSources.bkl:
977 * bindings/js/JSDOMWindowCustom.cpp:
978 (WebCore::JSDOMWindow::customGetOwnPropertySlot): Allow cross-domain access to the
979 postMessage function.
980 (WebCore::JSDOMWindow::postMessage):
981 * bindings/js/JSEventCustom.cpp:
984 (WebCore::Event::isMessageEvent):
986 * dom/EventNames.h: New event name
987 * dom/MessageEvent.cpp: Added.
988 * dom/MessageEvent.h: Added.
989 * dom/MessageEvent.idl: Added.
990 * page/DOMWindow.cpp:
991 (WebCore::DOMWindow::postMessage): Added.
993 * page/DOMWindow.idl:
995 2007-12-31 Darin Adler <darin@apple.com>
999 - turn ENABLE_VIDEO back off for Windows until we can install QuickTime on the build bots
1001 * WebCore.vcproj/WebCore.vcproj: Removed ENABLE_VIDEO.
1002 * WebCore.vcproj/build-generated-files.sh: Ditto.
1004 2007-12-30 Alp Toker <alp@atoker.com>
1006 Reviewed by Dan Bernstein.
1012 2007-12-30 Sam Weinig <sam@webkit.org>
1014 Reviewed by Oliver Hunt.
1016 Fix for http://bugs.webkit.org/show_bug.cgi?id=16387
1017 Variable names can be enumerated across domains
1018 <rdar://problem/5640454>
1020 Test: http/tests/security/cross-frame-access-enumeration.html
1022 * bindings/js/kjs_window.cpp:
1023 (KJS::Window::getPropertyNames): Override method to test same-origin policy.
1024 * bindings/js/kjs_window.h:
1026 2007-12-30 Sam Weinig <sam@webkit.org>
1028 Reviewed by Oliver Hunt.
1030 Patch for http://bugs.webkit.org/show_bug.cgi?id=10686
1031 event instanceof MouseEvent throws exception
1033 Add JS constructors for all the Event types.
1035 Test: fast/events/event-instanceof.html
1037 * WebCore.xcodeproj/project.pbxproj:
1038 * dom/KeyboardEvent.idl:
1039 * dom/MouseEvent.idl:
1040 * dom/MutationEvent.idl:
1041 * dom/OverflowEvent.idl:
1042 * dom/ProgressEvent.idl:
1043 * dom/TextEvent.idl:
1045 * dom/WheelEvent.idl:
1046 * page/DOMWindow.idl:
1048 2007-12-30 David Kilzer <ddkilzer@webkit.org>
1052 - fix http://bugs.webkit.org/show_bug.cgi?id=15359
1053 JPEG image not shown when height is specified as percentage inside a table
1055 The problem occurs when a replaced element (image, canvas, etc.) with
1056 a percent-height attribute is contained by a table cell with an auto-
1057 or percent-height attribute. If there are no other conditions to cause
1058 the table cell's height to expand, an available height of zero will
1059 always be returned. In these cases, the intrinsic height of the
1060 replaced element should be used if it is greater than the available
1061 height of the table cell.
1063 Tests: fast/replaced/table-percent-height.html
1064 tables/mozilla/bugs/bug137388-1.html
1065 tables/mozilla/bugs/bug137388-2.html
1067 * rendering/RenderBox.cpp:
1068 (WebCore::RenderBox::calcReplacedHeightUsing):
1070 2007-12-30 Luca Bruno <lethalman88@gmail.com>
1072 Reviewed by Alp Toker.
1074 http://bugs.webkit.org/show_bug.cgi?id=16099
1075 Crash in CURL for empty POST
1077 We have to set POST even when the data is empty, otherwise cURL will
1078 hang while waiting for a response.
1080 * platform/network/curl/ResourceHandleManager.cpp
1081 (ResourceHandleManager::setupPOST): allow empty POST
1083 2007-12-29 Jan Michael Alonzo <jmalonzo@unpluggable.com>
1085 Reviewed by Alp Toker.
1087 Move all SVG related stuff inside SVG block. Don't include
1088 SVGNames, SVGElementFactory, and XLinkNames when SVG is not
1093 2007-12-29 Alexey Proskuryakov <ap@webkit.org>
1097 http://bugs.webkit.org/show_bug.cgi?id=14428
1098 FCKEditor: Images disappear on drag/drop and copy/paste
1100 Test: editing/pasteboard/drag-image-in-about-blank-frame.html
1102 * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't use "about:blank" as a
1103 base URL, just like we don't use an empty one.
1105 2007-12-29 Jan Michael Alonzo <jmalonzo@unpluggable.com>
1107 Reviewed by Alp Toker.
1109 http://bugs.webkit.org/show_bug.cgi?id=16669
1110 autotools update and fixes
1112 Autotools update and database/icon database inclusion guard fixes
1115 - Update autotools config as per -r29012 changes
1116 - Fix CSSGrammar.h/cpp generation (Seo Sanghyeon, sanxiyn)
1118 * loader/icon/IconDatabase.h:
1119 * page/DOMWindow.cpp:
1120 * page/InspectorController.cpp:
1121 * page/Settings.cpp:
1122 * storage/Database.h:
1123 - Remove ENABLE(DATABASE) inclusion guard. Let the includer add the guard instead.
1125 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1129 Respect horiz-origin-x / horiz-origin-y / vert-origin-x / vert-origin-y properties when drawing SVG Fonts.
1130 (Fixes fonts-elem-05-t.svg in a --svg-fonts build)
1133 (WebCore::Font::drawGlyphsWithSVGFont):
1135 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1139 Further SVG Font work. Parse all <glyph> attributes, using SVGGlyphElement::buildGlyphIdentifier.
1140 SVGFontElement::collectGlyphs() now uses this method. Per character advance values work well now.
1142 * platform/graphics/FontData.cpp:
1143 (WebCore::SVGFontData::convertEmUnitToPixel): Add helper function.
1144 (WebCore::FontData::ascent):
1145 (WebCore::FontData::descent):
1146 * platform/graphics/FontData.h:
1148 (WebCore::isVerticalWritingMode): Add helper function.
1149 (WebCore::Font::drawGlyphsWithSVGFont):
1150 * svg/SVGFontElement.cpp:
1151 (WebCore::SVGFontElement::collectGlyphs): Simplified implementation - SVGGlyphIdentifier now build by SVGGlyphElement.
1152 * svg/SVGGlyphElement.cpp:
1153 (WebCore::parseArabicForm): Helper function.
1154 (WebCore::parseOrientation): Ditto.
1155 (WebCore::parsePathData): Ditto.
1156 (WebCore::SVGGlyphElement::buildGlyphIdentifier):
1157 * svg/SVGGlyphElement.h:
1158 (WebCore::SVGGlyphElement::rendererIsNeeded):
1160 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1164 Refactor SVGAnimationElement::parseValues into a generic function parseDelimitedString.
1165 SVGAnimationElement needs to parse semicolon-seperated strings, SVGGlyphElement comma-seperated.
1167 * svg/SVGAnimationElement.cpp:
1168 (WebCore::SVGAnimationElement::parseMappedAttribute):
1169 * svg/SVGParserUtilities.cpp:
1170 (WebCore::parseDelimitedString):
1171 * svg/SVGParserUtilities.h:
1173 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1177 Add new helper structure SVGFontData - FontData holds this object as OwnPtr.
1178 Store several attribute values there (horiz-adv-x, horiz-origin-x etc..)
1180 To optimize for the common case ('FontData' used for HTML rendering) it feels
1181 better to hold one OwnPtr in FontData, than several floats.
1183 Parse all <font> attributes in SVGFontFaceElement::createFontData.
1185 * platform/graphics/FontData.cpp:
1186 (WebCore::SVGFontData::SVGFontData):
1187 (WebCore::FontData::FontData):
1188 (WebCore::FontData::ascent):
1189 (WebCore::FontData::descent):
1190 * platform/graphics/FontData.h:
1191 (WebCore::FontData::isSVGFont):
1192 (WebCore::FontData::svgFontData):
1194 (WebCore::Font::drawGlyphsWithSVGFont):
1195 * svg/SVGFontElement.cpp:
1196 * svg/SVGFontElement.h:
1197 (WebCore::SVGFontElement::rendererIsNeeded):
1198 * svg/SVGFontFaceElement.cpp:
1199 (WebCore::SVGFontFaceElement::unitsPerEm):
1200 (WebCore::SVGFontFaceElement::createFontData):
1202 2007-12-28 Darin Adler <darin@apple.com>
1204 - try to fix Windows and WX builds (broken by SVG Fonts check-in)
1206 * platform/graphics/win/FontWin.cpp:
1207 (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent, now that it requires it.
1208 I can't see how it can be right to require the font size for ascent and descent,
1209 but not for other metrics functions in FontData.
1211 * platform/graphics/wx/FontWx.cpp:
1212 (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent and FontData::descent.
1214 2007-12-28 Dan Bernstein <mitz@apple.com>
1216 Reviewed by Mark Rowe.
1218 - fix http://bugs.webkit.org/show_bug.cgi?id=16650
1219 <rdar://problem/5664872> REGRESSION (r28278-r28314): ATSUI uses LTR writing direction for all text runs
1221 Covered by existing pixel tests.
1223 * platform/graphics/mac/FontMac.mm:
1224 (WebCore::Font::drawComplexText): Corrected to maintain the style
1225 information in the adjusted text run when passing it to
1226 ATSUILayoutParameters. Prior to r28298 the style was passed separately.
1228 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1230 Build fix, not reviewed.
1232 Add wtf/OwnPtr.h include, to fix --svg-fonts build.
1234 * css/SVGCSSFontFace.h:
1236 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1240 Fixes: http://bugs.webkit.org/show_bug.cgi?id=10649 (WebKit SVG needs SVG Fonts support)
1242 Begin implementation of SVG Fonts module. Basic documents using SVG Fonts already work.
1243 Only local, in-document fonts who declare their glyphs using the <glyph d="..."> path syntax
1244 are supported. (<glyph> containing arbitary SVG content as child elements, not supported yet).
1246 Limited to single char <-> glyph mapping, no ligatures supported yet.
1247 (ie. <glyph unicode='A'/> <glyph unicode='AB'/> - it ignores the 'AB' glyph definition for now)
1249 Mark all SVG Font related classes & usages in ENABLE(SVG_FONTS) blocks.
1251 No layout test changes for a --no-svg-fonts build, heavy changes if enabled. Because a lot of SVG Font
1252 attributes are not processed yet, the rendering looks wrong - hence disabled by default.)
1254 * DerivedSources.make: Add SVGFontElement/SVGGlyphElement/SVGMissingGlyphElement
1255 * WebCore.pro: Updated build system.
1256 * WebCore.vcproj/WebCore.vcproj: Ditto.
1257 * WebCore.xcodeproj/project.pbxproj: Ditto.
1258 * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGFontElement/JSSVGGlyphElement/JSSVGMissingGlyphElement
1259 * bindings/objc/DOM.mm: Ditto (for DOMSVG*).
1260 (WebCore::createElementClassMap):
1261 * bindings/objc/DOMInternal.h: Ditto.
1262 * bindings/objc/DOMSVG.h: Ditto.
1263 * css/CSSFontFace.h: Mark three functions 'virtual', to be overriden by SVGCSSFontFace
1264 * css/CSSFontFaceSrcValue.h: Add functionality to identify as SVG CSS font face source.
1265 (WebCore::CSSFontFaceSrcValue::m_fontFaceElement): Hold a pointer to the font face which created it.
1266 (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
1267 (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
1268 * css/CSSFontSelector.cpp: Build 'SVGCSSFontFace' objects for local, in-document SVG fonts.
1269 (WebCore::CSSFontSelector::addFontFaceRule):
1270 * css/SVGCSSFontFace.cpp: Added. (Simplified implementation for SVG Fonts)
1271 (WebCore::SVGCSSFontFace::SVGCSSFontFace):
1272 (WebCore::SVGCSSFontFace::~SVGCSSFontFace):
1273 (WebCore::SVGCSSFontFace::isValid):
1274 (WebCore::SVGCSSFontFace::addSource):
1275 (WebCore::SVGCSSFontFace::getFontData):
1276 * css/SVGCSSFontFace.h: Added.
1277 * platform/graphics/cg/PathCG.cpp:
1278 (WebCore::Path::closeSubpath): Silence a CG warning when calling closeSubpath() on empty path.
1279 * platform/graphics/Font.cpp: Add some logic to call into SVG Font code when operating on SVG Fonts.
1280 (WebCore::Font::ascent): Pass font size to FontData::ascent() call
1281 (WebCore::Font::descent): Pass font size to FontData::descent() call
1282 (WebCore::Font::canUseGlyphCache): Always return true for SVG fonts here.
1283 (WebCore::Font::drawGlyphBuffer): Call drawGlyphsWithSVGFont (instead of drawGlyphs) if the primary font is a SVG font.
1284 * platform/graphics/Font.h: Add (SVG-only!) ability to store a RenderObject pointer, to the element which invoked the drawText() call.
1285 (WebCore::TextRun::TextRun):
1286 (WebCore::TextRun::referencingRenderObject):
1287 (WebCore::TextRun::setReferencingRenderObject):
1288 * platform/graphics/FontData.cpp:
1289 (WebCore::FontData::FontData):
1290 (WebCore::FontData::ascent):
1291 (WebCore::FontData::descent):
1292 * platform/graphics/FontData.h: Store a pointer to the SVGFontFaceElement, which created this FontData object - needed for drawGlyphsWithSVGFont().
1293 (WebCore::FontData::isSVGFont): Offer a way to determine wheter this is a FontData object, created by a SVGFontFaceElement.
1294 (WebCore::FontData::svgFontFace):
1295 * rendering/SVGInlineTextBox.cpp:
1296 (WebCore::SVGInlineTextBox::calculateGlyphWidth): Add assertion.
1297 * rendering/SVGRootInlineBox.cpp:
1298 (WebCore::svgTextRunForInlineTextBox): Always call 'setReferencingRenderObject(myRenderSVGText)' on the new TextRun
1299 * svg/SVGFont.cpp: Added.
1300 (WebCore::Font::drawGlyphsWithSVGFont): Outsourced implementation of SVG Fonts into it's own file.
1301 * svg/SVGFontElement.cpp: Added. (Note: this holds the GlyphHashMap which associates certain <glyph> objects with unicode values)
1302 (WebCore::SVGFontElement::SVGFontElement):
1303 (WebCore::SVGFontElement::~SVGFontElement):
1304 (WebCore::SVGFontElement::parseMappedAttribute):
1305 (WebCore::SVGFontElement::collectGlyphs):
1306 (WebCore::SVGFontElement::glyphIdentifierForGlyphCode):
1307 * svg/SVGFontElement.h: Added.
1308 (WebCore::GlyphHash::hash):
1309 (WebCore::GlyphHash::equal):
1310 (WebCore::GlyphHashTraits::deletedValue):
1311 (WebCore::SVGFontElement::rendererIsNeeded):
1312 (WebCore::SVGFontElement::contextElement):
1313 * svg/SVGFontElement.idl: Added.
1314 * svg/SVGFontFaceElement.cpp: Build SVG specific 'FontData' object
1315 (WebCore::SVGFontFaceElement::unitsPerEm):
1316 (WebCore::SVGFontFaceElement::fontFamily):
1317 (WebCore::SVGFontFaceElement::createFontData): Builds SVG specified 'FontData' object with the markup specified ascent/descent values etc..
1318 (WebCore::SVGFontFaceElement::rebuildFontFace): Construct CSSFontFaceSrc object (marked as 'isSVGFontFaceSrc') to satisfy CSSFontSelector::addFontFaceRule.
1319 (WebCore::SVGFontFaceElement::insertedIntoDocument): Rebuild font face.
1320 (WebCore::SVGFontFaceElement::glyphIdentifierForGlyphCode): Allows drawGlyphsWithSVGFont to access the glyph hash map living in the SVGFontElement.
1321 * svg/SVGFontFaceElement.h: Fixed code formatting issues & wrap in ENABLE(SVG_FONTS) blocks.
1322 * svg/SVGFontFaceElement.idl: Ditto.
1323 * svg/SVGFontFaceFormatElement.cpp: Ditto.
1324 * svg/SVGFontFaceFormatElement.h: Ditto.
1325 * svg/SVGFontFaceFormatElement.idl: Ditto.
1326 * svg/SVGFontFaceNameElement.cpp: Ditto.
1327 * svg/SVGFontFaceNameElement.h: Ditto.
1328 * svg/SVGFontFaceNameElement.idl: Ditto.
1329 * svg/SVGFontFaceSrcElement.cpp: Ditto.
1330 * svg/SVGFontFaceSrcElement.h: Ditto.
1331 * svg/SVGFontFaceSrcElement.idl: Ditto.
1332 * svg/SVGFontFaceUriElement.cpp: Ditto.
1333 * svg/SVGFontFaceUriElement.h: Ditto.
1334 * svg/SVGFontFaceUriElement.idl: Ditto.
1335 * svg/SVGDefinitionSrcElement.cpp: Ditto.
1336 * svg/SVGDefinitionSrcElement.h: Ditto.
1337 * svg/SVGDefinitionSrcElement.idl: Ditto.
1338 * svg/SVGGlyphElement.cpp: Added.
1339 (WebCore::SVGGlyphElement::SVGGlyphElement):
1340 (WebCore::SVGGlyphElement::parseMappedAttribute):
1341 (WebCore::SVGGlyphElement::childrenChanged):
1342 * svg/SVGGlyphElement.h: Added.
1343 (WebCore::SVGGlyphElement::rendererIsNeeded):
1344 (WebCore::SVGGlyphIdentifier::): Structure holding all data to represent a SVG glyph (origin, advance, orientation etc..)
1345 (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
1346 * svg/SVGGlyphElement.idl: Added.
1347 * svg/SVGMissingGlyphElement.cpp: Added. (stub implementation)
1348 (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
1349 (WebCore::SVGMissingGlyphElement::parseMappedAttribute):
1350 (WebCore::SVGMissingGlyphElement::childrenChanged):
1351 * svg/SVGMissingGlyphElement.h: Added.
1352 (WebCore::SVGMissingGlyphElement::rendererIsNeeded):
1353 * svg/SVGMissingGlyphElement.idl: Added.
1354 * svg/svgtags.in: Wrap all SVGFont* elements in ENABLE(SVG_FONTS) block - to assure --no-svg-fonts compilation works (which is the default for now!).
1356 2007-12-27 Dan Bernstein <mitz@apple.com>
1358 Reviewed by Alexey Proskuryakov.
1360 - fix http://bugs.webkit.org/show_bug.cgi?id=16628
1361 ASSERTION FAILED: m_resizeLayer (running layout tests)
1363 * rendering/RenderLayer.cpp:
1364 (WebCore::RenderLayer::~RenderLayer): Avoid calling
1365 EventHandler::resizeLayerDestroyed() if the document is being destroyed.
1367 2007-12-27 Dan Bernstein <mitz@apple.com>
1369 Reviewed by Oliver Hunt.
1371 - fix http://bugs.webkit.org/show_bug.cgi?id=16603
1372 <rdar://problem/5664199> Crash when resizing text field
1374 Test: fast/layers/resize-layer-deletion-crash.html
1376 The event handler has only a weak reference to the layer that is
1377 currently in resize mode, so it is the layer's responsibility to let
1378 the event handler know if it has been destroyed while in that mode.
1380 * page/EventHandler.cpp:
1381 (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets
1383 * page/EventHandler.h:
1384 * rendering/RenderLayer.cpp:
1385 (WebCore::RenderLayer::~RenderLayer): Added a call to
1386 EventHandler::resizeLayerDestroyed() if the layer is in resize mode.
1388 2007-12-27 Collin Jackson <webkit@collinjackson.com>
1390 Reviewed by Sam Weinig.
1392 http://bugs.webkit.org/show_bug.cgi?id=16539
1393 <rdar://problem/5659269>
1395 The same-origin check was missing in the implementation of
1396 setTimeout, setInterval, addEventListener, and removeEventListener.
1398 Suppose <http://www.badguy.com/> contains an iframe to
1399 <http://www.goodguy.com/>. Now www.badguy.com can steal
1400 www.goodguy.com cookies by running this code:
1402 setTimeout.call(frames[0], "alert(document.cookie)", 1000);
1404 This patch changes the behavior so that setTimeout to does
1405 nothing and returns an undefined value if the caller is not
1406 permitted to script the window whose setTimeout method is being
1407 called. The same applies to setInterval, addEventListener, and
1408 removeEventListener.
1410 Tests: http/tests/security/cross-frame-access-call.html
1412 * bindings/js/kjs_window.cpp:
1413 (KJS::WindowProtoFuncSetTimeout::callAsFunction)
1414 (KJS::WindowProtoFuncSetInterval::callAsFunction)
1415 (KJS::WindowProtoFuncAddEventListener::callAsFunction)
1416 (KJS::WindowProtoFuncRemoveEventListener::callAsFunction)
1418 2007-12-27 Dan Bernstein <mitz@apple.com>
1420 Reviewed by Dave Hyatt and Sam Weinig.
1422 - fix <rdar://problem/5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
1424 Test: fast/layers/add-layer-with-nested-stacking.html
1425 Test: fast/layers/remove-layer-with-nested-stacking.html
1427 * rendering/RenderLayer.cpp:
1428 (WebCore::RenderLayer::addChild): If the new child is overflow-only
1429 but has children of its own, dirty the stacking context's z-order lists
1430 since the grandchildren might need to be in them.
1431 (WebCore::RenderLayer::removeChild): Similarly for the old child.
1433 2007-12-27 Jan Michael Alonzo <jmalonzo@unpluggable.com>
1435 Reviewed by Alp Toker.
1437 http://bugs.webkit.org/show_bug.cgi?id=16353
1438 [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.)
1440 Added the flags mentioned in the bug only when doing 'debug'
1441 builds. -DGST_DISABLE_DEPRECATED only added when video is enabled.
1446 2007-12-27 Dan Bernstein <mitz@apple.com>
1448 Reviewed by Eric Seidel.
1450 - fix http://bugs.webkit.org/show_bug.cgi?id=16490
1451 ASSERT in ~FrameView while viewing/reloading WICD test case
1453 Test: fast/dynamic/paused-event-dispatch.html
1455 * page/FrameView.cpp:
1456 (WebCore::FrameView::~FrameView):
1457 (WebCore::FrameView::layout): Changed to always pause event dispatch and
1458 always resume event dispatch, regardless of whether the post-layout
1459 task timer is active. However, if it is active, assert that event
1460 dispatch is still paused.
1462 2007-12-27 Alexey Proskuryakov <ap@webkit.org>
1466 http://bugs.webkit.org/show_bug.cgi?id=14500
1467 need to be more generous about charset declaration with meta tag
1469 http://bugs.webkit.org/show_bug.cgi?id=12526
1470 <rdar://problem/4867183> Safari ignores encoding description "charset=Shift_JIS" in invalid html
1472 <rdar://problem/4892428> Unlike other browsers, WebKit ignores <meta> charset definitions outside the head
1474 <rdar://problem/5643774> REGRESSION: Text is garbled when clicking a link inside an Arabic website
1476 Tests: fast/encoding/ahram-org-eg.html
1477 fast/encoding/bandai-co-jp-releases.html
1478 fast/encoding/floraexpress-ru.html
1479 fast/encoding/hanarei-blog32-fc2-com.html
1480 fast/encoding/yahoo-mail.html
1482 * loader/TextResourceDecoder.cpp:
1483 (WebCore::TextResourceDecoder::checkForHeadCharset): Don't stop looking for <meta> until we've
1484 seen at least 512 bytes of input.
1486 2007-12-26 Jan Michael Alonzo <jmalonzo@unpluggable.com>
1488 Reviewed by Alp Toker.
1490 http://bugs.webkit.org/show_bug.cgi?id=16390
1491 Use autotools or GNU make as the build system for the GTK port
1493 * GNUmakefile.am: Added.
1495 2007-12-26 Alexey Proskuryakov <ap@webkit.org>
1497 Reviewed by Sam Weinig.
1499 http://bugs.webkit.org/show_bug.cgi?id=16609
1500 Make manual-tests/xmlhttprequest-contenttype-empty.html test automatic
1502 * manual-tests/xmlhttprequest-contenttype-empty.html: Removed (moved to LayoutTests/http).
1504 2007-12-26 Mark Rowe <mrowe@apple.com>
1508 * platform/Threading.h:
1510 2007-12-25 Rob Buis <buis@kde.org>
1514 http://bugs.webkit.org/show_bug.cgi?id=15514
1515 <clipPath> with <use> not respected
1516 http://bugs.webkit.org/show_bug.cgi?id=16557
1517 SVG circle elements have been clipped away completely, instead of partially.
1519 Add toClipPath to get clip path data for the clipping paths. Implement it for <use>, thereby allowing clip paths using use.
1521 * svg/SVGClipPathElement.cpp:
1522 (WebCore::SVGClipPathElement::canvasResource):
1523 * svg/SVGStyledTransformableElement.h:
1524 (WebCore::SVGStyledTransformableElement::toClipPath):
1525 * svg/SVGUseElement.cpp:
1526 (WebCore::isDirectReference):
1527 (WebCore::SVGUseElement::toClipPath):
1528 * svg/SVGUseElement.h:
1530 2007-12-25 Sam Weinig <sam@webkit.org>
1532 Reviewed by Eric Seidel.
1534 Clean up the files relating to NodeLists.
1536 * dom/ChildNodeList.cpp:
1537 (WebCore::ChildNodeList::ChildNodeList):
1538 (WebCore::ChildNodeList::length):
1539 (WebCore::ChildNodeList::item):
1540 (WebCore::ChildNodeList::nodeMatches):
1541 * dom/ChildNodeList.h:
1542 * dom/DynamicNodeList.cpp:
1543 (WebCore::DynamicNodeList::itemForwardsFromCurrent):
1544 (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
1545 (WebCore::DynamicNodeList::itemWithName):
1546 * dom/DynamicNodeList.h:
1547 (WebCore::DynamicNodeList::needsNotifications):
1548 * dom/NameNodeList.cpp:
1549 (WebCore::NameNodeList::NameNodeList):
1550 (WebCore::NameNodeList::rootNodeAttributeChanged):
1551 (WebCore::NameNodeList::nodeMatches):
1552 * dom/NameNodeList.h:
1554 * dom/SelectorNodeList.h:
1556 2007-12-25 Sam Weinig <sam@webkit.org>
1561 * WebCore.vcproj/WebCore.vcproj:
1562 * WebCoreSources.bkl:
1564 2007-12-25 Sam Weinig <sam@webkit.org>
1566 Rubber stamped by Eric Seidel.
1568 Move TagNodeList into its own file.
1570 * WebCore.xcodeproj/project.pbxproj:
1572 * dom/TagNodeList.cpp: Copied from dom/Node.cpp.
1573 (WebCore::TagNodeList::TagNodeList):
1574 * dom/TagNodeList.h: Copied from dom/Node.cpp.
1576 2007-12-25 Sam Weinig <sam@webkit.org>
1578 Reviewed by Eric Seidel.
1580 Simplify the NodeList architecture.
1581 - Rename recursiveItem() to item(), since it is not recursive.
1582 - Make recursiveLength() iterative and rename to length().
1583 - Remove now unneeded overrides of item() and length() that used
1584 to call the recursive variants.
1586 * dom/ClassNodeList.cpp:
1587 * dom/ClassNodeList.h:
1588 * dom/DynamicNodeList.cpp:
1589 (WebCore::DynamicNodeList::length):
1590 (WebCore::DynamicNodeList::item):
1591 (WebCore::DynamicNodeList::rootNodeAttributeChanged): Move implementation
1592 into the .cpp file since virtual methods can't be inlined.
1593 * dom/DynamicNodeList.h:
1594 * dom/NameNodeList.cpp:
1595 * dom/NameNodeList.h:
1598 2007-12-25 Alp Toker <alp@atoker.com>
1600 More complete GTK+/Qt/Wx/Win build fixes for breakage introduced in
1604 * WebCore.vcproj/WebCore.vcproj:
1605 * WebCoreSources.bkl:
1607 2007-12-25 Alp Toker <alp@atoker.com>
1609 Win build fix for breakage introduced in r28981.
1611 * WebCore.vcproj/WebCore.vcproj:
1613 2007-12-25 Alp Toker <alp@atoker.com>
1615 Wx build fix for breakage introduced in r28981.
1617 * WebCoreSources.bkl:
1619 2007-12-25 Alp Toker <alp@atoker.com>
1621 GTK+/Qt build fix for breakage introduced in r28981.
1625 2007-12-25 David Smith <catfish.man@gmail.com> and Sam Weinig <sam@webkit.org>
1629 - http://bugs.webkit.org/show_bug.cgi?id=16587
1630 Implement the most useful part of the W3C Selectors API.
1632 * WebCore.xcodeproj/project.pbxproj:
1633 * css/CSSStyleSelector.h: Make Node a friend of CSSStyleSelector so it can use checkSelector()
1634 * dom/ChildNodeList.cpp:
1635 (WebCore::ChildNodeList::ChildNodeList): Change to being a DynamicNodeList
1636 * dom/ChildNodeList.h:
1637 * dom/ClassNodeList.cpp:
1638 (WebCore::ClassNodeList::ClassNodeList): Change to being a DynamicNodeList
1639 * dom/ClassNodeList.h:
1640 * dom/Document.idl: Add the new functions
1641 * dom/DynamicNodeList.cpp: Copied from WebCore/dom/NodeList.cpp.
1642 (WebCore::DynamicNodeList::DynamicNodeList): Rename NodeList to DynamicNodeList, to differentiate it from the new StaticNodeList
1643 (WebCore::DynamicNodeList::~DynamicNodeList):
1644 (WebCore::DynamicNodeList::recursiveLength):
1645 (WebCore::DynamicNodeList::itemForwardsFromCurrent):
1646 (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
1647 (WebCore::DynamicNodeList::recursiveItem):
1648 (WebCore::DynamicNodeList::itemWithName):
1649 (WebCore::DynamicNodeList::rootNodeChildrenChanged):
1650 (WebCore::DynamicNodeList::Caches::Caches):
1651 (WebCore::DynamicNodeList::Caches::reset):
1652 * dom/DynamicNodeList.h: Copied from WebCore/dom/NodeList.h.
1653 (WebCore::DynamicNodeList::rootNodeAttributeChanged):
1654 * dom/Element.idl: Add the new functions
1655 * dom/NameNodeList.cpp: Change to being a DynamicNodeList
1656 (WebCore::NameNodeList::NameNodeList):
1657 * dom/NameNodeList.h:
1658 (WebCore::NameNodeList::rootNodeAttributeChanged):
1660 (WebCore::TagNodeList::TagNodeList): Change to being a DynamicNodeList
1661 (WebCore::Node::registerDynamicNodeList):
1662 (WebCore::Node::unregisterDynamicNodeList):
1663 (WebCore::Node::getElementsByName):
1664 (WebCore::Node::getElementsByClassName):
1665 (WebCore::Node::querySelector): new
1666 (WebCore::Node::querySelectorAll): new
1668 * dom/NodeList.cpp: Removed.
1669 * dom/NodeList.h: This is now an abstract superclass of DynamicNodeList and StaticNodeList
1670 (WebCore::NodeList::NodeList):
1671 (WebCore::NodeList::~NodeList):
1672 * dom/SelectorNodeList.cpp: Added.
1673 (WebCore::SelectorNodeList::SelectorNodeList): New StaticNodeList subclass that filters elements by CSS selector
1674 * dom/SelectorNodeList.h: Added.
1675 * dom/StaticNodeList.cpp: Added.
1676 (WebCore::StaticNodeList::length):
1677 (WebCore::StaticNodeList::item):
1678 (WebCore::StaticNodeList::itemWithName):
1679 * dom/StaticNodeList.h: Added.
1680 (WebCore::StaticNodeList::StaticNodeList):
1681 (WebCore::StaticNodeList::~StaticNodeList):
1683 2007-12-25 Mark Rowe <mrowe@apple.com>
1685 Reviewed by Sam Weinig.
1687 Implement a lock-free ThreadSafeShared for i386, x86_64, ppc and ppc64.
1688 http://bugs.webkit.org/show_bug.cgi?id=16596
1690 This is a 1.7x as fast as the lock-based implementation on x86 for a single-threaded use
1691 of ThreadSafeShared but is closer to 280x as fast when there is heavy concurrent multi-threaded
1692 access to a single ThreadSafeShared object.
1694 The atomic operations are based on those used by the Boost C++ library's shared_ptr implementation.
1696 * platform/Threading.h:
1697 (WebCore::atomicIncrement):
1698 (WebCore::atomicDecrement):
1699 (WebCore::ThreadSafeShared::ThreadSafeShared):
1700 (WebCore::ThreadSafeShared::ref): Use lock-free operations if available.
1701 (WebCore::ThreadSafeShared::deref): Ditto.
1702 (WebCore::ThreadSafeShared::hasOneRef):
1703 (WebCore::ThreadSafeShared::refCount):
1704 (WebCore::ThreadSafeShared::isThreadSafe):
1706 2007-12-24 Darin Adler <darin@apple.com>
1708 * platform/text/PlatformString.h: Removed now-incorrect comment.
1709 Added a comment about copy().
1710 * platform/text/StringImpl.h: Added a comment about copy().
1712 2007-12-24 Darin Adler <darin@apple.com>
1716 - http://bugs.webkit.org/show_bug.cgi?id=16550
1717 make StringImpl immutable
1719 I tried to keep the changes to a minimum. In some cases there is
1720 room for optimization -- I didn't try to add in the "single ref count"
1721 optimizations and there might be a tiny bit more string copying than
1724 * WebCore.base.exp: Updated.
1726 * dom/CharacterData.cpp:
1727 (WebCore::CharacterData::appendData): Changed to use String since
1728 StringImpl doesn't have mutating functions any more.
1729 (WebCore::CharacterData::insertData): Ditto.
1730 (WebCore::CharacterData::deleteData): Ditto.
1731 (WebCore::CharacterData::replaceData): Ditto.
1733 (WebCore::Text::splitText): Changed to use substring instead of
1734 remove since StringImpl does't have mutating functions any more.
1735 * editing/CompositeEditCommand.cpp:
1736 (WebCore::CompositeEditCommand::deleteInsignificantText): Changed
1737 to use String instead of StringImpl so we can use remove.
1739 * platform/text/PlatformString.h: Removed newUninitialized.
1740 Added append that takes a character pointer and length.
1742 * platform/text/String.cpp:
1743 (WebCore::String::insert): Added an implementation that does not
1744 rely on an underlying StringImpl function.
1745 (WebCore::String::append): Ditto.
1746 (WebCore::String::truncate): Ditto.
1747 (WebCore::String::remove): Ditto.
1748 (WebCore::String::charactersWithNullTermination): Added an
1749 implementation that uses the new StringImpl null termination feature,
1750 which does not require modifying a string.
1752 * platform/text/StringImpl.cpp:
1753 (WebCore::isSpace): Fix comment.
1754 (WebCore::StringImpl::StringImpl): Added a new constructor that makes
1755 a string with a trailing null character.
1756 (WebCore::StringImpl::substring): Marked const.
1757 (WebCore::StringImpl::replace): Marked const; had to add quite a few
1758 const_cast. Also rewrote one of these to work without modifying the
1761 * platform/text/StringImpl.h: Fixed a mistake where the empty string had
1762 m_hasTerminatingNullCharacter uninitialized. Added a type and constructor
1763 for creating strings that have a trailing null character. Added a
1764 hasTerminatingNullCharacter function. Removed newUninitialized,
1765 charactersWithNullTermination, append, insert, truncate, and remove.
1766 Marked lots of other functions const.
1768 * platform/text/TextCodecLatin1.cpp:
1769 (WebCore::TextCodecLatin1::decode): Rewrote to use a Vector instead of
1771 * platform/text/TextCodecUTF16.cpp:
1772 (WebCore::TextCodecUTF16::decode): Ditto.
1773 * platform/text/TextCodecUserDefined.cpp:
1774 (WebCore::TextCodecUserDefined::decode): Ditto.
1776 * rendering/RenderStyle.cpp:
1777 (WebCore::RenderStyle::setContent): Changed to use String since
1778 StringImpl doesn't have mutating functions any more.
1780 2007-12-24 Alexey Proskuryakov <ap@webkit.org>
1784 Fix fast/events/arrow-keys-on-body.html, failing on Windows.
1786 * platform/win/KeyEventWin.cpp:
1787 (WebCore::isKeypadEvent):
1788 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1789 Use HIWORD() macro instead of shifting the value explicitly (no change in behavior).
1791 2007-12-23 Alexey Proskuryakov <ap@webkit.org>
1793 Fix Debug and Release QTMovieWin bulds.
1795 * WebCore.vcproj/QTMovieWin.vcproj:
1796 * WebCore.vcproj/debug.vsprops:
1797 * WebCore.vcproj/debug_internal.vsprops:
1798 * WebCore.vcproj/release.vsprops:
1799 Use LibraryConfigSuffix instead of WebKitConfigSuffix for pthreadVC2.
1800 Build release import lib into \lib, not \bin.
1802 2007-12-23 Alp Toker <alp@atoker.com>
1804 Reviewed by Holger Freyther.
1806 http://bugs.webkit.org/show_bug.cgi?id=15382
1807 [CAIRO] Canvas pattern support
1809 http://bugs.webkit.org/show_bug.cgi?id=16577
1810 Merge Cairo enhancements from Apollo project
1812 Add support for canvas patterns.
1814 Make Image::nativeImageForCurrentFrame() public.
1816 Fix some typos along the way.
1818 The globalAlpha canvas fixes are not included in this patch as
1819 they're slightly more intrusive and may conflict conceptually with
1820 GraphicsContext::setAlpha().
1822 * html/CanvasPattern.cpp:
1823 (WebCore::CanvasPattern::CanvasPattern):
1824 (WebCore::CanvasPattern::~CanvasPattern):
1825 (WebCore::CanvasPattern::createPattern):
1826 * html/CanvasPattern.h:
1827 (WebCore::CanvasPattern::platformImage):
1828 * html/CanvasRenderingContext2D.cpp:
1829 (WebCore::CanvasRenderingContext2D::setShadow):
1830 (WebCore::CanvasRenderingContext2D::applyShadow):
1831 (WebCore::CanvasRenderingContext2D::drawImage):
1832 (WebCore::CanvasRenderingContext2D::createPattern):
1833 (WebCore::CanvasRenderingContext2D::applyStrokePattern):
1834 (WebCore::CanvasRenderingContext2D::applyFillPattern):
1835 * platform/graphics/Image.h:
1836 (WebCore::Image::nativeImageForCurrentFrame):
1838 2007-12-23 Kevin Ollivier <kevino@theolliviers.com>
1840 Reviewed by Eric Seidel.
1842 Remove getWxBitmap as we have nativeImageForCurrentFrame now,
1843 and don't draw a border in fillRect.
1845 * platform/graphics/BitmapImage.h:
1846 * platform/graphics/wx/GraphicsContextWx.cpp:
1847 (WebCore::GraphicsContext::fillRect):
1848 * platform/graphics/wx/ImageWx.cpp:
1850 2007-12-23 Alp Toker <alp@atoker.com>
1852 Reviewed by Holger Freyther.
1854 http://bugs.webkit.org/show_bug.cgi?id=16577
1855 Merge Cairo enhancements from Apollo project
1857 This patch is based on initial merging work by Brent Fulgham. Adobe's
1858 code has been modified in a few places to better suit the existing
1861 Implement more clipping and drawing functions.
1863 Save and restore the fill rule manually when clipping.
1865 Avoid image surface creation when the image buffer has height zero.
1867 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1868 (WebCore::GraphicsContext::clip):
1869 (WebCore::GraphicsContext::addInnerRoundedRectClip):
1870 (WebCore::GraphicsContext::addPath):
1871 (WebCore::GraphicsContext::clipOut):
1872 (WebCore::GraphicsContext::clipOutEllipseInRect):
1873 (WebCore::GraphicsContext::fillRoundedRect):
1874 * platform/graphics/cairo/ImageSourceCairo.cpp:
1875 (WebCore::ImageSource::createFrameAtIndex):
1877 2007-12-23 Nikolas Zimmermann <zimmermann@kde.org>
1881 Fix wrong placed ifdef - wrapping SVGDefsElement, instead of SVGDefinitionSrcElement in SVG_FONTS block.
1883 * bindings/objc/DOM.mm:
1884 (WebCore::createElementClassMap):
1886 2007-12-22 Alp Toker <alp@atoker.com>
1890 GTK_TARGET_OTHER_APP is not available in older GTK+ versions. Pass
1891 empty target flags for now.
1893 Check GTK+, not GLib versions, since they are different.
1895 * platform/gtk/PasteboardGtk.cpp:
1896 (WebCore::Pasteboard::documentFragment):
1898 2007-12-22 Luca Bruno <lethalman88@gmail.com>
1900 Reviewed by Alp Toker.
1902 http://bugs.webkit.org/show_bug.cgi?id=16311
1903 [Gtk] Copy rich text to clipboard as text/plain and text/html.
1905 Hook into the WebView to get the correct clipboard object on the
1906 appropriate display. This is necessary because GTK+ does not have
1910 * platform/Pasteboard.h:
1911 (WebCore::Pasteboard::setHelper): added for GTK
1912 (WebCore::Pasteboard::m_helper): private added for GTK
1913 * platform/gtk/PasteboardGtk.cpp:
1914 (WebCore::PasteboardSelectionData): added to support GTK selection data callback
1915 (WebCore::clipboard_get_contents_cb): added
1916 (WebCore::clipboard_clear_contents_cb): added
1917 (WebCore::Pasteboard::~Pasteboard):
1918 (WebCore::Pasteboard::setHelper):
1919 (WebCore::Pasteboard::writeSelection): copy rich text
1920 (WebCore::Pasteboard::documentFragment):
1921 (WebCore::Pasteboard::plainText):
1922 * platform/gtk/PasteboardHelper.h: Added.
1924 2007-12-22 Nikolas Zimmermann <zimmermann@kde.org>
1928 Fixes: http://bugs.webkit.org/show_bug.cgi?id=15966 (Crash in SVGRootInlineBox::walkTextChunks() on mouse hover)
1930 Add new isSVGRootInlineBox() function to InlineBox to be able to differentiate between RootInlineBox/SVGRootInlineBox.
1931 SVG assumed it's root inline box (for <text> elements) is always of type SVGRootInlineBox, which is not the case
1932 for HTML text in <foreignObject>. Text selection doesn't work so far as line box offsets are wrong - which is visible
1935 * rendering/InlineBox.h:
1936 (WebCore::InlineBox::isSVGRootInlineBox):
1937 * rendering/SVGInlineTextBox.cpp:
1938 (WebCore::SVGInlineTextBox::svgRootInlineBox):
1939 (WebCore::SVGInlineTextBox::closestCharacterToPosition):
1940 (WebCore::SVGInlineTextBox::selectionRect):
1941 * rendering/SVGRenderTreeAsText.cpp:
1942 (WebCore::writeSVGInlineTextBox):
1943 * rendering/SVGRootInlineBox.h:
1944 (WebCore::SVGRootInlineBox::isSVGRootInlineBox):
1946 2007-12-22 Alp Toker <alp@atoker.com>
1948 LOW_BANDWIDTH_DISPLAY build fix
1950 Track recent KURL DeprecatedString changes.
1952 * loader/FrameLoader.cpp:
1953 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
1955 2007-12-22 Dan Bernstein <mitz@apple.com>
1959 * WebCore.vcproj/WebCore.vcproj:
1961 2007-12-22 Xan Lopez <xan@gnome.org>
1963 Reviewed by Alp Toker.
1965 Add missing return 0 to fix a compile warning.
1967 * page/gtk/FrameGtk.cpp:
1968 (WebCore::Frame::createScriptInstanceForWidget):
1970 2007-12-21 Antti Koivisto <antti@apple.com>
1972 Reviewed by Darin, Adam and Steve.
1974 Add media playback support for Windows.
1976 The implementation uses low level QuickTime API. DLL is
1977 needed to work around CF use in both WebKit and QuickTime.
1979 This makes Windows build depend on the QuickTime SDK
1981 http://developer.apple.com/quicktime/download/
1983 but not QuickTime itself.
1985 QTMovieWinTimer contains some copy code from SharedTimerWin. It
1986 is used in the QuickTime access DLL which can't use WebCore
1987 SharedTimer due to dependency problems.
1989 * WebCore.vcproj/QTMovieWin.vcproj: Added.
1990 * WebCore.vcproj/WebCore.vcproj:
1991 * WebCore.vcproj/build-generated-files.sh:
1992 * html/HTMLMediaElement.cpp:
1993 (WebCore::HTMLMediaElement::setSrc):
1994 * platform/graphics/MediaPlayer.cpp:
1995 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Added.
1996 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1997 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
1998 (WebCore::MediaPlayerPrivate::load):
1999 (WebCore::MediaPlayerPrivate::play):
2000 (WebCore::MediaPlayerPrivate::pause):
2001 (WebCore::MediaPlayerPrivate::duration):
2002 (WebCore::MediaPlayerPrivate::currentTime):
2003 (WebCore::MediaPlayerPrivate::seek):
2004 (WebCore::MediaPlayerPrivate::doSeek):
2005 (WebCore::MediaPlayerPrivate::cancelSeek):
2006 (WebCore::MediaPlayerPrivate::seekTimerFired):
2007 (WebCore::MediaPlayerPrivate::setEndTime):
2008 (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
2009 (WebCore::MediaPlayerPrivate::endPointTimerFired):
2010 (WebCore::MediaPlayerPrivate::paused):
2011 (WebCore::MediaPlayerPrivate::seeking):
2012 (WebCore::MediaPlayerPrivate::naturalSize):
2013 (WebCore::MediaPlayerPrivate::hasVideo):
2014 (WebCore::MediaPlayerPrivate::setVolume):
2015 (WebCore::MediaPlayerPrivate::setMuted):
2016 (WebCore::MediaPlayerPrivate::setRate):
2017 (WebCore::MediaPlayerPrivate::dataRate):
2018 (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2019 (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2020 (WebCore::MediaPlayerPrivate::maxTimeLoaded):
2021 (WebCore::MediaPlayerPrivate::bytesLoaded):
2022 (WebCore::MediaPlayerPrivate::totalBytesKnown):
2023 (WebCore::MediaPlayerPrivate::totalBytes):
2024 (WebCore::MediaPlayerPrivate::cancelLoad):
2025 (WebCore::MediaPlayerPrivate::updateStates):
2026 (WebCore::MediaPlayerPrivate::didEnd):
2027 (WebCore::MediaPlayerPrivate::setRect):
2028 (WebCore::MediaPlayerPrivate::setVisible):
2029 (WebCore::MediaPlayerPrivate::paint):
2030 (WebCore::MediaPlayerPrivate::getSupportedTypes):
2031 (WebCore::MediaPlayerPrivate::movieEnded):
2032 (WebCore::MediaPlayerPrivate::movieLoadStateChanged):
2033 (WebCore::MediaPlayerPrivate::movieTimeChanged):
2034 (WebCore::MediaPlayerPrivate::movieNewImageAvailable):
2035 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Added.
2036 (WebCore::MediaPlayerPrivate::networkState):
2037 (WebCore::MediaPlayerPrivate::readyState):
2038 * platform/graphics/win/QTMovieWin.cpp: Added.
2040 (QTMovieWinPrivate::QTMovieWinPrivate):
2041 (QTMovieWinPrivate::~QTMovieWinPrivate):
2043 (QTMovieWinPrivate::startTask):
2044 (QTMovieWinPrivate::endTask):
2045 (QTMovieWinPrivate::task):
2046 (QTMovieWinPrivate::registerDrawingCallback):
2047 (QTMovieWinPrivate::drawingComplete):
2048 (QTMovieWinPrivate::createGWorld):
2049 (QTMovieWinPrivate::setSize):
2050 (QTMovieWinPrivate::deleteGWorld):
2051 (QTMovieWin::QTMovieWin):
2052 (QTMovieWin::~QTMovieWin):
2054 (QTMovieWin::pause):
2056 (QTMovieWin::setRate):
2057 (QTMovieWin::duration):
2058 (QTMovieWin::currentTime):
2059 (QTMovieWin::setCurrentTime):
2060 (QTMovieWin::setVolume):
2061 (QTMovieWin::setMuted):
2062 (QTMovieWin::dataSize):
2063 (QTMovieWin::maxTimeLoaded):
2064 (QTMovieWin::loadState):
2065 (QTMovieWin::getNaturalSize):
2066 (QTMovieWin::setSize):
2067 (QTMovieWin::setVisible):
2068 (QTMovieWin::paint):
2070 (movieDrawingCompleteProc):
2071 (initializeSupportedTypes):
2072 (QTMovieWin::countSupportedTypes):
2073 (QTMovieWin::getSupportedType):
2074 (QTMovieWin::initializeQuickTime):
2076 * platform/graphics/win/QTMovieWin.h: Added.
2077 * platform/graphics/win/QTMovieWinTimer.cpp: Added.
2078 (TimerWindowWndProc):
2079 (initializeOffScreenTimerWindow):
2080 (setSharedTimerFiredFunction):
2082 (setSharedTimerFireDelay):
2084 (setSharedTimerInstanceHandle):
2086 * platform/graphics/win/QTMovieWinTimer.h: Added.
2087 * rendering/RenderMedia.cpp:
2088 (WebCore::MediaControlPlayButtonElement::update):
2090 2007-12-21 Brent Fulgham <bfulgham@gmail.com>
2092 Reviewed by Alp Toker.
2094 http://bugs.webkit.org/show_bug.cgi?id=16558
2095 Cairo WebCore Rendering Fails on arc drawing
2097 Fix for bug reported (and patched) by Apollo team in which
2098 arcs were draw in reverse (resulting in inverted images).
2099 Review of the source found that the 'clockwise' term was
2100 actually meant to mean 'anticlockwise' so the IDL and
2101 supporting classes have been changed to match this.
2103 * html/CanvasRenderingContext2D.cpp:
2104 (WebCore::CanvasRenderingContext2D::arc):
2105 * html/CanvasRenderingContext2D.idl:
2106 * platform/graphics/cairo/PathCairo.cpp:
2107 (WebCore::Path::addArc):
2108 (WebCore::Path::addEllipse):
2109 * platform/graphics/Path.h:
2111 2007-12-21 Alexey Proskuryakov <ap@webkit.org>
2115 <rdar://problem/5629995> Incorrect display of Danish characters on web site.
2117 Test: http/tests/xmlhttprequest/response-encoding.html
2119 * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData):
2120 Default to UTF-8 for HTML, too. It's unfortunate that we have to use different
2121 rules for main content and XHR responses, but this matches both IE and Firefox.
2123 2007-12-20 Jon Honeycutt <jhoneycutt@apple.com>
2125 Reviewed by Kevin Decker.
2127 <rdar://problem/5655797> REGRESSION(304-306A10) Safari does not find
2128 shockwave plugin on freshly installed OS
2130 Look for Director plugin in its native directory.
2132 * plugins/win/PluginDatabaseWin.cpp:
2133 (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin
2134 doesn't start with "np," so special case its filename.
2135 (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10"
2136 directories to the plugin paths.
2137 (WebCore::PluginDatabaseWin::defaultPluginPaths):
2139 2007-12-20 Peter Kasting <zerodpx@gmail.com>
2141 Reviewed by Alp Toker.
2143 http://bugs.webkit.org/show_bug.cgi?id=16508
2144 Fix regression in GIFImageDecoder.cpp: "Haeberli hack" led to wrongly
2145 decoded transparent areas.
2147 * platform/image-decoders/gif/GIFImageDecoder.cpp:
2148 (WebCore::GIFImageDecoder::haveDecodedRow):
2149 * platform/image-decoders/gif/GIFImageDecoder.h:
2150 * platform/image-decoders/gif/GIFImageReader.cpp:
2151 (GIFImageReader::output_row):
2153 2007-12-20 Justin Garcia <justin.garcia@apple.com>
2155 Reviewed by Oliver Hunt.
2157 <rdar://problem/5543472> GoogleDocs: Safari hangs when creating a list from a particular selection
2159 Still need to fix similar issues with the other operations that iterate
2160 over selected paragraphs, like FormatBlock, Indent and Outdent (<rdar://problem/5658933>).
2162 * editing/IndentOutdentCommand.cpp:
2163 (WebCore::IndentOutdentCommand::indentRegion): Added a FIXME.
2164 * editing/IndentOutdentCommand.h: Removed an unused function.
2165 * editing/InsertListCommand.cpp:
2166 (WebCore::InsertListCommand::modifyRange):
2167 Renamed visibleStart to startOfSelection and visibleEnd to endOfSelection.
2168 Call the new selectionForParagraphIteration, which a) prevents operations like this
2169 one from being performed on a table that isn't fully selected (where the selection
2170 starts just before the table and ends inside it), and b) helps prevent paragraph
2171 iteration from going past the end of the selection.
2172 Call the new startOfNextParagraph, instead of using endOfParagraph(v).next(),
2173 since when v is in the last paragraph of the last cell of a table, that expression
2174 will return the position after the table, not the start of the next paragraph.
2175 * editing/htmlediting.cpp:
2176 (WebCore::enclosingListChild): Don't go above a table cell, so that list operations
2177 take effect inside the table cell where they are performed.
2178 (WebCore::selectionForParagraphIteration): Added, see above.
2179 (WebCore::indexForVisiblePosition): Moved from IndentOutdentCommand.cpp.
2180 * editing/htmlediting.h:
2181 * editing/visible_units.cpp:
2182 (WebCore::startOfNextParagraph): Added, see above.
2183 * editing/visible_units.h:
2184 * editing/TextIterator.h:
2185 (WebCore::TextIterator::exitNode): Added a FIXME.
2187 2007-12-20 Alp Toker <alp@atoker.com>
2189 Rubber-stamped by Maciej.
2191 http://bugs.webkit.org/show_bug.cgi?id=16542
2192 [GTK] Text is missing with old Pango version
2194 Back out commits r28880, r28876, r28865, r28864 which added Pango font
2195 selection support. These changes caused a regression where no text was
2196 displayed with older Pango versions.
2198 * platform/graphics/gtk/FontCacheGtk.cpp:
2199 (WebCore::FontCache::fontExists):
2200 * platform/graphics/gtk/FontDataGtk.cpp:
2201 (WebCore::FontData::platformDestroy):
2202 (WebCore::FontData::containsCharacters):
2203 * platform/graphics/gtk/FontPlatformData.h:
2204 (WebCore::FontPlatformData::FontPlatformData):
2205 (WebCore::FontPlatformData::hash):
2206 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2207 (WebCore::FontPlatformData::FontPlatformData):
2208 (WebCore::FontPlatformData::init):
2209 (WebCore::FontPlatformData::~FontPlatformData):
2210 (WebCore::FontPlatformData::isFixedPitch):
2211 (WebCore::FontPlatformData::operator==):
2212 * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
2213 (WebCore::GlyphPage::fill):
2215 2007-12-20 Timothy Hatcher <timothy@apple.com>
2217 Reviewed by Sam Weinig.
2219 <rdar://problem/5604897> Double-clicking on JavaScript console error
2220 won't show the line where it occurred
2222 Make the URLs clickable in the console, since double clicking is used for
2223 word text selection. Makes the word "line" localizable. Messages that don't
2224 have a URL will no longer print "undefined". Messages that have a line number
2225 less than or equal to 0 will no longer be printed.
2227 * English.lproj/InspectorLocalizedStrings.js: Add "%s (line %d)".
2228 * page/inspector/ConsolePanel.js: Tweak how the DOM nodes are created
2229 and change the click handler to look for a link with the
2230 "console-message-url" class name.
2231 * page/inspector/SourcePanel.js: Call setupSourceFrameIfNeeded() if a
2233 * page/inspector/inspector.css: Update the look of the URL in the console.
2235 2007-12-20 Adam Barth <hk9565@gmail.com>
2237 Reviewed and landed by Sam Weinig.
2239 http://bugs.webkit.org/show_bug.cgi?id=15313
2240 <rdar://problem/5514516>
2242 The same-origin check was incorrect in two cases (both fixed in this
2245 A) If both the source and the target have set their document.domain
2246 to the same value, the protocol must also match in order for
2247 access to be allowed. Without this requirement, the browser is
2248 vulnerable to the following attack:
2250 1) Suppose there is an HTTPS site (www.example.com) that sets
2251 document.domain = "example.com".
2252 2) A network attacker redirects the browser to http://www.example.com/
2253 a) injects script to set document.domain = "example.com", and
2254 b) opens a window to https://www.example.com/
2255 3) Now the network attacker can inject script into the HTTPS page,
2256 stealing cookies and issuing banking transactions.
2258 B) If only one of the source and target has set document.domain, then
2259 access should be denied. With this behavior, the browser is
2260 vulnerable to the following attack:
2262 1) Suppose http://foo.example.com/ opens an iframe to
2263 http://foo.example.com/frame.html that
2264 a) sets document.domain = "example.com", and
2265 b) opens an iframe to http://bar.example.com/
2266 This is a common usage of document.domain for cross-domain
2267 communication, see for example:
2268 http://www.collinjackson.com/research/papers/fp801-jackson.pdf
2269 2) The inner-most iframe, which is from bar.example.com, sets
2270 document.domain = "example.com".
2271 3) Now the inner-most iframe can inject script into the middle
2272 iframe (say via document.write). This bar.example.com script
2273 now has access to the outer-most frame (from foo.example.com).
2275 Both these changes cause WebKit to match the behavior of Firefox 2 and
2276 IE6 in these cases. This patch includes regression tests for both
2279 Internet Explorer 7 and Opera 9 are more strict in that they require
2280 the port numbers to match when both pages have document.domain set.
2281 Opera 9 allows access when only one page has set document.domain, but
2282 this is a security vulnerability.
2284 Tests: http/tests/security/cross-frame-access-child-explicit-domain.html
2285 http/tests/security/cross-frame-access-parent-explicit-domain.html
2287 * bindings/js/kjs_window.cpp:
2288 (KJS::createWindow):
2289 (KJS::Window::allowsAccessFrom):
2291 (WebCore::Document::domain):
2292 (WebCore::Document::setDomain):
2293 (WebCore::Document::initSecurityOrigin):
2295 (WebCore::Document::securityOrigin):
2296 * loader/FrameLoader.cpp:
2297 (WebCore::FrameLoader::begin):
2298 (WebCore::FrameLoader::checkCallImplicitClose):
2299 (WebCore::FrameLoader::shouldAllowNavigation):
2300 * platform/SecurityOrigin.cpp:
2301 (WebCore::SecurityOrigin::setForURL):
2302 (WebCore::SecurityOrigin::createForFrame):
2303 (WebCore::SecurityOrigin::canAccess):
2304 * platform/SecurityOrigin.h:
2305 (WebCore::SecurityOrigin::domain):
2306 * storage/Database.cpp:
2307 (WebCore::Database::openDatabase):
2308 (WebCore::Database::Database):
2309 (WebCore::Database::securityOriginData):
2310 * storage/Database.h:
2311 (WebCore::Database::databaseDebugName):
2312 * storage/DatabaseTracker.cpp:
2313 (WebCore::DatabaseTracker::canEstablishDatabase):
2314 * storage/SQLTransaction.cpp:
2315 (WebCore::SQLTransaction::postflightAndCommit):
2316 (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
2318 2007-12-20 Rodney Dawes <dobey@wayofthemonkey.com>
2320 Reviewed by Darin Adler.
2322 Define XP_UNIX when building with plugins on X11.
2323 Use new npruntime_internal.h instead of npruntime.h.
2324 http://bugs.webkit.org/show_bug.cgi?id=15669
2326 * ForwardingHeaders/bindings/npruntime_internal.h
2328 * html/HTMLPlugInElement.h:
2330 2007-12-19 johnnyding.webkit <johnnyding.webkit@gmail.com>
2332 Reviewed by Alexey. Landed by Stephanie.
2334 - fix http://bugs.webkit.org/show_bug.cgi?id=16179 | <rdar://problem/5619399>
2335 Any attribute name start with a unicode which like #xx00(x could be any hex number[0-9a-f]) will cause HTMLTokenizer parse error
2336 Actually any unicode characters which great than 255 in attribute name will cause Webkit parse the attribute name wrong. So after comparing
2337 the same scenario in IE 6/7, FireFox 2/3, Opera, we should treat those characters as part of attribute name.
2340 * html/HTMLTokenizer.cpp:
2341 (WebCore::HTMLTokenizer::parseEntity): Handle Unicode Entity Name by using ASCII version of findEntity.
2342 (WebCore::HTMLTokenizer::parseTag): Let type of ptr match type of cBuffer.
2343 * html/HTMLTokenizer.h: Change type of cBuffer from char to UChar.
2345 2007-12-20 Eric Seidel <eric@webkit.org>
2347 Reviewed by Nikolas Zimmermann.
2349 WebKit claims to support SVG feature strings it shouldn't
2350 http://bugs.webkit.org/show_bug.cgi?id=15480
2352 * dom/DOMImplementation.cpp:
2353 (WebCore::isSVG10Feature):
2354 (WebCore::isSVG11Feature):
2356 2007-12-20 John Sullivan <sullivan@apple.com>
2358 Reviewed by Oliver and Geoff
2360 - fix <rdar://problem/5536858> Yellow highlight for find results is sometimes shorter
2361 than white "hole" behind it
2363 * rendering/RenderText.cpp:
2364 (WebCore::RenderText::addLineBoxRects):
2365 respect useSelectionHeight in all cases; we were only respecting it in one of the two cases
2367 2007-12-20 Dan Bernstein <mitz@apple.com>
2369 Reviewed by Darin Adler.
2371 - fix <rdar://problem/5656368> REGRESSION(3.0.4-ToT): Acid2 test fails to render anything
2373 * platform/win/ScrollViewWin.cpp:
2374 (WebCore::ScrollView::maximumScroll): Changed back to return the maximum
2375 scroll offsets even if scrolling is not allowed, because navigation and
2376 scrollTo should still work.
2377 (WebCore::ScrollView::wheelEvent): Added early return if scrolling is
2380 2007-12-17 Tony Chang <idealisms@gmail.com>
2384 - Fix for http://bugs.webkit.org/show_bug.cgi?id=16479
2385 text selection does not always begin at mouse down point
2386 Reset the m_dragSrc object on mouse down on all platforms.
2388 Test: fast/text/reset-drag-on-mouse-down.html
2390 * page/EventHandler.cpp:
2391 (WebCore::EventHandler::handleMousePressEvent):
2392 * page/mac/EventHandlerMac.mm:
2393 (WebCore::EventHandler::mouseDown):
2395 2007-12-19 Geoffrey Garen <ggaren@apple.com>
2397 Reviewed by Oliver Hunt.
2400 * ForwardingHeaders/kjs/SymbolTable.h: Added.
2401 * ForwardingHeaders/wtf/VectorTraits.h: Added.
2403 * bindings/js/JSDOMWindowCustom.cpp:
2404 (WebCore::JSDOMWindow::customGetOwnPropertySlot): Replaced use of
2405 getDirectLocation with getOwnPropertySlot. getDirectLocation is no
2406 longer valid, since global declarations are not stored in the property
2409 (WebCore::JSDOMWindow::customPut): Replaced use of JSObject::put with
2410 JSGlobalObject::put. JSObject::put is no longer valid, since global
2411 declarations are not stored in the property map.
2413 * bindings/js/kjs_window.cpp: Replaced JSObject:: calls with Base::
2414 calls, since JSObject is not our base class. This was always a bug, but
2415 the bug is even more apparent after some of my changes.
2417 (KJS::Window::clear): Removed call to clearProperties because
2418 JSGlobalObject::reset takes care of that now.
2420 * history/CachedPage.cpp:
2421 * history/CachedPage.h: Added support for saving a symbol table and
2422 localStorage to the page cache, and restoring it.
2424 2007-12-19 Dan Bernstein <mitz@apple.com>
2426 Reviewed by Darin Adler and Dave Hyatt.
2428 - Substitute the user's preferred standard font for an unknown primary
2429 font before falling back on the platform's last resort font
2431 Cannot be tested in DumpRenderTree because it sets the standard font to
2432 Times, which is also the hard-coded last resort font on Mac.
2434 * css/CSSFontSelector.cpp:
2435 (WebCore::CSSFontSelector::getFontData): Changed the early bail out
2436 condition to allow getting generic font families from settings even if
2437 there are not @font-face rules. Fixed a typo that mapped fantasy to
2438 cursive. Added a mapping from -webkit-standard to the standard family.
2439 * css/CSSStyleSelector.cpp:
2440 (WebCore::CSSStyleSelector::CSSStyleSelector): Changed to always create
2442 (WebCore::CSSRuleSet::addRulesFromSheet):
2443 (WebCore::CSSStyleSelector::applyProperty): Changed to always use the
2445 * css/CSSStyleSelector.h:
2446 (WebCore::CSSStyleSelector::fontSelector):
2447 * platform/graphics/FontCache.cpp:
2448 (WebCore::FontCache::getFontData): Try the user's preferred standard
2449 font before the platform's last resort font.
2451 2007-12-19 Sven Herzberg <sven@imendio.com>
2453 Reviewed by Alp Toker.
2455 Scaled font destruction takes place in FontData::platformDestroy(). No
2456 need to do it in FontPlatformData::~FontPlatformData().
2458 Destroying platform data in platformDestroy() is a convention we
2459 borrow from the Mac and Win ports.
2461 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2463 2007-12-19 Alice Liu <alice.liu@apple.com>
2467 Changed uint to unsigned int. uint caused Windows build breakage
2470 (WebCore::Page::markAllMatchesForText):
2473 2007-12-19 Christian Dywan <christian@twotoasts.de>
2475 Reviewed by Alp Toker.
2477 http://bugs.webkit.org/show_bug.cgi?id=16222
2478 [GTK] Implement inline search and highlighting of matching strings.
2480 Implement search and highlighting logic directly in WebCore.
2483 (WebCore::incrementFrame):
2484 (WebCore::Page::findString):
2485 (WebCore::Page::markAllMatchesForText):
2486 (WebCore::Page::unmarkAllTextMatches):
2489 2007-12-19 Geoffrey Garen <ggaren@apple.com>
2491 Reviewed by Sam Weinig, Dan Bernstein.
2493 Tiger build fix: restored some graphics code still needed on Tiger.
2495 * platform/graphics/GraphicsTypes.h:
2496 * platform/graphics/cg/GraphicsContextCG.cpp:
2497 * platform/graphics/mac/GraphicsContextMac.mm:
2498 (WebCore::GraphicsContext::setCompositeOperation):
2500 2007-12-19 Alp Toker <alp@atoker.com>
2502 Build fix for Pango < 1.18.0 breakage introduced in r28864. Use Fc and
2503 the Pango backend API in these cases.
2505 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2506 (WebCore::FontPlatformData::FontPlatformData):
2507 (WebCore::FontPlatformData::~FontPlatformData):
2509 2007-12-19 Alice Liu <alice.liu@apple.com>
2513 Fixed <rdar://problem/5592485> Safari crashed trying to get a motorcycle insurance quote
2514 on Geico.com WebCore::Document::inPageCache()
2516 Calling Node::willRemove on the focusedNode would immediately tell the document to remove
2517 the focused node, and trigger JS events. This means that the document is mutated while
2518 the engine is trying to tell all child nodes that it's about to removed. To avoid
2519 crashing, we need to hold off on mutating the document until node traversal is finished.
2521 * dom/ContainerNode.cpp:
2522 (WebCore::ContainerNode::removeChild):
2523 (WebCore::ContainerNode::removeChildren):
2526 (WebCore::Node::willRemove):
2527 * loader/FrameLoader.cpp:
2528 (WebCore::FrameLoader::clear):
2530 2007-12-19 Andre Boule <aboule@apple.com>
2532 Reviewed by Dan Bernstein.
2534 Test: fast/canvas/canvas-composite.html
2537 <rdar://problem/5640059> GraphicsContext::setCompositeOperation should use CGContextSetBlendMode
2539 This fix makes setCompositeOperation consistent across all platforms that use CG.
2541 The following compositing modes don't pass however that is covered by another bug:
2547 <rdar://problem/5651783> Some canvas tag compositing modes don't render correctly
2549 * platform/graphics/GraphicsTypes.h:
2550 * platform/graphics/cg/GraphicsContextCG.cpp:
2551 (WebCore::GraphicsContext::setCompositeOperation):
2552 * platform/graphics/mac/GraphicsContextMac.mm:
2553 * platform/win/GraphicsContextWin.cpp:
2555 2007-12-19 Dan Bernstein <mitz@apple.com>
2557 Reviewed by Dave Hyatt.
2559 - fix <rdar://problem/5650045> REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page
2561 Test: fast/dynamic/subtree-boundary-percent-height.html
2563 * rendering/RenderObject.cpp:
2564 (WebCore::objectIsRelayoutBoundary): Do not allow overflows with
2565 percent heights because sometimes they compute to 'auto'.
2567 2007-12-19 Sam Weinig <sam@webkit.org>
2571 http://bugs.webkit.org/show_bug.cgi?id=16511
2572 Speed up ClassNodeList and NamedNodeList by using the caching mechanism employed by ChildNodeList.
2573 - This give a ~2.15x speedup on the native test @ http://ejohn.org/apps/classname/
2575 * dom/ChildNodeList.cpp: Use the caching NodeList constructor to turn on caching.
2576 (WebCore::ChildNodeList::ChildNodeList):
2577 * dom/ClassNodeList.cpp:
2578 (WebCore::ClassNodeList::ClassNodeList):
2579 * dom/ClassNodeList.h:
2581 Move getElementsByName and getElementsByClassName to Node so they
2582 can use easily employ the caching already used by ChildNodeLists. In the case of
2583 getElementsByClassName, this reduces code duplication in Element as well
2587 Move getElementsByClassName to Node.
2591 * dom/NameNodeList.cpp: Use the caching NodeList constructor to turn on caching.
2592 (WebCore::NameNodeList::NameNodeList):
2593 (WebCore::NameNodeList::item):
2594 * dom/NameNodeList.h:
2596 Add maps of caches for ClassNodeLists and NameNodeList to NodeListsNodeData.
2598 (WebCore::TagNodeList::TagNodeList):
2599 (WebCore::Node::Node):
2600 (WebCore::Node::~Node):
2601 (WebCore::Node::childNodes):
2602 (WebCore::Node::registerNodeList):
2603 (WebCore::Node::getElementsByName):
2604 (WebCore::Node::getElementsByClassName):
2605 * dom/Node.h: Make m_nodeLists an OwnPtr. Moved getElementsByName and getElementsByClassName here
2607 Allow subclasses to choose whether they want to receive the notifications using a new bit.
2609 (WebCore::NodeList::NodeList):
2611 (WebCore::NodeList::needsNotifications):
2613 2007-12-19 Dave Hyatt <hyatt@apple.com>
2615 Add support for GDI text rendering to WebKit.
2619 * css/CSSStyleSelector.cpp:
2620 (WebCore::CSSStyleSelector::applyProperty):
2622 (WebCore::Document::recalcStyle):
2623 * page/Settings.cpp:
2624 (WebCore::Settings::setFontRenderingMode):
2625 (WebCore::Settings::fontRenderingMode):
2627 * platform/graphics/Font.h:
2628 (WebCore::Font::renderingMode):
2629 * platform/graphics/FontCache.cpp:
2630 (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
2631 (WebCore::FontPlatformDataCacheKey::operator==):
2632 (WebCore::computeHash):
2633 (WebCore::FontCache::getCachedFontPlatformData):
2634 * platform/graphics/FontDescription.h:
2636 (WebCore::FontDescription::FontDescription):
2637 (WebCore::FontDescription::renderingMode):
2638 (WebCore::FontDescription::setRenderingMode):
2639 (WebCore::FontDescription::operator==):
2640 * platform/graphics/GraphicsContext.h:
2641 * platform/graphics/win/FontCacheWin.cpp:
2642 (WebCore::FontCache::fontExists):
2643 (WebCore::FontCache::createFontPlatformData):
2644 * platform/graphics/win/FontDataWin.cpp:
2645 (WebCore::FontData::platformInit):
2646 (WebCore::FontData::smallCapsFontData):
2647 (WebCore::FontData::containsCharacters):
2648 (WebCore::FontData::determinePitch):
2649 (WebCore::FontData::platformWidthForGlyph):
2650 * platform/graphics/win/FontPlatformData.h:
2651 (WebCore::FontPlatformData::FontPlatformData):
2652 (WebCore::FontPlatformData::useGDI):
2653 (WebCore::FontPlatformData::operator==):
2654 * platform/graphics/win/FontPlatformDataWin.cpp:
2655 (WebCore::FontPlatformData::FontPlatformData):
2656 * platform/graphics/win/FontWin.cpp:
2657 (WebCore::Font::drawGlyphs):
2658 * platform/graphics/win/IconWin.cpp:
2659 (WebCore::Icon::paint):
2660 * platform/win/GraphicsContextWin.cpp:
2661 (WebCore::GraphicsContext::getWindowsContext):
2662 (WebCore::GraphicsContext::releaseWindowsContext):
2663 * platform/win/UniscribeController.cpp:
2664 (WebCore::UniscribeController::shapeAndPlaceItem):
2665 * platform/win/UniscribeController.h:
2666 * plugins/win/PluginViewWin.cpp:
2667 (WebCore::PluginViewWin::paint):
2669 2007-12-19 Sven Herzberg <sven@imendio.com>
2671 Reviewed by Alp Toker.
2673 Replace the fontconfig/freetype based font management with a pango
2675 http://bugs.webkit.org/show_bug.cgi?id=15229
2677 * platform/gtk/FontDataGtk.cpp (FontData::platformDestroy()): updated
2678 the platform specific destroy code
2679 (FontData::containsCharacters()): implemented font coverage with pango
2680 * platform/gtk/FontPlatformData.h: replaced fontconfig specific
2681 members with pango-specific ones
2682 * platform/gtk/FontPlatformDataGtk.cpp: added static members for the
2683 FontPlatformData class
2684 (FontPlatformData::FontPlatformData()): implemented the font-matching
2685 with a PangoFontDescription instead of an FcPattern; initialize the
2686 scaled font by using the API for PangoCairoFont
2687 (FontPlatformData::init()): initialize the PangoFontMap and set up a
2688 hash table to translate the font family name into a font family
2689 (FontPlatformData::isFixedPitch()): implemented by querying the
2691 (FontPlatformData::operator==): compare the FontPlatformData by
2692 comparing the font pointers or the described fonts
2693 * platform/gtk/GlyphPageTreeNodeGtk.cpp (pango_font_get_glyph()):
2694 added a function to query a glyph from a PangoFont
2695 (GlyphPage::fill()): implemented the fill function with Pango instead
2696 of fontconfig/freetype
2698 2007-12-19 Alp Toker <alp@atoker.com>
2700 Reviewed by Holger Freyther.
2702 Improve graphics operator approximations
2704 These changes match Cairo's own CG approximations.
2706 * platform/graphics/cairo/GraphicsContextCairo.cpp:
2707 (WebCore::toCairoOperator):
2709 2007-12-19 Alp Toker <alp@atoker.com>
2711 Reviewed by Holger Freyther.
2713 Check the bounding box before doing a full hit test
2715 * platform/graphics/cairo/PathCairo.cpp:
2716 (WebCore::Path::contains):
2718 2007-12-18 Sam Weinig <sam@webkit.org>
2722 Fix for <rdar://problem/5646478>
2723 REGRESSION: fast/events/event-view-toString fails on Leopard
2725 This fixes an issue where we were incorrectly setting the lastInPrototypeChain
2726 for the JSDOMWindow (the global object) before a call to setPrototype overwrote
2727 it. This fixes it by passing the prototype up the constructor chain so that it
2728 is set before any calls can be made.
2730 * bindings/js/kjs_window.cpp:
2731 (KJS::Window::Window):
2732 * bindings/js/kjs_window.h:
2733 * bindings/scripts/CodeGeneratorJS.pm:
2735 2007-12-18 Beth Dakin <bdakin@apple.com>
2739 Fix for <rdar://problem/5616982> SVGs with width and height 100%
2740 fail to render when used as <img> or CSS image (16167)
2742 This final part of the work fixes the <img> tag.
2744 This is the real fix.
2745 * rendering/RenderImage.cpp:
2746 (WebCore::RenderImage::calcReplacedWidth): Set the container size
2747 on the image. Setting the container size only actually sticks if
2748 the values are non-zero, so if the container size really was set,
2749 use the imageSize that is calculated using the container size. If
2750 it did not stick but the image does have relative width (meaning
2751 that the container size is 0), set the width to 0 by hand. We want
2752 to avoid setting the width before we have a container size or we
2753 will end up incorrectly using the default size of 300x150.
2754 (WebCore::RenderImage::calcReplacedHeight): Same as above, but for
2757 A few more pieces of information have to be exposed through cached
2758 image to make this happen.
2759 * loader/CachedImage.cpp:
2760 (WebCore::CachedImage::usesImageContainerSize): As mentioned above,
2761 when setContainerSize() is called, the container size is only
2762 actually set if the values are non-zero. This call tells you if it
2764 (WebCore::CachedImage::imageHasRelativeWidth):
2765 (WebCore::CachedImage::imageHasRelativeHeight):
2766 * loader/CachedImage.h:
2767 * platform/graphics/Image.h:
2768 (WebCore::Image::usesContainerSize):
2769 * svg/graphics/SVGImage.cpp:
2770 (WebCore::SVGImage::usesContainerSize):
2771 * svg/graphics/SVGImage.h:
2773 2007-12-18 Mark Rowe <mrowe@apple.com>
2775 Rubber-stamped by Maciej Stachowiak.
2777 Remove outdated and non-functioning project files for the Apollo port.
2779 * WebCore.apolloproj: Removed.
2781 2007-12-18 Steve Falkenburg <sfalken@apple.com>
2783 <rdar://problem/5649911> REGRESSION (304-306A9): Typing 'p' in popup menu for type-to-select brings up Safari Help
2785 Need to translate the char back into a key code for posting our WM_KEYDOWN.
2789 * platform/win/PopupMenuWin.cpp:
2790 (WebCore::PopupWndProc):
2792 2007-12-18 Steve Falkenburg <sfalken@apple.com>
2794 <rdar://problem/5651534> REGRESSION(r28764-r28765): GDI leak drawing text when no appropriate font is available
2796 Our captured metafile from Uniscribe may contain multiple calls to CreateFontIndirect.
2797 Only create a font with the last one.
2799 Reviewed by Mitz, Darin.
2801 * platform/graphics/win/FontCacheWin.cpp:
2802 (WebCore::metaFileEnumProc):
2803 (WebCore::FontCache::getFontDataForCharacters):
2805 2007-12-17 Brent Fulgham <bfulgham@gmail.com>
2809 http://bugs.webkit.org/show_bug.cgi?id=16464
2810 Modify WebCore to use win32 thread primitives
2812 Updates to support native windows threading primitives
2813 rather than pthreads emulation library.
2815 * WebCore.vcproj/WebCore.vcproj:
2817 * platform/Threading.h:
2818 * platform/win/MutexWin.cpp: Added.
2819 (WebCore::Mutex::Mutex):
2820 (WebCore::Mutex::~Mutex):
2821 (WebCore::Mutex::lock):
2822 (WebCore::Mutex::tryLock):
2823 (WebCore::Mutex::unlock):
2824 * platform/win/ThreadConditionWin.cpp: Added.
2825 (WebCore::ThreadCondition::ThreadCondition):
2826 (WebCore::ThreadCondition::~ThreadCondition):
2827 (WebCore::ThreadCondition::wait):
2828 (WebCore::ThreadCondition::signal):
2829 (WebCore::ThreadCondition::broadcast):
2830 * platform/win/ThreadingWin.cpp:
2831 (WebCore::threadMapMutex):
2832 (WebCore::threadMap):
2833 (WebCore::storeThreadHandleByIdentifier):
2834 (WebCore::identifierByThreadHandle):
2835 (WebCore::threadHandleForIdentifier):
2836 (WebCore::clearThreadHandleForIdentifier):
2837 (WebCore::createThread):
2838 (WebCore::waitForThreadCompletion):
2839 (WebCore::detachThread):
2840 (WebCore::currentThread):
2842 2007-12-18 Rodney Dawes <dobey@wayofthemonkey.com>
2844 Reviewed by Darin Adler.
2846 Handle EINTR when set by select() and try the select() again
2847 http://bugs.webkit.org/show_bug.cgi?id=16071
2849 * platform/network/curl/ResourceHandleManager.cpp:
2850 (ResourceHandleManager::downloadTimerCallback):
2852 2007-12-18 Dan Bernstein <mitz@apple.com>
2854 Reviewed by Dave Hyatt.
2856 - avoid the simplified Chinese font linking code for characters that are
2857 not in any Windows code page
2859 * platform/graphics/win/FontCacheWin.cpp:
2860 (WebCore::FontCache::getFontDataForCharacters):
2862 2007-12-18 Brady Eidson <beidson@apple.com>
2866 <rdar://problem/5525770> REGRESSION: HTTP Auth protected favicon request results in a password sheet
2868 Some http-auth protected sites have the main resource(s) unprotected, but many subresources are
2869 protected by authentication. Occasionally one can view the main page of a site but the favicon
2870 is behind the iron curtain - in these cases, we should *not* prompt for a username and password
2871 solely for the favicon.
2873 * loader/ResourceLoader.h: Make didReceiveAuthenticationChallenge virtual
2875 * loader/SubresourceLoader.cpp:
2876 (WebCore::SubresourceLoader::didReceiveAuthenticationChallenge): Now that this method
2877 is virtual from ResourceLoader, SubresourceLoader can override. First call to the
2878 SubresourceLoaderClient. If they cancel the resource load, return early. Otherwise, let
2879 ResourceLoader work its magic (resulting in the auth sheet coming down)
2880 * loader/SubresourceLoader.h:
2882 * loader/SubresourceLoaderClient.h:
2883 (WebCore::SubresourceLoaderClient::didReceiveAuthenticationChallenge):
2885 * loader/icon/IconLoader.cpp:
2886 (WebCore::IconLoader::didReceiveAuthenticationChallenge): Cancel the resource load, since we should
2887 never prompt the user for credentials just for a favicon.
2888 * loader/icon/IconLoader.h:
2890 2007-12-18 John Sullivan <sullivan@apple.com>
2894 - fixed <rdar://problem/5652380> Initial prompt shows "" for databases with no user-visible name
2896 * storage/DatabaseTracker.cpp:
2897 (WebCore::DatabaseTracker::canEstablishDatabase):
2898 pass "name" instead of "displayName" if there's no displayName
2900 2007-12-17 Dan Bernstein <mitz@apple.com>
2902 Reviewed by Maciej Stachowiak.
2904 - restore ButtonFace and ThreeDFace to their previous values for non-Mac
2905 platforms. The Mac port also uses the same values for now instead
2906 of NSColor-based ones.
2908 * rendering/RenderTheme.cpp:
2909 (WebCore::RenderTheme::systemColor):
2911 2007-12-17 Rodney Dawes <dobey@wayofthemonkey.com>
2913 Reviewed by Maciej Stachowiak.
2915 Define WTF_USE_NPOBJECT and WTF_USE_JAVASCRIPTCORE_BINDINGS for GTK+
2916 Add required Frame::createScriptInstanceForWidget to FrameGtk
2919 * page/gtk/FrameGtk.cpp (Frame::createScriptInstanceForWidget):
2921 2007-12-17 Alice Liu <alice.liu@apple.com>
2925 Fixed <rdar://5566435> window with no scrollbars can be scrolled
2927 * platform/win/ScrollViewWin.cpp:
2928 (WebCore::ScrollView::maximumScroll):
2929 corrected maximumScroll() to account for scrolling not allowed.
2930 (WebCore::ScrollView::wheelEvent):
2932 2007-12-14 Juan A. Suarez Romero <jasuarez@igalia.com>
2934 Reviewed by Alp Toker.
2936 http://bugs.webkit.org/show_bug.cgi?id=16042
2937 [GTK] Eliminate webkit_init()
2939 Move webkit initialization to WebView class init.
2943 2007-12-17 Jon Honeycutt <jhoneycutt@apple.com>
2947 <rdar://problem/5651291> REGRESSION: Flash content doesn't display
2950 We were passing NPEvent** instead of NPEvent* to NPP_HandleEvent.
2952 * plugins/win/PluginViewWin.cpp:
2953 (WebCore::PluginViewWin::dispatchNPEvent): Changed to take NPEvent&, not
2955 (WebCore::PluginViewWin::paint): Pass NPEvent, not NPEvent*
2956 (WebCore::PluginViewWin::handleKeyboardEvent): same
2957 (WebCore::PluginViewWin::handleMouseEvent): same
2958 * plugins/win/PluginViewWin.h:
2960 2007-12-17 Alexey Proskuryakov <ap@webkit.org>
2964 Live to the promise of never making AppKit special character codes visible via DOM.
2966 Test: fast/events/arrow-keys-on-body.html
2968 * page/EventHandler.cpp:
2969 (WebCore::EventHandler::keyEvent): Check for empty keypress characters after disambiguation,
2970 to let quirks-aware code strip special charactrers.
2971 * platform/mac/KeyEventMac.mm:
2972 (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): If not in keyboard event quirks
2973 mode, remove the text if it's a special character.
2975 2007-12-17 Mark Rowe <mrowe@apple.com>
2977 Reviewed by Darin Adler.
2979 Fix incorrect array size and incorrect array index in convertNSColorToColor.
2981 * rendering/RenderThemeMac.mm:
2982 (WebCore::convertNSColorToColor):
2984 2007-12-17 Darin Adler <darin@apple.com>
2986 Reviewed by Mark Rowe.
2988 - fix http://bugs.webkit.org/show_bug.cgi?id=16468
2989 REGRESSION(r28781): Crash running storage/transaction_callback_exception_crash.html
2991 * storage/DatabaseThread.cpp:
2992 (WebCore::DatabaseThread::dispatchNextTaskIdentifier): Use a RefPtr for the database
2993 because there's no guarantee it won't lose its last reference otherwise.
2995 2007-12-17 Dan Bernstein <mitz@apple.com>
2997 Reviewed by Maciej Stachowiak.
2999 - fix <rdar://problem/5333260> Some Chinese characters in Text Encoding menu are bold, others are not
3000 and <rdar://problem/5280188> Chinese text looks worse on Safari for Windows cf. Safari for Mac
3002 * platform/graphics/win/FontCacheWin.cpp:
3003 (WebCore::FontCache::getFontDataForCharacters): To ensure that font
3004 linking gives consistent results for characters that are exclusive to
3005 the simplified Chinese code page and characters that belong to that
3006 code page and other code pages, always ask to map to simplified Chinese
3009 2007-12-17 Christian Dywan <christian@twotoasts.de>
3011 Reviewed by Alp Toker.
3013 http://bugs.webkit.org/show_bug.cgi?id=16378
3014 Implement Icon for Gtk
3016 Icon provides a GdkPixbuf containing a themed icon.
3017 The icon theme is probed for an icon name according to the
3018 Icon Naming Specification or conventional Gnome icon names respectively.
3020 See http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
3022 * platform/graphics/Icon.h:
3023 * platform/graphics/gtk/IconGtk.cpp:
3024 (WebCore::Icon::~Icon):
3025 (WebCore::lookupIconName):
3026 (WebCore::Icon::newIconForFile):
3027 (WebCore::Icon::paint):
3029 2007-12-16 Sam Weinig <sam@webkit.org>
3033 Fix for http://bugs.webkit.org/show_bug.cgi?id=16466
3034 Move the JS Location object to its own file
3036 - Move Location into its own file and rename it JSLocation.
3038 * DerivedSources.make:
3040 * WebCore.vcproj/WebCore.vcproj:
3041 * WebCore.xcodeproj/project.pbxproj:
3042 * WebCoreSources.bkl:
3043 * bindings/js/JSDocumentCustom.cpp:
3044 * bindings/js/JSLocation.cpp: Copied from WebCore/bindings/js/kjs_window.cpp.
3046 (WebCore::JSLocation::JSLocation):
3047 (WebCore::JSLocation::getValueProperty):
3048 (WebCore::JSLocation::getOwnPropertySlot):
3049 (WebCore::JSLocation::put):
3050 (WebCore::JSLocationProtoFuncReplace::callAsFunction):
3051 (WebCore::JSLocationProtoFuncReload::callAsFunction):
3052 (WebCore::JSLocationProtoFuncAssign::callAsFunction):
3053 (WebCore::JSLocationProtoFuncToString::callAsFunction):
3054 * bindings/js/JSLocation.h: Copied from WebCore/bindings/js/kjs_window.h.
3055 (WebCore::JSLocation::):
3056 (WebCore::JSLocation::frame):
3057 (WebCore::JSLocation::classInfo):
3058 * bindings/js/kjs_window.cpp:
3059 (KJS::Window::location):
3060 * bindings/js/kjs_window.h:
3061 * history/CachedPage.cpp:
3063 2007-12-16 Dan Bernstein <mitz@apple.com>
3065 Reviewed by Sam Weinig.
3067 - make 'cursor: copy' and 'cursor: none' work.
3069 Already covered by manual-tests/cursor.html
3071 * rendering/RenderStyle.h: Increase the _cursor_style field to 6 bits,
3072 needed for the 33rd and 34th cursor values.
3074 2007-12-16 Mark Rowe <mrowe@apple.com>
3076 Reviewed by Maciej Stachowiak.
3078 Refactor Mac plugin stream code to use the shared NetscapePlugInStreamLoader implementation.
3081 * WebCore.xcodeproj/project.pbxproj:
3082 * loader/NetscapePlugInStreamLoader.h:
3083 * loader/mac/NetscapePlugInStreamLoaderMac.mm: Removed.
3084 * loader/mac/WebPlugInStreamLoaderDelegate.h: Moved to WebKit.
3086 2007-12-16 Sam Weinig <sam@webkit.org>
3090 Yet more of http://bugs.webkit.org/show_bug.cgi?id=16385
3093 - Move ScheduledAction into its own file and put it in the WebCore namespace.
3096 * WebCore.vcproj/WebCore.vcproj:
3097 * WebCore.xcodeproj/project.pbxproj:
3098 * WebCoreSources.bkl:
3099 * bindings/js/PausedTimeouts.cpp:
3100 * bindings/js/PausedTimeouts.h:
3101 * bindings/js/ScheduledAction.cpp: Copied from bindings/js/kjs_window.cpp.
3102 (WebCore::ScheduledAction::ScheduledAction):
3103 (WebCore::ScheduledAction::execute):
3104 * bindings/js/ScheduledAction.h: Copied from bindings/js/kjs_window.h.
3105 (WebCore::ScheduledAction::ScheduledAction):
3106 * bindings/js/kjs_window.cpp:
3107 (KJS::DOMWindowTimer::DOMWindowTimer):
3108 (KJS::DOMWindowTimer::action):
3109 (KJS::DOMWindowTimer::takeAction):
3110 (KJS::Window::installTimeout):
3111 (KJS::Window::timerFired):
3112 * bindings/js/kjs_window.h:
3114 2007-12-16 Alp Toker <alp@atoker.com>
3118 http://bugs.webkit.org/show_bug.cgi?id=16356
3119 [GTK] Integrate GStreamer video with the graphics backend
3121 Integrate the GStreamer media backend with the Cairo graphics backend.
3122 There are still some issues: Data is copied more often than necessary,
3123 and repaint() is not called, causing transformed video not to update
3127 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3128 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3129 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3130 (WebCore::MediaPlayerPrivate::currentTime):
3131 (WebCore::MediaPlayerPrivate::setEndTime):
3132 (WebCore::MediaPlayerPrivate::seeking):
3133 (WebCore::MediaPlayerPrivate::naturalSize):
3134 (WebCore::MediaPlayerPrivate::setMuted):
3135 (WebCore::MediaPlayerPrivate::setRect):
3136 (WebCore::MediaPlayerPrivate::setVisible):
3137 (WebCore::MediaPlayerPrivate::repaint):
3138 (WebCore::MediaPlayerPrivate::paint):
3139 (WebCore::MediaPlayerPrivate::createGSTPlayBin):
3140 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
3141 * platform/graphics/gtk/VideoSinkGStreamer.cpp: Added.
3142 (webkit_video_sink_base_init):
3143 (webkit_video_sink_init):
3144 (webkit_video_sink_idle_func):
3145 (webkit_video_sink_render):
3146 (webkit_video_sink_set_caps):
3147 (webkit_video_sink_dispose):
3148 (webkit_video_sink_finalize):
3149 (webkit_video_sink_set_property):
3150 (webkit_video_sink_get_property):
3151 (webkit_video_sink_stop):
3152 (webkit_video_sink_class_init):
3153 (webkit_video_sink_new):
3154 (webkit_video_sink_set_surface):
3156 * platform/graphics/gtk/VideoSinkGStreamer.h: Added.
3158 2007-12-16 Mark Rowe <mrowe@apple.com>
3162 * WebCore.xcodeproj/project.pbxproj: Remove NetscapePlugInStreamLoader.cpp from the WebCore target.
3163 Mac currently has its own implementation in NetscapePlugInStreamLoaderMac.mm which conflicts with the
3164 new shared implementation.
3166 2007-12-16 Rodney Dawes <dobey@wayofthemonkey.com>
3168 Reviewed by Maciej Stachowiak.
3170 http://bugs.webkit.org/show_bug.cgi?id=16389
3171 Bug 16389: Common Implementation of NetscapePlugInStreamLoader
3173 * WebCore.vcproj/WebCore.vcproj: Remove NetscapePlugInStreamLoaderWin.cpp.
3174 * loader/NetscapePlugInStreamLoader.cpp: Copy method implementations from NetscapePlugInStreamLoaderWin.cpp.
3175 * loader/win/NetscapePlugInStreamLoaderWin.cpp: Removed.
3177 2007-12-16 Grace Kloba <klobag@gmail.com>
3179 Reviewed by Darin Adler.
3181 Fix http://bugs.webkit.org/show_bug.cgi?id=16433.
3182 Bug 16433: LOW_BANDWIDTH_DISPLAY build is broken
3185 (WebCore::Document::Document):
3186 * loader/FrameLoader.cpp:
3187 (WebCore::FrameLoader::addLowBandwidthDisplayRequest):
3188 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
3190 2007-12-16 Darin Adler <darin@apple.com>
3194 - fix <rdar://problem/5636065> First form of SQLTransaction.executeSql() fails with TYPE_ERROR dom exception
3196 Test: storage/execute-sql-args.html
3198 * bindings/js/JSSQLTransactionCustom.cpp:
3199 (WebCore::JSSQLTransaction::executeSql): Added exception handling code so that once an
3200 exception happens, we won't try to do any more argument processing. Changed processing
3201 of the second argument so that we allow an undefined value or null, and simply omit the
3202 array. Changed processing of the second argument so that we don't require an actual
3203 JavaScript array. Instead, as with the JavaScript array operations themselves, we use
3204 the length property and corresponding numeric properties of the object, allowing other
3205 objects to act as arrays. Changed processing of the third and fourth arguments to
3206 allow the undefined value as well as null; we check the value of the argument rather
3207 than looking at the size of the passed-in arguments list.
3209 2007-12-16 Sam Weinig <sam@webkit.org>
3213 More of http://bugs.webkit.org/show_bug.cgi?id=16385
3216 - Move PausedTimeouts into its own file and put it in the WebCore namespace.
3219 * WebCore.vcproj/WebCore.vcproj:
3220 * WebCore.xcodeproj/project.pbxproj:
3221 * WebCoreSources.bkl:
3222 * bindings/js/PausedTimeouts.cpp: Copied from bindings/js/kjs_window.cpp.
3223 * bindings/js/PausedTimeouts.h: Copied from bindings/js/kjs_window.h.
3224 * bindings/js/kjs_window.cpp:
3225 (KJS::Window::pauseTimeouts):
3226 * bindings/js/kjs_window.h:
3227 * history/CachedPage.cpp:
3228 * history/CachedPage.h:
3231 2007-12-16 Beth Dakin <bdakin@apple.com>
3235 Make relative-size SVGs work in border-image.
3237 * rendering/RenderBox.cpp:
3238 (WebCore::RenderBox::calculateBackgroundSize):
3239 * rendering/RenderObject.cpp:
3240 (WebCore::RenderObject::paintBorderImage):
3242 2007-12-16 Darin Adler <darin@apple.com>
3244 - fix Tiger build (my fault it was broken)
3246 * rendering/RenderThemeMac.mm: Define NSUInteger if on Tiger.
3248 2007-12-16 Andrew Wellington <proton@wiretapped.net>
3252 http://bugs.webkit.org/show_bug.cgi?id=6129
3253 Incomplete implementation of CSS 2.1 system colors
3255 Test: fast/css/css2-system-color.html
3257 Based on original patch by Rob Buis.
3259 System colors are retrieved from NSColor as appropriate. If the color is a pattern color
3260 (and therefore NSColor won't let us retrieve a color from it) we draw a 1x1 image of the
3261 color and sample that to get a solid color.
3263 * css/CSSStyleSelector.cpp:
3265 (WebCore::colorForCSSValue):
3266 * rendering/RenderTheme.cpp:
3267 (WebCore::RenderTheme::systemColor):
3268 * rendering/RenderTheme.h:
3269 * rendering/RenderThemeMac.h:
3270 * rendering/RenderThemeMac.mm:
3271 (WebCore::getSystemColor):
3272 (WebCore::RenderThemeMac::platformColorsDidChange):
3273 (WebCore::RenderThemeMac::systemColor):
3275 2007-12-16 Dan Bernstein <mitz@apple.com>
3277 Reviewed by Darin Adler.
3279 - fix http://bugs.webkit.org/show_bug.cgi?id=16426
3280 Divs with overflow:auto: scrollbars not correctly updated when contents change
3282 Test: fast/overflow/scrollbar-position-update.html
3284 * platform/mac/PlatformScrollBarMac.mm:
3285 (WebCore::PlatformScrollbar::updateThumbProportion): Update the
3286 NSScroller's value for the new proportions.
3287 * rendering/RenderLayer.cpp:
3288 (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed unnecessary
3289 repaint(). Scrollbars repaint themselves as needed.
3291 2007-12-16 Alexey Proskuryakov <ap@webkit.org>
3295 http://bugs.webkit.org/show_bug.cgi?id=14140
3296 <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly
3298 * dom/KeyboardEvent.h:
3299 (WebCore::KeypressCommand::KeypressCommand):
3300 (WebCore::KeyboardEvent::keypressCommands):
3301 Change stored command class to preserve complete information about commands.
3303 * editing/EditorCommand.cpp: (WebCore::CommandEntry::): Mark InsertText as a text insertion
3304 command, which it is. Previously, we couldn't do it because WebKit didn't really treat insertText:
3307 * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Copy commands saved while interpreting
3308 a keydown event into keypress, to avoid losing state when running interpretKeyEvents: again.
3310 2007-12-16 Alexey Proskuryakov <ap@webkit.org>
3314 http://bugs.webkit.org/show_bug.cgi?id=16462
3315 REGRESSION: access keys broken on Windows
3317 * page/EventHandler.cpp:
3318 (WebCore::EventHandler::handleAccessKey):
3319 (WebCore::EventHandler::keyEvent):
3320 * page/EventHandler.h:
3321 Make handleAccessKey a class method; rely on WebKit to call it on Windows and wxWidgets.
3323 2007-12-16 Xan Lopez <xan@gnome.org>
3325 Reviewed by Alexey Proskuryakov.
3327 http://bugs.webkit.org/show_bug.cgi?id=16454
3328 [GTK] Text input doesn't work consistently on PPC
3330 * platform/gtk/KeyEventGtk.cpp:
3331 (WebCore::singleCharacterString):
3333 UChar is 2 bytes (UTF-16), so transform accordingly from
3334 gunichar (UCS-4). Fixes keyboard input on big endian systems.
3336 2007-12-15 Darin Adler <darin@apple.com>
3338 Reviewed by Mark Rowe.
3340 - better build fix for the problem affecting GTK and some other platforms
3341 "this time for sure"
3343 * WebCore.xcodeproj/project.pbxproj:
3344 * bindings/js/JSEventTargetBase.cpp: Move the include of the .lut.h file here.
3345 * bindings/js/JSEventTargetBase.h: Instead of including the .lut.h file in the header,
3346 which won't work, declare the tables that are in the .lut.h file in the header.
3348 2007-12-12 Kevin Watters <kevin@dotsyntax.com>
3350 Reviewed by Darin Adler.
3352 Fixed the Wx port's FontPlatformData for use in HashTable.
3353 - FontPlatformData(Deleted) made unequal to FontPlatformData()
3355 * platform/graphics/wx/FontPlatformData
3357 2007-12-15 Dan Bernstein <mitz@apple.com>
3359 Reviewed by Darin Adler.
3361 - fix <rdar://problem/5636090> Text in Georgia, Armenian, Inuktitut, Cree, or Cherokee (KA, HY, IU, CR, CHR) draws as all missing glyphs
3363 * platform/graphics/win/FontCacheWin.cpp:
3364 (WebCore::metaFileEnumProc): Added. Called during metafile record
3365 enumeration and extracts the font from the create font record.
3366 (WebCore::FontCache::getFontDataForCharacters): If font linking fails,
3367 let Uniscribe draw the characters and see what font it chooses.
3369 2007-12-15 Darin Adler <darin@apple.com>
3371 * WebCore.pro: Roll my last change out. Was wrong and didn't fix the build.
3373 2007-12-15 Darin Adler <darin@apple.com>
3375 Another try at a GTK build fix.
3377 * WebCore.pro: Add JSEventTargetBase.cpp to LUT_TABLE_FILES instead of LUT_FILES.
3379 2007-12-15 Sam Weinig <sam@webkit.org>
3381 Force windows to regenerate COM DOM bindings.
3383 * WebCore.vcproj/build-generated-files.sh: Add license.
3384 * bindings/scripts/CodeGeneratorCOM.pm: Use shared WK_ucfirst.
3386 2007-12-15 Sam Weinig <sam@webkit.org>
3388 Fix Windows and wx builds.
3390 * WebCore.vcproj/WebCore.vcproj:
3391 * WebCoreSources.bkl:
3393 2007-12-15 Mark Rowe <mrowe@apple.com>
3395 Gtk build fix. Add JSEventTargetBase.cpp to SOURCES.
3399 2007-12-15 Sam Weinig <sam@webkit.org>
3403 * WebCoreSources.bkl:
3405 2007-12-15 Nikolas Zimmermann <zimmermann@kde.org>
3407 Not reviewed. Build fix for Qt/Gtk.
3409 * WebCore.pro: Include JSEventTargetBase.lut.h in generation
3411 2007-12-15 Nikolas Zimmermann <zimmermann@kde.org>
3415 Fixes: http://bugs.webkit.org/show_bug.cgi?id=16445 (Refactor EventTargetNode & JSEventTargetNode for an upcoming SVG patch)
3417 Split up JSEventTargetNode in JSEventTargetNode & JSEventTargetBase - where most functionality has been moved down
3418 in the base class. Applied the same refactorization to EventTargetNode.
3420 This makes it possible for the upcoming patch implementing the EventTarget interface for SVGElementInstance
3421 to share as much code as possible with the EventTargetNode classes.
3423 * DerivedSources.make:
3424 * WebCore.xcodeproj/project.pbxproj:
3425 * bindings/js/JSEventTargetBase.cpp: Added.
3426 (WebCore::retrieveEventTargetAndCorrespondingNode):
3427 (WebCore::eventNameForPropertyToken):
3428 * bindings/js/JSEventTargetBase.h: Added.
3429 (WebCore::JSEventTargetProperties::):
3430 (WebCore::JSEventTargetPrototypeFunctionBase::JSEventTargetPrototypeFunctionBase):
3431 (WebCore::JSEventTargetPrototypeFunction::JSEventTargetPrototypeFunction):
3433 (WebCore::::create):
3434 (WebCore::JSEventTargetBase::JSEventTargetBase):
3435 (WebCore::JSEventTargetBase::getValueProperty):
3436 (WebCore::JSEventTargetBase::putValueProperty):
3437 (WebCore::JSEventTargetBase::getOwnPropertySlot):
3438 (WebCore::JSEventTargetBase::put):
3439 (WebCore::JSEventTargetPrototype::JSEventTargetPrototype):
3440 (WebCore::JSEventTargetPrototype::self):
3441 (WebCore::JSEventTargetPrototype::getOwnPropertySlot):
3442 (WebCore::JSEventTargetPrototype::classInfo):
3443 * bindings/js/JSEventTargetNode.cpp:
3444 (WebCore::JSEventTargetNode::getOwnPropertySlot):
3445 (WebCore::JSEventTargetNode::getValueProperty):
3446 (WebCore::JSEventTargetNode::put):
3447 (WebCore::JSEventTargetNode::putValueProperty):
3448 (WebCore::JSEventTargetNode::setListener):
3449 (WebCore::toEventTargetNode):
3450 * bindings/js/JSEventTargetNode.h:
3451 (WebCore::JSEventTargetPrototypeInformation::prototypeClassName):
3452 (WebCore::JSEventTargetPrototypeInformation::prototypeIdentifier):
3453 * dom/EventTarget.cpp:
3454 (WebCore::EventTarget::addEventListener):
3455 (WebCore::EventTarget::removeEventListener):
3456 (WebCore::EventTarget::dispatchGenericEvent):
3457 (WebCore::EventTarget::removeAllEventListeners):
3458 (WebCore::EventTarget::insertedIntoDocument):
3459 (WebCore::EventTarget::removedFromDocument):
3460 (WebCore::EventTarget::handleLocalEvents):
3461 (WebCore::EventTarget::applySVGEventTargetRules):
3462 (WebCore::forbidEventDispatch):
3463 (WebCore::allowEventDispatch):
3464 (WebCore::eventDispatchForbidden):
3465 * dom/EventTarget.h:
3466 (WebCore::EventTarget::preDispatchEventHandler):
3467 (WebCore::EventTarget::postDispatchEventHandler):
3468 (WebCore::forbidEventDispatch):
3469 (WebCore::allowEventDispatch):
3470 * dom/EventTargetNode.cpp:
3471 (WebCore::EventTargetNode::~EventTargetNode):
3472 (WebCore::EventTargetNode::insertedIntoDocument):
3473 (WebCore::EventTargetNode::removedFromDocument):
3474 (WebCore::EventTargetNode::addEventListener):
3475 (WebCore::EventTargetNode::removeEventListener):
3476 (WebCore::EventTargetNode::removeAllEventListeners):
3477 (WebCore::EventTargetNode::handleLocalEvents):
3478 (WebCore::EventTargetNode::dispatchEvent):
3479 (WebCore::EventTargetNode::dispatchWindowEvent):
3480 * dom/EventTargetNode.h:
3481 (WebCore::EventTargetNode::localEventListeners):
3482 * svg/SVGElement.cpp:
3483 (WebCore::SVGElement::sendSVGLoadEventIfPossible):
3484 (WebCore::SVGElement::dispatchEvent):
3486 2007-12-15 Eric Seidel <eric@webkit.org>
3490 Width of SVG elements not applied to container elements
3491 http://bugs.webkit.org/show_bug.cgi?id=16305
3492 Added calcPrefWidths for RenderSVGRoot (copied from RenderReplaced)
3493 This is caused by poor factoring in the render tree. RenderContainer probably should be a template.
3495 svg/css/css-box-min-width.html
3497 * rendering/RenderSVGRoot.cpp:
3498 (WebCore::RenderSVGRoot::calcPrefWidths): Added.
3499 * rendering/RenderSVGRoot.h:
3500 * css/SVGCSSStyleSelector::applySVGProperty: fixed ASSERT in debug builds
3502 2007-12-15 David Kilzer <ddkilzer@apple.com>
3504 Fix comment after isSafeScript() was renamed to allowsAccessFrom().
3506 * bindings/js/kjs_window.cpp:
3507 (KJS::createWindow):
3509 2007-12-15 Alp Toker <alp@atoker.com>
3511 Reviewed by Mark Rowe.
3513 http://bugs.webkit.org/show_bug.cgi?id=16449
3514 cairo_arc() functions hang or crash when passed inf as radius or start/end angle
3516 Add checks. This matches a similar workaround for a CG bug in the CG
3517 graphics backend: <rdar://problem/5189233>
3520 fast/canvas/arc-crash.html
3521 fast/canvas/canvas-with-incorrect-args.html
3523 * platform/graphics/cairo/PathCairo.cpp:
3524 (WebCore::Path::addArc):
3526 2007-12-15 Alexey Proskuryakov <ap@webkit.org>
3530 http://bugs.webkit.org/show_bug.cgi?id=16078
3531 Google Maps zooming via the scroll wheel (almost) always zooms IN only.
3533 * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent):
3534 Ensure that delta is never rounded down to zero - we are getting values less than 1 from
3535 many mice on OS X, and Google Maps code assumes scrolling up if event.wheelDelta is zero.
3537 2007-12-14 Dan Bernstein <mitz@apple.com>
3541 * WebCore.vcproj/WebCore.vcproj:
3543 2007-12-14 Alp Toker <alp@atoker.com>
3545 GTK+/Qt build fix. Track added files in r28722.
3549 2007-12-14 Sam Weinig <sam@webkit.org>
3553 Speed up getElementByClassName.
3554 - This makes getElementByClassName 33% faster on the stress test
3555 linked to at http://bugs.webkit.org/show_bug.cgi?id=15760.
3557 * platform/text/StringImpl.cpp:
3558 (WebCore::StringImpl::foldCase): Optimize the case when all the characters are ASCII.
3560 2007-12-14 Alp Toker <alp@atoker.com>
3564 http://bugs.webkit.org/show_bug.cgi?id=16432
3565 [GTK] Update license headers
3567 Consent has been given by the authors of these files to change license
3568 to the LGPL as outlined in the bug report.
3570 * platform/gtk/ClipboardGtk.cpp:
3571 * platform/gtk/ContextMenuGtk.cpp:
3572 * platform/gtk/ContextMenuItemGtk.cpp:
3573 * platform/gtk/CookieJarGtk.cpp:
3574 * platform/gtk/CursorGtk.cpp:
3575 * platform/gtk/DragDataGtk.cpp:
3576 * platform/gtk/DragImageGtk.cpp: