1 2008-01-02 Alexey Proskuryakov <ap@webkit.org>
3 Fixed a typo (pointed out in review, but I somehow missed it at first).
5 * editing/EditorCommand.cpp: (WebCore::executeDelete):
7 2008-01-02 Alexey Proskuryakov <ap@webkit.org>
11 Resolved several FIXMEs in EditorCommand.
12 Made recently added commands hidden from JS again.
13 Removed BackwardDelete implementation, which used to be dead code, but got exposed now.
15 Tests: editing/execCommand/delete-no-scroll.html
16 editing/execCommand/forward-delete-no-scroll.html
17 editing/execCommand/insert-line-break-no-scroll.html
19 * editing/EditorCommand.cpp:
20 (WebCore::executeDelete):
21 (WebCore::executeForwardDelete):
22 (WebCore::executeInsertLineBreak):
23 (WebCore::supportedFromMenuOrKeyBinding):
24 (WebCore::CommandEntry::):
26 2008-01-02 Alexey Proskuryakov <ap@webkit.org>
30 http://bugs.webkit.org/show_bug.cgi?id=14555
31 action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice
33 http://bugs.webkit.org/show_bug.cgi?id=14774
34 Submitted data only includes first input item
36 Reworked encoding of mailto URLs to match other browsers.
37 Moved most of related logic from FrameLoader::submitForm() to HTMLFormElement::submit().
39 Tests: fast/forms/mailto/advanced-get.html
40 fast/forms/mailto/advanced-put.html
41 fast/forms/mailto/get-multiple-items-text-plain.html
42 fast/forms/mailto/get-multiple-items-x-www-form-urlencoded.html
43 fast/forms/mailto/get-multiple-items.html
44 fast/forms/mailto/get-non-ascii.html
45 fast/forms/mailto/get-non-ascii-text-plain.html
46 fast/forms/mailto/get-overwrite-query.html
47 fast/forms/mailto/post-append-query.html
48 fast/forms/mailto/post-multiple-items-multipart-form-data.html
49 fast/forms/mailto/post-multiple-items-text-plain.html
50 fast/forms/mailto/post-multiple-items-x-www-form-urlencoded.html
51 fast/forms/mailto/post-multiple-items.html
53 * html/HTMLFormElement.cpp:
54 (WebCore::HTMLFormElement::submit):
55 * loader/FrameLoader.cpp:
56 (WebCore::FrameLoader::submitForm):
58 2008-01-02 Mark Rowe <mrowe@apple.com>
62 * GNUmakefile.am: Remove files before generating them, not after.
64 2008-01-02 Mark Rowe <mrowe@apple.com>
66 Rubber-stamped by Alp Toker.
68 Add missing dependencies to some GNUmakefile.am rules.
72 2008-01-02 Mark Rowe <mrowe@apple.com>
74 Reviewed by Alp Toker.
76 Autotools build fix. Make can expand $@ to any of the targets for the rule,
77 while we always want to use the name of the .cpp file as the output file.
81 2008-01-02 Luca Bruno <lethalman88@gmail.com>
83 Reviewed by Alp Toker.
85 http://bugs.webkit.org/show_bug.cgi?id=16115
86 [GTK] ContextMenu and ContextMenuItem lacks an implementation
88 Add context menu support.
90 Based on a patch by Holger Freyther.
92 * platform/gtk/ContextMenuGtk.cpp:
93 (WebCore::menuItemActivated):
94 (WebCore::ContextMenu::ContextMenu):
95 (WebCore::ContextMenu::~ContextMenu):
96 (WebCore::ContextMenu::appendItem):
97 (WebCore::ContextMenu::setPlatformDescription):
98 (WebCore::ContextMenu::releasePlatformDescription):
99 * platform/gtk/ContextMenuItemGtk.cpp:
100 (WebCore::ContextMenuItem::ContextMenuItem):
101 (WebCore::ContextMenuItem::~ContextMenuItem):
102 (WebCore::ContextMenuItem::releasePlatformDescription):
103 (WebCore::ContextMenuItem::type):
104 (WebCore::ContextMenuItem::action):
105 (WebCore::ContextMenuItem::setAction):
106 (WebCore::ContextMenuItem::platformSubMenu):
107 (WebCore::ContextMenuItem::setSubMenu):
108 (WebCore::ContextMenuItem::setChecked):
109 (WebCore::ContextMenuItem::setEnabled):
111 2008-01-02 Alp Toker <alp@atoker.com>
113 GTK+ autotools build fix. Track changes in r29073.
117 2008-01-01 Darin Adler <darin@apple.com>
121 * bindings/js/kjs_binding.cpp:
122 (KJS::setDOMException): Initialize to avoid uninitialized variable warning.
123 Removed default so we get a warning if there's a missing case.
125 2008-01-01 David D. Kilzer <ddkilzer@webkit.org>
127 Scripting MIME Types application/ecmascript, application/javascript not viewable
128 <http://bugs.webkit.org/show_bug.cgi?id=11063>
132 This patch consolidates the list of acceptable MIME types for JavaScript
133 source into the MIMETypeRegistry class, and replaces checks for these
134 types with a call to MIMETypeRegistry::isSupportedJavaScriptMIMEType().
136 No tests added since viewing JavaScript source is not testable.
138 * dom/DOMImplementation.cpp:
139 (WebCore::DOMImplementation::isTextMIMEType): Use
140 MIMETypeRegistry::isSupportedJavaScriptMIMEType() instead of a single
141 hard-coded MIME type, "application/x-javascript".
143 * html/HTMLScriptElement.cpp:
144 (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript): Moved list of
145 JavaScript MIME types from here to
146 MIMETypeRegistry::initialiseSupportedJavaScriptMIMETypes().
148 * platform/MIMETypeRegistry.cpp:
149 (WebCore::initialiseSupportedJavaScriptMIMETypes): Added. List of
150 MIME types came from HTMLScriptElement::shouldExecuteAsJavaScript().
151 (WebCore::initialiseSupportedNonImageMimeTypes): Remove single
152 hard-coded MIME type, "application/x-javascript", from the list.
153 (WebCore::initialiseMIMETypeRegistry): Initialise
154 supportedJavaScriptMIMETypes, then pre-populate supportedNonImageMIMETypes
155 with values in supportedJavaScriptMIMETypes.
156 (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): Added.
158 * platform/MIMETypeRegistry.h: Added isSupportedJavaScriptMIMEType().
160 2008-01-01 Sam Weinig <sam@webkit.org>
164 Patch for http://bugs.webkit.org/show_bug.cgi?id=16691
165 Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)
167 - Create JS objects for all the different types of exceptions, each with there own prototype and constructor.
168 - Abstract all the logic and storage for exception classes in to an ExceptionBase class.
169 - Move specialized ExceptionCodes into the exception classes. (ie. the EventExceptionCode enum is now in EventException).
171 Tests: fast/dom/DOMException/EventException.html
172 fast/dom/DOMException/RangeException.html
173 fast/dom/DOMException/XPathException.html
174 http/tests/xmlhttprequest/XMLHttpRequestException.html
175 svg/custom/SVGException.html
177 * DerivedSources.make:
179 * WebCore.vcproj/WebCore.vcproj:
180 * WebCore.xcodeproj/project.pbxproj:
181 * WebCoreSources.bkl:
182 * bindings/js/JSSVGMatrixCustom.cpp:
183 (WebCore::JSSVGMatrix::inverse):
184 (WebCore::JSSVGMatrix::rotateFromVector):
185 * bindings/js/kjs_binding.cpp:
186 (KJS::setDOMException):
187 * bindings/scripts/CodeGeneratorJS.pm: Use the constant values defined
188 in the IDL as the ObjC bindings do.
189 * bindings/scripts/CodeGeneratorObjC.pm:
190 * dom/DOMCoreException.cpp: Removed.
191 * dom/DOMCoreException.h:
192 (WebCore::DOMCoreException::DOMCoreException):
193 * dom/DOMCoreException.idl:
195 * dom/EventException.h: Copied from WebCore/dom/DOMCoreException.h.
196 (WebCore::EventException::EventException):
197 (WebCore::EventException::):
198 * dom/EventException.idl: Copied from WebCore/dom/DOMCoreException.idl.
199 * dom/EventTargetNode.cpp:
200 (WebCore::EventTargetNode::dispatchEvent):
201 * dom/ExceptionBase.cpp: Copied from WebCore/dom/DOMCoreException.cpp.
202 (WebCore::ExceptionBase::ExceptionBase):
203 (WebCore::ExceptionBase::toString):
204 * dom/ExceptionBase.h: Copied from WebCore/dom/DOMCoreException.h.
205 (WebCore::ExceptionBase::code):
206 * dom/ExceptionCode.cpp:
207 (WebCore::getExceptionCodeDescription):
208 * dom/ExceptionCode.h:
211 (WebCore::Range::insertNode):
212 (WebCore::Range::checkNodeWOffset):
213 (WebCore::Range::checkNodeBA):
214 (WebCore::Range::selectNode):
215 (WebCore::Range::selectNodeContents):
216 (WebCore::Range::surroundContents):
217 * dom/RangeException.h:
218 (WebCore::RangeException::RangeException):
219 (WebCore::RangeException::):
220 * dom/RangeException.idl:
221 * page/DOMWindow.idl:
223 (WebCore::SVGColor::setRGBColor):
224 * svg/SVGException.h:
225 (WebCore::SVGException::SVGException):
226 (WebCore::SVGException::):
227 * svg/SVGException.idl:
228 * svg/SVGLocatable.cpp:
229 (WebCore::SVGLocatable::getTransformToElement):
230 * xml/XMLHttpRequest.cpp:
231 (WebCore::XMLHttpRequest::dispatchEvent):
232 (WebCore::XMLHttpRequest::open):
233 (WebCore::XMLHttpRequest::send):
234 * xml/XMLHttpRequest.h:
235 * xml/XMLHttpRequestException.h: Copied from WebCore/dom/DOMCoreException.h.
236 (WebCore::XMLHttpRequestException::XMLHttpRequestException):
237 (WebCore::XMLHttpRequestException::):
238 * xml/XMLHttpRequestException.idl: Copied from WebCore/dom/DOMCoreException.idl.
239 * xml/XPathEvaluator.h:
240 * xml/XPathException.h: Copied from WebCore/dom/DOMCoreException.h.
241 (WebCore::XPathException::XPathException):
242 (WebCore::XPathException::):
243 * xml/XPathException.idl: Copied from WebCore/dom/DOMCoreException.idl.
244 * xml/XPathParser.cpp:
245 (WebCore::XPath::Parser::parseStatement):
246 * xml/XPathResult.cpp:
247 (WebCore::XPathResult::convertTo):
248 (WebCore::XPathResult::numberValue):
249 (WebCore::XPathResult::stringValue):
250 (WebCore::XPathResult::booleanValue):
251 (WebCore::XPathResult::singleNodeValue):
252 (WebCore::XPathResult::snapshotLength):
253 (WebCore::XPathResult::iterateNext):
254 (WebCore::XPathResult::snapshotItem):
256 2008-01-01 Sam Weinig <sam@webkit.org>
258 Remove JSDomExceptionConstructor.lut.h from clean step
259 as it no longer exists.
263 2008-01-01 Dan Bernstein <mitz@apple.com>
267 * WebCore.vcproj/WebCore.vcproj:
269 2008-01-01 Sam Weinig <sam@webkit.org>
271 Try again to fix the builds
273 * DerivedSources.make:
275 2008-01-01 Sam Weinig <sam@webkit.org>
280 * WebCore.vcproj/WebCore.vcproj:
281 * WebCoreSources.bkl:
283 2008-01-01 Eric Seidel <eric@webkit.org>
287 Don't replace \ with / in data: urls
288 http://bugs.webkit.org/show_bug.cgi?id=16692
290 Test: fast/loader/url-data-replace-backslash.html
293 (WebCore::KURL::init):
295 2008-01-01 Alp Toker <alp@atoker.com>
297 GTK+ autotools build fix. Track changes in r29051, r29058 and pass the
298 correct parameter to AM_INIT_AUTOMAKE.
302 2007-12-31 Sam Weinig <sam@webkit.org>
306 Patch for http://bugs.webkit.org/show_bug.cgi?id=16637
307 Acid3 expects ExeceptionCode constants to be defined on DOMException objects
309 - Make DOMException a real JS object.
311 Test: fast/dom/DOMException/prototype-object.html
313 * DerivedSources.make:
314 * WebCore.xcodeproj/project.pbxproj:
316 This is no longer needed as the autogenerated classes now includes the
318 * bindings/js/JSDOMExceptionConstructor.cpp: Removed.
319 * bindings/js/JSDOMExceptionConstructor.h: Removed.
321 Create on demand and use the new class for DOMExceptions.
322 * bindings/js/kjs_binding.cpp:
323 (KJS::setDOMException):
325 Remove no longer needed custom constructor getter.
326 * bindings/js/kjs_window.cpp:
327 (KJS::Window::getValueProperty):
329 Don't expose DOMCoreException as the name of class by special casing
330 the user visible class name to be DOMException.
331 * bindings/scripts/CodeGeneratorJS.pm:
333 The DOMException class/file needs to be named DOMCoreException because there is
334 name conflict with one of the Objective-C bindings classes. It should be renamed
335 to DOMException when the Objective-C bindings are moved into WebKit.
336 * dom/DOMCoreException.cpp: Added.
337 (WebCore::DOMCoreException::DOMCoreException):
338 (WebCore::DOMCoreException::toString):
339 * dom/DOMCoreException.h: Added.
340 (WebCore::DOMCoreException::):
341 (WebCore::DOMCoreException::code):
342 (WebCore::DOMCoreException::name):
343 (WebCore::DOMCoreException::message):
344 * dom/DOMCoreException.idl: Added.
345 * page/DOMWindow.idl:
347 2007-12-31 Sam Weinig <sam@webkit.org>
349 Re-enable querySelector and querySelectorAll and touch the necessary files to not
350 kill the windows build.
352 * WebCore.vcproj/build-generated-files.sh:
353 * bindings/scripts/CodeGeneratorCOM.pm:
357 2007-12-31 Darin Adler <darin@apple.com>
361 * dom/Document.idl: Temporarily disable querySelector and querySelectorAll, since they are showing
362 up as pure virtual functions. Sam can fix this later.
363 * dom/Element.idl: Ditto.
365 2007-12-31 Dan Bernstein <mitz@apple.com>
367 Reviewed by Darin Adler.
369 - fix http://bugs.webkit.org/show_bug.cgi?id=14134
370 <rdar://problem/5655160> REGRESSION (r25353): Whitespace nodes ignored between inline list items
372 Test: fast/dynamic/create-renderer-for-whitespace-only-text.html
375 (WebCore::Node::attach): Added code to check if this node's renderer
376 has become the "previous renderer" of any sibling text node, and if so,
377 ensure that that node gets a renderer if it now needs one.
378 (WebCore::Node::createRendererIfNeeded): Removed the assertion that the
379 node is not attached.
381 2007-12-31 Darin Adler <darin@apple.com>
385 - fix http://bugs.webkit.org/show_bug.cgi?id=16641
386 Acid3 reveals HTMLFormElement.elements fails to update when element name changes
388 Test: fast/dom/HTMLFormElement/elements-not-in-document.html
390 This was a bug specific to forms that are not in the document tree.
391 The fix was to change the code to increment the document version number to match
392 up with other document change tracking. Maybe at some point we can clean these up
393 so we don't have so many competing change notification systems.
395 * dom/ContainerNode.cpp:
396 (WebCore::ContainerNode::replaceChild): Removed bogus comment.
397 (WebCore::ContainerNode::addChild): Added an explicit incDOMTreeVersion
398 call here, since this code path bypasses the subtree-modified event code.
401 (WebCore::Element::setAttribute): Remove the inDocument() check -- not all HTML
402 collections are for things in the document.
403 (WebCore::Element::setAttributeMap): Ditto.
405 * dom/EventTargetNode.cpp:
406 (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): Added a call to
407 incDOMTreeVersion here; covers most cases of tree structure changes.
410 (WebCore::Node::attach): Remove call to incDOMTreeVersion -- creating a renderer
411 has nothing to do with changes to the DOM tree!
412 (WebCore::Node::detach): Ditto.
414 * html/HTMLFormElement.cpp:
415 (WebCore::HTMLFormElement::registerFormElement): Remove call to incDOMTreeVersion.
416 This is handled at a lower level and doesn't need to be here.
417 (WebCore::HTMLFormElement::removeFormElement): Ditto.
419 2007-12-31 Henry Mason <hmason@mac.com>
423 Patch for http://bugs.webkit.org/show_bug.cgi?id=14994
424 Support for MessageEvent and cross-domain messaging
426 Test: http/tests/messaging/cross-domain-message-send.html
428 * DerivedSources.make:
430 * WebCore.vcproj/WebCore.vcproj:
431 * WebCore.xcodeproj/project.pbxproj:
432 * WebCoreSources.bkl:
433 * bindings/js/JSDOMWindowCustom.cpp:
434 (WebCore::JSDOMWindow::customGetOwnPropertySlot): Allow cross-domain access to the
435 postMessage function.
436 (WebCore::JSDOMWindow::postMessage):
437 * bindings/js/JSEventCustom.cpp:
440 (WebCore::Event::isMessageEvent):
442 * dom/EventNames.h: New event name
443 * dom/MessageEvent.cpp: Added.
444 * dom/MessageEvent.h: Added.
445 * dom/MessageEvent.idl: Added.
446 * page/DOMWindow.cpp:
447 (WebCore::DOMWindow::postMessage): Added.
449 * page/DOMWindow.idl:
451 2007-12-31 Darin Adler <darin@apple.com>
455 - turn ENABLE_VIDEO back off for Windows until we can install QuickTime on the build bots
457 * WebCore.vcproj/WebCore.vcproj: Removed ENABLE_VIDEO.
458 * WebCore.vcproj/build-generated-files.sh: Ditto.
460 2007-12-30 Alp Toker <alp@atoker.com>
462 Reviewed by Dan Bernstein.
468 2007-12-30 Sam Weinig <sam@webkit.org>
470 Reviewed by Oliver Hunt.
472 Fix for http://bugs.webkit.org/show_bug.cgi?id=16387
473 Variable names can be enumerated across domains
474 <rdar://problem/5640454>
476 Test: http/tests/security/cross-frame-access-enumeration.html
478 * bindings/js/kjs_window.cpp:
479 (KJS::Window::getPropertyNames): Override method to test same-origin policy.
480 * bindings/js/kjs_window.h:
482 2007-12-30 Sam Weinig <sam@webkit.org>
484 Reviewed by Oliver Hunt.
486 Patch for http://bugs.webkit.org/show_bug.cgi?id=10686
487 event instanceof MouseEvent throws exception
489 Add JS constructors for all the Event types.
491 Test: fast/events/event-instanceof.html
493 * WebCore.xcodeproj/project.pbxproj:
494 * dom/KeyboardEvent.idl:
495 * dom/MouseEvent.idl:
496 * dom/MutationEvent.idl:
497 * dom/OverflowEvent.idl:
498 * dom/ProgressEvent.idl:
501 * dom/WheelEvent.idl:
502 * page/DOMWindow.idl:
504 2007-12-30 David Kilzer <ddkilzer@webkit.org>
508 - fix http://bugs.webkit.org/show_bug.cgi?id=15359
509 JPEG image not shown when height is specified as percentage inside a table
511 The problem occurs when a replaced element (image, canvas, etc.) with
512 a percent-height attribute is contained by a table cell with an auto-
513 or percent-height attribute. If there are no other conditions to cause
514 the table cell's height to expand, an available height of zero will
515 always be returned. In these cases, the intrinsic height of the
516 replaced element should be used if it is greater than the available
517 height of the table cell.
519 Tests: fast/replaced/table-percent-height.html
520 tables/mozilla/bugs/bug137388-1.html
521 tables/mozilla/bugs/bug137388-2.html
523 * rendering/RenderBox.cpp:
524 (WebCore::RenderBox::calcReplacedHeightUsing):
526 2007-12-30 Luca Bruno <lethalman88@gmail.com>
528 Reviewed by Alp Toker.
530 http://bugs.webkit.org/show_bug.cgi?id=16099
531 Crash in CURL for empty POST
533 We have to set POST even when the data is empty, otherwise cURL will
534 hang while waiting for a response.
536 * platform/network/curl/ResourceHandleManager.cpp
537 (ResourceHandleManager::setupPOST): allow empty POST
539 2007-12-29 Jan Michael Alonzo <jmalonzo@unpluggable.com>
541 Reviewed by Alp Toker.
543 Move all SVG related stuff inside SVG block. Don't include
544 SVGNames, SVGElementFactory, and XLinkNames when SVG is not
549 2007-12-29 Alexey Proskuryakov <ap@webkit.org>
553 http://bugs.webkit.org/show_bug.cgi?id=14428
554 FCKEditor: Images disappear on drag/drop and copy/paste
556 Test: editing/pasteboard/drag-image-in-about-blank-frame.html
558 * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't use "about:blank" as a
559 base URL, just like we don't use an empty one.
561 2007-12-29 Jan Michael Alonzo <jmalonzo@unpluggable.com>
563 Reviewed by Alp Toker.
565 http://bugs.webkit.org/show_bug.cgi?id=16669
566 autotools update and fixes
568 Autotools update and database/icon database inclusion guard fixes
571 - Update autotools config as per -r29012 changes
572 - Fix CSSGrammar.h/cpp generation (Seo Sanghyeon, sanxiyn)
574 * loader/icon/IconDatabase.h:
575 * page/DOMWindow.cpp:
576 * page/InspectorController.cpp:
578 * storage/Database.h:
579 - Remove ENABLE(DATABASE) inclusion guard. Let the includer add the guard instead.
581 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
585 Respect horiz-origin-x / horiz-origin-y / vert-origin-x / vert-origin-y properties when drawing SVG Fonts.
586 (Fixes fonts-elem-05-t.svg in a --svg-fonts build)
589 (WebCore::Font::drawGlyphsWithSVGFont):
591 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
595 Further SVG Font work. Parse all <glyph> attributes, using SVGGlyphElement::buildGlyphIdentifier.
596 SVGFontElement::collectGlyphs() now uses this method. Per character advance values work well now.
598 * platform/graphics/FontData.cpp:
599 (WebCore::SVGFontData::convertEmUnitToPixel): Add helper function.
600 (WebCore::FontData::ascent):
601 (WebCore::FontData::descent):
602 * platform/graphics/FontData.h:
604 (WebCore::isVerticalWritingMode): Add helper function.
605 (WebCore::Font::drawGlyphsWithSVGFont):
606 * svg/SVGFontElement.cpp:
607 (WebCore::SVGFontElement::collectGlyphs): Simplified implementation - SVGGlyphIdentifier now build by SVGGlyphElement.
608 * svg/SVGGlyphElement.cpp:
609 (WebCore::parseArabicForm): Helper function.
610 (WebCore::parseOrientation): Ditto.
611 (WebCore::parsePathData): Ditto.
612 (WebCore::SVGGlyphElement::buildGlyphIdentifier):
613 * svg/SVGGlyphElement.h:
614 (WebCore::SVGGlyphElement::rendererIsNeeded):
616 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
620 Refactor SVGAnimationElement::parseValues into a generic function parseDelimitedString.
621 SVGAnimationElement needs to parse semicolon-seperated strings, SVGGlyphElement comma-seperated.
623 * svg/SVGAnimationElement.cpp:
624 (WebCore::SVGAnimationElement::parseMappedAttribute):
625 * svg/SVGParserUtilities.cpp:
626 (WebCore::parseDelimitedString):
627 * svg/SVGParserUtilities.h:
629 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
633 Add new helper structure SVGFontData - FontData holds this object as OwnPtr.
634 Store several attribute values there (horiz-adv-x, horiz-origin-x etc..)
636 To optimize for the common case ('FontData' used for HTML rendering) it feels
637 better to hold one OwnPtr in FontData, than several floats.
639 Parse all <font> attributes in SVGFontFaceElement::createFontData.
641 * platform/graphics/FontData.cpp:
642 (WebCore::SVGFontData::SVGFontData):
643 (WebCore::FontData::FontData):
644 (WebCore::FontData::ascent):
645 (WebCore::FontData::descent):
646 * platform/graphics/FontData.h:
647 (WebCore::FontData::isSVGFont):
648 (WebCore::FontData::svgFontData):
650 (WebCore::Font::drawGlyphsWithSVGFont):
651 * svg/SVGFontElement.cpp:
652 * svg/SVGFontElement.h:
653 (WebCore::SVGFontElement::rendererIsNeeded):
654 * svg/SVGFontFaceElement.cpp:
655 (WebCore::SVGFontFaceElement::unitsPerEm):
656 (WebCore::SVGFontFaceElement::createFontData):
658 2007-12-28 Darin Adler <darin@apple.com>
660 - try to fix Windows and WX builds (broken by SVG Fonts check-in)
662 * platform/graphics/win/FontWin.cpp:
663 (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent, now that it requires it.
664 I can't see how it can be right to require the font size for ascent and descent,
665 but not for other metrics functions in FontData.
667 * platform/graphics/wx/FontWx.cpp:
668 (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent and FontData::descent.
670 2007-12-28 Dan Bernstein <mitz@apple.com>
672 Reviewed by Mark Rowe.
674 - fix http://bugs.webkit.org/show_bug.cgi?id=16650
675 <rdar://problem/5664872> REGRESSION (r28278-r28314): ATSUI uses LTR writing direction for all text runs
677 Covered by existing pixel tests.
679 * platform/graphics/mac/FontMac.mm:
680 (WebCore::Font::drawComplexText): Corrected to maintain the style
681 information in the adjusted text run when passing it to
682 ATSUILayoutParameters. Prior to r28298 the style was passed separately.
684 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
686 Build fix, not reviewed.
688 Add wtf/OwnPtr.h include, to fix --svg-fonts build.
690 * css/SVGCSSFontFace.h:
692 2007-12-29 Nikolas Zimmermann <zimmermann@kde.org>
696 Fixes: http://bugs.webkit.org/show_bug.cgi?id=10649 (WebKit SVG needs SVG Fonts support)
698 Begin implementation of SVG Fonts module. Basic documents using SVG Fonts already work.
699 Only local, in-document fonts who declare their glyphs using the <glyph d="..."> path syntax
700 are supported. (<glyph> containing arbitary SVG content as child elements, not supported yet).
702 Limited to single char <-> glyph mapping, no ligatures supported yet.
703 (ie. <glyph unicode='A'/> <glyph unicode='AB'/> - it ignores the 'AB' glyph definition for now)
705 Mark all SVG Font related classes & usages in ENABLE(SVG_FONTS) blocks.
707 No layout test changes for a --no-svg-fonts build, heavy changes if enabled. Because a lot of SVG Font
708 attributes are not processed yet, the rendering looks wrong - hence disabled by default.)
710 * DerivedSources.make: Add SVGFontElement/SVGGlyphElement/SVGMissingGlyphElement
711 * WebCore.pro: Updated build system.
712 * WebCore.vcproj/WebCore.vcproj: Ditto.
713 * WebCore.xcodeproj/project.pbxproj: Ditto.
714 * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGFontElement/JSSVGGlyphElement/JSSVGMissingGlyphElement
715 * bindings/objc/DOM.mm: Ditto (for DOMSVG*).
716 (WebCore::createElementClassMap):
717 * bindings/objc/DOMInternal.h: Ditto.
718 * bindings/objc/DOMSVG.h: Ditto.
719 * css/CSSFontFace.h: Mark three functions 'virtual', to be overriden by SVGCSSFontFace
720 * css/CSSFontFaceSrcValue.h: Add functionality to identify as SVG CSS font face source.
721 (WebCore::CSSFontFaceSrcValue::m_fontFaceElement): Hold a pointer to the font face which created it.
722 (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
723 (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
724 * css/CSSFontSelector.cpp: Build 'SVGCSSFontFace' objects for local, in-document SVG fonts.
725 (WebCore::CSSFontSelector::addFontFaceRule):
726 * css/SVGCSSFontFace.cpp: Added. (Simplified implementation for SVG Fonts)
727 (WebCore::SVGCSSFontFace::SVGCSSFontFace):
728 (WebCore::SVGCSSFontFace::~SVGCSSFontFace):
729 (WebCore::SVGCSSFontFace::isValid):
730 (WebCore::SVGCSSFontFace::addSource):
731 (WebCore::SVGCSSFontFace::getFontData):
732 * css/SVGCSSFontFace.h: Added.
733 * platform/graphics/cg/PathCG.cpp:
734 (WebCore::Path::closeSubpath): Silence a CG warning when calling closeSubpath() on empty path.
735 * platform/graphics/Font.cpp: Add some logic to call into SVG Font code when operating on SVG Fonts.
736 (WebCore::Font::ascent): Pass font size to FontData::ascent() call
737 (WebCore::Font::descent): Pass font size to FontData::descent() call
738 (WebCore::Font::canUseGlyphCache): Always return true for SVG fonts here.
739 (WebCore::Font::drawGlyphBuffer): Call drawGlyphsWithSVGFont (instead of drawGlyphs) if the primary font is a SVG font.
740 * platform/graphics/Font.h: Add (SVG-only!) ability to store a RenderObject pointer, to the element which invoked the drawText() call.
741 (WebCore::TextRun::TextRun):
742 (WebCore::TextRun::referencingRenderObject):
743 (WebCore::TextRun::setReferencingRenderObject):
744 * platform/graphics/FontData.cpp:
745 (WebCore::FontData::FontData):
746 (WebCore::FontData::ascent):
747 (WebCore::FontData::descent):
748 * platform/graphics/FontData.h: Store a pointer to the SVGFontFaceElement, which created this FontData object - needed for drawGlyphsWithSVGFont().
749 (WebCore::FontData::isSVGFont): Offer a way to determine wheter this is a FontData object, created by a SVGFontFaceElement.
750 (WebCore::FontData::svgFontFace):
751 * rendering/SVGInlineTextBox.cpp:
752 (WebCore::SVGInlineTextBox::calculateGlyphWidth): Add assertion.
753 * rendering/SVGRootInlineBox.cpp:
754 (WebCore::svgTextRunForInlineTextBox): Always call 'setReferencingRenderObject(myRenderSVGText)' on the new TextRun
755 * svg/SVGFont.cpp: Added.
756 (WebCore::Font::drawGlyphsWithSVGFont): Outsourced implementation of SVG Fonts into it's own file.
757 * svg/SVGFontElement.cpp: Added. (Note: this holds the GlyphHashMap which associates certain <glyph> objects with unicode values)
758 (WebCore::SVGFontElement::SVGFontElement):
759 (WebCore::SVGFontElement::~SVGFontElement):
760 (WebCore::SVGFontElement::parseMappedAttribute):
761 (WebCore::SVGFontElement::collectGlyphs):
762 (WebCore::SVGFontElement::glyphIdentifierForGlyphCode):
763 * svg/SVGFontElement.h: Added.
764 (WebCore::GlyphHash::hash):
765 (WebCore::GlyphHash::equal):
766 (WebCore::GlyphHashTraits::deletedValue):
767 (WebCore::SVGFontElement::rendererIsNeeded):
768 (WebCore::SVGFontElement::contextElement):
769 * svg/SVGFontElement.idl: Added.
770 * svg/SVGFontFaceElement.cpp: Build SVG specific 'FontData' object
771 (WebCore::SVGFontFaceElement::unitsPerEm):
772 (WebCore::SVGFontFaceElement::fontFamily):
773 (WebCore::SVGFontFaceElement::createFontData): Builds SVG specified 'FontData' object with the markup specified ascent/descent values etc..
774 (WebCore::SVGFontFaceElement::rebuildFontFace): Construct CSSFontFaceSrc object (marked as 'isSVGFontFaceSrc') to satisfy CSSFontSelector::addFontFaceRule.
775 (WebCore::SVGFontFaceElement::insertedIntoDocument): Rebuild font face.
776 (WebCore::SVGFontFaceElement::glyphIdentifierForGlyphCode): Allows drawGlyphsWithSVGFont to access the glyph hash map living in the SVGFontElement.
777 * svg/SVGFontFaceElement.h: Fixed code formatting issues & wrap in ENABLE(SVG_FONTS) blocks.
778 * svg/SVGFontFaceElement.idl: Ditto.
779 * svg/SVGFontFaceFormatElement.cpp: Ditto.
780 * svg/SVGFontFaceFormatElement.h: Ditto.
781 * svg/SVGFontFaceFormatElement.idl: Ditto.
782 * svg/SVGFontFaceNameElement.cpp: Ditto.
783 * svg/SVGFontFaceNameElement.h: Ditto.
784 * svg/SVGFontFaceNameElement.idl: Ditto.
785 * svg/SVGFontFaceSrcElement.cpp: Ditto.
786 * svg/SVGFontFaceSrcElement.h: Ditto.
787 * svg/SVGFontFaceSrcElement.idl: Ditto.
788 * svg/SVGFontFaceUriElement.cpp: Ditto.
789 * svg/SVGFontFaceUriElement.h: Ditto.
790 * svg/SVGFontFaceUriElement.idl: Ditto.
791 * svg/SVGDefinitionSrcElement.cpp: Ditto.
792 * svg/SVGDefinitionSrcElement.h: Ditto.
793 * svg/SVGDefinitionSrcElement.idl: Ditto.
794 * svg/SVGGlyphElement.cpp: Added.
795 (WebCore::SVGGlyphElement::SVGGlyphElement):
796 (WebCore::SVGGlyphElement::parseMappedAttribute):
797 (WebCore::SVGGlyphElement::childrenChanged):
798 * svg/SVGGlyphElement.h: Added.
799 (WebCore::SVGGlyphElement::rendererIsNeeded):
800 (WebCore::SVGGlyphIdentifier::): Structure holding all data to represent a SVG glyph (origin, advance, orientation etc..)
801 (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
802 * svg/SVGGlyphElement.idl: Added.
803 * svg/SVGMissingGlyphElement.cpp: Added. (stub implementation)
804 (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
805 (WebCore::SVGMissingGlyphElement::parseMappedAttribute):
806 (WebCore::SVGMissingGlyphElement::childrenChanged):
807 * svg/SVGMissingGlyphElement.h: Added.
808 (WebCore::SVGMissingGlyphElement::rendererIsNeeded):
809 * svg/SVGMissingGlyphElement.idl: Added.
810 * 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!).
812 2007-12-27 Dan Bernstein <mitz@apple.com>
814 Reviewed by Alexey Proskuryakov.
816 - fix http://bugs.webkit.org/show_bug.cgi?id=16628
817 ASSERTION FAILED: m_resizeLayer (running layout tests)
819 * rendering/RenderLayer.cpp:
820 (WebCore::RenderLayer::~RenderLayer): Avoid calling
821 EventHandler::resizeLayerDestroyed() if the document is being destroyed.
823 2007-12-27 Dan Bernstein <mitz@apple.com>
825 Reviewed by Oliver Hunt.
827 - fix http://bugs.webkit.org/show_bug.cgi?id=16603
828 <rdar://problem/5664199> Crash when resizing text field
830 Test: fast/layers/resize-layer-deletion-crash.html
832 The event handler has only a weak reference to the layer that is
833 currently in resize mode, so it is the layer's responsibility to let
834 the event handler know if it has been destroyed while in that mode.
836 * page/EventHandler.cpp:
837 (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets
839 * page/EventHandler.h:
840 * rendering/RenderLayer.cpp:
841 (WebCore::RenderLayer::~RenderLayer): Added a call to
842 EventHandler::resizeLayerDestroyed() if the layer is in resize mode.
844 2007-12-27 Collin Jackson <webkit@collinjackson.com>
846 Reviewed by Sam Weinig.
848 http://bugs.webkit.org/show_bug.cgi?id=16539
849 <rdar://problem/5659269>
851 The same-origin check was missing in the implementation of
852 setTimeout, setInterval, addEventListener, and removeEventListener.
854 Suppose <http://www.badguy.com/> contains an iframe to
855 <http://www.goodguy.com/>. Now www.badguy.com can steal
856 www.goodguy.com cookies by running this code:
858 setTimeout.call(frames[0], "alert(document.cookie)", 1000);
860 This patch changes the behavior so that setTimeout to does
861 nothing and returns an undefined value if the caller is not
862 permitted to script the window whose setTimeout method is being
863 called. The same applies to setInterval, addEventListener, and
866 Tests: http/tests/security/cross-frame-access-call.html
868 * bindings/js/kjs_window.cpp:
869 (KJS::WindowProtoFuncSetTimeout::callAsFunction)
870 (KJS::WindowProtoFuncSetInterval::callAsFunction)
871 (KJS::WindowProtoFuncAddEventListener::callAsFunction)
872 (KJS::WindowProtoFuncRemoveEventListener::callAsFunction)
874 2007-12-27 Dan Bernstein <mitz@apple.com>
876 Reviewed by Dave Hyatt and Sam Weinig.
878 - fix <rdar://problem/5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
880 Test: fast/layers/add-layer-with-nested-stacking.html
881 Test: fast/layers/remove-layer-with-nested-stacking.html
883 * rendering/RenderLayer.cpp:
884 (WebCore::RenderLayer::addChild): If the new child is overflow-only
885 but has children of its own, dirty the stacking context's z-order lists
886 since the grandchildren might need to be in them.
887 (WebCore::RenderLayer::removeChild): Similarly for the old child.
889 2007-12-27 Jan Michael Alonzo <jmalonzo@unpluggable.com>
891 Reviewed by Alp Toker.
893 http://bugs.webkit.org/show_bug.cgi?id=16353
894 [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.)
896 Added the flags mentioned in the bug only when doing 'debug'
897 builds. -DGST_DISABLE_DEPRECATED only added when video is enabled.
902 2007-12-27 Dan Bernstein <mitz@apple.com>
904 Reviewed by Eric Seidel.
906 - fix http://bugs.webkit.org/show_bug.cgi?id=16490
907 ASSERT in ~FrameView while viewing/reloading WICD test case
909 Test: fast/dynamic/paused-event-dispatch.html
911 * page/FrameView.cpp:
912 (WebCore::FrameView::~FrameView):
913 (WebCore::FrameView::layout): Changed to always pause event dispatch and
914 always resume event dispatch, regardless of whether the post-layout
915 task timer is active. However, if it is active, assert that event
916 dispatch is still paused.
918 2007-12-27 Alexey Proskuryakov <ap@webkit.org>
922 http://bugs.webkit.org/show_bug.cgi?id=14500
923 need to be more generous about charset declaration with meta tag
925 http://bugs.webkit.org/show_bug.cgi?id=12526
926 <rdar://problem/4867183> Safari ignores encoding description "charset=Shift_JIS" in invalid html
928 <rdar://problem/4892428> Unlike other browsers, WebKit ignores <meta> charset definitions outside the head
930 <rdar://problem/5643774> REGRESSION: Text is garbled when clicking a link inside an Arabic website
932 Tests: fast/encoding/ahram-org-eg.html
933 fast/encoding/bandai-co-jp-releases.html
934 fast/encoding/floraexpress-ru.html
935 fast/encoding/hanarei-blog32-fc2-com.html
936 fast/encoding/yahoo-mail.html
938 * loader/TextResourceDecoder.cpp:
939 (WebCore::TextResourceDecoder::checkForHeadCharset): Don't stop looking for <meta> until we've
940 seen at least 512 bytes of input.
942 2007-12-26 Jan Michael Alonzo <jmalonzo@unpluggable.com>
944 Reviewed by Alp Toker.
946 http://bugs.webkit.org/show_bug.cgi?id=16390
947 Use autotools or GNU make as the build system for the GTK port
949 * GNUmakefile.am: Added.
951 2007-12-26 Alexey Proskuryakov <ap@webkit.org>
953 Reviewed by Sam Weinig.
955 http://bugs.webkit.org/show_bug.cgi?id=16609
956 Make manual-tests/xmlhttprequest-contenttype-empty.html test automatic
958 * manual-tests/xmlhttprequest-contenttype-empty.html: Removed (moved to LayoutTests/http).
960 2007-12-26 Mark Rowe <mrowe@apple.com>
964 * platform/Threading.h:
966 2007-12-25 Rob Buis <buis@kde.org>
970 http://bugs.webkit.org/show_bug.cgi?id=15514
971 <clipPath> with <use> not respected
972 http://bugs.webkit.org/show_bug.cgi?id=16557
973 SVG circle elements have been clipped away completely, instead of partially.
975 Add toClipPath to get clip path data for the clipping paths. Implement it for <use>, thereby allowing clip paths using use.
977 * svg/SVGClipPathElement.cpp:
978 (WebCore::SVGClipPathElement::canvasResource):
979 * svg/SVGStyledTransformableElement.h:
980 (WebCore::SVGStyledTransformableElement::toClipPath):
981 * svg/SVGUseElement.cpp:
982 (WebCore::isDirectReference):
983 (WebCore::SVGUseElement::toClipPath):
984 * svg/SVGUseElement.h:
986 2007-12-25 Sam Weinig <sam@webkit.org>
988 Reviewed by Eric Seidel.
990 Clean up the files relating to NodeLists.
992 * dom/ChildNodeList.cpp:
993 (WebCore::ChildNodeList::ChildNodeList):
994 (WebCore::ChildNodeList::length):
995 (WebCore::ChildNodeList::item):
996 (WebCore::ChildNodeList::nodeMatches):
997 * dom/ChildNodeList.h:
998 * dom/DynamicNodeList.cpp:
999 (WebCore::DynamicNodeList::itemForwardsFromCurrent):
1000 (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
1001 (WebCore::DynamicNodeList::itemWithName):
1002 * dom/DynamicNodeList.h:
1003 (WebCore::DynamicNodeList::needsNotifications):
1004 * dom/NameNodeList.cpp:
1005 (WebCore::NameNodeList::NameNodeList):
1006 (WebCore::NameNodeList::rootNodeAttributeChanged):
1007 (WebCore::NameNodeList::nodeMatches):
1008 * dom/NameNodeList.h:
1010 * dom/SelectorNodeList.h:
1012 2007-12-25 Sam Weinig <sam@webkit.org>
1017 * WebCore.vcproj/WebCore.vcproj:
1018 * WebCoreSources.bkl:
1020 2007-12-25 Sam Weinig <sam@webkit.org>
1022 Rubber stamped by Eric Seidel.
1024 Move TagNodeList into its own file.
1026 * WebCore.xcodeproj/project.pbxproj:
1028 * dom/TagNodeList.cpp: Copied from dom/Node.cpp.
1029 (WebCore::TagNodeList::TagNodeList):
1030 * dom/TagNodeList.h: Copied from dom/Node.cpp.
1032 2007-12-25 Sam Weinig <sam@webkit.org>
1034 Reviewed by Eric Seidel.
1036 Simplify the NodeList architecture.
1037 - Rename recursiveItem() to item(), since it is not recursive.
1038 - Make recursiveLength() iterative and rename to length().
1039 - Remove now unneeded overrides of item() and length() that used
1040 to call the recursive variants.
1042 * dom/ClassNodeList.cpp:
1043 * dom/ClassNodeList.h:
1044 * dom/DynamicNodeList.cpp:
1045 (WebCore::DynamicNodeList::length):
1046 (WebCore::DynamicNodeList::item):
1047 (WebCore::DynamicNodeList::rootNodeAttributeChanged): Move implementation
1048 into the .cpp file since virtual methods can't be inlined.
1049 * dom/DynamicNodeList.h:
1050 * dom/NameNodeList.cpp:
1051 * dom/NameNodeList.h:
1054 2007-12-25 Alp Toker <alp@atoker.com>
1056 More complete GTK+/Qt/Wx/Win build fixes for breakage introduced in
1060 * WebCore.vcproj/WebCore.vcproj:
1061 * WebCoreSources.bkl:
1063 2007-12-25 Alp Toker <alp@atoker.com>
1065 Win build fix for breakage introduced in r28981.
1067 * WebCore.vcproj/WebCore.vcproj:
1069 2007-12-25 Alp Toker <alp@atoker.com>
1071 Wx build fix for breakage introduced in r28981.
1073 * WebCoreSources.bkl:
1075 2007-12-25 Alp Toker <alp@atoker.com>
1077 GTK+/Qt build fix for breakage introduced in r28981.
1081 2007-12-25 David Smith <catfish.man@gmail.com> and Sam Weinig <sam@webkit.org>
1085 - http://bugs.webkit.org/show_bug.cgi?id=16587
1086 Implement the most useful part of the W3C Selectors API.
1088 * WebCore.xcodeproj/project.pbxproj:
1089 * css/CSSStyleSelector.h: Make Node a friend of CSSStyleSelector so it can use checkSelector()
1090 * dom/ChildNodeList.cpp:
1091 (WebCore::ChildNodeList::ChildNodeList): Change to being a DynamicNodeList
1092 * dom/ChildNodeList.h:
1093 * dom/ClassNodeList.cpp:
1094 (WebCore::ClassNodeList::ClassNodeList): Change to being a DynamicNodeList
1095 * dom/ClassNodeList.h:
1096 * dom/Document.idl: Add the new functions
1097 * dom/DynamicNodeList.cpp: Copied from WebCore/dom/NodeList.cpp.
1098 (WebCore::DynamicNodeList::DynamicNodeList): Rename NodeList to DynamicNodeList, to differentiate it from the new StaticNodeList
1099 (WebCore::DynamicNodeList::~DynamicNodeList):
1100 (WebCore::DynamicNodeList::recursiveLength):
1101 (WebCore::DynamicNodeList::itemForwardsFromCurrent):
1102 (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
1103 (WebCore::DynamicNodeList::recursiveItem):
1104 (WebCore::DynamicNodeList::itemWithName):
1105 (WebCore::DynamicNodeList::rootNodeChildrenChanged):
1106 (WebCore::DynamicNodeList::Caches::Caches):
1107 (WebCore::DynamicNodeList::Caches::reset):
1108 * dom/DynamicNodeList.h: Copied from WebCore/dom/NodeList.h.
1109 (WebCore::DynamicNodeList::rootNodeAttributeChanged):
1110 * dom/Element.idl: Add the new functions
1111 * dom/NameNodeList.cpp: Change to being a DynamicNodeList
1112 (WebCore::NameNodeList::NameNodeList):
1113 * dom/NameNodeList.h:
1114 (WebCore::NameNodeList::rootNodeAttributeChanged):
1116 (WebCore::TagNodeList::TagNodeList): Change to being a DynamicNodeList
1117 (WebCore::Node::registerDynamicNodeList):
1118 (WebCore::Node::unregisterDynamicNodeList):
1119 (WebCore::Node::getElementsByName):
1120 (WebCore::Node::getElementsByClassName):
1121 (WebCore::Node::querySelector): new
1122 (WebCore::Node::querySelectorAll): new
1124 * dom/NodeList.cpp: Removed.
1125 * dom/NodeList.h: This is now an abstract superclass of DynamicNodeList and StaticNodeList
1126 (WebCore::NodeList::NodeList):
1127 (WebCore::NodeList::~NodeList):
1128 * dom/SelectorNodeList.cpp: Added.
1129 (WebCore::SelectorNodeList::SelectorNodeList): New StaticNodeList subclass that filters elements by CSS selector
1130 * dom/SelectorNodeList.h: Added.
1131 * dom/StaticNodeList.cpp: Added.
1132 (WebCore::StaticNodeList::length):
1133 (WebCore::StaticNodeList::item):
1134 (WebCore::StaticNodeList::itemWithName):
1135 * dom/StaticNodeList.h: Added.
1136 (WebCore::StaticNodeList::StaticNodeList):
1137 (WebCore::StaticNodeList::~StaticNodeList):
1139 2007-12-25 Mark Rowe <mrowe@apple.com>
1141 Reviewed by Sam Weinig.
1143 Implement a lock-free ThreadSafeShared for i386, x86_64, ppc and ppc64.
1144 http://bugs.webkit.org/show_bug.cgi?id=16596
1146 This is a 1.7x as fast as the lock-based implementation on x86 for a single-threaded use
1147 of ThreadSafeShared but is closer to 280x as fast when there is heavy concurrent multi-threaded
1148 access to a single ThreadSafeShared object.
1150 The atomic operations are based on those used by the Boost C++ library's shared_ptr implementation.
1152 * platform/Threading.h:
1153 (WebCore::atomicIncrement):
1154 (WebCore::atomicDecrement):
1155 (WebCore::ThreadSafeShared::ThreadSafeShared):
1156 (WebCore::ThreadSafeShared::ref): Use lock-free operations if available.
1157 (WebCore::ThreadSafeShared::deref): Ditto.
1158 (WebCore::ThreadSafeShared::hasOneRef):
1159 (WebCore::ThreadSafeShared::refCount):
1160 (WebCore::ThreadSafeShared::isThreadSafe):
1162 2007-12-24 Darin Adler <darin@apple.com>
1164 * platform/text/PlatformString.h: Removed now-incorrect comment.
1165 Added a comment about copy().
1166 * platform/text/StringImpl.h: Added a comment about copy().
1168 2007-12-24 Darin Adler <darin@apple.com>
1172 - http://bugs.webkit.org/show_bug.cgi?id=16550
1173 make StringImpl immutable
1175 I tried to keep the changes to a minimum. In some cases there is
1176 room for optimization -- I didn't try to add in the "single ref count"
1177 optimizations and there might be a tiny bit more string copying than
1180 * WebCore.base.exp: Updated.
1182 * dom/CharacterData.cpp:
1183 (WebCore::CharacterData::appendData): Changed to use String since
1184 StringImpl doesn't have mutating functions any more.
1185 (WebCore::CharacterData::insertData): Ditto.
1186 (WebCore::CharacterData::deleteData): Ditto.
1187 (WebCore::CharacterData::replaceData): Ditto.
1189 (WebCore::Text::splitText): Changed to use substring instead of
1190 remove since StringImpl does't have mutating functions any more.
1191 * editing/CompositeEditCommand.cpp:
1192 (WebCore::CompositeEditCommand::deleteInsignificantText): Changed
1193 to use String instead of StringImpl so we can use remove.
1195 * platform/text/PlatformString.h: Removed newUninitialized.
1196 Added append that takes a character pointer and length.
1198 * platform/text/String.cpp:
1199 (WebCore::String::insert): Added an implementation that does not
1200 rely on an underlying StringImpl function.
1201 (WebCore::String::append): Ditto.
1202 (WebCore::String::truncate): Ditto.
1203 (WebCore::String::remove): Ditto.
1204 (WebCore::String::charactersWithNullTermination): Added an
1205 implementation that uses the new StringImpl null termination feature,
1206 which does not require modifying a string.
1208 * platform/text/StringImpl.cpp:
1209 (WebCore::isSpace): Fix comment.
1210 (WebCore::StringImpl::StringImpl): Added a new constructor that makes
1211 a string with a trailing null character.
1212 (WebCore::StringImpl::substring): Marked const.
1213 (WebCore::StringImpl::replace): Marked const; had to add quite a few
1214 const_cast. Also rewrote one of these to work without modifying the
1217 * platform/text/StringImpl.h: Fixed a mistake where the empty string had
1218 m_hasTerminatingNullCharacter uninitialized. Added a type and constructor
1219 for creating strings that have a trailing null character. Added a
1220 hasTerminatingNullCharacter function. Removed newUninitialized,
1221 charactersWithNullTermination, append, insert, truncate, and remove.
1222 Marked lots of other functions const.
1224 * platform/text/TextCodecLatin1.cpp:
1225 (WebCore::TextCodecLatin1::decode): Rewrote to use a Vector instead of
1227 * platform/text/TextCodecUTF16.cpp:
1228 (WebCore::TextCodecUTF16::decode): Ditto.
1229 * platform/text/TextCodecUserDefined.cpp:
1230 (WebCore::TextCodecUserDefined::decode): Ditto.
1232 * rendering/RenderStyle.cpp:
1233 (WebCore::RenderStyle::setContent): Changed to use String since
1234 StringImpl doesn't have mutating functions any more.
1236 2007-12-24 Alexey Proskuryakov <ap@webkit.org>
1240 Fix fast/events/arrow-keys-on-body.html, failing on Windows.
1242 * platform/win/KeyEventWin.cpp:
1243 (WebCore::isKeypadEvent):
1244 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1245 Use HIWORD() macro instead of shifting the value explicitly (no change in behavior).
1247 2007-12-23 Alexey Proskuryakov <ap@webkit.org>
1249 Fix Debug and Release QTMovieWin bulds.
1251 * WebCore.vcproj/QTMovieWin.vcproj:
1252 * WebCore.vcproj/debug.vsprops:
1253 * WebCore.vcproj/debug_internal.vsprops:
1254 * WebCore.vcproj/release.vsprops:
1255 Use LibraryConfigSuffix instead of WebKitConfigSuffix for pthreadVC2.
1256 Build release import lib into \lib, not \bin.
1258 2007-12-23 Alp Toker <alp@atoker.com>
1260 Reviewed by Holger Freyther.
1262 http://bugs.webkit.org/show_bug.cgi?id=15382
1263 [CAIRO] Canvas pattern support
1265 http://bugs.webkit.org/show_bug.cgi?id=16577
1266 Merge Cairo enhancements from Apollo project
1268 Add support for canvas patterns.
1270 Make Image::nativeImageForCurrentFrame() public.
1272 Fix some typos along the way.
1274 The globalAlpha canvas fixes are not included in this patch as
1275 they're slightly more intrusive and may conflict conceptually with
1276 GraphicsContext::setAlpha().
1278 * html/CanvasPattern.cpp:
1279 (WebCore::CanvasPattern::CanvasPattern):
1280 (WebCore::CanvasPattern::~CanvasPattern):
1281 (WebCore::CanvasPattern::createPattern):
1282 * html/CanvasPattern.h:
1283 (WebCore::CanvasPattern::platformImage):
1284 * html/CanvasRenderingContext2D.cpp:
1285 (WebCore::CanvasRenderingContext2D::setShadow):
1286 (WebCore::CanvasRenderingContext2D::applyShadow):
1287 (WebCore::CanvasRenderingContext2D::drawImage):
1288 (WebCore::CanvasRenderingContext2D::createPattern):
1289 (WebCore::CanvasRenderingContext2D::applyStrokePattern):
1290 (WebCore::CanvasRenderingContext2D::applyFillPattern):
1291 * platform/graphics/Image.h:
1292 (WebCore::Image::nativeImageForCurrentFrame):
1294 2007-12-23 Kevin Ollivier <kevino@theolliviers.com>
1296 Reviewed by Eric Seidel.
1298 Remove getWxBitmap as we have nativeImageForCurrentFrame now,
1299 and don't draw a border in fillRect.
1301 * platform/graphics/BitmapImage.h:
1302 * platform/graphics/wx/GraphicsContextWx.cpp:
1303 (WebCore::GraphicsContext::fillRect):
1304 * platform/graphics/wx/ImageWx.cpp:
1306 2007-12-23 Alp Toker <alp@atoker.com>
1308 Reviewed by Holger Freyther.
1310 http://bugs.webkit.org/show_bug.cgi?id=16577
1311 Merge Cairo enhancements from Apollo project
1313 This patch is based on initial merging work by Brent Fulgham. Adobe's
1314 code has been modified in a few places to better suit the existing
1317 Implement more clipping and drawing functions.
1319 Save and restore the fill rule manually when clipping.
1321 Avoid image surface creation when the image buffer has height zero.
1323 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1324 (WebCore::GraphicsContext::clip):
1325 (WebCore::GraphicsContext::addInnerRoundedRectClip):
1326 (WebCore::GraphicsContext::addPath):
1327 (WebCore::GraphicsContext::clipOut):
1328 (WebCore::GraphicsContext::clipOutEllipseInRect):
1329 (WebCore::GraphicsContext::fillRoundedRect):
1330 * platform/graphics/cairo/ImageSourceCairo.cpp:
1331 (WebCore::ImageSource::createFrameAtIndex):
1333 2007-12-23 Nikolas Zimmermann <zimmermann@kde.org>
1337 Fix wrong placed ifdef - wrapping SVGDefsElement, instead of SVGDefinitionSrcElement in SVG_FONTS block.
1339 * bindings/objc/DOM.mm:
1340 (WebCore::createElementClassMap):
1342 2007-12-22 Alp Toker <alp@atoker.com>
1346 GTK_TARGET_OTHER_APP is not available in older GTK+ versions. Pass
1347 empty target flags for now.
1349 Check GTK+, not GLib versions, since they are different.
1351 * platform/gtk/PasteboardGtk.cpp:
1352 (WebCore::Pasteboard::documentFragment):
1354 2007-12-22 Luca Bruno <lethalman88@gmail.com>
1356 Reviewed by Alp Toker.
1358 http://bugs.webkit.org/show_bug.cgi?id=16311
1359 [Gtk] Copy rich text to clipboard as text/plain and text/html.
1361 Hook into the WebView to get the correct clipboard object on the
1362 appropriate display. This is necessary because GTK+ does not have
1366 * platform/Pasteboard.h:
1367 (WebCore::Pasteboard::setHelper): added for GTK
1368 (WebCore::Pasteboard::m_helper): private added for GTK
1369 * platform/gtk/PasteboardGtk.cpp:
1370 (WebCore::PasteboardSelectionData): added to support GTK selection data callback
1371 (WebCore::clipboard_get_contents_cb): added
1372 (WebCore::clipboard_clear_contents_cb): added
1373 (WebCore::Pasteboard::~Pasteboard):
1374 (WebCore::Pasteboard::setHelper):
1375 (WebCore::Pasteboard::writeSelection): copy rich text
1376 (WebCore::Pasteboard::documentFragment):
1377 (WebCore::Pasteboard::plainText):
1378 * platform/gtk/PasteboardHelper.h: Added.
1380 2007-12-22 Nikolas Zimmermann <zimmermann@kde.org>
1384 Fixes: http://bugs.webkit.org/show_bug.cgi?id=15966 (Crash in SVGRootInlineBox::walkTextChunks() on mouse hover)
1386 Add new isSVGRootInlineBox() function to InlineBox to be able to differentiate between RootInlineBox/SVGRootInlineBox.
1387 SVG assumed it's root inline box (for <text> elements) is always of type SVGRootInlineBox, which is not the case
1388 for HTML text in <foreignObject>. Text selection doesn't work so far as line box offsets are wrong - which is visible
1391 * rendering/InlineBox.h:
1392 (WebCore::InlineBox::isSVGRootInlineBox):
1393 * rendering/SVGInlineTextBox.cpp:
1394 (WebCore::SVGInlineTextBox::svgRootInlineBox):
1395 (WebCore::SVGInlineTextBox::closestCharacterToPosition):
1396 (WebCore::SVGInlineTextBox::selectionRect):
1397 * rendering/SVGRenderTreeAsText.cpp:
1398 (WebCore::writeSVGInlineTextBox):
1399 * rendering/SVGRootInlineBox.h:
1400 (WebCore::SVGRootInlineBox::isSVGRootInlineBox):
1402 2007-12-22 Alp Toker <alp@atoker.com>
1404 LOW_BANDWIDTH_DISPLAY build fix
1406 Track recent KURL DeprecatedString changes.
1408 * loader/FrameLoader.cpp:
1409 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
1411 2007-12-22 Dan Bernstein <mitz@apple.com>
1415 * WebCore.vcproj/WebCore.vcproj:
1417 2007-12-22 Xan Lopez <xan@gnome.org>
1419 Reviewed by Alp Toker.
1421 Add missing return 0 to fix a compile warning.
1423 * page/gtk/FrameGtk.cpp:
1424 (WebCore::Frame::createScriptInstanceForWidget):
1426 2007-12-21 Antti Koivisto <antti@apple.com>
1428 Reviewed by Darin, Adam and Steve.
1430 Add media playback support for Windows.
1432 The implementation uses low level QuickTime API. DLL is
1433 needed to work around CF use in both WebKit and QuickTime.
1435 This makes Windows build depend on the QuickTime SDK
1437 http://developer.apple.com/quicktime/download/
1439 but not QuickTime itself.
1441 QTMovieWinTimer contains some copy code from SharedTimerWin. It
1442 is used in the QuickTime access DLL which can't use WebCore
1443 SharedTimer due to dependency problems.
1445 * WebCore.vcproj/QTMovieWin.vcproj: Added.
1446 * WebCore.vcproj/WebCore.vcproj:
1447 * WebCore.vcproj/build-generated-files.sh:
1448 * html/HTMLMediaElement.cpp:
1449 (WebCore::HTMLMediaElement::setSrc):
1450 * platform/graphics/MediaPlayer.cpp:
1451 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Added.
1452 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1453 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
1454 (WebCore::MediaPlayerPrivate::load):
1455 (WebCore::MediaPlayerPrivate::play):
1456 (WebCore::MediaPlayerPrivate::pause):
1457 (WebCore::MediaPlayerPrivate::duration):
1458 (WebCore::MediaPlayerPrivate::currentTime):
1459 (WebCore::MediaPlayerPrivate::seek):
1460 (WebCore::MediaPlayerPrivate::doSeek):
1461 (WebCore::MediaPlayerPrivate::cancelSeek):
1462 (WebCore::MediaPlayerPrivate::seekTimerFired):
1463 (WebCore::MediaPlayerPrivate::setEndTime):
1464 (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
1465 (WebCore::MediaPlayerPrivate::endPointTimerFired):
1466 (WebCore::MediaPlayerPrivate::paused):
1467 (WebCore::MediaPlayerPrivate::seeking):
1468 (WebCore::MediaPlayerPrivate::naturalSize):
1469 (WebCore::MediaPlayerPrivate::hasVideo):
1470 (WebCore::MediaPlayerPrivate::setVolume):
1471 (WebCore::MediaPlayerPrivate::setMuted):
1472 (WebCore::MediaPlayerPrivate::setRate):
1473 (WebCore::MediaPlayerPrivate::dataRate):
1474 (WebCore::MediaPlayerPrivate::maxTimeBuffered):
1475 (WebCore::MediaPlayerPrivate::maxTimeSeekable):
1476 (WebCore::MediaPlayerPrivate::maxTimeLoaded):
1477 (WebCore::MediaPlayerPrivate::bytesLoaded):
1478 (WebCore::MediaPlayerPrivate::totalBytesKnown):
1479 (WebCore::MediaPlayerPrivate::totalBytes):
1480 (WebCore::MediaPlayerPrivate::cancelLoad):
1481 (WebCore::MediaPlayerPrivate::updateStates):
1482 (WebCore::MediaPlayerPrivate::didEnd):
1483 (WebCore::MediaPlayerPrivate::setRect):
1484 (WebCore::MediaPlayerPrivate::setVisible):
1485 (WebCore::MediaPlayerPrivate::paint):
1486 (WebCore::MediaPlayerPrivate::getSupportedTypes):
1487 (WebCore::MediaPlayerPrivate::movieEnded):
1488 (WebCore::MediaPlayerPrivate::movieLoadStateChanged):
1489 (WebCore::MediaPlayerPrivate::movieTimeChanged):
1490 (WebCore::MediaPlayerPrivate::movieNewImageAvailable):
1491 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Added.
1492 (WebCore::MediaPlayerPrivate::networkState):
1493 (WebCore::MediaPlayerPrivate::readyState):
1494 * platform/graphics/win/QTMovieWin.cpp: Added.
1496 (QTMovieWinPrivate::QTMovieWinPrivate):
1497 (QTMovieWinPrivate::~QTMovieWinPrivate):
1499 (QTMovieWinPrivate::startTask):
1500 (QTMovieWinPrivate::endTask):
1501 (QTMovieWinPrivate::task):
1502 (QTMovieWinPrivate::registerDrawingCallback):
1503 (QTMovieWinPrivate::drawingComplete):
1504 (QTMovieWinPrivate::createGWorld):
1505 (QTMovieWinPrivate::setSize):
1506 (QTMovieWinPrivate::deleteGWorld):
1507 (QTMovieWin::QTMovieWin):
1508 (QTMovieWin::~QTMovieWin):
1510 (QTMovieWin::pause):
1512 (QTMovieWin::setRate):
1513 (QTMovieWin::duration):
1514 (QTMovieWin::currentTime):
1515 (QTMovieWin::setCurrentTime):
1516 (QTMovieWin::setVolume):
1517 (QTMovieWin::setMuted):
1518 (QTMovieWin::dataSize):
1519 (QTMovieWin::maxTimeLoaded):
1520 (QTMovieWin::loadState):
1521 (QTMovieWin::getNaturalSize):
1522 (QTMovieWin::setSize):
1523 (QTMovieWin::setVisible):
1524 (QTMovieWin::paint):
1526 (movieDrawingCompleteProc):
1527 (initializeSupportedTypes):
1528 (QTMovieWin::countSupportedTypes):
1529 (QTMovieWin::getSupportedType):
1530 (QTMovieWin::initializeQuickTime):
1532 * platform/graphics/win/QTMovieWin.h: Added.
1533 * platform/graphics/win/QTMovieWinTimer.cpp: Added.
1534 (TimerWindowWndProc):
1535 (initializeOffScreenTimerWindow):
1536 (setSharedTimerFiredFunction):
1538 (setSharedTimerFireDelay):
1540 (setSharedTimerInstanceHandle):
1542 * platform/graphics/win/QTMovieWinTimer.h: Added.
1543 * rendering/RenderMedia.cpp:
1544 (WebCore::MediaControlPlayButtonElement::update):
1546 2007-12-21 Brent Fulgham <bfulgham@gmail.com>
1548 Reviewed by Alp Toker.
1550 http://bugs.webkit.org/show_bug.cgi?id=16558
1551 Cairo WebCore Rendering Fails on arc drawing
1553 Fix for bug reported (and patched) by Apollo team in which
1554 arcs were draw in reverse (resulting in inverted images).
1555 Review of the source found that the 'clockwise' term was
1556 actually meant to mean 'anticlockwise' so the IDL and
1557 supporting classes have been changed to match this.
1559 * html/CanvasRenderingContext2D.cpp:
1560 (WebCore::CanvasRenderingContext2D::arc):
1561 * html/CanvasRenderingContext2D.idl:
1562 * platform/graphics/cairo/PathCairo.cpp:
1563 (WebCore::Path::addArc):
1564 (WebCore::Path::addEllipse):
1565 * platform/graphics/Path.h:
1567 2007-12-21 Alexey Proskuryakov <ap@webkit.org>
1571 <rdar://problem/5629995> Incorrect display of Danish characters on web site.
1573 Test: http/tests/xmlhttprequest/response-encoding.html
1575 * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData):
1576 Default to UTF-8 for HTML, too. It's unfortunate that we have to use different
1577 rules for main content and XHR responses, but this matches both IE and Firefox.
1579 2007-12-20 Jon Honeycutt <jhoneycutt@apple.com>
1581 Reviewed by Kevin Decker.
1583 <rdar://problem/5655797> REGRESSION(304-306A10) Safari does not find
1584 shockwave plugin on freshly installed OS
1586 Look for Director plugin in its native directory.
1588 * plugins/win/PluginDatabaseWin.cpp:
1589 (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin
1590 doesn't start with "np," so special case its filename.
1591 (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10"
1592 directories to the plugin paths.
1593 (WebCore::PluginDatabaseWin::defaultPluginPaths):
1595 2007-12-20 Peter Kasting <zerodpx@gmail.com>
1597 Reviewed by Alp Toker.
1599 http://bugs.webkit.org/show_bug.cgi?id=16508
1600 Fix regression in GIFImageDecoder.cpp: "Haeberli hack" led to wrongly
1601 decoded transparent areas.
1603 * platform/image-decoders/gif/GIFImageDecoder.cpp:
1604 (WebCore::GIFImageDecoder::haveDecodedRow):
1605 * platform/image-decoders/gif/GIFImageDecoder.h:
1606 * platform/image-decoders/gif/GIFImageReader.cpp:
1607 (GIFImageReader::output_row):
1609 2007-12-20 Justin Garcia <justin.garcia@apple.com>
1611 Reviewed by Oliver Hunt.
1613 <rdar://problem/5543472> GoogleDocs: Safari hangs when creating a list from a particular selection
1615 Still need to fix similar issues with the other operations that iterate
1616 over selected paragraphs, like FormatBlock, Indent and Outdent (<rdar://problem/5658933>).
1618 * editing/IndentOutdentCommand.cpp:
1619 (WebCore::IndentOutdentCommand::indentRegion): Added a FIXME.
1620 * editing/IndentOutdentCommand.h: Removed an unused function.
1621 * editing/InsertListCommand.cpp:
1622 (WebCore::InsertListCommand::modifyRange):
1623 Renamed visibleStart to startOfSelection and visibleEnd to endOfSelection.
1624 Call the new selectionForParagraphIteration, which a) prevents operations like this
1625 one from being performed on a table that isn't fully selected (where the selection
1626 starts just before the table and ends inside it), and b) helps prevent paragraph
1627 iteration from going past the end of the selection.
1628 Call the new startOfNextParagraph, instead of using endOfParagraph(v).next(),
1629 since when v is in the last paragraph of the last cell of a table, that expression
1630 will return the position after the table, not the start of the next paragraph.
1631 * editing/htmlediting.cpp:
1632 (WebCore::enclosingListChild): Don't go above a table cell, so that list operations
1633 take effect inside the table cell where they are performed.
1634 (WebCore::selectionForParagraphIteration): Added, see above.
1635 (WebCore::indexForVisiblePosition): Moved from IndentOutdentCommand.cpp.
1636 * editing/htmlediting.h:
1637 * editing/visible_units.cpp:
1638 (WebCore::startOfNextParagraph): Added, see above.
1639 * editing/visible_units.h:
1640 * editing/TextIterator.h:
1641 (WebCore::TextIterator::exitNode): Added a FIXME.
1643 2007-12-20 Alp Toker <alp@atoker.com>
1645 Rubber-stamped by Maciej.
1647 http://bugs.webkit.org/show_bug.cgi?id=16542
1648 [GTK] Text is missing with old Pango version
1650 Back out commits r28880, r28876, r28865, r28864 which added Pango font
1651 selection support. These changes caused a regression where no text was
1652 displayed with older Pango versions.
1654 * platform/graphics/gtk/FontCacheGtk.cpp:
1655 (WebCore::FontCache::fontExists):
1656 * platform/graphics/gtk/FontDataGtk.cpp:
1657 (WebCore::FontData::platformDestroy):
1658 (WebCore::FontData::containsCharacters):
1659 * platform/graphics/gtk/FontPlatformData.h:
1660 (WebCore::FontPlatformData::FontPlatformData):
1661 (WebCore::FontPlatformData::hash):
1662 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1663 (WebCore::FontPlatformData::FontPlatformData):
1664 (WebCore::FontPlatformData::init):
1665 (WebCore::FontPlatformData::~FontPlatformData):
1666 (WebCore::FontPlatformData::isFixedPitch):
1667 (WebCore::FontPlatformData::operator==):
1668 * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
1669 (WebCore::GlyphPage::fill):
1671 2007-12-20 Timothy Hatcher <timothy@apple.com>
1673 Reviewed by Sam Weinig.
1675 <rdar://problem/5604897> Double-clicking on JavaScript console error
1676 won't show the line where it occurred
1678 Make the URLs clickable in the console, since double clicking is used for
1679 word text selection. Makes the word "line" localizable. Messages that don't
1680 have a URL will no longer print "undefined". Messages that have a line number
1681 less than or equal to 0 will no longer be printed.
1683 * English.lproj/InspectorLocalizedStrings.js: Add "%s (line %d)".
1684 * page/inspector/ConsolePanel.js: Tweak how the DOM nodes are created
1685 and change the click handler to look for a link with the
1686 "console-message-url" class name.
1687 * page/inspector/SourcePanel.js: Call setupSourceFrameIfNeeded() if a
1689 * page/inspector/inspector.css: Update the look of the URL in the console.
1691 2007-12-20 Adam Barth <hk9565@gmail.com>
1693 Reviewed and landed by Sam Weinig.
1695 http://bugs.webkit.org/show_bug.cgi?id=15313
1696 <rdar://problem/5514516>
1698 The same-origin check was incorrect in two cases (both fixed in this
1701 A) If both the source and the target have set their document.domain
1702 to the same value, the protocol must also match in order for
1703 access to be allowed. Without this requirement, the browser is
1704 vulnerable to the following attack:
1706 1) Suppose there is an HTTPS site (www.example.com) that sets
1707 document.domain = "example.com".
1708 2) A network attacker redirects the browser to http://www.example.com/
1709 a) injects script to set document.domain = "example.com", and
1710 b) opens a window to https://www.example.com/
1711 3) Now the network attacker can inject script into the HTTPS page,
1712 stealing cookies and issuing banking transactions.
1714 B) If only one of the source and target has set document.domain, then
1715 access should be denied. With this behavior, the browser is
1716 vulnerable to the following attack:
1718 1) Suppose http://foo.example.com/ opens an iframe to
1719 http://foo.example.com/frame.html that
1720 a) sets document.domain = "example.com", and
1721 b) opens an iframe to http://bar.example.com/
1722 This is a common usage of document.domain for cross-domain
1723 communication, see for example:
1724 http://www.collinjackson.com/research/papers/fp801-jackson.pdf
1725 2) The inner-most iframe, which is from bar.example.com, sets
1726 document.domain = "example.com".
1727 3) Now the inner-most iframe can inject script into the middle
1728 iframe (say via document.write). This bar.example.com script
1729 now has access to the outer-most frame (from foo.example.com).
1731 Both these changes cause WebKit to match the behavior of Firefox 2 and
1732 IE6 in these cases. This patch includes regression tests for both
1735 Internet Explorer 7 and Opera 9 are more strict in that they require
1736 the port numbers to match when both pages have document.domain set.
1737 Opera 9 allows access when only one page has set document.domain, but
1738 this is a security vulnerability.
1740 Tests: http/tests/security/cross-frame-access-child-explicit-domain.html
1741 http/tests/security/cross-frame-access-parent-explicit-domain.html
1743 * bindings/js/kjs_window.cpp:
1744 (KJS::createWindow):
1745 (KJS::Window::allowsAccessFrom):
1747 (WebCore::Document::domain):
1748 (WebCore::Document::setDomain):
1749 (WebCore::Document::initSecurityOrigin):
1751 (WebCore::Document::securityOrigin):
1752 * loader/FrameLoader.cpp:
1753 (WebCore::FrameLoader::begin):
1754 (WebCore::FrameLoader::checkCallImplicitClose):
1755 (WebCore::FrameLoader::shouldAllowNavigation):
1756 * platform/SecurityOrigin.cpp:
1757 (WebCore::SecurityOrigin::setForURL):
1758 (WebCore::SecurityOrigin::createForFrame):
1759 (WebCore::SecurityOrigin::canAccess):
1760 * platform/SecurityOrigin.h:
1761 (WebCore::SecurityOrigin::domain):
1762 * storage/Database.cpp:
1763 (WebCore::Database::openDatabase):
1764 (WebCore::Database::Database):
1765 (WebCore::Database::securityOriginData):
1766 * storage/Database.h:
1767 (WebCore::Database::databaseDebugName):
1768 * storage/DatabaseTracker.cpp:
1769 (WebCore::DatabaseTracker::canEstablishDatabase):
1770 * storage/SQLTransaction.cpp:
1771 (WebCore::SQLTransaction::postflightAndCommit):
1772 (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
1774 2007-12-20 Rodney Dawes <dobey@wayofthemonkey.com>
1776 Reviewed by Darin Adler.
1778 Define XP_UNIX when building with plugins on X11.
1779 Use new npruntime_internal.h instead of npruntime.h.
1780 http://bugs.webkit.org/show_bug.cgi?id=15669
1782 * ForwardingHeaders/bindings/npruntime_internal.h
1784 * html/HTMLPlugInElement.h:
1786 2007-12-19 johnnyding.webkit <johnnyding.webkit@gmail.com>
1788 Reviewed by Alexey. Landed by Stephanie.
1790 - fix http://bugs.webkit.org/show_bug.cgi?id=16179 | <rdar://problem/5619399>
1791 Any attribute name start with a unicode which like #xx00(x could be any hex number[0-9a-f]) will cause HTMLTokenizer parse error
1792 Actually any unicode characters which great than 255 in attribute name will cause Webkit parse the attribute name wrong. So after comparing
1793 the same scenario in IE 6/7, FireFox 2/3, Opera, we should treat those characters as part of attribute name.
1796 * html/HTMLTokenizer.cpp:
1797 (WebCore::HTMLTokenizer::parseEntity): Handle Unicode Entity Name by using ASCII version of findEntity.
1798 (WebCore::HTMLTokenizer::parseTag): Let type of ptr match type of cBuffer.
1799 * html/HTMLTokenizer.h: Change type of cBuffer from char to UChar.
1801 2007-12-20 Eric Seidel <eric@webkit.org>
1803 Reviewed by Nikolas Zimmermann.
1805 WebKit claims to support SVG feature strings it shouldn't
1806 http://bugs.webkit.org/show_bug.cgi?id=15480
1808 * dom/DOMImplementation.cpp:
1809 (WebCore::isSVG10Feature):
1810 (WebCore::isSVG11Feature):
1812 2007-12-20 John Sullivan <sullivan@apple.com>
1814 Reviewed by Oliver and Geoff
1816 - fix <rdar://problem/5536858> Yellow highlight for find results is sometimes shorter
1817 than white "hole" behind it
1819 * rendering/RenderText.cpp:
1820 (WebCore::RenderText::addLineBoxRects):
1821 respect useSelectionHeight in all cases; we were only respecting it in one of the two cases
1823 2007-12-20 Dan Bernstein <mitz@apple.com>
1825 Reviewed by Darin Adler.
1827 - fix <rdar://problem/5656368> REGRESSION(3.0.4-ToT): Acid2 test fails to render anything
1829 * platform/win/ScrollViewWin.cpp:
1830 (WebCore::ScrollView::maximumScroll): Changed back to return the maximum
1831 scroll offsets even if scrolling is not allowed, because navigation and
1832 scrollTo should still work.
1833 (WebCore::ScrollView::wheelEvent): Added early return if scrolling is
1836 2007-12-17 Tony Chang <idealisms@gmail.com>
1840 - Fix for http://bugs.webkit.org/show_bug.cgi?id=16479
1841 text selection does not always begin at mouse down point
1842 Reset the m_dragSrc object on mouse down on all platforms.
1844 Test: fast/text/reset-drag-on-mouse-down.html
1846 * page/EventHandler.cpp:
1847 (WebCore::EventHandler::handleMousePressEvent):
1848 * page/mac/EventHandlerMac.mm:
1849 (WebCore::EventHandler::mouseDown):
1851 2007-12-19 Geoffrey Garen <ggaren@apple.com>
1853 Reviewed by Oliver Hunt.
1856 * ForwardingHeaders/kjs/SymbolTable.h: Added.
1857 * ForwardingHeaders/wtf/VectorTraits.h: Added.
1859 * bindings/js/JSDOMWindowCustom.cpp:
1860 (WebCore::JSDOMWindow::customGetOwnPropertySlot): Replaced use of
1861 getDirectLocation with getOwnPropertySlot. getDirectLocation is no
1862 longer valid, since global declarations are not stored in the property
1865 (WebCore::JSDOMWindow::customPut): Replaced use of JSObject::put with
1866 JSGlobalObject::put. JSObject::put is no longer valid, since global
1867 declarations are not stored in the property map.
1869 * bindings/js/kjs_window.cpp: Replaced JSObject:: calls with Base::
1870 calls, since JSObject is not our base class. This was always a bug, but
1871 the bug is even more apparent after some of my changes.
1873 (KJS::Window::clear): Removed call to clearProperties because
1874 JSGlobalObject::reset takes care of that now.
1876 * history/CachedPage.cpp:
1877 * history/CachedPage.h: Added support for saving a symbol table and
1878 localStorage to the page cache, and restoring it.
1880 2007-12-19 Dan Bernstein <mitz@apple.com>
1882 Reviewed by Darin Adler and Dave Hyatt.
1884 - Substitute the user's preferred standard font for an unknown primary
1885 font before falling back on the platform's last resort font
1887 Cannot be tested in DumpRenderTree because it sets the standard font to
1888 Times, which is also the hard-coded last resort font on Mac.
1890 * css/CSSFontSelector.cpp:
1891 (WebCore::CSSFontSelector::getFontData): Changed the early bail out
1892 condition to allow getting generic font families from settings even if
1893 there are not @font-face rules. Fixed a typo that mapped fantasy to
1894 cursive. Added a mapping from -webkit-standard to the standard family.
1895 * css/CSSStyleSelector.cpp:
1896 (WebCore::CSSStyleSelector::CSSStyleSelector): Changed to always create
1898 (WebCore::CSSRuleSet::addRulesFromSheet):
1899 (WebCore::CSSStyleSelector::applyProperty): Changed to always use the
1901 * css/CSSStyleSelector.h:
1902 (WebCore::CSSStyleSelector::fontSelector):
1903 * platform/graphics/FontCache.cpp:
1904 (WebCore::FontCache::getFontData): Try the user's preferred standard
1905 font before the platform's last resort font.
1907 2007-12-19 Sven Herzberg <sven@imendio.com>
1909 Reviewed by Alp Toker.
1911 Scaled font destruction takes place in FontData::platformDestroy(). No
1912 need to do it in FontPlatformData::~FontPlatformData().
1914 Destroying platform data in platformDestroy() is a convention we
1915 borrow from the Mac and Win ports.
1917 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1919 2007-12-19 Alice Liu <alice.liu@apple.com>
1923 Changed uint to unsigned int. uint caused Windows build breakage
1926 (WebCore::Page::markAllMatchesForText):
1929 2007-12-19 Christian Dywan <christian@twotoasts.de>
1931 Reviewed by Alp Toker.
1933 http://bugs.webkit.org/show_bug.cgi?id=16222
1934 [GTK] Implement inline search and highlighting of matching strings.
1936 Implement search and highlighting logic directly in WebCore.
1939 (WebCore::incrementFrame):
1940 (WebCore::Page::findString):
1941 (WebCore::Page::markAllMatchesForText):
1942 (WebCore::Page::unmarkAllTextMatches):
1945 2007-12-19 Geoffrey Garen <ggaren@apple.com>
1947 Reviewed by Sam Weinig, Dan Bernstein.
1949 Tiger build fix: restored some graphics code still needed on Tiger.
1951 * platform/graphics/GraphicsTypes.h:
1952 * platform/graphics/cg/GraphicsContextCG.cpp:
1953 * platform/graphics/mac/GraphicsContextMac.mm:
1954 (WebCore::GraphicsContext::setCompositeOperation):
1956 2007-12-19 Alp Toker <alp@atoker.com>
1958 Build fix for Pango < 1.18.0 breakage introduced in r28864. Use Fc and
1959 the Pango backend API in these cases.
1961 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1962 (WebCore::FontPlatformData::FontPlatformData):
1963 (WebCore::FontPlatformData::~FontPlatformData):
1965 2007-12-19 Alice Liu <alice.liu@apple.com>
1969 Fixed <rdar://problem/5592485> Safari crashed trying to get a motorcycle insurance quote
1970 on Geico.com WebCore::Document::inPageCache()
1972 Calling Node::willRemove on the focusedNode would immediately tell the document to remove
1973 the focused node, and trigger JS events. This means that the document is mutated while
1974 the engine is trying to tell all child nodes that it's about to removed. To avoid
1975 crashing, we need to hold off on mutating the document until node traversal is finished.
1977 * dom/ContainerNode.cpp:
1978 (WebCore::ContainerNode::removeChild):
1979 (WebCore::ContainerNode::removeChildren):
1982 (WebCore::Node::willRemove):
1983 * loader/FrameLoader.cpp:
1984 (WebCore::FrameLoader::clear):
1986 2007-12-19 Andre Boule <aboule@apple.com>
1988 Reviewed by Dan Bernstein.
1990 Test: fast/canvas/canvas-composite.html
1993 <rdar://problem/5640059> GraphicsContext::setCompositeOperation should use CGContextSetBlendMode
1995 This fix makes setCompositeOperation consistent across all platforms that use CG.
1997 The following compositing modes don't pass however that is covered by another bug:
2003 <rdar://problem/5651783> Some canvas tag compositing modes don't render correctly
2005 * platform/graphics/GraphicsTypes.h:
2006 * platform/graphics/cg/GraphicsContextCG.cpp:
2007 (WebCore::GraphicsContext::setCompositeOperation):
2008 * platform/graphics/mac/GraphicsContextMac.mm:
2009 * platform/win/GraphicsContextWin.cpp:
2011 2007-12-19 Dan Bernstein <mitz@apple.com>
2013 Reviewed by Dave Hyatt.
2015 - fix <rdar://problem/5650045> REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page
2017 Test: fast/dynamic/subtree-boundary-percent-height.html
2019 * rendering/RenderObject.cpp:
2020 (WebCore::objectIsRelayoutBoundary): Do not allow overflows with
2021 percent heights because sometimes they compute to 'auto'.
2023 2007-12-19 Sam Weinig <sam@webkit.org>
2027 http://bugs.webkit.org/show_bug.cgi?id=16511
2028 Speed up ClassNodeList and NamedNodeList by using the caching mechanism employed by ChildNodeList.
2029 - This give a ~2.15x speedup on the native test @ http://ejohn.org/apps/classname/
2031 * dom/ChildNodeList.cpp: Use the caching NodeList constructor to turn on caching.
2032 (WebCore::ChildNodeList::ChildNodeList):
2033 * dom/ClassNodeList.cpp:
2034 (WebCore::ClassNodeList::ClassNodeList):
2035 * dom/ClassNodeList.h:
2037 Move getElementsByName and getElementsByClassName to Node so they
2038 can use easily employ the caching already used by ChildNodeLists. In the case of
2039 getElementsByClassName, this reduces code duplication in Element as well
2043 Move getElementsByClassName to Node.
2047 * dom/NameNodeList.cpp: Use the caching NodeList constructor to turn on caching.
2048 (WebCore::NameNodeList::NameNodeList):
2049 (WebCore::NameNodeList::item):
2050 * dom/NameNodeList.h:
2052 Add maps of caches for ClassNodeLists and NameNodeList to NodeListsNodeData.
2054 (WebCore::TagNodeList::TagNodeList):
2055 (WebCore::Node::Node):
2056 (WebCore::Node::~Node):
2057 (WebCore::Node::childNodes):
2058 (WebCore::Node::registerNodeList):
2059 (WebCore::Node::getElementsByName):
2060 (WebCore::Node::getElementsByClassName):
2061 * dom/Node.h: Make m_nodeLists an OwnPtr. Moved getElementsByName and getElementsByClassName here
2063 Allow subclasses to choose whether they want to receive the notifications using a new bit.
2065 (WebCore::NodeList::NodeList):
2067 (WebCore::NodeList::needsNotifications):
2069 2007-12-19 Dave Hyatt <hyatt@apple.com>
2071 Add support for GDI text rendering to WebKit.
2075 * css/CSSStyleSelector.cpp:
2076 (WebCore::CSSStyleSelector::applyProperty):
2078 (WebCore::Document::recalcStyle):
2079 * page/Settings.cpp:
2080 (WebCore::Settings::setFontRenderingMode):
2081 (WebCore::Settings::fontRenderingMode):
2083 * platform/graphics/Font.h:
2084 (WebCore::Font::renderingMode):
2085 * platform/graphics/FontCache.cpp:
2086 (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
2087 (WebCore::FontPlatformDataCacheKey::operator==):
2088 (WebCore::computeHash):
2089 (WebCore::FontCache::getCachedFontPlatformData):
2090 * platform/graphics/FontDescription.h:
2092 (WebCore::FontDescription::FontDescription):
2093 (WebCore::FontDescription::renderingMode):
2094 (WebCore::FontDescription::setRenderingMode):
2095 (WebCore::FontDescription::operator==):
2096 * platform/graphics/GraphicsContext.h:
2097 * platform/graphics/win/FontCacheWin.cpp:
2098 (WebCore::FontCache::fontExists):
2099 (WebCore::FontCache::createFontPlatformData):
2100 * platform/graphics/win/FontDataWin.cpp:
2101 (WebCore::FontData::platformInit):
2102 (WebCore::FontData::smallCapsFontData):
2103 (WebCore::FontData::containsCharacters):
2104 (WebCore::FontData::determinePitch):
2105 (WebCore::FontData::platformWidthForGlyph):
2106 * platform/graphics/win/FontPlatformData.h:
2107 (WebCore::FontPlatformData::FontPlatformData):
2108 (WebCore::FontPlatformData::useGDI):
2109 (WebCore::FontPlatformData::operator==):
2110 * platform/graphics/win/FontPlatformDataWin.cpp:
2111 (WebCore::FontPlatformData::FontPlatformData):
2112 * platform/graphics/win/FontWin.cpp:
2113 (WebCore::Font::drawGlyphs):
2114 * platform/graphics/win/IconWin.cpp:
2115 (WebCore::Icon::paint):
2116 * platform/win/GraphicsContextWin.cpp:
2117 (WebCore::GraphicsContext::getWindowsContext):
2118 (WebCore::GraphicsContext::releaseWindowsContext):
2119 * platform/win/UniscribeController.cpp:
2120 (WebCore::UniscribeController::shapeAndPlaceItem):
2121 * platform/win/UniscribeController.h:
2122 * plugins/win/PluginViewWin.cpp:
2123 (WebCore::PluginViewWin::paint):
2125 2007-12-19 Sven Herzberg <sven@imendio.com>
2127 Reviewed by Alp Toker.
2129 Replace the fontconfig/freetype based font management with a pango
2131 http://bugs.webkit.org/show_bug.cgi?id=15229
2133 * platform/gtk/FontDataGtk.cpp (FontData::platformDestroy()): updated
2134 the platform specific destroy code
2135 (FontData::containsCharacters()): implemented font coverage with pango
2136 * platform/gtk/FontPlatformData.h: replaced fontconfig specific
2137 members with pango-specific ones
2138 * platform/gtk/FontPlatformDataGtk.cpp: added static members for the
2139 FontPlatformData class
2140 (FontPlatformData::FontPlatformData()): implemented the font-matching
2141 with a PangoFontDescription instead of an FcPattern; initialize the
2142 scaled font by using the API for PangoCairoFont
2143 (FontPlatformData::init()): initialize the PangoFontMap and set up a
2144 hash table to translate the font family name into a font family
2145 (FontPlatformData::isFixedPitch()): implemented by querying the
2147 (FontPlatformData::operator==): compare the FontPlatformData by
2148 comparing the font pointers or the described fonts
2149 * platform/gtk/GlyphPageTreeNodeGtk.cpp (pango_font_get_glyph()):
2150 added a function to query a glyph from a PangoFont
2151 (GlyphPage::fill()): implemented the fill function with Pango instead
2152 of fontconfig/freetype
2154 2007-12-19 Alp Toker <alp@atoker.com>
2156 Reviewed by Holger Freyther.
2158 Improve graphics operator approximations
2160 These changes match Cairo's own CG approximations.
2162 * platform/graphics/cairo/GraphicsContextCairo.cpp:
2163 (WebCore::toCairoOperator):
2165 2007-12-19 Alp Toker <alp@atoker.com>
2167 Reviewed by Holger Freyther.
2169 Check the bounding box before doing a full hit test
2171 * platform/graphics/cairo/PathCairo.cpp:
2172 (WebCore::Path::contains):
2174 2007-12-18 Sam Weinig <sam@webkit.org>
2178 Fix for <rdar://problem/5646478>
2179 REGRESSION: fast/events/event-view-toString fails on Leopard
2181 This fixes an issue where we were incorrectly setting the lastInPrototypeChain
2182 for the JSDOMWindow (the global object) before a call to setPrototype overwrote
2183 it. This fixes it by passing the prototype up the constructor chain so that it
2184 is set before any calls can be made.
2186 * bindings/js/kjs_window.cpp:
2187 (KJS::Window::Window):
2188 * bindings/js/kjs_window.h:
2189 * bindings/scripts/CodeGeneratorJS.pm:
2191 2007-12-18 Beth Dakin <bdakin@apple.com>
2195 Fix for <rdar://problem/5616982> SVGs with width and height 100%
2196 fail to render when used as <img> or CSS image (16167)
2198 This final part of the work fixes the <img> tag.
2200 This is the real fix.
2201 * rendering/RenderImage.cpp:
2202 (WebCore::RenderImage::calcReplacedWidth): Set the container size
2203 on the image. Setting the container size only actually sticks if
2204 the values are non-zero, so if the container size really was set,
2205 use the imageSize that is calculated using the container size. If
2206 it did not stick but the image does have relative width (meaning
2207 that the container size is 0), set the width to 0 by hand. We want
2208 to avoid setting the width before we have a container size or we
2209 will end up incorrectly using the default size of 300x150.
2210 (WebCore::RenderImage::calcReplacedHeight): Same as above, but for
2213 A few more pieces of information have to be exposed through cached
2214 image to make this happen.
2215 * loader/CachedImage.cpp:
2216 (WebCore::CachedImage::usesImageContainerSize): As mentioned above,
2217 when setContainerSize() is called, the container size is only
2218 actually set if the values are non-zero. This call tells you if it
2220 (WebCore::CachedImage::imageHasRelativeWidth):
2221 (WebCore::CachedImage::imageHasRelativeHeight):
2222 * loader/CachedImage.h:
2223 * platform/graphics/Image.h:
2224 (WebCore::Image::usesContainerSize):
2225 * svg/graphics/SVGImage.cpp:
2226 (WebCore::SVGImage::usesContainerSize):
2227 * svg/graphics/SVGImage.h:
2229 2007-12-18 Mark Rowe <mrowe@apple.com>
2231 Rubber-stamped by Maciej Stachowiak.
2233 Remove outdated and non-functioning project files for the Apollo port.
2235 * WebCore.apolloproj: Removed.
2237 2007-12-18 Steve Falkenburg <sfalken@apple.com>
2239 <rdar://problem/5649911> REGRESSION (304-306A9): Typing 'p' in popup menu for type-to-select brings up Safari Help
2241 Need to translate the char back into a key code for posting our WM_KEYDOWN.
2245 * platform/win/PopupMenuWin.cpp:
2246 (WebCore::PopupWndProc):
2248 2007-12-18 Steve Falkenburg <sfalken@apple.com>
2250 <rdar://problem/5651534> REGRESSION(r28764-r28765): GDI leak drawing text when no appropriate font is available
2252 Our captured metafile from Uniscribe may contain multiple calls to CreateFontIndirect.
2253 Only create a font with the last one.
2255 Reviewed by Mitz, Darin.
2257 * platform/graphics/win/FontCacheWin.cpp:
2258 (WebCore::metaFileEnumProc):
2259 (WebCore::FontCache::getFontDataForCharacters):
2261 2007-12-17 Brent Fulgham <bfulgham@gmail.com>
2265 http://bugs.webkit.org/show_bug.cgi?id=16464
2266 Modify WebCore to use win32 thread primitives
2268 Updates to support native windows threading primitives
2269 rather than pthreads emulation library.
2271 * WebCore.vcproj/WebCore.vcproj:
2273 * platform/Threading.h:
2274 * platform/win/MutexWin.cpp: Added.
2275 (WebCore::Mutex::Mutex):
2276 (WebCore::Mutex::~Mutex):
2277 (WebCore::Mutex::lock):
2278 (WebCore::Mutex::tryLock):
2279 (WebCore::Mutex::unlock):
2280 * platform/win/ThreadConditionWin.cpp: Added.
2281 (WebCore::ThreadCondition::ThreadCondition):
2282 (WebCore::ThreadCondition::~ThreadCondition):
2283 (WebCore::ThreadCondition::wait):
2284 (WebCore::ThreadCondition::signal):
2285 (WebCore::ThreadCondition::broadcast):
2286 * platform/win/ThreadingWin.cpp:
2287 (WebCore::threadMapMutex):
2288 (WebCore::threadMap):
2289 (WebCore::storeThreadHandleByIdentifier):
2290 (WebCore::identifierByThreadHandle):
2291 (WebCore::threadHandleForIdentifier):
2292 (WebCore::clearThreadHandleForIdentifier):
2293 (WebCore::createThread):
2294 (WebCore::waitForThreadCompletion):
2295 (WebCore::detachThread):
2296 (WebCore::currentThread):
2298 2007-12-18 Rodney Dawes <dobey@wayofthemonkey.com>
2300 Reviewed by Darin Adler.
2302 Handle EINTR when set by select() and try the select() again
2303 http://bugs.webkit.org/show_bug.cgi?id=16071
2305 * platform/network/curl/ResourceHandleManager.cpp:
2306 (ResourceHandleManager::downloadTimerCallback):
2308 2007-12-18 Dan Bernstein <mitz@apple.com>
2310 Reviewed by Dave Hyatt.
2312 - avoid the simplified Chinese font linking code for characters that are
2313 not in any Windows code page
2315 * platform/graphics/win/FontCacheWin.cpp:
2316 (WebCore::FontCache::getFontDataForCharacters):
2318 2007-12-18 Brady Eidson <beidson@apple.com>
2322 <rdar://problem/5525770> REGRESSION: HTTP Auth protected favicon request results in a password sheet
2324 Some http-auth protected sites have the main resource(s) unprotected, but many subresources are
2325 protected by authentication. Occasionally one can view the main page of a site but the favicon
2326 is behind the iron curtain - in these cases, we should *not* prompt for a username and password
2327 solely for the favicon.
2329 * loader/ResourceLoader.h: Make didReceiveAuthenticationChallenge virtual
2331 * loader/SubresourceLoader.cpp:
2332 (WebCore::SubresourceLoader::didReceiveAuthenticationChallenge): Now that this method
2333 is virtual from ResourceLoader, SubresourceLoader can override. First call to the
2334 SubresourceLoaderClient. If they cancel the resource load, return early. Otherwise, let
2335 ResourceLoader work its magic (resulting in the auth sheet coming down)
2336 * loader/SubresourceLoader.h:
2338 * loader/SubresourceLoaderClient.h:
2339 (WebCore::SubresourceLoaderClient::didReceiveAuthenticationChallenge):
2341 * loader/icon/IconLoader.cpp:
2342 (WebCore::IconLoader::didReceiveAuthenticationChallenge): Cancel the resource load, since we should
2343 never prompt the user for credentials just for a favicon.
2344 * loader/icon/IconLoader.h:
2346 2007-12-18 John Sullivan <sullivan@apple.com>
2350 - fixed <rdar://problem/5652380> Initial prompt shows "" for databases with no user-visible name
2352 * storage/DatabaseTracker.cpp:
2353 (WebCore::DatabaseTracker::canEstablishDatabase):
2354 pass "name" instead of "displayName" if there's no displayName
2356 2007-12-17 Dan Bernstein <mitz@apple.com>
2358 Reviewed by Maciej Stachowiak.
2360 - restore ButtonFace and ThreeDFace to their previous values for non-Mac
2361 platforms. The Mac port also uses the same values for now instead
2362 of NSColor-based ones.
2364 * rendering/RenderTheme.cpp:
2365 (WebCore::RenderTheme::systemColor):
2367 2007-12-17 Rodney Dawes <dobey@wayofthemonkey.com>
2369 Reviewed by Maciej Stachowiak.
2371 Define WTF_USE_NPOBJECT and WTF_USE_JAVASCRIPTCORE_BINDINGS for GTK+
2372 Add required Frame::createScriptInstanceForWidget to FrameGtk
2375 * page/gtk/FrameGtk.cpp (Frame::createScriptInstanceForWidget):
2377 2007-12-17 Alice Liu <alice.liu@apple.com>
2381 Fixed <rdar://5566435> window with no scrollbars can be scrolled
2383 * platform/win/ScrollViewWin.cpp:
2384 (WebCore::ScrollView::maximumScroll):
2385 corrected maximumScroll() to account for scrolling not allowed.
2386 (WebCore::ScrollView::wheelEvent):
2388 2007-12-14 Juan A. Suarez Romero <jasuarez@igalia.com>
2390 Reviewed by Alp Toker.
2392 http://bugs.webkit.org/show_bug.cgi?id=16042
2393 [GTK] Eliminate webkit_init()
2395 Move webkit initialization to WebView class init.
2399 2007-12-17 Jon Honeycutt <jhoneycutt@apple.com>
2403 <rdar://problem/5651291> REGRESSION: Flash content doesn't display
2406 We were passing NPEvent** instead of NPEvent* to NPP_HandleEvent.
2408 * plugins/win/PluginViewWin.cpp:
2409 (WebCore::PluginViewWin::dispatchNPEvent): Changed to take NPEvent&, not
2411 (WebCore::PluginViewWin::paint): Pass NPEvent, not NPEvent*
2412 (WebCore::PluginViewWin::handleKeyboardEvent): same
2413 (WebCore::PluginViewWin::handleMouseEvent): same
2414 * plugins/win/PluginViewWin.h:
2416 2007-12-17 Alexey Proskuryakov <ap@webkit.org>
2420 Live to the promise of never making AppKit special character codes visible via DOM.
2422 Test: fast/events/arrow-keys-on-body.html
2424 * page/EventHandler.cpp:
2425 (WebCore::EventHandler::keyEvent): Check for empty keypress characters after disambiguation,
2426 to let quirks-aware code strip special charactrers.
2427 * platform/mac/KeyEventMac.mm:
2428 (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): If not in keyboard event quirks
2429 mode, remove the text if it's a special character.
2431 2007-12-17 Mark Rowe <mrowe@apple.com>
2433 Reviewed by Darin Adler.
2435 Fix incorrect array size and incorrect array index in convertNSColorToColor.
2437 * rendering/RenderThemeMac.mm:
2438 (WebCore::convertNSColorToColor):
2440 2007-12-17 Darin Adler <darin@apple.com>
2442 Reviewed by Mark Rowe.
2444 - fix http://bugs.webkit.org/show_bug.cgi?id=16468
2445 REGRESSION(r28781): Crash running storage/transaction_callback_exception_crash.html
2447 * storage/DatabaseThread.cpp:
2448 (WebCore::DatabaseThread::dispatchNextTaskIdentifier): Use a RefPtr for the database
2449 because there's no guarantee it won't lose its last reference otherwise.
2451 2007-12-17 Dan Bernstein <mitz@apple.com>
2453 Reviewed by Maciej Stachowiak.
2455 - fix <rdar://problem/5333260> Some Chinese characters in Text Encoding menu are bold, others are not
2456 and <rdar://problem/5280188> Chinese text looks worse on Safari for Windows cf. Safari for Mac
2458 * platform/graphics/win/FontCacheWin.cpp:
2459 (WebCore::FontCache::getFontDataForCharacters): To ensure that font
2460 linking gives consistent results for characters that are exclusive to
2461 the simplified Chinese code page and characters that belong to that
2462 code page and other code pages, always ask to map to simplified Chinese
2465 2007-12-17 Christian Dywan <christian@twotoasts.de>
2467 Reviewed by Alp Toker.
2469 http://bugs.webkit.org/show_bug.cgi?id=16378
2470 Implement Icon for Gtk
2472 Icon provides a GdkPixbuf containing a themed icon.
2473 The icon theme is probed for an icon name according to the
2474 Icon Naming Specification or conventional Gnome icon names respectively.
2476 See http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
2478 * platform/graphics/Icon.h:
2479 * platform/graphics/gtk/IconGtk.cpp:
2480 (WebCore::Icon::~Icon):
2481 (WebCore::lookupIconName):
2482 (WebCore::Icon::newIconForFile):
2483 (WebCore::Icon::paint):
2485 2007-12-16 Sam Weinig <sam@webkit.org>
2489 Fix for http://bugs.webkit.org/show_bug.cgi?id=16466
2490 Move the JS Location object to its own file
2492 - Move Location into its own file and rename it JSLocation.
2494 * DerivedSources.make:
2496 * WebCore.vcproj/WebCore.vcproj:
2497 * WebCore.xcodeproj/project.pbxproj:
2498 * WebCoreSources.bkl:
2499 * bindings/js/JSDocumentCustom.cpp:
2500 * bindings/js/JSLocation.cpp: Copied from WebCore/bindings/js/kjs_window.cpp.
2502 (WebCore::JSLocation::JSLocation):
2503 (WebCore::JSLocation::getValueProperty):
2504 (WebCore::JSLocation::getOwnPropertySlot):
2505 (WebCore::JSLocation::put):
2506 (WebCore::JSLocationProtoFuncReplace::callAsFunction):
2507 (WebCore::JSLocationProtoFuncReload::callAsFunction):
2508 (WebCore::JSLocationProtoFuncAssign::callAsFunction):
2509 (WebCore::JSLocationProtoFuncToString::callAsFunction):
2510 * bindings/js/JSLocation.h: Copied from WebCore/bindings/js/kjs_window.h.
2511 (WebCore::JSLocation::):
2512 (WebCore::JSLocation::frame):
2513 (WebCore::JSLocation::classInfo):
2514 * bindings/js/kjs_window.cpp:
2515 (KJS::Window::location):
2516 * bindings/js/kjs_window.h:
2517 * history/CachedPage.cpp:
2519 2007-12-16 Dan Bernstein <mitz@apple.com>
2521 Reviewed by Sam Weinig.
2523 - make 'cursor: copy' and 'cursor: none' work.
2525 Already covered by manual-tests/cursor.html
2527 * rendering/RenderStyle.h: Increase the _cursor_style field to 6 bits,
2528 needed for the 33rd and 34th cursor values.
2530 2007-12-16 Mark Rowe <mrowe@apple.com>
2532 Reviewed by Maciej Stachowiak.
2534 Refactor Mac plugin stream code to use the shared NetscapePlugInStreamLoader implementation.
2537 * WebCore.xcodeproj/project.pbxproj:
2538 * loader/NetscapePlugInStreamLoader.h:
2539 * loader/mac/NetscapePlugInStreamLoaderMac.mm: Removed.
2540 * loader/mac/WebPlugInStreamLoaderDelegate.h: Moved to WebKit.
2542 2007-12-16 Sam Weinig <sam@webkit.org>
2546 Yet more of http://bugs.webkit.org/show_bug.cgi?id=16385
2549 - Move ScheduledAction into its own file and put it in the WebCore namespace.
2552 * WebCore.vcproj/WebCore.vcproj:
2553 * WebCore.xcodeproj/project.pbxproj:
2554 * WebCoreSources.bkl:
2555 * bindings/js/PausedTimeouts.cpp:
2556 * bindings/js/PausedTimeouts.h:
2557 * bindings/js/ScheduledAction.cpp: Copied from bindings/js/kjs_window.cpp.
2558 (WebCore::ScheduledAction::ScheduledAction):
2559 (WebCore::ScheduledAction::execute):
2560 * bindings/js/ScheduledAction.h: Copied from bindings/js/kjs_window.h.
2561 (WebCore::ScheduledAction::ScheduledAction):
2562 * bindings/js/kjs_window.cpp:
2563 (KJS::DOMWindowTimer::DOMWindowTimer):
2564 (KJS::DOMWindowTimer::action):
2565 (KJS::DOMWindowTimer::takeAction):
2566 (KJS::Window::installTimeout):
2567 (KJS::Window::timerFired):
2568 * bindings/js/kjs_window.h:
2570 2007-12-16 Alp Toker <alp@atoker.com>
2574 http://bugs.webkit.org/show_bug.cgi?id=16356
2575 [GTK] Integrate GStreamer video with the graphics backend
2577 Integrate the GStreamer media backend with the Cairo graphics backend.
2578 There are still some issues: Data is copied more often than necessary,
2579 and repaint() is not called, causing transformed video not to update
2583 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2584 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2585 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2586 (WebCore::MediaPlayerPrivate::currentTime):
2587 (WebCore::MediaPlayerPrivate::setEndTime):
2588 (WebCore::MediaPlayerPrivate::seeking):
2589 (WebCore::MediaPlayerPrivate::naturalSize):
2590 (WebCore::MediaPlayerPrivate::setMuted):
2591 (WebCore::MediaPlayerPrivate::setRect):
2592 (WebCore::MediaPlayerPrivate::setVisible):
2593 (WebCore::MediaPlayerPrivate::repaint):
2594 (WebCore::MediaPlayerPrivate::paint):
2595 (WebCore::MediaPlayerPrivate::createGSTPlayBin):
2596 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
2597 * platform/graphics/gtk/VideoSinkGStreamer.cpp: Added.
2598 (webkit_video_sink_base_init):
2599 (webkit_video_sink_init):
2600 (webkit_video_sink_idle_func):
2601 (webkit_video_sink_render):
2602 (webkit_video_sink_set_caps):
2603 (webkit_video_sink_dispose):
2604 (webkit_video_sink_finalize):
2605 (webkit_video_sink_set_property):
2606 (webkit_video_sink_get_property):
2607 (webkit_video_sink_stop):
2608 (webkit_video_sink_class_init):
2609 (webkit_video_sink_new):
2610 (webkit_video_sink_set_surface):
2612 * platform/graphics/gtk/VideoSinkGStreamer.h: Added.
2614 2007-12-16 Mark Rowe <mrowe@apple.com>
2618 * WebCore.xcodeproj/project.pbxproj: Remove NetscapePlugInStreamLoader.cpp from the WebCore target.
2619 Mac currently has its own implementation in NetscapePlugInStreamLoaderMac.mm which conflicts with the
2620 new shared implementation.
2622 2007-12-16 Rodney Dawes <dobey@wayofthemonkey.com>
2624 Reviewed by Maciej Stachowiak.
2626 http://bugs.webkit.org/show_bug.cgi?id=16389
2627 Bug 16389: Common Implementation of NetscapePlugInStreamLoader
2629 * WebCore.vcproj/WebCore.vcproj: Remove NetscapePlugInStreamLoaderWin.cpp.
2630 * loader/NetscapePlugInStreamLoader.cpp: Copy method implementations from NetscapePlugInStreamLoaderWin.cpp.
2631 * loader/win/NetscapePlugInStreamLoaderWin.cpp: Removed.
2633 2007-12-16 Grace Kloba <klobag@gmail.com>
2635 Reviewed by Darin Adler.
2637 Fix http://bugs.webkit.org/show_bug.cgi?id=16433.
2638 Bug 16433: LOW_BANDWIDTH_DISPLAY build is broken
2641 (WebCore::Document::Document):
2642 * loader/FrameLoader.cpp:
2643 (WebCore::FrameLoader::addLowBandwidthDisplayRequest):
2644 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2646 2007-12-16 Darin Adler <darin@apple.com>
2650 - fix <rdar://problem/5636065> First form of SQLTransaction.executeSql() fails with TYPE_ERROR dom exception
2652 Test: storage/execute-sql-args.html
2654 * bindings/js/JSSQLTransactionCustom.cpp:
2655 (WebCore::JSSQLTransaction::executeSql): Added exception handling code so that once an
2656 exception happens, we won't try to do any more argument processing. Changed processing
2657 of the second argument so that we allow an undefined value or null, and simply omit the
2658 array. Changed processing of the second argument so that we don't require an actual
2659 JavaScript array. Instead, as with the JavaScript array operations themselves, we use
2660 the length property and corresponding numeric properties of the object, allowing other
2661 objects to act as arrays. Changed processing of the third and fourth arguments to
2662 allow the undefined value as well as null; we check the value of the argument rather
2663 than looking at the size of the passed-in arguments list.
2665 2007-12-16 Sam Weinig <sam@webkit.org>
2669 More of http://bugs.webkit.org/show_bug.cgi?id=16385
2672 - Move PausedTimeouts into its own file and put it in the WebCore namespace.
2675 * WebCore.vcproj/WebCore.vcproj:
2676 * WebCore.xcodeproj/project.pbxproj:
2677 * WebCoreSources.bkl:
2678 * bindings/js/PausedTimeouts.cpp: Copied from bindings/js/kjs_window.cpp.
2679 * bindings/js/PausedTimeouts.h: Copied from bindings/js/kjs_window.h.
2680 * bindings/js/kjs_window.cpp:
2681 (KJS::Window::pauseTimeouts):
2682 * bindings/js/kjs_window.h:
2683 * history/CachedPage.cpp:
2684 * history/CachedPage.h:
2687 2007-12-16 Beth Dakin <bdakin@apple.com>
2691 Make relative-size SVGs work in border-image.
2693 * rendering/RenderBox.cpp:
2694 (WebCore::RenderBox::calculateBackgroundSize):
2695 * rendering/RenderObject.cpp:
2696 (WebCore::RenderObject::paintBorderImage):
2698 2007-12-16 Darin Adler <darin@apple.com>
2700 - fix Tiger build (my fault it was broken)
2702 * rendering/RenderThemeMac.mm: Define NSUInteger if on Tiger.
2704 2007-12-16 Andrew Wellington <proton@wiretapped.net>
2708 http://bugs.webkit.org/show_bug.cgi?id=6129
2709 Incomplete implementation of CSS 2.1 system colors
2711 Test: fast/css/css2-system-color.html
2713 Based on original patch by Rob Buis.
2715 System colors are retrieved from NSColor as appropriate. If the color is a pattern color
2716 (and therefore NSColor won't let us retrieve a color from it) we draw a 1x1 image of the
2717 color and sample that to get a solid color.
2719 * css/CSSStyleSelector.cpp:
2721 (WebCore::colorForCSSValue):
2722 * rendering/RenderTheme.cpp:
2723 (WebCore::RenderTheme::systemColor):
2724 * rendering/RenderTheme.h:
2725 * rendering/RenderThemeMac.h:
2726 * rendering/RenderThemeMac.mm:
2727 (WebCore::getSystemColor):
2728 (WebCore::RenderThemeMac::platformColorsDidChange):
2729 (WebCore::RenderThemeMac::systemColor):
2731 2007-12-16 Dan Bernstein <mitz@apple.com>
2733 Reviewed by Darin Adler.
2735 - fix http://bugs.webkit.org/show_bug.cgi?id=16426
2736 Divs with overflow:auto: scrollbars not correctly updated when contents change
2738 Test: fast/overflow/scrollbar-position-update.html
2740 * platform/mac/PlatformScrollBarMac.mm:
2741 (WebCore::PlatformScrollbar::updateThumbProportion): Update the
2742 NSScroller's value for the new proportions.
2743 * rendering/RenderLayer.cpp:
2744 (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed unnecessary
2745 repaint(). Scrollbars repaint themselves as needed.
2747 2007-12-16 Alexey Proskuryakov <ap@webkit.org>
2751 http://bugs.webkit.org/show_bug.cgi?id=14140
2752 <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly
2754 * dom/KeyboardEvent.h:
2755 (WebCore::KeypressCommand::KeypressCommand):
2756 (WebCore::KeyboardEvent::keypressCommands):
2757 Change stored command class to preserve complete information about commands.
2759 * editing/EditorCommand.cpp: (WebCore::CommandEntry::): Mark InsertText as a text insertion
2760 command, which it is. Previously, we couldn't do it because WebKit didn't really treat insertText:
2763 * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Copy commands saved while interpreting
2764 a keydown event into keypress, to avoid losing state when running interpretKeyEvents: again.
2766 2007-12-16 Alexey Proskuryakov <ap@webkit.org>
2770 http://bugs.webkit.org/show_bug.cgi?id=16462
2771 REGRESSION: access keys broken on Windows
2773 * page/EventHandler.cpp:
2774 (WebCore::EventHandler::handleAccessKey):
2775 (WebCore::EventHandler::keyEvent):
2776 * page/EventHandler.h:
2777 Make handleAccessKey a class method; rely on WebKit to call it on Windows and wxWidgets.
2779 2007-12-16 Xan Lopez <xan@gnome.org>
2781 Reviewed by Alexey Proskuryakov.
2783 http://bugs.webkit.org/show_bug.cgi?id=16454
2784 [GTK] Text input doesn't work consistently on PPC
2786 * platform/gtk/KeyEventGtk.cpp:
2787 (WebCore::singleCharacterString):
2789 UChar is 2 bytes (UTF-16), so transform accordingly from
2790 gunichar (UCS-4). Fixes keyboard input on big endian systems.
2792 2007-12-15 Darin Adler <darin@apple.com>
2794 Reviewed by Mark Rowe.
2796 - better build fix for the problem affecting GTK and some other platforms
2797 "this time for sure"
2799 * WebCore.xcodeproj/project.pbxproj:
2800 * bindings/js/JSEventTargetBase.cpp: Move the include of the .lut.h file here.
2801 * bindings/js/JSEventTargetBase.h: Instead of including the .lut.h file in the header,
2802 which won't work, declare the tables that are in the .lut.h file in the header.
2804 2007-12-12 Kevin Watters <kevin@dotsyntax.com>
2806 Reviewed by Darin Adler.
2808 Fixed the Wx port's FontPlatformData for use in HashTable.
2809 - FontPlatformData(Deleted) made unequal to FontPlatformData()
2811 * platform/graphics/wx/FontPlatformData
2813 2007-12-15 Dan Bernstein <mitz@apple.com>
2815 Reviewed by Darin Adler.
2817 - fix <rdar://problem/5636090> Text in Georgia, Armenian, Inuktitut, Cree, or Cherokee (KA, HY, IU, CR, CHR) draws as all missing glyphs
2819 * platform/graphics/win/FontCacheWin.cpp:
2820 (WebCore::metaFileEnumProc): Added. Called during metafile record
2821 enumeration and extracts the font from the create font record.
2822 (WebCore::FontCache::getFontDataForCharacters): If font linking fails,
2823 let Uniscribe draw the characters and see what font it chooses.
2825 2007-12-15 Darin Adler <darin@apple.com>
2827 * WebCore.pro: Roll my last change out. Was wrong and didn't fix the build.
2829 2007-12-15 Darin Adler <darin@apple.com>
2831 Another try at a GTK build fix.
2833 * WebCore.pro: Add JSEventTargetBase.cpp to LUT_TABLE_FILES instead of LUT_FILES.
2835 2007-12-15 Sam Weinig <sam@webkit.org>
2837 Force windows to regenerate COM DOM bindings.
2839 * WebCore.vcproj/build-generated-files.sh: Add license.
2840 * bindings/scripts/CodeGeneratorCOM.pm: Use shared WK_ucfirst.
2842 2007-12-15 Sam Weinig <sam@webkit.org>
2844 Fix Windows and wx builds.
2846 * WebCore.vcproj/WebCore.vcproj:
2847 * WebCoreSources.bkl:
2849 2007-12-15 Mark Rowe <mrowe@apple.com>
2851 Gtk build fix. Add JSEventTargetBase.cpp to SOURCES.
2855 2007-12-15 Sam Weinig <sam@webkit.org>
2859 * WebCoreSources.bkl:
2861 2007-12-15 Nikolas Zimmermann <zimmermann@kde.org>
2863 Not reviewed. Build fix for Qt/Gtk.
2865 * WebCore.pro: Include JSEventTargetBase.lut.h in generation
2867 2007-12-15 Nikolas Zimmermann <zimmermann@kde.org>
2871 Fixes: http://bugs.webkit.org/show_bug.cgi?id=16445 (Refactor EventTargetNode & JSEventTargetNode for an upcoming SVG patch)
2873 Split up JSEventTargetNode in JSEventTargetNode & JSEventTargetBase - where most functionality has been moved down
2874 in the base class. Applied the same refactorization to EventTargetNode.
2876 This makes it possible for the upcoming patch implementing the EventTarget interface for SVGElementInstance
2877 to share as much code as possible with the EventTargetNode classes.
2879 * DerivedSources.make:
2880 * WebCore.xcodeproj/project.pbxproj:
2881 * bindings/js/JSEventTargetBase.cpp: Added.
2882 (WebCore::retrieveEventTargetAndCorrespondingNode):
2883 (WebCore::eventNameForPropertyToken):
2884 * bindings/js/JSEventTargetBase.h: Added.
2885 (WebCore::JSEventTargetProperties::):
2886 (WebCore::JSEventTargetPrototypeFunctionBase::JSEventTargetPrototypeFunctionBase):
2887 (WebCore::JSEventTargetPrototypeFunction::JSEventTargetPrototypeFunction):
2889 (WebCore::::create):
2890 (WebCore::JSEventTargetBase::JSEventTargetBase):
2891 (WebCore::JSEventTargetBase::getValueProperty):
2892 (WebCore::JSEventTargetBase::putValueProperty):
2893 (WebCore::JSEventTargetBase::getOwnPropertySlot):
2894 (WebCore::JSEventTargetBase::put):
2895 (WebCore::JSEventTargetPrototype::JSEventTargetPrototype):
2896 (WebCore::JSEventTargetPrototype::self):
2897 (WebCore::JSEventTargetPrototype::getOwnPropertySlot):
2898 (WebCore::JSEventTargetPrototype::classInfo):
2899 * bindings/js/JSEventTargetNode.cpp:
2900 (WebCore::JSEventTargetNode::getOwnPropertySlot):
2901 (WebCore::JSEventTargetNode::getValueProperty):
2902 (WebCore::JSEventTargetNode::put):
2903 (WebCore::JSEventTargetNode::putValueProperty):
2904 (WebCore::JSEventTargetNode::setListener):
2905 (WebCore::toEventTargetNode):
2906 * bindings/js/JSEventTargetNode.h:
2907 (WebCore::JSEventTargetPrototypeInformation::prototypeClassName):
2908 (WebCore::JSEventTargetPrototypeInformation::prototypeIdentifier):
2909 * dom/EventTarget.cpp:
2910 (WebCore::EventTarget::addEventListener):
2911 (WebCore::EventTarget::removeEventListener):
2912 (WebCore::EventTarget::dispatchGenericEvent):
2913 (WebCore::EventTarget::removeAllEventListeners):
2914 (WebCore::EventTarget::insertedIntoDocument):
2915 (WebCore::EventTarget::removedFromDocument):
2916 (WebCore::EventTarget::handleLocalEvents):
2917 (WebCore::EventTarget::applySVGEventTargetRules):
2918 (WebCore::forbidEventDispatch):
2919 (WebCore::allowEventDispatch):
2920 (WebCore::eventDispatchForbidden):
2921 * dom/EventTarget.h:
2922 (WebCore::EventTarget::preDispatchEventHandler):
2923 (WebCore::EventTarget::postDispatchEventHandler):
2924 (WebCore::forbidEventDispatch):
2925 (WebCore::allowEventDispatch):
2926 * dom/EventTargetNode.cpp:
2927 (WebCore::EventTargetNode::~EventTargetNode):
2928 (WebCore::EventTargetNode::insertedIntoDocument):
2929 (WebCore::EventTargetNode::removedFromDocument):
2930 (WebCore::EventTargetNode::addEventListener):
2931 (WebCore::EventTargetNode::removeEventListener):
2932 (WebCore::EventTargetNode::removeAllEventListeners):
2933 (WebCore::EventTargetNode::handleLocalEvents):
2934 (WebCore::EventTargetNode::dispatchEvent):
2935 (WebCore::EventTargetNode::dispatchWindowEvent):
2936 * dom/EventTargetNode.h:
2937 (WebCore::EventTargetNode::localEventListeners):
2938 * svg/SVGElement.cpp:
2939 (WebCore::SVGElement::sendSVGLoadEventIfPossible):
2940 (WebCore::SVGElement::dispatchEvent):
2942 2007-12-15 Eric Seidel <eric@webkit.org>
2946 Width of SVG elements not applied to container elements
2947 http://bugs.webkit.org/show_bug.cgi?id=16305
2948 Added calcPrefWidths for RenderSVGRoot (copied from RenderReplaced)
2949 This is caused by poor factoring in the render tree. RenderContainer probably should be a template.
2951 svg/css/css-box-min-width.html
2953 * rendering/RenderSVGRoot.cpp:
2954 (WebCore::RenderSVGRoot::calcPrefWidths): Added.
2955 * rendering/RenderSVGRoot.h:
2956 * css/SVGCSSStyleSelector::applySVGProperty: fixed ASSERT in debug builds
2958 2007-12-15 David Kilzer <ddkilzer@apple.com>
2960 Fix comment after isSafeScript() was renamed to allowsAccessFrom().
2962 * bindings/js/kjs_window.cpp:
2963 (KJS::createWindow):
2965 2007-12-15 Alp Toker <alp@atoker.com>
2967 Reviewed by Mark Rowe.
2969 http://bugs.webkit.org/show_bug.cgi?id=16449
2970 cairo_arc() functions hang or crash when passed inf as radius or start/end angle
2972 Add checks. This matches a similar workaround for a CG bug in the CG
2973 graphics backend: <rdar://problem/5189233>
2976 fast/canvas/arc-crash.html
2977 fast/canvas/canvas-with-incorrect-args.html
2979 * platform/graphics/cairo/PathCairo.cpp:
2980 (WebCore::Path::addArc):
2982 2007-12-15 Alexey Proskuryakov <ap@webkit.org>
2986 http://bugs.webkit.org/show_bug.cgi?id=16078
2987 Google Maps zooming via the scroll wheel (almost) always zooms IN only.
2989 * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent):
2990 Ensure that delta is never rounded down to zero - we are getting values less than 1 from
2991 many mice on OS X, and Google Maps code assumes scrolling up if event.wheelDelta is zero.
2993 2007-12-14 Dan Bernstein <mitz@apple.com>
2997 * WebCore.vcproj/WebCore.vcproj:
2999 2007-12-14 Alp Toker <alp@atoker.com>
3001 GTK+/Qt build fix. Track added files in r28722.
3005 2007-12-14 Sam Weinig <sam@webkit.org>
3009 Speed up getElementByClassName.
3010 - This makes getElementByClassName 33% faster on the stress test
3011 linked to at http://bugs.webkit.org/show_bug.cgi?id=15760.
3013 * platform/text/StringImpl.cpp:
3014 (WebCore::StringImpl::foldCase): Optimize the case when all the characters are ASCII.
3016 2007-12-14 Alp Toker <alp@atoker.com>
3020 http://bugs.webkit.org/show_bug.cgi?id=16432
3021 [GTK] Update license headers
3023 Consent has been given by the authors of these files to change license
3024 to the LGPL as outlined in the bug report.
3026 * platform/gtk/ClipboardGtk.cpp:
3027 * platform/gtk/ContextMenuGtk.cpp:
3028 * platform/gtk/ContextMenuItemGtk.cpp:
3029 * platform/gtk/CookieJarGtk.cpp:
3030 * platform/gtk/CursorGtk.cpp:
3031 * platform/gtk/DragDataGtk.cpp:
3032 * platform/gtk/DragImageGtk.cpp:
3033 * platform/gtk/PasteboardGtk.cpp:
3034 * platform/gtk/PlatformScreenGtk.cpp:
3035 * platform/gtk/PlatformScrollBarGtk.cpp:
3036 * platform/gtk/SearchPopupMenuGtk.cpp:
3037 * platform/gtk/WidgetGtk.cpp:
3039 2007-12-14 Darin Adler <darin@apple.com>
3043 - fix http://bugs.webkit.org/show_bug.cgi?id=16442
3044 navigation policy delegate gets called twice for each load
3046 * loader/MainResourceLoader.cpp:
3047 (WebCore::MainResourceLoader::willSendRequest): Removed call to checkNavigationPolicy.
3048 That's handled by FrameLoader.
3050 * loader/MainResourceLoader.h: Removed callContinueAfterNavigationPolicy
3051 and continueAfterNavigationPolicy.
3053 2007-12-14 Anders Carlsson <andersca@apple.com>
3057 Make document.open count as committing a document load, so that -[WebFrame dataSource:] won't
3058 return nil in that case.
3060 * loader/FrameLoader.cpp:
3061 (WebCore::FrameLoader::didExplicitOpen):
3063 2007-12-14 David Smith <catfish.man@gmail.com>
3067 - fix http://bugs.webkit.org/show_bug.cgi?id=14955
3068 Implement getElementsByClassName.
3070 This patch also renames AtomicStringList to ClassNames to better reflect its actual use,
3071 and takes advantage of admitting that it's class-specific to encapsulate class attribute
3072 parsing so it can be shared. It also changes the class to use a Vector, rather than a linked
3073 list to store the class names.
3075 Tests: fast/dom/getElementsByClassName/001.html
3076 fast/dom/getElementsByClassName/002.html
3077 fast/dom/getElementsByClassName/003.html
3078 fast/dom/getElementsByClassName/004.html
3079 fast/dom/getElementsByClassName/005.html
3080 fast/dom/getElementsByClassName/006.html
3081 fast/dom/getElementsByClassName/007.html
3082 fast/dom/getElementsByClassName/008.html
3083 fast/dom/getElementsByClassName/009.html
3084 fast/dom/getElementsByClassName/010.xml
3085 fast/dom/getElementsByClassName/011.xml
3086 fast/dom/getElementsByClassName/012.html
3087 fast/dom/getElementsByClassName/013.html
3088 fast/dom/getElementsByClassName/014.html
3089 fast/dom/getElementsByClassName/array/001.html
3090 fast/dom/getElementsByClassName/array/002.html
3091 fast/dom/getElementsByClassName/array/003.html
3092 fast/dom/getElementsByClassName/array/004.html
3093 fast/dom/getElementsByClassName/dumpNodeList.html
3095 * WebCore.xcodeproj/project.pbxproj:
3096 * css/CSSStyleSelector.cpp:
3097 (WebCore::CSSStyleSelector::matchRules):
3098 (WebCore::CSSStyleSelector::checkOneSelector):
3099 * dom/AtomicStringList.h: Removed.
3100 * dom/ClassNames.cpp: Added.
3101 (WebCore::ClassNames::contains):
3102 (WebCore::ClassNames::parseClassAttribute):
3103 * dom/ClassNames.h: Copied from WebCore/dom/AtomicStringList.h.
3104 (WebCore::ClassNames::ClassNames):
3105 (WebCore::ClassNames::size):
3106 (WebCore::ClassNames::clear):
3107 (WebCore::ClassNames::operator[]):
3108 (WebCore::isClassWhitespace):
3109 * dom/ClassNodeList.cpp: Added.
3110 (WebCore::ClassNodeList::ClassNodeList):
3111 (WebCore::ClassNodeList::length):
3112 (WebCore::ClassNodeList::item):
3113 (WebCore::ClassNodeList::nodeMatches):
3114 * dom/ClassNodeList.h: Added.
3116 (WebCore::Document::getElementsByName):
3117 (WebCore::Document::getElementsByClassName):
3121 (WebCore::Element::getClassNames):
3122 (WebCore::Element::getElementsByClassName):
3125 * dom/NameNodeList.cpp:
3126 (WebCore::NameNodeList::NameNodeList):
3127 (WebCore::NameNodeList::item):
3128 (WebCore::NameNodeList::nodeMatches):
3129 * dom/NameNodeList.h:
3130 * dom/NamedMappedAttrMap.cpp:
3131 (WebCore::NamedMappedAttrMap::clearAttributes):
3132 (WebCore::NamedMappedAttrMap::parseClassAttribute):
3133 * dom/NamedMappedAttrMap.h:
3134 (WebCore::NamedMappedAttrMap::getClassNames):
3135 * dom/StyledElement.cpp:
3136 (WebCore::StyledElement::getClassNames):
3137 * dom/StyledElement.h:
3139 2007-12-14 Darin Adler <darin@apple.com>
3143 - fix http://bugs.webkit.org/show_bug.cgi?id=16351
3144 FontFallbackList.h doesn't include wtf/PassRefPtr.h
3146 * platform/graphics/FontFallbackList.h: Added include of <wtf/Forward.h>
3147 * platform/graphics/GlyphPageTreeNode.h: Removed an unneeded include.
3149 2007-12-14 Darin Adler <darin@apple.com>
3153 - http://bugs.webkit.org/show_bug.cgi?id=16420
3154 change regression tests to use document.execCommand instead of textInputController.doCommand
3156 Add a few more operations to document.execCommand.
3158 Finished up the transition to the new Editor::Command, including removing
3159 the Editor::execCommand function.
3161 * WebCore.base.exp: Added Editor::Command::isSupported.
3162 * editing/Editor.h: Removed execCommand.
3163 * editing/EditorCommand.cpp:
3164 (WebCore::expandSelectionToGranularity): Added.
3165 (WebCore::verticalScrollDistance): Added; replaces canScroll.
3166 (WebCore::executeDeleteBackward): Added. Moved code here from WebHTMLView.
3167 (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter): Ditto.
3168 (WebCore::executeDeleteForward): Ditto.
3169 (WebCore::executeDeleteToBeginningOfLine): Ditto.
3170 (WebCore::executeDeleteToBeginningOfParagraph): Ditto.
3171 (WebCore::executeDeleteToEndOfLine): Ditto.
3172 (WebCore::executeDeleteToEndOfParagraph): Ditto.
3173 (WebCore::executeMovePageDown): Renamed this command to be consistent with all the other
3174 Move commands. They all modify the caret. Reimplemented to match the Mac OS X version by
3175 removing the explicit scrolling, and letting it be done automatically by code that makes
3176 the caret visible. In some cases the old code would scroll twice which was harmless but
3178 (WebCore::executeMovePageDownAndModifySelection): Added. Moved code here from WebHTMLView.
3179 (WebCore::executeMovePageUp): See MovePageDown above.
3180 (WebCore::executeMovePageUpAndModifySelection): Added. Moved code here from WebHTMLView.
3181 (WebCore::executeSelectLine): Ditto.
3182 (WebCore::executeSelectParagraph): Ditto.
3183 (WebCore::executeSelectSentence): Ditto.
3184 (WebCore::executeSelectWord): Ditto.
3185 (WebCore::executeSwapWithMark): Some small tweaks.
3187 * page/ContextMenuController.cpp:
3188 (WebCore::ContextMenuController::contextMenuItemSelected): Changed to use Editor::command()
3189 instead of Editor::execCommand(). This code could be changed to use Editor::Command quite a
3190 bit more, but I didn't do that this time.
3192 - Removed some obsolete unused code.
3194 * page/mac/EventHandlerMac.mm:
3195 (WebCore::EventHandler::passMouseDownEventToWidget): Removed the special case code for
3196 NSTextView. This was left over from when we used NSTextField and NSTextView for form
3197 elements and is no longer used at all.
3199 * page/mac/WebCoreFrameBridge.h: Removed 20 unused methods that were still on one side
3200 of the bridge or another. We really need to find a time to tear down the rest of the
3201 bridge, but that's not this patch.
3203 * page/mac/WebCoreFrameBridge.mm:
3204 (-[WebCoreFrameBridge addData:]): Changed to get at the _shouldCreateRenderers field directly
3205 instead of using a method.
3206 (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
3207 Took out obsolete comment about matching enums (we use a single enum now and have for some
3209 (-[WebCoreFrameBridge selectionGranularity]): Ditto.
3211 2007-12-14 Justin Garcia <justin.garcia@apple.com>
3213 Reviewed by Darin Adler.
3215 <rdar://problem/5575101> GoogleDocs: Hang in SplitElementCommand::doApply when outdenting a list item in a particular list
3217 * editing/CompositeEditCommand.cpp:
3218 (WebCore::CompositeEditCommand::splitTreeToNode): Moved here.
3219 * editing/CompositeEditCommand.h:
3220 * editing/IndentOutdentCommand.cpp: Moved splitTreeToNode.
3221 * editing/IndentOutdentCommand.h: Ditto, and removed unimplemented splitTreeTo.
3222 * editing/InsertListCommand.cpp:
3223 (WebCore::InsertListCommand::doApply): Split ancestors of listChildNode between
3224 it and listNode, if they exists, so that moving listChildNode doesn't put it out
3225 of order. Added a test case to cover each change.
3226 * editing/SplitElementCommand.cpp:
3227 (WebCore::SplitElementCommand::doApply): Added an ASSERT to catch code that
3228 tries to split a container at a bogus child, and an early return to avoid a
3231 2007-12-14 Anders Carlsson <andersca@apple.com>
3233 Reviewed by Darin and Geoff.
3235 <rdar://problem/5619295>
3236 REGRESSION: 303-304: Embedded YouTube video fails to render- JS errors (16150) (Flash 9)
3238 _NPN_CreateScriptObject doesn't take an origin root object anymore.
3240 * html/HTMLPlugInElement.cpp:
3241 (WebCore::HTMLPlugInElement::createNPObject):
3243 (WebCore::Frame::windowScriptNPObject):
3245 2007-12-14 Dan Bernstein <mitz@apple.com>
3247 Reviewed by Darin Adler.
3249 - fix <rdar://problem/5643663> text-shadow and box-shadow offsets 1px smaller than specified
3250 which is the root cause of:
3251 http://bugs.webkit.org/show_bug.cgi?id=12943
3252 box-shadow: small values don't affect shadow position
3253 http://bugs.webkit.org/show_bug.cgi?id=14736
3254 Safari implementation of text-shadow off by 1px
3256 * platform/graphics/cg/GraphicsContextCG.cpp:
3257 (WebCore::GraphicsContext::setShadow): Slightly increase the magnitude
3258 of the offsets passed to CGContextSetShadow* to ensure that the end
3259 result after truncation is the desired integer offsets.
3261 2007-12-13 Alp Toker <alp@atoker.com>
3263 curl backend build fix for breakage introduced in r28709.
3265 * platform/network/ResourceHandleInternal.h:
3266 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3268 2007-12-13 Justin Garcia <justin.garcia@apple.com>
3270 Reviewed by Oliver Hunt.
3272 <rdar://problem/5607069> In Mail, a crash occurs at WebCore::AppendNodeCommand() after dragging image into a <FORM> element
3274 * editing/InsertLineBreakCommand.cpp:
3275 (WebCore::InsertLineBreakCommand::shouldUseBreakElement): Equip this function to
3276 handle editing positions, like [input, 0];
3277 * editing/InsertParagraphSeparatorCommand.cpp:
3278 (WebCore::InsertParagraphSeparatorCommand::doApply): Pass enclosingBlock a node peeled
3279 off of a non-editing position, to fix a bug where the enclosing block of [input, 0] was
3280 the input element itself.
3281 Insert a <br> when a <form> element is the enclosing block instead of splitting/cloning or
3284 2007-12-13 Alp Toker <alp@atoker.com>
3286 Reviewed by Oliver Hunt.
3288 http://bugs.webkit.org/show_bug.cgi?id=16365
3289 [cURL] Acid2 test segmentation fault
3291 This patch makes the Acid2 test pass.
3293 Defer the cleanup of cancelled jobs and halt further transfer as early
3296 Bug found by and initial patch provided by Luca Bruno.
3298 * platform/network/curl/ResourceHandleManager.cpp:
3299 (WebCore::writeCallback):
3300 (WebCore::headerCallback):
3301 (WebCore::ResourceHandleManager::downloadTimerCallback):
3302 (WebCore::ResourceHandleManager::cancel):
3304 2007-12-13 Sam Weinig <sam@webkit.org>
3306 Reviewed by Mark Rowe.
3308 Fix typos and rename InspectorController::moveByUnrestricted to InspectorController::moveWindowBy.
3310 * page/InspectorController.cpp:
3311 (WebCore::moveByUnrestricted):
3312 (WebCore::InspectorController::windowScriptObjectAvailable):
3313 (WebCore::InspectorController::moveWindowBy):
3314 * page/InspectorController.h:
3315 * page/inspector/inspector.js:
3317 2007-12-13 Dan Bernstein <mitz@apple.com>
3319 Reviewed by Dave Hyatt.
3321 - fix <rdar://problem/5642426> explicit cubic-bezier curves all treated as "default" for transition-timing-function
3323 Test: fast/css/transition-timing-function.html
3325 * css/CSSStyleSelector.cpp: Changed the HANDLE_MULTILAYER_VALUE macro to
3326 not reject non-primitive non-list values, and instead made sure that the
3327 mapping functions rejected them if necessary. This allows non-primitive
3328 timing functions to be mapped.
3329 (WebCore::CSSStyleSelector::mapBackgroundAttachment):
3330 (WebCore::CSSStyleSelector::mapBackgroundClip):
3331 (WebCore::CSSStyleSelector::mapBackgroundComposite):
3332 (WebCore::CSSStyleSelector::mapBackgroundOrigin):
3333 (WebCore::CSSStyleSelector::mapBackgroundImage):
3334 (WebCore::CSSStyleSelector::mapBackgroundRepeat):
3335 (WebCore::CSSStyleSelector::mapBackgroundXPosition):
3336 (WebCore::CSSStyleSelector::mapBackgroundYPosition):
3337 (WebCore::CSSStyleSelector::mapTransitionDuration):
3338 (WebCore::CSSStyleSelector::mapTransitionRepeatCount):
3339 (WebCore::CSSStyleSelector::mapTransitionTimingFunction):
3340 (WebCore::CSSStyleSelector::mapTransitionProperty):
3341 * css/CSSTimingFunctionValue.cpp:
3342 (WebCore::CSSTimingFunctionValue::cssText): Implemented for use in the
3344 * css/CSSTimingFunctionValue.h:
3345 (WebCore::CSSTimingFunctionValue::isTransitionTimingFunctionValue):
3346 Added. Returns true.
3348 (WebCore::CSSValue::isTransitionTimingFunctionValue): Added. Returns
3351 2007-12-13 Steve Falkenburg <sfalken@apple.com>
3353 Move source file generation into its own vcproj to fix build dependencies.
3357 * WebCore.vcproj/WebCore.make:
3358 * WebCore.vcproj/WebCore.sln:
3359 * WebCore.vcproj/WebCore.submit.sln:
3360 * WebCore.vcproj/WebCore.vcproj:
3361 * WebCore.vcproj/WebCoreGenerated.vcproj: Added.
3363 2007-12-13 Justin Garcia <justin.garcia@apple.com>
3365 Reviewed by Oliver Hunt.
3367 <rdar://problem/4145786> Undoing a color change of text in a compose window always changes it back to black
3369 Some of the operations performed in removeHTMLFontStyle were non-undoable.
3371 I'm having trouble writing a layout test for this because I can't get DRT to
3372 perform editing operations in separate Undo steps without adding unacceptably long
3373 wait times between operations. I filed:
3375 <rdar://problem/5646779> Can't get DRT to perform editing operations in separate Undo steps
3377 * editing/ApplyStyleCommand.cpp:
3378 (WebCore::ApplyStyleCommand::removeHTMLFontStyle):
3380 2007-12-13 Sam Weinig <sam@webkit.org>
3384 Fix for http://bugs.webkit.org/show_bug.cgi?id=16352
3385 Toolbar dragged inspector cannot be moved beyond screen edges
3387 * page/InspectorController.cpp:
3388 (WebCore::moveByUnrestricted):
3389 (WebCore::InspectorController::windowScriptObjectAvailable):
3390 (WebCore::InspectorController::moveByUnrestricted):
3391 * page/InspectorController.h:
3392 * page/inspector/inspector.js:
3394 2007-12-13 Adam Roben <aroben@apple.com>
3396 Fix <rdar://5517707> Crash on wptv.wp.pl when "make bigger" button is clicked
3398 Windows Media Player has a modal message loop that will deliver
3399 messages to us at inappropriate times and we will crash if we handle
3400 them when they are delivered. In PluginViewWin, we add a quirk for
3401 Media Player to set a flag whenever we give the plugin a chance to
3402 execute code, and in SharedTimerWin we check if the plugin is
3403 executing code and repost messages if so.
3407 * platform/win/SharedTimerWin.cpp:
3408 (WebCore::TimerWindowWndProc): Repost messages if we're calling a
3410 * plugins/win/PluginViewWin.cpp: Surround all calls to the plugin with
3411 setCallingPlugin(true/false).
3412 (WebCore::PluginViewWin::updateWindow):
3413 (WebCore::PluginViewWin::dispatchNPEvent):
3414 (WebCore::PluginViewWin::setNPWindowRect):
3415 (WebCore::PluginViewWin::start):
3416 (WebCore::PluginViewWin::stop):
3417 (WebCore::PluginViewWin::performRequest):
3418 (WebCore::PluginViewWin::bindingInstance):
3419 (WebCore::PluginViewWin::determineQuirks):
3420 (WebCore::PluginViewWin::setCallingPlugin): Added.
3421 (WebCore::PluginViewWin::isCallingPlugin): Added.
3422 * plugins/win/PluginViewWin.h: Added a new quirk.
3424 2007-12-13 Alp Toker <alp@atoker.com>
3426 Add a missing DEPENDPATH. Fixes non-clean builds following networking
3431 2007-12-13 Dan Bernstein <mitz@apple.com>
3433 Reviewed by Anders Carlsson.
3435 - fix regression in fast/text/international/bidi-override on Tiger
3437 * platform/graphics/GlyphPageTreeNode.cpp:
3438 (WebCore::GlyphPageTreeNode::initializePage): Add bidi overrides here
3439 too. I forgot to add them when I added them to treatAsZeroWidthSpace in
3442 2007-12-13 Justin Garcia <justin.garcia@apple.com>
3444 Reviewed by Darin Adler.
3446 <rdar://problem/5601583> GMail Editor: Copied link doesn't paste as a link, just colored text
3448 The code that checks the selected Range to see if it's inside an anchor
3449 checks ancestors of the Range's commonAncestor() but not the
3450 commonAncestor() itself, and so we'd fail to add markup for the enclosing
3451 anchor to the pasteboard.
3453 Some enclosing element getters check the node passed to the getter and some
3454 don't. There were a few places where we incorrectly assumed that enclosing
3455 element getters check the node passed to the getter, but this is the only
3456 case that I'm able to write a test case for at the moment.
3459 Changed enclosingNodeWithType and enclosingNodeWithTag to take in positions,
3460 like the newer enclosing element getters. This is important because we must
3461 soon add code to the getters so that they understand that some editing positions
3462 inside nodes don't actually refer to positions inside those nodes but positions
3463 before and after them. Like [table, 0].
3464 Changed enclosingNodeWithType and enclosingNodeWithTag to check nodes starting with
3465 n where [n, o] is the position passed to the getter, instead of starting the the parent
3466 of n. This makes all but a few of the enclosing element getters behave consistently.
3467 Changed enclosingNodeWithType and enclosingNodeWithTag to not return non-editable
3468 nodes if the input position was editable. This fixes a bug that that the above change
3470 Changed enclosingTableCell to simply call enclosingNodeWithType. We should do
3471 this for the rest of the getters, or simply remove them in favor of enclosingNodeWithType
3472 unless doing so would affect readability, like it would in the case of enclosingTableCell.
3473 Ditto for enclosingBlock.
3475 * editing/AppendNodeCommand.cpp:
3476 (WebCore::AppendNodeCommand::doApply):
3477 * editing/DeleteButtonController.cpp:
3478 (WebCore::enclosingDeletableElement):
3479 * editing/DeleteSelectionCommand.cpp:
3480 (WebCore::DeleteSelectionCommand::initializePositionData):
3481 (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor):
3482 * editing/Editor.cpp:
3483 (WebCore::Editor::selectionUnorderedListState):
3484 (WebCore::Editor::selectionOrderedListState):
3485 * editing/IndentOutdentCommand.cpp:
3486 (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
3487 (WebCore::IndentOutdentCommand::outdentParagraph):
3488 * editing/InsertNodeBeforeCommand.cpp:
3489 (WebCore::InsertNodeBeforeCommand::doApply):
3490 * editing/InsertParagraphSeparatorCommand.cpp:
3491 (WebCore::InsertParagraphSeparatorCommand::doApply):
3492 * editing/ReplaceSelectionCommand.cpp:
3493 (WebCore::ReplaceSelectionCommand::shouldMerge):
3494 (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
3495 (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
3496 * editing/TextIterator.cpp:
3497 * editing/htmlediting.cpp:
3498 (WebCore::enclosingBlock):
3499 (WebCore::enclosingNodeWithTag):
3500 (WebCore::enclosingNodeOfType):
3501 (WebCore::enclosingTableCell):
3502 (WebCore::isTableCell):
3503 * editing/htmlediting.h:
3504 * editing/markup.cpp:
3505 (WebCore::appendStartMarkup):
3506 (WebCore::createMarkup):
3508 2007-12-13 Alexey Proskuryakov <ap@webkit.org>
3512 Turn on keyboard event processing quirks for feed views and old applications on Mac OS X.
3515 * dom/KeyboardEvent.cpp:
3516 (WebCore::KeyboardEvent::charCode):
3517 * page/EventHandler.cpp:
3518 (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
3519 (WebCore::EventHandler::keyEvent):
3520 * page/EventHandler.h:
3521 * page/Settings.cpp:
3522 (WebCore::Settings::Settings):
3523 (WebCore::Settings::setNeedsKeyboardEventDisambiguationQuirks):
3525 (WebCore::Settings::needsKeyboardEventDisambiguationQuirks):
3526 * page/mac/EventHandlerMac.mm:
3527 (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
3528 * platform/PlatformKeyboardEvent.h:
3529 * platform/mac/KeyEventMac.mm:
3530 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3531 (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
3533 2007-12-13 Dan Bernstein <mitz@apple.com>
3537 * platform/network/cf/ResourceErrorCF.cpp:
3539 2007-12-13 Antti Koivisto <antti@apple.com>
3541 Reviewed by Tim Hatcher.
3543 Fix <rdar://problem/5605674>
3544 Make <video> display WebKit context menu instead of the QTKit one.
3546 It doesn't really matter where the QTMovieView is.
3549 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3550 (WebCore::MediaPlayerPrivate::createQTMovieView):
3551 (WebCore::MediaPlayerPrivate::setRect):
3553 2007-12-13 Dan Bernstein <mitz@apple.com>
3555 Reviewed by Adam Roben.
3557 - ensure that Unicode bidi control characters are rendered as zero width
3560 Test: fast/text/international/bidi-control-chars-treated-as-ZWS.html
3562 * platform/graphics/Font.h:
3563 (WebCore::Font::treatAsZeroWidthSpace):
3564 * platform/graphics/GlyphPageTreeNode.cpp:
3565 (WebCore::GlyphPageTreeNode::initializePage):
3566 * platform/text/CharacterNames.h:
3568 2007-12-13 Brady Eidson <beidson@apple.com>
3572 * platform/wx/TemporaryLinkStubs.cpp:
3574 2007-12-12 Brady Eidson <beidson@apple.com>
3578 * platform/gtk/TemporaryLinkStubs.cpp:
3580 2007-12-12 Brady Eidson <beidson@apple.com>
3585 * history/qt/CachedPageQt.cpp: Removed. Whole purpose for this method being platform-specific has been removed
3587 2007-12-12 Brady Eidson <beidson@apple.com>