1 2008-01-06 Alexey Proskuryakov <ap@webkit.org>
5 http://bugs.webkit.org/show_bug.cgi?id=16701
6 <rdar://problem/5666580> REGRESSION: URL-encoded space (%20) in livejournal url
9 Test: http/tests/misc/location-with-space.php
11 * platform/network/cf/ResourceRequestCFNet.cpp:
12 (WebCore::ResourceRequest::doUpdatePlatformRequest): Do update its URL, too.
14 2008-01-06 Andrew Wellington <proton@wiretapped.net>
18 DOMRange.cloneContents does not work (Acid3 bug)
19 http://bugs.webkit.org/show_bug.cgi?id=16748
21 When cloning an empty range, return an empty DocmentFragment instead of
24 Test: fast/dom/Range/range-clone-empty.html
27 (WebCore::Range::processContents):
29 2008-01-06 Luca Bruno <lethalman88@gmail.com>
31 Reviewed by Alp Toker.
33 Remove curl handles immediately if the timer is not running.
35 * platform/network/curl/ResourceHandleManager.cpp:
36 (WebCore::ResourceHandleManager::cancel):
38 2008-01-06 Alp Toker <alp@atoker.com>
42 Cairo canvas refcounting fix. Reference the surface in the constructor
43 to match its destruction in the destructor.
45 Fixes a crash triggered by leaving this page:
46 http://philip.html5.org/tests/canvas/misc/globalalpha-pattern.html
48 * html/CanvasPattern.cpp:
49 (WebCore::CanvasPattern::CanvasPattern):
51 2008-01-06 Eric Seidel <eric@webkit.org>
55 Fix :checked matching type='text' and add test case
56 http://bugs.webkit.org/show_bug.cgi?id=16750
58 Test: fast/dom/HTMLInputElement/checked-pseudo-selector.html
60 * html/HTMLInputElement.h: isChecked() can only be true for RADIO or CHECKBOX
62 2008-01-05 Sam Weinig <sam@webkit.org>
64 Reviewed by Eric Seidel.
66 Patch for http://bugs.webkit.org/show_bug.cgi?id=16758
67 ASSERT when using TreeWalker methods for a current node outside of the root (Acid3)
69 - Ensure that returned nodes are within the root node, or return 0, in adherence with the spec.
71 Test: fast/dom/TreeWalker/TreeWalker-currentNode.html
74 (WebCore::TreeWalker::parentNode):
75 (WebCore::TreeWalker::firstChild):
76 (WebCore::TreeWalker::lastChild):
77 (WebCore::TreeWalker::previousSibling):
78 (WebCore::TreeWalker::nextSibling):
79 (WebCore::TreeWalker::previousNode):
80 (WebCore::TreeWalker::nextNode):
82 2008-01-04 Oliver Hunt <oliver@apple.com>
84 Reviewed by Beth Dakin.
86 Fix bounds computation bugs responsible for http://bugs.webkit.org/show_bug.cgi?id=16015
87 and other image repaint bugs.
89 We now cache the full local bounds for the <image> element, as otherwise certain
90 combinations of attribute changes could result in incorrect dirty rects.
91 Additionally we no longer use any of the integer bounds fields on RenderObject for
92 determining repaint bounds (this was the principle cause of bug #16015).
94 I also removed the outline painting code as it was both wrong, and not correctly
95 repainted. I feel safe doing this as no other browser or viewer supports outline
96 properties on svg elements.
98 I was unable to make a testcase for this unfortunately, despite seemingly deterministic
101 * rendering/RenderSVGImage.cpp:
102 (WebCore::RenderSVGImage::layout):
103 (WebCore::RenderSVGImage::paint):
104 (WebCore::RenderSVGImage::nodeAtPoint):
105 (WebCore::RenderSVGImage::calculateAbsoluteBounds):
106 * rendering/RenderSVGImage.h:
108 2008-01-04 Beth Dakin <bdakin@apple.com>
112 Fix for http://bugs.webkit.org/show_bug.cgi?id=16704 input with
113 type="hidden" matches :enabled/:disabled (Acid3 bug)
115 Prevent :enabled and :disabled from applying to input type="hidden"
117 * css/CSSStyleSelector.cpp:
118 (WebCore::CSSStyleSelector::checkOneSelector): Rather than
119 allowing :enabled and :disabled to apply to all controls, only
120 allow it to apply to non-"hidden" controls
122 (WebCore::Element::isInputTypeHidden):
123 * html/HTMLInputElement.h:
124 (WebCore::HTMLInputElement::isInputTypeHidden):
126 2008-01-04 Sam Weinig <sam@webkit.org>
128 Reviewed by Oliver Hunt.
130 - Match the spec when calling getFloatValue, getStringValue, getCounterValue,
131 getRectValue and getRGBColorValue of CSSPrimitiveValue by throwing exceptions
132 if the type of the CSSPrimitiveValue is not the same as the type requested.
133 - Fix the intermittent assertion failure seen in svg/css/glyph-orientation-rounding-test.xhtml
135 Test: fast/css/CSSPrimitiveValue-exceptions.html
137 * css/CSSPrimitiveValue.cpp:
138 (WebCore::CSSPrimitiveValue::getDoubleValue):
139 (WebCore::CSSPrimitiveValue::getStringValue):
140 (WebCore::CSSPrimitiveValue::getCounterValue):
141 (WebCore::CSSPrimitiveValue::getRectValue):
142 (WebCore::CSSPrimitiveValue::getRGBColorValue):
143 (WebCore::CSSPrimitiveValue::getPairValue):
144 * css/CSSPrimitiveValue.h:
145 (WebCore::CSSPrimitiveValue::getFloatValue):
146 (WebCore::CSSPrimitiveValue::getIntValue):
147 (WebCore::CSSPrimitiveValue::getCounterValue):
148 (WebCore::CSSPrimitiveValue::getRectValue):
149 (WebCore::CSSPrimitiveValue::getDashboardRegionValue):
150 * css/CSSPrimitiveValue.idl:
152 2008-01-04 Antti Koivisto <antti@apple.com>
156 Windows part of <rdar://problem/5647034>
157 Media tests crash if an old version of QuickTime is installed
159 Check QuickTime version on Windows too.
161 * platform/graphics/MediaPlayer.cpp:
162 (WebCore::MediaPlayer::isAvailable):
163 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
164 (WebCore::MediaPlayerPrivate::isAvailable):
165 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
166 (WebCore::MediaPlayerPrivate::isAvailable):
167 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
168 * platform/graphics/win/QTMovieWin.cpp:
169 (QTMovieWin::initializeQuickTime):
171 2008-01-04 Darin Adler <darin@apple.com>
173 Reviewed by Maciej and Alice.
175 - fix <rdar://problem/4404302> Borders where there should be none (canadasmountains.com)
177 Test: fast/images/border.html
179 * html/HTMLImageElement.cpp:
180 (WebCore::HTMLImageElement::parseMappedAttribute): Change the code that handles cases
181 where the border value is not a number to use the value "0" for the border width instead
182 of not setting the border width and style at all. This matches other browsers, and makes
185 2008-01-04 Antti Koivisto <antti@apple.com>
187 Try to fix 64-bit build
189 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
190 (WebCore::MediaPlayerPrivate::isAvailable):
192 2008-01-04 Stephanie <slewis@apple.com>
196 WARNING: NO TEST CASES ADDED OR CHANGED
198 Fix another stringImpl leak.
200 * platform/text/StringImpl.cpp: remove an extra allocation
201 (WebCore::StringImpl::StringImpl):
203 2008-01-04 Alice Liu <alice.liu@apple.com>
207 * platform/graphics/win/FontCacheWin.cpp:
208 fix loop condition that was causing crash
210 2008-01-04 Timothy Hatcher <timothy@apple.com>
212 Reviewed by Adam Roben.
214 <rdar://problem/5671059> Always show the Timeline and Console buttons in the Inspector
216 * page/inspector/inspector.css: Remove styles related to the toggle button
217 and make the area always visible.
218 * page/inspector/inspector.html: Remove the toggle button.
219 * page/inspector/inspector.js: Remove code to toggle the status area.
221 2008-01-04 Alexey Proskuryakov <ap@webkit.org>
223 Reviewed by Adam Roben.
225 Temporarily restore BackwardDelete for Windows nightlies to work correctly.
227 * editing/EditorCommand.cpp: (WebCore::CommandEntry::):
229 2008-01-04 Alexey Proskuryakov <ap@webkit.org>
233 <rdar://problem/5611712> xsl:sort does not use a case folding sort, and the 'case-order' attribute is ignored (16077)
235 Enable the fix on Windows.
237 * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::transformToString):
238 Always set a custom sort function, even if it doesn't implement proper collation on the platform.
240 * xml/XSLTUnicodeSort.cpp:
241 (WebCore::xsltUnicodeSortFunction):
242 * xml/XSLTUnicodeSort.h:
243 If the platform does not use ICU, or ICU has collation support disabled, fall back to binary comparison.
245 2008-01-04 Antti Koivisto <antti@apple.com>
249 * bindings/js/JSHTMLElementWrapperFactory.cpp:
251 2008-01-04 Antti Koivisto <antti@apple.com>
255 Partial fix for <rdar://problem/5647034>
256 Media tests crash if an old version of QuickTime is installed
258 Disable media support if QuickTime is not current enough (>=7.3).
260 Windows patch coming soon.
262 * bindings/js/JSHTMLElementWrapperFactory.cpp:
263 (WebCore::createJSHTMLWrapper):
264 * bindings/js/kjs_window.cpp:
265 (KJS::Window::getValueProperty):
266 * html/HTMLElementFactory.cpp:
267 (WebCore::audioConstructor):
268 (WebCore::videoConstructor):
269 (WebCore::sourceConstructor):
270 * platform/graphics/MediaPlayer.cpp:
271 (WebCore::MediaPlayer::isAvailable):
272 * platform/graphics/MediaPlayer.h:
273 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
274 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
275 (WebCore::MediaPlayerPrivate::isAvailable):
277 2008-01-04 Timothy Hatcher <timothy@apple.com>
279 Reviewed by Darin Adler.
281 <rdar://problem/5604409> JavaScript privilege escalation when Web Inspector accesses page unsafely (16011)
283 Check if the property is a getter before asking for the value.
284 If the property is a getter, we no longer show the value.
286 * page/inspector/PropertiesSidebarPane.js:
287 * page/inspector/inspector.css:
289 2008-01-04 Dan Bernstein <mitz@apple.com>
291 Reviewed by Darin Adler.
293 - fix synthetic bold and italic on Windows
295 Covered by an existing test.
297 * platform/graphics/win/FontPlatformDataWin.cpp:
298 (WebCore::FontPlatformData::FontPlatformData):
300 2008-01-04 Alp Toker <alp@atoker.com>
302 GTK+ autotools build fix. Terminate empty rules.
306 2008-01-04 Lars Knoll <lars@trolltech.com>
310 Remove most dependencies of Widget/ScrollView onto native QWidgets.
312 This also brings the code closer in line with the Windows code. Seems
313 to work nicely on first try :)
315 * page/qt/FrameQt.cpp:
316 (WebCore::Frame::createScriptInstanceForWidget):
318 * platform/qt/PlatformScreenQt.cpp:
319 (WebCore::screenDepth):
320 (WebCore::screenDepthPerComponent):
321 (WebCore::screenIsMonochrome):
322 (WebCore::screenRect):
323 * platform/qt/PlatformScrollBarQt.cpp:
324 (WebCore::PlatformScrollbar::thumbPosition):
325 (WebCore::PlatformScrollbar::handleMouseMoveEvent):
326 * platform/qt/ScrollViewQt.cpp:
327 (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
328 (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
329 (WebCore::ScrollView::updateContents):
330 (WebCore::ScrollView::update):
331 (WebCore::ScrollView::scrollRectIntoViewRecursively):
332 (WebCore::ScrollView::updateScrollbars):
333 (WebCore::ScrollView::addChild):
334 (WebCore::ScrollView::removeChild):
335 (WebCore::ScrollView::paint):
336 * platform/qt/WidgetQt.cpp:
337 (WebCore::WidgetPrivate::WidgetPrivate):
338 (WebCore::WidgetPrivate::~WidgetPrivate):
339 (WebCore::Widget::frameGeometry):
340 (WebCore::Widget::setFrameGeometry):
341 (WebCore::Widget::setCursor):
342 (WebCore::Widget::show):
343 (WebCore::Widget::hide):
344 (WebCore::Widget::nativeWidget):
345 (WebCore::Widget::setNativeWidget):
346 (WebCore::Widget::suppressInvalidation):
347 (WebCore::Widget::setSuppressInvalidation):
348 (WebCore::Widget::invalidateRect):
349 (WebCore::Widget::topLevel):
350 (WebCore::Widget::containingWindow):
352 2008-01-04 Lars Knoll <lars@trolltech.com>
356 make QWebPage a QObject and get things to compile.
358 Nothing works currently though.
360 * platform/qt/ScrollViewQt.cpp:
361 (WebCore::ScrollView::updateContents):
362 (WebCore::ScrollView::update):
363 * platform/qt/WidgetQt.cpp:
364 (WebCore::Widget::qwidget):
365 (WebCore::Widget::invalidateRect):
367 2008-01-04 Alp Toker <alp@atoker.com>
369 Reviewed by Mark Rowe.
371 http://bugs.webkit.org/show_bug.cgi?id=16667
372 make -j is failing with the autotools based system
374 Support parallel code generation. Nearly every use of explicit
375 multiple targets was a potential concurrency bug, though in practice
376 the bison rules were the first to be noticed because they took longer
377 to complete and broke the build immediately.
381 2008-01-04 Alp Toker <alp@atoker.com>
383 Reviewed by Mark Rowe.
385 Re-use a single static dummy surface rather than creating and
386 destroying a surface for each CairoPath.
388 * platform/graphics/cairo/CairoPath.h:
389 (WebCore::CairoPath::CairoPath):
391 2008-01-04 Mark Rowe <mrowe@apple.com>
395 * platform/Threading.h: The OSAtomic functions take non-volatile pointers on Tiger.
397 2008-01-03 Mark Rowe <mrowe@apple.com>
399 Reviewed by Maciej Stachowiak.
401 Use platform-provided atomic operations in place of inline assembly to
402 increase portability.
404 * platform/Threading.h:
405 (WebCore::atomicIncrement):
406 (WebCore::atomicDecrement):
408 2008-01-03 Oliver Hunt <oliver@apple.com>
412 Fix <rdar://problem/5668517> REGRESSION: Major under painting issues in SVG (carto.net dock example)
414 We need to cache the absolute bounds of the <image>,
415 as there's no reliable way to recompute the old bounding
416 box one we have started layout.
418 * rendering/RenderSVGImage.cpp:
419 (WebCore::RenderSVGImage::layout):
420 (WebCore::RenderSVGImage::calculateAbsoluteBounds):
421 * rendering/RenderSVGImage.h:
423 2008-01-03 Alp Toker <alp@atoker.com>
425 Reviewed by Mark Rowe.
427 Support building in Scratchbox, which has a version of make that fails
428 on wildcard syntax. Use a vpath to match IDL files instead.
432 2008-01-03 Jon Honeycutt <jhoneycutt@apple.com>
436 <rdar://problem/5504775> PDF page will not load first time after Adobe
437 Reader install, unless browser is relaunched
439 Refresh and re-search the plugin database if the MIME type is not
442 * plugins/win/PluginDatabaseWin.cpp:
443 (WebCore::PluginDatabaseWin::isMIMETypeRegistered):
444 * plugins/win/PluginDatabaseWin.h:
446 2008-01-03 Dan Bernstein <mitz@apple.com>
448 Reviewed by Darin Adler.
450 - fix http://bugs.webkit.org/show_bug.cgi?id=16548
451 <rdar://problem/5659452> REGRESSION(r28810): Font style and sizes are weird for Japanese text
453 * platform/graphics/win/FontCacheWin.cpp:
454 (WebCore::linkedFontEnumProc): Added. This callback is used to fetch
455 a valid LOGFONT for a given family.
456 (WebCore::getLinkedFonts): Added. Returns a vector of font families
457 linked to the given font family by the Windows registry key
458 HKLM\Software\...\FontLink\SystemLink. The registry values typically
459 differ based on the installed language version of Windows.
460 (WebCore::FontCache::getFontDataForCharacters): Changed to not use MLang
461 font mapping, which is Windows code page based, except for characters in
462 the range U+2000..U+200F. Instead, this function gets the font Uniscribe
463 would use for the character. However, that font might not actually
464 contain the character, in which case GDI font linking would substitute a
465 different font. Therefore, this function walks the linked font list
466 until it finds a font that actually contains the character.
468 2008-01-03 Darin Adler <darin@apple.com>
472 - fix http://bugs.webkit.org/show_bug.cgi?id=16723
473 tables/mozilla/bugs/bug30418.html test failing due to problems updating dynamic border rules
475 Test: fast/table/border-changes.html
477 * html/HTMLTableElement.h:
478 * html/HTMLTableElement.cpp:
479 (WebCore::HTMLTableElement::parseMappedAttribute): Check the border type before and after
480 parsing attributes, rather than doing this only for the rules attribute.
481 (WebCore::HTMLTableElement::cellBorders): Added.
482 (WebCore::HTMLTableElement::getSharedCellDecl): Changed to use cellBorders to factor out the
483 rule about what type of borders to use.
485 2008-01-02 Sam Weinig <sam@webkit.org>
489 Pass the prototype of WebCore JS objects up the constructor chain
490 rather than explicitly setting using setPrototype. This removes many
491 redundant settings of the prototype on construction. To avoid a CG
492 hazard, the prototype must be constructed before calling the
493 constructor of the JS object.
495 - JS objects that inherit from DOMObject, which all bindings objects
496 (except Window) do, now can't implicitly have a jsNull prototype, but
497 must explicitly pass it up the construction chain.
499 * bindings/js/JSCSSRuleCustom.cpp:
501 * bindings/js/JSCSSValueCustom.cpp:
503 * bindings/js/JSDocumentCustom.cpp:
505 * bindings/js/JSEventCustom.cpp:
507 * bindings/js/JSEventTargetNode.cpp:
508 (WebCore::JSEventTargetNode::JSEventTargetNode):
509 * bindings/js/JSEventTargetNode.h:
510 * bindings/js/JSHTMLAllCollection.h:
511 (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
512 * bindings/js/JSHTMLAudioElementConstructor.cpp:
513 (WebCore::JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor):
514 * bindings/js/JSHTMLCollectionCustom.cpp:
515 (WebCore::getNamedItems):
517 * bindings/js/JSHTMLElementWrapperFactory.cpp:
518 (WebCore::createJSHTMLWrapper):
519 * bindings/js/JSHTMLFormElementCustom.cpp:
520 (WebCore::JSHTMLFormElement::nameGetter):
521 * bindings/js/JSHTMLInputElementBase.cpp:
522 (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
523 * bindings/js/JSHTMLInputElementBase.h:
524 * bindings/js/JSHTMLOptionElementConstructor.cpp:
525 (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
526 * bindings/js/JSLocation.cpp:
527 (WebCore::JSLocation::JSLocation):
528 * bindings/js/JSLocation.h:
529 * bindings/js/JSNamedNodesCollection.cpp:
530 (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
531 * bindings/js/JSNamedNodesCollection.h:
532 * bindings/js/JSNodeCustom.cpp:
534 * bindings/js/JSSVGElementWrapperFactory.cpp:
535 (WebCore::createJSSVGWrapper):
536 * bindings/js/JSSVGPathSegCustom.cpp:
538 * bindings/js/JSStyleSheetCustom.cpp:
540 * bindings/js/JSXMLHttpRequest.cpp:
541 (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
542 (KJS::JSXMLHttpRequestConstructorImp::construct):
543 (KJS::JSXMLHttpRequest::JSXMLHttpRequest):
544 * bindings/js/JSXMLHttpRequest.h:
545 * bindings/js/JSXSLTProcessor.cpp:
546 (KJS::JSXSLTProcessor::JSXSLTProcessor):
547 (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
548 (KJS::XSLTProcessorConstructorImp::implementsConstruct):
549 (KJS::XSLTProcessorConstructorImp::construct):
550 * bindings/js/JSXSLTProcessor.h:
551 * bindings/js/kjs_binding.h:
552 (KJS::DOMObject::DOMObject):
553 (KJS::cacheDOMObject):
554 (KJS::cacheSVGDOMObject):
555 * bindings/js/kjs_css.cpp:
556 (WebCore::JSRGBColor::JSRGBColor):
557 (WebCore::getJSRGBColor):
558 * bindings/js/kjs_css.h:
559 * bindings/js/kjs_events.cpp:
560 (WebCore::JSClipboard::JSClipboard):
562 * bindings/js/kjs_events.h:
563 * bindings/js/kjs_html.cpp:
564 (WebCore::ImageConstructorImp::ImageConstructorImp):
565 * bindings/js/kjs_navigator.cpp:
566 (KJS::Navigator::Navigator):
567 (KJS::PluginBase::PluginBase):
568 * bindings/js/kjs_navigator.h:
569 * bindings/js/kjs_window.cpp:
570 (KJS::Window::Window):
571 (KJS::Window::location):
572 (KJS::Window::getValueProperty):
573 * bindings/js/kjs_window.h:
574 * bindings/scripts/CodeGeneratorJS.pm:
576 2008-01-03 Holger Hans Peter Freyther <zecke@selfish.org>
580 -This is from http://bugs.webkit.org/show_bug.cgi?id=16115
582 Change the Gtk ContextMenuItem code to generate the GtkMenuItem
583 or GtkCheckMenuItem on the fly. Currently we will create a
584 GtkCheckMenuItem if the ContextMenuItem has been checked. What needs
585 to be done is to change WebCore to tell the platform code if an item
588 * platform/ContextMenuItem.h:
589 (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
590 * platform/gtk/ContextMenuGtk.cpp:
591 (WebCore::ContextMenu::appendItem):
592 * platform/gtk/ContextMenuItemGtk.cpp:
593 (WebCore::ContextMenuItem::ContextMenuItem):
594 (WebCore::ContextMenuItem::~ContextMenuItem):
595 (WebCore::ContextMenuItem::createNativeMenuItem):
596 (WebCore::ContextMenuItem::releasePlatformDescription):
597 (WebCore::ContextMenuItem::type):
598 (WebCore::ContextMenuItem::setType):
599 (WebCore::ContextMenuItem::action):
600 (WebCore::ContextMenuItem::setAction):
601 (WebCore::ContextMenuItem::platformSubMenu):
602 (WebCore::ContextMenuItem::setSubMenu):
603 (WebCore::ContextMenuItem::setChecked):
605 2008-01-03 Dan Bernstein <mitz@apple.com>
607 Rubber-stamped by Adam Roben.
609 - update the project hierarchy to match the on-disk organization of
610 the platform directory.
612 * WebCore.vcproj/WebCore.vcproj:
614 2008-01-03 Adam Roben <aroben@apple.com>
616 Fix a buffer overrun and a leak introduced in r29098
620 * platform/text/StringImpl.cpp:
621 (WebCore::StringImpl::StringImpl): Only allocate one buffer, and make
622 it be big enough to hold the string contents plus the null terminator.
624 2008-01-03 Simon Hausmann <hausmann@webkit.org>
628 Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.
632 2008-01-03 Alp Toker <alp@atoker.com>
634 Suggested by Mark Rowe.
636 Fix indentation and remove trailing whitespace.
638 * platform/network/curl/ResourceHandleManager.cpp:
640 2008-01-03 Luca Bruno <lethalman88@gmail.com>
642 Reviewed by Alp Toker.
644 Fix HTTP POST-based logins to sites like Facebook, GMail by ensuring
645 that the two POST methods don't conflict.
647 * platform/network/curl/ResourceHandleManager.cpp:
648 (WebCore::ResourceHandleManager::setupPOST):
650 2008-01-02 Darin Adler <darin@apple.com>
652 - touched some files to try to get the Windows buildbot building again
654 2008-01-02 Dan Bernstein <mitz@apple.com>
656 Reviewed by Sam Weinig.
658 - fix small caps rendering
660 Covered by an existing test.
662 * platform/graphics/win/FontDataWin.cpp:
663 (WebCore::FontData::smallCapsFontData):
665 2008-01-02 Antti Koivisto <antti@apple.com>
669 Calculate video position and size within the renderer box in WebCore. This
670 way the aspect ratio calculation is not needed in each MediaPlayer implementation.
672 This fixes video aspect ratio on Windows.
674 Covered by an existing pixel test.
676 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
677 (WebCore::MediaPlayerPrivate::createQTMovieView):
678 * rendering/RenderVideo.cpp:
679 (WebCore::RenderVideo::videoBox):
680 (WebCore::RenderVideo::paintReplaced):
681 (WebCore::RenderVideo::updatePlayer):
682 * rendering/RenderVideo.h:
684 2008-01-02 Ada Chan <adachan@apple.com>
688 * WebCore.vcproj/WebCore.vcproj:
690 2008-01-02 John Sullivan <sullivan@apple.com>
692 Reviewed by Dan Bernstein
694 - fixed <rdar://problem/5579010> REGRESSION: Safari inserts newlines in tab names when U+2028 is present
696 * loader/DocumentLoader.cpp:
697 (WebCore::canonicalizedTitle):
698 in the code that replaces control characters with white space, also replace the unicode line separator
699 and paragraph separator characters
701 2008-01-02 Darin Adler <darin@apple.com>
703 - fix buffer overruns seen on buildbot
705 * platform/text/StringImpl.cpp:
706 (WebCore::countCharacter): Added this.
707 (WebCore::StringImpl::toCoordsArray): Use countCharacter instead of incorrect find expression.
708 (WebCore::StringImpl::toLengthArray): Ditto.
709 (WebCore::StringImpl::replace): Added assertions.
711 2008-01-02 Darin Adler <darin@apple.com>
715 - fix http://bugs.webkit.org/show_bug.cgi?id=16657
716 Acid3 failure since table.caption and table.thead do not work for nodes added by appendChild
717 - fix http://bugs.webkit.org/show_bug.cgi?id=16659
718 Acid3 expects HTMLTableElement.rows to include a <tr> element that is an immediate child of the <table>
720 Tests: dom/html/level2/html/HTMLCollection07.html
721 dom/html/level2/html/HTMLCollection08.html
722 dom/html/level2/xhtml/HTMLCollection07.xhtml
723 dom/html/level2/xhtml/HTMLCollection08.xhtml
724 fast/dom/HTMLTableElement/early-acid3-65-excerpt.html
725 fast/dom/HTMLTableElement/early-acid3-66-excerpt.html
727 * GNUmakefile.am: Added HTMLTableRowsCollection.
728 * WebCore.pro: Ditto.
729 * WebCore.vcproj/WebCore.vcproj: Ditto.
730 * WebCore.xcodeproj/project.pbxproj: Ditto.
731 * WebCoreSources.bkl: Ditto.
733 * dom/XMLTokenizer.cpp: Took out stray include.
735 * html/HTMLCollection.cpp:
736 (WebCore::HTMLCollection::itemAfter): Removed all the table rows code, since we now use
737 a separate class for that collection. Also got rid of the distinct types for custom collections
738 that don't need them (use Other for both).
739 * html/HTMLCollection.h: Also made firstItem non-virtual because it doesn't need to be virtual.
741 * html/HTMLFormCollection.cpp:
742 (WebCore::HTMLFormCollection::HTMLFormCollection): Use Other instead of FormElements
743 for the HTMLCollection type.
745 * html/HTMLTableElement.cpp:
746 (WebCore::HTMLTableElement::HTMLTableElement): Eliminated m_head, m_foot, m_firstBody, and m_caption.
747 (WebCore::HTMLTableElement::caption): Added non-inline version. Finds the caption rather than
748 keeping a pointer to it.
749 (WebCore::HTMLTableElement::setCaption): Rewrote.
750 (WebCore::HTMLTableElement::tHead): Ditto.
751 (WebCore::HTMLTableElement::setTHead): Ditto.
752 (WebCore::HTMLTableElement::tFoot): Ditto.
753 (WebCore::HTMLTableElement::setTFoot): Ditto.
754 (WebCore::HTMLTableElement::createTHead): Ditto.
755 (WebCore::HTMLTableElement::deleteTHead): Ditto.
756 (WebCore::HTMLTableElement::createTFoot): Ditto.
757 (WebCore::HTMLTableElement::deleteTFoot): Ditto.
758 (WebCore::HTMLTableElement::createCaption): Ditto.
759 (WebCore::HTMLTableElement::deleteCaption): Ditto.
760 (WebCore::HTMLTableElement::lastBody): Added.
761 (WebCore::HTMLTableElement::insertRow): Rewrote to use a loop based on code in HTMLTableRowsCollection.
762 This is different from the old code mainly in how it handles rows outside any section.
763 (WebCore::HTMLTableElement::deleteRow): Ditto.
764 (WebCore::HTMLTableElement::addChild): Removed code to set the various members. Keeping pointers to
765 these was a possible source of serious bugs too, including crashes with stale pointers, although I
766 didn't write any test cases to prove those bugs existed.
767 (WebCore::HTMLTableElement::parseMappedAttribute): Changed the rules code to visit all cells, not
768 just the cells of the first body. I believe this fixed rendering on some table tests. I think the code
769 visits too many cells and also the use of recursion is overkill, but I didn't try to fix that.
770 (WebCore::HTMLTableElement::rows): Changed to use the new HTMLTableRowsCollection.
771 * html/HTMLTableElement.h: Changed functions to return PassRefPtr, which can be important if strange
772 things like DOM mutation events take things ot of the tree before they are safely referenced by
773 JavaScript wrappers. Also changed functions to take PassRefPtr and added exceptions. Removed unneeded
774 firstTBody and setTBody functions and childrenChanged function override, as well as unused Rules and
775 Frame enums. Removed m_head, m_foot, m_firstBody, and m_caption, and added lastBody function. Removed
776 unneeded friend declaration for HTMLTableCellElement.
777 * html/HTMLTableElement.idl: Allow the setteres for caption, tHead, and tFoot to raise exceptions.
779 * html/HTMLTableRowsCollection.cpp: Added. Implements the HTML 5 rule for which rows are in the
780 collection in which order.
781 * html/HTMLTableRowsCollection.h: Added.
783 * loader/FTPDirectoryDocument.cpp:
784 (WebCore::FTPDirectoryTokenizer::appendEntry): Use the standard insertRow function instead of
785 coming up with our own way of inserting a row. Simplifies things -- we can remove the code to
786 create a tbody element.
788 2008-01-02 Darin Adler <darin@apple.com>
790 Reviewed by Alice and Tim.
792 - try to fix GTK and Qt builds
794 * platform/win/ScrollViewWin.cpp:
795 (WebCore::ScrollView::scroll): Improve logic slightly for the case of
796 vertical scrolling when there's no vertical scroll bar.
798 * platform/gtk/ScrollViewGtk.cpp:
799 (WebCore::ScrollView::scroll): Copy the code from Windows. Maybe this
800 should be factored differently.
801 * platform/qt/ScrollViewQt.cpp:
802 (WebCore::ScrollView::scroll): Ditto.
804 2008-01-02 Darin Adler <darin@apple.com>
808 - http://bugs.webkit.org/show_bug.cgi?id=16712
809 change StringImpl to take and return PassRefPtr instead of raw pointers
811 Also eliminated use of const StringImpl. Since StringImpl is immutable there
812 is no distinction between a const and non-const one at the moment.
814 * WebCore.base.exp: Updated.
817 (WebCore::parseURL): Make String directly, not by making a StringImpl.
819 (WebCore::Attr::createTextChild): Convert AtomicString to String with domString,
821 (WebCore::Attr::setValue): Remove unneed call to impl() when passing a String
822 to a function that takes a String.
824 * dom/CDATASection.cpp: Removed unused constructor.
825 (WebCore::CDATASection::cloneNode): Added a now-needed .get().
826 (WebCore::CDATASection::createNew): Changed function to take a PassRefPtr.
827 * dom/CDATASection.h:
829 * dom/CharacterData.cpp:
830 (WebCore::CharacterData::CharacterData): Removed unneeded initialization and
831 ref() now that the string is a RefPtr. Also updated to not call "new StringImpl".
832 (WebCore::CharacterData::~CharacterData): Removed unneeded deref() since it's
834 (WebCore::CharacterData::setData): More of that.
835 (WebCore::CharacterData::substringData): Ditto.
836 (WebCore::CharacterData::appendData): Ditto.
837 (WebCore::CharacterData::insertData): Ditto.
838 (WebCore::CharacterData::deleteData): Ditto.
839 (WebCore::CharacterData::replaceData): Ditto.
840 (WebCore::CharacterData::nodeValue): Ditto.
841 (WebCore::CharacterData::dispatchModifiedEvent): Ditto.
842 (WebCore::CharacterData::dump): Ditto.
843 * dom/CharacterData.h: Changed to use a RefPtr. I could have used a String
844 instead, but since String adds extra branches to handle 0, I figured it was
845 more conservative to just use RefPtr. Later it would be good to figure out
846 which is preferred style and be more consistent. Maybe we'll phase out
847 StringImpl, or maybe we'll go the other way and use it more since it can be
850 * dom/DOMImplementation.cpp:
851 (WebCore::addString): Changed set to use String rather than StringImpl.
852 (WebCore::isSVG10Feature): Ditto.
853 (WebCore::isSVG11Feature): Ditto.
854 (WebCore::DOMImplementation::createDocument): Replaced custom code to
855 find a colon with a call to String::find.
858 (WebCore::Range::insertNode): Updated since the result of splitText is now
862 (WebCore::Text::splitText): Updated since str is now a RefPtr. Also made the
863 result of this function be a PassRefPtr.
864 (WebCore::Text::createRenderer): Ditto.
865 (WebCore::Text::createNew): Made the parameter and result both be PassRefPtr.
868 * html/HTMLElement.cpp:
869 (WebCore::HTMLElement::nodeName): Use String::upper.
871 * html/HTMLInputElement.cpp:
872 (WebCore::numGraphemeClusters): Remove now-unneeded const.
873 (WebCore::numCharactersInGraphemeClusters): Ditto.
875 * html/HTMLTokenizer.cpp:
876 (WebCore::HTMLTokenizer::processToken): Updated for function name change.
878 * platform/text/AtomicString.cpp:
879 (WebCore::CStringTranslator::translate): Updated since there is no longer
880 a constructor that takes a string.
882 * platform/text/PlatformString.h: Added new constructors that take
883 PassRefPtr and RefPtr. Removed misleading comment.
885 * platform/text/String.cpp:
886 (WebCore::String::String): Changed to use StringImpl::create, which handles
887 the empty string automatically.
888 (WebCore::String::append): Ditto.
889 (WebCore::String::charactersWithNullTermination): Similar.
890 (WebCore::String::format): Ditto.
892 * platform/text/StringHash.h: Took out unneeded const.
894 * platform/text/StringImpl.cpp:
895 (WebCore::deleteUCharVector): Changed to take a const pointer since the
896 buffers are now const UChar buffers.
897 (WebCore::StringImpl::StringImpl): Removed some constructors. Got rid of the
898 separate init functions. The constructors are now private and used only in
899 the create functions and one or two other places.
900 (WebCore::StringImpl::containsOnlyWhitespace): Removed now-meaningless const.
901 (WebCore::StringImpl::substring): Ditto. Also changed return value to be a
903 (WebCore::StringImpl::characterStartingAt): Ditto.
904 (WebCore::StringImpl::toLength): Ditto.
905 (WebCore::StringImpl::toCoordsArray): Ditto.
906 (WebCore::StringImpl::toLengthArray): Ditto.
907 (WebCore::StringImpl::isLower): Ditto.
908 (WebCore::StringImpl::lower): Ditto. Changed to use Vector and adopt so we
909 don't have to use new directly here. Makes empty string handling more consistent.
910 (WebCore::StringImpl::upper): Ditto.
911 (WebCore::StringImpl::secure): Ditto.
912 (WebCore::StringImpl::foldCase): Ditto.
913 (WebCore::StringImpl::stripWhiteSpace): Ditto.
914 (WebCore::StringImpl::simplifyWhiteSpace): Ditto.
915 (WebCore::StringImpl::capitalize): Ditto.
916 (WebCore::StringImpl::toInt): Removed now-meaningless const.
917 (WebCore::StringImpl::toInt64): Ditto.
918 (WebCore::StringImpl::toUInt64): Ditto.
919 (WebCore::StringImpl::toDouble): Ditto.
920 (WebCore::StringImpl::toFloat): Ditto.
921 (WebCore::StringImpl::find): Ditto.
922 (WebCore::StringImpl::reverseFind): Ditto.
923 (WebCore::StringImpl::endsWith): Ditto.
924 (WebCore::StringImpl::replace): Ditto.
925 (WebCore::equal): Ditto.
926 (WebCore::equalIgnoringCase): Ditto.
927 (WebCore::StringImpl::ascii): Ditto.
928 (WebCore::StringImpl::defaultWritingDirection): Ditto.
929 (WebCore::StringImpl::createStrippingNullCharacters): Ditto.
930 (WebCore::StringImpl::adopt): Added special case so this uses the shared
931 empty string like other functions. Also optimized the common case where the
932 vector happens to already have the right size so we don't do a fastRealloc
933 at all in those cases.
934 (WebCore::StringImpl::create): Added. These are now the public functions for
935 creating new StringImpl objects. They all implement the shared empty string.
936 (WebCore::StringImpl::createWithTerminatingNullCharacter):
937 * platform/text/StringImpl.h:
939 * platform/text/cf/StringCF.cpp:
940 (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
941 * platform/text/cf/StringImplCF.cpp:
942 (WebCore::StringImpl::createCFString): Removed now-obsolete const.
943 * platform/text/mac/StringImplMac.mm:
944 (WebCore::StringImpl::operator NSString *): Ditto.
945 * platform/text/mac/StringMac.mm:
946 (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
947 * platform/text/qt/StringQt.cpp:
948 (WebCore::String::String): Ditto.
949 * platform/text/wx/StringWx.cpp:
950 (WebCore::String::String): Ditto.
951 * rendering/RenderBR.cpp:
952 (WebCore::RenderBR::RenderBR): Ditto.
954 * rendering/RenderSVGInlineText.cpp:
955 (WebCore::RenderSVGInlineText::RenderSVGInlineText): Use PassRefPtr.
956 * rendering/RenderSVGInlineText.h:
958 * rendering/RenderText.cpp:
959 (WebCore::charactersAreAllASCII): Removed now-unneeded const.
960 * rendering/RenderTextFragment.cpp:
961 (WebCore::RenderTextFragment::originalText): Use RefPtr.
963 2008-01-02 Timothy Hatcher <timothy@apple.com>
965 Reviewed by Oliver Hunt.
967 <rdar://problem/5618086> WebInspector does not expand the DOM tree after being closed
969 Closing the Web Inspector causes the DOM tree outline to be torn down, clearing the
970 internal element lookup tables. The represented DOM node object still holds the identifier
971 it was assigned, and a later call to findTreeElement will use that original identifier
972 against a cleared lookup table. In that case we need to fallback on DOM ancestor lookup.
974 * page/inspector/treeoutline.js:
975 (TreeOutline.prototype.findTreeElement): If the DOM node already had a __treeElementIdentifier,
976 but the TreeOutline no longer has the element in the _knownTreeElements list do an ancestor lookup
977 instead of an early return.
979 2008-01-02 Alice Liu <alice.liu@apple.com>
983 Fixed <rdar://5283861> (problems scrolling in gmail message content area)
985 * platform/ScrollView.h:
986 * platform/win/ScrollViewWin.cpp:
987 (WebCore::ScrollView::scroll):
988 Changed return value to bool to reflect success of scroll attempt
990 2008-01-02 Alexey Proskuryakov <ap@webkit.org>
992 Fixed a typo (pointed out in review, but I somehow missed it at first).
994 * editing/EditorCommand.cpp: (WebCore::executeDelete):
996 2008-01-02 Alexey Proskuryakov <ap@webkit.org>
1000 Resolved several FIXMEs in EditorCommand.
1001 Made recently added commands hidden from JS again.
1002 Removed BackwardDelete implementation, which used to be dead code, but got exposed now.
1004 Tests: editing/execCommand/delete-no-scroll.html
1005 editing/execCommand/forward-delete-no-scroll.html
1006 editing/execCommand/insert-line-break-no-scroll.html
1008 * editing/EditorCommand.cpp:
1009 (WebCore::executeDelete):
1010 (WebCore::executeForwardDelete):
1011 (WebCore::executeInsertLineBreak):
1012 (WebCore::supportedFromMenuOrKeyBinding):
1013 (WebCore::CommandEntry::):
1015 2008-01-02 Alexey Proskuryakov <ap@webkit.org>
1019 http://bugs.webkit.org/show_bug.cgi?id=14555
1020 action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice
1022 http://bugs.webkit.org/show_bug.cgi?id=14774
1023 Submitted data only includes first input item
1025 Reworked encoding of mailto URLs to match other browsers.
1026 Moved most of related logic from FrameLoader::submitForm() to HTMLFormElement::submit().
1028 Tests: fast/forms/mailto/advanced-get.html
1029 fast/forms/mailto/advanced-put.html
1030 fast/forms/mailto/get-multiple-items-text-plain.html
1031 fast/forms/mailto/get-multiple-items-x-www-form-urlencoded.html
1032 fast/forms/mailto/get-multiple-items.html
1033 fast/forms/mailto/get-non-ascii.html
1034 fast/forms/mailto/get-non-ascii-text-plain.html
1035 fast/forms/mailto/get-overwrite-query.html
1036 fast/forms/mailto/post-append-query.html
1037 fast/forms/mailto/post-multiple-items-multipart-form-data.html
1038 fast/forms/mailto/post-multiple-items-text-plain.html
1039 fast/forms/mailto/post-multiple-items-x-www-form-urlencoded.html
1040 fast/forms/mailto/post-multiple-items.html
1042 * html/HTMLFormElement.cpp:
1043 (WebCore::HTMLFormElement::submit):
1044 * loader/FrameLoader.cpp:
1045 (WebCore::FrameLoader::submitForm):
1047 2008-01-02 Mark Rowe <mrowe@apple.com>
1049 Autotools build fix.
1051 * GNUmakefile.am: Remove files before generating them, not after.
1053 2008-01-02 Mark Rowe <mrowe@apple.com>
1055 Rubber-stamped by Alp Toker.
1057 Add missing dependencies to some GNUmakefile.am rules.
1061 2008-01-02 Mark Rowe <mrowe@apple.com>
1063 Reviewed by Alp Toker.
1065 Autotools build fix. Make can expand $@ to any of the targets for the rule,
1066 while we always want to use the name of the .cpp file as the output file.
1070 2008-01-02 Luca Bruno <lethalman88@gmail.com>
1072 Reviewed by Alp Toker.
1074 http://bugs.webkit.org/show_bug.cgi?id=16115
1075 [GTK] ContextMenu and ContextMenuItem lacks an implementation
1077 Add context menu support.
1079 Based on a patch by Holger Freyther.
1081 * platform/gtk/ContextMenuGtk.cpp:
1082 (WebCore::menuItemActivated):
1083 (WebCore::ContextMenu::ContextMenu):
1084 (WebCore::ContextMenu::~ContextMenu):
1085 (WebCore::ContextMenu::appendItem):
1086 (WebCore::ContextMenu::setPlatformDescription):
1087 (WebCore::ContextMenu::releasePlatformDescription):
1088 * platform/gtk/ContextMenuItemGtk.cpp:
1089 (WebCore::ContextMenuItem::ContextMenuItem):
1090 (WebCore::ContextMenuItem::~ContextMenuItem):
1091 (WebCore::ContextMenuItem::releasePlatformDescription):
1092 (WebCore::ContextMenuItem::type):
1093 (WebCore::ContextMenuItem::action):
1094 (WebCore::ContextMenuItem::setAction):
1095 (WebCore::ContextMenuItem::platformSubMenu):
1096 (WebCore::ContextMenuItem::setSubMenu):
1097 (WebCore::ContextMenuItem::setChecked):
1098 (WebCore::ContextMenuItem::setEnabled):
1100 2008-01-02 Alp Toker <alp@atoker.com>
1102 GTK+ autotools build fix. Track changes in r29073.
1106 2008-01-01 Darin Adler <darin@apple.com>
1110 * bindings/js/kjs_binding.cpp:
1111 (KJS::setDOMException): Initialize to avoid uninitialized variable warning.
1112 Removed default so we get a warning if there's a missing case.
1114 2008-01-01 David D. Kilzer <ddkilzer@webkit.org>
1116 Scripting MIME Types application/ecmascript, application/javascript not viewable
1117 <http://bugs.webkit.org/show_bug.cgi?id=11063>
1121 This patch consolidates the list of acceptable MIME types for JavaScript
1122 source into the MIMETypeRegistry class, and replaces checks for these
1123 types with a call to MIMETypeRegistry::isSupportedJavaScriptMIMEType().
1125 No tests added since viewing JavaScript source is not testable.
1127 * dom/DOMImplementation.cpp:
1128 (WebCore::DOMImplementation::isTextMIMEType): Use
1129 MIMETypeRegistry::isSupportedJavaScriptMIMEType() instead of a single
1130 hard-coded MIME type, "application/x-javascript".
1132 * html/HTMLScriptElement.cpp:
1133 (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript): Moved list of
1134 JavaScript MIME types from here to
1135 MIMETypeRegistry::initialiseSupportedJavaScriptMIMETypes().
1137 * platform/MIMETypeRegistry.cpp:
1138 (WebCore::initialiseSupportedJavaScriptMIMETypes): Added. List of
1139 MIME types came from HTMLScriptElement::shouldExecuteAsJavaScript().
1140 (WebCore::initialiseSupportedNonImageMimeTypes): Remove single
1141 hard-coded MIME type, "application/x-javascript", from the list.
1142 (WebCore::initialiseMIMETypeRegistry): Initialise
1143 supportedJavaScriptMIMETypes, then pre-populate supportedNonImageMIMETypes
1144 with values in supportedJavaScriptMIMETypes.
1145 (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): Added.
1147 * platform/MIMETypeRegistry.h: Added isSupportedJavaScriptMIMEType().
1149 2008-01-01 Sam Weinig <sam@webkit.org>
1153 Patch for http://bugs.webkit.org/show_bug.cgi?id=16691
1154 Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)
1156 - Create JS objects for all the different types of exceptions, each with there own prototype and constructor.
1157 - Abstract all the logic and storage for exception classes in to an ExceptionBase class.
1158 - Move specialized ExceptionCodes into the exception classes. (ie. the EventExceptionCode enum is now in EventException).
1160 Tests: fast/dom/DOMException/EventException.html
1161 fast/dom/DOMException/RangeException.html
1162 fast/dom/DOMException/XPathException.html
1163 http/tests/xmlhttprequest/XMLHttpRequestException.html
1164 svg/custom/SVGException.html
1166 * DerivedSources.make:
1168 * WebCore.vcproj/WebCore.vcproj:
1169 * WebCore.xcodeproj/project.pbxproj:
1170 * WebCoreSources.bkl:
1171 * bindings/js/JSSVGMatrixCustom.cpp:
1172 (WebCore::JSSVGMatrix::inverse):
1173 (WebCore::JSSVGMatrix::rotateFromVector):
1174 * bindings/js/kjs_binding.cpp:
1175 (KJS::setDOMException):
1176 * bindings/scripts/CodeGeneratorJS.pm: Use the constant values defined
1177 in the IDL as the ObjC bindings do.
1178 * bindings/scripts/CodeGeneratorObjC.pm:
1179 * dom/DOMCoreException.cpp: Removed.
1180 * dom/DOMCoreException.h:
1181 (WebCore::DOMCoreException::DOMCoreException):
1182 * dom/DOMCoreException.idl:
1184 * dom/EventException.h: Copied from WebCore/dom/DOMCoreException.h.
1185 (WebCore::EventException::EventException):
1186 (WebCore::EventException::):
1187 * dom/EventException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1188 * dom/EventTargetNode.cpp:
1189 (WebCore::EventTargetNode::dispatchEvent):
1190 * dom/ExceptionBase.cpp: Copied from WebCore/dom/DOMCoreException.cpp.
1191 (WebCore::ExceptionBase::ExceptionBase):
1192 (WebCore::ExceptionBase::toString):
1193 * dom/ExceptionBase.h: Copied from WebCore/dom/DOMCoreException.h.
1194 (WebCore::ExceptionBase::code):
1195 * dom/ExceptionCode.cpp:
1196 (WebCore::getExceptionCodeDescription):
1197 * dom/ExceptionCode.h:
1200 (WebCore::Range::insertNode):
1201 (WebCore::Range::checkNodeWOffset):
1202 (WebCore::Range::checkNodeBA):
1203 (WebCore::Range::selectNode):
1204 (WebCore::Range::selectNodeContents):
1205 (WebCore::Range::surroundContents):
1206 * dom/RangeException.h:
1207 (WebCore::RangeException::RangeException):
1208 (WebCore::RangeException::):
1209 * dom/RangeException.idl:
1210 * page/DOMWindow.idl:
1212 (WebCore::SVGColor::setRGBColor):
1213 * svg/SVGException.h:
1214 (WebCore::SVGException::SVGException):
1215 (WebCore::SVGException::):
1216 * svg/SVGException.idl:
1217 * svg/SVGLocatable.cpp:
1218 (WebCore::SVGLocatable::getTransformToElement):
1219 * xml/XMLHttpRequest.cpp:
1220 (WebCore::XMLHttpRequest::dispatchEvent):
1221 (WebCore::XMLHttpRequest::open):
1222 (WebCore::XMLHttpRequest::send):
1223 * xml/XMLHttpRequest.h:
1224 * xml/XMLHttpRequestException.h: Copied from WebCore/dom/DOMCoreException.h.
1225 (WebCore::XMLHttpRequestException::XMLHttpRequestException):
1226 (WebCore::XMLHttpRequestException::):
1227 * xml/XMLHttpRequestException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1228 * xml/XPathEvaluator.h:
1229 * xml/XPathException.h: Copied from WebCore/dom/DOMCoreException.h.
1230 (WebCore::XPathException::XPathException):
1231 (WebCore::XPathException::):
1232 * xml/XPathException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1233 * xml/XPathParser.cpp:
1234 (WebCore::XPath::Parser::parseStatement):
1235 * xml/XPathResult.cpp:
1236 (WebCore::XPathResult::convertTo):
1237 (WebCore::XPathResult::numberValue):
1238 (WebCore::XPathResult::stringValue):
1239 (WebCore::XPathResult::booleanValue):
1240 (WebCore::XPathResult::singleNodeValue):
1241 (WebCore::XPathResult::snapshotLength):
1242 (WebCore::XPathResult::iterateNext):
1243 (WebCore::XPathResult::snapshotItem):
1245 2008-01-01 Sam Weinig <sam@webkit.org>
1247 Remove JSDomExceptionConstructor.lut.h from clean step
1248 as it no longer exists.
1252 2008-01-01 Dan Bernstein <mitz@apple.com>
1256 * WebCore.vcproj/WebCore.vcproj:
1258 2008-01-01 Sam Weinig <sam@webkit.org>
1260 Try again to fix the builds
1262 * DerivedSources.make:
1264 2008-01-01 Sam Weinig <sam@webkit.org>
1269 * WebCore.vcproj/WebCore.vcproj:
1270 * WebCoreSources.bkl:
1272 2008-01-01 Eric Seidel <eric@webkit.org>
1276 Don't replace \ with / in data: urls
1277 http://bugs.webkit.org/show_bug.cgi?id=16692
1279 Test: fast/loader/url-data-replace-backslash.html
1281 * platform/KURL.cpp:
1282 (WebCore::KURL::init):
1284 2008-01-01 Alp Toker <alp@atoker.com>
1286 GTK+ autotools build fix. Track changes in r29051, r29058 and pass the
1287 correct parameter to AM_INIT_AUTOMAKE.
1291 2007-12-31 Sam Weinig <sam@webkit.org>
1295 Patch for http://bugs.webkit.org/show_bug.cgi?id=16637
1296 Acid3 expects ExeceptionCode constants to be defined on DOMException objects
1298 - Make DOMException a real JS object.
1300 Test: fast/dom/DOMException/prototype-object.html
1302 * DerivedSources.make:
1303 * WebCore.xcodeproj/project.pbxproj:
1305 This is no longer needed as the autogenerated classes now includes the
1307 * bindings/js/JSDOMExceptionConstructor.cpp: Removed.
1308 * bindings/js/JSDOMExceptionConstructor.h: Removed.
1310 Create on demand and use the new class for DOMExceptions.
1311 * bindings/js/kjs_binding.cpp:
1312 (KJS::setDOMException):
1314 Remove no longer needed custom constructor getter.
1315 * bindings/js/kjs_window.cpp:
1316 (KJS::Window::getValueProperty):
1318 Don't expose DOMCoreException as the name of class by special casing
1319 the user visible class name to be DOMException.
1320 * bindings/scripts/CodeGeneratorJS.pm:
1322 The DOMException class/file needs to be named DOMCoreException because there is
1323 name conflict with one of the Objective-C bindings classes. It should be renamed
1324 to DOMException when the Objective-C bindings are moved into WebKit.
1325 * dom/DOMCoreException.cpp: Added.
1326 (WebCore::DOMCoreException::DOMCoreException):
1327 (WebCore::DOMCoreException::toString):
1328 * dom/DOMCoreException.h: Added.
1329 (WebCore::DOMCoreException::):
1330 (WebCore::DOMCoreException::code):
1331 (WebCore::DOMCoreException::name):
1332 (WebCore::DOMCoreException::message):
1333 * dom/DOMCoreException.idl: Added.
1334 * page/DOMWindow.idl:
1336 2007-12-31 Sam Weinig <sam@webkit.org>
1338 Re-enable querySelector and querySelectorAll and touch the necessary files to not
1339 kill the windows build.
1341 * WebCore.vcproj/build-generated-files.sh:
1342 * bindings/scripts/CodeGeneratorCOM.pm:
1346 2007-12-31 Darin Adler <darin@apple.com>
1350 * dom/Document.idl: Temporarily disable querySelector and querySelectorAll, since they are showing
1351 up as pure virtual functions. Sam can fix this later.
1352 * dom/Element.idl: Ditto.
1354 2007-12-31 Dan Bernstein <mitz@apple.com>
1356 Reviewed by Darin Adler.
1358 - fix http://bugs.webkit.org/show_bug.cgi?id=14134
1359 <rdar://problem/5655160> REGRESSION (r25353): Whitespace nodes ignored between inline list items
1361 Test: fast/dynamic/create-renderer-for-whitespace-only-text.html
1364 (WebCore::Node::attach): Added code to check if this node's renderer
1365 has become the "previous renderer" of any sibling text node, and if so,
1366 ensure that that node gets a renderer if it now needs one.
1367 (WebCore::Node::createRendererIfNeeded): Removed the assertion that the
1368 node is not attached.
1370 2007-12-31 Darin Adler <darin@apple.com>
1374 - fix http://bugs.webkit.org/show_bug.cgi?id=16641
1375 Acid3 reveals HTMLFormElement.elements fails to update when element name changes
1377 Test: fast/dom/HTMLFormElement/elements-not-in-document.html
1379 This was a bug specific to forms that are not in the document tree.
1380 The fix was to change the code to increment the document version number to match
1381 up with other document change tracking. Maybe at some point we can clean these up
1382 so we don't have so many competing change notification systems.
1384 * dom/ContainerNode.cpp:
1385 (WebCore::ContainerNode::replaceChild): Removed bogus comment.
1386 (WebCore::ContainerNode::addChild): Added an explicit incDOMTreeVersion
1387 call here, since this code path bypasses the subtree-modified event code.
1390 (WebCore::Element::setAttribute): Remove the inDocument() check -- not all HTML
1391 collections are for things in the document.
1392 (WebCore::Element::setAttributeMap): Ditto.
1394 * dom/EventTargetNode.cpp:
1395 (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): Added a call to
1396 incDOMTreeVersion here; covers most cases of tree structure changes.
1399 (WebCore::Node::attach): Remove call to incDOMTreeVersion -- creating a renderer
1400 has nothing to do with changes to the DOM tree!
1401 (WebCore::Node::detach): Ditto.
1403 * html/HTMLFormElement.cpp:
1404 (WebCore::HTMLFormElement::registerFormElement): Remove call to incDOMTreeVersion.
1405 This is handled at a lower level and doesn't need to be here.
1406 (WebCore::HTMLFormElement::removeFormElement): Ditto.
1408 2007-12-31 Henry Mason <hmason@mac.com>
1412 Patch for http://bugs.webkit.org/show_bug.cgi?id=14994
1413 Support for MessageEvent and cross-domain messaging
1415 Test: http/tests/messaging/cross-domain-message-send.html
1417 * DerivedSources.make:
1419 * WebCore.vcproj/WebCore.vcproj:
1420 * WebCore.xcodeproj/project.pbxproj:
1421 * WebCoreSources.bkl:
1422 * bindings/js/JSDOMWindowCustom.cpp:
1423 (WebCore::JSDOMWindow::customGetOwnPropertySlot): Allow cross-domain access to the
1424 postMessage function.
1425 (WebCore::JSDOMWindow::postMessage):
1426 * bindings/js/JSEventCustom.cpp:
1429 (WebCore::Event::isMessageEvent):
1431 * dom/EventNames.h: New event name
1432 * dom/MessageEvent.cpp: Added.
1433 * dom/MessageEvent.h: Added.
1434 * dom/MessageEvent.idl: Added.
1435 * page/DOMWindow.cpp:
1436 (WebCore::DOMWindow::postMessage): Added.
1438 * page/DOMWindow.idl:
1440 2007-12-31 Darin Adler <darin@apple.com>
1444 - turn ENABLE_VIDEO back off for Windows until we can install QuickTime on the build bots
1446 * WebCore.vcproj/WebCore.vcproj: Removed ENABLE_VIDEO.
1447 * WebCore.vcproj/build-generated-files.sh: Ditto.
1449 2007-12-30 Alp Toker <alp@atoker.com>
1451 Reviewed by Dan Bernstein.
1457 2007-12-30 Sam Weinig <sam@webkit.org>
1459 Reviewed by Oliver Hunt.
1461 Fix for http://bugs.webkit.org/show_bug.cgi?id=16387
1462 Variable names can be enumerated across domains
1463 <rdar://problem/5640454>
1465 Test: http/tests/security/cross-frame-access-enumeration.html
1467 * bindings/js/kjs_window.cpp:
1468 (KJS::Window::getPropertyNames): Override method to test same-origin policy.
1469 * bindings/js/kjs_window.h:
1471 2007-12-30 Sam Weinig <sam@webkit.org>
1473 Reviewed by Oliver Hunt.
1475 Patch for http://bugs.webkit.org/show_bug.cgi?id=10686
1476 event instanceof MouseEvent throws exception
1478 Add JS constructors for all the Event types.
1480 Test: fast/events/event-instanceof.html
1482 * WebCore.xcodeproj/project.pbxproj:
1483 * dom/KeyboardEvent.idl:
1484 * dom/MouseEvent.idl:
1485 * dom/MutationEvent.idl:
1486 * dom/OverflowEvent.idl:
1487 * dom/ProgressEvent.idl:
1488 * dom/TextEvent.idl:
1490 * dom/WheelEvent.idl:
1491 * page/DOMWindow.idl:
1493 2007-12-30 David Kilzer <ddkilzer@webkit.org>
1497 - fix http://bugs.webkit.org/show_bug.cgi?id=15359
1498 JPEG image not shown when height is specified as percentage inside a table
1500 The problem occurs when a replaced element (image, canvas, etc.) with
1501 a percent-height attribute is contained by a table cell with an auto-
1502 or percent-height attribute. If there are no other conditions to cause
1503 the table cell's height to expand, an available height of zero will
1504 always be returned. In these cases, the intrinsic height of the
1505 replaced element should be used if it is greater than the available
1506 height of the table cell.
1508 Tests: fast/replaced/table-percent-height.html
1509 tables/mozilla/bugs/bug137388-1.html
1510 tables/mozilla/bugs/bug137388-2.html
1512 * rendering/RenderBox.cpp:
1513 (WebCore::RenderBox::calcReplacedHeightUsing):
1515 2007-12-30 Luca Bruno <lethalman88@gmail.com>
1517 Reviewed by Alp Toker.
1519 http://bugs.webkit.org/show_bug.cgi?id=16099
1520 Crash in CURL for empty POST
1522 We have to set POST even when the data is empty, otherwise cURL will
1523 hang while waiting for a response.
1525 * platform/network/curl/ResourceHandleManager.cpp
1526 (ResourceHandleManager::setupPOST): allow empty POST
1528 2007-12-29 Jan Michael Alonzo <jmalonzo@unpluggable.com>
1530 Reviewed by Alp Toker.
1532 Move all SVG related stuff inside SVG block. Don't include
1533 SVGNames, SVGElementFactory, and XLinkNames when SVG is not
1538 2007-12-29 Alexey Proskuryakov <ap@webkit.org>
1542 http://bugs.webkit.org/show_bug.cgi?id=14428
1543 FCKEditor: Images disappear on drag/drop and copy/paste
1545 Test: editing/pasteboard/drag-image-in-about-blank-frame.html
1547 * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't use "about:blank" as a
1548 base URL, just like we don't use an empty one.
1550 2007-12-29 Jan Michael Alonzo <jmalonzo@unpluggable.com>
1552 Reviewed by Alp Toker.
1554 http://bugs.webkit.org/show_bug.cgi?id=16669
1555 autotools update and fixes
1557 Autotools update and database/icon database inclusion guard fixes
1560 - Update autotools config as per -r29012 changes
1561 - Fix CSSGrammar.h/cpp generation (Seo Sanghyeon, sanxiyn)
1563 * loader/icon/IconDatabase.h:
1564 * page/DOMWindow.cpp:
1565 * page/InspectorController.cpp:
1566 * page/Settings.cpp:
1567 * storage/Database.h:
1568 - Remove ENABLE(DATABASE) inclusion guard. Let the includer add the guard instead.
1570 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1574 Respect horiz-origin-x / horiz-origin-y / vert-origin-x / vert-origin-y properties when drawing SVG Fonts.
1575 (Fixes fonts-elem-05-t.svg in a --svg-fonts build)
1578 (WebCore::Font::drawGlyphsWithSVGFont):
1580 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1584 Further SVG Font work. Parse all <glyph> attributes, using SVGGlyphElement::buildGlyphIdentifier.
1585 SVGFontElement::collectGlyphs() now uses this method. Per character advance values work well now.
1587 * platform/graphics/FontData.cpp:
1588 (WebCore::SVGFontData::convertEmUnitToPixel): Add helper function.
1589 (WebCore::FontData::ascent):
1590 (WebCore::FontData::descent):
1591 * platform/graphics/FontData.h:
1593 (WebCore::isVerticalWritingMode): Add helper function.
1594 (WebCore::Font::drawGlyphsWithSVGFont):
1595 * svg/SVGFontElement.cpp:
1596 (WebCore::SVGFontElement::collectGlyphs): Simplified implementation - SVGGlyphIdentifier now build by SVGGlyphElement.
1597 * svg/SVGGlyphElement.cpp:
1598 (WebCore::parseArabicForm): Helper function.
1599 (WebCore::parseOrientation): Ditto.
1600 (WebCore::parsePathData): Ditto.
1601 (WebCore::SVGGlyphElement::buildGlyphIdentifier):
1602 * svg/SVGGlyphElement.h:
1603 (WebCore::SVGGlyphElement::rendererIsNeeded):
1605 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1609 Refactor SVGAnimationElement::parseValues into a generic function parseDelimitedString.
1610 SVGAnimationElement needs to parse semicolon-seperated strings, SVGGlyphElement comma-seperated.
1612 * svg/SVGAnimationElement.cpp:
1613 (WebCore::SVGAnimationElement::parseMappedAttribute):
1614 * svg/SVGParserUtilities.cpp:
1615 (WebCore::parseDelimitedString):
1616 * svg/SVGParserUtilities.h:
1618 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1622 Add new helper structure SVGFontData - FontData holds this object as OwnPtr.
1623 Store several attribute values there (horiz-adv-x, horiz-origin-x etc..)
1625 To optimize for the common case ('FontData' used for HTML rendering) it feels
1626 better to hold one OwnPtr in FontData, than several floats.
1628 Parse all <font> attributes in SVGFontFaceElement::createFontData.
1630 * platform/graphics/FontData.cpp:
1631 (WebCore::SVGFontData::SVGFontData):
1632 (WebCore::FontData::FontData):
1633 (WebCore::FontData::ascent):
1634 (WebCore::FontData::descent):
1635 * platform/graphics/FontData.h:
1636 (WebCore::FontData::isSVGFont):
1637 (WebCore::FontData::svgFontData):
1639 (WebCore::Font::drawGlyphsWithSVGFont):
1640 * svg/SVGFontElement.cpp:
1641 * svg/SVGFontElement.h:
1642 (WebCore::SVGFontElement::rendererIsNeeded):
1643 * svg/SVGFontFaceElement.cpp:
1644 (WebCore::SVGFontFaceElement::unitsPerEm):
1645 (WebCore::SVGFontFaceElement::createFontData):
1647 2007-12-28 Darin Adler <darin@apple.com>
1649 - try to fix Windows and WX builds (broken by SVG Fonts check-in)
1651 * platform/graphics/win/FontWin.cpp:
1652 (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent, now that it requires it.
1653 I can't see how it can be right to require the font size for ascent and descent,
1654 but not for other metrics functions in FontData.
1656 * platform/graphics/wx/FontWx.cpp:
1657 (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent and FontData::descent.
1659 2007-12-28 Dan Bernstein <mitz@apple.com>
1661 Reviewed by Mark Rowe.
1663 - fix http://bugs.webkit.org/show_bug.cgi?id=16650
1664 <rdar://problem/5664872> REGRESSION (r28278-r28314): ATSUI uses LTR writing direction for all text runs
1666 Covered by existing pixel tests.
1668 * platform/graphics/mac/FontMac.mm:
1669 (WebCore::Font::drawComplexText): Corrected to maintain the style
1670 information in the adjusted text run when passing it to
1671 ATSUILayoutParameters. Prior to r28298 the style was passed separately.
1673 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1675 Build fix, not reviewed.
1677 Add wtf/OwnPtr.h include, to fix --svg-fonts build.
1679 * css/SVGCSSFontFace.h:
1681 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
1685 Fixes: http://bugs.webkit.org/show_bug.cgi?id=10649 (WebKit SVG needs SVG Fonts support)
1687 Begin implementation of SVG Fonts module. Basic documents using SVG Fonts already work.
1688 Only local, in-document fonts who declare their glyphs using the <glyph d="..."> path syntax
1689 are supported. (<glyph> containing arbitary SVG content as child elements, not supported yet).
1691 Limited to single char <-> glyph mapping, no ligatures supported yet.
1692 (ie. <glyph unicode='A'/> <glyph unicode='AB'/> - it ignores the 'AB' glyph definition for now)
1694 Mark all SVG Font related classes & usages in ENABLE(SVG_FONTS) blocks.
1696 No layout test changes for a --no-svg-fonts build, heavy changes if enabled. Because a lot of SVG Font
1697 attributes are not processed yet, the rendering looks wrong - hence disabled by default.)
1699 * DerivedSources.make: Add SVGFontElement/SVGGlyphElement/SVGMissingGlyphElement
1700 * WebCore.pro: Updated build system.
1701 * WebCore.vcproj/WebCore.vcproj: Ditto.
1702 * WebCore.xcodeproj/project.pbxproj: Ditto.
1703 * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGFontElement/JSSVGGlyphElement/JSSVGMissingGlyphElement
1704 * bindings/objc/DOM.mm: Ditto (for DOMSVG*).
1705 (WebCore::createElementClassMap):
1706 * bindings/objc/DOMInternal.h: Ditto.
1707 * bindings/objc/DOMSVG.h: Ditto.
1708 * css/CSSFontFace.h: Mark three functions 'virtual', to be overriden by SVGCSSFontFace
1709 * css/CSSFontFaceSrcValue.h: Add functionality to identify as SVG CSS font face source.
1710 (WebCore::CSSFontFaceSrcValue::m_fontFaceElement): Hold a pointer to the font face which created it.
1711 (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
1712 (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
1713 * css/CSSFontSelector.cpp: Build 'SVGCSSFontFace' objects for local, in-document SVG fonts.
1714 (WebCore::CSSFontSelector::addFontFaceRule):
1715 * css/SVGCSSFontFace.cpp: Added. (Simplified implementation for SVG Fonts)
1716 (WebCore::SVGCSSFontFace::SVGCSSFontFace):
1717 (WebCore::SVGCSSFontFace::~SVGCSSFontFace):
1718 (WebCore::SVGCSSFontFace::isValid):
1719 (WebCore::SVGCSSFontFace::addSource):
1720 (WebCore::SVGCSSFontFace::getFontData):
1721 * css/SVGCSSFontFace.h: Added.
1722 * platform/graphics/cg/PathCG.cpp:
1723 (WebCore::Path::closeSubpath): Silence a CG warning when calling closeSubpath() on empty path.
1724 * platform/graphics/Font.cpp: Add some logic to call into SVG Font code when operating on SVG Fonts.
1725 (WebCore::Font::ascent): Pass font size to FontData::ascent() call
1726 (WebCore::Font::descent): Pass font size to FontData::descent() call
1727 (WebCore::Font::canUseGlyphCache): Always return true for SVG fonts here.
1728 (WebCore::Font::drawGlyphBuffer): Call drawGlyphsWithSVGFont (instead of drawGlyphs) if the primary font is a SVG font.
1729 * platform/graphics/Font.h: Add (SVG-only!) ability to store a RenderObject pointer, to the element which invoked the drawText() call.
1730 (WebCore::TextRun::TextRun):
1731 (WebCore::TextRun::referencingRenderObject):
1732 (WebCore::TextRun::setReferencingRenderObject):
1733 * platform/graphics/FontData.cpp:
1734 (WebCore::FontData::FontData):
1735 (WebCore::FontData::ascent):
1736 (WebCore::FontData::descent):
1737 * platform/graphics/FontData.h: Store a pointer to the SVGFontFaceElement, which created this FontData object - needed for drawGlyphsWithSVGFont().
1738 (WebCore::FontData::isSVGFont): Offer a way to determine wheter this is a FontData object, created by a SVGFontFaceElement.
1739 (WebCore::FontData::svgFontFace):
1740 * rendering/SVGInlineTextBox.cpp:
1741 (WebCore::SVGInlineTextBox::calculateGlyphWidth): Add assertion.
1742 * rendering/SVGRootInlineBox.cpp:
1743 (WebCore::svgTextRunForInlineTextBox): Always call 'setReferencingRenderObject(myRenderSVGText)' on the new TextRun
1744 * svg/SVGFont.cpp: Added.
1745 (WebCore::Font::drawGlyphsWithSVGFont): Outsourced implementation of SVG Fonts into it's own file.
1746 * svg/SVGFontElement.cpp: Added. (Note: this holds the GlyphHashMap which associates certain <glyph> objects with unicode values)
1747 (WebCore::SVGFontElement::SVGFontElement):
1748 (WebCore::SVGFontElement::~SVGFontElement):
1749 (WebCore::SVGFontElement::parseMappedAttribute):
1750 (WebCore::SVGFontElement::collectGlyphs):
1751 (WebCore::SVGFontElement::glyphIdentifierForGlyphCode):
1752 * svg/SVGFontElement.h: Added.
1753 (WebCore::GlyphHash::hash):
1754 (WebCore::GlyphHash::equal):
1755 (WebCore::GlyphHashTraits::deletedValue):
1756 (WebCore::SVGFontElement::rendererIsNeeded):
1757 (WebCore::SVGFontElement::contextElement):
1758 * svg/SVGFontElement.idl: Added.
1759 * svg/SVGFontFaceElement.cpp: Build SVG specific 'FontData' object
1760 (WebCore::SVGFontFaceElement::unitsPerEm):
1761 (WebCore::SVGFontFaceElement::fontFamily):
1762 (WebCore::SVGFontFaceElement::createFontData): Builds SVG specified 'FontData' object with the markup specified ascent/descent values etc..
1763 (WebCore::SVGFontFaceElement::rebuildFontFace): Construct CSSFontFaceSrc object (marked as 'isSVGFontFaceSrc') to satisfy CSSFontSelector::addFontFaceRule.
1764 (WebCore::SVGFontFaceElement::insertedIntoDocument): Rebuild font face.
1765 (WebCore::SVGFontFaceElement::glyphIdentifierForGlyphCode): Allows drawGlyphsWithSVGFont to access the glyph hash map living in the SVGFontElement.
1766 * svg/SVGFontFaceElement.h: Fixed code formatting issues & wrap in ENABLE(SVG_FONTS) blocks.
1767 * svg/SVGFontFaceElement.idl: Ditto.
1768 * svg/SVGFontFaceFormatElement.cpp: Ditto.
1769 * svg/SVGFontFaceFormatElement.h: Ditto.
1770 * svg/SVGFontFaceFormatElement.idl: Ditto.
1771 * svg/SVGFontFaceNameElement.cpp: Ditto.
1772 * svg/SVGFontFaceNameElement.h: Ditto.
1773 * svg/SVGFontFaceNameElement.idl: Ditto.
1774 * svg/SVGFontFaceSrcElement.cpp: Ditto.
1775 * svg/SVGFontFaceSrcElement.h: Ditto.
1776 * svg/SVGFontFaceSrcElement.idl: Ditto.
1777 * svg/SVGFontFaceUriElement.cpp: Ditto.
1778 * svg/SVGFontFaceUriElement.h: Ditto.
1779 * svg/SVGFontFaceUriElement.idl: Ditto.
1780 * svg/SVGDefinitionSrcElement.cpp: Ditto.
1781 * svg/SVGDefinitionSrcElement.h: Ditto.
1782 * svg/SVGDefinitionSrcElement.idl: Ditto.
1783 * svg/SVGGlyphElement.cpp: Added.
1784 (WebCore::SVGGlyphElement::SVGGlyphElement):
1785 (WebCore::SVGGlyphElement::parseMappedAttribute):
1786 (WebCore::SVGGlyphElement::childrenChanged):
1787 * svg/SVGGlyphElement.h: Added.
1788 (WebCore::SVGGlyphElement::rendererIsNeeded):
1789 (WebCore::SVGGlyphIdentifier::): Structure holding all data to represent a SVG glyph (origin, advance, orientation etc..)
1790 (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
1791 * svg/SVGGlyphElement.idl: Added.
1792 * svg/SVGMissingGlyphElement.cpp: Added. (stub implementation)
1793 (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
1794 (WebCore::SVGMissingGlyphElement::parseMappedAttribute):
1795 (WebCore::SVGMissingGlyphElement::childrenChanged):
1796 * svg/SVGMissingGlyphElement.h: Added.
1797 (WebCore::SVGMissingGlyphElement::rendererIsNeeded):
1798 * svg/SVGMissingGlyphElement.idl: Added.
1799 * 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!).
1801 2007-12-27 Dan Bernstein <mitz@apple.com>
1803 Reviewed by Alexey Proskuryakov.
1805 - fix http://bugs.webkit.org/show_bug.cgi?id=16628
1806 ASSERTION FAILED: m_resizeLayer (running layout tests)
1808 * rendering/RenderLayer.cpp:
1809 (WebCore::RenderLayer::~RenderLayer): Avoid calling
1810 EventHandler::resizeLayerDestroyed() if the document is being destroyed.
1812 2007-12-27 Dan Bernstein <mitz@apple.com>
1814 Reviewed by Oliver Hunt.
1816 - fix http://bugs.webkit.org/show_bug.cgi?id=16603
1817 <rdar://problem/5664199> Crash when resizing text field
1819 Test: fast/layers/resize-layer-deletion-crash.html
1821 The event handler has only a weak reference to the layer that is
1822 currently in resize mode, so it is the layer's responsibility to let
1823 the event handler know if it has been destroyed while in that mode.
1825 * page/EventHandler.cpp:
1826 (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets
1828 * page/EventHandler.h:
1829 * rendering/RenderLayer.cpp:
1830 (WebCore::RenderLayer::~RenderLayer): Added a call to
1831 EventHandler::resizeLayerDestroyed() if the layer is in resize mode.
1833 2007-12-27 Collin Jackson <webkit@collinjackson.com>
1835 Reviewed by Sam Weinig.
1837 http://bugs.webkit.org/show_bug.cgi?id=16539
1838 <rdar://problem/5659269>
1840 The same-origin check was missing in the implementation of
1841 setTimeout, setInterval, addEventListener, and removeEventListener.
1843 Suppose <http://www.badguy.com/> contains an iframe to
1844 <http://www.goodguy.com/>. Now www.badguy.com can steal
1845 www.goodguy.com cookies by running this code:
1847 setTimeout.call(frames[0], "alert(document.cookie)", 1000);
1849 This patch changes the behavior so that setTimeout to does
1850 nothing and returns an undefined value if the caller is not
1851 permitted to script the window whose setTimeout method is being
1852 called. The same applies to setInterval, addEventListener, and
1853 removeEventListener.
1855 Tests: http/tests/security/cross-frame-access-call.html
1857 * bindings/js/kjs_window.cpp:
1858 (KJS::WindowProtoFuncSetTimeout::callAsFunction)
1859 (KJS::WindowProtoFuncSetInterval::callAsFunction)
1860 (KJS::WindowProtoFuncAddEventListener::callAsFunction)
1861 (KJS::WindowProtoFuncRemoveEventListener::callAsFunction)
1863 2007-12-27 Dan Bernstein <mitz@apple.com>
1865 Reviewed by Dave Hyatt and Sam Weinig.
1867 - fix <rdar://problem/5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
1869 Test: fast/layers/add-layer-with-nested-stacking.html
1870 Test: fast/layers/remove-layer-with-nested-stacking.html
1872 * rendering/RenderLayer.cpp:
1873 (WebCore::RenderLayer::addChild): If the new child is overflow-only
1874 but has children of its own, dirty the stacking context's z-order lists
1875 since the grandchildren might need to be in them.
1876 (WebCore::RenderLayer::removeChild): Similarly for the old child.
1878 2007-12-27 Jan Michael Alonzo <jmalonzo@unpluggable.com>
1880 Reviewed by Alp Toker.
1882 http://bugs.webkit.org/show_bug.cgi?id=16353
1883 [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.)
1885 Added the flags mentioned in the bug only when doing 'debug'
1886 builds. -DGST_DISABLE_DEPRECATED only added when video is enabled.
1891 2007-12-27 Dan Bernstein <mitz@apple.com>
1893 Reviewed by Eric Seidel.
1895 - fix http://bugs.webkit.org/show_bug.cgi?id=16490
1896 ASSERT in ~FrameView while viewing/reloading WICD test case
1898 Test: fast/dynamic/paused-event-dispatch.html
1900 * page/FrameView.cpp:
1901 (WebCore::FrameView::~FrameView):
1902 (WebCore::FrameView::layout): Changed to always pause event dispatch and
1903 always resume event dispatch, regardless of whether the post-layout
1904 task timer is active. However, if it is active, assert that event
1905 dispatch is still paused.
1907 2007-12-27 Alexey Proskuryakov <ap@webkit.org>
1911 http://bugs.webkit.org/show_bug.cgi?id=14500
1912 need to be more generous about charset declaration with meta tag
1914 http://bugs.webkit.org/show_bug.cgi?id=12526
1915 <rdar://problem/4867183> Safari ignores encoding description "charset=Shift_JIS" in invalid html
1917 <rdar://problem/4892428> Unlike other browsers, WebKit ignores <meta> charset definitions outside the head
1919 <rdar://problem/5643774> REGRESSION: Text is garbled when clicking a link inside an Arabic website
1921 Tests: fast/encoding/ahram-org-eg.html
1922 fast/encoding/bandai-co-jp-releases.html
1923 fast/encoding/floraexpress-ru.html
1924 fast/encoding/hanarei-blog32-fc2-com.html
1925 fast/encoding/yahoo-mail.html
1927 * loader/TextResourceDecoder.cpp:
1928 (WebCore::TextResourceDecoder::checkForHeadCharset): Don't stop looking for <meta> until we've
1929 seen at least 512 bytes of input.
1931 2007-12-26 Jan Michael Alonzo <jmalonzo@unpluggable.com>
1933 Reviewed by Alp Toker.
1935 http://bugs.webkit.org/show_bug.cgi?id=16390
1936 Use autotools or GNU make as the build system for the GTK port
1938 * GNUmakefile.am: Added.
1940 2007-12-26 Alexey Proskuryakov <ap@webkit.org>
1942 Reviewed by Sam Weinig.
1944 http://bugs.webkit.org/show_bug.cgi?id=16609
1945 Make manual-tests/xmlhttprequest-contenttype-empty.html test automatic
1947 * manual-tests/xmlhttprequest-contenttype-empty.html: Removed (moved to LayoutTests/http).
1949 2007-12-26 Mark Rowe <mrowe@apple.com>
1953 * platform/Threading.h:
1955 2007-12-25 Rob Buis <buis@kde.org>
1959 http://bugs.webkit.org/show_bug.cgi?id=15514
1960 <clipPath> with <use> not respected
1961 http://bugs.webkit.org/show_bug.cgi?id=16557
1962 SVG circle elements have been clipped away completely, instead of partially.
1964 Add toClipPath to get clip path data for the clipping paths. Implement it for <use>, thereby allowing clip paths using use.
1966 * svg/SVGClipPathElement.cpp:
1967 (WebCore::SVGClipPathElement::canvasResource):
1968 * svg/SVGStyledTransformableElement.h:
1969 (WebCore::SVGStyledTransformableElement::toClipPath):
1970 * svg/SVGUseElement.cpp:
1971 (WebCore::isDirectReference):
1972 (WebCore::SVGUseElement::toClipPath):
1973 * svg/SVGUseElement.h:
1975 2007-12-25 Sam Weinig <sam@webkit.org>
1977 Reviewed by Eric Seidel.
1979 Clean up the files relating to NodeLists.
1981 * dom/ChildNodeList.cpp:
1982 (WebCore::ChildNodeList::ChildNodeList):
1983 (WebCore::ChildNodeList::length):
1984 (WebCore::ChildNodeList::item):
1985 (WebCore::ChildNodeList::nodeMatches):
1986 * dom/ChildNodeList.h:
1987 * dom/DynamicNodeList.cpp:
1988 (WebCore::DynamicNodeList::itemForwardsFromCurrent):
1989 (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
1990 (WebCore::DynamicNodeList::itemWithName):
1991 * dom/DynamicNodeList.h:
1992 (WebCore::DynamicNodeList::needsNotifications):
1993 * dom/NameNodeList.cpp:
1994 (WebCore::NameNodeList::NameNodeList):
1995 (WebCore::NameNodeList::rootNodeAttributeChanged):
1996 (WebCore::NameNodeList::nodeMatches):
1997 * dom/NameNodeList.h:
1999 * dom/SelectorNodeList.h:
2001 2007-12-25 Sam Weinig <sam@webkit.org>
2006 * WebCore.vcproj/WebCore.vcproj:
2007 * WebCoreSources.bkl:
2009 2007-12-25 Sam Weinig <sam@webkit.org>
2011 Rubber stamped by Eric Seidel.
2013 Move TagNodeList into its own file.
2015 * WebCore.xcodeproj/project.pbxproj:
2017 * dom/TagNodeList.cpp: Copied from dom/Node.cpp.
2018 (WebCore::TagNodeList::TagNodeList):
2019 * dom/TagNodeList.h: Copied from dom/Node.cpp.
2021 2007-12-25 Sam Weinig <sam@webkit.org>
2023 Reviewed by Eric Seidel.
2025 Simplify the NodeList architecture.
2026 - Rename recursiveItem() to item(), since it is not recursive.
2027 - Make recursiveLength() iterative and rename to length().
2028 - Remove now unneeded overrides of item() and length() that used
2029 to call the recursive variants.
2031 * dom/ClassNodeList.cpp:
2032 * dom/ClassNodeList.h:
2033 * dom/DynamicNodeList.cpp:
2034 (WebCore::DynamicNodeList::length):
2035 (WebCore::DynamicNodeList::item):
2036 (WebCore::DynamicNodeList::rootNodeAttributeChanged): Move implementation
2037 into the .cpp file since virtual methods can't be inlined.
2038 * dom/DynamicNodeList.h:
2039 * dom/NameNodeList.cpp:
2040 * dom/NameNodeList.h:
2043 2007-12-25 Alp Toker <alp@atoker.com>
2045 More complete GTK+/Qt/Wx/Win build fixes for breakage introduced in
2049 * WebCore.vcproj/WebCore.vcproj:
2050 * WebCoreSources.bkl:
2052 2007-12-25 Alp Toker <alp@atoker.com>
2054 Win build fix for breakage introduced in r28981.
2056 * WebCore.vcproj/WebCore.vcproj:
2058 2007-12-25 Alp Toker <alp@atoker.com>
2060 Wx build fix for breakage introduced in r28981.
2062 * WebCoreSources.bkl:
2064 2007-12-25 Alp Toker <alp@atoker.com>
2066 GTK+/Qt build fix for breakage introduced in r28981.
2070 2007-12-25 David Smith <catfish.man@gmail.com> and Sam Weinig <sam@webkit.org>
2074 - http://bugs.webkit.org/show_bug.cgi?id=16587
2075 Implement the most useful part of the W3C Selectors API.
2077 * WebCore.xcodeproj/project.pbxproj:
2078 * css/CSSStyleSelector.h: Make Node a friend of CSSStyleSelector so it can use checkSelector()
2079 * dom/ChildNodeList.cpp:
2080 (WebCore::ChildNodeList::ChildNodeList): Change to being a DynamicNodeList
2081 * dom/ChildNodeList.h:
2082 * dom/ClassNodeList.cpp:
2083 (WebCore::ClassNodeList::ClassNodeList): Change to being a DynamicNodeList
2084 * dom/ClassNodeList.h:
2085 * dom/Document.idl: Add the new functions
2086 * dom/DynamicNodeList.cpp: Copied from WebCore/dom/NodeList.cpp.
2087 (WebCore::DynamicNodeList::DynamicNodeList): Rename NodeList to DynamicNodeList, to differentiate it from the new StaticNodeList
2088 (WebCore::DynamicNodeList::~DynamicNodeList):
2089 (WebCore::DynamicNodeList::recursiveLength):
2090 (WebCore::DynamicNodeList::itemForwardsFromCurrent):
2091 (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
2092 (WebCore::DynamicNodeList::recursiveItem):
2093 (WebCore::DynamicNodeList::itemWithName):
2094 (WebCore::DynamicNodeList::rootNodeChildrenChanged):
2095 (WebCore::DynamicNodeList::Caches::Caches):
2096 (WebCore::DynamicNodeList::Caches::reset):
2097 * dom/DynamicNodeList.h: Copied from WebCore/dom/NodeList.h.
2098 (WebCore::DynamicNodeList::rootNodeAttributeChanged):
2099 * dom/Element.idl: Add the new functions
2100 * dom/NameNodeList.cpp: Change to being a DynamicNodeList
2101 (WebCore::NameNodeList::NameNodeList):
2102 * dom/NameNodeList.h:
2103 (WebCore::NameNodeList::rootNodeAttributeChanged):
2105 (WebCore::TagNodeList::TagNodeList): Change to being a DynamicNodeList
2106 (WebCore::Node::registerDynamicNodeList):
2107 (WebCore::Node::unregisterDynamicNodeList):
2108 (WebCore::Node::getElementsByName):
2109 (WebCore::Node::getElementsByClassName):
2110 (WebCore::Node::querySelector): new
2111 (WebCore::Node::querySelectorAll): new
2113 * dom/NodeList.cpp: Removed.
2114 * dom/NodeList.h: This is now an abstract superclass of DynamicNodeList and StaticNodeList
2115 (WebCore::NodeList::NodeList):
2116 (WebCore::NodeList::~NodeList):
2117 * dom/SelectorNodeList.cpp: Added.
2118 (WebCore::SelectorNodeList::SelectorNodeList): New StaticNodeList subclass that filters elements by CSS selector
2119 * dom/SelectorNodeList.h: Added.
2120 * dom/StaticNodeList.cpp: Added.
2121 (WebCore::StaticNodeList::length):
2122 (WebCore::StaticNodeList::item):
2123 (WebCore::StaticNodeList::itemWithName):
2124 * dom/StaticNodeList.h: Added.
2125 (WebCore::StaticNodeList::StaticNodeList):
2126 (WebCore::StaticNodeList::~StaticNodeList):
2128 2007-12-25 Mark Rowe <mrowe@apple.com>
2130 Reviewed by Sam Weinig.
2132 Implement a lock-free ThreadSafeShared for i386, x86_64, ppc and ppc64.
2133 http://bugs.webkit.org/show_bug.cgi?id=16596
2135 This is a 1.7x as fast as the lock-based implementation on x86 for a single-threaded use
2136 of ThreadSafeShared but is closer to 280x as fast when there is heavy concurrent multi-threaded
2137 access to a single ThreadSafeShared object.
2139 The atomic operations are based on those used by the Boost C++ library's shared_ptr implementation.
2141 * platform/Threading.h:
2142 (WebCore::atomicIncrement):
2143 (WebCore::atomicDecrement):
2144 (WebCore::ThreadSafeShared::ThreadSafeShared):
2145 (WebCore::ThreadSafeShared::ref): Use lock-free operations if available.
2146 (WebCore::ThreadSafeShared::deref): Ditto.
2147 (WebCore::ThreadSafeShared::hasOneRef):
2148 (WebCore::ThreadSafeShared::refCount):
2149 (WebCore::ThreadSafeShared::isThreadSafe):
2151 2007-12-24 Darin Adler <darin@apple.com>
2153 * platform/text/PlatformString.h: Removed now-incorrect comment.
2154 Added a comment about copy().
2155 * platform/text/StringImpl.h: Added a comment about copy().
2157 2007-12-24 Darin Adler <darin@apple.com>
2161 - http://bugs.webkit.org/show_bug.cgi?id=16550
2162 make StringImpl immutable
2164 I tried to keep the changes to a minimum. In some cases there is
2165 room for optimization -- I didn't try to add in the "single ref count"
2166 optimizations and there might be a tiny bit more string copying than
2169 * WebCore.base.exp: Updated.
2171 * dom/CharacterData.cpp:
2172 (WebCore::CharacterData::appendData): Changed to use String since
2173 StringImpl doesn't have mutating functions any more.
2174 (WebCore::CharacterData::insertData): Ditto.
2175 (WebCore::CharacterData::deleteData): Ditto.
2176 (WebCore::CharacterData::replaceData): Ditto.
2178 (WebCore::Text::splitText): Changed to use substring instead of
2179 remove since StringImpl does't have mutating functions any more.
2180 * editing/CompositeEditCommand.cpp:
2181 (WebCore::CompositeEditCommand::deleteInsignificantText): Changed
2182 to use String instead of StringImpl so we can use remove.
2184 * platform/text/PlatformString.h: Removed newUninitialized.
2185 Added append that takes a character pointer and length.
2187 * platform/text/String.cpp:
2188 (WebCore::String::insert): Added an implementation that does not
2189 rely on an underlying StringImpl function.
2190 (WebCore::String::append): Ditto.
2191 (WebCore::String::truncate): Ditto.
2192 (WebCore::String::remove): Ditto.
2193 (WebCore::String::charactersWithNullTermination): Added an
2194 implementation that uses the new StringImpl null termination feature,
2195 which does not require modifying a string.
2197 * platform/text/StringImpl.cpp:
2198 (WebCore::isSpace): Fix comment.
2199 (WebCore::StringImpl::StringImpl): Added a new constructor that makes
2200 a string with a trailing null character.
2201 (WebCore::StringImpl::substring): Marked const.
2202 (WebCore::StringImpl::replace): Marked const; had to add quite a few
2203 const_cast. Also rewrote one of these to work without modifying the
2206 * platform/text/StringImpl.h: Fixed a mistake where the empty string had
2207 m_hasTerminatingNullCharacter uninitialized. Added a type and constructor
2208 for creating strings that have a trailing null character. Added a
2209 hasTerminatingNullCharacter function. Removed newUninitialized,
2210 charactersWithNullTermination, append, insert, truncate, and remove.
2211 Marked lots of other functions const.
2213 * platform/text/TextCodecLatin1.cpp:
2214 (WebCore::TextCodecLatin1::decode): Rewrote to use a Vector instead of
2216 * platform/text/TextCodecUTF16.cpp:
2217 (WebCore::TextCodecUTF16::decode): Ditto.
2218 * platform/text/TextCodecUserDefined.cpp:
2219 (WebCore::TextCodecUserDefined::decode): Ditto.
2221 * rendering/RenderStyle.cpp:
2222 (WebCore::RenderStyle::setContent): Changed to use String since
2223 StringImpl doesn't have mutating functions any more.
2225 2007-12-24 Alexey Proskuryakov <ap@webkit.org>
2229 Fix fast/events/arrow-keys-on-body.html, failing on Windows.
2231 * platform/win/KeyEventWin.cpp:
2232 (WebCore::isKeypadEvent):
2233 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2234 Use HIWORD() macro instead of shifting the value explicitly (no change in behavior).
2236 2007-12-23 Alexey Proskuryakov <ap@webkit.org>
2238 Fix Debug and Release QTMovieWin bulds.
2240 * WebCore.vcproj/QTMovieWin.vcproj:
2241 * WebCore.vcproj/debug.vsprops:
2242 * WebCore.vcproj/debug_internal.vsprops:
2243 * WebCore.vcproj/release.vsprops:
2244 Use LibraryConfigSuffix instead of WebKitConfigSuffix for pthreadVC2.
2245 Build release import lib into \lib, not \bin.
2247 2007-12-23 Alp Toker <alp@atoker.com>
2249 Reviewed by Holger Freyther.
2251 http://bugs.webkit.org/show_bug.cgi?id=15382
2252 [CAIRO] Canvas pattern support
2254 http://bugs.webkit.org/show_bug.cgi?id=16577
2255 Merge Cairo enhancements from Apollo project
2257 Add support for canvas patterns.
2259 Make Image::nativeImageForCurrentFrame() public.
2261 Fix some typos along the way.
2263 The globalAlpha canvas fixes are not included in this patch as
2264 they're slightly more intrusive and may conflict conceptually with
2265 GraphicsContext::setAlpha().
2267 * html/CanvasPattern.cpp:
2268 (WebCore::CanvasPattern::CanvasPattern):
2269 (WebCore::CanvasPattern::~CanvasPattern):
2270 (WebCore::CanvasPattern::createPattern):
2271 * html/CanvasPattern.h:
2272 (WebCore::CanvasPattern::platformImage):
2273 * html/CanvasRenderingContext2D.cpp:
2274 (WebCore::CanvasRenderingContext2D::setShadow):
2275 (WebCore::CanvasRenderingContext2D::applyShadow):
2276 (WebCore::CanvasRenderingContext2D::drawImage):
2277 (WebCore::CanvasRenderingContext2D::createPattern):
2278 (WebCore::CanvasRenderingContext2D::applyStrokePattern):
2279 (WebCore::CanvasRenderingContext2D::applyFillPattern):
2280 * platform/graphics/Image.h:
2281 (WebCore::Image::nativeImageForCurrentFrame):
2283 2007-12-23 Kevin Ollivier <kevino@theolliviers.com>
2285 Reviewed by Eric Seidel.
2287 Remove getWxBitmap as we have nativeImageForCurrentFrame now,
2288 and don't draw a border in fillRect.
2290 * platform/graphics/BitmapImage.h:
2291 * platform/graphics/wx/GraphicsContextWx.cpp:
2292 (WebCore::GraphicsContext::fillRect):
2293 * platform/graphics/wx/ImageWx.cpp:
2295 2007-12-23 Alp Toker <alp@atoker.com>
2297 Reviewed by Holger Freyther.
2299 http://bugs.webkit.org/show_bug.cgi?id=16577
2300 Merge Cairo enhancements from Apollo project
2302 This patch is based on initial merging work by Brent Fulgham. Adobe's
2303 code has been modified in a few places to better suit the existing
2306 Implement more clipping and drawing functions.
2308 Save and restore the fill rule manually when clipping.
2310 Avoid image surface creation when the image buffer has height zero.
2312 * platform/graphics/cairo/GraphicsContextCairo.cpp:
2313 (WebCore::GraphicsContext::clip):
2314 (WebCore::GraphicsContext::addInnerRoundedRectClip):
2315 (WebCore::GraphicsContext::addPath):
2316 (WebCore::GraphicsContext::clipOut):
2317 (WebCore::GraphicsContext::clipOutEllipseInRect):
2318 (WebCore::GraphicsContext::fillRoundedRect):
2319 * platform/graphics/cairo/ImageSourceCairo.cpp:
2320 (WebCore::ImageSource::createFrameAtIndex):
2322 2007-12-23 Nikolas Zimmermann <zimmermann@kde.org>
2326 Fix wrong placed ifdef - wrapping SVGDefsElement, instead of SVGDefinitionSrcElement in SVG_FONTS block.
2328 * bindings/objc/DOM.mm:
2329 (WebCore::createElementClassMap):
2331 2007-12-22 Alp Toker <alp@atoker.com>
2335 GTK_TARGET_OTHER_APP is not available in older GTK+ versions. Pass
2336 empty target flags for now.
2338 Check GTK+, not GLib versions, since they are different.
2340 * platform/gtk/PasteboardGtk.cpp:
2341 (WebCore::Pasteboard::documentFragment):
2343 2007-12-22 Luca Bruno <lethalman88@gmail.com>
2345 Reviewed by Alp Toker.
2347 http://bugs.webkit.org/show_bug.cgi?id=16311
2348 [Gtk] Copy rich text to clipboard as text/plain and text/html.
2350 Hook into the WebView to get the correct clipboard object on the
2351 appropriate display. This is necessary because GTK+ does not have
2355 * platform/Pasteboard.h:
2356 (WebCore::Pasteboard::setHelper): added for GTK
2357 (WebCore::Pasteboard::m_helper): private added for GTK
2358 * platform/gtk/PasteboardGtk.cpp:
2359 (WebCore::PasteboardSelectionData): added to support GTK selection data callback
2360 (WebCore::clipboard_get_contents_cb): added
2361 (WebCore::clipboard_clear_contents_cb): added
2362 (WebCore::Pasteboard::~Pasteboard):
2363 (WebCore::Pasteboard::setHelper):
2364 (WebCore::Pasteboard::writeSelection): copy rich text
2365 (WebCore::Pasteboard::documentFragment):
2366 (WebCore::Pasteboard::plainText):
2367 * platform/gtk/PasteboardHelper.h: Added.
2369 2007-12-22 Nikolas Zimmermann <zimmermann@kde.org>
2373 Fixes: http://bugs.webkit.org/show_bug.cgi?id=15966 (Crash in SVGRootInlineBox::walkTextChunks() on mouse hover)
2375 Add new isSVGRootInlineBox() function to InlineBox to be able to differentiate between RootInlineBox/SVGRootInlineBox.
2376 SVG assumed it's root inline box (for <text> elements) is always of type SVGRootInlineBox, which is not the case
2377 for HTML text in <foreignObject>. Text selection doesn't work so far as line box offsets are wrong - which is visible
2380 * rendering/InlineBox.h:
2381 (WebCore::InlineBox::isSVGRootInlineBox):
2382 * rendering/SVGInlineTextBox.cpp:
2383 (WebCore::SVGInlineTextBox::svgRootInlineBox):
2384 (WebCore::SVGInlineTextBox::closestCharacterToPosition):
2385 (WebCore::SVGInlineTextBox::selectionRect):
2386 * rendering/SVGRenderTreeAsText.cpp:
2387 (WebCore::writeSVGInlineTextBox):
2388 * rendering/SVGRootInlineBox.h:
2389 (WebCore::SVGRootInlineBox::isSVGRootInlineBox):
2391 2007-12-22 Alp Toker <alp@atoker.com>
2393 LOW_BANDWIDTH_DISPLAY build fix
2395 Track recent KURL DeprecatedString changes.
2397 * loader/FrameLoader.cpp:
2398 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2400 2007-12-22 Dan Bernstein <mitz@apple.com>
2404 * WebCore.vcproj/WebCore.vcproj:
2406 2007-12-22 Xan Lopez <xan@gnome.org>
2408 Reviewed by Alp Toker.
2410 Add missing return 0 to fix a compile warning.
2412 * page/gtk/FrameGtk.cpp:
2413 (WebCore::Frame::createScriptInstanceForWidget):
2415 2007-12-21 Antti Koivisto <antti@apple.com>
2417 Reviewed by Darin, Adam and Steve.
2419 Add media playback support for Windows.
2421 The implementation uses low level QuickTime API. DLL is
2422 needed to work around CF use in both WebKit and QuickTime.
2424 This makes Windows build depend on the QuickTime SDK
2426 http://developer.apple.com/quicktime/download/
2428 but not QuickTime itself.
2430 QTMovieWinTimer contains some copy code from SharedTimerWin. It
2431 is used in the QuickTime access DLL which can't use WebCore
2432 SharedTimer due to dependency problems.
2434 * WebCore.vcproj/QTMovieWin.vcproj: Added.
2435 * WebCore.vcproj/WebCore.vcproj:
2436 * WebCore.vcproj/build-generated-files.sh:
2437 * html/HTMLMediaElement.cpp:
2438 (WebCore::HTMLMediaElement::setSrc):
2439 * platform/graphics/MediaPlayer.cpp:
2440 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Added.
2441 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2442 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2443 (WebCore::MediaPlayerPrivate::load):
2444 (WebCore::MediaPlayerPrivate::play):
2445 (WebCore::MediaPlayerPrivate::pause):
2446 (WebCore::MediaPlayerPrivate::duration):
2447 (WebCore::MediaPlayerPrivate::currentTime):
2448 (WebCore::MediaPlayerPrivate::seek):
2449 (WebCore::MediaPlayerPrivate::doSeek):
2450 (WebCore::MediaPlayerPrivate::cancelSeek):
2451 (WebCore::MediaPlayerPrivate::seekTimerFired):
2452 (WebCore::MediaPlayerPrivate::setEndTime):
2453 (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
2454 (WebCore::MediaPlayerPrivate::endPointTimerFired):
2455 (WebCore::MediaPlayerPrivate::paused):
2456 (WebCore::MediaPlayerPrivate::seeking):
2457 (WebCore::MediaPlayerPrivate::naturalSize):
2458 (WebCore::MediaPlayerPrivate::hasVideo):
2459 (WebCore::MediaPlayerPrivate::setVolume):
2460 (WebCore::MediaPlayerPrivate::setMuted):
2461 (WebCore::MediaPlayerPrivate::setRate):
2462 (WebCore::MediaPlayerPrivate::dataRate):
2463 (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2464 (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2465 (WebCore::MediaPlayerPrivate::maxTimeLoaded):
2466 (WebCore::MediaPlayerPrivate::bytesLoaded):
2467 (WebCore::MediaPlayerPrivate::totalBytesKnown):
2468 (WebCore::MediaPlayerPrivate::totalBytes):
2469 (WebCore::MediaPlayerPrivate::cancelLoad):
2470 (WebCore::MediaPlayerPrivate::updateStates):
2471 (WebCore::MediaPlayerPrivate::didEnd):
2472 (WebCore::MediaPlayerPrivate::setRect):
2473 (WebCore::MediaPlayerPrivate::setVisible):
2474 (WebCore::MediaPlayerPrivate::paint):
2475 (WebCore::MediaPlayerPrivate::getSupportedTypes):
2476 (WebCore::MediaPlayerPrivate::movieEnded):
2477 (WebCore::MediaPlayerPrivate::movieLoadStateChanged):
2478 (WebCore::MediaPlayerPrivate::movieTimeChanged):
2479 (WebCore::MediaPlayerPrivate::movieNewImageAvailable):
2480 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Added.
2481 (WebCore::MediaPlayerPrivate::networkState):
2482 (WebCore::MediaPlayerPrivate::readyState):
2483 * platform/graphics/win/QTMovieWin.cpp: Added.
2485 (QTMovieWinPrivate::QTMovieWinPrivate):
2486 (QTMovieWinPrivate::~QTMovieWinPrivate):
2488 (QTMovieWinPrivate::startTask):
2489 (QTMovieWinPrivate::endTask):
2490 (QTMovieWinPrivate::task):
2491 (QTMovieWinPrivate::registerDrawingCallback):
2492 (QTMovieWinPrivate::drawingComplete):
2493 (QTMovieWinPrivate::createGWorld):
2494 (QTMovieWinPrivate::setSize):
2495 (QTMovieWinPrivate::deleteGWorld):
2496 (QTMovieWin::QTMovieWin):
2497 (QTMovieWin::~QTMovieWin):
2499 (QTMovieWin::pause):
2501 (QTMovieWin::setRate):
2502 (QTMovieWin::duration):
2503 (QTMovieWin::currentTime):
2504 (QTMovieWin::setCurrentTime):
2505 (QTMovieWin::setVolume):
2506 (QTMovieWin::setMuted):
2507 (QTMovieWin::dataSize):
2508 (QTMovieWin::maxTimeLoaded):
2509 (QTMovieWin::loadState):
2510 (QTMovieWin::getNaturalSize):
2511 (QTMovieWin::setSize):
2512 (QTMovieWin::setVisible):
2513 (QTMovieWin::paint):
2515 (movieDrawingCompleteProc):
2516 (initializeSupportedTypes):
2517 (QTMovieWin::countSupportedTypes):
2518 (QTMovieWin::getSupportedType):
2519 (QTMovieWin::initializeQuickTime):
2521 * platform/graphics/win/QTMovieWin.h: Added.
2522 * platform/graphics/win/QTMovieWinTimer.cpp: Added.
2523 (TimerWindowWndProc):
2524 (initializeOffScreenTimerWindow):
2525 (setSharedTimerFiredFunction):
2527 (setSharedTimerFireDelay):
2529 (setSharedTimerInstanceHandle):
2531 * platform/graphics/win/QTMovieWinTimer.h: Added.
2532 * rendering/RenderMedia.cpp:
2533 (WebCore::MediaControlPlayButtonElement::update):
2535 2007-12-21 Brent Fulgham <bfulgham@gmail.com>
2537 Reviewed by Alp Toker.
2539 http://bugs.webkit.org/show_bug.cgi?id=16558
2540 Cairo WebCore Rendering Fails on arc drawing
2542 Fix for bug reported (and patched) by Apollo team in which
2543 arcs were draw in reverse (resulting in inverted images).
2544 Review of the source found that the 'clockwise' term was
2545 actually meant to mean 'anticlockwise' so the IDL and
2546 supporting classes have been changed to match this.
2548 * html/CanvasRenderingContext2D.cpp:
2549 (WebCore::CanvasRenderingContext2D::arc):
2550 * html/CanvasRenderingContext2D.idl:
2551 * platform/graphics/cairo/PathCairo.cpp:
2552 (WebCore::Path::addArc):
2553 (WebCore::Path::addEllipse):
2554 * platform/graphics/Path.h:
2556 2007-12-21 Alexey Proskuryakov <ap@webkit.org>
2560 <rdar://problem/5629995> Incorrect display of Danish characters on web site.
2562 Test: http/tests/xmlhttprequest/response-encoding.html
2564 * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData):
2565 Default to UTF-8 for HTML, too. It's unfortunate that we have to use different
2566 rules for main content and XHR responses, but this matches both IE and Firefox.
2568 2007-12-20 Jon Honeycutt <jhoneycutt@apple.com>
2570 Reviewed by Kevin Decker.
2572 <rdar://problem/5655797> REGRESSION(304-306A10) Safari does not find
2573 shockwave plugin on freshly installed OS
2575 Look for Director plugin in its native directory.
2577 * plugins/win/PluginDatabaseWin.cpp:
2578 (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin
2579 doesn't start with "np," so special case its filename.
2580 (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10"
2581 directories to the plugin paths.
2582 (WebCore::PluginDatabaseWin::defaultPluginPaths):
2584 2007-12-20 Peter Kasting <zerodpx@gmail.com>
2586 Reviewed by Alp Toker.
2588 http://bugs.webkit.org/show_bug.cgi?id=16508
2589 Fix regression in GIFImageDecoder.cpp: "Haeberli hack" led to wrongly
2590 decoded transparent areas.
2592 * platform/image-decoders/gif/GIFImageDecoder.cpp:
2593 (WebCore::GIFImageDecoder::haveDecodedRow):
2594 * platform/image-decoders/gif/GIFImageDecoder.h:
2595 * platform/image-decoders/gif/GIFImageReader.cpp:
2596 (GIFImageReader::output_row):
2598 2007-12-20 Justin Garcia <justin.garcia@apple.com>
2600 Reviewed by Oliver Hunt.
2602 <rdar://problem/5543472> GoogleDocs: Safari hangs when creating a list from a particular selection
2604 Still need to fix similar issues with the other operations that iterate
2605 over selected paragraphs, like FormatBlock, Indent and Outdent (<rdar://problem/5658933>).
2607 * editing/IndentOutdentCommand.cpp:
2608 (WebCore::IndentOutdentCommand::indentRegion): Added a FIXME.
2609 * editing/IndentOutdentCommand.h: Removed an unused function.
2610 * editing/InsertListCommand.cpp:
2611 (WebCore::InsertListCommand::modifyRange):
2612 Renamed visibleStart to startOfSelection and visibleEnd to endOfSelection.
2613 Call the new selectionForParagraphIteration, which a) prevents operations like this
2614 one from being performed on a table that isn't fully selected (where the selection
2615 starts just before the table and ends inside it), and b) helps prevent paragraph
2616 iteration from going past the end of the selection.
2617 Call the new startOfNextParagraph, instead of using endOfParagraph(v).next(),
2618 since when v is in the last paragraph of the last cell of a table, that expression
2619 will return the position after the table, not the start of the next paragraph.
2620 * editing/htmlediting.cpp:
2621 (WebCore::enclosingListChild): Don't go above a table cell, so that list operations
2622 take effect inside the table cell where they are performed.
2623 (WebCore::selectionForParagraphIteration): Added, see above.
2624 (WebCore::indexForVisiblePosition): Moved from IndentOutdentCommand.cpp.
2625 * editing/htmlediting.h:
2626 * editing/visible_units.cpp:
2627 (WebCore::startOfNextParagraph): Added, see above.
2628 * editing/visible_units.h:
2629 * editing/TextIterator.h:
2630 (WebCore::TextIterator::exitNode): Added a FIXME.
2632 2007-12-20 Alp Toker <alp@atoker.com>
2634 Rubber-stamped by Maciej.
2636 http://bugs.webkit.org/show_bug.cgi?id=16542
2637 [GTK] Text is missing with old Pango version
2639 Back out commits r28880, r28876, r28865, r28864 which added Pango font
2640 selection support. These changes caused a regression where no text was
2641 displayed with older Pango versions.
2643 * platform/graphics/gtk/FontCacheGtk.cpp:
2644 (WebCore::FontCache::fontExists):
2645 * platform/graphics/gtk/FontDataGtk.cpp:
2646 (WebCore::FontData::platformDestroy):
2647 (WebCore::FontData::containsCharacters):
2648 * platform/graphics/gtk/FontPlatformData.h:
2649 (WebCore::FontPlatformData::FontPlatformData):
2650 (WebCore::FontPlatformData::hash):
2651 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2652 (WebCore::FontPlatformData::FontPlatformData):
2653 (WebCore::FontPlatformData::init):
2654 (WebCore::FontPlatformData::~FontPlatformData):
2655 (WebCore::FontPlatformData::isFixedPitch):
2656 (WebCore::FontPlatformData::operator==):
2657 * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
2658 (WebCore::GlyphPage::fill):
2660 2007-12-20 Timothy Hatcher <timothy@apple.com>
2662 Reviewed by Sam Weinig.
2664 <rdar://problem/5604897> Double-clicking on JavaScript console error
2665 won't show the line where it occurred
2667 Make the URLs clickable in the console, since double clicking is used for
2668 word text selection. Makes the word "line" localizable. Messages that don't
2669 have a URL will no longer print "undefined". Messages that have a line number
2670 less than or equal to 0 will no longer be printed.
2672 * English.lproj/InspectorLocalizedStrings.js: Add "%s (line %d)".
2673 * page/inspector/ConsolePanel.js: Tweak how the DOM nodes are created
2674 and change the click handler to look for a link with the
2675 "console-message-url" class name.
2676 * page/inspector/SourcePanel.js: Call setupSourceFrameIfNeeded() if a
2678 * page/inspector/inspector.css: Update the look of the URL in the console.
2680 2007-12-20 Adam Barth <hk9565@gmail.com>
2682 Reviewed and landed by Sam Weinig.
2684 http://bugs.webkit.org/show_bug.cgi?id=15313
2685 <rdar://problem/5514516>
2687 The same-origin check was incorrect in two cases (both fixed in this
2690 A) If both the source and the target have set their document.domain
2691 to the same value, the protocol must also match in order for
2692 access to be allowed. Without this requirement, the browser is
2693 vulnerable to the following attack:
2695 1) Suppose there is an HTTPS site (www.example.com) that sets
2696 document.domain = "example.com".
2697 2) A network attacker redirects the browser to http://www.example.com/
2698 a) injects script to set document.domain = "example.com", and
2699 b) opens a window to https://www.example.com/
2700 3) Now the network attacker can inject script into the HTTPS page,
2701 stealing cookies and issuing banking transactions.
2703 B) If only one of the source and target has set document.domain, then
2704 access should be denied. With this behavior, the browser is
2705 vulnerable to the following attack:
2707 1) Suppose http://foo.example.com/ opens an iframe to
2708 http://foo.example.com/frame.html that
2709 a) sets document.domain = "example.com", and
2710 b) opens an iframe to http://bar.example.com/
2711 This is a common usage of document.domain for cross-domain
2712 communication, see for example:
2713 http://www.collinjackson.com/research/papers/fp801-jackson.pdf
2714 2) The inner-most iframe, which is from bar.example.com, sets
2715 document.domain = "example.com".
2716 3) Now the inner-most iframe can inject script into the middle
2717 iframe (say via document.write). This bar.example.com script
2718 now has access to the outer-most frame (from foo.example.com).
2720 Both these changes cause WebKit to match the behavior of Firefox 2 and
2721 IE6 in these cases. This patch includes regression tests for both
2724 Internet Explorer 7 and Opera 9 are more strict in that they require
2725 the port numbers to match when both pages have document.domain set.
2726 Opera 9 allows access when only one page has set document.domain, but
2727 this is a security vulnerability.
2729 Tests: http/tests/security/cross-frame-access-child-explicit-domain.html
2730 http/tests/security/cross-frame-access-parent-explicit-domain.html
2732 * bindings/js/kjs_window.cpp:
2733 (KJS::createWindow):
2734 (KJS::Window::allowsAccessFrom):
2736 (WebCore::Document::domain):
2737 (WebCore::Document::setDomain):
2738 (WebCore::Document::initSecurityOrigin):
2740 (WebCore::Document::securityOrigin):
2741 * loader/FrameLoader.cpp:
2742 (WebCore::FrameLoader::begin):
2743 (WebCore::FrameLoader::checkCallImplicitClose):
2744 (WebCore::FrameLoader::shouldAllowNavigation):
2745 * platform/SecurityOrigin.cpp:
2746 (WebCore::SecurityOrigin::setForURL):
2747 (WebCore::SecurityOrigin::createForFrame):
2748 (WebCore::SecurityOrigin::canAccess):
2749 * platform/SecurityOrigin.h:
2750 (WebCore::SecurityOrigin::domain):
2751 * storage/Database.cpp:
2752 (WebCore::Database::openDatabase):
2753 (WebCore::Database::Database):
2754 (WebCore::Database::securityOriginData):
2755 * storage/Database.h:
2756 (WebCore::Database::databaseDebugName):
2757 * storage/DatabaseTracker.cpp:
2758 (WebCore::DatabaseTracker::canEstablishDatabase):
2759 * storage/SQLTransaction.cpp:
2760 (WebCore::SQLTransaction::postflightAndCommit):
2761 (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
2763 2007-12-20 Rodney Dawes <dobey@wayofthemonkey.com>
2765 Reviewed by Darin Adler.
2767 Define XP_UNIX when building with plugins on X11.
2768 Use new npruntime_internal.h instead of npruntime.h.
2769 http://bugs.webkit.org/show_bug.cgi?id=15669
2771 * ForwardingHeaders/bindings/npruntime_internal.h
2773 * html/HTMLPlugInElement.h:
2775 2007-12-19 johnnyding.webkit <johnnyding.webkit@gmail.com>
2777 Reviewed by Alexey. Landed by Stephanie.
2779 - fix http://bugs.webkit.org/show_bug.cgi?id=16179 | <rdar://problem/5619399>
2780 Any attribute name start with a unicode which like #xx00(x could be any hex number[0-9a-f]) will cause HTMLTokenizer parse error
2781 Actually any unicode characters which great than 255 in attribute name will cause Webkit parse the attribute name wrong. So after comparing
2782 the same scenario in IE 6/7, FireFox 2/3, Opera, we should treat those characters as part of attribute name.
2785 * html/HTMLTokenizer.cpp:
2786 (WebCore::HTMLTokenizer::parseEntity): Handle Unicode Entity Name by using ASCII version of findEntity.
2787 (WebCore::HTMLTokenizer::parseTag): Let type of ptr match type of cBuffer.
2788 * html/HTMLTokenizer.h: Change type of cBuffer from char to UChar.
2790 2007-12-20 Eric Seidel <eric@webkit.org>
2792 Reviewed by Nikolas Zimmermann.
2794 WebKit claims to support SVG feature strings it shouldn't
2795 http://bugs.webkit.org/show_bug.cgi?id=15480
2797 * dom/DOMImplementation.cpp:
2798 (WebCore::isSVG10Feature):
2799 (WebCore::isSVG11Feature):
2801 2007-12-20 John Sullivan <sullivan@apple.com>
2803 Reviewed by Oliver and Geoff
2805 - fix <rdar://problem/5536858> Yellow highlight for find results is sometimes shorter
2806 than white "hole" behind it
2808 * rendering/RenderText.cpp:
2809 (WebCore::RenderText::addLineBoxRects):
2810 respect useSelectionHeight in all cases; we were only respecting it in one of the two cases
2812 2007-12-20 Dan Bernstein <mitz@apple.com>
2814 Reviewed by Darin Adler.
2816 - fix <rdar://problem/5656368> REGRESSION(3.0.4-ToT): Acid2 test fails to render anything
2818 * platform/win/ScrollViewWin.cpp:
2819 (WebCore::ScrollView::maximumScroll): Changed back to return the maximum
2820 scroll offsets even if scrolling is not allowed, because navigation and
2821 scrollTo should still work.
2822 (WebCore::ScrollView::wheelEvent): Added early return if scrolling is
2825 2007-12-17 Tony Chang <idealisms@gmail.com>
2829 - Fix for http://bugs.webkit.org/show_bug.cgi?id=16479
2830 text selection does not always begin at mouse down point
2831 Reset the m_dragSrc object on mouse down on all platforms.
2833 Test: fast/text/reset-drag-on-mouse-down.html
2835 * page/EventHandler.cpp:
2836 (WebCore::EventHandler::handleMousePressEvent):
2837 * page/mac/EventHandlerMac.mm:
2838 (WebCore::EventHandler::mouseDown):
2840 2007-12-19 Geoffrey Garen <ggaren@apple.com>
2842 Reviewed by Oliver Hunt.
2845 * ForwardingHeaders/kjs/SymbolTable.h: Added.
2846 * ForwardingHeaders/wtf/VectorTraits.h: Added.
2848 * bindings/js/JSDOMWindowCustom.cpp:
2849 (WebCore::JSDOMWindow::customGetOwnPropertySlot): Replaced use of
2850 getDirectLocation with getOwnPropertySlot. getDirectLocation is no
2851 longer valid, since global declarations are not stored in the property
2854 (WebCore::JSDOMWindow::customPut): Replaced use of JSObject::put with
2855 JSGlobalObject::put. JSObject::put is no longer valid, since global
2856 declarations are not stored in the property map.
2858 * bindings/js/kjs_window.cpp: Replaced JSObject:: calls with Base::
2859 calls, since JSObject is not our base class. This was always a bug, but
2860 the bug is even more apparent after some of my changes.
2862 (KJS::Window::clear): Removed call to clearProperties because
2863 JSGlobalObject::reset takes care of that now.
2865 * history/CachedPage.cpp:
2866 * history/CachedPage.h: Added support for saving a symbol table and
2867 localStorage to the page cache, and restoring it.
2869 2007-12-19 Dan Bernstein <mitz@apple.com>
2871 Reviewed by Darin Adler and Dave Hyatt.
2873 - Substitute the user's preferred standard font for an unknown primary
2874 font before falling back on the platform's last resort font
2876 Cannot be tested in DumpRenderTree because it sets the standard font to
2877 Times, which is also the hard-coded last resort font on Mac.
2879 * css/CSSFontSelector.cpp:
2880 (WebCore::CSSFontSelector::getFontData): Changed the early bail out
2881 condition to allow getting generic font families from settings even if
2882 there are not @font-face rules. Fixed a typo that mapped fantasy to
2883 cursive. Added a mapping from -webkit-standard to the standard family.
2884 * css/CSSStyleSelector.cpp:
2885 (WebCore::CSSStyleSelector::CSSStyleSelector): Changed to always create
2887 (WebCore::CSSRuleSet::addRulesFromSheet):
2888 (WebCore::CSSStyleSelector::applyProperty): Changed to always use the
2890 * css/CSSStyleSelector.h:
2891 (WebCore::CSSStyleSelector::fontSelector):
2892 * platform/graphics/FontCache.cpp:
2893 (WebCore::FontCache::getFontData): Try the user's preferred standard
2894 font before the platform's last resort font.
2896 2007-12-19 Sven Herzberg <sven@imendio.com>
2898 Reviewed by Alp Toker.
2900 Scaled font destruction takes place in FontData::platformDestroy(). No
2901 need to do it in FontPlatformData::~FontPlatformData().
2903 Destroying platform data in platformDestroy() is a convention we
2904 borrow from the Mac and Win ports.
2906 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2908 2007-12-19 Alice Liu <alice.liu@apple.com>
2912 Changed uint to unsigned int. uint caused Windows build breakage
2915 (WebCore::Page::markAllMatchesForText):
2918 2007-12-19 Christian Dywan <christian@twotoasts.de>
2920 Reviewed by Alp Toker.
2922 http://bugs.webkit.org/show_bug.cgi?id=16222
2923 [GTK] Implement inline search and highlighting of matching strings.
2925 Implement search and highlighting logic directly in WebCore.
2928 (WebCore::incrementFrame):
2929 (WebCore::Page::findString):
2930 (WebCore::Page::markAllMatchesForText):
2931 (WebCore::Page::unmarkAllTextMatches):
2934 2007-12-19 Geoffrey Garen <ggaren@apple.com>
2936 Reviewed by Sam Weinig, Dan Bernstein.
2938 Tiger build fix: restored some graphics code still needed on Tiger.
2940 * platform/graphics/GraphicsTypes.h:
2941 * platform/graphics/cg/GraphicsContextCG.cpp:
2942 * platform/graphics/mac/GraphicsContextMac.mm:
2943 (WebCore::GraphicsContext::setCompositeOperation):
2945 2007-12-19 Alp Toker <alp@atoker.com>
2947 Build fix for Pango < 1.18.0 breakage introduced in r28864. Use Fc and
2948 the Pango backend API in these cases.
2950 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2951 (WebCore::FontPlatformData::FontPlatformData):
2952 (WebCore::FontPlatformData::~FontPlatformData):
2954 2007-12-19 Alice Liu <alice.liu@apple.com>
2958 Fixed <rdar://problem/5592485> Safari crashed trying to get a motorcycle insurance quote
2959 on Geico.com WebCore::Document::inPageCache()
2961 Calling Node::willRemove on the focusedNode would immediately tell the document to remove
2962 the focused node, and trigger JS events. This means that the document is mutated while
2963 the engine is trying to tell all child nodes that it's about to removed. To avoid
2964 crashing, we need to hold off on mutating the document until node traversal is finished.
2966 * dom/ContainerNode.cpp:
2967 (WebCore::ContainerNode::removeChild):
2968 (WebCore::ContainerNode::removeChildren):
2971 (WebCore::Node::willRemove):
2972 * loader/FrameLoader.cpp:
2973 (WebCore::FrameLoader::clear):
2975 2007-12-19 Andre Boule <aboule@apple.com>
2977 Reviewed by Dan Bernstein.
2979 Test: fast/canvas/canvas-composite.html
2982 <rdar://problem/5640059> GraphicsContext::setCompositeOperation should use CGContextSetBlendMode
2984 This fix makes setCompositeOperation consistent across all platforms that use CG.
2986 The following compositing modes don't pass however that is covered by another bug:
2992 <rdar://problem/5651783> Some canvas tag compositing modes don't render correctly
2994 * platform/graphics/GraphicsTypes.h:
2995 * platform/graphics/cg/GraphicsContextCG.cpp:
2996 (WebCore::GraphicsContext::setCompositeOperation):
2997 * platform/graphics/mac/GraphicsContextMac.mm:
2998 * platform/win/GraphicsContextWin.cpp:
3000 2007-12-19 Dan Bernstein <mitz@apple.com>
3002 Reviewed by Dave Hyatt.
3004 - fix <rdar://problem/5650045> REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page
3006 Test: fast/dynamic/subtree-boundary-percent-height.html
3008 * rendering/RenderObject.cpp:
3009 (WebCore::objectIsRelayoutBoundary): Do not allow overflows with
3010 percent heights because sometimes they compute to 'auto'.
3012 2007-12-19 Sam Weinig <sam@webkit.org>
3016 http://bugs.webkit.org/show_bug.cgi?id=16511
3017 Speed up ClassNodeList and NamedNodeList by using the caching mechanism employed by ChildNodeList.
3018 - This give a ~2.15x speedup on the native test @ http://ejohn.org/apps/classname/
3020 * dom/ChildNodeList.cpp: Use the caching NodeList constructor to turn on caching.
3021 (WebCore::ChildNodeList::ChildNodeList):
3022 * dom/ClassNodeList.cpp:
3023 (WebCore::ClassNodeList::ClassNodeList):
3024 * dom/ClassNodeList.h:
3026 Move getElementsByName and getElementsByClassName to Node so they
3027 can use easily employ the caching already used by ChildNodeLists. In the case of
3028 getElementsByClassName, this reduces code duplication in Element as well
3032 Move getElementsByClassName to Node.
3036 * dom/NameNodeList.cpp: Use the caching NodeList constructor to turn on caching.
3037 (WebCore::NameNodeList::NameNodeList):
3038 (WebCore::NameNodeList::item):
3039 * dom/NameNodeList.h:
3041 Add maps of caches for ClassNodeLists and NameNodeList to NodeListsNodeData.
3043 (WebCore::TagNodeList::TagNodeList):
3044 (WebCore::Node::Node):
3045 (WebCore::Node::~Node):
3046 (WebCore::Node::childNodes):
3047 (WebCore::Node::registerNodeList):
3048 (WebCore::Node::getElementsByName):
3049 (WebCore::Node::getElementsByClassName):
3050 * dom/Node.h: Make m_nodeLists an OwnPtr. Moved getElementsByName and getElementsByClassName here
3052 Allow subclasses to choose whether they want to receive the notifications using a new bit.
3054 (WebCore::NodeList::NodeList):
3056 (WebCore::NodeList::needsNotifications):
3058 2007-12-19 Dave Hyatt <hyatt@apple.com>
3060 Add support for GDI text rendering to WebKit.
3064 * css/CSSStyleSelector.cpp:
3065 (WebCore::CSSStyleSelector::applyProperty):
3067 (WebCore::Document::recalcStyle):
3068 * page/Settings.cpp:
3069 (WebCore::Settings::setFontRenderingMode):
3070 (WebCore::Settings::fontRenderingMode):
3072 * platform/graphics/Font.h:
3073 (WebCore::Font::renderingMode):
3074 * platform/graphics/FontCache.cpp:
3075 (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
3076 (WebCore::FontPlatformDataCacheKey::operator==):
3077 (WebCore::computeHash):
3078 (WebCore::FontCache::getCachedFontPlatformData):
3079 * platform/graphics/FontDescription.h:
3081 (WebCore::FontDescription::FontDescription):
3082 (WebCore::FontDescription::renderingMode):
3083 (WebCore::FontDescription::setRenderingMode):
3084 (WebCore::FontDescription::operator==):
3085 * platform/graphics/GraphicsContext.h:
3086 * platform/graphics/win/FontCacheWin.cpp:
3087 (WebCore::FontCache::fontExists):
3088 (WebCore::FontCache::createFontPlatformData):
3089 * platform/graphics/win/FontDataWin.cpp:
3090 (WebCore::FontData::platformInit):
3091 (WebCore::FontData::smallCapsFontData):
3092 (WebCore::FontData::containsCharacters):
3093 (WebCore::FontData::determinePitch):
3094 (WebCore::FontData::platformWidthForGlyph):
3095 * platform/graphics/win/FontPlatformData.h:
3096 (WebCore::FontPlatformData::FontPlatformData):
3097 (WebCore::FontPlatformData::useGDI):
3098 (WebCore::FontPlatformData::operator==):
3099 * platform/graphics/win/FontPlatformDataWin.cpp:
3100 (WebCore::FontPlatformData::FontPlatformData):
3101 * platform/graphics/win/FontWin.cpp:
3102 (WebCore::Font::drawGlyphs):
3103 * platform/graphics/win/IconWin.cpp:
3104 (WebCore::Icon::paint):
3105 * platform/win/GraphicsContextWin.cpp:
3106 (WebCore::GraphicsContext::getWindowsContext):
3107 (WebCore::GraphicsContext::releaseWindowsContext):
3108 * platform/win/UniscribeController.cpp:
3109 (WebCore::UniscribeController::shapeAndPlaceItem):
3110 * platform/win/UniscribeController.h:
3111 * plugins/win/PluginViewWin.cpp:
3112 (WebCore::PluginViewWin::paint):
3114 2007-12-19 Sven Herzberg <sven@imendio.com>
3116 Reviewed by Alp Toker.
3118 Replace the fontconfig/freetype based font management with a pango
3120 http://bugs.webkit.org/show_bug.cgi?id=15229
3122 * platform/gtk/FontDataGtk.cpp (FontData::platformDestroy()): updated
3123 the platform specific destroy code
3124 (FontData::containsCharacters()): implemented font coverage with pango
3125 * platform/gtk/FontPlatformData.h: replaced fontconfig specific
3126 members with pango-specific ones
3127 * platform/gtk/FontPlatformDataGtk.cpp: added static members for the
3128 FontPlatformData class
3129 (FontPlatformData::FontPlatformData()): implemented the font-matching
3130 with a PangoFontDescription instead of an FcPattern; initialize the
3131 scaled font by using the API for PangoCairoFont
3132 (FontPlatformData::init()): initialize the PangoFontMap and set up a
3133 hash table to translate the font family name into a font family
3134 (FontPlatformData::isFixedPitch()): implemented by querying the
3136 (FontPlatformData::operator==): compare the FontPlatformData by
3137 comparing the font pointers or the described fonts
3138 * platform/gtk/GlyphPageTreeNodeGtk.cpp (pango_font_get_glyph()):
3139 added a function to query a glyph from a PangoFont
3140 (GlyphPage::fill()): implemented the fill function with Pango instead
3141 of fontconfig/freetype
3143 2007-12-19 Alp Toker <alp@atoker.com>
3145 Reviewed by Holger Freyther.
3147 Improve graphics operator approximations
3149 These changes match Cairo's own CG approximations.
3151 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3152 (WebCore::toCairoOperator):
3154 2007-12-19 Alp Toker <alp@atoker.com>
3156 Reviewed by Holger Freyther.
3158 Check the bounding box before doing a full hit test
3160 * platform/graphics/cairo/PathCairo.cpp:
3161 (WebCore::Path::contains):
3163 2007-12-18 Sam Weinig <sam@webkit.org>
3167 Fix for <rdar://problem/5646478>
3168 REGRESSION: fast/events/event-view-toString fails on Leopard
3170 This fixes an issue where we were incorrectly setting the lastInPrototypeChain
3171 for the JSDOMWindow (the global object) before a call to setPrototype overwrote
3172 it. This fixes it by passing the prototype up the constructor chain so that it
3173 is set before any calls can be made.
3175 * bindings/js/kjs_window.cpp:
3176 (KJS::Window::Window):
3177 * bindings/js/kjs_window.h:
3178 * bindings/scripts/CodeGeneratorJS.pm:
3180 2007-12-18 Beth Dakin <bdakin@apple.com>
3184 Fix for <rdar://problem/5616982> SVGs with width and height 100%
3185 fail to render when used as <img> or CSS image (16167)
3187 This final part of the work fixes the <img> tag.
3189 This is the real fix.
3190 * rendering/RenderImage.cpp:
3191 (WebCore::RenderImage::calcReplacedWidth): Set the container size
3192 on the image. Setting the container size only actually sticks if
3193 the values are non-zero, so if the container size really was set,
3194 use the imageSize that is calculated using the container size. If
3195 it did not stick but the image does have relative width (meaning
3196 that the container size is 0), set the width to 0 by hand. We want
3197 to avoid setting the width before we have a container size or we
3198 will end up incorrectly using the default size of 300x150.
3199 (WebCore::RenderImage::calcReplacedHeight): Same as above, but for
3202 A few more pieces of information have to be exposed through cached
3203 image to make this happen.
3204 * loader/CachedImage.cpp:
3205 (WebCore::CachedImage::usesImageContainerSize): As mentioned above,
3206 when setContainerSize() is called, the container size is only
3207 actually set if the values are non-zero. This call tells you if it
3209 (WebCore::CachedImage::imageHasRelativeWidth):
3210 (WebCore::CachedImage::imageHasRelativeHeight):
3211 * loader/CachedImage.h:
3212 * platform/graphics/Image.h:
3213 (WebCore::Image::usesContainerSize):
3214 * svg/graphics/SVGImage.cpp:
3215 (WebCore::SVGImage::usesContainerSize):
3216 * svg/graphics/SVGImage.h:
3218 2007-12-18 Mark Rowe <mrowe@apple.com>
3220 Rubber-stamped by Maciej Stachowiak.
3222 Remove outdated and non-functioning project files for the Apollo port.
3224 * WebCore.apolloproj: Removed.
3226 2007-12-18 Steve Falkenburg <sfalken@apple.com>
3228 <rdar://problem/5649911> REGRESSION (304-306A9): Typing 'p' in popup menu for type-to-select brings up Safari Help
3230 Need to translate the char back into a key code for posting our WM_KEYDOWN.
3234 * platform/win/PopupMenuWin.cpp:
3235 (WebCore::PopupWndProc):
3237 2007-12-18 Steve Falkenburg <sfalken@apple.com>
3239 <rdar://problem/5651534> REGRESSION(r28764-r28765): GDI leak drawing text when no appropriate font is available
3241 Our captured metafile from Uniscribe may contain multiple calls to CreateFontIndirect.
3242 Only create a font with the last one.
3244 Reviewed by Mitz, Darin.
3246 * platform/graphics/win/FontCacheWin.cpp:
3247 (WebCore::metaFileEnumProc):
3248 (WebCore::FontCache::getFontDataForCharacters):
3250 2007-12-17 Brent Fulgham <bfulgham@gmail.com>
3254 http://bugs.webkit.org/show_bug.cgi?id=16464
3255 Modify WebCore to use win32 thread primitives
3257 Updates to support native windows threading primitives
3258 rather than pthreads emulation library.
3260 * WebCore.vcproj/WebCore.vcproj:
3262 * platform/Threading.h:
3263 * platform/win/MutexWin.cpp: Added.
3264 (WebCore::Mutex::Mutex):
3265 (WebCore::Mutex::~Mutex):
3266 (WebCore::Mutex::lock):
3267 (WebCore::Mutex::tryLock):
3268 (WebCore::Mutex::unlock):
3269 * platform/win/ThreadConditionWin.cpp: Added.
3270 (WebCore::ThreadCondition::ThreadCondition):
3271 (WebCore::ThreadCondition::~ThreadCondition):
3272 (WebCore::ThreadCondition::wait):
3273 (WebCore::ThreadCondition::signal):
3274 (WebCore::ThreadCondition::broadcast):
3275 * platform/win/ThreadingWin.cpp:
3276 (WebCore::threadMapMutex):
3277 (WebCore::threadMap):
3278 (WebCore::storeThreadHandleByIdentifier):
3279 (WebCore::identifierByThreadHandle):
3280 (WebCore::threadHandleForIdentifier):
3281 (WebCore::clearThreadHandleForIdentifier):
3282 (WebCore::createThread):
3283 (WebCore::waitForThreadCompletion):
3284 (WebCore::detachThread):
3285 (WebCore::currentThread):
3287 2007-12-18 Rodney Dawes <dobey@wayofthemonkey.com>
3289 Reviewed by Darin Adler.
3291 Handle EINTR when set by select() and try the select() again
3292 http://bugs.webkit.org/show_bug.cgi?id=16071
3294 * platform/network/curl/ResourceHandleManager.cpp:
3295 (ResourceHandleManager::downloadTimerCallback):
3297 2007-12-18 Dan Bernstein <mitz@apple.com>
3299 Reviewed by Dave Hyatt.
3301 - avoid the simplified Chinese font linking code for characters that are
3302 not in any Windows code page
3304 * platform/graphics/win/FontCacheWin.cpp:
3305 (WebCore::FontCache::getFontDataForCharacters):
3307 2007-12-18 Brady Eidson <beidson@apple.com>
3311 <rdar://problem/5525770> REGRESSION: HTTP Auth protected favicon request results in a password sheet
3313 Some http-auth protected sites have the main resource(s) unprotected, but many subresources are
3314 protected by authentication. Occasionally one can view the main page of a site but the favicon
3315 is behind the iron curtain - in these cases, we should *not* prompt for a username and password
3316 solely for the favicon.
3318 * loader/ResourceLoader.h: Make didReceiveAuthenticationChallenge virtual
3320 * loader/SubresourceLoader.cpp:
3321 (WebCore::SubresourceLoader::didReceiveAuthenticationChallenge): Now that this method
3322 is virtual from ResourceLoader, SubresourceLoader can override. First call to the
3323 SubresourceLoaderClient. If they cancel the resource load, return early. Otherwise, let
3324 ResourceLoader work its magic (resulting in the auth sheet coming down)
3325 * loader/SubresourceLoader.h:
3327 * loader/SubresourceLoaderClient.h:
3328 (WebCore::SubresourceLoaderClient::didReceiveAuthenticationChallenge):
3330 * loader/icon/IconLoader.cpp:
3331 (WebCore::IconLoader::didReceiveAuthenticationChallenge): Cancel the resource load, since we should
3332 never prompt the user for credentials just for a favicon.
3333 * loader/icon/IconLoader.h:
3335 2007-12-18 John Sullivan <sullivan@apple.com>
3339 - fixed <rdar://problem/5652380> Initial prompt shows "" for databases with no user-visible name
3341 * storage/DatabaseTracker.cpp:
3342 (WebCore::DatabaseTracker::canEstablishDatabase):
3343 pass "name" instead of "displayName" if there's no displayName
3345 2007-12-17 Dan Bernstein <mitz@apple.com>
3347 Reviewed by Maciej Stachowiak.
3349 - restore ButtonFace and ThreeDFace to their previous values for non-Mac
3350 platforms. The Mac port also uses the same values for now instead
3351 of NSColor-based ones.
3353 * rendering/RenderTheme.cpp:
3354 (WebCore::RenderTheme::systemColor):
3356 2007-12-17 Rodney Dawes <dobey@wayofthemonkey.com>
3358 Reviewed by Maciej Stachowiak.
3360 Define WTF_USE_NPOBJECT and WTF_USE_JAVASCRIPTCORE_BINDINGS for GTK+
3361 Add required Frame::createScriptInstanceForWidget to FrameGtk
3364 * page/gtk/FrameGtk.cpp (Frame::createScriptInstanceForWidget):
3366 2007-12-17 Alice Liu <alice.liu@apple.com>
3370 Fixed <rdar://5566435> window with no scrollbars can be scrolled
3372 * platform/win/ScrollViewWin.cpp:
3373 (WebCore::ScrollView::maximumScroll):
3374 corrected maximumScroll() to account for scrolling not allowed.
3375 (WebCore::ScrollView::wheelEvent):
3377 2007-12-14 Juan A. Suarez Romero <jasuarez@igalia.com>
3379 Reviewed by Alp Toker.
3381 http://bugs.webkit.org/show_bug.cgi?id=16042
3382 [GTK] Eliminate webkit_init()
3384 Move webkit initialization to WebView class init.
3388 2007-12-17 Jon Honeycutt <jhoneycutt@apple.com>
3392 <rdar://problem/5651291> REGRESSION: Flash content doesn't display
3395 We were passing NPEvent** instead of NPEvent* to NPP_HandleEvent.
3397 * plugins/win/PluginViewWin.cpp:
3398 (WebCore::PluginViewWin::dispatchNPEvent): Changed to take NPEvent&, not
3400 (WebCore::PluginViewWin::paint): Pass NPEvent, not NPEvent*
3401 (WebCore::PluginViewWin::handleKeyboardEvent): same
3402 (WebCore::PluginViewWin::handleMouseEvent): same
3403 * plugins/win/PluginViewWin.h:
3405 2007-12-17 Alexey Proskuryakov <ap@webkit.org>
3409 Live to the promise of never making AppKit special character codes visible via DOM.
3411 Test: fast/events/arrow-keys-on-body.html
3413 * page/EventHandler.cpp:
3414 (WebCore::EventHandler::keyEvent): Check for empty keypress characters after disambiguation,
3415 to let quirks-aware code strip special charactrers.
3416 * platform/mac/KeyEventMac.mm:
3417 (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): If not in keyboard event quirks
3418 mode, remove the text if it's a special character.
3420 2007-12-17 Mark Rowe <mrowe@apple.com>
3422 Reviewed by Darin Adler.
3424 Fix incorrect array size and incorrect array index in convertNSColorToColor.
3426 * rendering/RenderThemeMac.mm:
3427 (WebCore::convertNSColorToColor):
3429 2007-12-17 Darin Adler <darin@apple.com>
3431 Reviewed by Mark Rowe.
3433 - fix http://bugs.webkit.org/show_bug.cgi?id=16468
3434 REGRESSION(r28781): Crash running storage/transaction_callback_exception_crash.html
3436 * storage/DatabaseThread.cpp:
3437 (WebCore::DatabaseThread::dispatchNextTaskIdentifier): Use a RefPtr for the database
3438 because there's no guarantee it won't lose its last reference otherwise.
3440 2007-12-17 Dan Bernstein <mitz@apple.com>
3442 Reviewed by Maciej Stachowiak.
3444 - fix <rdar://problem/5333260> Some Chinese characters in Text Encoding menu are bold, others are not
3445 and <rdar://problem/5280188> Chinese text looks worse on Safari for Windows cf. Safari for Mac
3447 * platform/graphics/win/FontCacheWin.cpp:
3448 (WebCore::FontCache::getFontDataForCharacters): To ensure that font
3449 linking gives consistent results for characters that are exclusive to
3450 the simplified Chinese code page and characters that belong to that
3451 code page and other code pages, always ask to map to simplified Chinese
3454 2007-12-17 Christian Dywan <christian@twotoasts.de>
3456 Reviewed by Alp Toker.
3458 http://bugs.webkit.org/show_bug.cgi?id=16378
3459 Implement Icon for Gtk
3461 Icon provides a GdkPixbuf containing a themed icon.
3462 The icon theme is probed for an icon name according to the
3463 Icon Naming Specification or conventional Gnome icon names respectively.
3465 See http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
3467 * platform/graphics/Icon.h:
3468 * platform/graphics/gtk/IconGtk.cpp:
3469 (WebCore::Icon::~Icon):
3470 (WebCore::lookupIconName):
3471 (WebCore::Icon::newIconForFile):
3472 (WebCore::Icon::paint):
3474 2007-12-16 Sam Weinig <sam@webkit.org>
3478 Fix for http://bugs.webkit.org/show_bug.cgi?id=16466
3479 Move the JS Location object to its own file
3481 - Move Location into its own file and rename it JSLocation.
3483 * DerivedSources.make:
3485 * WebCore.vcproj/WebCore.vcproj:
3486 * WebCore.xcodeproj/project.pbxproj:
3487 * WebCoreSources.bkl:
3488 * bindings/js/JSDocumentCustom.cpp:
3489 * bindings/js/JSLocation.cpp: Copied from WebCore/bindings/js/kjs_window.cpp.
3491 (WebCore::JSLocation::JSLocation):
3492 (WebCore::JSLocation::getValueProperty):
3493 (WebCore::JSLocation::getOwnPropertySlot):
3494 (WebCore::JSLocation::put):
3495 (WebCore::JSLocationProtoFuncReplace::callAsFunction):
3496 (WebCore::JSLocationProtoFuncReload::callAsFunction):
3497 (WebCore::JSLocationProtoFuncAssign::callAsFunction):
3498 (WebCore::JSLocationProtoFuncToString::callAsFunction):
3499 * bindings/js/JSLocation.h: Copied from WebCore/bindings/js/kjs_window.h.
3500 (WebCore::JSLocation::):
3501 (WebCore::JSLocation::frame):
3502 (WebCore::JSLocation::classInfo):
3503 * bindings/js/kjs_window.cpp:
3504 (KJS::Window::location):
3505 * bindings/js/kjs_window.h:
3506 * history/CachedPage.cpp:
3508 2007-12-16 Dan Bernstein <mitz@apple.com>
3510 Reviewed by Sam Weinig.
3512 - make 'cursor: copy' and 'cursor: none' work.
3514 Already covered by manual-tests/cursor.html
3516 * rendering/RenderStyle.h: Increase the _cursor_style field to 6 bits,
3517 needed for the 33rd and 34th cursor values.
3519 2007-12-16 Mark Rowe <mrowe@apple.com>
3521 Reviewed by Maciej Stachowiak.
3523 Refactor Mac plugin stream code to use the shared NetscapePlugInStreamLoader implementation.
3526 * WebCore.xcodeproj/project.pbxproj:
3527 * loader/NetscapePlugInStreamLoader.h:
3528 * loader/mac/NetscapePlugInStreamLoaderMac.mm: Removed.
3529 * loader/mac/WebPlugInStreamLoaderDelegate.h: Moved to WebKit.
3531 2007-12-16 Sam Weinig <sam@webkit.org>
3535 Yet more of http://bugs.webkit.org/show_bug.cgi?id=16385
3538 - Move ScheduledAction into its own file and put it in the WebCore namespace.
3541 * WebCore.vcproj/WebCore.vcproj:
3542 * WebCore.xcodeproj/project.pbxproj:
3543 * WebCoreSources.bkl:
3544 * bindings/js/PausedTimeouts.cpp:
3545 * bindings/js/PausedTimeouts.h:
3546 * bindings/js/ScheduledAction.cpp: Copied from bindings/js/kjs_window.cpp.
3547 (WebCore::ScheduledAction::ScheduledAction):
3548 (WebCore::ScheduledAction::execute):
3549 * bindings/js/ScheduledAction.h: Copied from bindings/js/kjs_window.h.
3550 (WebCore::ScheduledAction::ScheduledAction):
3551 * bindings/js/kjs_window.cpp:
3552 (KJS::DOMWindowTimer::DOMWindowTimer):
3553 (KJS::DOMWindowTimer::action):
3554 (KJS::DOMWindowTimer::takeAction):
3555 (KJS::Window::installTimeout):
3556 (KJS::Window::timerFired):
3557 * bindings/js/kjs_window.h:
3559 2007-12-16 Alp Toker <alp@atoker.com>
3563 http://bugs.webkit.org/show_bug.cgi?id=16356
3564 [GTK] Integrate GStreamer video with the graphics backend
3566 Integrate the GStreamer media backend with the Cairo graphics backend.
3567 There are still some issues: Data is copied more often than necessary,
3568 and repaint() is not called, causing transformed video not to update
3572 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3573 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3574 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3575 (WebCore::MediaPlayerPrivate::currentTime):
3576 (WebCore::MediaPlayerPrivate::setEndTime):
3577 (WebCore::MediaPlayerPrivate::seeking):
3578 (WebCore::MediaPlayerPrivate::naturalSize):
3579 (WebCore::MediaPlayerPrivate::setMuted):
3580 (WebCore::MediaPlayerPrivate::setRect):
3581 (WebCore::MediaPlayerPrivate::setVisible):
3582 (WebCore::MediaPlayerPrivate::repaint):
3583 (WebCore::MediaPlayerPrivate::paint):
3584 (WebCore::MediaPlayerPrivate::createGSTPlayBin):
3585 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
3586 * platform/graphics/gtk/VideoSinkGStreamer.cpp: Added.
3587 (webkit_video_sink_base_init):
3588 (webkit_video_sink_init):
3589 (webkit_video_sink_idle_func):
3590 (webkit_video_sink_render):
3591 (webkit_video_sink_set_caps):
3592 (webkit_video_sink_dispose):
3593 (webkit_video_sink_finalize):
3594 (webkit_video_sink_set_property):
3595 (webkit_video_sink_get_property):
3596 (webkit_video_sink_stop):
3597 (webkit_video_sink_class_init):
3598 (webkit_video_sink_new):
3599 (webkit_video_sink_set_surface):
3601 * platform/graphics/gtk/VideoSinkGStreamer.h: Added.
3603 2007-12-16 Mark Rowe <mrowe@apple.com>
3607 * WebCore.xcodeproj/project.pbxproj: Remove NetscapePlugInStreamLoader.cpp from the WebCore target.
3608 Mac currently has its own implementation in NetscapePlugInStreamLoaderMac.mm which conflicts with the
3609 new shared implementation.
3611 2007-12-16 Rodney Dawes <dobey@wayofthemonkey.com>
3613 Reviewed by Maciej Stachowiak.
3615 http://bugs.webkit.org/show_bug.cgi?id=16389
3616 Bug 16389: Common Implementation of NetscapePlugInStreamLoader
3618 * WebCore.vcproj/WebCore.vcproj: Remove NetscapePlugInStreamLoaderWin.cpp.
3619 * loader/NetscapePlugInStreamLoader.cpp: Copy method implementations from NetscapePlugInStreamLoaderWin.cpp.
3620 * loader/win/NetscapePlugInStreamLoaderWin.cpp: Removed.
3622 2007-12-16 Grace Kloba <klobag@gmail.com>
3624 Reviewed by Darin Adler.
3626 Fix http://bugs.webkit.org/show_bug.cgi?id=16433.
3627 Bug 16433: LOW_BANDWIDTH_DISPLAY build is broken
3630 (WebCore::Document::Document):
3631 * loader/FrameLoader.cpp:
3632 (WebCore::FrameLoader::addLowBandwidthDisplayRequest):
3633 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
3635 2007-12-16 Darin Adler <darin@apple.com>
3639 - fix <rdar://problem/5636065> First form of SQLTransaction.executeSql() fails with TYPE_ERROR dom exception
3641 Test: storage/execute-sql-args.html
3643 * bindings/js/JSSQLTransactionCustom.cpp:
3644 (WebCore::JSSQLTransaction::executeSql): Added exception handling code so that once an
3645 exception happens, we won't try to do any more argument processing. Changed processing
3646 of the second argument so that we allow an undefined value or null, and simply omit the
3647 array. Changed processing of the second argument so that we don't require an actual
3648 JavaScript array. Instead, as with the JavaScript array operations themselves, we use
3649 the length property and corresponding numeric properties of the object, allowing other
3650 objects to act as arrays. Changed processing of the third and fourth arguments to
3651 allow the undefined value as well as null; we check the value of the argument rather
3652 than looking at the size of the passed-in arguments list.
3654 2007-12-16 Sam Weinig <sam@webkit.org>
3658 More of http://bugs.webkit.org/show_bug.cgi?id=16385
3661 - Move PausedTimeouts into its own file and put it in the WebCore namespace.
3664 * WebCore.vcproj/WebCore.vcproj:
3665 * WebCore.xcodeproj/project.pbxproj:
3666 * WebCoreSources.bkl:
3667 * bindings/js/PausedTimeouts.cpp: Copied from bindings/js/kjs_window.cpp.
3668 * bindings/js/PausedTimeouts.h: Copied from bindings/js/kjs_window.h.
3669 * bindings/js/kjs_window.cpp:
3670 (KJS::Window::pauseTimeouts):
3671 * bindings/js/kjs_window.h:
3672 * history/CachedPage.cpp:
3673 * history/CachedPage.h:
3676 2007-12-16 Beth Dakin <bdakin@apple.com>
3680 Make relative-size SVGs work in border-image.
3682 * rendering/RenderBox.cpp:
3683 (WebCore::RenderBox::calculateBackgroundSize):
3684 * rendering/RenderObject.cpp:
3685 (WebCore::RenderObject::paintBorderImage):
3687 2007-12-16 Darin Adler <darin@apple.com>
3689 - fix Tiger build (my fault it was broken)
3691 * rendering/RenderThemeMac.mm: Define NSUInteger if on Tiger.
3693 2007-12-16 Andrew Wellington <proton@wiretapped.net>
3697 http://bugs.webkit.org/show_bug.cgi?id=6129
3698 Incomplete implementation of CSS 2.1 system colors
3700 Test: fast/css/css2-system-color.html
3702 Based on original patch by Rob Buis.
3704 System colors are retrieved from NSColor as appropriate. If the color is a pattern color
3705 (and therefore NSColor won't let us retrieve a color from it) we draw a 1x1 image of the
3706 color and sample that to get a solid color.
3708 * css/CSSStyleSelector.cpp:
3710 (WebCore::colorForCSSValue):
3711 * rendering/RenderTheme.cpp:
3712 (WebCore::RenderTheme::systemColor):
3713 * rendering/RenderTheme.h:
3714 * rendering/RenderThemeMac.h:
3715 * rendering/RenderThemeMac.mm:
3716 (WebCore::getSystemColor):
3717 (WebCore::RenderThemeMac::platformColorsDidChange):
3718 (WebCore::RenderThemeMac::systemColor):
3720 2007-12-16 Dan Bernstein <mitz@apple.com>
3722 Reviewed by Darin Adler.
3724 - fix http://bugs.webkit.org/show_bug.cgi?id=16426
3725 Divs with overflow:auto: scrollbars not correctly updated when contents change
3727 Test: fast/overflow/scrollbar-position-update.html
3729 * platform/mac/PlatformScrollBarMac.mm:
3730 (WebCore::PlatformScrollbar::updateThumbProportion): Update the
3731 NSScroller's value for the new proportions.
3732 * rendering/RenderLayer.cpp:
3733 (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed unnecessary
3734 repaint(). Scrollbars repaint themselves as needed.
3736 2007-12-16 Alexey Proskuryakov <ap@webkit.org>
3740 http://bugs.webkit.org/show_bug.cgi?id=14140
3741 <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly
3743 * dom/KeyboardEvent.h:
3744 (WebCore::KeypressCommand::KeypressCommand):
3745 (WebCore::KeyboardEvent::keypressCommands):
3746 Change stored command class to preserve complete information about commands.
3748 * editing/EditorCommand.cpp: (WebCore::CommandEntry::): Mark InsertText as a text insertion
3749 command, which it is. Previously, we couldn't do it because WebKit didn't really treat insertText:
3752 * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Copy commands saved while interpreting
3753 a keydown event into keypress, to avoid losing state when running interpretKeyEvents: again.
3755 2007-12-16 Alexey Proskuryakov <ap@webkit.org>
3759 http://bugs.webkit.org/show_bug.cgi?id=16462
3760 REGRESSION: access keys broken on Windows
3762 * page/EventHandler.cpp:
3763 (WebCore::EventHandler::handleAccessKey):
3764 (WebCore::EventHandler::keyEvent):
3765 * page/EventHandler.h:
3766 Make handleAccessKey a class method; rely on WebKit to call it on Windows and wxWidgets.
3768 2007-12-16 Xan Lopez <xan@gnome.org>
3770 Reviewed by Alexey Proskuryakov.
3772 http://bugs.webkit.org/show_bug.cgi?id=16454
3773 [GTK] Text input doesn't work consistently on PPC
3775 * platform/gtk/KeyEventGtk.cpp:
3776 (WebCore::singleCharacterString):
3778 UChar is 2 bytes (UTF-16), so transform accordingly from
3779 gunichar (UCS-4). Fixes keyboard input on big endian systems.
3781 2007-12-15 Darin Adler <darin@apple.com>
3783 Reviewed by Mark Rowe.
3785 - better build fix for the problem affecting GTK and some other platforms
3786 "this time for sure"
3788 * WebCore.xcodeproj/project.pbxproj:
3789 * bindings/js/JSEventTargetBase.cpp: Move the include of the .lut.h file here.
3790 * bindings/js/JSEventTargetBase.h: Instead of including the .lut.h file in the header,
3791 which won't work, declare the tables that are in the .lut.h file in the header.
3793 2007-12-12 Kevin Watters <kevin@dotsyntax.com>
3795 Reviewed by Darin Adler.
3797 Fixed the Wx port's FontPlatformData for use in HashTable.
3798 - FontPlatformData(Deleted) made unequal to FontPlatformData()
3800 * platform/graphics/wx/FontPlatformData
3802 2007-12-15 Dan Bernstein <mitz@apple.com>
3804 Reviewed by Darin Adler.
3806 - fix <rdar://problem/5636090> Text in Georgia, Armenian, Inuktitut, Cree, or Cherokee (KA, HY, IU, CR, CHR) draws as all missing glyphs
3808 * platform/graphics/win/FontCacheWin.cpp:
3809 (WebCore::metaFileEnumProc): Added. Called during metafile record
3810 enumeration and extracts the font from the create font record.
3811 (WebCore::FontCache::getFontDataForCharacters): If font linking fails,
3812 let Uniscribe draw the characters and see what font it chooses.
3814 2007-12-15 Darin Adler <darin@apple.com>
3816 * WebCore.pro: Roll my last change out. Was wrong and didn't fix the build.
3818 2007-12-15 Darin Adler <darin@apple.com>
3820 Another try at a GTK build fix.
3822 * WebCore.pro: Add JSEventTargetBase.cpp to LUT_TABLE_FILES instead of LUT_FILES.
3824 2007-12-15 Sam Weinig <sam@webkit.org>
3826 Force windows to regenerate COM DOM bindings.
3828 * WebCore.vcproj/build-generated-files.sh: Add license.
3829 * bindings/scripts/CodeGeneratorCOM.pm: Use shared WK_ucfirst.
3831 2007-12-15 Sam Weinig <sam@webkit.org>
3833 Fix Windows and wx builds.
3835 * WebCore.vcproj/WebCore.vcproj:
3836 * WebCoreSources.bkl:
3838 2007-12-15 Mark Rowe <mrowe@apple.com>
3840 Gtk build fix. Add JSEventTargetBase.cpp to SOURCES.
3844 2007-12-15 Sam Weinig <sam@webkit.org>
3848 * WebCoreSources.bkl:
3850 2007-12-15 Nikolas Zimmermann <zimmermann@kde.org>
3852 Not reviewed. Build fix for Qt/Gtk.
3854 * WebCore.pro: Include JSEventTargetBase.lut.h in generation
3856 2007-12-15 Nikolas Zimmermann <zimmermann@kde.org>
3860 Fixes: http://bugs.webkit.org/show_bug.cgi?id=16445 (Refactor EventTargetNode & JSEventTargetNode for an upcoming SVG patch)
3862 Split up JSEventTargetNode in JSEventTargetNode & JSEventTargetBase - where most functionality has been moved down
3863 in the base class. Applied the same refactorization to EventTargetNode.
3865 This makes it possible for the upcoming patch implementing the EventTarget interface for SVGElementInstance
3866 to share as much code as possible with the EventTargetNode classes.
3868 * DerivedSources.make:
3869 * WebCore.xcodeproj/project.pbxproj:
3870 * bindings/js/JSEventTargetBase.cpp: Added.
3871 (WebCore::retrieveEventTargetAndCorrespondingNode):
3872 (WebCore::eventNameForPropertyToken):
3873 * bindings/js/JSEventTargetBase.h: Added.
3874 (WebCore::JSEventTargetProperties::):
3875 (WebCore::JSEventTargetPrototypeFunctionBase::JSEventTargetPrototypeFunctionBase):
3876 (WebCore::JSEventTargetPrototypeFunction::JSEventTargetPrototypeFunction):
3878 (WebCore::::create):
3879 (WebCore::JSEventTargetBase::JSEventTargetBase):
3880 (WebCore::JSEventTargetBase::getValueProperty):
3881 (WebCore::JSEventTargetBase::putValueProperty):
3882 (WebCore::JSEventTargetBase::getOwnPropertySlot):
3883 (WebCore::JSEventTargetBase::put):
3884 (WebCore::JSEventTargetPrototype::JSEventTargetPrototype):
3885 (WebCore::JSEventTargetPrototype::self):
3886 (WebCore::JSEventTargetPrototype::getOwnPropertySlot):
3887 (WebCore::JSEventTargetPrototype::classInfo):
3888 * bindings/js/JSEventTargetNode.cpp:
3889 (WebCore::JSEventTargetNode::getOwnPropertySlot):
3890 (WebCore::JSEventTargetNode::getValueProperty):
3891 (WebCore::JSEventTargetNode::put):
3892 (WebCore::JSEventTargetNode::putValueProperty):
3893 (WebCore::JSEventTargetNode::setListener):
3894 (WebCore::toEventTargetNode):
3895 * bindings/js/JSEventTargetNode.h:
3896 (WebCore::JSEventTargetPrototypeInformation::prototypeClassName):
3897 (WebCore::JSEventTargetPrototypeInformation::prototypeIdentifier):
3898 * dom/EventTarget.cpp:
3899 (WebCore::EventTarget::addEventListener):
3900 (WebCore::EventTarget::removeEventListener):
3901 (WebCore::EventTarget::dispatchGenericEvent):
3902 (WebCore::EventTarget::removeAllEventListeners):
3903 (WebCore::EventTarget::insertedIntoDocument):
3904 (WebCore::EventTarget::removedFromDocument):
3905 (WebCore::EventTarget::handleLocalEvents):
3906 (WebCore::EventTarget::applySVGEventTargetRules):
3907 (WebCore::forbidEventDispatch):
3908 (WebCore::allowEventDispatch):
3909 (WebCore::eventDispatchForbidden):
3910 * dom/EventTarget.h:
3911 (WebCore::EventTarget::preDispatchEventHandler):
3912 (WebCore::EventTarget::postDispatchEventHandler):
3913 (WebCore::forbidEventDispatch):
3914 (WebCore::allowEventDispatch):
3915 * dom/EventTargetNode.cpp:
3916 (WebCore::EventTargetNode::~EventTargetNode):
3917 (WebCore::EventTargetNode::insertedIntoDocument):
3918 (WebCore::EventTargetNode::removedFromDocument):
3919 (WebCore::EventTargetNode::addEventListener):
3920 (WebCore::EventTargetNode::removeEventListener):
3921 (WebCore::EventTargetNode::removeAllEventListeners):
3922 (WebCore::EventTargetNode::handleLocalEvents):
3923 (WebCore::EventTargetNode::dispatchEvent):
3924 (WebCore::EventTargetNode::dispatchWindowEvent):
3925 * dom/EventTargetNode.h:
3926 (WebCore::EventTargetNode::localEventListeners):
3927 * svg/SVGElement.cpp:
3928 (WebCore::SVGElement::sendSVGLoadEventIfPossible):
3929 (WebCore::SVGElement::dispatchEvent):
3931 2007-12-15 Eric Seidel <eric@webkit.org>
3935 Width of SVG elements not applied to container elements
3936 http://bugs.webkit.org/show_bug.cgi?id=16305
3937 Added calcPrefWidths for RenderSVGRoot (copied from RenderReplaced)
3938 This is caused by poor factoring in the render tree. RenderContainer probably should be a template.
3940 svg/css/css-box-min-width.html
3942 * rendering/RenderSVGRoot.cpp:
3943 (WebCore::RenderSVGRoot::calcPrefWidths): Added.
3944 * rendering/RenderSVGRoot.h:
3945 * css/SVGCSSStyleSelector::applySVGProperty: fixed ASSERT in debug builds
3947 2007-12-15 David Kilzer <ddkilzer@apple.com>
3949 Fix comment after isSafeScript() was renamed to allowsAccessFrom().
3951 * bindings/js/kjs_window.cpp:
3952 (KJS::createWindow):
3954 2007-12-15 Alp Toker <alp@atoker.com>
3956 Reviewed by Mark Rowe.
3958 http://bugs.webkit.org/show_bug.cgi?id=16449
3959 cairo_arc() functions hang or crash when passed inf as radius or start/end angle
3961 Add checks. This matches a similar workaround for a CG bug in the CG
3962 graphics backend: <rdar://problem/5189233>
3965 fast/canvas/arc-crash.html
3966 fast/canvas/canvas-with-incorrect-args.html
3968 * platform/graphics/cairo/PathCairo.cpp:
3969 (WebCore::Path::addArc):
3971 2007-12-15 Alexey Proskuryakov <ap@webkit.org>
3975 http://bugs.webkit.org/show_bug.cgi?id=16078
3976 Google Maps zooming via the scroll wheel (almost) always zooms IN only.
3978 * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent):
3979 Ensure that delta is never rounded down to zero - we are getting values less than 1 from
3980 many mice on OS X, and Google Maps code assumes scrolling up if event.wheelDelta is zero.
3982 2007-12-14 Dan Bernstein <mitz@apple.com>
3986 * WebCore.vcproj/WebCore.vcproj:
3988 2007-12-14 Alp Toker <alp@atoker.com>
3990 GTK+/Qt build fix. Track added files in r28722.
3994 2007-12-14 Sam Weinig <sam@webkit.org>
3998 Speed up getElementByClassName.
3999 - This makes getElementByClassName 33% faster on the stress test
4000 linked to at http://bugs.webkit.org/show_bug.cgi?id=15760.
4002 * platform/text/StringImpl.cpp:
4003 (WebCore::StringImpl::foldCase): Optimize the case when all the characters are ASCII.
4005 2007-12-14 Alp Toker <alp@atoker.com>
4009 http://bugs.webkit.org/show_bug.cgi?id=16432
4010 [GTK] Update license headers
4012 Consent has been given by the authors of these files to change license
4013 to the LGPL as outlined in the bug report.
4015 * platform/gtk/ClipboardGtk.cpp:
4016 * platform/gtk/ContextMenuGtk.cpp:
4017 * platform/gtk/ContextMenuItemGtk.cpp:
4018 * platform/gtk/CookieJarGtk.cpp:
4019 * platform/gtk/CursorGtk.cpp:
4020 * platform/gtk/DragDataGtk.cpp:
4021 * platform/gtk/DragImageGtk.cpp:
4022 * platform/gtk/PasteboardGtk.cpp:
4023 * platform/gtk/PlatformScreenGtk.cpp:
4024 * platform/gtk/PlatformScrollBarGtk.cpp:
4025 * platform/gtk/SearchPopupMenuGtk.cpp:
4026 * platform/gtk/WidgetGtk.cpp:
4028 2007-12-14 Darin Adler <darin@apple.com>
4032 - fix http://bugs.webkit.org/show_bug.cgi?id=16442
4033 navigation policy delegate gets called twice for each load
4035 * loader/MainResourceLoader.cpp:
4036 (WebCore::MainResourceLoader::willSendRequest): Removed call to checkNavigationPolicy.
4037 That's handled by FrameLoader.
4039 * loader/MainResourceLoader.h: Removed callContinueAfterNavigationPolicy
4040 and continueAfterNavigationPolicy.
4042 2007-12-14 Anders Carlsson <andersca@apple.com>
4046 Make document.open count as committing a document load, so that -[WebFrame dataSource:] won't
4047 return nil in that case.
4049 * loader/FrameLoader.cpp:
4050 (WebCore::FrameLoader::didExplicitOpen):
4052 2007-12-14 David Smith <catfish.man@gmail.com>
4056 - fix http://bugs.webkit.org/show_bug.cgi?id=14955
4057 Implement getElementsByClassName.
4059 This patch also renames AtomicStringList to ClassNames to better reflect its actual use,
4060 and takes advantage of admitting that it's class-specific to encapsulate class attribute
4061 parsing so it can be shared. It also changes the class to use a Vector, rather than a linked
4062 list to store the class names.
4064 Tests: fast/dom/getElementsByClassName/001.html
4065 fast/dom/getElementsByClassName/002.html
4066 fast/dom/getElementsByClassName/003.html
4067 fast/dom/getElementsByClassName/004.html
4068 fast/dom/getElementsByClassName/005.html
4069 fast/dom/getElementsByClassName/006.html
4070 fast/dom/getElementsByClassName/007.html
4071 fast/dom/getElementsByClassName/008.html
4072 fast/dom/getElementsByClassName/009.html
4073 fast/dom/getElementsByClassName/010.xml
4074 fast/dom/getElementsByClassName/011.xml
4075 fast/dom/getElementsByClassName/012.html
4076 fast/dom/getElementsByClassName/013.html
4077 fast/dom/getElementsByClassName/014.html
4078 fast/dom/getElementsByClassName/array/001.html
4079 fast/dom/getElementsByClassName/array/002.html
4080 fast/dom/getElementsByClassName/array/003.html
4081 fast/dom/getElementsByClassName/array/004.html
4082 fast/dom/getElementsByClassName/dumpNodeList.html
4084 * WebCore.xcodeproj/project.pbxproj:
4085 * css/CSSStyleSelector.cpp:
4086 (WebCore::CSSStyleSelector::matchRules):
4087 (WebCore::CSSStyleSelector::checkOneSelector):
4088 * dom/AtomicStringList.h: Removed.
4089 * dom/ClassNames.cpp: Added.
4090 (WebCore::ClassNames::contains):
4091 (WebCore::ClassNames::parseClassAttribute):
4092 * dom/ClassNames.h: Copied from WebCore/dom/AtomicStringList.h.
4093 (WebCore::ClassNames::ClassNames):
4094 (WebCore::ClassNames::size):
4095 (WebCore::ClassNames::clear):
4096 (WebCore::ClassNames::operator[]):
4097 (WebCore::isClassWhitespace):
4098 * dom/ClassNodeList.cpp: Added.
4099 (WebCore::ClassNodeList::ClassNodeList):
4100 (WebCore::ClassNodeList::length):
4101 (WebCore::ClassNodeList::item):
4102 (WebCore::ClassNodeList::nodeMatches):
4103 * dom/ClassNodeList.h: Added.
4105 (WebCore::Document::getElementsByName):
4106 (WebCore::Document::getElementsByClassName):
4110 (WebCore::Element::getClassNames):
4111 (WebCore::Element::getElementsByClassName):
4114 * dom/NameNodeList.cpp:
4115 (WebCore::NameNodeList::NameNodeList):
4116 (WebCore::NameNodeList::item):
4117 (WebCore::NameNodeList::nodeMatches):
4118 * dom/NameNodeList.h:
4119 * dom/NamedMappedAttrMap.cpp:
4120 (WebCore::NamedMappedAttrMap::clearAttributes):
4121 (WebCore::NamedMappedAttrMap::parseClassAttribute):
4122 * dom/NamedMappedAttrMap.h:
4123 (WebCore::NamedMappedAttrMap::getClassNames):
4124 * dom/StyledElement.cpp:
4125 (WebCore::StyledElement::getClassNames):
4126 * dom/StyledElement.h:
4128 2007-12-14 Darin Adler <darin@apple.com>
4132 - fix http://bugs.webkit.org/show_bug.cgi?id=16351
4133 FontFallbackList.h doesn't include wtf/PassRefPtr.h
4135 * platform/graphics/FontFallbackList.h: Added include of <wtf/Forward.h>
4136 * platform/graphics/GlyphPageTreeNode.h: Removed an unneeded include.
4138 2007-12-14 Darin Adler <darin@apple.com>
4142 - http://bugs.webkit.org/show_bug.cgi?id=16420
4143 change regression tests to use document.execCommand instead of textInputController.doCommand
4145 Add a few more operations to document.execCommand.
4147 Finished up the transition to the new Editor::Command, including removing
4148 the Editor::execCommand function.
4150 * WebCore.base.exp: Added Editor::Command::isSupported.
4151 * editing/Editor.h: Removed execCommand.
4152 * editing/EditorCommand.cpp:
4153 (WebCore::expandSelectionToGranularity): Added.
4154 (WebCore::verticalScrollDistance): Added; replaces canScroll.
4155 (WebCore::executeDeleteBackward): Added. Moved code here from WebHTMLView.
4156 (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter): Ditto.
4157 (WebCore::executeDeleteForward): Ditto.
4158 (WebCore::executeDeleteToBeginningOfLine): Ditto.
4159 (WebCore::executeDeleteToBeginningOfParagraph): Ditto.
4160 (WebCore::executeDeleteToEndOfLine): Ditto.
4161 (WebCore::executeDeleteToEndOfParagraph): Ditto.
4162 (WebCore::executeMovePageDown): Renamed this command to be consistent with all the other
4163 Move commands. They all modify the caret. Reimplemented to match the Mac OS X version by
4164 removing the explicit scrolling, and letting it be done automatically by code that makes
4165 the caret visible. In some cases the old code would scroll twice which was harmless but
4167 (WebCore::executeMovePageDownAndModifySelection): Added. Moved code here from WebHTMLView.
4168 (WebCore::executeMovePageUp): See MovePageDown above.
4169 (WebCore::executeMovePageUpAndModifySelection): Added. Moved code here from WebHTMLView.
4170 (WebCore::executeSelectLine): Ditto.
4171 (WebCore::executeSelectParagraph): Ditto.
4172 (WebCore::executeSelectSentence): Ditto.
4173 (WebCore::executeSelectWord): Ditto.
4174 (WebCore::executeSwapWithMark): Some small tweaks.
4176 * page/ContextMenuController.cpp:
4177 (WebCore::ContextMenuController::contextMenuItemSelected): Changed to use Editor::command()
4178 instead of Editor::execCommand(). This code could be changed to use Editor::Command quite a
4179 bit more, but I didn't do that this time.
4181 - Removed some obsolete unused code.
4183 * page/mac/EventHandlerMac.mm:
4184 (WebCore::EventHandler::passMouseDownEventToWidget): Removed the special case code for
4185 NSTextView. This was left over from when we used NSTextField and NSTextView for form
4186 elements and is no longer used at all.
4188 * page/mac/WebCoreFrameBridge.h: Removed 20 unused methods that were still on one side
4189 of the bridge or another. We really need to find a time to tear down the rest of the
4190 bridge, but that's not this patch.
4192 * page/mac/WebCoreFrameBridge.mm:
4193 (-[WebCoreFrameBridge addData:]): Changed to get at the _shouldCreateRenderers field directly
4194 instead of using a method.
4195 (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
4196 Took out obsolete comment about matching enums (we use a single enum now and have for some
4198 (-[WebCoreFrameBridge selectionGranularity]): Ditto.
4200 2007-12-14 Justin Garcia <justin.garcia@apple.com>
4202 Reviewed by Darin Adler.
4204 <rdar://problem/5575101> GoogleDocs: Hang in SplitElementCommand::doApply when outdenting a list item in a particular list
4206 * editing/CompositeEditCommand.cpp:
4207 (WebCore::CompositeEditCommand::splitTreeToNode): Moved here.
4208 * editing/CompositeEditCommand.h:
4209 * editing/IndentOutdentCommand.cpp: Moved splitTreeToNode.
4210 * editing/IndentOutdentCommand.h: Ditto, and removed unimplemented splitTreeTo.
4211 * editing/InsertListCommand.cpp:
4212 (WebCore::InsertListCommand::doApply): Split ancestors of listChildNode between
4213 it and listNode, if they exists, so that moving listChildNode doesn't put it out
4214 of order. Added a test case to cover each change.
4215 * editing/SplitElementCommand.cpp:
4216 (WebCore::SplitElementCommand::doApply): Added an ASSERT to catch code that
4217 tries to split a container at a bogus child, and an early return to avoid a
4220 2007-12-14 Anders Carlsson <andersca@apple.com>
4222 Reviewed by Darin and Geoff.
4224 <rdar://problem/5619295>
4225 REGRESSION: 303-304: Embedded YouTube video fails to render- JS errors (16150) (Flash 9)