1 2007-03-19 Mitz Pettel <mitz@webkit.org>
5 - fix http://bugs.webkit.org/show_bug.cgi?id=13117
6 REGRESSION (r14658): Flickering text fields when updating via javascript
9 (WebCore::Frame::forceLayout): Added a flag to allow partial relayout.
11 * page/mac/WebCoreFrameBridge.mm:
12 (-[WebCoreFrameBridge forceLayoutAdjustingViewSize:]): Allow partial relayout
13 if not adjusting view size.
14 (-[WebCoreFrameBridge needsLayout]): Changed to check for pending subtree
15 layout instead of just whether the root needs layout.
17 2007-03-18 Nikolas Zimmermann <zimmermann@kde.org>
21 Make JS function calls on POD-types (ie. SVGLength) take effect.
22 Calling ie. newValueInSpecifiedUnits on SVGLength works as expected.
24 This worked fine before we switched to SVGLength POD type, so this
25 can be considered as P1 regression fix.
27 Partly fix svg/hixie/dynamic/005-broken.svg. We match Opera now though
28 it's not yet completly fixed. Setting baseVal attribute on SVGAnimatedString
29 doesn't work as expected - needs a seperated fix.
31 * bindings/scripts/CodeGeneratorJS.pm:
33 2007-03-19 Adele Peterson <adele@apple.com>
37 Adding comments and a little cleanup from my last checkin.
39 * html/HTMLSelectElement.cpp:
40 (WebCore::HTMLSelectElement::setSelectedIndex): Removed commented out assert. Added comment about how we use onChange.
41 (WebCore::HTMLSelectElement::selectAll): Added comment about how we use saveLastSelection and onChange.
42 (WebCore::HTMLSelectElement::dispatchFocusEvent): ditto.
43 (WebCore::HTMLSelectElement::dispatchBlurEvent): ditto.
44 (WebCore::HTMLSelectElement::menuListDefaultEventHandler): ditto.
45 (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto.
46 (WebCore::HTMLSelectElement::menuListOnChange): Added assert that usesMenuList() is true.
47 (WebCore::HTMLSelectElement::listBoxOnChange): Added assert that usesMenuList() is false.
48 (WebCore::HTMLSelectElement::saveLastSelection): Added early return for menu lists.
50 2007-03-19 Mitz Pettel <mitz@webkit.org>
52 Reviewed by Tim Hatcher.
54 - fix http://bugs.webkit.org/show_bug.cgi?id=13091
55 REGRESSION (r20075): Wrong text style and pixel break in Apple Store Locator HUD
57 Test: fast/innerHTML/additional-inline-style.html
60 (WebCore::startMarkup): Changed to add inline style based on CSS rules only
61 in AnnotateForInterchange mode.
63 2007-03-19 Zack Rusin <zrusin@trolltech.com>
67 * platform/qt/ScrollViewQt.cpp:
68 (WebCore::ScrollView::update):
70 2007-03-19 Adam Roben <aroben@apple.com>
72 Reviewed by Hyatt and Maciej.
74 Renamed WebCoreJavaScript to JavaScriptStatistics and made it C++ as
75 part of <rdar://problem/5071653>.
77 All layout tests pass.
79 * WebCore.exp: Updated.
80 * WebCore.xcodeproj/project.pbxproj: Updated.
81 * bridge/JavaScriptStatistics.cpp: Moved from
82 bridge/mac/WebCoreJavaScript.mm, and converted to C++.
84 (WebCore::JavaScriptStatistics::objectCount):
85 (WebCore::JavaScriptStatistics::interpreterCount):
86 (WebCore::JavaScriptStatistics::protectedObjectCount):
87 (WebCore::JavaScriptStatistics::rootObjectTypeCounts):
88 (WebCore::JavaScriptStatistics::garbageCollect):
89 (WebCore::JavaScriptStatistics::garbageCollectOnAlternateThread):
90 (WebCore::JavaScriptStatistics::shouldPrintExceptions):
91 (WebCore::JavaScriptStatistics::setShouldPrintExceptions):
92 * bridge/JavaScriptStatistics.h: Added.
93 * bridge/mac/WebCoreJavaScript.h: Removed.
94 * bridge/mac/WebCoreJavaScript.mm: Removed.
96 2007-03-18 Maciej Stachowiak <mjs@apple.com>
100 - avoid static construction (and global variable access) in a smarter, more portable way,
101 to later enable MUTLI_THREAD mode to work on other platforms and compilers.
103 * bindings/js/JSCustomXPathNSResolver.cpp:
104 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
105 * bindings/js/JSHTMLInputElementBase.cpp:
106 (WebCore::JSHTMLInputElementBaseFunction::JSHTMLInputElementBaseFunction):
107 * bindings/js/JSHTMLOptionElementConstructor.cpp:
108 (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
109 * bindings/js/JSXMLHttpRequest.cpp:
110 (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
111 * bindings/js/JSXSLTProcessor.cpp:
112 (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
113 * bindings/js/kjs_dom.cpp:
114 (KJS::DOMNamedNodeMap::getOwnPropertySlot):
115 (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
116 * bindings/js/kjs_events.cpp:
117 (KJS::JSAbstractEventListener::handleEvent):
118 * bindings/js/kjs_html.cpp:
119 (KJS::HTMLElementFunction::HTMLElementFunction):
120 (KJS::JSHTMLCollection::getOwnPropertySlot):
121 * bindings/js/kjs_window.cpp:
122 (KJS::ScheduledAction::execute):
123 * bindings/objc/WebScriptObject.mm:
124 * bindings/scripts/CodeGeneratorJS.pm:
126 2007-03-18 Andrew Wellington <proton@wiretapped.net>
128 Reviewed by Mark Rowe
130 Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html)
132 * WebCore.xcodeproj/project.pbxproj:
134 2007-03-18 David Hyatt <hyatt@apple.com>
136 Fix for REGRESSION bug 13108, frame borders being painted when they shouldn't be. Rework both frame borders
137 and resizing to be more like other browsers.
141 fast/frames/no-frame-borders.html
143 * html/HTMLFrameElement.cpp:
144 (WebCore::HTMLFrameElement::HTMLFrameElement):
145 (WebCore::HTMLFrameElement::attach):
146 (WebCore::HTMLFrameElement::parseMappedAttribute):
147 * html/HTMLFrameElement.h:
148 (WebCore::HTMLFrameElement::hasFrameBorder):
149 * html/HTMLFrameElementBase.cpp:
150 (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
151 (WebCore::HTMLFrameElementBase::parseMappedAttribute):
152 * html/HTMLFrameElementBase.h:
153 * html/HTMLFrameSetElement.cpp:
154 (WebCore::HTMLFrameSetElement::attach):
155 * html/HTMLFrameSetElement.h:
156 (WebCore::HTMLFrameSetElement::hasFrameBorder):
157 * html/HTMLIFrameElement.cpp:
158 (WebCore::HTMLIFrameElement::HTMLIFrameElement):
159 * rendering/RenderFrame.cpp:
160 (WebCore::RenderFrame::edgeInfo):
161 * rendering/RenderFrame.h:
162 * rendering/RenderFrameSet.cpp:
163 (WebCore::RenderFrameSet::paint):
164 (WebCore::RenderFrameSet::GridAxis::resize):
165 (WebCore::RenderFrameSet::fillFromEdgeInfo):
166 (WebCore::RenderFrameSet::computeEdgeInfo):
167 (WebCore::RenderFrameSet::edgeInfo):
168 (WebCore::RenderFrameSet::layout):
169 (WebCore::RenderFrameSet::startResizing):
170 (WebCore::RenderFrameSet::continueResizing):
171 (WebCore::RenderFrameSet::canResizeRow):
172 (WebCore::RenderFrameSet::canResizeColumn):
173 (WebCore::RenderFrameSet::splitPosition):
174 (WebCore::RenderFrameSet::hitTestSplit):
175 (WebCore::RenderFrameSet::dump):
176 * rendering/RenderFrameSet.h:
178 (WebCore::FrameEdgeInfo::FrameEdgeInfo):
179 (WebCore::FrameEdgeInfo::preventResize):
180 (WebCore::FrameEdgeInfo::allowBorder):
181 (WebCore::FrameEdgeInfo::setPreventResize):
182 (WebCore::FrameEdgeInfo::setAllowBorder):
184 2007-03-19 Mark Rowe <mrowe@apple.com>
186 Rubber-stamped by Brady.
188 Update references to bugzilla.opendarwin.org with bugs.webkit.org.
191 * WebCore.vcproj/WebCore/build-generated-files.sh:
192 * manual-tests/ATSU-bad-layout.html:
193 * manual-tests/accidental-strict-mode.html:
194 * manual-tests/applet-param-no-name.html:
195 * manual-tests/bidi-parens.html:
196 * manual-tests/bugzilla-3855.html:
197 * manual-tests/bugzilla-4840.html:
198 * manual-tests/bugzilla-6821.html:
199 * manual-tests/containing-block-position-chage.html:
200 * manual-tests/contenteditable-link.html:
201 * manual-tests/css3-cursor-fallback-quirks.html:
202 * manual-tests/css3-cursor-fallback-strict.html:
203 * manual-tests/custom-cursors.html:
204 * manual-tests/dictionary-scrolled-iframe.html:
205 * manual-tests/dom-manipulation-on-resize.html:
206 * manual-tests/drag-image-to-address-bar.html:
207 * manual-tests/empty-link-target.html:
208 * manual-tests/empty-title-popup.html:
209 * manual-tests/first-line-style-crash.html:
210 * manual-tests/invalid-mouse-event.html:
211 * manual-tests/left-overflow-repaint.html:
212 * manual-tests/linkjump-3.html:
213 * manual-tests/log-keypress-events.html:
214 * manual-tests/named-window-blank-target.html:
215 * manual-tests/plain-text-paste.html:
216 * manual-tests/plugin-controller-datasource.html:
217 * manual-tests/pre-tab-selection-rect.html:
218 * manual-tests/redirection-target.html:
219 * manual-tests/redraw-page-cache-visited-links.html:
220 * manual-tests/reset-initiatedDrag.html:
221 * manual-tests/resources/named-window-blank-target-step2.html:
222 * manual-tests/resources/named-window-blank-target-step3.html:
223 * manual-tests/resources/named-window-blank-target-step4.html:
224 * manual-tests/resources/redraw-page-cache-visited-links-2.html:
225 * manual-tests/scrollbar-hittest.html:
226 * manual-tests/scrollbar-hittest2.html:
227 * manual-tests/subview-click-assertion.html:
228 * manual-tests/tabbing-input-google.html:
229 * manual-tests/text-field-autoscroll.html:
230 * manual-tests/textarea-after-stylesheet-link.html:
231 * manual-tests/textarea-focus.html:
232 * manual-tests/whitespace-pre-affinity.html:
234 2007-03-18 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
236 Not reviewed - gdk build fix.
238 * platform/gdk/ScrollViewGdk.cpp:
239 (WebCore::ScrollView::update): add a stub
241 2007-03-18 Brady Eidson <beidson@apple.com>
245 http://bugs.webkit.org/show_bug.cgi?id=13111
246 When stopped a load before it completes, partial images become the
250 (WebCore::Loader::didFail): Split off into a method that knows the
251 difference between failed and cancelled. If a load is cancelled,
252 don't call error() on the object - only remove it from the cache
253 (WebCore::Loader::cancelRequests): Call didFail(loader, true)
254 * loader/loader.h: Added didFail(SubresourceLoader*, bool cancelled)
256 2007-03-18 Mitz Pettel <mitz@webkit.org>
260 - fix http://bugs.webkit.org/show_bug.cgi?id=13101
261 REGRESSION (NativeTextField): Specifying word-wrap:break-word makes text field wrap
263 Test: fast/forms/input-text-word-wrap.html
265 * rendering/RenderTextControl.cpp:
266 (WebCore::RenderTextControl::createInnerTextStyle): Force the inner block to
269 2007-03-18 Dan Waylonis <waylonis@mac.com>
271 Reviewed by Tim Hatcher.
273 Fix http://bugs.webkit.org/show_bug.cgi?id=13005
274 Bug 13005: WebScriptObject +throwException needs NULL check.
276 Add checking for NULL interpreter before throwing exception.
278 * bindings/objc/WebScriptObject.mm:
279 (+[WebScriptObject throwException:]):
281 2007-03-18 Geoffrey Garen <ggaren@apple.com>
283 Reviewed by Oliver Hunt.
285 Fixed http://bugs.webkit.org/show_bug.cgi?id=13106
286 REGRESSION: Incomplete document.all implementation breaks abtelectronics.com
287 (Style Change Through JavaScript Blanks Content)
289 When indexing into collections, treat the empty string as an invalid argument,
290 instead of the number 0.
292 * bindings/js/kjs_html.cpp:
293 (KJS::JSHTMLCollection::getOwnPropertySlot):
294 (KJS::JSHTMLCollection::callAsFunction):
295 (KJS::JSHTMLCollectionPrototypeFunction::callAsFunction):
297 2007-03-18 David Hyatt <hyatt@apple.com>
299 Use fillRect instead of drawLine, since drawLine has some odd behavior (it's only used for borders).
303 * platform/graphics/IntRect.h:
304 * rendering/RenderFrameSet.cpp:
305 (WebCore::RenderFrameSet::paintColumnBorder):
306 (WebCore::RenderFrameSet::paintRowBorder):
308 2007-03-18 David Hyatt <hyatt@apple.com>
310 Change the frameborder color to be light gray for framesets.
314 * rendering/RenderFrameSet.cpp:
315 (WebCore::borderFillColor):
316 (WebCore::RenderFrameSet::paintColumnBorder):
317 (WebCore::RenderFrameSet::paintRowBorder):
319 2007-03-18 David Hyatt <hyatt@apple.com>
321 Make iframes work properly with frameborder="0".
325 * html/HTMLIFrameElement.cpp:
326 (WebCore::HTMLIFrameElement::mapToEntry):
327 (WebCore::HTMLIFrameElement::parseMappedAttribute):
329 2007-03-18 David Hyatt <hyatt@apple.com>
331 Add a 2px border by default to <iframe>s for compatibility with other browsers.
337 2007-03-18 David Hyatt <hyatt@apple.com>
339 Move frame borders out of WebKit and into WebCore.
341 Reviewed by aroben, olliej
343 * bridge/mac/FrameViewMac.mm:
345 * html/HTMLFrameSetElement.cpp:
346 (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
347 (WebCore::HTMLFrameSetElement::mapToEntry):
348 (WebCore::HTMLFrameSetElement::parseMappedAttribute):
349 (WebCore::HTMLFrameSetElement::attach):
350 * html/HTMLFrameSetElement.h:
351 (WebCore::HTMLFrameSetElement::hasBorderColor):
352 * page/FrameView.cpp:
353 (WebCore::FrameViewPrivate::FrameViewPrivate):
355 * page/mac/WebCoreFrameBridge.h:
356 * platform/graphics/IntRect.h:
357 (WebCore::IntRect::topLeft):
358 (WebCore::IntRect::topRight):
359 (WebCore::IntRect::bottomLeft):
360 (WebCore::IntRect::bottomRight):
361 * rendering/RenderFrame.cpp:
362 (WebCore::RenderFrame::viewCleared):
363 * rendering/RenderFrameSet.cpp:
364 (WebCore::borderStartEdgeColor):
365 (WebCore::borderEndEdgeColor):
366 (WebCore::RenderFrameSet::paintColumnBorder):
367 (WebCore::RenderFrameSet::paintRowBorder):
368 (WebCore::RenderFrameSet::paint):
369 * rendering/RenderFrameSet.h:
370 * rendering/RenderPartObject.cpp:
371 (WebCore::RenderPartObject::viewCleared):
372 * rendering/RenderView.cpp:
373 (WebCore::RenderView::repaintViewRectangle):
375 2007-03-17 David Hyatt <hyatt@apple.com>
377 Make onload do an explicit paint when a top-level document is ready (to ensure that a first paint always
378 happens before any timers set by the onload can fire).
383 (WebCore::Document::implicitClose):
384 * platform/ScrollView.h:
385 * platform/mac/ScrollViewMac.mm:
386 (WebCore::ScrollView::update):
388 2007-03-17 Dave Hyatt <hyatt@apple.com>
390 Prevent starvation of user input and painting when processing timers.
391 If we are already in the processing of a custom timer message, don't allow that
392 processing to do another PostMessage. Force SetTimer to be used instead.
396 * platform/win/SharedTimerWin.cpp:
397 (WebCore::TimerWindowWndProc):
398 (WebCore::setSharedTimerFireTime):
400 2007-03-17 Geoffrey Garen <ggaren@apple.com>
402 Reviewed by Beth Dakin.
404 Fixed <rdar://problem/5070967> REGRESSION (r20211): Repro crash when
405 closing View Source window
407 I award myself 0 points, and may God have mercy on my soul.
409 * bindings/js/kjs_proxy.cpp:
410 (WebCore::KJSProxy::~KJSProxy):
412 2007-03-17 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
414 Not reviewed - gdk build fix.
416 * platform/gdk/TemporaryLinkStubs.cpp:
417 (Pasteboard::writeURL):
419 2007-03-17 David Hyatt <hyatt@apple.com>
421 Fix tiny PLT regression. Don't examine the border/background data for RenderImage when images change
422 unless we actually have a border/background.
426 * rendering/RenderImage.cpp:
427 (WebCore::RenderImage::imageChanged):
429 2007-03-17 Nikolas Zimmermann <zimmermann@kde.org>
431 Reviewed by Sam Weinig.
433 Fixes: http://bugs.webkit.org/show_bug.cgi?id=13046 (CSS styles on hover and focus are broken for <use>)
434 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12838 (SVG <use> CSS styles broken)
435 Added test: svg/custom/use-css-events.svg
437 In general this fixes the peepo.co.uk website.
439 Forgot to pass the actual StyleChange to the recalcStyle() function,
440 when calling it on the shadow tree root element.
442 * ksvg2/svg/SVGUseElement.cpp:
443 (WebCore::SVGUseElement::recalcStyle):
445 2007-03-17 Timothy Hatcher <timothy@apple.com>
447 Reviewed by Mark Rowe.
449 Made Version.xcconfig smarter when building for different configurations.
450 Now uses the 522+ OpenSource version for Debug and Release, while using the
451 full 522.4 version for Production builds. The system prefix is also computed
452 based on the current system, so 4522.4 on Tiger and 5522.4 on Leopard.
454 * Configurations/Version.xcconfig:
455 * Configurations/WebCore.xcconfig:
457 2007-03-17 Antti Koivisto <antti@apple.com>
461 Fix http://bugs.webkit.org/show_bug.cgi?id=12595
462 REGRESSION: Can't add item to cart at lnt.com (JS type error)
463 <rdar://problem/4722863>
465 Emulate Firefox behavior where form elements accessed by a name
466 can be accessed with that name later even if the name changes or
467 even if element is removed from the document.
469 This is loosely based on Darin's earlier patch for the same problem but
470 is much less expansive. It takes somewhat different approach to more closely
471 mimic Firefox behavior. Includes expanded test case.
473 * bindings/js/JSHTMLFormElementCustom.cpp:
474 (WebCore::JSHTMLFormElement::canGetItemsForName):
475 Use new the HTMLFormElement::getNamedElements() method
476 (WebCore::JSHTMLFormElement::nameGetter):
477 Use new the HTMLFormElement::getNamedElements() method
478 * html/HTMLFormElement.cpp:
479 (WebCore::HTMLFormElement::HTMLFormElement):
480 (WebCore::HTMLFormElement::~HTMLFormElement):
481 (WebCore::HTMLFormElement::elementForAlias):
482 (WebCore::HTMLFormElement::addElementAlias):
483 Maintain a map of known element aliases
484 (WebCore::HTMLFormElement::getNamedElements):
485 Get a list of elements matching the name, based both their
486 current names and known aliases (earlier names).
487 Keep the alias list in sync.
488 * html/HTMLFormElement.h:
490 2007-03-17 Adele Peterson <adele@apple.com>
494 Fix for <rdar://problem/4990050> REGRESSION: onchange gets fired when clicking on a programmatically selected element in a listbox
495 http://bugs.webkit.org/show_bug.cgi?id=12725
497 Test: updated fast/forms/listbox-onchange.html
499 Added HTMLSelectElement::saveLastSelection that is called before changing a selection that could result
500 in onChange being called. m_lastOnChangeIndex and m_lastOnChangeSelection no longer have to be up-to date all the time,
501 they just have to be up-to-date before we execute an action that may trigger onChange.
503 * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::setSelectedState): Added.
504 The HTMLSelectElement will only set an option's selected state with this method. This ensures
505 that notifyOptionSelected won't get called when the call originates from the select element.
506 * html/HTMLOptionElement.h:
508 * html/HTMLSelectElement.cpp:
509 (WebCore::HTMLSelectElement::deselectItems): Calls setSelectedState.
510 (WebCore::HTMLSelectElement::setSelectedIndex): ditto. Don't update the last selection variables here. Scroll to the new selection.
511 The scrolling call used to only be in notifyOptionSelected. There's no reason we shouldn't scroll when the selection is set through
512 the HTMLSelectElement.
513 (WebCore::HTMLSelectElement::setValue): Call setSelectedIndex to update all options selected state.
514 (WebCore::HTMLSelectElement::restoreState): Call setSelectedState.
515 (WebCore::HTMLSelectElement::selectAll): Call saveLastSelection before making the selection, and calling onChange.
516 (WebCore::HTMLSelectElement::recalcListItems): Call setSelectedState. Don't need to save selection here anymore,
517 since it will get saved before we call onChange.
518 (WebCore::HTMLSelectElement::reset): ditto.
519 (WebCore::HTMLSelectElement::dispatchFocusEvent): Added. Call saveLastSelection for menu lists, since onChange can be fired
521 (WebCore::HTMLSelectElement::dispatchBlurEvent): Call menuListOnChange.
522 (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Call saveLastSelection before showing the popup window.
523 (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Call saveLastSelection during mousedown (to prepare for an
524 onchange during mouseup, or after autoscroll).
525 (WebCore::HTMLSelectElement::updateListBoxSelection): Call setSelectedState.
527 (WebCore::HTMLSelectElement::menuListOnChange): Added. Compares the m_lastOnChangeIndex to the selectedIndex().
528 (WebCore::HTMLSelectElement::listBoxOnChange): Move the m_lastOnChangeSelection creation to saveLastSelection.
529 (WebCore::HTMLSelectElement::saveLastSelection): Added. Sets m_lastOnChangeIndex or m_lastOnChangeSelection.
530 * html/HTMLSelectElement.h:
531 * platform/PopupMenu.h:
533 2007-03-16 Oliver Hunt <oliver@apple.com>
537 The old canSaveAsWebArchive call was necessary as stand alone
538 images used to be rendered by ImageDocument.
540 Fixes rdar://problem/5061252
544 (WebCore::Clipboard::setDragHasStarted):
546 (WebCore::DragClient::declareAndWriteDragImage):
547 * platform/mac/ClipboardMac.mm:
548 (WebCore::ClipboardMac::declareAndWriteDragImage):
550 2007-03-16 Anders Carlsson <acarlsson@apple.com>
554 <rdar://problem/4869095>
555 default content type changed for XMLHttpRequest POSTs changed (breaks Flickrator 0.1 widget)
557 * xml/xmlhttprequest.cpp:
558 (WebCore::XMLHttpRequest::send):
560 2007-03-16 Brady Eidson <beidson@apple.com>
562 Rubberstamped by Tim Hatcher
564 Update the hash table header for Window object properties
566 * bindings/js/kjs_window.cpp:
568 2007-03-16 Brady Eidson <beidson@apple.com>
572 <rdar://problem/5061826> and
573 http://bugs.webkit.org/show_bug.cgi?id=12863
574 Implement window.stop()
576 * bindings/js/kjs_window.cpp:
577 (KJS::WindowFunc::callAsFunction): Add case Window::Stop
578 * bindings/js/kjs_window.h:
579 (KJS::Window::): Add "Stop"
581 2007-03-16 Geoffrey Garen <ggaren@apple.com>
583 Reviewed by Brady Eidson.
585 Fixed dir creation to account for already existing dirs and missing leading
588 * loader/icon/IconDatabase.cpp:
589 (WebCore::makeAllDirectories):
591 2007-03-16 David Hyatt <hyatt@apple.com>
593 Fix for 13084, assertion failure in the Cache. Convert the client list
594 to a HashCountedSet so that multiple refs and derefs are allowed.
596 Fix RenderImage so that if it has the same image used as a background/border
597 and as the foreground that it will repaint properly (can be tested using
598 border-image and a foreground image).
600 Optimize list marker so that it doesn't waste time in the base class method,
601 since list markers don't support background or border images.
606 * loader/CachedResource.cpp:
607 (WebCore::CachedResource::ref):
608 * loader/CachedResource.h:
609 * loader/CachedResourceClientWalker.cpp:
610 (WebCore::CachedResourceClientWalker::CachedResourceClientWalker):
611 * loader/CachedResourceClientWalker.h:
612 * rendering/RenderImage.cpp:
613 (WebCore::RenderImage::imageChanged):
614 * rendering/RenderListMarker.cpp:
615 (WebCore::RenderListMarker::imageChanged):
617 2007-03-16 Geoffrey Garen <ggaren@apple.com>
619 Reviewed by Anders Carlsson.
621 Fixed <rdar://problem/5065399> REGRESSION: leaks in Frame::bindingRootObject
624 The problem was that we were initializing the same WebScriptObject twice.
625 This caused it to leak its original set of ivars.
627 I think some refactoring could prevent this situation from arising in the
628 first place, but I'm just adding a check at the call site for now, to do
631 * bindings/objc/WebScriptObject.mm:
632 (-[WebScriptObject _setImp:originRootObject:rootObject:]): Added ASSERTs
633 against multiple calls.
635 * bindings/objc/WebScriptObjectPrivate.h: Renamed _initializeWithObjectImp
636 to setImp because "init" vs "initialize" was a too subtle indication that
637 one was a Cocoa initializer and one was not.
639 2007-03-16 Lars Knoll <lars@trolltech.com>
641 don't use #import in .cpp files.
643 * editing/qt/EditorQt.cpp:
645 2007-03-16 Lars Knoll <lars@trolltech.com>
647 Fix the Qt build once again.
649 * platform/qt/PasteboardQt.cpp:
650 (WebCore::Pasteboard::Pasteboard):
651 (WebCore::Pasteboard::writeSelection):
652 (WebCore::Pasteboard::plainText):
653 (WebCore::Pasteboard::documentFragment):
654 (WebCore::Pasteboard::writeURL):
655 (WebCore::Pasteboard::writeImage):
656 (WebCore::Pasteboard::clear):
658 2007-03-15 Shrikant Gangoda <shrikant.gangoda@celunite.com>
662 * loader/gdk/FrameLoaderClientGdk.cpp:
663 (WebCore::FrameLoaderClientGdk::blockedError):
664 * loader/gdk/FrameLoaderClientGdk.h:
666 2007-03-15 Beth Dakin <bdakin@apple.com>
670 Fix for http://bugs.webkit.org/show_bug.cgi?id=13088 REGRESSION
671 (r19761-19779): Copy image no longer includes image address
674 writeURL() does not need an isImage parameter. Now that it accepts
675 the types as a parameter, we can just declare the appropriate image
676 types within writeImage and send them to writeURL(). Also,
677 declaring the types twice is what broke this.
679 * platform/Pasteboard.h:
680 * platform/mac/PasteboardMac.mm:
681 (WebCore::Pasteboard::writeURL):
682 (WebCore::Pasteboard::writeImage):
684 2007-03-15 Adele Peterson <adele@apple.com>
686 Reviewed by Kevin Decker.
688 Fix for <rdar://problem/4926179> Text in menulist control should never update if menu is open
690 * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
691 Only setTextFromOption if the menu isn't visible.
693 2007-03-15 Brady Eidson <beidson@apple.com>
697 A few platform specific tweaks
699 * platform/cf/RetainPtr.h:
700 (WebCore::RetainPtr::releaseRef): Fixed releaseRef to work with CF
702 * platform/network/ResourceHandle.h: Added a "releaseRef" style call
704 2007-03-15 Maciej Stachowiak <mjs@apple.com>
706 Reviewed by Geoff and Steve.
708 * config.h: Remove unneeded hack.
710 2007-03-15 Justin Garcia <justin.garcia@apple.com>
714 <rdar://problem/5062376>
715 REGRESSION: In Mail and Gmail, can't change alignment to text after it has been applied
717 Bring back the remove step in applyBlockStyle. It's
718 necessary because addBlockStyleIfNeeded assumes that
719 the properties it adds aren't already on the block that
722 * editing/ApplyStyleCommand.cpp:
723 (WebCore::ApplyStyleCommand::applyBlockStyle):
724 Bring back the remove step (added a testcase).
725 Don't do the add step if m_removeOnly is true (no testcase
726 because there aren't any clients using removeOnly functionality
727 to remove styles yet, only styled elemets).
728 Moved the code for creating new blocks up one level
729 to this function so that we can pass blocks to removeCSSStyle.
730 When converting VisiblePositions to indices and vice versa,
731 use the highest node in the shadow tree if we're in one as
732 the scope (working on a testcase).
733 (WebCore::ApplyStyleCommand::addBlockStyle): Moved code to
735 * editing/ApplyStyleCommand.h:
737 2007-03-15 Brady Eidson <beidson@apple.com>
741 <rdar://problem/4429701>
742 Implements a port blocking black list that matches Firefox's
744 * loader/FrameLoader.cpp:
745 (WebCore::FrameLoader::blockedError): Call through to the client for blockedError
746 * loader/FrameLoader.h:
748 * loader/FrameLoaderClient.h: Get the "port blocked" error for the current platform
750 * loader/ResourceLoader.cpp:
751 (WebCore::ResourceLoader::wasBlocked): ResourceHandleClient method to pass on the didFail(error)
752 (WebCore::ResourceLoader::blockedError): Following the pattern of "CancelledError()", get the
753 error to fail with for the didFail() call
754 * loader/ResourceLoader.h:
756 * platform/graphics/svg/SVGImageEmptyClients.h:
757 (WebCore::SVGEmptyFrameLoaderClient::blockedError): Added stub
759 * platform/network/ResourceHandle.cpp:
760 (WebCore::ResourceHandle::create): If the port is blocked, create the handle but schedule it for
761 deferred failure on a timer
762 (WebCore::ResourceHandle::scheduleBlockedFailure): Do the timer scheduling
763 (WebCore::ResourceHandle::fireBlockedFailure): Fire the timer here
764 (WebCore::ResourceHandle::portAllowed): Implements checking of Mozilla's
765 * platform/network/ResourceHandle.h:
766 * platform/network/ResourceHandleClient.h:
767 (WebCore::ResourceHandleClient::wasBlocked): Virtual for clients to get the "blocked" message
769 2007-03-15 Beth Dakin <bdakin@apple.com>
773 Fix for <rdar://problem/5065396> REGRESSION: leaks in
774 RenderBlock::layoutInlineChildren seen on buildbot
776 This leak appeared after http://trac.webkit.org/projects/webkit/
777 changeset/20188. This change shifted line boxes around in
778 removeChild(). But since removeChild() calls
779 setNeedsLayoutAndMinMaxRecalc(), all of the line boxes will be
780 removed once we actually lay out anyway. So this patch fixes the
781 leak by deleting the line boxes instead of shifting them around.
783 * editing/IndentOutdentCommand.cpp:
784 (WebCore::IndentOutdentCommand::outdentParagraph): Call into
785 updateLayout(). This fixes an assertion I got in editing/
786 execCommand/4976800.html This is very similar to the line box fix I
787 made recently (http://trac.webkit.org/projects/webkit/changeset/
788 20177). We need to update layout before relying on VisiblePositions
789 after removing a node.
790 * rendering/RenderBlock.cpp:
791 (WebCore::RenderBlock::deleteLinesForBlock): New helper function
792 since this functionality is needed in three places now.
793 (WebCore::RenderBlock::makeChildrenNonInline): Call into new
794 deleteLinesForBlock().
795 (WebCore::RenderBlock::removeChild): Same.
796 * rendering/RenderBlock.h:
798 2007-03-15 Timothy Hatcher <timothy@apple.com>
802 * Factored out most of our common build settings into .xcconfig files. Anything that was common in
803 each build configuration was factored out into the shared .xcconfig file.
804 * Adds a Version.xcconfig file to define the current framework version, to be used in other places.
805 * Use the new $(BUNDLE_VERSION) (defined in Version.xcconfig) in the preprocessed Info.plist.
806 * Use the versions defined in Version.xcconfig to set $(DYLIB_CURRENT_VERSION).
808 * Configurations/Base.xcconfig: Added.
809 * Configurations/DebugRelease.xcconfig: Added.
810 * Configurations/Version.xcconfig: Added.
811 * Configurations/WebCore.xcconfig: Added.
813 * WebCore.xcodeproj/project.pbxproj:
815 2007-03-15 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
817 Not reviewed - gdk build fixes.
819 * platform/gdk/EditorClientGdk.cpp:
820 (WebCore::EditorClientGdk::handleKeypress):
821 * platform/graphics/cairo/ImageSourceCairo.cpp:
822 (WebCore::ImageSource::setData):
823 * platform/graphics/gdk/ImageGdk.cpp:
824 (WebCore::Image::loadPlatformResource):
826 2007-03-14 Justin Garcia <justin.garcia@apple.com>
830 ~2x speed up of 5k rich text paste:
831 http://shakespeare.mit.edu/hamlet/full.html
833 * editing/ReplaceSelectionCommand.cpp:
834 (WebCore::ReplaceSelectionCommand::doApply): Remove the top
835 level style span if its unnecessary before inserting
836 into the document, its faster than doing it after.
837 * editing/ReplaceSelectionCommand.h: Exposed
838 ReplacementFragment::removeNodePreservingChildren so that
839 the style span can be removed using non-undoable removes,
840 like the rest of the removes done on the ReplacementFragment.
841 * editing/markup.cpp:
842 (WebCore::createMarkup): Make the style span the top level
843 element, otherwise it's useless. This also facilitates the
844 optimization mentioned above.
845 When including markup for a fully selected root, include markup
846 for all the nodes beneath that fully selected root, to preserve
847 the structure and appearance of the copied markup. Did this
848 by merging with the code for adding markup for descendants of
849 special commonAncestorBlocks.
851 2007-03-15 Beth Dakin <bdakin@apple.com>
853 Rubber-stamped by Adele.
855 Rolling out http://trac.webkit.org/projects/webkit/changeset/20148
856 (which is a fix for http://bugs.webkit.org/show_bug.cgi?id=12595
857 and rdar://4722863) because it causes a horrible memory-trasher.
859 * bindings/js/JSHTMLFormElementCustom.cpp:
860 (WebCore::JSHTMLFormElement::canGetItemsForName):
861 (WebCore::JSHTMLFormElement::nameGetter):
862 * bindings/js/kjs_dom.cpp:
864 (KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
865 (KJS::DOMNamedNodesCollection::lengthGetter):
866 (KJS::DOMNamedNodesCollection::indexGetter):
867 (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
868 * bindings/js/kjs_dom.h:
869 (KJS::DOMNamedNodesCollection::classInfo):
870 * bindings/js/kjs_html.cpp:
871 (KJS::JSHTMLCollection::getNamedItems):
872 * dom/ChildNodeList.cpp:
873 (WebCore::ChildNodeList::ChildNodeList):
874 (WebCore::ChildNodeList::length):
875 (WebCore::ChildNodeList::item):
876 (WebCore::ChildNodeList::nodeMatches):
877 * dom/ChildNodeList.h:
878 * dom/NameNodeList.cpp:
879 (WebCore::NameNodeList::NameNodeList):
880 (WebCore::NameNodeList::item):
881 (WebCore::NameNodeList::nodeMatches):
882 * dom/NameNodeList.h:
883 (WebCore::NameNodeList::rootNodeAttributeChanged):
885 (WebCore::TagNodeList::TagNodeList):
886 (WebCore::TagNodeList::nodeMatches):
887 (WebCore::Node::registerNodeList):
888 (WebCore::Node::unregisterNodeList):
891 (WebCore::NodeList::NodeList):
892 (WebCore::NodeList::~NodeList):
893 (WebCore::NodeList::recursiveLength):
894 (WebCore::NodeList::itemForwardsFromCurrent):
895 (WebCore::NodeList::itemBackwardsFromCurrent):
896 (WebCore::NodeList::recursiveItem):
897 (WebCore::NodeList::itemWithName):
898 (WebCore::NodeList::rootNodeChildrenChanged):
900 (WebCore::NodeList::rootNodeAttributeChanged):
901 * html/HTMLFormElement.cpp:
902 (WebCore::HTMLFormElement::HTMLFormElement):
903 (WebCore::HTMLFormElement::~HTMLFormElement):
904 (WebCore::HTMLFormElement::formData):
905 (WebCore::HTMLFormElement::parseMappedAttribute):
906 (WebCore::HTMLFormElement::removeFormElement):
907 * html/HTMLFormElement.h:
908 * html/HTMLGenericFormElement.cpp:
909 (WebCore::HTMLGenericFormElement::parseMappedAttribute):
910 (WebCore::HTMLGenericFormElement::insertedIntoTree):
911 * html/HTMLGenericFormElement.h:
912 * html/HTMLInputElement.cpp:
913 (WebCore::HTMLInputElement::parseMappedAttribute):
915 2007-03-15 Geoffrey Garen <ggaren@apple.com>
917 Added an assert to help catch a bug. Hopefully someone will hit it!
919 * bindings/js/kjs_proxy.cpp:
920 (WebCore::KJSProxy::~KJSProxy):
922 2007-03-14 Oliver Hunt <oliver@apple.com>
926 Fix for rdar://problem/5061737.
928 This was a regression from the original Objective-C -> C++ conversion
929 for the drag logic. We don't need to call Range::startNode as we just
930 need the document that contains the range.
932 * page/DragController.cpp:
933 (WebCore::documentFragmentFromDragData):
935 2007-03-14 Mitz Pettel <mitz@webkit.org>
939 - http://bugs.webkit.org/show_bug.cgi?id=13071
940 REGRESSION: Plain text files no longer wrap lines longer than the width of the browser window
942 Test: fast/loader/text-document-wrapping.html
944 * loader/TextDocument.cpp:
945 (WebCore::TextTokenizer::write): Specified word-wrap:break-word for the <pre> element.
947 2007-03-14 Mitz Pettel <mitz@webkit.org>
951 - fix http://bugs.webkit.org/show_bug.cgi?id=13072
952 REGRESSION (r15617): white-space: pre-wrap breaks off the last character of a wide word
954 Test: fast/text/whitespace/pre-wrap-last-char.html
956 * rendering/bidi.cpp:
957 (WebCore::RenderBlock::findNextLineBreak): Undid the change from r15617.
959 2007-03-14 David Hyatt <hyatt@apple.com>
961 Add asserts to help catch double refs and double derefs of CachedResources.
965 * loader/CachedResource.cpp:
966 (WebCore::CachedResource::ref):
967 (WebCore::CachedResource::deref):
969 2007-03-14 Alice Liu <alice.liu@apple.com>
971 Rubber-stamped by Hyatt.
973 Adding null check to prevent the crash that happens on 2nd run of iBench HTML load test
975 * loader/icon/IconDataCache.cpp:
976 (WebCore::IconDataCache::writeToDatabase):
978 === Safari-5522.4 ===
980 2007-03-14 Adele Peterson <adele@apple.com>
984 Fix for <rdar://problem/5062898> REGRESSION: autocomplete window in text fields doesn't come up
986 When we moved the initialization of a bunch of variables in the HTMLFormElement constructor, m_autocomplete accidently got initialized to false.
988 * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::HTMLFormElement):
990 2007-03-14 Steve Falkenburg <sfalken@apple.com>
994 Added missing null check in case this is called on a subframe
995 that hasn't started loading.
998 (WebCore::Frame::setMarkedTextMatchesAreHighlighted): Check for a null document.
1000 2007-03-14 Antti Koivisto <antti@apple.com>
1004 Fix http://bugs.webkit.org/show_bug.cgi?id=13060
1005 REGRESSION: Repro ASSERT failure in Cache::adjustSize running layout tests
1008 Script evaluation may have dereffed the CachedScript object already, causing double deref and
1009 eventually m_liveResourcesSize underflow.
1011 * html/HTMLScriptElement.cpp:
1012 (WebCore::HTMLScriptElement::notifyFinished):
1014 2007-03-14 Adele Peterson <adele@apple.com>
1018 Added InsertTab, InsertBacktab, InsertLineBreak, and InsertNewline to the editing command table.
1019 Added Event parameter to execCommand, and to all of the enabled and exec functions. Right now,
1020 the event is only used by the newly added commands. But in the future, many (and possibly all) of
1021 these editing commands will need to consider the event so they are applied to the correct selection.
1024 * editing/Editor.cpp:
1025 (WebCore::execCopy):
1027 (WebCore::execDelete):
1028 (WebCore::execBackwardDelete):
1029 (WebCore::execForwardDelete):
1030 (WebCore::execMoveBackward):
1031 (WebCore::execMoveBackwardAndModifySelection):
1032 (WebCore::execMoveUpByPageAndModifyCaret):
1033 (WebCore::execMoveDown):
1034 (WebCore::execMoveDownAndModifySelection):
1035 (WebCore::execMoveForward):
1036 (WebCore::execMoveForwardAndModifySelection):
1037 (WebCore::execMoveDownByPageAndModifyCaret):
1038 (WebCore::execMoveLeft):
1039 (WebCore::execMoveLeftAndModifySelection):
1040 (WebCore::execMoveRight):
1041 (WebCore::execMoveRightAndModifySelection):
1042 (WebCore::execMoveToBeginningOfDocument):
1043 (WebCore::execMoveToBeginningOfDocumentAndModifySelection):
1044 (WebCore::execMoveToBeginningOfSentence):
1045 (WebCore::execMoveToBeginningOfSentenceAndModifySelection):
1046 (WebCore::execMoveToBeginningOfLine):
1047 (WebCore::execMoveToBeginningOfLineAndModifySelection):
1048 (WebCore::execMoveToBeginningOfParagraph):
1049 (WebCore::execMoveToBeginningOfParagraphAndModifySelection):
1050 (WebCore::execMoveToEndOfDocument):
1051 (WebCore::execMoveToEndOfDocumentAndModifySelection):
1052 (WebCore::execMoveToEndOfSentence):
1053 (WebCore::execMoveToEndOfSentenceAndModifySelection):
1054 (WebCore::execMoveToEndOfLine):
1055 (WebCore::execMoveToEndOfLineAndModifySelection):
1056 (WebCore::execMoveToEndOfParagraph):
1057 (WebCore::execMoveToEndOfParagraphAndModifySelection):
1058 (WebCore::execMoveParagraphBackwardAndModifySelection):
1059 (WebCore::execMoveParagraphForwardAndModifySelection):
1060 (WebCore::execMoveUp):
1061 (WebCore::execMoveUpAndModifySelection):
1062 (WebCore::execMoveWordBackward):
1063 (WebCore::execMoveWordBackwardAndModifySelection):
1064 (WebCore::execMoveWordForward):
1065 (WebCore::execMoveWordForwardAndModifySelection):
1066 (WebCore::execMoveWordLeft):
1067 (WebCore::execMoveWordLeftAndModifySelection):
1068 (WebCore::execMoveWordRight):
1069 (WebCore::execMoveWordRightAndModifySelection):
1070 (WebCore::execPaste):
1071 (WebCore::execSelectAll):
1072 (WebCore::execToggleBold):
1073 (WebCore::execToggleItalic):
1074 (WebCore::execRedo):
1075 (WebCore::execUndo):
1076 (WebCore::execInsertTab):
1077 (WebCore::execInsertBacktab):
1078 (WebCore::execInsertNewline):
1079 (WebCore::execInsertLineBreak):
1081 (WebCore::canPaste):
1082 (WebCore::hasEditableSelection):
1083 (WebCore::hasEditableRangeSelection):
1084 (WebCore::hasRangeSelection):
1085 (WebCore::hasRichlyEditableSelection):
1088 (WebCore::CommandEntry::):
1089 (WebCore::Editor::toggleBold):
1091 (WebCore::Editor::execCommand): Added optional event parameter.
1092 (WebCore::Editor::insertText): Added. Calls handleTextInputEvent.
1093 (WebCore::Editor::insertTextWithoutSendingTextEvent): Renamed from insertText.
1094 Performs the actual insertion without dispatching any event.
1096 * page/EventHandler.cpp: (WebCore::EventHandler::defaultTextInputEventHandler):
1097 Call insertTextWithoutSendingTextEvent.
1099 2007-03-14 Justin Garcia <justin.garcia@apple.com>
1103 ~3x speedup pasting 5k lines of rich text:
1104 http://shakespeare.mit.edu/hamlet/full.html
1105 ~2x speedup pasting 10k lines of plain text
1107 * css/CSSComputedStyleDeclaration.cpp:
1108 (WebCore::computedStyle): Added for convenience.
1109 * css/CSSComputedStyleDeclaration.h:
1110 * editing/ReplaceSelectionCommand.cpp:
1111 (WebCore::ReplaceSelectionCommand::removeRedundantStyles):
1112 The code that pushed down the top level style span had
1113 a bug in it that made it do unnecessary work. Instead of
1114 fixing the bug I removed the code because it was used to
1115 help see more redundancies in second level style spans, but
1116 createMarkup now *only* creates a top level style span.
1117 Only remove redundant styles from style spans and only remove
1118 unstyled elements if they are style spans. FF doesn't
1119 remove redundant styles from elements, or remove redundant
1120 font tags on copy/paste. We could offer this functionality
1121 through a separate "cleanup" command.
1122 * editing/markup.cpp:
1123 (WebCore::createMarkup): Only add markup for ancestors of
1124 lastClosed if we're including markup for acommonAncestorBlock
1125 (we do this for commonAncestorBlocks like tables and lists),
1126 otherwise it's unnecessary/redundant.
1128 2007-03-14 Anders Carlsson <acarlsson@apple.com>
1132 Make sure to call ResourceLoader::didReceiveData to ensure that there's a shared buffer with the resource
1133 data, since SubresourceLoaderClients now make use of that buffer.
1135 * loader/SubresourceLoader.cpp:
1136 (WebCore::SubresourceLoader::didReceiveData):
1138 2007-03-14 Administrator <acarlsson@apple.com>
1140 Get the size from the shared buffer.
1142 * platform/graphics/cg/ImageSourceCG.cpp:
1143 (WebCore::ImageSource::setData):
1144 * platform/graphics/cg/PDFDocumentImage.cpp:
1145 (WebCore::PDFDocumentImage::dataChanged):
1147 2007-03-14 Mitz Pettel <mitz@webkit.org>
1149 Reviewed by Hyatt, thumbs up by Darin.
1151 - fix http://bugs.webkit.org/show_bug.cgi?id=12782
1152 Reproducible crash in BidiContext::deref
1154 Test: fast/dynamic/anonymous-block-orphaned-lines.html
1156 * rendering/InlineBox.cpp:
1157 (WebCore::InlineBox::root): Added an assertion that we return a root inline box.
1158 * rendering/RenderBlock.cpp:
1159 (WebCore::RenderBlock::removeChild): Added code to adopt the line boxes of
1160 anonymous blocks being destroyed instead of leaving them orphaned, which
1161 is what caused this crash. The boxes will be deleted on the next layout, but
1162 this ensures consistency in the mean time.
1164 2007-03-14 Lars Knoll <lars@trolltech.com>
1169 Add a getter to SharedBuffer that returns a reference to the internal
1170 Vector to avoid an extra copy of the data.
1172 * platform/SharedBuffer.h:
1173 (WebCore::SharedBuffer::buffer):
1174 * platform/graphics/qt/ImageQt.cpp:
1175 (WebCore::Image::loadPlatformResource):
1176 * platform/graphics/qt/ImageSourceQt.cpp:
1177 (WebCore::detectImageFormat):
1178 (WebCore::createDecoder):
1179 (WebCore::ImageSource::setData):
1181 2007-03-14 Antti Koivisto <antti@apple.com>
1185 Fix <rdar://problem/5058774>
1186 REGRESSION: In Mail, caret appears oversized when typing in a To Do note
1188 Horizontal and vertical were switched. Was regression from
1189 http://trac.webkit.org/projects/webkit/changeset/20103
1191 * rendering/RootInlineBox.cpp:
1192 (WebCore::RootInlineBox::addHighlightOverflow):
1194 2007-03-14 David Hyatt <hyatt@apple.com>
1196 Tweak the data() functions of stylesheets and scripts to be internally consistent.
1198 * loader/CachedCSSStyleSheet.cpp:
1199 (WebCore::CachedCSSStyleSheet::data):
1200 * loader/CachedScript.cpp:
1201 (WebCore::CachedScript::data):
1202 * loader/CachedXSLStyleSheet.cpp:
1203 (WebCore::CachedXSLStyleSheet::data):
1205 2007-03-14 David Hyatt <hyatt@apple.com>
1209 For large animated GIFs, destroy and recreate the source for every animation frame. This keeps
1210 the memory consumption down while giant images are animating.
1212 Reviewed by andersca
1214 * platform/graphics/BitmapImage.cpp:
1215 (WebCore::BitmapImage::BitmapImage):
1216 (WebCore::BitmapImage::destroyDecodedData):
1217 (WebCore::BitmapImage::dataChanged):
1218 (WebCore::BitmapImage::advanceAnimation):
1219 * platform/graphics/BitmapImage.h:
1221 2007-03-14 David Hyatt <hyatt@apple.com>
1223 Make sure to use CFDataCreateWithBytesNoCopy where we can.
1225 Reviewed by andersca
1227 * platform/graphics/cg/ImageSourceCG.cpp:
1228 (WebCore::ImageSource::setData):
1229 * platform/graphics/cg/PDFDocumentImage.cpp:
1230 (WebCore::PDFDocumentImage::dataChanged):
1232 2007-03-13 David Hyatt <hyatt@apple.com>
1234 Fix for bugzilla bug 13050 and also radar p1 5050645.
1236 This patch reworks resource loading to avoid having redundant buffers in the icon database and in cached
1237 images in the WebCore cache. It also avoids overcopying in top-level image documents and in the icon
1240 There is now only one SharedBuffer for a resource and everybody observes that buffer now instead of ever
1241 making their own. Even ImageIO uses the SharedBuffer while decoding.
1243 The page in 13050 dropped from 145mb down to 45mb of memory use with this change for a stunning savings
1246 Reviewed by olliej, mjs
1249 * loader/CachedCSSStyleSheet.cpp:
1250 (WebCore::CachedCSSStyleSheet::data):
1251 * loader/CachedCSSStyleSheet.h:
1252 * loader/CachedImage.cpp:
1253 (WebCore::CachedImage::data):
1254 * loader/CachedImage.h:
1255 * loader/CachedResource.cpp:
1256 (WebCore::CachedResource::CachedResource):
1257 (WebCore::CachedResource::~CachedResource):
1258 * loader/CachedResource.h:
1259 (WebCore::CachedResource::data):
1260 * loader/CachedScript.cpp:
1261 (WebCore::CachedScript::data):
1262 * loader/CachedScript.h:
1263 * loader/CachedXSLStyleSheet.cpp:
1264 (WebCore::CachedXSLStyleSheet::data):
1265 * loader/CachedXSLStyleSheet.h:
1266 * loader/DocLoader.cpp:
1267 (WebCore::DocLoader::checkCacheObjectStatus):
1268 * loader/ImageDocument.cpp:
1269 (WebCore::ImageTokenizer::writeRawData):
1270 (WebCore::ImageTokenizer::finish):
1271 * loader/icon/IconDataCache.cpp:
1272 (WebCore::IconDataCache::setImageData):
1273 (WebCore::IconDataCache::writeToDatabase):
1274 * loader/icon/IconDataCache.h:
1275 * loader/icon/IconDatabase.cpp:
1276 (WebCore::IconDatabase::imageDataForIconURL):
1277 (WebCore::IconDatabase::iconForPageURL):
1278 (WebCore::IconDatabase::setIconDataForIconURL):
1279 (WebCore::IconDatabase::setHaveNoIconForIconURL):
1280 (WebCore::IconDatabase::imageDataForIconURLQuery):
1281 * loader/icon/IconDatabase.h:
1282 * loader/icon/IconLoader.cpp:
1283 (WebCore::IconLoader::startLoading):
1284 (WebCore::IconLoader::didReceiveResponse):
1285 (WebCore::IconLoader::didReceiveData):
1286 (WebCore::IconLoader::didFail):
1287 (WebCore::IconLoader::finishLoading):
1288 (WebCore::IconLoader::clearLoadingState):
1289 * loader/icon/IconLoader.h:
1290 * loader/icon/SQLStatement.cpp:
1291 (WebCore::SQLStatement::getColumnBlobAsVector):
1292 (WebCore::SQLStatement::isExpired):
1293 * loader/icon/SQLStatement.h:
1294 * loader/loader.cpp:
1295 (WebCore::Loader::didFinishLoading):
1296 (WebCore::Loader::didReceiveData):
1297 * page/mac/WebCoreFrameBridge.mm:
1298 (-[WebCoreFrameBridge getData:andResponse:forURL:]):
1299 (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
1300 * platform/SharedBuffer.h:
1301 (WebCore::SharedBuffer::isEmpty):
1302 * platform/graphics/BitmapImage.cpp:
1303 (WebCore::BitmapImage::destroyDecodedData):
1304 (WebCore::BitmapImage::dataChanged):
1305 * platform/graphics/BitmapImage.h:
1306 * platform/graphics/Image.cpp:
1307 (WebCore::Image::setData):
1308 * platform/graphics/Image.h:
1309 (WebCore::Image::dataChanged):
1310 (WebCore::Image::data):
1311 * platform/graphics/ImageSource.h:
1312 * platform/graphics/cg/ImageSourceCG.cpp:
1313 (WebCore::ImageSource::setData):
1314 * platform/graphics/cg/PDFDocumentImage.cpp:
1315 (WebCore::PDFDocumentImage::dataChanged):
1316 * platform/graphics/cg/PDFDocumentImage.h:
1317 * platform/graphics/mac/ImageMac.mm:
1318 (WebCore::Image::loadPlatformResource):
1319 * platform/graphics/svg/SVGImage.cpp:
1320 (WebCore::SVGImage::setData):
1321 * platform/mac/PasteboardMac.mm:
1322 (WebCore::fileWrapperForImage):
1324 2007-03-13 Justin Garcia <justin.garcia@apple.com>
1328 <rdar://problem/5046875>
1329 Gmail Editor: Applying alignment to selected text in message also applies alignment to signature
1331 * editing/ApplyStyleCommand.cpp:
1332 (WebCore::ApplyStyleCommand::doApply): Don't call applyBlockStyle unless
1333 there is a block style to apply.
1334 (WebCore::ApplyStyleCommand::applyBlockStyle): Don't do the remove step.
1335 It was unnecessary and removed properties from blocks that could contain
1336 content outside the range being operated on (added a testcase).
1337 (WebCore::ApplyStyleCommand::addBlockStyleIfNeeded): Used an early return
1338 instead of if-nesting.
1339 * editing/ApplyStyleCommand.h:
1340 * editing/CompositeEditCommand.cpp:
1341 (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1342 Return the new block, if one was created. Use moveParagraphs to move
1343 paragraphs into the new block, instead of moving nodes. The old code moved
1344 too much (added a testcase).
1345 * editing/CompositeEditCommand.h:
1347 2007-03-13 Oliver Hunt <oliver@apple.com>
1351 To fix <rdar://problem/5044366> we now pass a NSString
1352 representation of the URL extracted with _web_originalDataAsString
1353 instead of relying on [NSURL absoluteString] in the bridge
1355 * page/mac/WebCoreFrameBridge.h:
1356 * page/mac/WebCoreFrameBridge.mm:
1357 (-[WebCoreFrameBridge getData:andResponse:forURL:]):
1359 2007-03-13 Brady Eidson <beidson@apple.com>
1363 <rdar://problem/5048818> - REGRESSION: Incompletely loaded resources being saved to the object cache
1365 Due to a subtle change in loader behavior back in 10904, we would stop all loaders before calling
1366 didFail() on them in the Cache loader. As a result, we basically cleared all of the Subresource Loaders
1367 out of the Cache loader before more properly failing them as errored out. The result? Partially loaded
1368 resources being cached.
1370 Since Loader::didFail() both calls error() on the object *and* removes the loader, the solution is to call
1371 didFail() for all cancelled loaders instead of *only* removing them from the set of active loaders.
1373 In addition, pages that didn't completely load were being saved to the back/forward cache. To fix that,
1374 I added a null check on the DocumentLoader's error to see if the page ended in an error, or did indeed
1377 Note that the layout test for this - if possible - will require other enhancements including possibly adding
1378 support for window.stop(). That task is documented in <rdar://problem/5061826>
1380 * loader/FrameLoader.cpp:
1381 (WebCore::FrameLoader::provisionalLoadStarted): Fixed a few bugs relating to my original BFCache rewrite to
1382 more perfectly restore the original behavior - including only caching HTML documents via the
1383 m_client->canCachePage() call
1384 (WebCore::FrameLoader::canCachePage): Don't make the call to m_client->canCachePage() as that serves a different
1386 - Check the mainDocumentError to see if the load ended in error as a further criteria in determining the
1387 cachability of a page
1389 * loader/loader.cpp:
1390 (WebCore::Loader::cancelRequests): Call didFail(cancelledError()) instead of just removing the loaders from the
1391 loaders-in-progress set. This adds the effect of properly cleaning up the cached object.
1393 2007-03-13 Beth Dakin <bdakin@apple.com>
1395 Rendering part reviewed by Hyatt. Editing part consulted with and
1396 rubber stamped by Justin and Harrison.
1398 Fix for <rdar://problem/5025925> A hang occurs in Safari when
1399 attempting to print page at http://www.pcadvisor.co.uk
1401 * rendering/RenderBlock.cpp:
1402 (WebCore::RenderBlock::makeChildrenNonInline):
1403 RenderBlock::makeChildrenNonInline() takes a block's inline
1404 children and turns them into block children. If the children had
1405 line boxes, those boxes were being leaked. In the layout test I
1406 added with the change (and at pcadvisor.co.uk during printing)
1407 children were being made non-inline, and then they were being made
1408 inline again. This meant that some of the children ended up
1409 pointing to totally stale line boxes that are normally just leaked.
1410 This caused an infinite loop in RenderFlow::destroy(). This patch
1411 simply deletes everyone's line boxes in
1412 RenderBlock::makeChildrenNonInline()
1414 * editing/InsertParagraphSeparatorCommand.cpp:
1415 (WebCore::InsertParagraphSeparatorCommand::doApply): The other part
1416 of this fix is that I added a call to updateLayout in
1417 InsertParagraphSeparatorCommand::doApply(). One layout test
1418 (editing/spelling/spelling.html) was changed by my patch to
1419 RenderBlock. doApply() inserts a node into the render tree. In at
1420 least one case in spelling.html, that caused some line boxes to be
1421 deleted. Back in doApply() this meant that the RenderTree was out-
1422 of-date, and we mistakenly thought we were at the end of the
1423 paragraph. This caused us to insert a RenderBR() at the end of the
1424 tree instead of an empty RenderText(). No one seems to know exactly
1425 why we insert either, or if the change is necessarily a problem. It
1426 is clear, though, that the RenderTree in doApply() is out-of-date
1427 after inserting the node and deleting some line boxes, so it seems
1428 prudent to call into updateLayout().
1430 2007-03-13 Adam Roben <aroben@apple.com>
1434 * platform/FontData.h: Added m_isSystemFont parameter to match NSFont.
1436 2007-03-13 Beth Dakin <bdakin@apple.com>
1440 Export DocumentLoader::setFrame(). Part of fix for <rdar://
1441 problem/4277074> 8F32: Help Viewer crashed on clicking link -
1442 KHTMLView::viewportMouseReleaseEvent (12647)
1446 2007-03-13 Darin Adler <darin@apple.com>
1450 - fix http://bugs.webkit.org/show_bug.cgi?id=12794
1451 <rdar://problem/5028154> REGRESSION: TripTik planner at aaa.com never
1452 finishes loading due to unclosed canvas tag (12794)
1454 Change <canvas> elements so that their contents are parsed normally,
1455 but not rendered. This change fixes the bug, because normal parsing
1456 rules close the <canvas> element in that case. The special parser
1457 stuff was just getting in the way.
1459 Also do some basic cleanup to the HTML parser. This was motivated by
1460 an earlier version of this patch that made even more changes to the
1461 parser, but the cleanup is still worth landing.
1463 Test: fast/canvas/canvas-hides-fallback.html
1464 Test: fast/canvas/script-inside-canvas-fallback.html
1465 Test: fast/canvas/unclosed-canvas-1.html
1466 Test: fast/canvas/unclosed-canvas-2.html
1467 Test: fast/canvas/unclosed-canvas-3.html
1468 Test: fast/canvas/unclosed-canvas-4.html
1470 * html/HTMLCanvasElement.h: Added a data member to keep track of whether the
1471 renderer is a RenderHTMLCanvas or not.
1472 * html/HTMLCanvasElement.cpp:
1473 (WebCore::HTMLCanvasElement::createRenderer): If JavaScript is enabled, create
1474 a RenderHTMLCanvas. If it's not, let the default code create the default type
1475 of renderer, which will result in fallback content being visible. The
1476 RenderHTMLCanvas class already hides all of its children. Set the m_rendererIsCanvas
1477 boolean accordingly. Since the actual storage for the canvas is allocated lazily
1478 when you actually get a drawing context, we don't need to do anything special
1479 to prevent it when JavaScript is disabled; the relevant functions won't be called.
1480 (WebCore::HTMLCanvasElement::reset): Protect the code that manipulates the
1481 RenderHTMLCanvas with a check of m_rendererIsCanvas. This is the only code inside
1482 the DOM element that relies on the renderer type.
1484 * html/HTMLParser.h: Removed unneeded includes. Marked HTMLParser as
1485 Noncopyable. Changed the Document parameter to the constructor to instead
1486 be HTMLDocument. Renamed discard_until to m_skipModeTag for clarity.
1487 Removed unused noSpaces function and unneeded public doc() function.
1488 Moved data members all down to the end so you can see them together in order.
1489 Renamed map to m_currentMapElement and isindex to m_isindexElement.
1490 Removed unused end and headLoaded data members. Renamed m_fragment to
1491 m_isParsingFragment to make it clearer that it's a boolean, not a fragment.
1493 * html/HTMLParser.cpp:
1494 (WebCore::HTMLParser::HTMLParser): Changed to use member construction
1495 syntax instead of calling reset(). This is especially helpful in the
1496 fragment case, where calling reset() later on is illegal, so not using
1497 it in the constructor lets us assert.
1498 (WebCore::HTMLParser::~HTMLParser): Did an explicit deref instead of
1499 calling setCurrent for its side effect.
1500 (WebCore::HTMLParser::reset): Updated for member name changes and removal
1501 and to use document instead of doc().
1502 (WebCore::HTMLParser::setCurrent): Use document instead of doc().
1503 (WebCore::HTMLParser::setSkipMode): Added. No longer inline. Now sets the
1504 m_inCanvasBeforeFirstOpenTag data member to false.
1505 (WebCore::HTMLParser::parseToken): Tightened up the skip mode logic at the
1506 top of the function, and added a FIXME about the strange case there where
1507 we don't skip yet stay in skip mode. Updated for renaming and doc().
1508 (WebCore::HTMLParser::insertNode): Updated for renaming and doc().
1509 (WebCore::HTMLParser::handleError): Ditto.
1510 (WebCore::HTMLParser::framesetCreateErrorCheck): Ditto.
1511 (WebCore::HTMLParser::isindexCreateErrorCheck): Changed to use RefPtr.
1512 (WebCore::HTMLParser::noscriptCreateErrorCheck): Updated for renaming and doc().
1513 (WebCore::HTMLParser::mapCreateErrorCheck): Ditto.
1514 (WebCore::HTMLParser::getNode): Removed the special case for canvas here.
1515 Canvas fallback is now handled in the DOM, not the parser. Updated for
1517 (WebCore::HTMLParser::allowNestedRedundantTag): Changed a #define into a C++
1519 (WebCore::HTMLParser::processCloseTag): Updated for renaming and doc().
1520 (WebCore::HTMLParser::isInline): Ditto.
1521 (WebCore::HTMLParser::tagIsOnStack): Added. Used by new canvas logic.
1522 (WebCore::HTMLParser::popBlock): Updated for renaming and doc(). Also renamed
1523 the local variable Elem to elem.
1524 (WebCore::HTMLParser::createHead): Ditto.
1525 (WebCore::HTMLParser::handleIsindex): Changed to use RefPtr.
1526 (WebCore::HTMLParser::startBody): Updated for renaming and doc().
1527 (WebCore::HTMLParser::finished): Ditto.
1529 2007-03-13 David Hyatt <hyatt@apple.com>
1531 Two more cleanup fixes to the cache. Don't call destroyDecodedData in the BitmapImage destructor, since
1532 clearing the image source and calling setData on it again causes it to do an extra copy of the encoded
1533 data. Since we're about to be destroyed this is just wasteful.
1535 When the cache prunes, don't allow it to destroy the decoded data of an image that is still actively loading,
1536 since we've established that ImageIO can actually crash if you yank the rug out from under it like that.
1541 (WebCore::Cache::prune):
1542 * platform/graphics/BitmapImage.cpp:
1543 (WebCore::BitmapImage::~BitmapImage):
1545 2007-03-13 Anders Carlsson <acarlsson@apple.com>
1547 Try fixing the Qt build.
1550 (WebCore::Editor::setStartNewKillRingSequence):
1552 2007-03-13 David Harrison <harrison@apple.com>
1556 <rdar://problem/5031181> cntl-k at end of paragraph adds nothing to the kill ring
1557 <rdar://problem/5031189> REGRESSION: cntl-y yanks only the most recently killed content
1559 For rdar://5031181, properly extend the selection before the killring handling, and
1560 make sure plainText of that selection returns a linefeed.
1562 For rdar://5031189, restore Editor::deleteRange() code that continued current killring,
1563 even though the range deletion implicitly stopped it via changing the selection.
1565 A byproduct of this change is the elimination of RUNDFINDER vs CONTENT TextIterator. The
1566 only difference between the two was whether to emit a newline when the range started
1567 with a blockflow element. No callers actually need that any more.
1570 * editing/pasteboard/emacs-ctrl-k-y-001-expected.checksum: Added.
1571 * editing/pasteboard/emacs-ctrl-k-y-001-expected.png: Added.
1572 * editing/pasteboard/emacs-ctrl-k-y-001-expected.txt: Added.
1573 * editing/pasteboard/emacs-ctrl-k-y-001.html: Added.
1575 * editing/Editor.cpp:
1576 (WebCore::Editor::deleteRange):
1577 Clear the "start new kill ring sequence" setting, because it was set to true
1578 when the selection was updated by deleting the range.
1580 (WebCore::Editor::deleteWithDirection):
1581 If extending the selection to the end of paragraph resulted in a caret selection,
1582 extend by character, to handle the case when the selection started as a caret at
1583 the end of paragraph.
1585 * editing/TextIterator.cpp:
1586 (WebCore::TextIterator::TextIterator):
1587 Initialize new member variables for tracking handling of the beginning of the range.
1589 (WebCore::TextIterator::advance):
1590 Call representNodeOffsetZero on the m_endContainer.
1591 Move visibility checks into handleTextNode and handleReplacedElement.
1593 (WebCore::TextIterator::handleTextNode):
1594 (WebCore::TextIterator::handleTextBox):
1597 (WebCore::TextIterator::handleReplacedElement):
1598 Moved visibility check into here.
1600 (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
1602 (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
1603 (WebCore::TextIterator::representNodeOffsetZero):
1604 New. Emits proper sequence when encountering offset 0 of a node, including the
1605 m_endContainer. Started with code from handleNonTextNode.
1607 (WebCore::TextIterator::handleNonTextNode):
1608 Call representNodeOffsetZero.
1610 (WebCore::TextIterator::exitNode):
1611 Similar to shouldRepresentNodeOffsetZero, do not emit the newline if the node
1612 was collapsed, and before any other emitted content.
1614 (WebCore::TextIterator::emitCharacter):
1616 (WebCore::TextIterator::emitText):
1617 New. Consolidates code used by handleText and handleTextBox.
1619 (WebCore::CharacterIterator::CharacterIterator):
1622 (WebCore::WordAwareIterator::WordAwareIterator):
1625 (WebCore::WordAwareIterator::advance):
1628 (WebCore::TextIterator::rangeLength):
1631 * editing/TextIterator.h:
1632 Added member variables for tracking handling of the beginning of the range.
1633 Eliminated concept of RUNDFINDER vs CONTENT TextIterator.
1635 * editing/visible_units.cpp:
1636 (WebCore::nextBoundary):
1637 Eliminated concept of RUNDFINDER vs CONTENT TextIterator.
1639 2007-03-13 David Hyatt <hyatt@apple.com>
1641 Clean up the null image case in CachedImage::data to make sure the size totals will stay accurate.
1642 I'm not convinced this case can even be hit, but I'm cleaning it up just in case.
1644 * loader/CachedImage.cpp:
1645 (WebCore::CachedImage::data):
1647 2007-03-13 David Hyatt <hyatt@apple.com>
1649 Reorder the call to allReferencesRemoved, since otherwise the live object size will become
1652 * loader/CachedResource.cpp:
1653 (WebCore::CachedResource::deref):
1655 2007-03-13 Antti Koivisto <antti@apple.com>
1659 Fix http://bugs.webkit.org/show_bug.cgi?id=11083
1660 REGRESSION: Typing tab key fails to insert a tab character in Google Docs editable area
1661 <rdar://problem/4757650>
1663 Allow inserting tabs in designMode. Backtab behaves like before (matches FF).
1665 * page/EventHandler.cpp:
1666 (WebCore::EventHandler::defaultTabEventHandler):
1668 2007-03-13 David Hyatt <hyatt@apple.com>
1670 Fix two counting errors in the decoded size of objects in the WebCore cache. We need to explicitly
1671 destroy decoded data when clearing out a partially loaded image that had an error, since the destructor
1672 (although it does destroy the data) disconnects the observer so that the notification doesn't happen.
1674 Some CachedImages aren't in the cache (like image documents). When the decoded size of such an image
1675 changes we should not notify the cache, since - newsflash - we aren't actually in it.
1679 * loader/CachedImage.cpp:
1680 (WebCore::CachedImage::clear):
1681 (WebCore::CachedImage::decodedSizeChanged):
1683 2007-03-13 Darin Adler <darin@apple.com>
1685 Reviewed by Tim Hatcher and John Sullivan.
1687 - fix <rdar://problem/4915303> CrashTracer: 36 crashes in Safari at
1688 com.apple.AppKit: -[NSView getRectsBeingDrawn:count:] + 502
1690 * page/mac/FrameMac.mm: (WebCore::Frame::imageFromRect):
1691 This was calling drawRect: directly, but NSView's getRectsBeingDrawn:count:
1692 method was never really safe to call unless it was AppKit that called your
1693 drawRect: method. Changed it to call drawSingleRect: instead. A little ugly,
1694 but seems to work and will almost certainly fix the bug.
1696 2007-03-13 Nikolas Zimmermann <zimmermann@kde.org>
1700 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12974
1702 Call forgetGenericContext in JSSVGPathSeg destructor, otherwhise
1703 we'll hit an ASSERT in a debug build, when running svg/custom/js-update-path-changes.svg
1704 a few dozen times in a single WebKit instance. The ASSERT is good and just warns that
1705 there was already a generic context pointer registered, and the new "to be registered"
1706 object already exists, but pointing to a different object. That's because garbage collection
1707 calls the JSSVGPathSeg destructor, but that didn't cleanup the generic context map.
1709 Only JSSVGPathSeg is hit by this problem, as it's the only non SVGAnimated* type
1710 using the generic context system while using a custom JSSVGPathSegList implementation.
1712 Also cleanup JSSVGPathSegListCustom code to call the static forgetGenericContext
1713 method instead of doing the same using custom code.
1715 * bindings/js/JSSVGPathSegListCustom.cpp:
1716 (WebCore::removeFromPathSegContextMap):
1717 (WebCore::JSSVGPathSegList::clear):
1718 (WebCore::JSSVGPathSegList::removeItem):
1719 * bindings/scripts/CodeGeneratorJS.pm:
1721 2007-03-13 Darin Adler <darin@apple.com>
1725 - fix http://bugs.webkit.org/show_bug.cgi?id=12595
1726 <rdar://problem/4722863> REGRESSION: Can't add item to cart at lnt.com
1727 (JS type error) (12595)
1729 Test: fast/forms/old-names.html
1731 * bindings/js/JSHTMLFormElementCustom.cpp:
1732 (WebCore::JSHTMLFormElement::canGetItemsForName): If the form collection has
1733 nothing for a given name, try the form's oldNamedElement function.
1734 (WebCore::JSHTMLFormElement::nameGetter): Ditto.
1736 * bindings/js/kjs_dom.h: Removed the DOMNamedNodesCollection. Instead we will use
1737 a class derived from NodeList.
1738 * bindings/js/kjs_dom.cpp: Ditto.
1740 * bindings/js/kjs_html.cpp:
1741 (KJS::VectorNodeList::VectorNodeList): Added. Constructor for a new class derived
1742 from NodeList to be used for the named items result from a collection -- uses a
1743 vector of node pointers.
1744 (KJS::VectorNodeList::length): Added.
1745 (KJS::VectorNodeList::item): Added.
1746 (KJS::JSHTMLCollection::getNamedItems): Use VectorNodeList and the existing wrapper
1747 for NodeList rather than a custom JavaScript class, DOMNamedNodesCollection.
1749 * dom/ChildNodeList.h:
1750 * dom/ChildNodeList.cpp:
1751 (WebCore::ChildNodeList::ChildNodeList): Updated to derive from TreeNodeList,
1752 since NodeList is now a simpler class.
1753 (WebCore::ChildNodeList::elementMatches): Updated for name and parameter change.
1755 * dom/NameNodeList.h:
1756 * dom/NameNodeList.cpp:
1757 (WebCore::NameNodeList::NameNodeList): Updated to derive from TreeNodeList,
1758 since NodeList is now a simpler class.
1759 (WebCore::NameNodeList::rootNodeAttributeChanged): Updated for name and
1762 * dom/Node.h: Change register/unregister functions to take TreeNodeList.
1764 (WebCore::TagNodeList::TagNodeList): Updated to derive from TreeNodeList,
1765 since NodeList is now a simpler abstract class.
1766 (WebCore::TagNodeList::elementMatches): Updated for name and parameter change.
1767 (WebCore::Node::registerNodeList): Changed type from NodeList to TreeNodeList.
1768 (WebCore::Node::unregisterNodeList): Ditto.
1770 * dom/NodeList.h: Broke NodeList into a simpler base class and a derived class
1771 with the machinery for iterating a tree, called TreeNodeList.
1773 (WebCore::NodeList::~NodeList): Added.
1774 (WebCore::NodeList::itemWithName): Factored out of the old itemWithName.
1775 (WebCore::TreeNodeList::TreeNodeList): Renamed from NodeList.
1776 (WebCore::TreeNodeList::~TreeNodeList): Ditto.
1777 (WebCore::TreeNodeList::recursiveLength): Ditto.
1778 (WebCore::TreeNodeList::itemForwardsFromCurrent): Ditto.
1779 (WebCore::TreeNodeList::itemBackwardsFromCurrent): Ditto.
1780 (WebCore::TreeNodeList::recursiveItem): Ditto.
1781 (WebCore::TreeNodeList::itemWithName): Factored half of this into this function,
1782 the other half in NodeList::itemWithName.
1783 (WebCore::TreeNodeList::rootNodeAttributeChanged): Added. No longer inline.
1784 (WebCore::TreeNodeList::rootNodeChildrenChanged): Renamed from NodeList.
1786 * html/HTMLFormElement.h: Added formElementNameChanged and oldNamedElement
1787 fucntions, and a map called m_oldNames. Also removed m_boundary, which I
1788 thought I had already done.
1789 * html/HTMLFormElement.cpp:
1790 (WebCore::HTMLFormElement::HTMLFormElement): Initialize m_oldNames to 0.
1791 Switched the rest of the members to initialization syntax.
1792 (WebCore::HTMLFormElement::~HTMLFormElement): Delete m_oldNames.
1793 (WebCore::HTMLFormElement::formElementNameChanged): Added. Stores a reference
1794 to one element under each of its old names.
1795 (WebCore::HTMLFormElement::oldNamedElement): Added. Returns the old element
1796 that once had a given name.
1798 * html/HTMLGenericFormElement.h:
1799 * html/HTMLGenericFormElement.cpp:
1800 (WebCore::HTMLGenericFormElement::parseMappedAttribute): When the name
1801 attribute changes, tell the form about the old name.
1802 (WebCore::HTMLGenericFormElement::insertedIntoTree): When telling a form
1803 about an element, also store away the old name so that we can use it
1804 when the name changes later.
1806 * html/HTMLInputElement.cpp:
1807 (WebCore::HTMLInputElement::parseMappedAttribute): Added a call to the
1808 base class in the nameAttr case, so the code in HTMLGenericFormElement
1809 above will get called in the input element case.
1811 2007-03-13 Antti Koivisto <antti@apple.com>
1815 Alexey spotted a DOS by using string of 64k unbreakable character in
1816 fix for http://bugs.webkit.org/show_bug.cgi?id=12833
1819 (WebCore::Text::createWithLengthLimit):
1821 2007-03-13 Lars Knoll <lars@trolltech.com>
1827 2007-03-13 Rob Buis <buis@kde.org>
1831 http://bugs.webkit.org/show_bug.cgi?id=12576
1832 WebKit does not support xlink:show attributes
1834 Make an exception for non-empty targets, these should be opened
1835 in a new window, unless the value is _self.
1837 * ksvg2/svg/SVGAElement.cpp:
1838 (WebCore::SVGAElement::defaultEventHandler):
1840 2007-03-13 David Hyatt <hyatt@apple.com>
1842 - fix cache issues seen in http://bugs.webkit.org/show_bug.cgi?id=13050
1843 6 objects and ~200MB leaked after opening then closing tab
1844 <rdar://problem/5058714>
1846 Double the encoded size of images for now. We do this to account for a bug in ImageIO where they hold
1847 a separate copy of image data. See <rdar://problem/5050645>.
1851 * loader/CachedImage.cpp:
1852 (WebCore::CachedImage::data):
1854 2007-03-12 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
1856 Not reviewed - gdk build fix.
1858 * platform/gdk/TemporaryLinkStubs.cpp:
1859 (SearchPopupMenu::enabled): add missing stub.
1861 2007-03-12 David Kilzer <ddkilzer@kilzer.net>
1865 - fix http://bugs.webkit.org/show_bug.cgi?id=13045
1866 REGRESSION: Blackboard CourseWare Error with Nightlies after Mar 8
1868 * html/HTMLFormElement.cpp:
1869 (WebCore::getUniqueBoundaryString): Speculative fix: remove dashes from
1870 the boundary prefix that appear after non-dash characters.
1872 2007-03-12 Mitz Pettel <mitz@webkit.org>
1876 - fix http://bugs.webkit.org/show_bug.cgi?id=13015
1877 REGRESSION (r17233-r17241): Repro crash when leaving a page whose unload handler submits a form
1879 Test: fast/loader/onunload-form-submit-crash-2.html
1881 * loader/DocumentLoader.cpp:
1882 (WebCore::DocumentLoader::finishedLoading): Added null check.
1884 2007-03-12 Anders Carlsson <acarlsson@apple.com>
1888 <rdar://problem/4900071>
1889 http://bugs.webkit.org/show_bug.cgi?id=6454
1890 ASSERTION: Navigating 'back' in frameset: !_private->previousItem (6454)
1892 Change back the behavior of checkLoadComplete to traverse the entire frame tree instead of
1893 just the parent frames of the current frame. This is needed in order to reset the previous history item
1894 for all frames when doing a frame navigation. (This was changed in revision 11819)
1896 * loader/FrameLoader.cpp:
1897 (WebCore::FrameLoader::recursiveCheckLoadComplete):
1898 (WebCore::FrameLoader::checkLoadComplete):
1899 * loader/FrameLoader.h:
1901 2007-03-12 Justin Garcia <justin.garcia@apple.com>
1905 <rdar://problem/5056619>
1906 REGRESSION: Gmail Editor: Dragging text into Reply (textarea) field results in a crash at WebCore::InsertNodeBeforeCommand::doApply()
1908 * editing/SelectionController.cpp:
1909 (WebCore::removingNodeRemovesPosition): Added.
1910 (WebCore::SelectionController::nodeWillBeRemoved): Clear the
1911 selection if it's inside a shadow tree.
1912 * page/DragController.cpp:
1913 (WebCore::setSelectionToDragCaret): Return false to signal to
1914 clients that a drop shouldn't be performed if the second attempt
1915 to set a selection ends up in non-editable content.
1917 2007-03-12 Darin Adler <darin@apple.com>
1919 Reviewed by Tim Hatcher.
1921 - fixed JavaScript wrapper classes to be correct for a variety of cases
1922 that a new test uncovered: was broken for at least 5 classes
1924 - fixed Objective-C wrapper classes to be correct for a variety of cases
1925 that a test case uncovered: was broken for ast least 50 classes
1927 - added missing DOM API for creating OverflowEvent and WheelEvent instances
1929 Test: fast/dom/wrapper-classes.html
1931 * DerivedSources.make: Added missing bindings: HTMLCanvasElement for ObjC,
1932 CDATASection, Comment, and EntityReference for JavaScript.
1933 * WebCore.xcodeproj/project.pbxproj: Added those new generated files.
1935 * bindings/js/JSHTMLElementWrapperFactory.cpp:
1936 (WebCore::createJSHTMLWrapper): Corrected the wrapper classes for <keygen>,
1937 which needs an HTMLSelectElement wrapper, and <xmp>, which needs an
1938 HTMLPreElement wrapper.
1940 * bindings/objc/DOMInternal.h: Updated for new naming scheme.
1941 Also moved createDOMWrapper from the KJS namespace to the WebCore namespace.
1942 * bindings/objc/DOMUtility.mm:
1943 (KJS::createDOMWrapper): Broke the core function into a separate one, and
1944 left it in the KJS namespace because Objective-C++ rules make it impossible
1945 for it to work in the WebCore namespace. Used a macro-based implementation
1946 to cut down on repeated code, and added missing cases for Counter,
1947 HTMLOptionsCollection, Range, XPathExpression, XPathResult, Event, RGBColor,
1948 Rect, Window, DOMImplementation, NodeIterator, TreeWalker, and HTMLCollection.
1949 (WebCore::createDOMWrapper): The other half of the function.
1951 * bindings/objc/DOM.mm:
1952 (WebCore::createElementClassMap): Corrected the wrapper classes for
1953 <canvas>, which needs a DOMHTMLCanvasElement wrapper, <del>, which needs
1954 a DOMHTMLModElement wrapper, <embed>, which needs a DOMHTMLEmbedElement
1955 wrapper, <ins>, which needs a DOMHTMLModElement wrapper, <th>, which needs
1956 a DOMHTMLTableCellElement wrapper, and <xmp>, which needs an
1957 DOMHTMLPreElement wrapper.
1958 (+[DOMNode _wrapNode:]): Updated for new naming scheme.
1959 (+[DOMNode _wrapEventTarget:]): Ditto.
1960 (+[DOMNodeFilter _wrapNodeFilter:]): Ditto.
1961 (ObjCNodeFilterCondition::acceptNode): Ditto.
1962 (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]): Ditto.
1963 (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]): Ditto.
1964 (WebCore::ObjCEventListener::handleEvent): Ditto.
1966 * dom/Document.cpp: (WebCore::Document::createEvent):
1967 Added cases for OverflowEvent and WheelEvent.
1969 * dom/OverflowEvent.h: Added empty constructor and initOverflowEvent.
1970 * dom/OverflowEvent.cpp:
1971 (WebCore::OverflowEvent::OverflowEvent): Added.
1972 (WebCore::OverflowEvent::initOverflowEvent): Added.
1973 * dom/OverflowEvent.idl: Added initOverflowEvent.
1975 * bindings/objc/PublicDOMInterfaces.h: Added initOverflowEvent.
1977 * bindings/objc/DOMCSS.mm:
1978 (+[DOMStyleSheet _wrapStyleSheet:]): Updated for new naming scheme.
1979 (+[DOMCSSRule _wrapCSSRule:]): Corrected wrapper for CSSUnknownRule.
1980 (+[DOMCSSValue _wrapCSSValue:]): Updated for new naming scheme.
1982 * bindings/js/kjs_css.h:
1983 (KJS::DOMRGBColor::impl): Added. Used when making an ObjC wrapper.
1984 (KJS::DOMRect::impl): Ditto.
1986 * bindings/js/kjs_dom.cpp: (KJS::toJS): Corrected the wrapper classes for
1987 CDATASection, Comment, and EntityReference.
1989 * bindings/js/kjs_html.cpp: Corrected the class name for HTMLElement
1990 (was "DOMHTMLElement") and HTMLCollection (was "Collection").
1992 * bindings/objc/DOMImplementationFront.h:
1993 * bindings/objc/DOMImplementationFront.cpp:
1994 (WebCore::implementationFront): Added new overload that returns a front given
1995 a JavaScript wrapper. Needed by the code that makes the Objective-C wrapper.
1997 * bindings/objc/WebScriptObject.mm:
1998 (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1999 Updated since createDOMWrapper is now in the WebCore namespace.
2001 * bindings/scripts/CodeGeneratorObjC.pm: Update the naming scheme for the
2002 wrapper creation functions to use _wrapElement: rather then _elementWith:
2003 style. Removed now-unneeded special cases for things that needed to stay
2004 upper-case, since we don't have to do the whole lcfirst thing.
2006 * html/HTMLCanvasElement.idl: Added #if so we can successfully generate the
2007 Objective-C wrapper for this class, even though we can't yet handle the
2008 DOMObject return type.
2010 * html/HTMLOptionsCollection.idl: Added GenerateNativeConverter so we get
2011 an appropriate toJS function.
2013 * bindings/objc/DOMEvents.mm:
2014 (+[DOMEvent _wrapEvent:]):
2015 * bindings/objc/DOMHTML.mm:
2016 (-[DOMHTMLDocument createDocumentFragmentWithMarkupString:baseURL:]):
2017 (-[DOMHTMLDocument createDocumentFragmentWithText:]):
2018 * bindings/objc/DOMObject.mm:
2019 (-[DOMObject sheet]):
2020 * bindings/objc/DOMRGBColor.mm:
2021 (-[DOMRGBColor red]):
2022 (-[DOMRGBColor green]):
2023 (-[DOMRGBColor blue]):
2024 (-[DOMRGBColor alpha]):
2025 (+[DOMRGBColor _wrapRGBColor:]):
2026 * bindings/objc/DOMSVGPathSegInternal.mm:
2027 (+[DOMSVGPathSeg _wrapSVGPathSeg:]):
2028 * bindings/objc/DOMXPath.mm:
2029 (+[DOMNativeXPathNSResolver _wrapXPathNSResolver:]):
2030 * page/mac/WebCoreFrameBridge.mm:
2031 (-[WebCoreFrameBridge nodesFromList:]):
2032 (-[WebCoreFrameBridge elementWithName:inForm:]):
2033 (-[WebCoreFrameBridge formForElement:]):
2034 (-[WebCoreFrameBridge currentForm]):
2035 (-[WebCoreFrameBridge controlsInForm:]):
2036 (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
2037 (-[WebCoreFrameBridge convertNSRangeToDOMRange:]):
2038 (-[WebCoreFrameBridge markDOMRange]):
2039 (-[WebCoreFrameBridge markedTextDOMRange]):
2040 (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]):
2041 (-[WebCoreFrameBridge documentFragmentWithMarkupString:baseURLString:]):
2042 (-[WebCoreFrameBridge documentFragmentWithText:inContext:]):
2043 (-[WebCoreFrameBridge documentFragmentWithNodesAsParagraphs:]):
2044 (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
2045 (-[WebCoreFrameBridge replaceSelectionWithText:selectReplacement:smartReplace:]):
2046 (-[WebCoreFrameBridge increaseSelectionListLevel]):
2047 (-[WebCoreFrameBridge increaseSelectionListLevelOrdered]):
2048 (-[WebCoreFrameBridge increaseSelectionListLevelUnordered]):
2049 (-[WebCoreFrameBridge dragCaretDOMRange]):
2050 (-[WebCoreFrameBridge editableDOMRangeForPoint:]):
2051 (-[WebCoreFrameBridge characterRangeAtPoint:]):
2052 (-[WebCoreFrameBridge typingStyle]):
2053 (-[WebCoreFrameBridge rangeOfCharactersAroundCaret]):
2054 * platform/mac/ClipboardMac.mm:
2055 (WebCore::ClipboardMac::declareAndWriteDragImage):
2056 * platform/mac/PasteboardMac.mm:
2057 (WebCore::Pasteboard::writeSelection):
2058 Updated for new naming scheme.
2060 2007-03-12 Timothy Hatcher <timothy@apple.com>
2064 <rdar://problem/4990691> REGRESSION: Selecting text in Adium's Messages field causes horizontal shift
2066 Corrected the recursive point conversion and scrolling done in scrollPointRecursively to use the
2067 document view of each NSClipView.
2069 * platform/mac/ScrollViewMac.mm:
2070 (WebCore::ScrollView::scrollPointRecursively): Call convertPoint:fromView: on the document views,
2071 not the clip views as we encounter them. Then call constrainScrollPoint: on the converted point to
2072 constrain to the document view bounds. And finally call scrollPoint: on the document view, not the clip view.
2074 2007-03-12 Antti Koivisto <antti@apple.com>
2078 Fix http://bugs.webkit.org/show_bug.cgi?id=12833
2079 REGRESSION: Selecting text in 6.6MB txt file is sluggish as of the Feb 19th nightly
2080 <rdar://problem/5028159>
2082 Divide large text blocks (>64kB) over multiple text nodes. This limits linebox searches to
2083 a manageable subset.
2086 (WebCore::Text::createWithLengthLimit):
2088 * html/HTMLParser.cpp:
2089 (WebCore::HTMLParser::parseToken):
2090 * loader/TextDocument.cpp:
2091 (WebCore::TextTokenizer::write):
2093 2007-03-12 David Hyatt <hyatt@apple.com>
2095 Fix a regression in printing. Printer fonts need to be part of the
2096 font cache key, since printer fonts have different glyph widths.
2097 (Integer antialiasing is used for screen fonts but not for printer fonts.)
2101 * platform/FontCache.cpp:
2102 (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
2103 (WebCore::FontPlatformDataCacheKey::operator==):
2104 (WebCore::computeHash):
2105 (WebCore::FontCache::getCachedFontPlatformData):
2107 2007-03-12 Lars Knoll <lars@trolltech.com>
2109 add missing symbol to fix the Qt build again.
2111 * platform/qt/SearchPopupMenuQt.cpp:
2112 (WebCore::SearchPopupMenu::enabled):
2114 2007-03-12 Adele Peterson <adele@apple.com>
2118 Adding the ability to enable or disable a SearchPopupMenu.
2120 * platform/SearchPopupMenu.h:
2121 * platform/mac/SearchPopupMenuMac.mm: (WebCore::SearchPopupMenu::enabled):
2122 * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::showPopup):
2124 2007-03-12 Rob Buis <buis@kde.org>
2126 Reviewed by Nikolas Zimmermann.
2128 http://bugs.webkit.org/show_bug.cgi?id=12500
2129 SVG fails to correctly handle all link style selectors
2130 http://bugs.webkit.org/show_bug.cgi?id=12567
2131 <text> elements ignore <a> children
2133 Allow <a> inside svg text and handle xlink:show.
2135 * ksvg2/svg/SVGAElement.cpp:
2136 (WebCore::SVGAElement::createRenderer):
2137 (WebCore::SVGAElement::defaultEventHandler):
2138 (WebCore::SVGAElement::childShouldCreateRenderer):
2139 * ksvg2/svg/SVGAElement.h:
2140 * ksvg2/svg/SVGElement.h:
2141 (WebCore::SVGElement::isTextContent):
2142 * ksvg2/svg/SVGTextContentElement.h:
2143 (WebCore::SVGTextContentElement::isTextContent):
2144 * ksvg2/svg/SVGTextElement.cpp:
2145 (WebCore::SVGTextElement::childShouldCreateRenderer):
2146 * rendering/SVGInlineFlowBox.cpp:
2147 (WebCore::translateBox):
2148 (WebCore::placePositionedBoxesHorizontally):
2149 (WebCore::placeBoxesVerticallyWithAbsBaseline):
2151 2007-03-12 Adele Peterson <adele@apple.com>
2155 Add a missing parameter to the constructor.
2157 * platform/PlatformKeyboardEvent.h:
2158 * platform/win/KeyEventWin.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2160 2007-03-12 Lars Knoll <lars@trolltech.com>
2162 Fix the Qt build. I still get crashes though :/
2164 * platform/graphics/qt/ImageDecoderQt.cpp:
2165 (WebCore::ImageDecoderQt::clearFrame):
2166 * platform/graphics/qt/ImageDecoderQt.h:
2167 * platform/graphics/qt/ImageSourceQt.cpp:
2168 (WebCore::ImageSource::setData):
2169 (WebCore::ImageSource::frameIsCompleteAtIndex):
2170 (WebCore::ImageSource::clear):
2171 (WebCore::ImageSource::destroyFrameAtIndex):
2172 * platform/qt/ClipboardQt.cpp:
2173 (WebCore::ClipboardQt::ClipboardQt):
2174 * platform/qt/ClipboardQt.h:
2175 * platform/qt/DragDataQt.cpp:
2176 (WebCore::DragData::createClipboard):
2178 2007-03-11 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
2180 Not reviewed - gdk build fixes.
2182 * platform/gdk/EditorClientGdk.cpp:
2183 (WebCore::EditorClientGdk::respondToChangedSelection): add stub
2184 * platform/gdk/EditorClientGdk.h:
2185 * platform/gdk/FrameGdk.cpp:
2186 * platform/gdk/TemporaryLinkStubs.cpp:
2187 (Editor::markMisspellings): add stub
2189 2007-03-11 Alexey Proskuryakov <ap@webkit.org>
2193 http://bugs.webkit.org/show_bug.cgi?id=12560
2194 W3C XPath test Text_Nodes.svg fails
2196 * xml/XPathStep.cpp:
2197 (WebCore::XPath::Step::nodeTestMatches): Revert the fix, as the behavior doesn't appear
2198 all that desirable as it did at first glance.
2200 2007-03-11 Oliver Hunt <oliver@apple.com>
2204 Fix for <rdar://problem/5055690> ASSERTION failure on drop into
2205 editable element with content changed on drop
2207 After setting the selection for a drop into an editable region
2208 we make sure the we succeeded. If we didn't we assume a focus handler
2209 or similar altered the element contents and try again, if the second
2210 attempt fails we bail out.
2212 * page/DragController.cpp:
2213 (WebCore::setSelectionToDragCaret):
2214 (WebCore::DragController::concludeDrag):
2216 2007-03-11 Oliver Hunt <oliver@apple.com>
2220 Moving Frame{Mac}::respondToChangedSelection to Frame.cpp
2221 Added new EditorClient method to handle old bridge function
2223 * bridge/EditorClient.h:
2224 Added respondToChangedSelection to replace old bridge function
2225 * editing/Editor.cpp:
2226 (WebCore::Editor::respondToChangedSelection):
2227 Add client call to replace old bridge call from Frame::respondToChangedSelection
2228 * editing/SelectionController.cpp:
2229 (WebCore::SelectionController::setSelection):
2230 No longer directly call Editor as Frame::respondToChangedSelection
2233 (WebCore::Frame::respondToChangedSelection):
2234 Moved from FrameMac, replaced bridge call with call to Editor
2235 * page/mac/FrameMac.mm:
2236 Moved respondToChangedSelection to Frame.cpp
2237 * page/mac/WebCoreFrameBridge.h:
2238 Removed respondToChangedSelection from bridge
2239 * page/qt/FrameQt.cpp:
2240 Remove stub method for respondToChangedSelection
2242 2007-03-11 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
2244 Reviewed by Brady Eidson.
2248 * loader/gdk/FrameLoaderClientGdk.cpp:
2249 (WebCore::FrameLoaderClientGdk::shouldGoToHistoryItem): return true so
2250 that FrameLoader:goBackOrForwards() works.
2252 2007-03-10 Geoffrey Garen <ggaren@apple.com>
2254 Reviewed by Darin Adler.
2256 Fixed <rdar://problem/4587763> PAC file: lock inversion between QT and
2257 JSCore causes a hang @ www.panoramas.dk
2259 See JavaScriptCore ChangeLog for details.
2261 * bindings/objc/WebScriptObject.mm:
2262 (_didExecute): Added helpful ASSERT.
2263 (+[WebScriptObject throwException:]): Added missing JSLock.
2265 2007-03-11 Antti Koivisto <antti@apple.com>
2269 Optimize linebox memory consumption:
2270 - move all bitfields to baseclass compacting them
2271 - make InlineTextBox::m_truncation unsigned short and make it relative to m_start
2272 - remove extremely rarely used EllipsisBox pointer from RootInlineBox and instead
2273 use a global hashmap to store it if needed
2274 - use minimum required number of bits to store BidiStatus enum variables in RootInlineBox
2275 - move overflow variables in RootInlineBox to a separate struct that is instantiated
2276 only if any of the variables is set to a value that can't trivially be derived from
2277 box x, y, width and height
2279 As a result line box objects shrink:
2280 InlineBox: 44 -> 44 bytes
2281 InlineTextBox: 68 -> 60 bytes
2282 InlineFlowBox: 68 -> 64 bytes
2283 RootInlineBox: 128 -> 88 bytes
2285 The optimizations possiblity was noticed when debugging http://bugs.webkit.org/show_bug.cgi?id=12833
2286 Bug 12833: REGRESSION: Selecting text in 6.6MB txt file is sluggish as of the Feb 19th nightly
2287 <rdar://problem/5028159>
2289 On that page the patch saves 11.5MB or some 21% of linebox memory consumption. It also
2290 actually improves selection performance somewhat by improving memory locality.
2292 * rendering/InlineBox.h:
2293 (WebCore::InlineBox::InlineBox):
2294 * rendering/InlineFlowBox.h:
2295 (WebCore::InlineFlowBox::InlineFlowBox):
2296 * rendering/InlineTextBox.cpp:
2297 (WebCore::InlineTextBox::placeEllipsisBox):
2298 (WebCore::InlineTextBox::nodeAtPoint):
2299 (WebCore::InlineTextBox::paint):
2300 (WebCore::InlineTextBox::paintDecoration):
2301 (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
2302 (WebCore::InlineTextBox::paintMarkedTextUnderline):
2303 * rendering/InlineTextBox.h:
2304 (WebCore::InlineTextBox::InlineTextBox):
2305 * rendering/RootInlineBox.cpp:
2307 (WebCore::RootInlineBox::Overflow::operator delete):
2308 (WebCore::RootInlineBox::Overflow::destroy):
2309 (WebCore::RootInlineBox::destroy):
2310 (WebCore::RootInlineBox::detachEllipsisBox):
2311 (WebCore::RootInlineBox::clearTruncation):
2312 (WebCore::RootInlineBox::placeEllipsis):
2313 (WebCore::RootInlineBox::paintEllipsisBox):
2314 (WebCore::RootInlineBox::addHighlightOverflow):
2315 (WebCore::RootInlineBox::nodeAtPoint):
2316 (WebCore::RootInlineBox::adjustPosition):
2317 (WebCore::RootInlineBox::selectionTop):
2318 (WebCore::RootInlineBox::setLineBreakInfo):
2319 (WebCore::RootInlineBox::ellipsisBox):
2320 (WebCore::RootInlineBox::setVerticalOverflowPositions):
2321 (WebCore::RootInlineBox::setHorizontalOverflowPositions):
2322 (WebCore::RootInlineBox::setVerticalSelectionPositions):
2323 * rendering/RootInlineBox.h:
2324 (WebCore::RootInlineBox::RootInlineBox):
2325 (WebCore::RootInlineBox::topOverflow):
2326 (WebCore::RootInlineBox::bottomOverflow):
2327 (WebCore::RootInlineBox::leftOverflow):
2328 (WebCore::RootInlineBox::rightOverflow):
2329 (WebCore::RootInlineBox::lineBreakBidiStatus):
2330 (WebCore::RootInlineBox::selectionBottom):
2331 (WebCore::RootInlineBox::Overflow::Overflow):
2333 2007-03-11 Alexey Proskuryakov <ap@webkit.org>
2337 A partial fix for http://bugs.webkit.org/show_bug.cgi?id=13021
2338 XPath can be very slow
2340 * xml/XPathExpression.cpp:
2341 (WebCore::XPathExpression::evaluate): Cache evaluationContext in a local variable.
2343 * xml/XPathExpressionNode.cpp:
2344 (WebCore::XPath::Expression::evaluationContext):
2345 * xml/XPathExpressionNode.h:
2346 (WebCore::XPath::Expression::addSubExpression):
2347 (WebCore::XPath::Expression::subExprCount):
2348 (WebCore::XPath::Expression::subExpr):
2349 * xml/XPathFunctions.cpp:
2350 * xml/XPathFunctions.h:
2351 (WebCore::XPath::Function::setName):
2352 (WebCore::XPath::Function::arg):
2353 (WebCore::XPath::Function::argCount):
2354 (WebCore::XPath::Function::name):
2355 Made one-liners critical for performance inline.
2357 * xml/XPathGrammar.y: Fully parse NodeTests, so that strings are no longer passed for what is
2358 essentially an enum. Use LocationPath accessors to add steps, instead of directly manipulating
2359 internal data members.
2361 * xml/XPathParser.cpp:
2362 (WebCore::XPath::Parser::parseStatement):
2363 (WebCore::XPath::Parser::registerNodeTest):
2364 (WebCore::XPath::Parser::deleteNodeTest):
2365 * xml/XPathParser.h:
2366 Added support methods for changes in XPathGrammar.y.
2368 * xml/XPathPath.cpp:
2369 (WebCore::XPath::Filter::evaluate): Cache evaluationContext in a local variable. Use swap() to avoid
2370 performing vector assignments.
2371 (WebCore::XPath::LocationPath::evaluate): Use swap() to avoid performing vector assignments.
2372 (WebCore::XPath::LocationPath::optimizeStepPair): This new method is called during LocationPath construction,
2373 to simplify the path as it's being built. Currently, the only optimized case is "//*" - it is a basis for
2374 important operations that cannot be efficiently written in XPath 1.0, but can be optimized with a little bit
2376 (WebCore::XPath::LocationPath::appendStep): A new accessor that modifies m_steps and calls optimizeStepPair().
2377 (WebCore::XPath::LocationPath::insertFirstStep): Ditto.
2379 (WebCore::XPath::LocationPath::setAbsolute): A new accessor.
2382 (WebCore::XPath::Step::NodeTest::):
2383 (WebCore::XPath::Step::NodeTest::NodeTest):
2384 (WebCore::XPath::Step::NodeTest::kind):
2385 (WebCore::XPath::Step::NodeTest::data):
2386 Step::NodeTest is a new sub-class that represents a fully parsed NodeTest.
2387 (WebCore::XPath::Step::axis):
2388 (WebCore::XPath::Step::nodeTest):
2389 (WebCore::XPath::Step::nodeTestData):
2390 (WebCore::XPath::Step::namespaceURI):
2391 (WebCore::XPath::Step::predicates):
2392 (WebCore::XPath::Step::setAxis):
2393 (WebCore::XPath::Step::setNodeTest):
2394 (WebCore::XPath::Step::setNodeTestData):
2395 (WebCore::XPath::Step::setNamespaceURI):
2396 (WebCore::XPath::Step::setPredicates):
2397 New accessors that let optimizeStepPair() manipulate Step data.
2399 * xml/XPathStep.cpp:
2400 (WebCore::XPath::Step::Step): Use the new NodeTest class.
2401 (WebCore::XPath::Step::evaluate): Cache evaluationContext in a local variable. Use swap() to avoid
2402 performing unneeded vector assignments.
2403 (WebCore::XPath::Step::nodesInAxis): Cosmetic changes.
2404 (WebCore::XPath::Step::nodeTestMatches): Use NodeTest instead of parsing the test from string each time.
2405 Added a partial implementation of XPath 2.0 element() node test.
2407 2007-03-10 Alexey Proskuryakov <ap@webkit.org>
2411 http://bugs.webkit.org/show_bug.cgi?id=12249
2412 FCKeditor: <hr>, <ul> and <ol> have id="undefined"
2414 This fixes the attached reduction, but not the original issue.
2416 Test: editing/execCommand/default-parameters.html
2420 Make second and third execCommand() parameters optional.
2422 2007-03-10 Adele Peterson <adele@apple.com>
2426 Fix for http://bugs.webkit.org/show_bug.cgi?id=13028
2427 REGRESSION: textField:doCommandBySelector:inFrame: not being called properly
2429 * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
2430 Before calling the base class defaultEventHandler, which will call handleKeypress, call doTextFieldCommandFromEvent.
2432 2007-03-10 Mitz Pettel <mitz@webkit.org>
2436 - fix http://bugs.webkit.org/show_bug.cgi?id=13013
2437 REGRESSION: Selection box does not scroll to where the focus jumps when pressing an alphanumeric key
2439 Test: fast/forms/listbox-typeahead-scroll.html
2441 * html/HTMLSelectElement.cpp:
2442 (WebCore::HTMLSelectElement::setSelectedIndex): Reordered to set the active selection's
2443 anchor and end before selecting the option, since the active selection is used to
2444 decide where to scroll when the selection is made.
2445 (WebCore::HTMLSelectElement::defaultEventHandler): Removed redundant check.
2447 2007-03-10 Mitz Pettel <mitz@webkit.org>
2451 - fix http://bugs.webkit.org/show_bug.cgi?id=12973
2452 REGRESSION: Reproducible assert while loading this test file if css is already in the cache
2454 Test: fast/dom/css-cached-import-rule.html
2456 Replaced some direct calls to document->stylesheetLoaded() with calls to
2457 the sheet's checkLoaded(). The latter calls back to the element's sheetLoaded() --
2458 which notifies the document of the load -- and then updates the sheet's
2459 loadCompleted() flag, ensuring that it stays in sync with whether the stylesheet
2460 is still considered pending by the document.
2462 * dom/ProcessingInstruction.cpp:
2463 (WebCore::ProcessingInstruction::parseStyleSheet):
2464 * dom/StyleElement.cpp:
2465 (WebCore::StyleElement::childrenChanged):
2466 * html/HTMLLinkElement.cpp:
2467 (WebCore::HTMLLinkElement::process):
2468 (WebCore::HTMLLinkElement::setCSSStyleSheet):
2469 * ksvg2/svg/SVGStyleElement.cpp:
2470 (WebCore::SVGStyleElement::sheetLoaded):
2471 * ksvg2/svg/SVGStyleElement.h:
2473 2007-03-10 David Kilzer <ddkilzer@webkit.org>
2477 - fix http://bugs.webkit.org/show_bug.cgi?id=9609
2478 REGRESSION: Missing image icon needs to be moved back to WebKit
2480 * WebCore.exp: Export WebCore::Image::loadPlatformResource(const char*) for use in
2481 [WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:].
2483 2007-03-09 Darin Adler <darin@apple.com>
2487 - fix http://bugs.webkit.org/show_bug.cgi?id=8928
2488 <rdar://problem/5045708> REPRODUCIBLE ASSERT: Cannot paste HTML into a
2489 contenteditable region in an XHTML document (8928)
2491 Test: editing/pasteboard/paste-xml.xhtml
2493 * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Added a check for 0
2494 here, since createContextualFragment can return 0 for XML documents that fail
2495 to parse. In my testing, callers all seem equipped to handle 0.
2497 2007-03-09 Mitz Pettel <mitz@webkit.org>
2501 - fix http://bugs.webkit.org/show_bug.cgi?id=9929
2502 REGRESSION: crash on logging in on mijnpostbank.nl
2504 Test: http/tests/misc/onload-remove-iframe-crash-2.html
2506 The resulted from an iframe's load event handler removing the iframe
2510 (WebCore::Document::implicitClose): Bail out early if an event handler
2512 * loader/FrameLoader.cpp:
2513 (WebCore::FrameLoader::FrameLoader):
2514 (WebCore::FrameLoader::clear):
2515 (WebCore::FrameLoader::checkCompleted): Protect the frame from deletion
2517 (WebCore::FrameLoader::checkCompletedTimerFired):
2518 (WebCore::FrameLoader::scheduleCheckCompleted):
2519 (WebCore::FrameLoader::detachFromParent): Schedule a completion check
2520 on the parent (in case the child is what has been keeping it from completing).
2521 * loader/FrameLoader.h:
2523 2007-03-08 David Kilzer <ddkilzer@webkit.org>
2527 - fix http://bugs.webkit.org/show_bug.cgi?id=13019
2528 REGRESSION (r20074): Forms don't submit on a variety of websites
2530 No tests added since LayoutTests/fast/forms/document-write.html was timing out
2531 and causing a layout test failure.
2533 * html/HTMLFormElement.cpp:
2534 (WebCore::HTMLFormElement::submit): Removed stray code.
2536 2007-03-08 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
2538 Not reviewed - gdk build fix.
2540 * platform/graphics/cairo/ImageSourceCairo.cpp:
2541 (WebCore::ImageSource::frameIsCompleteAtIndex): add empty stub
2543 2007-03-08 Justin Garcia <justin.garcia@apple.com>
2545 Reviewed by harrison
2547 <rdar://problem/4903193>
2548 On particular page, Copy is so slow it seems like a hang
2550 ~2x speedup copying:
2551 http://shakespeare.mit.edu/henryviii/full.html
2552 Also produces less bloated markup.
2554 * editing/markup.cpp:
2555 (WebCore::startMarkup): Don't wrap text nodes in style spans.
2556 For Elements, don't inline styles inherited from ancestors.
2557 (WebCore::createMarkup): No longer necessary to find
2558 the root's default style and pass it to startMarkup.
2559 Add a wrapper span around the markup with the styles
2560 that all nodes in the markup inherit (the inheritable
2561 styles from the common ancestor container's computed style).
2562 Added a FIXME about unecessary markup for inline ancestors
2563 up to the commonAncestorBlock.
2565 2007-03-08 Darin Adler <darin@apple.com>
2569 - <rdar://problem/4470381> multipart/form-data boundary security vulnerability
2571 By making the form data boundary a string with some random data in it, we reduce
2572 the possibility that anyone could take advantage of it by creating a file that
2573 intentionally has the boundary string in it.
2575 * html/HTMLFormElement.h: Removed boundary(), setBoundary(), and m_boundary.
2576 Marked a lot more stuff private.
2577 * html/HTMLFormElement.cpp:
2578 (WebCore::HTMLFormElement::HTMLFormElement): Removed code to initialize
2580 (WebCore::randomNumber): Added. Function that returns a random number, including
2581 seeding the random number generator the first time it's called. For now, usees the more
2582 random function random() on Mac OS X and the more-standard rand() on other platforms.
2583 (WebCore::HTMLFormElement::formData): Take a parameter with the form boundary string,
2584 and use that instead of m_boundary.
2585 (WebCore::getUniqueBoundaryString): Added. Makes a boundary string using random numbers
2586 and base 64 encoding.
2587 (WebCore::HTMLFormElement::submit): Call getUniqueBoundaryString and pass the boundary
2588 string into formData for multipart form posts.
2590 2007-03-08 Maciej Stachowiak <mjs@apple.com>
2594 <rdar://problem/4646563> REGRESSION: Unable to send text message from Verizon text message website: vtext.com (12588)
2595 http://bugs.webkit.org/show_bug.cgi?id=12588
2597 Carefully revised which focus operations restore previous selection, which clear it, and which
2598 select the whole control contents.
2601 fast/forms/focus-selection-input.html
2602 fast/forms/focus-selection-textarea.html
2605 (WebCore::Element::focus):
2607 * html/HTMLInputElement.cpp:
2608 (WebCore::HTMLInputElement::focus):
2609 (WebCore::HTMLInputElement::accessKeyAction):
2610 * html/HTMLInputElement.h:
2611 * html/HTMLLabelElement.cpp:
2612 (WebCore::HTMLLabelElement::focus):
2613 (WebCore::HTMLLabelElement::accessKeyAction):
2614 * html/HTMLLabelElement.h:
2615 * html/HTMLLegendElement.cpp:
2616 (WebCore::HTMLLegendElement::focus):
2617 * html/HTMLLegendElement.h:
2618 * html/HTMLTextAreaElement.cpp:
2619 (WebCore::HTMLTextAreaElement::focus):
2620 * html/HTMLTextAreaElement.h:
2621 * page/FocusController.cpp:
2622 (WebCore::FocusController::advanceFocus):
2624 2007-03-08 Justin Garcia <justin.garcia@apple.com>
2626 Reviewed by harrison
2628 <http://bugs.webkit.org/show_bug.cgi?id=12244>
2629 FCKeditor: Find dialog doesn't work
2631 * bindings/js/kjs_window.cpp:
2632 (KJS::Window::find): Added. This function doesn't yet
2633 support whole word searches, searching in subframes, or
2634 opening the find dialog.
2635 (KJS::WindowFunc::callAsFunction):
2636 * bindings/js/kjs_window.h:
2639 2007-03-08 David Hyatt <hyatt@apple.com>
2641 Fix regression from throwing away frames of large animated images. Alter
2642 animated images so that they refuse to advance the animation until the
2643 current displayed frame has been fully decoded.
2647 * platform/graphics/BitmapImage.cpp:
2648 (WebCore::BitmapImage::startAnimation):
2649 (WebCore::BitmapImage::advanceAnimation):
2650 * platform/graphics/ImageSource.h:
2651 * platform/graphics/cg/ImageSourceCG.cpp:
2652 (WebCore::ImageSource::frameIsCompleteAtIndex):
2654 2007-03-08 David Hyatt <hyatt@apple.com>
2656 Fix 2% performance regression on the PLT. Increase the large animated
2657 image cutoff from 1MB to 5MB.
2659 In addition when pruning we will aggressively discard image sources.
2663 * platform/graphics/BitmapImage.cpp:
2664 (WebCore::BitmapImage::destroyDecodedData):
2666 2007-03-08 Timothy Hatcher <timothy@apple.com>
2670 <rdar://problem/4664697> highlighter SPI needs a node parameter to give more context
2672 Pass the RenderObject's node to customHighlightLineRect and paintCustomHighlight.
2675 * page/mac/FrameMac.mm:
2676 (WebCore::Frame::customHighlightLineRect):
2677 (WebCore::Frame::paintCustomHighlight):
2678 * page/mac/WebCoreFrameBridge.h:
2679 * rendering/InlineTextBox.cpp:
2680 (WebCore::InlineTextBox::paintCustomHighlight):
2681 * rendering/RenderBox.cpp:
2682 (WebCore::RenderBox::paintCustomHighlight):
2683 * rendering/RootInlineBox.cpp:
2684 (WebCore::RootInlineBox::addHighlightOverflow):
2685 (WebCore::RootInlineBox::paintCustomHighlight):
2687 2007-03-08 Justin Garcia <justin.garcia@apple.com>
2689 Reviewed by harrison
2691 <http://bugs.webkit.org/show_bug.cgi?id=13000>
2692 Range.createContextualFragment is not supported
2695 (WebCore::Range::createContextualFragment): The
2696 "startContainer" may not be a container, if the
2697 range starts inside text. In that case, look
2698 to the parent of the start node for an HTMLElement.
2700 2007-03-08 Justin Garcia <justin.garcia@apple.com>
2702 Reviewed by harrison
2704 <rdar://problem/5049671>
2705 Gmail Editor: With linked text, Remove Formatting doesn't always remove underline
2707 * editing/Editor.cpp:
2708 (WebCore::Editor::removeFormattingAndStyle): Clear removed
2709 anchors after the deletion.
2711 2007-03-08 David Kilzer <ddkilzer@webkit.org>
2713 Reviewed by NOBODY (build fix).
2715 Added missing file for r20059:
2716 <rdar://problem/4708689> -- REGRESSION: Some symbols with 2-byte display as garbage in Hotmail.
2718 File was taken from this svn repository which contained versions of ucnv.h and ucnv_err.h
2719 that were identical to ours:
2720 http://source.icu-project.org/repos/icu/icu/tags/release-3-2/source/common/unicode/ucnv_cb.h
2722 * icu/unicode/ucnv_cb.h: Added.
2724 2007-03-08 Shrikant Gangoda <shrikant.gangoda@celunite.com>
2728 * platform/graphics/cairo/ImageSourceCairo.cpp:
2729 (WebCore::ImageSource::~ImageSource):
2730 (WebCore::ImageSource::clear):
2732 2007-03-08 Oliver Hunt <oliver@apple.com>
2736 To match old TEC behaviour when using ICU we need to use
2737 a few manual fallback encodings for the GBK/EUC-CN charsets
2739 <rdar://problem/4708689> -- REGRESSION: Some symbols with 2-byte display as garbage in Hotmail.
2741 * platform/TextCodecICU.cpp:
2742 (WebCore::TextCodecICU::TextCodecICU):
2743 (WebCore::TextCodecICU::createICUConverter):
2744 (WebCore::gbkEscapes):
2745 (WebCore::gbkCallbackEscape):
2746 (WebCore::gbkCallbackSubstitute):
2747 (WebCore::TextCodecICU::encode):
2748 * platform/TextCodecICU.h:
2749 (WebCore::TextCodecICU::needsGBKFallbacks):
2750 (WebCore::TextCodecICU::setNeedsGBKFallbacks):
2752 2007-03-08 Alexey Proskuryakov <ap@webkit.org>
2756 * xml/XPathUtil.cpp:
2757 (WebCore::XPath::stringValue):
2759 2007-03-08 David Hyatt <hyatt@apple.com>
2761 This patch dramatically reduces the memory consumed by animated images. For large animated GIFs (defined for
2762 now as >1mb in terms of decoded frame buffer size), we will now aggressively flush previous frames of the
2763 animated GIF and just re-decode them on the fly if the animation loops.
2765 Whenever a large animated GIF has its animation reset, we will also just throw out everything and start
2766 the animation over (in order to get rid of any cached detritus held in the ImageSource).
2768 With this patch and the sample GIF used to test, WebKit's memory consumption went from 160MB down to 16MB.
2772 * platform/graphics/BitmapImage.cpp:
2773 (WebCore::BitmapImage::destroyDecodedData):
2774 (WebCore::BitmapImage::resetAnimation):
2775 (WebCore::BitmapImage::advanceAnimation):
2776 * platform/graphics/ImageSource.h:
2777 * platform/graphics/cg/ImageSourceCG.cpp:
2778 (WebCore::ImageSource::~ImageSource):
2779 (WebCore::ImageSource::clear):
2781 2007-03-08 Alexey Proskuryakov <ap@webkit.org>
2785 http://bugs.webkit.org/show_bug.cgi?id=13006
2786 XPath string-value is broken for some node types
2788 Test: fast/xpath/string-value.html
2790 * xml/XPathUtil.cpp:
2791 (WebCore::XPath::stringValue): Fix it :-)
2793 2007-03-07 Anders Carlsson <acarlsson@apple.com>
2797 <rdar://problem/4981000>
2798 http://bugs.webkit.org/show_bug.cgi?id=12634
2799 REGRESSION: crash loading web archive (12634)
2801 The reason this bug wasn't always reproducible is that it involved sending an event to a plugin while
2802 the page was loading. Before we send the event to the plugin we defer loads. The problem was that
2803 MainResourceLoader::setDefersLoad would not work with data loads.
2805 * loader/DocumentLoader.cpp:
2806 (WebCore::DocumentLoader::setRequest):
2807 Only set m_committed to false if we also have a valid unreachable URL.
2809 * loader/MainResourceLoader.cpp:
2810 (WebCore::MainResourceLoader::setDefersLoading):
2811 Make sure to stop and start data loads.
2813 2007-03-07 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
2819 * platform/gdk/EditorClientGdk.cpp:
2820 (WebCore::EditorClientGdk::handleKeypress): renamed
2821 (WebCore::EditorClientGdk::handleInputMethodKeypress): add a stub
2822 * platform/gdk/EditorClientGdk.h:
2823 * platform/graphics/cairo/ImageSourceCairo.cpp:
2824 (WebCore::ImageSource::destroyFrameAtIndex): add a stub
2826 2007-03-07 Alexey Proskuryakov <ap@webkit.org>
2830 http://bugs.webkit.org/show_bug.cgi?id=13004
2831 Repeatedly calling XPathExpression.evaluate() causes crashes or memory leaks
2833 Removed XPath::Expression::optimize() and related methods, since they were buggy and almost useless.
2834 Merged doEvaluate() into evaluate(), since this was all evaluate() was doing after the above changes.
2836 Test: fast/xpath/evaluate-twice.html
2838 * xml/XPathExpression.cpp:
2839 (WebCore::XPathExpression::evaluate):
2840 * xml/XPathExpressionNode.cpp:
2841 (WebCore::XPath::Expression::Expression):
2842 (WebCore::XPath::Expression::~Expression):
2843 * xml/XPathExpressionNode.h:
2844 * xml/XPathFunctions.cpp:
2845 (WebCore::XPath::FunLast::evaluate):
2846 (WebCore::XPath::FunPosition::evaluate):
2847 (WebCore::XPath::FunId::evaluate):
2848 (WebCore::XPath::FunLocalName::evaluate):
2849 (WebCore::XPath::FunNamespaceURI::evaluate):
2850 (WebCore::XPath::FunName::evaluate):
2851 (WebCore::XPath::FunCount::evaluate):
2852 (WebCore::XPath::FunString::evaluate):
2853 (WebCore::XPath::FunConcat::evaluate):
2854 (WebCore::XPath::FunStartsWith::evaluate):
2855 (WebCore::XPath::FunContains::evaluate):
2856 (WebCore::XPath::FunSubstringBefore::evaluate):
2857 (WebCore::XPath::FunSubstringAfter::evaluate):
2858 (WebCore::XPath::FunSubstring::evaluate):
2859 (WebCore::XPath::FunStringLength::evaluate):
2860 (WebCore::XPath::FunNormalizeSpace::evaluate):
2861 (WebCore::XPath::FunTranslate::evaluate):
2862 (WebCore::XPath::FunBoolean::evaluate):
2863 (WebCore::XPath::FunNot::evaluate):
2864 (WebCore::XPath::FunTrue::evaluate):
2865 (WebCore::XPath::FunLang::evaluate):
2866 (WebCore::XPath::FunFalse::evaluate):
2867 (WebCore::XPath::FunNumber::evaluate):
2868 (WebCore::XPath::FunSum::evaluate):
2869 (WebCore::XPath::FunFloor::evaluate):
2870 (WebCore::XPath::FunCeiling::evaluate):
2871 (WebCore::XPath::FunRound::evaluate):
2872 * xml/XPathPath.cpp:
2873 (WebCore::XPath::Filter::evaluate):
2874 (WebCore::XPath::LocationPath::evaluate):
2875 (WebCore::XPath::Path::evaluate):
2877 * xml/XPathPredicate.cpp:
2878 (WebCore::XPath::Number::evaluate):
2879 (WebCore::XPath::StringExpression::evaluate):
2880 (WebCore::XPath::Negative::evaluate):
2881 (WebCore::XPath::NumericOp::evaluate):
2882 (WebCore::XPath::EqTestOp::evaluate):
2883 (WebCore::XPath::LogicalOp::evaluate):
2884 (WebCore::XPath::Union::evaluate):
2885 * xml/XPathPredicate.h:
2886 * xml/XPathStep.cpp:
2888 * xml/XPathVariableReference.cpp:
2889 (WebCore::XPath::VariableReference::evaluate):
2890 * xml/XPathVariableReference.h:
2892 2007-03-07 Sam Weinig <sam@webkit.org>
2896 Remove unused #import from Objective-C bindings and cleanup the order of #imports.
2898 * bindings/scripts/CodeGeneratorObjC.pm:
2900 2007-03-07 Sam Weinig <sam@webkit.org>
2904 Make sure the baseURI attribute generates for private Objective-C bindings.
2908 2007-03-07 Anders Carlsson <acarlsson@apple.com>
2912 <rdar://problem/4874059>
2913 REGRESSION: Painter IX:register - Crash in WebCore:: ResourceLoader::willSendRequest()
2915 If a load is done from inside of an error delegate method that is called because we cancel another load,
2916 the first load should be ignored since this is what shipping WebKit does.
2918 (Actually, it does load the page in the data source but doesn't do anything with it since the data source
2919 won't have a web frame).
2921 * loader/FrameLoader.cpp:
2922 (WebCore::FrameLoader::load):
2923 Just bail out if m_isStoppingLoad is true.
2925 2007-03-07 David Hyatt <hyatt@apple.com>
2927 Use CGImageRelease instead of CFRelease.
2931 * platform/graphics/cg/ImageCG.cpp:
2932 (WebCore::FrameData::clear):
2933 * platform/graphics/cg/ImageSourceCG.cpp:
2934 (WebCore::ImageSource::destroyFrameAtIndex):
2936 2007-03-07 David Hyatt <hyatt@apple.com>
2938 Fix a regression where the cache size overflows because of a double
2939 subtraction per resource when they got removed from the cache. Add an
2940 assert to adjustSize to detect this case in the future.
2942 Fix ImageSourceCG so that when we flush decoded data from our cache that
2943 we also flush it from the ImageSource.
2948 (WebCore::Cache::adjustSize):
2949 * platform/graphics/BitmapImage.cpp:
2950 (WebCore::BitmapImage::~BitmapImage):
2951 (WebCore::BitmapImage::destroyDecodedData):
2952 * platform/graphics/Image.h:
2953 * platform/graphics/ImageSource.h:
2954 * platform/graphics/cg/ImageSourceCG.cpp:
2955 (WebCore::ImageSource::setData):
2956 (WebCore::ImageSource::destroyFrameAtIndex):
2958 2007-03-07 Mitz Pettel <mitz@webkit.org>
2962 - fix http://bugs.webkit.org/show_bug.cgi?id=13002
2963 Incomplete repaint of inset outlines
2965 Test: fast/repaint/outline-inset.html
2967 * rendering/RenderObject.cpp:
2968 (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
2970 2007-03-07 Oliver Hunt <oliver@apple.com>
2974 Reset mouse down/drag state variables on mouse button release
2976 Fixes <rdar://problem/5044654>: Drag out of some QuickTime plug-ins converting into image drag
2978 * page/EventHandler.cpp:
2979 (WebCore::EventHandler::handleMouseReleaseEvent):
2981 2007-03-07 Adele Peterson <adele@apple.com>
2985 WebCore part of fix for:
2986 http://bugs.webkit.org/show_bug.cgi?id=10871
2987 http://bugs.webkit.org/show_bug.cgi?id=12677
2988 <rdar://problem/4823129> REGRESSION: IME key events different in nightly
2989 <rdar://problem/4759563> REGRESSION: Return key is always sent when you confirm a clause in kotoeri
2991 * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): Call handleInputMethodKeypress before actually dispatching the keypress event
2992 so that input methods have a chance to handle the event.
2993 If the input method handles the event (by marking or unmarking text), then we don't need to send the keypress event.
2994 If an input method doesn't handle the event, then we'll save the data we need to perform the correct action (like what text to insert or what selector to use)
2995 when we dispatch the keypress event.
2997 * dom/KeyboardEvent.h: Added Mac-specific KeypressCommand struct, so we can store command info during handleInputMethodKeypress, and use it during handleKeypress.
2998 (WebCore::KeyboardEvent::keypressCommand):
2999 (WebCore::KeyboardEvent::setKeypressCommand):
3001 * bridge/EditorClient.h:
3002 * editing/Editor.cpp:
3003 (WebCore::Editor::handleKeypress): Changed handleKeyPress to handleKeypress.
3004 (WebCore::Editor::handleInputMethodKeypress): Added.
3007 * platform/graphics/svg/SVGImageEmptyClients.h:
3008 (WebCore::SVGEmptyEditorClient::handleKeypress): Changed handleKeyPress to handleKeypress.
3009 (WebCore::SVGEmptyEditorClient::handleInputMethodKeypress): Added.
3011 2007-03-07 Rob Buis <buis@kde.org>
3015 http://bugs.webkit.org/show_bug.cgi?id=12579
3016 WebKit fails SVG xml:base test
3018 Implement DOM3 properties baseURI and documentURI to fix
3019 the testcase in bug 12579.
3021 * bindings/js/kjs_dom.cpp:
3022 (KJS::DOMNode::getValueProperty):
3023 * bindings/js/kjs_domnode.h:
3026 (WebCore::Document::documentURI):
3027 (WebCore::Document::setDocumentURI):
3028 (WebCore::Document::baseURI):
3031 * dom/DocumentType.cpp:
3032 (WebCore::DocumentType::baseURI):
3033 * dom/DocumentType.h:
3035 (WebCore::Element::baseURI):
3038 (WebCore::Node::baseURI):
3040 * ksvg2/misc/SVGImageLoader.cpp:
3041 (WebCore::SVGImageLoader::updateFromElement):
3042 * ksvg2/svg/SVGImageElement.cpp:
3043 (WebCore::SVGImageElement::parseMappedAttribute):
3044 (WebCore::SVGImageElement::attach):
3046 2007-03-07 Anders Carlsson <acarlsson@apple.com>
3050 Remove some methods in FrameLoader that just calls down to the active document loader. Since each
3051 resource loader now has a pointer to its document loader, we can just call directly to the
3055 * loader/FrameLoader.cpp:
3056 * loader/FrameLoader.h:
3057 * loader/MainResourceLoader.cpp:
3058 (WebCore::MainResourceLoader::willSendRequest):
3059 (WebCore::MainResourceLoader::didReceiveResponse):
3060 * loader/SubresourceLoader.cpp:
3061 (WebCore::SubresourceLoader::SubresourceLoader):
3062 (WebCore::SubresourceLoader::didFinishLoading):
3063 (WebCore::SubresourceLoader::didFail):
3064 (WebCore::SubresourceLoader::didCancel):
3065 * loader/mac/NetscapePlugInStreamLoaderMac.mm:
3066 (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
3067 (WebCore::NetscapePlugInStreamLoader::didFail):
3068 (WebCore::NetscapePlugInStreamLoader::didCancel):
3070 2007-03-06 Geoffrey Garen <ggaren@apple.com>
3072 Reviewed by Maciej Stachowiak.
3074 Fixed <rdar://problem/4576242> | http://bugs.webkit.org/show_bug.cgi?id=12586
3075 PAC file: malloc deadlock sometimes causes a hang @ www.apple.com/pro/profiles/ (12586)
3077 No test because this is very difficult to repro, and the new ASSERTs in
3078 JavaScriptCore catch the underlying cause while running normal layout tests.
3080 This is a modified version of r14752 on the branch.
3082 The fix is to use a bit inside each node, instead of a hash table, to track
3083 which node subtrees are in the process of being marked. This avoids a call
3084 to malloc inside mark().
3086 * bindings/js/kjs_binding.cpp:
3088 (KJS::domNodesPerDocument):
3089 * bindings/js/kjs_dom.cpp:
3090 (KJS::DOMNode::mark):
3092 (WebCore::Node::Node):
3095 2007-03-06 David Hyatt <hyatt@apple.com>
3097 This patch reworks the WebCore memory cache to significantly reduce the amount of memory consumed by
3098 images in the cache and to enhance the accuracy of the cache size as an absolute bound for the objects
3099 contained within it. WebCore's memory use over time should significantly improve as a result of these
3102 Cached resources now have both an encoded size (the original data stream) and a decoded size (an estimate of
3103 the amount of memory consumed by an expanded version of that resource, e.g., the decoded frames of an image).
3104 Both sizes now count towards the total size of the object and towards the allowed memory cache total.
3106 By including both totals the reported size of resources will now be larger, and the cache will therefore become
3107 much more aggressive about flushing.
3109 Objects are stored in size-adjusted and popularity-aware LRU lists as before, but encoded size is now always
3110 used when determining the correct LRU list.
3112 The flush algorithm for the memory cache has been rewritten to first destroy decoded data before evicting
3113 resources. By being able to compact its resources without evicting them, the memory cache can now hold many more
3114 unique resources (encoded) in the same amount of space. Depending on how much of a hit we want to take from
3115 re-decoding images, the memory cache could in theory have its size significantly reduced now while still holding
3116 more resources than it did at the larger size!
3120 * WebCore.xcodeproj/project.pbxproj:
3122 (WebCore::Cache::requestResource):
3123 (WebCore::Cache::prune):
3124 (WebCore::Cache::remove):
3125 (WebCore::Cache::lruListFor):
3126 (WebCore::Cache::adjustSize):
3128 * loader/CachedCSSStyleSheet.cpp:
3129 (WebCore::CachedCSSStyleSheet::data):
3130 * loader/CachedImage.cpp:
3131 (WebCore::CachedImage::CachedImage):
3132 (WebCore::CachedImage::allReferencesRemoved):
3133 (WebCore::CachedImage::clear):
3134 (WebCore::CachedImage::data):
3135 (WebCore::CachedImage::destroyDecodedData):
3136 (WebCore::CachedImage::decodedSize):
3137 (WebCore::CachedImage::decodedSizeChanged):
3138 (WebCore::CachedImage::shouldPauseAnimation):
3139 * loader/CachedImage.h:
3140 * loader/CachedResource.cpp:
3141 (WebCore::CachedResource::CachedResource):
3142 (WebCore::CachedResource::deref):
3143 (WebCore::CachedResource::setEncodedSize):
3144 * loader/CachedResource.h:
3145 (WebCore::CachedResource::allReferencesRemoved):
3146 (WebCore::CachedResource::size):
3147 (WebCore::CachedResource::encodedSize):
3148 (WebCore::CachedResource::decodedSize):
3149 (WebCore::CachedResource::destroyDecodedData):
3150 * loader/CachedScript.cpp:
3151 (WebCore::CachedScript::data):
3152 * loader/CachedXSLStyleSheet.cpp:
3153 (WebCore::CachedXSLStyleSheet::data):
3154 * platform/graphics/BitmapImage.cpp:
3155 (WebCore::BitmapImage::BitmapImage):
3156 (WebCore::BitmapImage::~BitmapImage):
3157 (WebCore::BitmapImage::destroyDecodedData):
3158 (WebCore::BitmapImage::pruneDecodedDataIfNeeded):
3159 (WebCore::BitmapImage::cacheFrame):
3160 (WebCore::BitmapImage::setNativeData):
3161 (WebCore::BitmapImage::shouldAnimate):
3162 (WebCore::BitmapImage::advanceAnimation):
3163 * platform/graphics/BitmapImage.h:
3164 (WebCore::BitmapImage::decodedSize):
3165 * platform/graphics/Image.cpp:
3166 (WebCore::Image::Image):
3167 * platform/graphics/Image.h:
3168 (WebCore::Image::destroyDecodedData):
3169 (WebCore::Image::decodedSize):
3170 (WebCore::Image::imageObserver):
3171 * platform/graphics/ImageAnimationObserver.h: Removed.
3172 * platform/graphics/ImageObserver.h: Added.
3173 (WebCore::ImageObserver::~ImageObserver):
3174 * platform/graphics/svg/SVGImage.cpp:
3175 (WebCore::SVGImage::SVGImage):
3176 * platform/graphics/svg/SVGImage.h:
3178 2007-03-06 Alexey Proskuryakov <ap@webkit.org>
3180 Reviewed by Sam Weinig.
3182 http://bugs.webkit.org/show_bug.cgi?id=12987
3183 Fix and import 4XPath test_numeric_expr.html
3185 * xml/XPathPredicate.cpp:
3186 (WebCore::XPath::Negative::doEvaluate): Convert the argument to number.
3187 (WebCore::XPath::NumericOp::doEvaluate): Convert the arguments to numbers. Use a correct operation for mod.
3188 * xml/XPathStep.cpp:
3189 (WebCore::XPath::Step::nodesInAxis): Do not append parent node if there is none.
3190 * xml/XPathValue.cpp:
3191 (WebCore::XPath::Value::toNumber): Do not convert to DeprecatedString just to trim whitespace and to convert to double.
3192 * platform/DeprecatedString.cpp:
3193 (WebCore::DeprecatedStringData::makeAscii): Added a FIXME about unreliable makeAscii() behavior.
3195 2007-03-06 Maciej Stachowiak <mjs@apple.com>
3199 <rdar://problem/4619663> REGRESSION (NativePopup): Popup menu doesn't draw at the correct vertical position (9816)
3201 * platform/mac/PopupMenuMac.mm:
3202 (WebCore::PopupMenu::show): Make a temporary dummy view with the
3203 passed in rect, since AppKit will use the view bounds to determine
3204 what area to exclude when popping up a menu moved to the top of
3207 2007-03-06 Geoffrey Garen <ggaren@apple.com>
3209 Reviewed by Maciej Stachowiak.
3211 Fixed all known crashers exposed by run-webkit-tests --threaded [*]. See
3212 JavaScriptCore ChangeLog for more details.
3214 * bindings/js/kjs_binding.cpp:
3215 (KJS::domNodesPerDocument): Added thread safety ASSERT.
3216 (KJS::ScriptInterpreter::mark): Removed obsolete logic for marking unsafe
3217 objects when collecting on a secondary thread. The Collector takes care
3220 * bindings/js/kjs_binding.h:
3221 (KJS::DOMObject::DOMObject): Used new API for specifying that WebCore
3222 objects should be garbage collected on the main thread only.
3224 * bindings/js/kjs_window.cpp:
3225 (KJS::ScheduledAction::execute): Moved JSLock to cover implementedsCall() call,
3226 which, for some subclasses, ends up allocating garbage collected objects.
3227 (This fix was speculative. I didn't actually see a crash from this.)
3228 (KJS::Window::timerFired): Added JSLock around ScheduleAction destruction,
3229 since it destroys a KJS::List.
3231 * bindings/objc/WebScriptObject.mm:
3232 (-[WebScriptObject setException:]): Added JSLock. (This fix was speculative.
3233 I didn't actually see a crash from this.)
3235 * bridge/mac/WebCoreScriptDebugger.mm:
3236 (-[WebCoreScriptCallFrame evaluateWebScript:]): Added JSLock. (This fix
3237 was speculative. I didn't actually see a crash from this.)
3240 (WebCore::Document::~Document): Added JSLock around modification to
3241 domNodesPerDocument(), which can be accessed concurrently during garbage
3244 (WebCore::Node::setDocument): ditto.
3246 [*] fast/js/toString-stack-overflow.html is an exception. --threaded mode
3247 crashes this test because it causes the garbage collector to run frequently,
3248 and this test crashes if you happen to garbage collect while it's running.
3249 This is a known issue with stack overflow during the mark phase. It's
3250 not related to threading.
3252 2007-03-06 Mark Rowe <mrowe@apple.com>
3254 Reviewed by Sam Weinig.
3256 Fix http://bugs.webkit.org/show_bug.cgi?id=12942
3257 Bug 12942: ASSERTION FAILURE: qantas.com.au changing selected item in <select> via JS
3259 Test: fast/dom/select-selectedIndex-bug-12942.html.
3261 * html/HTMLSelectElement.cpp:
3262 (WebCore::HTMLSelectElement::recalcListItems): Reset m_lastOnChangeIndex when recalculating list items.
3263 * html/HTMLSelectElement.h:
3265 2007-03-06 Brady Eidson <beidson@apple.com>
3267 Rubberstamped by Kevin Decker
3271 * ChangeLog: Point out revision 20,000
3273 2007-03-06 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
3279 * loader/gdk/FrameLoaderClientGdk.cpp: update userAgent() signature.
3280 (WebCore::FrameLoaderClientGdk::userAgent):
3281 * loader/gdk/FrameLoaderClientGdk.h: ditto.
3283 2007-03-06 Mitz Pettel <mitz@webkit.org>
3287 - fix http://bugs.webkit.org/show_bug.cgi?id=12986
3288 REGRESSION(NativeListBox): Listboxes not updated when resized dynamically
3290 Test: fast/forms/select-change-listbox-size.html
3292 * html/HTMLSelectElement.cpp:
3293 (WebCore::HTMLSelectElement::parseMappedAttribute): Reattach on list box size change.
3295 2007-03-06 Mitz Pettel <mitz@webkit.org>
3297 Reviewed by Dave Hyatt.
3299 - fix http://bugs.webkit.org/show_bug.cgi?id=12885
3300 REGRESSION (r19696): Incomplete background repaint
3302 Tests: fast/repaint/content-into-overflow.html
3303 fast/repaint/overflow-into-content.html
3305 Changed repaintAfterLayoutIfNeeded() to take, in addition to the clipped overflow
3306 rect, the unclipped border box plus outline, and to repaint any areas that
3307 were added or removed from that box, in addition to any areas added or removed
3308 from the clipped overflow rect.
3310 * platform/graphics/svg/SVGResourceMarker.cpp:
3311 (WebCore::SVGResourceMarker::draw):
3312 * rendering/RenderBlock.cpp:
3313 (WebCore::RenderBlock::layoutBlock):
3314 * rendering/RenderBox.cpp:
3315 (WebCore::RenderBox::absoluteClippedOverflowRect): Renamed getAbsoluteRepaintRect() to
3317 * rendering/RenderBox.h:
3318 * rendering/RenderFlexibleBox.cpp:
3319 (WebCore::RenderFlexibleBox::layoutBlock):
3320 * rendering/RenderFlow.cpp:
3321 (WebCore::RenderFlow::absoluteClippedOverflowRect):
3322 * rendering/RenderFlow.h:
3323 * rendering/RenderForeignObject.cpp:
3324 (WebCore::RenderForeignObject::layout):
3325 * rendering/RenderHTMLCanvas.cpp:
3326 (WebCore::RenderHTMLCanvas::layout):
3327 * rendering/RenderImage.cpp:
3328 (WebCore::RenderImage::layout):
3329 * rendering/RenderLayer.cpp:
3330 (WebCore::RenderLayer::RenderLayer):
3331 (WebCore::RenderLayer::checkForRepaintOnResize):
3332 (WebCore::RenderLayer::updateLayerPositions):
3333 * rendering/RenderLayer.h:
3334 * rendering/RenderObject.cpp:
3335 (WebCore::RenderObject::repaint):
3336 (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
3337 (WebCore::RenderObject::getAbsoluteRepaintRectWithOutline):
3338 (WebCore::RenderObject::absoluteClippedOverflowRect):
3339 (WebCore::RenderObject::absoluteOutlineBox):
3340 * rendering/RenderObject.h:
3341 * rendering/RenderPath.cpp:
3342 (WebCore::RenderPath::layout):
3343 (WebCore::RenderPath::absoluteClippedOverflowRect):
3344 (WebCore::RenderPath::absoluteRects):
3345 (WebCore::RenderPath::drawMarkersIfNeeded):
3346 * rendering/RenderPath.h:
3347 * rendering/RenderSVGContainer.cpp:
3348 (WebCore::RenderSVGContainer::layout):
3349 (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
3350 (WebCore::RenderSVGContainer::absoluteRects):
3351 * rendering/RenderSVGContainer.h:
3352 * rendering/RenderSVGHiddenContainer.cpp:
3353 (WebCore::RenderSVGHiddenContainer::absoluteClippedOverflowRect):
3354 * rendering/RenderSVGHiddenContainer.h:
3355 * rendering/RenderSVGImage.cpp:
3356 (WebCore::RenderSVGImage::imageChanged):
3357 (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
3358 (WebCore::RenderSVGImage::absoluteRects):
3359 * rendering/RenderSVGImage.h:
3360 * rendering/RenderSVGText.cpp:
3361 (WebCore::RenderSVGText::absoluteClippedOverflowRect):
3362 (WebCore::RenderSVGText::layout):
3363 (WebCore::RenderSVGText::absoluteRects):
3364 * rendering/RenderSVGText.h:
3365 * rendering/RenderTable.cpp:
3366 (WebCore::RenderTable::layout):
3367 * rendering/RenderTableCell.cpp:
3368 (WebCore::RenderTableCell::absoluteClippedOverflowRect):
3369 * rendering/RenderTableCell.h:
3370 * rendering/RenderTableCol.cpp:
3371 (WebCore::RenderTableCol::absoluteClippedOverflowRect):
3372 * rendering/RenderTableCol.h:
3373 * rendering/RenderTableRow.cpp:
3374 (WebCore::RenderTableRow::absoluteClippedOverflowRect):
3375 * rendering/RenderTableRow.h:
3376 * rendering/RenderText.cpp:
3377 (WebCore::RenderText::absoluteClippedOverflowRect):
3378 * rendering/RenderText.h:
3380 2007-03-06 Ian Eng <ian.eng.webkit@gmail.com>
3384 - fixed http://bugs.webkit.org/show_bug.cgi?id=12720
3385 Bug 12720: Re-defining window.location.toString function keeps re-loading forever
3387 * bindings/js/kjs_window.cpp:
3388 Disallow replacing functions in LocationTable, and return early without updating URL.
3390 2007-03-06 Kevin McCullough <kmccullough@apple.com>
3394 <http://bugs.webkit.org/show_bug.cgi?id=12686>
3395 REGRESSION: Bloglines.com Feeds tab cannot expand folders in TOT
3396 - Now all class constructors implement implementsHasInstance.
3398 * bindings/scripts/CodeGeneratorJS.pm:
3400 2007-03-07 Nikolas Zimmermann <zimmermann@kde.org>
3402 Reviewed by Rob & Oliver.
3404 Preparations for the new SVG text engine.
3406 Handle baseline-shift / kerning css values correctly.
3407 Recognize missing svg presentation attribute "font-size-adjust".
3408 Add all missing svg<->css property mappings in mapToEntry().
3410 Doesn't affect any layout test (as these properties are not used w/o my text patch).
3411 While I'm at it, unify the macro names (RS_ -> SVG_RS_) & cleanup style a bit.
3413 * ksvg2/css/CSSPropertyNames.in:
3414 * ksvg2/css/SVGCSSParser.cpp:
3415 (WebCore::CSSParser::parseSVGValue):
3416 * ksvg2/css/SVGCSSStyleSelector.cpp:
3417 (WebCore::CSSStyleSelector::applySVGProperty):
3418 * ksvg2/css/SVGRenderStyle.cpp:
3419 (WebCore::SVGRenderStyle::SVGRenderStyle):
3420 (WebCore::SVGRenderStyle::operator==):
3421 (WebCore::SVGRenderStyle::inheritedNotEqual):
3422 (WebCore::SVGRenderStyle::inheritFrom):
3423 * ksvg2/css/SVGRenderStyle.h:
3424 (WebCore::SVGRenderStyle::NonInheritedFlags::):
3425 (WebCore::SVGRenderStyle::setBitDefaults):
3426 * ksvg2/css/SVGRenderStyleDefs.cpp:
3427 (StyleTextData::StyleTextData):
3428 (StyleTextData::operator==):
3429 (StyleMiscData::StyleMiscData):
3430 (StyleMiscData::operator==):
3431 * ksvg2/css/SVGRenderStyleDefs.h:
3433 (WebCore::StyleTextData::operator!=):
3434 * ksvg2/svg/SVGStyledElement.cpp:
3435 (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName):
3437 2007-03-06 Justin Garcia <justin.garcia@apple.com>
3441 <http://bugs.webkit.org/show_bug.cgi?id=12245>
3442 FCKeditor: Remove Format sometimes doesn't work
3443 <rdar://problem/4786404>
3444 Underline style is not removed from selection after performing Remove Format
3446 * editing/Editor.cpp:
3447 (WebCore::Editor::removeFormattingAndStyle): Re-wrote this.
3449 2007-03-07 Nikolas Zimmermann <zimmermann@kde.org>
3453 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12979
3454 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12981
3456 Guard against registering pending resources with empty id.
3457 Be careful with calling recalcStyle() in SVGUseElement, when change is "Detach" we
3458 have to use special code, as calling attach() on the shadow tree root element will crash,
3459 because it has no (direct) parent node, only a shadow parent node element.
3461 * ksvg2/misc/SVGDocumentExtensions.cpp:
3462 (WebCore::SVGDocumentExtensions::addPendingResource):
3463 * ksvg2/svg/SVGUseElement.cpp:
3464 (WebCore::SVGUseElement::recalcStyle):
3466 2007-03-06 Kevin Decker <kdecker@apple.com>
3470 Fixed: <rdar://problem/5041660> REGRESSION: <keygen> element broken, prevents users from signing up for Thawte email certs
3472 * bindings/objc/DOM.mm:
3473 (WebCore::createElementClassMap): Added <keygen> to the DOM bindings so it can be accessed from Objective-C.
3474 * css/html4.css: Apply the look of the <select> element to <keygen>.
3475 * html/HTMLElementFactory.cpp:
3476 (WebCore::keygenConstructor): Added.
3477 (WebCore::createFunctionMap): Added keygen.
3478 * html/HTMLSelectElement.cpp: Made const typeAheadTimeout variable static const.
3479 (WebCore::HTMLSelectElement::HTMLSelectElement): Fix both HTMLSelectElement constructors to initialize the
3480 same number of member variables. The fact that some fields were not initialized could (and would) crash the
3481 keygen element when selecting different items. Also removed m_typedString(String()) from the constructor
3482 initialization because this is not needed.
3484 2007-03-06 Kevin McCullough <kmccullough@apple.com>
3488 - Rename a function to clarify its purpose.
3491 * loader/FrameLoader.cpp:
3492 (WebCore::FrameLoader::registerURLSchemeAsLocal):
3493 * loader/FrameLoader.h:
3495 2007-03-06 Adam Roben <aroben@apple.com>
3499 * WebCore.exp: Updated symbols.
3501 2007-03-06 Adam Roben <aroben@apple.com>
3505 Added a parameter to all StringTruncator methods to specify whether
3506 rounding hacks should be on or off.
3508 No layout test possible.
3510 * platform/StringTruncator.cpp:
3511 (WebCore::stringWidth): Added disableRoundingHacks parameter.
3512 (WebCore::truncateString): Ditto.
3513 (WebCore::StringTruncator::centerTruncate): Ditto.
3514 (WebCore::StringTruncator::rightTruncate): Ditto.
3515 (WebCore::StringTruncator::width): Ditto.
3516 * platform/StringTruncator.h: Ditto.
3517 * platform/mac/FileChooserMac.mm:
3518 (WebCore::FileChooser::basenameForWidth): Pass in false to
3519 centerTruncate so that the truncation matches the way the text will be
3522 2007-03-06 Anders Carlsson <acarlsson@apple.com>
3526 <rdar://problem/5035045>
3527 REGRESSION: WebKit browser doesn't display image at http://www.metoffice.gov.uk/weather/satellite/index.html
3529 It turns out WinIE does allow you to access images by their id as special document properties. However, this is only
3530 allowed when the element also has a name attribute. The value of the name attribute is ignored and can even be empty!
3532 * bindings/js/kjs_html.cpp:
3533 (KJS::JSHTMLDocument::namedItemGetter):
3534 Return jsUndefined() if the collection is empty.
3536 * html/HTMLImageElement.cpp:
3537 (WebCore::HTMLImageElement::parseMappedAttribute):
3538 (WebCore::HTMLImageElement::insertedIntoDocument):
3539 (WebCore::HTMLImageElement::removedFromDocument):
3540 * html/HTMLImageElement.h:
3541 Add the id attribute value to the extra named item map.
3543 * html/HTMLNameCollection.cpp:
3544 (WebCore::HTMLNameCollection::traverseNextItem):
3545 Check for images with name attributes that match, as well as elements with id attributes that match where
3546 the element also has a name attribute.
3548 2007-03-06 Anders Carlsson <acarlsson@apple.com>
3552 WebCore part of patch to make it possible to have different user agents for different URLs.
3554 * bindings/js/kjs_navigator.cpp:
3555 (KJS::Navigator::getValueProperty):
3556 * bindings/js/kjs_proxy.cpp:
3557 (WebCore::KJSProxy::initScriptIfNeeded):
3558 * loader/DocumentLoader.cpp:
3559 (WebCore::DocumentLoader::setLoading):
3560 * loader/FrameLoader.cpp:
3561 (WebCore::FrameLoader::userAgent):
3562 (WebCore::FrameLoader::loadResourceSynchronously):
3563 (WebCore::FrameLoader::applyUserAgent):
3564 * loader/FrameLoader.h:
3565 * loader/FrameLoaderClient.h:
3566 * platform/graphics/svg/SVGImageEmptyClients.h:
3567 (WebCore::SVGEmptyFrameLoaderClient::userAgent):
3569 2007-03-05 Kevin McCullough <kmccullough@apple.com>
3571 Reviewed by Mark and Dave H.
3573 - rdar://problem/5038491
3574 An oversight of the security fix that prevented remote from loading local is that it
3575 prevents user style sheets when the site is remote. This fixes that.
3577 * loader/Cache.cpp: Propogate and check user style sheet flag.
3578 (WebCore::createResource):
3579 (WebCore::Cache::requestResource):
3580 * loader/Cache.h: Propogate user style sheet flag.
3581 * loader/CachedCSSStyleSheet.cpp: Propogate user style sheet flag.
3582 (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
3583 * loader/CachedCSSStyleSheet.h: Propogate user style sheet flag.
3584 * loader/DocLoader.cpp: Propogate user style sheet flag.
3585 (WebCore::DocLoader::requestResource):
3586 * loader/SubresourceLoader.cpp: Propogate and check user style sheet flag.
3587 (WebCore::SubresourceLoader::create):
3588 * loader/SubresourceLoader.h: Add check for user style sheet flag.
3589 * loader/loader.cpp: Propogate user style sheet flag.
3590 (WebCore::Loader::load):
3591 (WebCore::Loader::servePendingRequests):
3592 * loader/loader.h: Propogate user style sheet flag.
3594 2007-03-06 Nikolas Zimmermann <zimmermann@kde.org>
3598 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12936 (Master bug used to track all current use problems.)
3600 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12926 (transform attribute not respected in nested <use> elements)
3601 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12267 (getElementById broken for <use>)
3602 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12916 (use instance in symbol definition does not work)
3603 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12917 (mouseout event does not occur after scaling use instance)
3604 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12838 (SVG <use> DOM broken for script)
3606 Added test: svg/custom/use-nested-transform.svg
3607 Added test: svg/custom/struct-use-09-b.svg (not yet official W3C-SVG-1.1 testcase)
3608 Fixes test: svg/custom/use-elementInstance-event-target.svg (rectangle now turns green on first click)
3610 Fix all (except one) known <use> bug. The remaining bug (12630) is not crucical at all.
3611 Enable <use> again as default SVG feature, as discussed on webkit-dev.
3613 dom/Element.cpp needed following tweak: set hasParentStyle to true, if there is no parentNode
3614 available - which happens for <use> nodes, as it's a shadow node. This fixes recalcStyle behaviour.
3615 Override recalcStyle() in SVGUseElement, and properly forward the call to the shadow tree root element.
3616 The shadow tree now receives proper style updates (without having to recreate the whole tree!).
3618 Override attributeChanged() in SVGUseElement and only call notifyAttributeChange if one of x/y/width/height/xlink:href
3619 attribute changed - otherwhise we'll end up recreating the tree for every transform/style/(non-existing-attribute) change.
3621 Do not override transform in nested use situations, but correctly append (right-sided) the translation of the <use> element.
3622 Some cosmetic fixes: don't add transform="translate(0 0)" attributes if both x/y values are null in the shadow tree.
3624 Factor out logic for replacing symbol/svg tags in the shadow tree, and also invoke it during expandUseElementsInShadowTree -
3625 otherwhise <symbol><use xlink:href="#someOtherSymbol"></symbol> the <use> gets expanded to a <symbol>. Though no one expands
3626 the <symbol> element - and we're end up in hitting an assertion. Avoid that.
3628 * bindings/js/JSSVGElementWrapperFactory.cpp:
3629 * bindings/js/kjs_dom.cpp:
3631 * bindings/objc/DOM.mm:
3632 (WebCore::createElementClassMap):
3634 (WebCore::Element::recalcStyle):
3635 * ksvg2/svg/SVGElement.cpp:
3636 (WebCore::shadowTreeParentElementForShadowTreeElement):
3637 (WebCore::SVGElement::dispatchEvent):
3638 * ksvg2/svg/SVGElementInstance.cpp:
3639 * ksvg2/svg/SVGElementInstance.h:
3640 * ksvg2/svg/SVGElementInstance.idl:
3641 * ksvg2/svg/SVGElementInstanceList.cpp:
3642 * ksvg2/svg/SVGElementInstanceList.h:
3643 * ksvg2/svg/SVGElementInstanceList.idl:
3644 * ksvg2/svg/SVGStyledElement.cpp:
3645 (WebCore::SVGStyledElement::notifyAttributeChange):
3646 (WebCore::SVGStyledElement::updateElementInstance):
3647 * ksvg2/svg/SVGStyledElement.h:
3648 * ksvg2/svg/SVGUseElement.cpp:
3649 (WebCore::SVGUseElement::attributeChanged):
3650 (WebCore::SVGUseElement::notifyAttributeChange):
3651 (WebCore::SVGUseElement::recalcStyle):
3652 (WebCore::SVGUseElement::buildPendingResource):
3653 (WebCore::SVGUseElement::buildShadowTreeForSymbolTag):
3654 (WebCore::SVGUseElement::alterShadowTreeForSVGTag):
3655 (WebCore::SVGUseElement::buildShadowTree):
3656 (WebCore::SVGUseElement::expandUseElementsInShadowTree):
3657 (WebCore::SVGUseElement::attachShadowTree):
3658 * ksvg2/svg/SVGUseElement.h:
3659 * ksvg2/svg/SVGUseElement.idl:
3660 * ksvg2/svg/svgtags.in:
3662 2007-03-05 Brady Eidson <beidson@apple.com>
3666 Fixes <rdar://problem/4974258>
3667 Adds some key null checking
3669 * bindings/js/kjs_html.cpp:
3670 (KJS::JSHTMLElement::implementsCall): Null check doc/frame
3671 * bindings/objc/DOMInternal.mm:
3672 (-[WebScriptObject _initializeScriptDOMNodeImp]): Null check doc/frame
3674 2007-03-06 Nikolas Zimmermann <zimmermann@kde.org>
3678 Path::normalAngleAtLength() / Path::pointAtLength() don't work correctly.
3679 pointAtLength() was not implemented, basically and normalAngleAtLength()
3680 had a bug in the tangent slope calculation.
3682 The normalAngleAtLength() stuff can only be tested with my local textPath support.
3683 New LayoutTest: svg/custom/path-textPath-simulation.svg
3685 * platform/graphics/Path.cpp:
3686 (WebCore::pathLengthApplierFunction):
3687 * platform/graphics/PathTraversalState.cpp:
3688 (WebCore::PathTraversalState::quadraticBezierTo):
3689 (WebCore::PathTraversalState::cubicBezierTo):
3690 * platform/graphics/PathTraversalState.h:
3691 (WebCore::PathTraversalState::):
3693 2007-03-05 Alexey Proskuryakov <ap@webkit.org>
3697 http://bugs.webkit.org/show_bug.cgi?id=12970
3698 Fix and import 4XPath test_core_functions.html test
3700 * xml/XPathExpression.cpp:
3701 (WebCore::XPathExpression::evaluate): Fully initialize the evaluation context.
3703 * xml/XPathFunctions.cpp:
3704 (WebCore::XPath::FunSubstring::doEvaluate): Fixed handling of edge cases.
3705 (WebCore::XPath::FunRound::round): Reimplemented to match the spec; exposed FunRound::round() to be used in
3708 2007-03-05 Alexey Proskuryakov <ap@webkit.org>
3712 http://bugs.webkit.org/show_bug.cgi?id=12954
3713 XPath relative operations are implemented incorrectly
3715 * xml/XPathPredicate.cpp:
3716 (WebCore::XPath::NumericOp::doEvaluate):
3717 (WebCore::XPath::EqTestOp::compare):
3718 (WebCore::XPath::EqTestOp::doEvaluate):
3719 Reimplemented relative equality operations to match the spec.
3721 * xml/XPathPredicate.h:
3722 (WebCore::XPath::NumericOp::):
3723 (WebCore::XPath::EqTestOp::):
3724 Moved relative operations to EqTestOp.
3726 * xml/XPathGrammar.y:
3727 * xml/XPathParser.cpp:
3728 (WebCore::XPath::Parser::nextTokenInternal):
3729 (WebCore::XPath::Parser::lex):
3730 Adapted for the above changes.
3732 2007-03-05 Mark Rowe <mrowe@apple.com>
3736 Fix http://bugs.webkit.org/show_bug.cgi?id=12947
3737 Bug 12947: REGRESSION: ASSERTION FAILED: maxWidth >= 0 in StringTruncator.cpp:109 in WebCore::truncateString()
3739 Handle nil window correctly in toUserSpace and toDeviceSpace. On Intel Macs a message to nil that returns a
3740 float will return 0.0. We use this as the divisor in calculating a scale factor, which results in NaN being
3741 introduced into our rect.
3743 * platform/mac/ScreenMac.mm:
3744 (WebCore::toUserSpace):
3745 (WebCore::toDeviceSpace):
3747 2007-03-05 Rob Buis <buis@kde.org>
3751 http://bugs.webkit.org/show_bug.cgi?id=12868
3752 parts of the CSS classes in this simple SVG example are not applied
3754 Make sure the xml stylesheets are parsed in strict mode.
3756 * dom/ProcessingInstruction.cpp:
3757 (WebCore::ProcessingInstruction::parseStyleSheet):
3759 2007-03-04 Adele Peterson <adele@apple.com>
3763 Change to dispatch the keypress event during the defaultEventHandler for keydown events. This matches IE behavior.
3764 This is preparation for fixing event dispatch with input methods (http://bugs.webkit.org/show_bug.cgi?id=10871)
3766 Test: fast/events/keydown-keypress-preventDefault.html
3768 * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler): Call the defaultKeyboardEventHandler for keydown events.
3769 * page/EventHandler.cpp:
3770 (WebCore::eventTargetNodeForDocument): Return 0 instead of false since the return type in EventTargetNode.
3771 (WebCore::EventHandler::keyEvent): Removed dispatch of keypress event, since this is now done in the default event handler.
3772 (WebCore::EventHandler::defaultKeyboardEventHandler): For keydown events, create and dispatch a keypress event.
3774 2007-03-04 Alexey Proskuryakov <ap@webkit.org>
3776 Reviewed by Nikolas Zimmermann (yay!).
3778 http://bugs.webkit.org/show_bug.cgi?id=12962
3779 4XPath tests crash on lang() function
3781 Covered by 4XPath tests, to be landed later.
3783 * platform/StringImpl.cpp:
3784 (WebCore::StringImpl::reverseFind): Do not crash with empty strings.
3785 * xml/XPathFunctions.cpp:
3786 (WebCore::XPath::FunLang::doEvaluate): Do not crash when an element has no
3787 attributes. Use a proper namespace for xml:lang (not sure where "xms" came from).
3788 Rewrote the algorithm for suffix removing to match the spec.
3790 2007-03-02 Anders Carlsson <acarlsson@apple.com>
3794 <rdar://problem/5028165>
3795 http://bugs.webkit.org/show_bug.cgi?id=12915
3796 REGRESSION: XMLHttpRequest.abort() does not stop loading (12915)
3798 * loader/DocumentLoader.cpp:
3799 (WebCore::DocumentLoader::stopLoading):
3800 Save the value of m_loading since calling FrameLoader::stopLoading could set it to false.
3802 * loader/SubresourceLoader.cpp:
3803 (WebCore::SubresourceLoader::didCancel):
3804 * loader/SubresourceLoader.h:
3805 Get rid of didCancel now, it's not needed anymore.
3807 * xml/xmlhttprequest.cpp:
3808 (WebCore::XMLHttpRequest::abort):
3809 Call cancel() instead of stopLoading(). Also, set m_aborted to true so the XMLHttpRequest object
3810 won't be dereferenced in didFail when aborting.
3812 2007-03-04 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
3814 Reviewed by Nikolas Zimmermann.
3816 Move ScrollView stubs to ScrollViewGdk.cpp
3818 * platform/gdk/FrameGdk.h: remove comment that no longer makes sense
3819 * platform/gdk/ScrollViewGdk.cpp:
3820 (WebCore::ScrollView::addChild):
3821 (WebCore::ScrollView::removeChild):
3822 (WebCore::ScrollView::scrollPointRecursively):
3823 (WebCore::ScrollView::inWindow):
3824 (WebCore::ScrollView::wheelEvent):
3825 (WebCore::ScrollView::updateScrollbars):
3826 (WebCore::ScrollView::updateScrollInfo):
3827 (WebCore::ScrollView::windowToContents):
3828 (WebCore::ScrollView::contentsToWindow):
3829 (WebCore::ScrollView::scrollbarUnderMouse):
3830 * platform/gdk/TemporaryLinkStubs.cpp:
3832 2007-03-02 Kevin McCullough <kmccullough@apple.com>
3836 - rdar://problem/4922454
3837 - This fixes a security issue by making remote referrers not able to access local
3838 resources, unless they register their schemes to be treated as local. The result is
3839 that those schemes can access local resources and cannot be accessed by remote
3841 Because this behavior is new a link-on-or-after check is made to determine if the
3842 app should use the older, less safe, behavior.
3844 * WebCore.exp: added exported functions
3845 * bindings/objc/DOM.mm: consolodated function to base class
3846 (-[DOMElement image]):
3847 (-[DOMElement _imageTIFFRepresentation]):
3848 * dom/Document.cpp: Cache the document's ability to load local resources.
3849 (WebCore::Document::Document):
3850 (WebCore::Document::setURL):
3851 (WebCore::Document::shouldBeAllowedToLoadLocalResources):
3852 (WebCore::Document::stylesheetLoaded):
3853 * dom/Document.h: Cache the docuent's ability to load local resources.
3854 (WebCore::Document::getPendingSheet):
3855 (WebCore::Document::isAllowedToLoadLocalResources):
3856 * html/HTMLImageLoader.cpp: Moved functionality into base class.
3857 (WebCore::HTMLImageLoader::updateFromElement):
3858 (WebCore::HTMLImageLoader::dispatchLoadEvent):
3859 * html/HTMLLinkElement.cpp: Handles null returns correctly now.
3860 * html/HTMLTokenizer.cpp: Moved functionality into base class.
3861 (WebCore::HTMLTokenizer::notifyFinished):
3862 * ksvg2/misc/SVGImageLoader.cpp: Moved functionality into base class.
3863 (WebCore::SVGImageLoader::dispatchLoadEvent):
3864 * loader/Cache.cpp: Checks if the cached resource can be loaded.
3865 (WebCore::Cache::requestResource):
3866 * loader/CachedCSSStyleSheet.cpp: Moved functionality into base class.
3867 (WebCore::CachedCSSStyleSheet::ref):
3868 (WebCore::CachedCSSStyleSheet::error):
3869 * loader/CachedImage.cpp: Moved functionality into base class.
3870 (WebCore::CachedImage::CachedImage):
3871 * loader/CachedImage.h: Moved functionality into base class.
3872 (WebCore::CachedImage::canRender):
3873 * loader/CachedResource.cpp: Cache if the CachedResource should be treated as local
3874 (WebCore::CachedResource::CachedResource):
3875 * loader/CachedResource.h: Moved functionality into base class.
3876 (WebCore::CachedResource::errorOccurred):
3877 (WebCore::CachedResource::shouldTreatAsLocal):
3878 * loader/CachedScript.cpp: Moved functionality into base class.
3879 (WebCore::CachedScript::CachedScript):
3880 * loader/CachedScript.h: Moved functionality into base class.
3881 (WebCore::CachedScript::schedule):
3882 * loader/CachedXBLDocument.cpp: Moved functionality into base class.
3883 (WebCore::CachedXBLDocument::error):
3884 * loader/CachedXSLStyleSheet.cpp: Moved functionality into base class.
3885 (WebCore::CachedXSLStyleSheet::error):
3886 * loader/FrameLoader.cpp: See comments for each function below.
3887 (WebCore::FrameLoader::loadSubframe): Use new canLoad.
3888 (WebCore::FrameLoader::restrictAccessToLocal): return value of linked-on-or-after check.
3889 (WebCore::FrameLoader::setRestrictAccessToLocal): set value for linked-on-or-after check.
3890 (WebCore::localSchemes): Return set of schemes that are to be treated as local.
3891 (WebCore::FrameLoader::loadPlugin): Use new canLoad.
3892 (WebCore::FrameLoader::canLoad): Now multiple functions that each do the same work but some can take advantage of the cached values, if they were computed previously.
3893 (WebCore::FrameLoader::shouldHideReferrer): Extracted out the logic to determine if the referrer should be hidden so it is only calculated when needed.
3894 (WebCore::FrameLoader::loadResourceSynchronously): No longer calls canLoad to get hideReferrer info.
3895 (WebCore::FrameLoader::registerSchemeAsLocal): Functionality to register a scheme to be treated as local.
3896 (WebCore::FrameLoader::treatURLAsLocal): Given a URL this function determines if it should be treated as local.
3897 * loader/FrameLoader.h: Declared functions for this security fix. See above.
3898 * loader/MainResourceLoader.cpp: Optized order of bools to regain performance.
3899 (WebCore::MainResourceLoader::continueAfterContentPolicy):
3900 * loader/SubresourceLoader.cpp: Now restricts remote from loading local resources.
3901 (WebCore::SubresourceLoader::create):
3902 * page/EventHandler.cpp: Moved functionality into base class.
3903 (WebCore::selectCursor):
3904 * platform/KURL.cpp: KURLs need to check all the registered schemes now.
3905 (WebCore::KURL::isLocalFile):
3906 * rendering/HitTestResult.cpp: Moved functionality into base class.
3907 (WebCore::HitTestResult::image):
3908 * rendering/RenderImage.cpp: Moved functionality into base class.
3909 (WebCore::RenderImage::setCachedImage):
3910 (WebCore::RenderImage::imageChanged):
3911 (WebCore::RenderImage::paint):
3912 (WebCore::RenderImage::layout):
3913 (WebCore::RenderImage::calcAspectRatioWidth):
3914 (WebCore::RenderImage::calcAspectRatioHeight):
3915 * rendering/RenderImage.h: Moved functionality into base class.
3916 (WebCore::RenderImage::errorOccurred):
3917 * rendering/RenderListItem.cpp: Moved functionality into base class.
3918 (WebCore::RenderListItem::setStyle):
3919 * rendering/RenderListMarker.cpp: Moved functionality into base class.
3920 (WebCore::RenderListMarker::isImage):
3921 * xml/xmlhttprequest.cpp: Check doc's cached value instead of determining independently.
3922 (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):
3924 2007-03-02 Justin Garcia <justin.garcia@apple.com>
3928 <rdar://problem/5028447>
3929 REGRESSION: Gmail Editor: Copied message text pastes at the wrong font size
3931 * editing/markup.cpp:
3932 (WebCore::createMarkup): The style of the div that holds
3933 a fully selected body's styles didn't include styles inherited
3934 from the body's ancestors.
3936 2007-03-02 Justin Garcia <justin.garcia@apple.com>
3938 Reviewed by harrison
3940 <rdar://problem/4545040>
3941 innerHTML does not HTML-escape text nodes inside PRE elements
3942 <rdar://problem/5027857>
3943 Pasting into Mail from Safari's view-source window renders the HTML
3945 * editing/HTMLInterchange.cpp:
3946 (WebCore::convertHTMLTextToInterchangeFormat): Send this function
3947 the node that the text comes from as a parameter. It shouldn't convert
3948 '\n's to spaces/nbsps if the text is coming from text where newlines are
3950 * editing/HTMLInterchange.h:
3951 * editing/markup.cpp:
3952 (WebCore::startMarkup): Escape text inside the children of PREs.
3954 2007-03-02 Sam Weinig <sam@webkit.org>
3958 Try to fix the Qt build.
3960 * platform/qt/TemporaryLinkStubs.cpp: Add stubs.
3961 (WebCore::searchMenuNoRecentSearchesText):
3962 (WebCore::searchMenuRecentSearchesText):
3963 (WebCore::searchMenuClearRecentSearchesText):
3964 (WebCore::AXWebAreaText):
3965 (WebCore::AXLinkText):
3966 (WebCore::AXListMarkerText):
3967 (WebCore::AXImageMapText):
3968 (WebCore::AXHeadingText):
3970 2007-03-02 David Harrison <harrison@apple.com>
3974 A more efficient solution to rdar://4961431.
3976 * bridge/mac/WebCoreAXObject.mm:
3977 (-[WebCoreAXObject accessibilityIsIgnored]):
3979 2007-03-01 Justin Garcia <justin.garcia@apple.com>
3983 <rdar://problem/5032095>
3984 Gmail Editor: Copied text pastes on a new line instead of current line
3986 Start merge failed to occur because positionAtStartOfInsertedContent
3989 * editing/ReplaceSelectionCommand.cpp:
3990 (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent):
3991 Was failing when inserting <span><div>foo/div></span>. Return the
3992 inserted content's first VisiblePosition.
3994 2007-03-02 Dave Hyatt <hyatt@apple.com>
3996 Fix crasher in glyph map code (buffer overrun).
4000 * platform/win/GlyphPageTreeNodeWin.cpp:
4001 (WebCore::GlyphPage::fill):
4003 2007-03-01 Antti Koivisto <antti@apple.com>
4007 Fix for http://bugs.webkit.org/show_bug.cgi?id=12895
4008 REGRESSION: imagemap: pointer cursor is shown everywhere
4009 <rdar://problem/5028163>
4011 Image with imagemap should never itself be URLElement in hit test results.
4013 No layout test, cursor state can't be captured.
4015 * rendering/RenderLayer.cpp:
4016 (WebCore::RenderLayer::hitTest):
4018 2007-03-01 Antti Koivisto <antti@apple.com>
4022 Fix http://bugs.webkit.org/show_bug.cgi?id=12690
4023 REGRESSION: can not log in to bank of america with TOT webkit
4024 <rdar://problem/4990044>
4026 and http://bugs.webkit.org/show_bug.cgi?id=12604
4027 REGRESSION: After closing the "Would you like to save password" sheet, the form fails
4028 to submit automatically at http://www.mac.com/WebObjects/HomePage.woa
4029 <rdar://problem/4871752>
4031 and http://bugs.webkit.org/show_bug.cgi?id=12020
4032 REGRESSION: Flickr uploading broken
4033 <rdar://problem/4928662>
4035 Turn protection against multiple forms submission back on. This approach is buggy
4036 but it is way better than not having it at all. Not protecting against this
4037 breaks number of major sites.
4039 * bridge/mac/WebCoreAXObject.mm:
4040 (-[WebCoreAXObject accessibilityPerformAction:]):
4041 * loader/FrameLoader.cpp:
4042 (WebCore::FrameLoader::resetMultipleFormSubmissionProtection):
4043 (WebCore::FrameLoader::submitForm):
4044 (WebCore::FrameLoader::receivedMainResourceError):
4045 * loader/FrameLoader.h:
4046 * page/EventHandler.cpp:
4047 (WebCore::EventHandler::keyEvent):
4049 (WebCore::Frame::setView):
4050 * page/mac/EventHandlerMac.mm:
4051 (WebCore::EventHandler::mouseDown):
4053 2007-03-01 Kevin McCullough <kmccullough@apple.com>
4057 - Added the test case: external-script-URL-location.html
4058 - Fix an issue where the url of a document is null after an open if the document
4062 (WebCore::Document::open):
4064 2007-03-01 Anders Carlsson <acarlsson@apple.com>
4068 <rdar://problem/4960250>
4069 http://bugs.webkit.org/show_bug.cgi?id=11627
4070 REGRESSION: Reproducible crash at IMDb in WebCore::FrameLoader::stopLoadingSubframes
4072 In rare cases, we could end up calling checkLoadComplete twice for the same frame. This would cause the
4073 didFailProvisionalLoad delegate method to be called twice for the same frame, and also cause the provisional document loader
4074 to be reset to null when other code wasn't expecting it.
4076 This regressed in revision 10904 with the fix for <rdar://problem/4184719>. The fix is to only call stopLoading on the frame
4077 if either the document loader is loading, or the document is still being parsed. I've verified that the bug is still fixed and
4078 that no leaks occur.
4080 * loader/DocumentLoader.cpp:
4081 (WebCore::DocumentLoader::stopLoading):
4083 2007-03-01 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
4087 Fix ARM crash due to accessing non-4-byte-aligned memory
4090 * platform/AtomicString.cpp:
4091 (WebCore::UCharBufferTranslator::equal):
4093 2007-03-01 David Harrison <harrison@apple.com>
4097 <rdar://problem/5033905> Have the DOM secondary thread check raise an exception by default
4099 * platform/mac/ThreadCheck.mm:
4100 (WebCore::_WebCoreThreadViolationCheck):
4101 Initialize threadViolationIsException to true.
4103 2007-03-01 Brady Eidson <beidson@apple.com>
4107 <rdar://problem/5030628> - Crash opening a new window with the
4108 "New windows open to the same page" pref set
4110 * history/HistoryItem.cpp:
4111 (WebCore::HistoryItem::HistoryItem): Set the m_subItems vector capacity correctly
4113 2007-03-01 Alexey Proskuryakov <ap@webkit.org>
4117 http://bugs.webkit.org/show_bug.cgi?id=12801
4118 Assertion failure in createMarkup() (root) when doing Select All, Copy in an SVG document
4120 Test: editing/pasteboard/createMarkup-assert.xml
4122 * editing/markup.cpp:
4123 (WebCore::createMarkup): Removed the assertion, because it's wrong in a non-HTML world.
4125 2007-02-28 Adam Roben <aroben@apple.com>
4127 Reviewed by Oliver and Hyatt.
4129 Fix <rdar://problem/5024233> Crash while using Find on empty document
4131 No layout test possible, as this involves a null document.
4134 (WebCore::rangeOfContents): Added an ASSERT.
4136 (WebCore::Frame::findString): Added a null-check for document().
4137 (WebCore::Frame::markAllMatchesForText): Ditto.
4139 2007-02-28 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
4141 Not reviewed - simple gdk build fix.
4143 Add stubs for newly introduced localized strings.
4145 * platform/gdk/TemporaryLinkStubs.cpp:
4146 (WebCore::searchMenuNoRecentSearchesText):
4147 (WebCore::searchMenuRecentSearchesText):
4148 (WebCore::searchMenuClearRecentSearchesText):
4150 2007-02-28 Brady Eidson <beidson@apple.com>
4154 Move the Thread Safety Check functions into their own header for export to WebKit
4156 * WebCore.exp: Export the function
4157 * WebCore.xcodeproj/project.pbxproj: