1 2007-03-15 Beth Dakin <bdakin@apple.com>
5 Fix for <rdar://problem/5065396> REGRESSION: leaks in
6 RenderBlock::layoutInlineChildren seen on buildbot
8 This leak appeared after http://trac.webkit.org/projects/webkit/
9 changeset/20188. This change shifted line boxes around in
10 removeChild(). But since removeChild() calls
11 setNeedsLayoutAndMinMaxRecalc(), all of the line boxes will be
12 removed once we actually lay out anyway. So this patch fixes the
13 leak by deleting the line boxes instead of shifting them around.
15 * editing/IndentOutdentCommand.cpp:
16 (WebCore::IndentOutdentCommand::outdentParagraph): Call into
17 updateLayout(). This fixes an assertion I got in editing/
18 execCommand/4976800.html This is very similar to the line box fix I
19 made recently (http://trac.webkit.org/projects/webkit/changeset/
20 20177). We need to update layout before relying on VisiblePositions
21 after removing a node.
22 * rendering/RenderBlock.cpp:
23 (WebCore::RenderBlock::deleteLinesForBlock): New helper function
24 since this functionality is needed in three places now.
25 (WebCore::RenderBlock::makeChildrenNonInline): Call into new
26 deleteLinesForBlock().
27 (WebCore::RenderBlock::removeChild): Same.
28 * rendering/RenderBlock.h:
30 2007-03-15 Timothy Hatcher <timothy@apple.com>
34 * Factored out most of our common build settings into .xcconfig files. Anything that was common in
35 each build configuration was factored out into the shared .xcconfig file.
36 * Adds a Version.xcconfig file to define the current framework version, to be used in other places.
37 * Use the new $(BUNDLE_VERSION) (defined in Version.xcconfig) in the preprocessed Info.plist.
38 * Use the versions defined in Version.xcconfig to set $(DYLIB_CURRENT_VERSION).
40 * Configurations/Base.xcconfig: Added.
41 * Configurations/DebugRelease.xcconfig: Added.
42 * Configurations/Version.xcconfig: Added.
43 * Configurations/WebCore.xcconfig: Added.
45 * WebCore.xcodeproj/project.pbxproj:
47 2007-03-15 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
49 Not reviewed - gdk build fixes.
51 * platform/gdk/EditorClientGdk.cpp:
52 (WebCore::EditorClientGdk::handleKeypress):
53 * platform/graphics/cairo/ImageSourceCairo.cpp:
54 (WebCore::ImageSource::setData):
55 * platform/graphics/gdk/ImageGdk.cpp:
56 (WebCore::Image::loadPlatformResource):
58 2007-03-14 Justin Garcia <justin.garcia@apple.com>
62 ~2x speed up of 5k rich text paste:
63 http://shakespeare.mit.edu/hamlet/full.html
65 * editing/ReplaceSelectionCommand.cpp:
66 (WebCore::ReplaceSelectionCommand::doApply): Remove the top
67 level style span if its unnecessary before inserting
68 into the document, its faster than doing it after.
69 * editing/ReplaceSelectionCommand.h: Exposed
70 ReplacementFragment::removeNodePreservingChildren so that
71 the style span can be removed using non-undoable removes,
72 like the rest of the removes done on the ReplacementFragment.
74 (WebCore::createMarkup): Make the style span the top level
75 element, otherwise it's useless. This also facilitates the
76 optimization mentioned above.
77 When including markup for a fully selected root, include markup
78 for all the nodes beneath that fully selected root, to preserve
79 the structure and appearance of the copied markup. Did this
80 by merging with the code for adding markup for descendants of
81 special commonAncestorBlocks.
83 2007-03-15 Beth Dakin <bdakin@apple.com>
85 Rubber-stamped by Adele.
87 Rolling out http://trac.webkit.org/projects/webkit/changeset/20148
88 (which is a fix for http://bugs.webkit.org/show_bug.cgi?id=12595
89 and rdar://4722863) because it causes a horrible memory-trasher.
91 * bindings/js/JSHTMLFormElementCustom.cpp:
92 (WebCore::JSHTMLFormElement::canGetItemsForName):
93 (WebCore::JSHTMLFormElement::nameGetter):
94 * bindings/js/kjs_dom.cpp:
96 (KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
97 (KJS::DOMNamedNodesCollection::lengthGetter):
98 (KJS::DOMNamedNodesCollection::indexGetter):
99 (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
100 * bindings/js/kjs_dom.h:
101 (KJS::DOMNamedNodesCollection::classInfo):
102 * bindings/js/kjs_html.cpp:
103 (KJS::JSHTMLCollection::getNamedItems):
104 * dom/ChildNodeList.cpp:
105 (WebCore::ChildNodeList::ChildNodeList):
106 (WebCore::ChildNodeList::length):
107 (WebCore::ChildNodeList::item):
108 (WebCore::ChildNodeList::nodeMatches):
109 * dom/ChildNodeList.h:
110 * dom/NameNodeList.cpp:
111 (WebCore::NameNodeList::NameNodeList):
112 (WebCore::NameNodeList::item):
113 (WebCore::NameNodeList::nodeMatches):
114 * dom/NameNodeList.h:
115 (WebCore::NameNodeList::rootNodeAttributeChanged):
117 (WebCore::TagNodeList::TagNodeList):
118 (WebCore::TagNodeList::nodeMatches):
119 (WebCore::Node::registerNodeList):
120 (WebCore::Node::unregisterNodeList):
123 (WebCore::NodeList::NodeList):
124 (WebCore::NodeList::~NodeList):
125 (WebCore::NodeList::recursiveLength):
126 (WebCore::NodeList::itemForwardsFromCurrent):
127 (WebCore::NodeList::itemBackwardsFromCurrent):
128 (WebCore::NodeList::recursiveItem):
129 (WebCore::NodeList::itemWithName):
130 (WebCore::NodeList::rootNodeChildrenChanged):
132 (WebCore::NodeList::rootNodeAttributeChanged):
133 * html/HTMLFormElement.cpp:
134 (WebCore::HTMLFormElement::HTMLFormElement):
135 (WebCore::HTMLFormElement::~HTMLFormElement):
136 (WebCore::HTMLFormElement::formData):
137 (WebCore::HTMLFormElement::parseMappedAttribute):
138 (WebCore::HTMLFormElement::removeFormElement):
139 * html/HTMLFormElement.h:
140 * html/HTMLGenericFormElement.cpp:
141 (WebCore::HTMLGenericFormElement::parseMappedAttribute):
142 (WebCore::HTMLGenericFormElement::insertedIntoTree):
143 * html/HTMLGenericFormElement.h:
144 * html/HTMLInputElement.cpp:
145 (WebCore::HTMLInputElement::parseMappedAttribute):
147 2007-03-15 Geoffrey Garen <ggaren@apple.com>
149 Added an assert to help catch a bug. Hopefully someone will hit it!
151 * bindings/js/kjs_proxy.cpp:
152 (WebCore::KJSProxy::~KJSProxy):
154 2007-03-14 Oliver Hunt <oliver@apple.com>
158 Fix for rdar://problem/5061737.
160 This was a regression from the original Objective-C -> C++ conversion
161 for the drag logic. We don't need to call Range::startNode as we just
162 need the document that contains the range.
164 * page/DragController.cpp:
165 (WebCore::documentFragmentFromDragData):
167 2007-03-14 Mitz Pettel <mitz@webkit.org>
171 - http://bugs.webkit.org/show_bug.cgi?id=13071
172 REGRESSION: Plain text files no longer wrap lines longer than the width of the browser window
174 Test: fast/loader/text-document-wrapping.html
176 * loader/TextDocument.cpp:
177 (WebCore::TextTokenizer::write): Specified word-wrap:break-word for the <pre> element.
179 2007-03-14 Mitz Pettel <mitz@webkit.org>
183 - fix http://bugs.webkit.org/show_bug.cgi?id=13072
184 REGRESSION (r15617): white-space: pre-wrap breaks off the last character of a wide word
186 Test: fast/text/whitespace/pre-wrap-last-char.html
188 * rendering/bidi.cpp:
189 (WebCore::RenderBlock::findNextLineBreak): Undid the change from r15617.
191 2007-03-14 David Hyatt <hyatt@apple.com>
193 Add asserts to help catch double refs and double derefs of CachedResources.
197 * loader/CachedResource.cpp:
198 (WebCore::CachedResource::ref):
199 (WebCore::CachedResource::deref):
201 2007-03-14 Alice Liu <alice.liu@apple.com>
203 Rubber-stamped by Hyatt.
205 Adding null check to prevent the crash that happens on 2nd run of iBench HTML load test
207 * loader/icon/IconDataCache.cpp:
208 (WebCore::IconDataCache::writeToDatabase):
210 2007-03-14 Adele Peterson <adele@apple.com>
214 Fix for <rdar://problem/5062898> REGRESSION: autocomplete window in text fields doesn't come up
216 When we moved the initialization of a bunch of variables in the HTMLFormElement constructor, m_autocomplete accidently got initialized to false.
218 * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::HTMLFormElement):
220 2007-03-14 Steve Falkenburg <sfalken@apple.com>
224 Added missing null check in case this is called on a subframe
225 that hasn't started loading.
228 (WebCore::Frame::setMarkedTextMatchesAreHighlighted): Check for a null document.
230 2007-03-14 Antti Koivisto <antti@apple.com>
234 Fix http://bugs.webkit.org/show_bug.cgi?id=13060
235 REGRESSION: Repro ASSERT failure in Cache::adjustSize running layout tests
238 Script evaluation may have dereffed the CachedScript object already, causing double deref and
239 eventually m_liveResourcesSize underflow.
241 * html/HTMLScriptElement.cpp:
242 (WebCore::HTMLScriptElement::notifyFinished):
244 2007-03-14 Adele Peterson <adele@apple.com>
248 Added InsertTab, InsertBacktab, InsertLineBreak, and InsertNewline to the editing command table.
249 Added Event parameter to execCommand, and to all of the enabled and exec functions. Right now,
250 the event is only used by the newly added commands. But in the future, many (and possibly all) of
251 these editing commands will need to consider the event so they are applied to the correct selection.
254 * editing/Editor.cpp:
257 (WebCore::execDelete):
258 (WebCore::execBackwardDelete):
259 (WebCore::execForwardDelete):
260 (WebCore::execMoveBackward):
261 (WebCore::execMoveBackwardAndModifySelection):
262 (WebCore::execMoveUpByPageAndModifyCaret):
263 (WebCore::execMoveDown):
264 (WebCore::execMoveDownAndModifySelection):
265 (WebCore::execMoveForward):
266 (WebCore::execMoveForwardAndModifySelection):
267 (WebCore::execMoveDownByPageAndModifyCaret):
268 (WebCore::execMoveLeft):
269 (WebCore::execMoveLeftAndModifySelection):
270 (WebCore::execMoveRight):
271 (WebCore::execMoveRightAndModifySelection):
272 (WebCore::execMoveToBeginningOfDocument):
273 (WebCore::execMoveToBeginningOfDocumentAndModifySelection):
274 (WebCore::execMoveToBeginningOfSentence):
275 (WebCore::execMoveToBeginningOfSentenceAndModifySelection):
276 (WebCore::execMoveToBeginningOfLine):
277 (WebCore::execMoveToBeginningOfLineAndModifySelection):
278 (WebCore::execMoveToBeginningOfParagraph):
279 (WebCore::execMoveToBeginningOfParagraphAndModifySelection):
280 (WebCore::execMoveToEndOfDocument):
281 (WebCore::execMoveToEndOfDocumentAndModifySelection):
282 (WebCore::execMoveToEndOfSentence):
283 (WebCore::execMoveToEndOfSentenceAndModifySelection):
284 (WebCore::execMoveToEndOfLine):
285 (WebCore::execMoveToEndOfLineAndModifySelection):
286 (WebCore::execMoveToEndOfParagraph):
287 (WebCore::execMoveToEndOfParagraphAndModifySelection):
288 (WebCore::execMoveParagraphBackwardAndModifySelection):
289 (WebCore::execMoveParagraphForwardAndModifySelection):
290 (WebCore::execMoveUp):
291 (WebCore::execMoveUpAndModifySelection):
292 (WebCore::execMoveWordBackward):
293 (WebCore::execMoveWordBackwardAndModifySelection):
294 (WebCore::execMoveWordForward):
295 (WebCore::execMoveWordForwardAndModifySelection):
296 (WebCore::execMoveWordLeft):
297 (WebCore::execMoveWordLeftAndModifySelection):
298 (WebCore::execMoveWordRight):
299 (WebCore::execMoveWordRightAndModifySelection):
300 (WebCore::execPaste):
301 (WebCore::execSelectAll):
302 (WebCore::execToggleBold):
303 (WebCore::execToggleItalic):
306 (WebCore::execInsertTab):
307 (WebCore::execInsertBacktab):
308 (WebCore::execInsertNewline):
309 (WebCore::execInsertLineBreak):
312 (WebCore::hasEditableSelection):
313 (WebCore::hasEditableRangeSelection):
314 (WebCore::hasRangeSelection):
315 (WebCore::hasRichlyEditableSelection):
318 (WebCore::CommandEntry::):
319 (WebCore::Editor::toggleBold):
321 (WebCore::Editor::execCommand): Added optional event parameter.
322 (WebCore::Editor::insertText): Added. Calls handleTextInputEvent.
323 (WebCore::Editor::insertTextWithoutSendingTextEvent): Renamed from insertText.
324 Performs the actual insertion without dispatching any event.
326 * page/EventHandler.cpp: (WebCore::EventHandler::defaultTextInputEventHandler):
327 Call insertTextWithoutSendingTextEvent.
329 2007-03-14 Justin Garcia <justin.garcia@apple.com>
333 ~3x speedup pasting 5k lines of rich text:
334 http://shakespeare.mit.edu/hamlet/full.html
335 ~2x speedup pasting 10k lines of plain text
337 * css/CSSComputedStyleDeclaration.cpp:
338 (WebCore::computedStyle): Added for convenience.
339 * css/CSSComputedStyleDeclaration.h:
340 * editing/ReplaceSelectionCommand.cpp:
341 (WebCore::ReplaceSelectionCommand::removeRedundantStyles):
342 The code that pushed down the top level style span had
343 a bug in it that made it do unnecessary work. Instead of
344 fixing the bug I removed the code because it was used to
345 help see more redundancies in second level style spans, but
346 createMarkup now *only* creates a top level style span.
347 Only remove redundant styles from style spans and only remove
348 unstyled elements if they are style spans. FF doesn't
349 remove redundant styles from elements, or remove redundant
350 font tags on copy/paste. We could offer this functionality
351 through a separate "cleanup" command.
352 * editing/markup.cpp:
353 (WebCore::createMarkup): Only add markup for ancestors of
354 lastClosed if we're including markup for acommonAncestorBlock
355 (we do this for commonAncestorBlocks like tables and lists),
356 otherwise it's unnecessary/redundant.
358 2007-03-14 Anders Carlsson <acarlsson@apple.com>
362 Make sure to call ResourceLoader::didReceiveData to ensure that there's a shared buffer with the resource
363 data, since SubresourceLoaderClients now make use of that buffer.
365 * loader/SubresourceLoader.cpp:
366 (WebCore::SubresourceLoader::didReceiveData):
368 2007-03-14 Administrator <acarlsson@apple.com>
370 Get the size from the shared buffer.
372 * platform/graphics/cg/ImageSourceCG.cpp:
373 (WebCore::ImageSource::setData):
374 * platform/graphics/cg/PDFDocumentImage.cpp:
375 (WebCore::PDFDocumentImage::dataChanged):
377 2007-03-14 Mitz Pettel <mitz@webkit.org>
379 Reviewed by Hyatt, thumbs up by Darin.
381 - fix http://bugs.webkit.org/show_bug.cgi?id=12782
382 Reproducible crash in BidiContext::deref
384 Test: fast/dynamic/anonymous-block-orphaned-lines.html
386 * rendering/InlineBox.cpp:
387 (WebCore::InlineBox::root): Added an assertion that we return a root inline box.
388 * rendering/RenderBlock.cpp:
389 (WebCore::RenderBlock::removeChild): Added code to adopt the line boxes of
390 anonymous blocks being destroyed instead of leaving them orphaned, which
391 is what caused this crash. The boxes will be deleted on the next layout, but
392 this ensures consistency in the mean time.
394 2007-03-14 Lars Knoll <lars@trolltech.com>
399 Add a getter to SharedBuffer that returns a reference to the internal
400 Vector to avoid an extra copy of the data.
402 * platform/SharedBuffer.h:
403 (WebCore::SharedBuffer::buffer):
404 * platform/graphics/qt/ImageQt.cpp:
405 (WebCore::Image::loadPlatformResource):
406 * platform/graphics/qt/ImageSourceQt.cpp:
407 (WebCore::detectImageFormat):
408 (WebCore::createDecoder):
409 (WebCore::ImageSource::setData):
411 2007-03-14 Antti Koivisto <antti@apple.com>
415 Fix <rdar://problem/5058774>
416 REGRESSION: In Mail, caret appears oversized when typing in a To Do note
418 Horizontal and vertical were switched. Was regression from
419 http://trac.webkit.org/projects/webkit/changeset/20103
421 * rendering/RootInlineBox.cpp:
422 (WebCore::RootInlineBox::addHighlightOverflow):
424 2007-03-14 David Hyatt <hyatt@apple.com>
426 Tweak the data() functions of stylesheets and scripts to be internally consistent.
428 * loader/CachedCSSStyleSheet.cpp:
429 (WebCore::CachedCSSStyleSheet::data):
430 * loader/CachedScript.cpp:
431 (WebCore::CachedScript::data):
432 * loader/CachedXSLStyleSheet.cpp:
433 (WebCore::CachedXSLStyleSheet::data):
435 2007-03-14 David Hyatt <hyatt@apple.com>
439 For large animated GIFs, destroy and recreate the source for every animation frame. This keeps
440 the memory consumption down while giant images are animating.
444 * platform/graphics/BitmapImage.cpp:
445 (WebCore::BitmapImage::BitmapImage):
446 (WebCore::BitmapImage::destroyDecodedData):
447 (WebCore::BitmapImage::dataChanged):
448 (WebCore::BitmapImage::advanceAnimation):
449 * platform/graphics/BitmapImage.h:
451 2007-03-14 David Hyatt <hyatt@apple.com>
453 Make sure to use CFDataCreateWithBytesNoCopy where we can.
457 * platform/graphics/cg/ImageSourceCG.cpp:
458 (WebCore::ImageSource::setData):
459 * platform/graphics/cg/PDFDocumentImage.cpp:
460 (WebCore::PDFDocumentImage::dataChanged):
462 2007-03-13 David Hyatt <hyatt@apple.com>
464 Fix for bugzilla bug 13050 and also radar p1 5050645.
466 This patch reworks resource loading to avoid having redundant buffers in the icon database and in cached
467 images in the WebCore cache. It also avoids overcopying in top-level image documents and in the icon
470 There is now only one SharedBuffer for a resource and everybody observes that buffer now instead of ever
471 making their own. Even ImageIO uses the SharedBuffer while decoding.
473 The page in 13050 dropped from 145mb down to 45mb of memory use with this change for a stunning savings
476 Reviewed by olliej, mjs
479 * loader/CachedCSSStyleSheet.cpp:
480 (WebCore::CachedCSSStyleSheet::data):
481 * loader/CachedCSSStyleSheet.h:
482 * loader/CachedImage.cpp:
483 (WebCore::CachedImage::data):
484 * loader/CachedImage.h:
485 * loader/CachedResource.cpp:
486 (WebCore::CachedResource::CachedResource):
487 (WebCore::CachedResource::~CachedResource):
488 * loader/CachedResource.h:
489 (WebCore::CachedResource::data):
490 * loader/CachedScript.cpp:
491 (WebCore::CachedScript::data):
492 * loader/CachedScript.h:
493 * loader/CachedXSLStyleSheet.cpp:
494 (WebCore::CachedXSLStyleSheet::data):
495 * loader/CachedXSLStyleSheet.h:
496 * loader/DocLoader.cpp:
497 (WebCore::DocLoader::checkCacheObjectStatus):
498 * loader/ImageDocument.cpp:
499 (WebCore::ImageTokenizer::writeRawData):
500 (WebCore::ImageTokenizer::finish):
501 * loader/icon/IconDataCache.cpp:
502 (WebCore::IconDataCache::setImageData):
503 (WebCore::IconDataCache::writeToDatabase):
504 * loader/icon/IconDataCache.h:
505 * loader/icon/IconDatabase.cpp:
506 (WebCore::IconDatabase::imageDataForIconURL):
507 (WebCore::IconDatabase::iconForPageURL):
508 (WebCore::IconDatabase::setIconDataForIconURL):
509 (WebCore::IconDatabase::setHaveNoIconForIconURL):
510 (WebCore::IconDatabase::imageDataForIconURLQuery):
511 * loader/icon/IconDatabase.h:
512 * loader/icon/IconLoader.cpp:
513 (WebCore::IconLoader::startLoading):
514 (WebCore::IconLoader::didReceiveResponse):
515 (WebCore::IconLoader::didReceiveData):
516 (WebCore::IconLoader::didFail):
517 (WebCore::IconLoader::finishLoading):
518 (WebCore::IconLoader::clearLoadingState):
519 * loader/icon/IconLoader.h:
520 * loader/icon/SQLStatement.cpp:
521 (WebCore::SQLStatement::getColumnBlobAsVector):
522 (WebCore::SQLStatement::isExpired):
523 * loader/icon/SQLStatement.h:
525 (WebCore::Loader::didFinishLoading):
526 (WebCore::Loader::didReceiveData):
527 * page/mac/WebCoreFrameBridge.mm:
528 (-[WebCoreFrameBridge getData:andResponse:forURL:]):
529 (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
530 * platform/SharedBuffer.h:
531 (WebCore::SharedBuffer::isEmpty):
532 * platform/graphics/BitmapImage.cpp:
533 (WebCore::BitmapImage::destroyDecodedData):
534 (WebCore::BitmapImage::dataChanged):
535 * platform/graphics/BitmapImage.h:
536 * platform/graphics/Image.cpp:
537 (WebCore::Image::setData):
538 * platform/graphics/Image.h:
539 (WebCore::Image::dataChanged):
540 (WebCore::Image::data):
541 * platform/graphics/ImageSource.h:
542 * platform/graphics/cg/ImageSourceCG.cpp:
543 (WebCore::ImageSource::setData):
544 * platform/graphics/cg/PDFDocumentImage.cpp:
545 (WebCore::PDFDocumentImage::dataChanged):
546 * platform/graphics/cg/PDFDocumentImage.h:
547 * platform/graphics/mac/ImageMac.mm:
548 (WebCore::Image::loadPlatformResource):
549 * platform/graphics/svg/SVGImage.cpp:
550 (WebCore::SVGImage::setData):
551 * platform/mac/PasteboardMac.mm:
552 (WebCore::fileWrapperForImage):
554 2007-03-13 Justin Garcia <justin.garcia@apple.com>
558 <rdar://problem/5046875>
559 Gmail Editor: Applying alignment to selected text in message also applies alignment to signature
561 * editing/ApplyStyleCommand.cpp:
562 (WebCore::ApplyStyleCommand::doApply): Don't call applyBlockStyle unless
563 there is a block style to apply.
564 (WebCore::ApplyStyleCommand::applyBlockStyle): Don't do the remove step.
565 It was unnecessary and removed properties from blocks that could contain
566 content outside the range being operated on (added a testcase).
567 (WebCore::ApplyStyleCommand::addBlockStyleIfNeeded): Used an early return
568 instead of if-nesting.
569 * editing/ApplyStyleCommand.h:
570 * editing/CompositeEditCommand.cpp:
571 (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
572 Return the new block, if one was created. Use moveParagraphs to move
573 paragraphs into the new block, instead of moving nodes. The old code moved
574 too much (added a testcase).
575 * editing/CompositeEditCommand.h:
577 2007-03-13 Oliver Hunt <oliver@apple.com>
581 To fix <rdar://problem/5044366> we now pass a NSString
582 representation of the URL extracted with _web_originalDataAsString
583 instead of relying on [NSURL absoluteString] in the bridge
585 * page/mac/WebCoreFrameBridge.h:
586 * page/mac/WebCoreFrameBridge.mm:
587 (-[WebCoreFrameBridge getData:andResponse:forURL:]):
589 2007-03-13 Brady Eidson <beidson@apple.com>
593 <rdar://problem/5048818> - REGRESSION: Incompletely loaded resources being saved to the object cache
595 Due to a subtle change in loader behavior back in 10904, we would stop all loaders before calling
596 didFail() on them in the Cache loader. As a result, we basically cleared all of the Subresource Loaders
597 out of the Cache loader before more properly failing them as errored out. The result? Partially loaded
598 resources being cached.
600 Since Loader::didFail() both calls error() on the object *and* removes the loader, the solution is to call
601 didFail() for all cancelled loaders instead of *only* removing them from the set of active loaders.
603 In addition, pages that didn't completely load were being saved to the back/forward cache. To fix that,
604 I added a null check on the DocumentLoader's error to see if the page ended in an error, or did indeed
607 Note that the layout test for this - if possible - will require other enhancements including possibly adding
608 support for window.stop(). That task is documented in <rdar://problem/5061826>
610 * loader/FrameLoader.cpp:
611 (WebCore::FrameLoader::provisionalLoadStarted): Fixed a few bugs relating to my original BFCache rewrite to
612 more perfectly restore the original behavior - including only caching HTML documents via the
613 m_client->canCachePage() call
614 (WebCore::FrameLoader::canCachePage): Don't make the call to m_client->canCachePage() as that serves a different
616 - Check the mainDocumentError to see if the load ended in error as a further criteria in determining the
617 cachability of a page
620 (WebCore::Loader::cancelRequests): Call didFail(cancelledError()) instead of just removing the loaders from the
621 loaders-in-progress set. This adds the effect of properly cleaning up the cached object.
623 2007-03-13 Beth Dakin <bdakin@apple.com>
625 Rendering part reviewed by Hyatt. Editing part consulted with and
626 rubber stamped by Justin and Harrison.
628 Fix for <rdar://problem/5025925> A hang occurs in Safari when
629 attempting to print page at http://www.pcadvisor.co.uk
631 * rendering/RenderBlock.cpp:
632 (WebCore::RenderBlock::makeChildrenNonInline):
633 RenderBlock::makeChildrenNonInline() takes a block's inline
634 children and turns them into block children. If the children had
635 line boxes, those boxes were being leaked. In the layout test I
636 added with the change (and at pcadvisor.co.uk during printing)
637 children were being made non-inline, and then they were being made
638 inline again. This meant that some of the children ended up
639 pointing to totally stale line boxes that are normally just leaked.
640 This caused an infinite loop in RenderFlow::destroy(). This patch
641 simply deletes everyone's line boxes in
642 RenderBlock::makeChildrenNonInline()
644 * editing/InsertParagraphSeparatorCommand.cpp:
645 (WebCore::InsertParagraphSeparatorCommand::doApply): The other part
646 of this fix is that I added a call to updateLayout in
647 InsertParagraphSeparatorCommand::doApply(). One layout test
648 (editing/spelling/spelling.html) was changed by my patch to
649 RenderBlock. doApply() inserts a node into the render tree. In at
650 least one case in spelling.html, that caused some line boxes to be
651 deleted. Back in doApply() this meant that the RenderTree was out-
652 of-date, and we mistakenly thought we were at the end of the
653 paragraph. This caused us to insert a RenderBR() at the end of the
654 tree instead of an empty RenderText(). No one seems to know exactly
655 why we insert either, or if the change is necessarily a problem. It
656 is clear, though, that the RenderTree in doApply() is out-of-date
657 after inserting the node and deleting some line boxes, so it seems
658 prudent to call into updateLayout().
660 2007-03-13 Adam Roben <aroben@apple.com>
664 * platform/FontData.h: Added m_isSystemFont parameter to match NSFont.
666 2007-03-13 Beth Dakin <bdakin@apple.com>
670 Export DocumentLoader::setFrame(). Part of fix for <rdar://
671 problem/4277074> 8F32: Help Viewer crashed on clicking link -
672 KHTMLView::viewportMouseReleaseEvent (12647)
676 2007-03-13 Darin Adler <darin@apple.com>
680 - fix http://bugs.webkit.org/show_bug.cgi?id=12794
681 <rdar://problem/5028154> REGRESSION: TripTik planner at aaa.com never
682 finishes loading due to unclosed canvas tag (12794)
684 Change <canvas> elements so that their contents are parsed normally,
685 but not rendered. This change fixes the bug, because normal parsing
686 rules close the <canvas> element in that case. The special parser
687 stuff was just getting in the way.
689 Also do some basic cleanup to the HTML parser. This was motivated by
690 an earlier version of this patch that made even more changes to the
691 parser, but the cleanup is still worth landing.
693 Test: fast/canvas/canvas-hides-fallback.html
694 Test: fast/canvas/script-inside-canvas-fallback.html
695 Test: fast/canvas/unclosed-canvas-1.html
696 Test: fast/canvas/unclosed-canvas-2.html
697 Test: fast/canvas/unclosed-canvas-3.html
698 Test: fast/canvas/unclosed-canvas-4.html
700 * html/HTMLCanvasElement.h: Added a data member to keep track of whether the
701 renderer is a RenderHTMLCanvas or not.
702 * html/HTMLCanvasElement.cpp:
703 (WebCore::HTMLCanvasElement::createRenderer): If JavaScript is enabled, create
704 a RenderHTMLCanvas. If it's not, let the default code create the default type
705 of renderer, which will result in fallback content being visible. The
706 RenderHTMLCanvas class already hides all of its children. Set the m_rendererIsCanvas
707 boolean accordingly. Since the actual storage for the canvas is allocated lazily
708 when you actually get a drawing context, we don't need to do anything special
709 to prevent it when JavaScript is disabled; the relevant functions won't be called.
710 (WebCore::HTMLCanvasElement::reset): Protect the code that manipulates the
711 RenderHTMLCanvas with a check of m_rendererIsCanvas. This is the only code inside
712 the DOM element that relies on the renderer type.
714 * html/HTMLParser.h: Removed unneeded includes. Marked HTMLParser as
715 Noncopyable. Changed the Document parameter to the constructor to instead
716 be HTMLDocument. Renamed discard_until to m_skipModeTag for clarity.
717 Removed unused noSpaces function and unneeded public doc() function.
718 Moved data members all down to the end so you can see them together in order.
719 Renamed map to m_currentMapElement and isindex to m_isindexElement.
720 Removed unused end and headLoaded data members. Renamed m_fragment to
721 m_isParsingFragment to make it clearer that it's a boolean, not a fragment.
723 * html/HTMLParser.cpp:
724 (WebCore::HTMLParser::HTMLParser): Changed to use member construction
725 syntax instead of calling reset(). This is especially helpful in the
726 fragment case, where calling reset() later on is illegal, so not using
727 it in the constructor lets us assert.
728 (WebCore::HTMLParser::~HTMLParser): Did an explicit deref instead of
729 calling setCurrent for its side effect.
730 (WebCore::HTMLParser::reset): Updated for member name changes and removal
731 and to use document instead of doc().
732 (WebCore::HTMLParser::setCurrent): Use document instead of doc().
733 (WebCore::HTMLParser::setSkipMode): Added. No longer inline. Now sets the
734 m_inCanvasBeforeFirstOpenTag data member to false.
735 (WebCore::HTMLParser::parseToken): Tightened up the skip mode logic at the
736 top of the function, and added a FIXME about the strange case there where
737 we don't skip yet stay in skip mode. Updated for renaming and doc().
738 (WebCore::HTMLParser::insertNode): Updated for renaming and doc().
739 (WebCore::HTMLParser::handleError): Ditto.
740 (WebCore::HTMLParser::framesetCreateErrorCheck): Ditto.
741 (WebCore::HTMLParser::isindexCreateErrorCheck): Changed to use RefPtr.
742 (WebCore::HTMLParser::noscriptCreateErrorCheck): Updated for renaming and doc().
743 (WebCore::HTMLParser::mapCreateErrorCheck): Ditto.
744 (WebCore::HTMLParser::getNode): Removed the special case for canvas here.
745 Canvas fallback is now handled in the DOM, not the parser. Updated for
747 (WebCore::HTMLParser::allowNestedRedundantTag): Changed a #define into a C++
749 (WebCore::HTMLParser::processCloseTag): Updated for renaming and doc().
750 (WebCore::HTMLParser::isInline): Ditto.
751 (WebCore::HTMLParser::tagIsOnStack): Added. Used by new canvas logic.
752 (WebCore::HTMLParser::popBlock): Updated for renaming and doc(). Also renamed
753 the local variable Elem to elem.
754 (WebCore::HTMLParser::createHead): Ditto.
755 (WebCore::HTMLParser::handleIsindex): Changed to use RefPtr.
756 (WebCore::HTMLParser::startBody): Updated for renaming and doc().
757 (WebCore::HTMLParser::finished): Ditto.
759 2007-03-13 David Hyatt <hyatt@apple.com>
761 Two more cleanup fixes to the cache. Don't call destroyDecodedData in the BitmapImage destructor, since
762 clearing the image source and calling setData on it again causes it to do an extra copy of the encoded
763 data. Since we're about to be destroyed this is just wasteful.
765 When the cache prunes, don't allow it to destroy the decoded data of an image that is still actively loading,
766 since we've established that ImageIO can actually crash if you yank the rug out from under it like that.
771 (WebCore::Cache::prune):
772 * platform/graphics/BitmapImage.cpp:
773 (WebCore::BitmapImage::~BitmapImage):
775 2007-03-13 Anders Carlsson <acarlsson@apple.com>
777 Try fixing the Qt build.
780 (WebCore::Editor::setStartNewKillRingSequence):
782 2007-03-13 David Harrison <harrison@apple.com>
786 <rdar://problem/5031181> cntl-k at end of paragraph adds nothing to the kill ring
787 <rdar://problem/5031189> REGRESSION: cntl-y yanks only the most recently killed content
789 For rdar://5031181, properly extend the selection before the killring handling, and
790 make sure plainText of that selection returns a linefeed.
792 For rdar://5031189, restore Editor::deleteRange() code that continued current killring,
793 even though the range deletion implicitly stopped it via changing the selection.
795 A byproduct of this change is the elimination of RUNDFINDER vs CONTENT TextIterator. The
796 only difference between the two was whether to emit a newline when the range started
797 with a blockflow element. No callers actually need that any more.
800 * editing/pasteboard/emacs-ctrl-k-y-001-expected.checksum: Added.
801 * editing/pasteboard/emacs-ctrl-k-y-001-expected.png: Added.
802 * editing/pasteboard/emacs-ctrl-k-y-001-expected.txt: Added.
803 * editing/pasteboard/emacs-ctrl-k-y-001.html: Added.
805 * editing/Editor.cpp:
806 (WebCore::Editor::deleteRange):
807 Clear the "start new kill ring sequence" setting, because it was set to true
808 when the selection was updated by deleting the range.
810 (WebCore::Editor::deleteWithDirection):
811 If extending the selection to the end of paragraph resulted in a caret selection,
812 extend by character, to handle the case when the selection started as a caret at
813 the end of paragraph.
815 * editing/TextIterator.cpp:
816 (WebCore::TextIterator::TextIterator):
817 Initialize new member variables for tracking handling of the beginning of the range.
819 (WebCore::TextIterator::advance):
820 Call representNodeOffsetZero on the m_endContainer.
821 Move visibility checks into handleTextNode and handleReplacedElement.
823 (WebCore::TextIterator::handleTextNode):
824 (WebCore::TextIterator::handleTextBox):
827 (WebCore::TextIterator::handleReplacedElement):
828 Moved visibility check into here.
830 (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
832 (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
833 (WebCore::TextIterator::representNodeOffsetZero):
834 New. Emits proper sequence when encountering offset 0 of a node, including the
835 m_endContainer. Started with code from handleNonTextNode.
837 (WebCore::TextIterator::handleNonTextNode):
838 Call representNodeOffsetZero.
840 (WebCore::TextIterator::exitNode):
841 Similar to shouldRepresentNodeOffsetZero, do not emit the newline if the node
842 was collapsed, and before any other emitted content.
844 (WebCore::TextIterator::emitCharacter):
846 (WebCore::TextIterator::emitText):
847 New. Consolidates code used by handleText and handleTextBox.
849 (WebCore::CharacterIterator::CharacterIterator):
852 (WebCore::WordAwareIterator::WordAwareIterator):
855 (WebCore::WordAwareIterator::advance):
858 (WebCore::TextIterator::rangeLength):
861 * editing/TextIterator.h:
862 Added member variables for tracking handling of the beginning of the range.
863 Eliminated concept of RUNDFINDER vs CONTENT TextIterator.
865 * editing/visible_units.cpp:
866 (WebCore::nextBoundary):
867 Eliminated concept of RUNDFINDER vs CONTENT TextIterator.
869 2007-03-13 David Hyatt <hyatt@apple.com>
871 Clean up the null image case in CachedImage::data to make sure the size totals will stay accurate.
872 I'm not convinced this case can even be hit, but I'm cleaning it up just in case.
874 * loader/CachedImage.cpp:
875 (WebCore::CachedImage::data):
877 2007-03-13 David Hyatt <hyatt@apple.com>
879 Reorder the call to allReferencesRemoved, since otherwise the live object size will become
882 * loader/CachedResource.cpp:
883 (WebCore::CachedResource::deref):
885 2007-03-13 Antti Koivisto <antti@apple.com>
889 Fix http://bugs.webkit.org/show_bug.cgi?id=11083
890 REGRESSION: Typing tab key fails to insert a tab character in Google Docs editable area
891 <rdar://problem/4757650>
893 Allow inserting tabs in designMode. Backtab behaves like before (matches FF).
895 * page/EventHandler.cpp:
896 (WebCore::EventHandler::defaultTabEventHandler):
898 2007-03-13 David Hyatt <hyatt@apple.com>
900 Fix two counting errors in the decoded size of objects in the WebCore cache. We need to explicitly
901 destroy decoded data when clearing out a partially loaded image that had an error, since the destructor
902 (although it does destroy the data) disconnects the observer so that the notification doesn't happen.
904 Some CachedImages aren't in the cache (like image documents). When the decoded size of such an image
905 changes we should not notify the cache, since - newsflash - we aren't actually in it.
909 * loader/CachedImage.cpp:
910 (WebCore::CachedImage::clear):
911 (WebCore::CachedImage::decodedSizeChanged):
913 2007-03-13 Darin Adler <darin@apple.com>
915 Reviewed by Tim Hatcher and John Sullivan.
917 - fix <rdar://problem/4915303> CrashTracer: 36 crashes in Safari at
918 com.apple.AppKit: -[NSView getRectsBeingDrawn:count:] + 502
920 * page/mac/FrameMac.mm: (WebCore::Frame::imageFromRect):
921 This was calling drawRect: directly, but NSView's getRectsBeingDrawn:count:
922 method was never really safe to call unless it was AppKit that called your
923 drawRect: method. Changed it to call drawSingleRect: instead. A little ugly,
924 but seems to work and will almost certainly fix the bug.
926 2007-03-13 Nikolas Zimmermann <zimmermann@kde.org>
930 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12974
932 Call forgetGenericContext in JSSVGPathSeg destructor, otherwhise
933 we'll hit an ASSERT in a debug build, when running svg/custom/js-update-path-changes.svg
934 a few dozen times in a single WebKit instance. The ASSERT is good and just warns that
935 there was already a generic context pointer registered, and the new "to be registered"
936 object already exists, but pointing to a different object. That's because garbage collection
937 calls the JSSVGPathSeg destructor, but that didn't cleanup the generic context map.
939 Only JSSVGPathSeg is hit by this problem, as it's the only non SVGAnimated* type
940 using the generic context system while using a custom JSSVGPathSegList implementation.
942 Also cleanup JSSVGPathSegListCustom code to call the static forgetGenericContext
943 method instead of doing the same using custom code.
945 * bindings/js/JSSVGPathSegListCustom.cpp:
946 (WebCore::removeFromPathSegContextMap):
947 (WebCore::JSSVGPathSegList::clear):
948 (WebCore::JSSVGPathSegList::removeItem):
949 * bindings/scripts/CodeGeneratorJS.pm:
951 2007-03-13 Darin Adler <darin@apple.com>
955 - fix http://bugs.webkit.org/show_bug.cgi?id=12595
956 <rdar://problem/4722863> REGRESSION: Can't add item to cart at lnt.com
957 (JS type error) (12595)
959 Test: fast/forms/old-names.html
961 * bindings/js/JSHTMLFormElementCustom.cpp:
962 (WebCore::JSHTMLFormElement::canGetItemsForName): If the form collection has
963 nothing for a given name, try the form's oldNamedElement function.
964 (WebCore::JSHTMLFormElement::nameGetter): Ditto.
966 * bindings/js/kjs_dom.h: Removed the DOMNamedNodesCollection. Instead we will use
967 a class derived from NodeList.
968 * bindings/js/kjs_dom.cpp: Ditto.
970 * bindings/js/kjs_html.cpp:
971 (KJS::VectorNodeList::VectorNodeList): Added. Constructor for a new class derived
972 from NodeList to be used for the named items result from a collection -- uses a
973 vector of node pointers.
974 (KJS::VectorNodeList::length): Added.
975 (KJS::VectorNodeList::item): Added.
976 (KJS::JSHTMLCollection::getNamedItems): Use VectorNodeList and the existing wrapper
977 for NodeList rather than a custom JavaScript class, DOMNamedNodesCollection.
979 * dom/ChildNodeList.h:
980 * dom/ChildNodeList.cpp:
981 (WebCore::ChildNodeList::ChildNodeList): Updated to derive from TreeNodeList,
982 since NodeList is now a simpler class.
983 (WebCore::ChildNodeList::elementMatches): Updated for name and parameter change.
985 * dom/NameNodeList.h:
986 * dom/NameNodeList.cpp:
987 (WebCore::NameNodeList::NameNodeList): Updated to derive from TreeNodeList,
988 since NodeList is now a simpler class.
989 (WebCore::NameNodeList::rootNodeAttributeChanged): Updated for name and
992 * dom/Node.h: Change register/unregister functions to take TreeNodeList.
994 (WebCore::TagNodeList::TagNodeList): Updated to derive from TreeNodeList,
995 since NodeList is now a simpler abstract class.
996 (WebCore::TagNodeList::elementMatches): Updated for name and parameter change.
997 (WebCore::Node::registerNodeList): Changed type from NodeList to TreeNodeList.
998 (WebCore::Node::unregisterNodeList): Ditto.
1000 * dom/NodeList.h: Broke NodeList into a simpler base class and a derived class
1001 with the machinery for iterating a tree, called TreeNodeList.
1003 (WebCore::NodeList::~NodeList): Added.
1004 (WebCore::NodeList::itemWithName): Factored out of the old itemWithName.
1005 (WebCore::TreeNodeList::TreeNodeList): Renamed from NodeList.
1006 (WebCore::TreeNodeList::~TreeNodeList): Ditto.
1007 (WebCore::TreeNodeList::recursiveLength): Ditto.
1008 (WebCore::TreeNodeList::itemForwardsFromCurrent): Ditto.
1009 (WebCore::TreeNodeList::itemBackwardsFromCurrent): Ditto.
1010 (WebCore::TreeNodeList::recursiveItem): Ditto.
1011 (WebCore::TreeNodeList::itemWithName): Factored half of this into this function,
1012 the other half in NodeList::itemWithName.
1013 (WebCore::TreeNodeList::rootNodeAttributeChanged): Added. No longer inline.
1014 (WebCore::TreeNodeList::rootNodeChildrenChanged): Renamed from NodeList.
1016 * html/HTMLFormElement.h: Added formElementNameChanged and oldNamedElement
1017 fucntions, and a map called m_oldNames. Also removed m_boundary, which I
1018 thought I had already done.
1019 * html/HTMLFormElement.cpp:
1020 (WebCore::HTMLFormElement::HTMLFormElement): Initialize m_oldNames to 0.
1021 Switched the rest of the members to initialization syntax.
1022 (WebCore::HTMLFormElement::~HTMLFormElement): Delete m_oldNames.
1023 (WebCore::HTMLFormElement::formElementNameChanged): Added. Stores a reference
1024 to one element under each of its old names.
1025 (WebCore::HTMLFormElement::oldNamedElement): Added. Returns the old element
1026 that once had a given name.
1028 * html/HTMLGenericFormElement.h:
1029 * html/HTMLGenericFormElement.cpp:
1030 (WebCore::HTMLGenericFormElement::parseMappedAttribute): When the name
1031 attribute changes, tell the form about the old name.
1032 (WebCore::HTMLGenericFormElement::insertedIntoTree): When telling a form
1033 about an element, also store away the old name so that we can use it
1034 when the name changes later.
1036 * html/HTMLInputElement.cpp:
1037 (WebCore::HTMLInputElement::parseMappedAttribute): Added a call to the
1038 base class in the nameAttr case, so the code in HTMLGenericFormElement
1039 above will get called in the input element case.
1041 2007-03-13 Antti Koivisto <antti@apple.com>
1045 Alexey spotted a DOS by using string of 64k unbreakable character in
1046 fix for http://bugs.webkit.org/show_bug.cgi?id=12833
1049 (WebCore::Text::createWithLengthLimit):
1051 2007-03-13 Lars Knoll <lars@trolltech.com>
1057 2007-03-13 Rob Buis <buis@kde.org>
1061 http://bugs.webkit.org/show_bug.cgi?id=12576
1062 WebKit does not support xlink:show attributes
1064 Make an exception for non-empty targets, these should be opened
1065 in a new window, unless the value is _self.
1067 * ksvg2/svg/SVGAElement.cpp:
1068 (WebCore::SVGAElement::defaultEventHandler):
1070 2007-03-13 David Hyatt <hyatt@apple.com>
1072 - fix cache issues seen in http://bugs.webkit.org/show_bug.cgi?id=13050
1073 6 objects and ~200MB leaked after opening then closing tab
1074 <rdar://problem/5058714>
1076 Double the encoded size of images for now. We do this to account for a bug in ImageIO where they hold
1077 a separate copy of image data. See <rdar://problem/5050645>.
1081 * loader/CachedImage.cpp:
1082 (WebCore::CachedImage::data):
1084 2007-03-12 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
1086 Not reviewed - gdk build fix.
1088 * platform/gdk/TemporaryLinkStubs.cpp:
1089 (SearchPopupMenu::enabled): add missing stub.
1091 2007-03-12 David Kilzer <ddkilzer@kilzer.net>
1095 - fix http://bugs.webkit.org/show_bug.cgi?id=13045
1096 REGRESSION: Blackboard CourseWare Error with Nightlies after Mar 8
1098 * html/HTMLFormElement.cpp:
1099 (WebCore::getUniqueBoundaryString): Speculative fix: remove dashes from
1100 the boundary prefix that appear after non-dash characters.
1102 2007-03-12 Mitz Pettel <mitz@webkit.org>
1106 - fix http://bugs.webkit.org/show_bug.cgi?id=13015
1107 REGRESSION (r17233-r17241): Repro crash when leaving a page whose unload handler submits a form
1109 Test: fast/loader/onunload-form-submit-crash-2.html
1111 * loader/DocumentLoader.cpp:
1112 (WebCore::DocumentLoader::finishedLoading): Added null check.
1114 2007-03-12 Anders Carlsson <acarlsson@apple.com>
1118 <rdar://problem/4900071>
1119 http://bugs.webkit.org/show_bug.cgi?id=6454
1120 ASSERTION: Navigating 'back' in frameset: !_private->previousItem (6454)
1122 Change back the behavior of checkLoadComplete to traverse the entire frame tree instead of
1123 just the parent frames of the current frame. This is needed in order to reset the previous history item
1124 for all frames when doing a frame navigation. (This was changed in revision 11819)
1126 * loader/FrameLoader.cpp:
1127 (WebCore::FrameLoader::recursiveCheckLoadComplete):
1128 (WebCore::FrameLoader::checkLoadComplete):
1129 * loader/FrameLoader.h:
1131 2007-03-12 Justin Garcia <justin.garcia@apple.com>
1135 <rdar://problem/5056619>
1136 REGRESSION: Gmail Editor: Dragging text into Reply (textarea) field results in a crash at WebCore::InsertNodeBeforeCommand::doApply()
1138 * editing/SelectionController.cpp:
1139 (WebCore::removingNodeRemovesPosition): Added.
1140 (WebCore::SelectionController::nodeWillBeRemoved): Clear the
1141 selection if it's inside a shadow tree.
1142 * page/DragController.cpp:
1143 (WebCore::setSelectionToDragCaret): Return false to signal to
1144 clients that a drop shouldn't be performed if the second attempt
1145 to set a selection ends up in non-editable content.
1147 2007-03-12 Darin Adler <darin@apple.com>
1149 Reviewed by Tim Hatcher.
1151 - fixed JavaScript wrapper classes to be correct for a variety of cases
1152 that a new test uncovered: was broken for at least 5 classes
1154 - fixed Objective-C wrapper classes to be correct for a variety of cases
1155 that a test case uncovered: was broken for ast least 50 classes
1157 - added missing DOM API for creating OverflowEvent and WheelEvent instances
1159 Test: fast/dom/wrapper-classes.html
1161 * DerivedSources.make: Added missing bindings: HTMLCanvasElement for ObjC,
1162 CDATASection, Comment, and EntityReference for JavaScript.
1163 * WebCore.xcodeproj/project.pbxproj: Added those new generated files.
1165 * bindings/js/JSHTMLElementWrapperFactory.cpp:
1166 (WebCore::createJSHTMLWrapper): Corrected the wrapper classes for <keygen>,
1167 which needs an HTMLSelectElement wrapper, and <xmp>, which needs an
1168 HTMLPreElement wrapper.
1170 * bindings/objc/DOMInternal.h: Updated for new naming scheme.
1171 Also moved createDOMWrapper from the KJS namespace to the WebCore namespace.
1172 * bindings/objc/DOMUtility.mm:
1173 (KJS::createDOMWrapper): Broke the core function into a separate one, and
1174 left it in the KJS namespace because Objective-C++ rules make it impossible
1175 for it to work in the WebCore namespace. Used a macro-based implementation
1176 to cut down on repeated code, and added missing cases for Counter,
1177 HTMLOptionsCollection, Range, XPathExpression, XPathResult, Event, RGBColor,
1178 Rect, Window, DOMImplementation, NodeIterator, TreeWalker, and HTMLCollection.
1179 (WebCore::createDOMWrapper): The other half of the function.
1181 * bindings/objc/DOM.mm:
1182 (WebCore::createElementClassMap): Corrected the wrapper classes for
1183 <canvas>, which needs a DOMHTMLCanvasElement wrapper, <del>, which needs
1184 a DOMHTMLModElement wrapper, <embed>, which needs a DOMHTMLEmbedElement
1185 wrapper, <ins>, which needs a DOMHTMLModElement wrapper, <th>, which needs
1186 a DOMHTMLTableCellElement wrapper, and <xmp>, which needs an
1187 DOMHTMLPreElement wrapper.
1188 (+[DOMNode _wrapNode:]): Updated for new naming scheme.
1189 (+[DOMNode _wrapEventTarget:]): Ditto.
1190 (+[DOMNodeFilter _wrapNodeFilter:]): Ditto.
1191 (ObjCNodeFilterCondition::acceptNode): Ditto.
1192 (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]): Ditto.
1193 (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]): Ditto.
1194 (WebCore::ObjCEventListener::handleEvent): Ditto.
1196 * dom/Document.cpp: (WebCore::Document::createEvent):
1197 Added cases for OverflowEvent and WheelEvent.
1199 * dom/OverflowEvent.h: Added empty constructor and initOverflowEvent.
1200 * dom/OverflowEvent.cpp:
1201 (WebCore::OverflowEvent::OverflowEvent): Added.
1202 (WebCore::OverflowEvent::initOverflowEvent): Added.
1203 * dom/OverflowEvent.idl: Added initOverflowEvent.
1205 * bindings/objc/PublicDOMInterfaces.h: Added initOverflowEvent.
1207 * bindings/objc/DOMCSS.mm:
1208 (+[DOMStyleSheet _wrapStyleSheet:]): Updated for new naming scheme.
1209 (+[DOMCSSRule _wrapCSSRule:]): Corrected wrapper for CSSUnknownRule.
1210 (+[DOMCSSValue _wrapCSSValue:]): Updated for new naming scheme.
1212 * bindings/js/kjs_css.h:
1213 (KJS::DOMRGBColor::impl): Added. Used when making an ObjC wrapper.
1214 (KJS::DOMRect::impl): Ditto.
1216 * bindings/js/kjs_dom.cpp: (KJS::toJS): Corrected the wrapper classes for
1217 CDATASection, Comment, and EntityReference.
1219 * bindings/js/kjs_html.cpp: Corrected the class name for HTMLElement
1220 (was "DOMHTMLElement") and HTMLCollection (was "Collection").
1222 * bindings/objc/DOMImplementationFront.h:
1223 * bindings/objc/DOMImplementationFront.cpp:
1224 (WebCore::implementationFront): Added new overload that returns a front given
1225 a JavaScript wrapper. Needed by the code that makes the Objective-C wrapper.
1227 * bindings/objc/WebScriptObject.mm:
1228 (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1229 Updated since createDOMWrapper is now in the WebCore namespace.
1231 * bindings/scripts/CodeGeneratorObjC.pm: Update the naming scheme for the
1232 wrapper creation functions to use _wrapElement: rather then _elementWith:
1233 style. Removed now-unneeded special cases for things that needed to stay
1234 upper-case, since we don't have to do the whole lcfirst thing.
1236 * html/HTMLCanvasElement.idl: Added #if so we can successfully generate the
1237 Objective-C wrapper for this class, even though we can't yet handle the
1238 DOMObject return type.
1240 * html/HTMLOptionsCollection.idl: Added GenerateNativeConverter so we get
1241 an appropriate toJS function.
1243 * bindings/objc/DOMEvents.mm:
1244 (+[DOMEvent _wrapEvent:]):
1245 * bindings/objc/DOMHTML.mm:
1246 (-[DOMHTMLDocument createDocumentFragmentWithMarkupString:baseURL:]):
1247 (-[DOMHTMLDocument createDocumentFragmentWithText:]):
1248 * bindings/objc/DOMObject.mm:
1249 (-[DOMObject sheet]):
1250 * bindings/objc/DOMRGBColor.mm:
1251 (-[DOMRGBColor red]):
1252 (-[DOMRGBColor green]):
1253 (-[DOMRGBColor blue]):
1254 (-[DOMRGBColor alpha]):
1255 (+[DOMRGBColor _wrapRGBColor:]):
1256 * bindings/objc/DOMSVGPathSegInternal.mm:
1257 (+[DOMSVGPathSeg _wrapSVGPathSeg:]):
1258 * bindings/objc/DOMXPath.mm:
1259 (+[DOMNativeXPathNSResolver _wrapXPathNSResolver:]):
1260 * page/mac/WebCoreFrameBridge.mm:
1261 (-[WebCoreFrameBridge nodesFromList:]):
1262 (-[WebCoreFrameBridge elementWithName:inForm:]):
1263 (-[WebCoreFrameBridge formForElement:]):
1264 (-[WebCoreFrameBridge currentForm]):
1265 (-[WebCoreFrameBridge controlsInForm:]):
1266 (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
1267 (-[WebCoreFrameBridge convertNSRangeToDOMRange:]):
1268 (-[WebCoreFrameBridge markDOMRange]):
1269 (-[WebCoreFrameBridge markedTextDOMRange]):
1270 (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]):
1271 (-[WebCoreFrameBridge documentFragmentWithMarkupString:baseURLString:]):
1272 (-[WebCoreFrameBridge documentFragmentWithText:inContext:]):
1273 (-[WebCoreFrameBridge documentFragmentWithNodesAsParagraphs:]):
1274 (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
1275 (-[WebCoreFrameBridge replaceSelectionWithText:selectReplacement:smartReplace:]):
1276 (-[WebCoreFrameBridge increaseSelectionListLevel]):
1277 (-[WebCoreFrameBridge increaseSelectionListLevelOrdered]):
1278 (-[WebCoreFrameBridge increaseSelectionListLevelUnordered]):
1279 (-[WebCoreFrameBridge dragCaretDOMRange]):
1280 (-[WebCoreFrameBridge editableDOMRangeForPoint:]):
1281 (-[WebCoreFrameBridge characterRangeAtPoint:]):
1282 (-[WebCoreFrameBridge typingStyle]):
1283 (-[WebCoreFrameBridge rangeOfCharactersAroundCaret]):
1284 * platform/mac/ClipboardMac.mm:
1285 (WebCore::ClipboardMac::declareAndWriteDragImage):
1286 * platform/mac/PasteboardMac.mm:
1287 (WebCore::Pasteboard::writeSelection):
1288 Updated for new naming scheme.
1290 2007-03-12 Timothy Hatcher <timothy@apple.com>
1294 <rdar://problem/4990691> REGRESSION: Selecting text in Adium's Messages field causes horizontal shift
1296 Corrected the recursive point conversion and scrolling done in scrollPointRecursively to use the
1297 document view of each NSClipView.
1299 * platform/mac/ScrollViewMac.mm:
1300 (WebCore::ScrollView::scrollPointRecursively): Call convertPoint:fromView: on the document views,
1301 not the clip views as we encounter them. Then call constrainScrollPoint: on the converted point to
1302 constrain to the document view bounds. And finally call scrollPoint: on the document view, not the clip view.
1304 2007-03-12 Antti Koivisto <antti@apple.com>
1308 Fix http://bugs.webkit.org/show_bug.cgi?id=12833
1309 REGRESSION: Selecting text in 6.6MB txt file is sluggish as of the Feb 19th nightly
1310 <rdar://problem/5028159>
1312 Divide large text blocks (>64kB) over multiple text nodes. This limits linebox searches to
1313 a manageable subset.
1316 (WebCore::Text::createWithLengthLimit):
1318 * html/HTMLParser.cpp:
1319 (WebCore::HTMLParser::parseToken):
1320 * loader/TextDocument.cpp:
1321 (WebCore::TextTokenizer::write):
1323 2007-03-12 David Hyatt <hyatt@apple.com>
1325 Fix a regression in printing. Printer fonts need to be part of the
1326 font cache key, since printer fonts have different glyph widths.
1327 (Integer antialiasing is used for screen fonts but not for printer fonts.)
1331 * platform/FontCache.cpp:
1332 (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
1333 (WebCore::FontPlatformDataCacheKey::operator==):
1334 (WebCore::computeHash):
1335 (WebCore::FontCache::getCachedFontPlatformData):
1337 2007-03-12 Lars Knoll <lars@trolltech.com>
1339 add missing symbol to fix the Qt build again.
1341 * platform/qt/SearchPopupMenuQt.cpp:
1342 (WebCore::SearchPopupMenu::enabled):
1344 2007-03-12 Adele Peterson <adele@apple.com>
1348 Adding the ability to enable or disable a SearchPopupMenu.
1350 * platform/SearchPopupMenu.h:
1351 * platform/mac/SearchPopupMenuMac.mm: (WebCore::SearchPopupMenu::enabled):
1352 * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::showPopup):
1354 2007-03-12 Rob Buis <buis@kde.org>
1356 Reviewed by Nikolas Zimmermann.
1358 http://bugs.webkit.org/show_bug.cgi?id=12500
1359 SVG fails to correctly handle all link style selectors
1360 http://bugs.webkit.org/show_bug.cgi?id=12567
1361 <text> elements ignore <a> children
1363 Allow <a> inside svg text and handle xlink:show.
1365 * ksvg2/svg/SVGAElement.cpp:
1366 (WebCore::SVGAElement::createRenderer):
1367 (WebCore::SVGAElement::defaultEventHandler):
1368 (WebCore::SVGAElement::childShouldCreateRenderer):
1369 * ksvg2/svg/SVGAElement.h:
1370 * ksvg2/svg/SVGElement.h:
1371 (WebCore::SVGElement::isTextContent):
1372 * ksvg2/svg/SVGTextContentElement.h:
1373 (WebCore::SVGTextContentElement::isTextContent):
1374 * ksvg2/svg/SVGTextElement.cpp:
1375 (WebCore::SVGTextElement::childShouldCreateRenderer):
1376 * rendering/SVGInlineFlowBox.cpp:
1377 (WebCore::translateBox):
1378 (WebCore::placePositionedBoxesHorizontally):
1379 (WebCore::placeBoxesVerticallyWithAbsBaseline):
1381 2007-03-12 Adele Peterson <adele@apple.com>
1385 Add a missing parameter to the constructor.
1387 * platform/PlatformKeyboardEvent.h:
1388 * platform/win/KeyEventWin.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1390 2007-03-12 Lars Knoll <lars@trolltech.com>
1392 Fix the Qt build. I still get crashes though :/
1394 * platform/graphics/qt/ImageDecoderQt.cpp:
1395 (WebCore::ImageDecoderQt::clearFrame):
1396 * platform/graphics/qt/ImageDecoderQt.h:
1397 * platform/graphics/qt/ImageSourceQt.cpp:
1398 (WebCore::ImageSource::setData):
1399 (WebCore::ImageSource::frameIsCompleteAtIndex):
1400 (WebCore::ImageSource::clear):
1401 (WebCore::ImageSource::destroyFrameAtIndex):
1402 * platform/qt/ClipboardQt.cpp:
1403 (WebCore::ClipboardQt::ClipboardQt):
1404 * platform/qt/ClipboardQt.h:
1405 * platform/qt/DragDataQt.cpp:
1406 (WebCore::DragData::createClipboard):
1408 2007-03-11 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
1410 Not reviewed - gdk build fixes.
1412 * platform/gdk/EditorClientGdk.cpp:
1413 (WebCore::EditorClientGdk::respondToChangedSelection): add stub
1414 * platform/gdk/EditorClientGdk.h:
1415 * platform/gdk/FrameGdk.cpp:
1416 * platform/gdk/TemporaryLinkStubs.cpp:
1417 (Editor::markMisspellings): add stub
1419 2007-03-11 Alexey Proskuryakov <ap@webkit.org>
1423 http://bugs.webkit.org/show_bug.cgi?id=12560
1424 W3C XPath test Text_Nodes.svg fails
1426 * xml/XPathStep.cpp:
1427 (WebCore::XPath::Step::nodeTestMatches): Revert the fix, as the behavior doesn't appear
1428 all that desirable as it did at first glance.
1430 2007-03-11 Oliver Hunt <oliver@apple.com>
1434 Fix for <rdar://problem/5055690> ASSERTION failure on drop into
1435 editable element with content changed on drop
1437 After setting the selection for a drop into an editable region
1438 we make sure the we succeeded. If we didn't we assume a focus handler
1439 or similar altered the element contents and try again, if the second
1440 attempt fails we bail out.
1442 * page/DragController.cpp:
1443 (WebCore::setSelectionToDragCaret):
1444 (WebCore::DragController::concludeDrag):
1446 2007-03-11 Oliver Hunt <oliver@apple.com>
1450 Moving Frame{Mac}::respondToChangedSelection to Frame.cpp
1451 Added new EditorClient method to handle old bridge function
1453 * bridge/EditorClient.h:
1454 Added respondToChangedSelection to replace old bridge function
1455 * editing/Editor.cpp:
1456 (WebCore::Editor::respondToChangedSelection):
1457 Add client call to replace old bridge call from Frame::respondToChangedSelection
1458 * editing/SelectionController.cpp:
1459 (WebCore::SelectionController::setSelection):
1460 No longer directly call Editor as Frame::respondToChangedSelection
1463 (WebCore::Frame::respondToChangedSelection):
1464 Moved from FrameMac, replaced bridge call with call to Editor
1465 * page/mac/FrameMac.mm:
1466 Moved respondToChangedSelection to Frame.cpp
1467 * page/mac/WebCoreFrameBridge.h:
1468 Removed respondToChangedSelection from bridge
1469 * page/qt/FrameQt.cpp:
1470 Remove stub method for respondToChangedSelection
1472 2007-03-11 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
1474 Reviewed by Brady Eidson.
1478 * loader/gdk/FrameLoaderClientGdk.cpp:
1479 (WebCore::FrameLoaderClientGdk::shouldGoToHistoryItem): return true so
1480 that FrameLoader:goBackOrForwards() works.
1482 2007-03-10 Geoffrey Garen <ggaren@apple.com>
1484 Reviewed by Darin Adler.
1486 Fixed <rdar://problem/4587763> PAC file: lock inversion between QT and
1487 JSCore causes a hang @ www.panoramas.dk
1489 See JavaScriptCore ChangeLog for details.
1491 * bindings/objc/WebScriptObject.mm:
1492 (_didExecute): Added helpful ASSERT.
1493 (+[WebScriptObject throwException:]): Added missing JSLock.
1495 2007-03-11 Antti Koivisto <antti@apple.com>
1499 Optimize linebox memory consumption:
1500 - move all bitfields to baseclass compacting them
1501 - make InlineTextBox::m_truncation unsigned short and make it relative to m_start
1502 - remove extremely rarely used EllipsisBox pointer from RootInlineBox and instead
1503 use a global hashmap to store it if needed
1504 - use minimum required number of bits to store BidiStatus enum variables in RootInlineBox
1505 - move overflow variables in RootInlineBox to a separate struct that is instantiated
1506 only if any of the variables is set to a value that can't trivially be derived from
1507 box x, y, width and height
1509 As a result line box objects shrink:
1510 InlineBox: 44 -> 44 bytes
1511 InlineTextBox: 68 -> 60 bytes
1512 InlineFlowBox: 68 -> 64 bytes
1513 RootInlineBox: 128 -> 88 bytes
1515 The optimizations possiblity was noticed when debugging http://bugs.webkit.org/show_bug.cgi?id=12833
1516 Bug 12833: REGRESSION: Selecting text in 6.6MB txt file is sluggish as of the Feb 19th nightly
1517 <rdar://problem/5028159>
1519 On that page the patch saves 11.5MB or some 21% of linebox memory consumption. It also
1520 actually improves selection performance somewhat by improving memory locality.
1522 * rendering/InlineBox.h:
1523 (WebCore::InlineBox::InlineBox):
1524 * rendering/InlineFlowBox.h:
1525 (WebCore::InlineFlowBox::InlineFlowBox):
1526 * rendering/InlineTextBox.cpp:
1527 (WebCore::InlineTextBox::placeEllipsisBox):
1528 (WebCore::InlineTextBox::nodeAtPoint):
1529 (WebCore::InlineTextBox::paint):
1530 (WebCore::InlineTextBox::paintDecoration):
1531 (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
1532 (WebCore::InlineTextBox::paintMarkedTextUnderline):
1533 * rendering/InlineTextBox.h:
1534 (WebCore::InlineTextBox::InlineTextBox):
1535 * rendering/RootInlineBox.cpp:
1537 (WebCore::RootInlineBox::Overflow::operator delete):
1538 (WebCore::RootInlineBox::Overflow::destroy):
1539 (WebCore::RootInlineBox::destroy):
1540 (WebCore::RootInlineBox::detachEllipsisBox):
1541 (WebCore::RootInlineBox::clearTruncation):
1542 (WebCore::RootInlineBox::placeEllipsis):
1543 (WebCore::RootInlineBox::paintEllipsisBox):
1544 (WebCore::RootInlineBox::addHighlightOverflow):
1545 (WebCore::RootInlineBox::nodeAtPoint):
1546 (WebCore::RootInlineBox::adjustPosition):
1547 (WebCore::RootInlineBox::selectionTop):
1548 (WebCore::RootInlineBox::setLineBreakInfo):
1549 (WebCore::RootInlineBox::ellipsisBox):
1550 (WebCore::RootInlineBox::setVerticalOverflowPositions):
1551 (WebCore::RootInlineBox::setHorizontalOverflowPositions):
1552 (WebCore::RootInlineBox::setVerticalSelectionPositions):
1553 * rendering/RootInlineBox.h:
1554 (WebCore::RootInlineBox::RootInlineBox):
1555 (WebCore::RootInlineBox::topOverflow):
1556 (WebCore::RootInlineBox::bottomOverflow):
1557 (WebCore::RootInlineBox::leftOverflow):
1558 (WebCore::RootInlineBox::rightOverflow):
1559 (WebCore::RootInlineBox::lineBreakBidiStatus):
1560 (WebCore::RootInlineBox::selectionBottom):
1561 (WebCore::RootInlineBox::Overflow::Overflow):
1563 2007-03-11 Alexey Proskuryakov <ap@webkit.org>
1567 A partial fix for http://bugs.webkit.org/show_bug.cgi?id=13021
1568 XPath can be very slow
1570 * xml/XPathExpression.cpp:
1571 (WebCore::XPathExpression::evaluate): Cache evaluationContext in a local variable.
1573 * xml/XPathExpressionNode.cpp:
1574 (WebCore::XPath::Expression::evaluationContext):
1575 * xml/XPathExpressionNode.h:
1576 (WebCore::XPath::Expression::addSubExpression):
1577 (WebCore::XPath::Expression::subExprCount):
1578 (WebCore::XPath::Expression::subExpr):
1579 * xml/XPathFunctions.cpp:
1580 * xml/XPathFunctions.h:
1581 (WebCore::XPath::Function::setName):
1582 (WebCore::XPath::Function::arg):
1583 (WebCore::XPath::Function::argCount):
1584 (WebCore::XPath::Function::name):
1585 Made one-liners critical for performance inline.
1587 * xml/XPathGrammar.y: Fully parse NodeTests, so that strings are no longer passed for what is
1588 essentially an enum. Use LocationPath accessors to add steps, instead of directly manipulating
1589 internal data members.
1591 * xml/XPathParser.cpp:
1592 (WebCore::XPath::Parser::parseStatement):
1593 (WebCore::XPath::Parser::registerNodeTest):
1594 (WebCore::XPath::Parser::deleteNodeTest):
1595 * xml/XPathParser.h:
1596 Added support methods for changes in XPathGrammar.y.
1598 * xml/XPathPath.cpp:
1599 (WebCore::XPath::Filter::evaluate): Cache evaluationContext in a local variable. Use swap() to avoid
1600 performing vector assignments.
1601 (WebCore::XPath::LocationPath::evaluate): Use swap() to avoid performing vector assignments.
1602 (WebCore::XPath::LocationPath::optimizeStepPair): This new method is called during LocationPath construction,
1603 to simplify the path as it's being built. Currently, the only optimized case is "//*" - it is a basis for
1604 important operations that cannot be efficiently written in XPath 1.0, but can be optimized with a little bit
1606 (WebCore::XPath::LocationPath::appendStep): A new accessor that modifies m_steps and calls optimizeStepPair().
1607 (WebCore::XPath::LocationPath::insertFirstStep): Ditto.
1609 (WebCore::XPath::LocationPath::setAbsolute): A new accessor.
1612 (WebCore::XPath::Step::NodeTest::):
1613 (WebCore::XPath::Step::NodeTest::NodeTest):
1614 (WebCore::XPath::Step::NodeTest::kind):
1615 (WebCore::XPath::Step::NodeTest::data):
1616 Step::NodeTest is a new sub-class that represents a fully parsed NodeTest.
1617 (WebCore::XPath::Step::axis):
1618 (WebCore::XPath::Step::nodeTest):
1619 (WebCore::XPath::Step::nodeTestData):
1620 (WebCore::XPath::Step::namespaceURI):
1621 (WebCore::XPath::Step::predicates):
1622 (WebCore::XPath::Step::setAxis):
1623 (WebCore::XPath::Step::setNodeTest):
1624 (WebCore::XPath::Step::setNodeTestData):
1625 (WebCore::XPath::Step::setNamespaceURI):
1626 (WebCore::XPath::Step::setPredicates):
1627 New accessors that let optimizeStepPair() manipulate Step data.
1629 * xml/XPathStep.cpp:
1630 (WebCore::XPath::Step::Step): Use the new NodeTest class.
1631 (WebCore::XPath::Step::evaluate): Cache evaluationContext in a local variable. Use swap() to avoid
1632 performing unneeded vector assignments.
1633 (WebCore::XPath::Step::nodesInAxis): Cosmetic changes.
1634 (WebCore::XPath::Step::nodeTestMatches): Use NodeTest instead of parsing the test from string each time.
1635 Added a partial implementation of XPath 2.0 element() node test.
1637 2007-03-10 Alexey Proskuryakov <ap@webkit.org>
1641 http://bugs.webkit.org/show_bug.cgi?id=12249
1642 FCKeditor: <hr>, <ul> and <ol> have id="undefined"
1644 This fixes the attached reduction, but not the original issue.
1646 Test: editing/execCommand/default-parameters.html
1650 Make second and third execCommand() parameters optional.
1652 2007-03-10 Adele Peterson <adele@apple.com>
1656 Fix for http://bugs.webkit.org/show_bug.cgi?id=13028
1657 REGRESSION: textField:doCommandBySelector:inFrame: not being called properly
1659 * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
1660 Before calling the base class defaultEventHandler, which will call handleKeypress, call doTextFieldCommandFromEvent.
1662 2007-03-10 Mitz Pettel <mitz@webkit.org>
1666 - fix http://bugs.webkit.org/show_bug.cgi?id=13013
1667 REGRESSION: Selection box does not scroll to where the focus jumps when pressing an alphanumeric key
1669 Test: fast/forms/listbox-typeahead-scroll.html
1671 * html/HTMLSelectElement.cpp:
1672 (WebCore::HTMLSelectElement::setSelectedIndex): Reordered to set the active selection's
1673 anchor and end before selecting the option, since the active selection is used to
1674 decide where to scroll when the selection is made.
1675 (WebCore::HTMLSelectElement::defaultEventHandler): Removed redundant check.
1677 2007-03-10 Mitz Pettel <mitz@webkit.org>
1681 - fix http://bugs.webkit.org/show_bug.cgi?id=12973
1682 REGRESSION: Reproducible assert while loading this test file if css is already in the cache
1684 Test: fast/dom/css-cached-import-rule.html
1686 Replaced some direct calls to document->stylesheetLoaded() with calls to
1687 the sheet's checkLoaded(). The latter calls back to the element's sheetLoaded() --
1688 which notifies the document of the load -- and then updates the sheet's
1689 loadCompleted() flag, ensuring that it stays in sync with whether the stylesheet
1690 is still considered pending by the document.
1692 * dom/ProcessingInstruction.cpp:
1693 (WebCore::ProcessingInstruction::parseStyleSheet):
1694 * dom/StyleElement.cpp:
1695 (WebCore::StyleElement::childrenChanged):
1696 * html/HTMLLinkElement.cpp:
1697 (WebCore::HTMLLinkElement::process):
1698 (WebCore::HTMLLinkElement::setCSSStyleSheet):
1699 * ksvg2/svg/SVGStyleElement.cpp:
1700 (WebCore::SVGStyleElement::sheetLoaded):
1701 * ksvg2/svg/SVGStyleElement.h:
1703 2007-03-10 David Kilzer <ddkilzer@webkit.org>
1707 - fix http://bugs.webkit.org/show_bug.cgi?id=9609
1708 REGRESSION: Missing image icon needs to be moved back to WebKit
1710 * WebCore.exp: Export WebCore::Image::loadPlatformResource(const char*) for use in
1711 [WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:].
1713 2007-03-09 Darin Adler <darin@apple.com>
1717 - fix http://bugs.webkit.org/show_bug.cgi?id=8928
1718 <rdar://problem/5045708> REPRODUCIBLE ASSERT: Cannot paste HTML into a
1719 contenteditable region in an XHTML document (8928)
1721 Test: editing/pasteboard/paste-xml.xhtml
1723 * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Added a check for 0
1724 here, since createContextualFragment can return 0 for XML documents that fail
1725 to parse. In my testing, callers all seem equipped to handle 0.
1727 2007-03-09 Mitz Pettel <mitz@webkit.org>
1731 - fix http://bugs.webkit.org/show_bug.cgi?id=9929
1732 REGRESSION: crash on logging in on mijnpostbank.nl
1734 Test: http/tests/misc/onload-remove-iframe-crash-2.html
1736 The resulted from an iframe's load event handler removing the iframe
1740 (WebCore::Document::implicitClose): Bail out early if an event handler
1742 * loader/FrameLoader.cpp:
1743 (WebCore::FrameLoader::FrameLoader):
1744 (WebCore::FrameLoader::clear):
1745 (WebCore::FrameLoader::checkCompleted): Protect the frame from deletion
1747 (WebCore::FrameLoader::checkCompletedTimerFired):
1748 (WebCore::FrameLoader::scheduleCheckCompleted):
1749 (WebCore::FrameLoader::detachFromParent): Schedule a completion check
1750 on the parent (in case the child is what has been keeping it from completing).
1751 * loader/FrameLoader.h:
1753 2007-03-08 David Kilzer <ddkilzer@webkit.org>
1757 - fix http://bugs.webkit.org/show_bug.cgi?id=13019
1758 REGRESSION (r20074): Forms don't submit on a variety of websites
1760 No tests added since LayoutTests/fast/forms/document-write.html was timing out
1761 and causing a layout test failure.
1763 * html/HTMLFormElement.cpp:
1764 (WebCore::HTMLFormElement::submit): Removed stray code.
1766 2007-03-08 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
1768 Not reviewed - gdk build fix.
1770 * platform/graphics/cairo/ImageSourceCairo.cpp:
1771 (WebCore::ImageSource::frameIsCompleteAtIndex): add empty stub
1773 2007-03-08 Justin Garcia <justin.garcia@apple.com>
1775 Reviewed by harrison
1777 <rdar://problem/4903193>
1778 On particular page, Copy is so slow it seems like a hang
1780 ~2x speedup copying:
1781 http://shakespeare.mit.edu/henryviii/full.html
1782 Also produces less bloated markup.
1784 * editing/markup.cpp:
1785 (WebCore::startMarkup): Don't wrap text nodes in style spans.
1786 For Elements, don't inline styles inherited from ancestors.
1787 (WebCore::createMarkup): No longer necessary to find
1788 the root's default style and pass it to startMarkup.
1789 Add a wrapper span around the markup with the styles
1790 that all nodes in the markup inherit (the inheritable
1791 styles from the common ancestor container's computed style).
1792 Added a FIXME about unecessary markup for inline ancestors
1793 up to the commonAncestorBlock.
1795 2007-03-08 Darin Adler <darin@apple.com>
1799 - <rdar://problem/4470381> multipart/form-data boundary security vulnerability
1801 By making the form data boundary a string with some random data in it, we reduce
1802 the possibility that anyone could take advantage of it by creating a file that
1803 intentionally has the boundary string in it.
1805 * html/HTMLFormElement.h: Removed boundary(), setBoundary(), and m_boundary.
1806 Marked a lot more stuff private.
1807 * html/HTMLFormElement.cpp:
1808 (WebCore::HTMLFormElement::HTMLFormElement): Removed code to initialize
1810 (WebCore::randomNumber): Added. Function that returns a random number, including
1811 seeding the random number generator the first time it's called. For now, usees the more
1812 random function random() on Mac OS X and the more-standard rand() on other platforms.
1813 (WebCore::HTMLFormElement::formData): Take a parameter with the form boundary string,
1814 and use that instead of m_boundary.
1815 (WebCore::getUniqueBoundaryString): Added. Makes a boundary string using random numbers
1816 and base 64 encoding.
1817 (WebCore::HTMLFormElement::submit): Call getUniqueBoundaryString and pass the boundary
1818 string into formData for multipart form posts.
1820 2007-03-08 Maciej Stachowiak <mjs@apple.com>
1824 <rdar://problem/4646563> REGRESSION: Unable to send text message from Verizon text message website: vtext.com (12588)
1825 http://bugs.webkit.org/show_bug.cgi?id=12588
1827 Carefully revised which focus operations restore previous selection, which clear it, and which
1828 select the whole control contents.
1831 fast/forms/focus-selection-input.html
1832 fast/forms/focus-selection-textarea.html
1835 (WebCore::Element::focus):
1837 * html/HTMLInputElement.cpp:
1838 (WebCore::HTMLInputElement::focus):
1839 (WebCore::HTMLInputElement::accessKeyAction):
1840 * html/HTMLInputElement.h:
1841 * html/HTMLLabelElement.cpp:
1842 (WebCore::HTMLLabelElement::focus):
1843 (WebCore::HTMLLabelElement::accessKeyAction):
1844 * html/HTMLLabelElement.h:
1845 * html/HTMLLegendElement.cpp:
1846 (WebCore::HTMLLegendElement::focus):
1847 * html/HTMLLegendElement.h:
1848 * html/HTMLTextAreaElement.cpp:
1849 (WebCore::HTMLTextAreaElement::focus):
1850 * html/HTMLTextAreaElement.h:
1851 * page/FocusController.cpp:
1852 (WebCore::FocusController::advanceFocus):
1854 2007-03-08 Justin Garcia <justin.garcia@apple.com>
1856 Reviewed by harrison
1858 <http://bugs.webkit.org/show_bug.cgi?id=12244>
1859 FCKeditor: Find dialog doesn't work
1861 * bindings/js/kjs_window.cpp:
1862 (KJS::Window::find): Added. This function doesn't yet
1863 support whole word searches, searching in subframes, or
1864 opening the find dialog.
1865 (KJS::WindowFunc::callAsFunction):
1866 * bindings/js/kjs_window.h:
1869 2007-03-08 David Hyatt <hyatt@apple.com>
1871 Fix regression from throwing away frames of large animated images. Alter
1872 animated images so that they refuse to advance the animation until the
1873 current displayed frame has been fully decoded.
1877 * platform/graphics/BitmapImage.cpp:
1878 (WebCore::BitmapImage::startAnimation):
1879 (WebCore::BitmapImage::advanceAnimation):
1880 * platform/graphics/ImageSource.h:
1881 * platform/graphics/cg/ImageSourceCG.cpp:
1882 (WebCore::ImageSource::frameIsCompleteAtIndex):
1884 2007-03-08 David Hyatt <hyatt@apple.com>
1886 Fix 2% performance regression on the PLT. Increase the large animated
1887 image cutoff from 1MB to 5MB.
1889 In addition when pruning we will aggressively discard image sources.
1893 * platform/graphics/BitmapImage.cpp:
1894 (WebCore::BitmapImage::destroyDecodedData):
1896 2007-03-08 Timothy Hatcher <timothy@apple.com>
1900 <rdar://problem/4664697> highlighter SPI needs a node parameter to give more context
1902 Pass the RenderObject's node to customHighlightLineRect and paintCustomHighlight.
1905 * page/mac/FrameMac.mm:
1906 (WebCore::Frame::customHighlightLineRect):
1907 (WebCore::Frame::paintCustomHighlight):
1908 * page/mac/WebCoreFrameBridge.h:
1909 * rendering/InlineTextBox.cpp:
1910 (WebCore::InlineTextBox::paintCustomHighlight):
1911 * rendering/RenderBox.cpp:
1912 (WebCore::RenderBox::paintCustomHighlight):
1913 * rendering/RootInlineBox.cpp:
1914 (WebCore::RootInlineBox::addHighlightOverflow):
1915 (WebCore::RootInlineBox::paintCustomHighlight):
1917 2007-03-08 Justin Garcia <justin.garcia@apple.com>
1919 Reviewed by harrison
1921 <http://bugs.webkit.org/show_bug.cgi?id=13000>
1922 Range.createContextualFragment is not supported
1925 (WebCore::Range::createContextualFragment): The
1926 "startContainer" may not be a container, if the
1927 range starts inside text. In that case, look
1928 to the parent of the start node for an HTMLElement.
1930 2007-03-08 Justin Garcia <justin.garcia@apple.com>
1932 Reviewed by harrison
1934 <rdar://problem/5049671>
1935 Gmail Editor: With linked text, Remove Formatting doesn't always remove underline
1937 * editing/Editor.cpp:
1938 (WebCore::Editor::removeFormattingAndStyle): Clear removed
1939 anchors after the deletion.
1941 2007-03-08 David Kilzer <ddkilzer@webkit.org>
1943 Reviewed by NOBODY (build fix).
1945 Added missing file for r20059:
1946 <rdar://problem/4708689> -- REGRESSION: Some symbols with 2-byte display as garbage in Hotmail.
1948 File was taken from this svn repository which contained versions of ucnv.h and ucnv_err.h
1949 that were identical to ours:
1950 http://source.icu-project.org/repos/icu/icu/tags/release-3-2/source/common/unicode/ucnv_cb.h
1952 * icu/unicode/ucnv_cb.h: Added.
1954 2007-03-08 Shrikant Gangoda <shrikant.gangoda@celunite.com>
1958 * platform/graphics/cairo/ImageSourceCairo.cpp:
1959 (WebCore::ImageSource::~ImageSource):
1960 (WebCore::ImageSource::clear):
1962 2007-03-08 Oliver Hunt <oliver@apple.com>
1966 To match old TEC behaviour when using ICU we need to use
1967 a few manual fallback encodings for the GBK/EUC-CN charsets
1969 <rdar://problem/4708689> -- REGRESSION: Some symbols with 2-byte display as garbage in Hotmail.
1971 * platform/TextCodecICU.cpp:
1972 (WebCore::TextCodecICU::TextCodecICU):
1973 (WebCore::TextCodecICU::createICUConverter):
1974 (WebCore::gbkEscapes):
1975 (WebCore::gbkCallbackEscape):
1976 (WebCore::gbkCallbackSubstitute):
1977 (WebCore::TextCodecICU::encode):
1978 * platform/TextCodecICU.h:
1979 (WebCore::TextCodecICU::needsGBKFallbacks):
1980 (WebCore::TextCodecICU::setNeedsGBKFallbacks):
1982 2007-03-08 Alexey Proskuryakov <ap@webkit.org>
1986 * xml/XPathUtil.cpp:
1987 (WebCore::XPath::stringValue):
1989 2007-03-08 David Hyatt <hyatt@apple.com>
1991 This patch dramatically reduces the memory consumed by animated images. For large animated GIFs (defined for
1992 now as >1mb in terms of decoded frame buffer size), we will now aggressively flush previous frames of the
1993 animated GIF and just re-decode them on the fly if the animation loops.
1995 Whenever a large animated GIF has its animation reset, we will also just throw out everything and start
1996 the animation over (in order to get rid of any cached detritus held in the ImageSource).
1998 With this patch and the sample GIF used to test, WebKit's memory consumption went from 160MB down to 16MB.
2002 * platform/graphics/BitmapImage.cpp:
2003 (WebCore::BitmapImage::destroyDecodedData):
2004 (WebCore::BitmapImage::resetAnimation):
2005 (WebCore::BitmapImage::advanceAnimation):
2006 * platform/graphics/ImageSource.h:
2007 * platform/graphics/cg/ImageSourceCG.cpp:
2008 (WebCore::ImageSource::~ImageSource):
2009 (WebCore::ImageSource::clear):
2011 2007-03-08 Alexey Proskuryakov <ap@webkit.org>
2015 http://bugs.webkit.org/show_bug.cgi?id=13006
2016 XPath string-value is broken for some node types
2018 Test: fast/xpath/string-value.html
2020 * xml/XPathUtil.cpp:
2021 (WebCore::XPath::stringValue): Fix it :-)
2023 2007-03-07 Anders Carlsson <acarlsson@apple.com>
2027 <rdar://problem/4981000>
2028 http://bugs.webkit.org/show_bug.cgi?id=12634
2029 REGRESSION: crash loading web archive (12634)
2031 The reason this bug wasn't always reproducible is that it involved sending an event to a plugin while
2032 the page was loading. Before we send the event to the plugin we defer loads. The problem was that
2033 MainResourceLoader::setDefersLoad would not work with data loads.
2035 * loader/DocumentLoader.cpp:
2036 (WebCore::DocumentLoader::setRequest):
2037 Only set m_committed to false if we also have a valid unreachable URL.
2039 * loader/MainResourceLoader.cpp:
2040 (WebCore::MainResourceLoader::setDefersLoading):
2041 Make sure to stop and start data loads.
2043 2007-03-07 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
2049 * platform/gdk/EditorClientGdk.cpp:
2050 (WebCore::EditorClientGdk::handleKeypress): renamed
2051 (WebCore::EditorClientGdk::handleInputMethodKeypress): add a stub
2052 * platform/gdk/EditorClientGdk.h:
2053 * platform/graphics/cairo/ImageSourceCairo.cpp:
2054 (WebCore::ImageSource::destroyFrameAtIndex): add a stub
2056 2007-03-07 Alexey Proskuryakov <ap@webkit.org>
2060 http://bugs.webkit.org/show_bug.cgi?id=13004
2061 Repeatedly calling XPathExpression.evaluate() causes crashes or memory leaks
2063 Removed XPath::Expression::optimize() and related methods, since they were buggy and almost useless.
2064 Merged doEvaluate() into evaluate(), since this was all evaluate() was doing after the above changes.
2066 Test: fast/xpath/evaluate-twice.html
2068 * xml/XPathExpression.cpp:
2069 (WebCore::XPathExpression::evaluate):
2070 * xml/XPathExpressionNode.cpp:
2071 (WebCore::XPath::Expression::Expression):
2072 (WebCore::XPath::Expression::~Expression):
2073 * xml/XPathExpressionNode.h:
2074 * xml/XPathFunctions.cpp:
2075 (WebCore::XPath::FunLast::evaluate):
2076 (WebCore::XPath::FunPosition::evaluate):
2077 (WebCore::XPath::FunId::evaluate):
2078 (WebCore::XPath::FunLocalName::evaluate):
2079 (WebCore::XPath::FunNamespaceURI::evaluate):
2080 (WebCore::XPath::FunName::evaluate):
2081 (WebCore::XPath::FunCount::evaluate):
2082 (WebCore::XPath::FunString::evaluate):
2083 (WebCore::XPath::FunConcat::evaluate):
2084 (WebCore::XPath::FunStartsWith::evaluate):
2085 (WebCore::XPath::FunContains::evaluate):
2086 (WebCore::XPath::FunSubstringBefore::evaluate):
2087 (WebCore::XPath::FunSubstringAfter::evaluate):
2088 (WebCore::XPath::FunSubstring::evaluate):
2089 (WebCore::XPath::FunStringLength::evaluate):
2090 (WebCore::XPath::FunNormalizeSpace::evaluate):
2091 (WebCore::XPath::FunTranslate::evaluate):
2092 (WebCore::XPath::FunBoolean::evaluate):
2093 (WebCore::XPath::FunNot::evaluate):
2094 (WebCore::XPath::FunTrue::evaluate):
2095 (WebCore::XPath::FunLang::evaluate):
2096 (WebCore::XPath::FunFalse::evaluate):
2097 (WebCore::XPath::FunNumber::evaluate):
2098 (WebCore::XPath::FunSum::evaluate):
2099 (WebCore::XPath::FunFloor::evaluate):
2100 (WebCore::XPath::FunCeiling::evaluate):
2101 (WebCore::XPath::FunRound::evaluate):
2102 * xml/XPathPath.cpp:
2103 (WebCore::XPath::Filter::evaluate):
2104 (WebCore::XPath::LocationPath::evaluate):
2105 (WebCore::XPath::Path::evaluate):
2107 * xml/XPathPredicate.cpp:
2108 (WebCore::XPath::Number::evaluate):
2109 (WebCore::XPath::StringExpression::evaluate):
2110 (WebCore::XPath::Negative::evaluate):
2111 (WebCore::XPath::NumericOp::evaluate):
2112 (WebCore::XPath::EqTestOp::evaluate):
2113 (WebCore::XPath::LogicalOp::evaluate):
2114 (WebCore::XPath::Union::evaluate):
2115 * xml/XPathPredicate.h:
2116 * xml/XPathStep.cpp:
2118 * xml/XPathVariableReference.cpp:
2119 (WebCore::XPath::VariableReference::evaluate):
2120 * xml/XPathVariableReference.h:
2122 2007-03-07 Sam Weinig <sam@webkit.org>
2126 Remove unused #import from Objective-C bindings and cleanup the order of #imports.
2128 * bindings/scripts/CodeGeneratorObjC.pm:
2130 2007-03-07 Sam Weinig <sam@webkit.org>
2134 Make sure the baseURI attribute generates for private Objective-C bindings.
2138 2007-03-07 Anders Carlsson <acarlsson@apple.com>
2142 <rdar://problem/4874059>
2143 REGRESSION: Painter IX:register - Crash in WebCore:: ResourceLoader::willSendRequest()
2145 If a load is done from inside of an error delegate method that is called because we cancel another load,
2146 the first load should be ignored since this is what shipping WebKit does.
2148 (Actually, it does load the page in the data source but doesn't do anything with it since the data source
2149 won't have a web frame).
2151 * loader/FrameLoader.cpp:
2152 (WebCore::FrameLoader::load):
2153 Just bail out if m_isStoppingLoad is true.
2155 2007-03-07 David Hyatt <hyatt@apple.com>
2157 Use CGImageRelease instead of CFRelease.
2161 * platform/graphics/cg/ImageCG.cpp:
2162 (WebCore::FrameData::clear):
2163 * platform/graphics/cg/ImageSourceCG.cpp:
2164 (WebCore::ImageSource::destroyFrameAtIndex):
2166 2007-03-07 David Hyatt <hyatt@apple.com>
2168 Fix a regression where the cache size overflows because of a double
2169 subtraction per resource when they got removed from the cache. Add an
2170 assert to adjustSize to detect this case in the future.
2172 Fix ImageSourceCG so that when we flush decoded data from our cache that
2173 we also flush it from the ImageSource.
2178 (WebCore::Cache::adjustSize):
2179 * platform/graphics/BitmapImage.cpp:
2180 (WebCore::BitmapImage::~BitmapImage):
2181 (WebCore::BitmapImage::destroyDecodedData):
2182 * platform/graphics/Image.h:
2183 * platform/graphics/ImageSource.h:
2184 * platform/graphics/cg/ImageSourceCG.cpp:
2185 (WebCore::ImageSource::setData):
2186 (WebCore::ImageSource::destroyFrameAtIndex):
2188 2007-03-07 Mitz Pettel <mitz@webkit.org>
2192 - fix http://bugs.webkit.org/show_bug.cgi?id=13002
2193 Incomplete repaint of inset outlines
2195 Test: fast/repaint/outline-inset.html
2197 * rendering/RenderObject.cpp:
2198 (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
2200 2007-03-07 Oliver Hunt <oliver@apple.com>
2204 Reset mouse down/drag state variables on mouse button release
2206 Fixes <rdar://problem/5044654>: Drag out of some QuickTime plug-ins converting into image drag
2208 * page/EventHandler.cpp:
2209 (WebCore::EventHandler::handleMouseReleaseEvent):
2211 2007-03-07 Adele Peterson <adele@apple.com>
2215 WebCore part of fix for:
2216 http://bugs.webkit.org/show_bug.cgi?id=10871
2217 http://bugs.webkit.org/show_bug.cgi?id=12677
2218 <rdar://problem/4823129> REGRESSION: IME key events different in nightly
2219 <rdar://problem/4759563> REGRESSION: Return key is always sent when you confirm a clause in kotoeri
2221 * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): Call handleInputMethodKeypress before actually dispatching the keypress event
2222 so that input methods have a chance to handle the event.
2223 If the input method handles the event (by marking or unmarking text), then we don't need to send the keypress event.
2224 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)
2225 when we dispatch the keypress event.
2227 * dom/KeyboardEvent.h: Added Mac-specific KeypressCommand struct, so we can store command info during handleInputMethodKeypress, and use it during handleKeypress.
2228 (WebCore::KeyboardEvent::keypressCommand):
2229 (WebCore::KeyboardEvent::setKeypressCommand):
2231 * bridge/EditorClient.h:
2232 * editing/Editor.cpp:
2233 (WebCore::Editor::handleKeypress): Changed handleKeyPress to handleKeypress.
2234 (WebCore::Editor::handleInputMethodKeypress): Added.
2237 * platform/graphics/svg/SVGImageEmptyClients.h:
2238 (WebCore::SVGEmptyEditorClient::handleKeypress): Changed handleKeyPress to handleKeypress.
2239 (WebCore::SVGEmptyEditorClient::handleInputMethodKeypress): Added.
2241 2007-03-07 Rob Buis <buis@kde.org>
2245 http://bugs.webkit.org/show_bug.cgi?id=12579
2246 WebKit fails SVG xml:base test
2248 Implement DOM3 properties baseURI and documentURI to fix
2249 the testcase in bug 12579.
2251 * bindings/js/kjs_dom.cpp:
2252 (KJS::DOMNode::getValueProperty):
2253 * bindings/js/kjs_domnode.h:
2256 (WebCore::Document::documentURI):
2257 (WebCore::Document::setDocumentURI):
2258 (WebCore::Document::baseURI):
2261 * dom/DocumentType.cpp:
2262 (WebCore::DocumentType::baseURI):
2263 * dom/DocumentType.h:
2265 (WebCore::Element::baseURI):
2268 (WebCore::Node::baseURI):
2270 * ksvg2/misc/SVGImageLoader.cpp:
2271 (WebCore::SVGImageLoader::updateFromElement):
2272 * ksvg2/svg/SVGImageElement.cpp:
2273 (WebCore::SVGImageElement::parseMappedAttribute):
2274 (WebCore::SVGImageElement::attach):
2276 2007-03-07 Anders Carlsson <acarlsson@apple.com>
2280 Remove some methods in FrameLoader that just calls down to the active document loader. Since each
2281 resource loader now has a pointer to its document loader, we can just call directly to the
2285 * loader/FrameLoader.cpp:
2286 * loader/FrameLoader.h:
2287 * loader/MainResourceLoader.cpp:
2288 (WebCore::MainResourceLoader::willSendRequest):
2289 (WebCore::MainResourceLoader::didReceiveResponse):
2290 * loader/SubresourceLoader.cpp:
2291 (WebCore::SubresourceLoader::SubresourceLoader):
2292 (WebCore::SubresourceLoader::didFinishLoading):
2293 (WebCore::SubresourceLoader::didFail):
2294 (WebCore::SubresourceLoader::didCancel):
2295 * loader/mac/NetscapePlugInStreamLoaderMac.mm:
2296 (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
2297 (WebCore::NetscapePlugInStreamLoader::didFail):
2298 (WebCore::NetscapePlugInStreamLoader::didCancel):
2300 2007-03-06 Geoffrey Garen <ggaren@apple.com>
2302 Reviewed by Maciej Stachowiak.
2304 Fixed <rdar://problem/4576242> | http://bugs.webkit.org/show_bug.cgi?id=12586
2305 PAC file: malloc deadlock sometimes causes a hang @ www.apple.com/pro/profiles/ (12586)
2307 No test because this is very difficult to repro, and the new ASSERTs in
2308 JavaScriptCore catch the underlying cause while running normal layout tests.
2310 This is a modified version of r14752 on the branch.
2312 The fix is to use a bit inside each node, instead of a hash table, to track
2313 which node subtrees are in the process of being marked. This avoids a call
2314 to malloc inside mark().
2316 * bindings/js/kjs_binding.cpp:
2318 (KJS::domNodesPerDocument):
2319 * bindings/js/kjs_dom.cpp:
2320 (KJS::DOMNode::mark):
2322 (WebCore::Node::Node):
2325 2007-03-06 David Hyatt <hyatt@apple.com>
2327 This patch reworks the WebCore memory cache to significantly reduce the amount of memory consumed by
2328 images in the cache and to enhance the accuracy of the cache size as an absolute bound for the objects
2329 contained within it. WebCore's memory use over time should significantly improve as a result of these
2332 Cached resources now have both an encoded size (the original data stream) and a decoded size (an estimate of
2333 the amount of memory consumed by an expanded version of that resource, e.g., the decoded frames of an image).
2334 Both sizes now count towards the total size of the object and towards the allowed memory cache total.
2336 By including both totals the reported size of resources will now be larger, and the cache will therefore become
2337 much more aggressive about flushing.
2339 Objects are stored in size-adjusted and popularity-aware LRU lists as before, but encoded size is now always
2340 used when determining the correct LRU list.
2342 The flush algorithm for the memory cache has been rewritten to first destroy decoded data before evicting
2343 resources. By being able to compact its resources without evicting them, the memory cache can now hold many more
2344 unique resources (encoded) in the same amount of space. Depending on how much of a hit we want to take from
2345 re-decoding images, the memory cache could in theory have its size significantly reduced now while still holding
2346 more resources than it did at the larger size!
2350 * WebCore.xcodeproj/project.pbxproj:
2352 (WebCore::Cache::requestResource):
2353 (WebCore::Cache::prune):
2354 (WebCore::Cache::remove):
2355 (WebCore::Cache::lruListFor):
2356 (WebCore::Cache::adjustSize):
2358 * loader/CachedCSSStyleSheet.cpp:
2359 (WebCore::CachedCSSStyleSheet::data):
2360 * loader/CachedImage.cpp:
2361 (WebCore::CachedImage::CachedImage):
2362 (WebCore::CachedImage::allReferencesRemoved):
2363 (WebCore::CachedImage::clear):
2364 (WebCore::CachedImage::data):
2365 (WebCore::CachedImage::destroyDecodedData):
2366 (WebCore::CachedImage::decodedSize):
2367 (WebCore::CachedImage::decodedSizeChanged):
2368 (WebCore::CachedImage::shouldPauseAnimation):
2369 * loader/CachedImage.h:
2370 * loader/CachedResource.cpp:
2371 (WebCore::CachedResource::CachedResource):
2372 (WebCore::CachedResource::deref):
2373 (WebCore::CachedResource::setEncodedSize):
2374 * loader/CachedResource.h:
2375 (WebCore::CachedResource::allReferencesRemoved):
2376 (WebCore::CachedResource::size):
2377 (WebCore::CachedResource::encodedSize):
2378 (WebCore::CachedResource::decodedSize):
2379 (WebCore::CachedResource::destroyDecodedData):
2380 * loader/CachedScript.cpp:
2381 (WebCore::CachedScript::data):
2382 * loader/CachedXSLStyleSheet.cpp:
2383 (WebCore::CachedXSLStyleSheet::data):
2384 * platform/graphics/BitmapImage.cpp:
2385 (WebCore::BitmapImage::BitmapImage):
2386 (WebCore::BitmapImage::~BitmapImage):
2387 (WebCore::BitmapImage::destroyDecodedData):
2388 (WebCore::BitmapImage::pruneDecodedDataIfNeeded):
2389 (WebCore::BitmapImage::cacheFrame):
2390 (WebCore::BitmapImage::setNativeData):
2391 (WebCore::BitmapImage::shouldAnimate):
2392 (WebCore::BitmapImage::advanceAnimation):
2393 * platform/graphics/BitmapImage.h:
2394 (WebCore::BitmapImage::decodedSize):
2395 * platform/graphics/Image.cpp:
2396 (WebCore::Image::Image):
2397 * platform/graphics/Image.h:
2398 (WebCore::Image::destroyDecodedData):
2399 (WebCore::Image::decodedSize):
2400 (WebCore::Image::imageObserver):
2401 * platform/graphics/ImageAnimationObserver.h: Removed.
2402 * platform/graphics/ImageObserver.h: Added.
2403 (WebCore::ImageObserver::~ImageObserver):
2404 * platform/graphics/svg/SVGImage.cpp:
2405 (WebCore::SVGImage::SVGImage):
2406 * platform/graphics/svg/SVGImage.h:
2408 2007-03-06 Alexey Proskuryakov <ap@webkit.org>
2410 Reviewed by Sam Weinig.
2412 http://bugs.webkit.org/show_bug.cgi?id=12987
2413 Fix and import 4XPath test_numeric_expr.html
2415 * xml/XPathPredicate.cpp:
2416 (WebCore::XPath::Negative::doEvaluate): Convert the argument to number.
2417 (WebCore::XPath::NumericOp::doEvaluate): Convert the arguments to numbers. Use a correct operation for mod.
2418 * xml/XPathStep.cpp:
2419 (WebCore::XPath::Step::nodesInAxis): Do not append parent node if there is none.
2420 * xml/XPathValue.cpp:
2421 (WebCore::XPath::Value::toNumber): Do not convert to DeprecatedString just to trim whitespace and to convert to double.
2422 * platform/DeprecatedString.cpp:
2423 (WebCore::DeprecatedStringData::makeAscii): Added a FIXME about unreliable makeAscii() behavior.
2425 2007-03-06 Maciej Stachowiak <mjs@apple.com>
2429 <rdar://problem/4619663> REGRESSION (NativePopup): Popup menu doesn't draw at the correct vertical position (9816)
2431 * platform/mac/PopupMenuMac.mm:
2432 (WebCore::PopupMenu::show): Make a temporary dummy view with the
2433 passed in rect, since AppKit will use the view bounds to determine
2434 what area to exclude when popping up a menu moved to the top of
2437 2007-03-06 Geoffrey Garen <ggaren@apple.com>
2439 Reviewed by Maciej Stachowiak.
2441 Fixed all known crashers exposed by run-webkit-tests --threaded [*]. See
2442 JavaScriptCore ChangeLog for more details.
2444 * bindings/js/kjs_binding.cpp:
2445 (KJS::domNodesPerDocument): Added thread safety ASSERT.
2446 (KJS::ScriptInterpreter::mark): Removed obsolete logic for marking unsafe
2447 objects when collecting on a secondary thread. The Collector takes care
2450 * bindings/js/kjs_binding.h:
2451 (KJS::DOMObject::DOMObject): Used new API for specifying that WebCore
2452 objects should be garbage collected on the main thread only.
2454 * bindings/js/kjs_window.cpp:
2455 (KJS::ScheduledAction::execute): Moved JSLock to cover implementedsCall() call,
2456 which, for some subclasses, ends up allocating garbage collected objects.
2457 (This fix was speculative. I didn't actually see a crash from this.)
2458 (KJS::Window::timerFired): Added JSLock around ScheduleAction destruction,
2459 since it destroys a KJS::List.
2461 * bindings/objc/WebScriptObject.mm:
2462 (-[WebScriptObject setException:]): Added JSLock. (This fix was speculative.
2463 I didn't actually see a crash from this.)
2465 * bridge/mac/WebCoreScriptDebugger.mm:
2466 (-[WebCoreScriptCallFrame evaluateWebScript:]): Added JSLock. (This fix
2467 was speculative. I didn't actually see a crash from this.)
2470 (WebCore::Document::~Document): Added JSLock around modification to
2471 domNodesPerDocument(), which can be accessed concurrently during garbage
2474 (WebCore::Node::setDocument): ditto.
2476 [*] fast/js/toString-stack-overflow.html is an exception. --threaded mode
2477 crashes this test because it causes the garbage collector to run frequently,
2478 and this test crashes if you happen to garbage collect while it's running.
2479 This is a known issue with stack overflow during the mark phase. It's
2480 not related to threading.
2482 2007-03-06 Mark Rowe <mrowe@apple.com>
2484 Reviewed by Sam Weinig.
2486 Fix http://bugs.webkit.org/show_bug.cgi?id=12942
2487 Bug 12942: ASSERTION FAILURE: qantas.com.au changing selected item in <select> via JS
2489 Test: fast/dom/select-selectedIndex-bug-12942.html.
2491 * html/HTMLSelectElement.cpp:
2492 (WebCore::HTMLSelectElement::recalcListItems): Reset m_lastOnChangeIndex when recalculating list items.
2493 * html/HTMLSelectElement.h:
2495 2007-03-06 Brady Eidson <beidson@apple.com>
2497 Rubberstamped by Kevin Decker
2501 * ChangeLog: Point out revision 20,000
2503 2007-03-06 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
2509 * loader/gdk/FrameLoaderClientGdk.cpp: update userAgent() signature.
2510 (WebCore::FrameLoaderClientGdk::userAgent):
2511 * loader/gdk/FrameLoaderClientGdk.h: ditto.
2513 2007-03-06 Mitz Pettel <mitz@webkit.org>
2517 - fix http://bugs.webkit.org/show_bug.cgi?id=12986
2518 REGRESSION(NativeListBox): Listboxes not updated when resized dynamically
2520 Test: fast/forms/select-change-listbox-size.html
2522 * html/HTMLSelectElement.cpp:
2523 (WebCore::HTMLSelectElement::parseMappedAttribute): Reattach on list box size change.
2525 2007-03-06 Mitz Pettel <mitz@webkit.org>
2527 Reviewed by Dave Hyatt.
2529 - fix http://bugs.webkit.org/show_bug.cgi?id=12885
2530 REGRESSION (r19696): Incomplete background repaint
2532 Tests: fast/repaint/content-into-overflow.html
2533 fast/repaint/overflow-into-content.html
2535 Changed repaintAfterLayoutIfNeeded() to take, in addition to the clipped overflow
2536 rect, the unclipped border box plus outline, and to repaint any areas that
2537 were added or removed from that box, in addition to any areas added or removed
2538 from the clipped overflow rect.
2540 * platform/graphics/svg/SVGResourceMarker.cpp:
2541 (WebCore::SVGResourceMarker::draw):
2542 * rendering/RenderBlock.cpp:
2543 (WebCore::RenderBlock::layoutBlock):
2544 * rendering/RenderBox.cpp:
2545 (WebCore::RenderBox::absoluteClippedOverflowRect): Renamed getAbsoluteRepaintRect() to
2547 * rendering/RenderBox.h:
2548 * rendering/RenderFlexibleBox.cpp:
2549 (WebCore::RenderFlexibleBox::layoutBlock):
2550 * rendering/RenderFlow.cpp:
2551 (WebCore::RenderFlow::absoluteClippedOverflowRect):
2552 * rendering/RenderFlow.h:
2553 * rendering/RenderForeignObject.cpp:
2554 (WebCore::RenderForeignObject::layout):
2555 * rendering/RenderHTMLCanvas.cpp:
2556 (WebCore::RenderHTMLCanvas::layout):
2557 * rendering/RenderImage.cpp:
2558 (WebCore::RenderImage::layout):
2559 * rendering/RenderLayer.cpp:
2560 (WebCore::RenderLayer::RenderLayer):
2561 (WebCore::RenderLayer::checkForRepaintOnResize):
2562 (WebCore::RenderLayer::updateLayerPositions):
2563 * rendering/RenderLayer.h:
2564 * rendering/RenderObject.cpp:
2565 (WebCore::RenderObject::repaint):
2566 (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
2567 (WebCore::RenderObject::getAbsoluteRepaintRectWithOutline):
2568 (WebCore::RenderObject::absoluteClippedOverflowRect):
2569 (WebCore::RenderObject::absoluteOutlineBox):
2570 * rendering/RenderObject.h:
2571 * rendering/RenderPath.cpp:
2572 (WebCore::RenderPath::layout):
2573 (WebCore::RenderPath::absoluteClippedOverflowRect):
2574 (WebCore::RenderPath::absoluteRects):
2575 (WebCore::RenderPath::drawMarkersIfNeeded):
2576 * rendering/RenderPath.h:
2577 * rendering/RenderSVGContainer.cpp:
2578 (WebCore::RenderSVGContainer::layout):
2579 (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
2580 (WebCore::RenderSVGContainer::absoluteRects):
2581 * rendering/RenderSVGContainer.h:
2582 * rendering/RenderSVGHiddenContainer.cpp:
2583 (WebCore::RenderSVGHiddenContainer::absoluteClippedOverflowRect):
2584 * rendering/RenderSVGHiddenContainer.h:
2585 * rendering/RenderSVGImage.cpp:
2586 (WebCore::RenderSVGImage::imageChanged):
2587 (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
2588 (WebCore::RenderSVGImage::absoluteRects):
2589 * rendering/RenderSVGImage.h:
2590 * rendering/RenderSVGText.cpp:
2591 (WebCore::RenderSVGText::absoluteClippedOverflowRect):
2592 (WebCore::RenderSVGText::layout):
2593 (WebCore::RenderSVGText::absoluteRects):
2594 * rendering/RenderSVGText.h:
2595 * rendering/RenderTable.cpp:
2596 (WebCore::RenderTable::layout):
2597 * rendering/RenderTableCell.cpp:
2598 (WebCore::RenderTableCell::absoluteClippedOverflowRect):
2599 * rendering/RenderTableCell.h:
2600 * rendering/RenderTableCol.cpp:
2601 (WebCore::RenderTableCol::absoluteClippedOverflowRect):
2602 * rendering/RenderTableCol.h:
2603 * rendering/RenderTableRow.cpp:
2604 (WebCore::RenderTableRow::absoluteClippedOverflowRect):
2605 * rendering/RenderTableRow.h:
2606 * rendering/RenderText.cpp:
2607 (WebCore::RenderText::absoluteClippedOverflowRect):
2608 * rendering/RenderText.h:
2610 2007-03-06 Ian Eng <ian.eng.webkit@gmail.com>
2614 - fixed http://bugs.webkit.org/show_bug.cgi?id=12720
2615 Bug 12720: Re-defining window.location.toString function keeps re-loading forever
2617 * bindings/js/kjs_window.cpp:
2618 Disallow replacing functions in LocationTable, and return early without updating URL.
2620 2007-03-06 Kevin McCullough <kmccullough@apple.com>
2624 <http://bugs.webkit.org/show_bug.cgi?id=12686>
2625 REGRESSION: Bloglines.com Feeds tab cannot expand folders in TOT
2626 - Now all class constructors implement implementsHasInstance.
2628 * bindings/scripts/CodeGeneratorJS.pm:
2630 2007-03-07 Nikolas Zimmermann <zimmermann@kde.org>
2632 Reviewed by Rob & Oliver.
2634 Preparations for the new SVG text engine.
2636 Handle baseline-shift / kerning css values correctly.
2637 Recognize missing svg presentation attribute "font-size-adjust".
2638 Add all missing svg<->css property mappings in mapToEntry().
2640 Doesn't affect any layout test (as these properties are not used w/o my text patch).
2641 While I'm at it, unify the macro names (RS_ -> SVG_RS_) & cleanup style a bit.
2643 * ksvg2/css/CSSPropertyNames.in:
2644 * ksvg2/css/SVGCSSParser.cpp:
2645 (WebCore::CSSParser::parseSVGValue):
2646 * ksvg2/css/SVGCSSStyleSelector.cpp:
2647 (WebCore::CSSStyleSelector::applySVGProperty):
2648 * ksvg2/css/SVGRenderStyle.cpp:
2649 (WebCore::SVGRenderStyle::SVGRenderStyle):
2650 (WebCore::SVGRenderStyle::operator==):
2651 (WebCore::SVGRenderStyle::inheritedNotEqual):
2652 (WebCore::SVGRenderStyle::inheritFrom):
2653 * ksvg2/css/SVGRenderStyle.h:
2654 (WebCore::SVGRenderStyle::NonInheritedFlags::):
2655 (WebCore::SVGRenderStyle::setBitDefaults):
2656 * ksvg2/css/SVGRenderStyleDefs.cpp:
2657 (StyleTextData::StyleTextData):
2658 (StyleTextData::operator==):
2659 (StyleMiscData::StyleMiscData):
2660 (StyleMiscData::operator==):
2661 * ksvg2/css/SVGRenderStyleDefs.h:
2663 (WebCore::StyleTextData::operator!=):
2664 * ksvg2/svg/SVGStyledElement.cpp:
2665 (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName):
2667 2007-03-06 Justin Garcia <justin.garcia@apple.com>
2671 <http://bugs.webkit.org/show_bug.cgi?id=12245>
2672 FCKeditor: Remove Format sometimes doesn't work
2673 <rdar://problem/4786404>
2674 Underline style is not removed from selection after performing Remove Format
2676 * editing/Editor.cpp:
2677 (WebCore::Editor::removeFormattingAndStyle): Re-wrote this.
2679 2007-03-07 Nikolas Zimmermann <zimmermann@kde.org>
2683 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12979
2684 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12981
2686 Guard against registering pending resources with empty id.
2687 Be careful with calling recalcStyle() in SVGUseElement, when change is "Detach" we
2688 have to use special code, as calling attach() on the shadow tree root element will crash,
2689 because it has no (direct) parent node, only a shadow parent node element.
2691 * ksvg2/misc/SVGDocumentExtensions.cpp:
2692 (WebCore::SVGDocumentExtensions::addPendingResource):
2693 * ksvg2/svg/SVGUseElement.cpp:
2694 (WebCore::SVGUseElement::recalcStyle):
2696 2007-03-06 Kevin Decker <kdecker@apple.com>
2700 Fixed: <rdar://problem/5041660> REGRESSION: <keygen> element broken, prevents users from signing up for Thawte email certs
2702 * bindings/objc/DOM.mm:
2703 (WebCore::createElementClassMap): Added <keygen> to the DOM bindings so it can be accessed from Objective-C.
2704 * css/html4.css: Apply the look of the <select> element to <keygen>.
2705 * html/HTMLElementFactory.cpp:
2706 (WebCore::keygenConstructor): Added.
2707 (WebCore::createFunctionMap): Added keygen.
2708 * html/HTMLSelectElement.cpp: Made const typeAheadTimeout variable static const.
2709 (WebCore::HTMLSelectElement::HTMLSelectElement): Fix both HTMLSelectElement constructors to initialize the
2710 same number of member variables. The fact that some fields were not initialized could (and would) crash the
2711 keygen element when selecting different items. Also removed m_typedString(String()) from the constructor
2712 initialization because this is not needed.
2714 2007-03-06 Kevin McCullough <kmccullough@apple.com>
2718 - Rename a function to clarify its purpose.
2721 * loader/FrameLoader.cpp:
2722 (WebCore::FrameLoader::registerURLSchemeAsLocal):
2723 * loader/FrameLoader.h:
2725 2007-03-06 Adam Roben <aroben@apple.com>
2729 * WebCore.exp: Updated symbols.
2731 2007-03-06 Adam Roben <aroben@apple.com>
2735 Added a parameter to all StringTruncator methods to specify whether
2736 rounding hacks should be on or off.
2738 No layout test possible.
2740 * platform/StringTruncator.cpp:
2741 (WebCore::stringWidth): Added disableRoundingHacks parameter.
2742 (WebCore::truncateString): Ditto.
2743 (WebCore::StringTruncator::centerTruncate): Ditto.
2744 (WebCore::StringTruncator::rightTruncate): Ditto.
2745 (WebCore::StringTruncator::width): Ditto.
2746 * platform/StringTruncator.h: Ditto.
2747 * platform/mac/FileChooserMac.mm:
2748 (WebCore::FileChooser::basenameForWidth): Pass in false to
2749 centerTruncate so that the truncation matches the way the text will be
2752 2007-03-06 Anders Carlsson <acarlsson@apple.com>
2756 <rdar://problem/5035045>
2757 REGRESSION: WebKit browser doesn't display image at http://www.metoffice.gov.uk/weather/satellite/index.html
2759 It turns out WinIE does allow you to access images by their id as special document properties. However, this is only
2760 allowed when the element also has a name attribute. The value of the name attribute is ignored and can even be empty!
2762 * bindings/js/kjs_html.cpp:
2763 (KJS::JSHTMLDocument::namedItemGetter):
2764 Return jsUndefined() if the collection is empty.
2766 * html/HTMLImageElement.cpp:
2767 (WebCore::HTMLImageElement::parseMappedAttribute):
2768 (WebCore::HTMLImageElement::insertedIntoDocument):
2769 (WebCore::HTMLImageElement::removedFromDocument):
2770 * html/HTMLImageElement.h:
2771 Add the id attribute value to the extra named item map.
2773 * html/HTMLNameCollection.cpp:
2774 (WebCore::HTMLNameCollection::traverseNextItem):
2775 Check for images with name attributes that match, as well as elements with id attributes that match where
2776 the element also has a name attribute.
2778 2007-03-06 Anders Carlsson <acarlsson@apple.com>
2782 WebCore part of patch to make it possible to have different user agents for different URLs.
2784 * bindings/js/kjs_navigator.cpp:
2785 (KJS::Navigator::getValueProperty):
2786 * bindings/js/kjs_proxy.cpp:
2787 (WebCore::KJSProxy::initScriptIfNeeded):
2788 * loader/DocumentLoader.cpp:
2789 (WebCore::DocumentLoader::setLoading):
2790 * loader/FrameLoader.cpp:
2791 (WebCore::FrameLoader::userAgent):
2792 (WebCore::FrameLoader::loadResourceSynchronously):
2793 (WebCore::FrameLoader::applyUserAgent):
2794 * loader/FrameLoader.h:
2795 * loader/FrameLoaderClient.h:
2796 * platform/graphics/svg/SVGImageEmptyClients.h:
2797 (WebCore::SVGEmptyFrameLoaderClient::userAgent):
2799 2007-03-05 Kevin McCullough <kmccullough@apple.com>
2801 Reviewed by Mark and Dave H.
2803 - rdar://problem/5038491
2804 An oversight of the security fix that prevented remote from loading local is that it
2805 prevents user style sheets when the site is remote. This fixes that.
2807 * loader/Cache.cpp: Propogate and check user style sheet flag.
2808 (WebCore::createResource):
2809 (WebCore::Cache::requestResource):
2810 * loader/Cache.h: Propogate user style sheet flag.
2811 * loader/CachedCSSStyleSheet.cpp: Propogate user style sheet flag.
2812 (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
2813 * loader/CachedCSSStyleSheet.h: Propogate user style sheet flag.
2814 * loader/DocLoader.cpp: Propogate user style sheet flag.
2815 (WebCore::DocLoader::requestResource):
2816 * loader/SubresourceLoader.cpp: Propogate and check user style sheet flag.
2817 (WebCore::SubresourceLoader::create):
2818 * loader/SubresourceLoader.h: Add check for user style sheet flag.
2819 * loader/loader.cpp: Propogate user style sheet flag.
2820 (WebCore::Loader::load):
2821 (WebCore::Loader::servePendingRequests):
2822 * loader/loader.h: Propogate user style sheet flag.
2824 2007-03-06 Nikolas Zimmermann <zimmermann@kde.org>
2828 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12936 (Master bug used to track all current use problems.)
2830 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12926 (transform attribute not respected in nested <use> elements)
2831 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12267 (getElementById broken for <use>)
2832 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12916 (use instance in symbol definition does not work)
2833 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12917 (mouseout event does not occur after scaling use instance)
2834 Fixes: http://bugs.webkit.org/show_bug.cgi?id=12838 (SVG <use> DOM broken for script)
2836 Added test: svg/custom/use-nested-transform.svg
2837 Added test: svg/custom/struct-use-09-b.svg (not yet official W3C-SVG-1.1 testcase)
2838 Fixes test: svg/custom/use-elementInstance-event-target.svg (rectangle now turns green on first click)
2840 Fix all (except one) known <use> bug. The remaining bug (12630) is not crucical at all.
2841 Enable <use> again as default SVG feature, as discussed on webkit-dev.
2843 dom/Element.cpp needed following tweak: set hasParentStyle to true, if there is no parentNode
2844 available - which happens for <use> nodes, as it's a shadow node. This fixes recalcStyle behaviour.
2845 Override recalcStyle() in SVGUseElement, and properly forward the call to the shadow tree root element.
2846 The shadow tree now receives proper style updates (without having to recreate the whole tree!).
2848 Override attributeChanged() in SVGUseElement and only call notifyAttributeChange if one of x/y/width/height/xlink:href
2849 attribute changed - otherwhise we'll end up recreating the tree for every transform/style/(non-existing-attribute) change.
2851 Do not override transform in nested use situations, but correctly append (right-sided) the translation of the <use> element.
2852 Some cosmetic fixes: don't add transform="translate(0 0)" attributes if both x/y values are null in the shadow tree.
2854 Factor out logic for replacing symbol/svg tags in the shadow tree, and also invoke it during expandUseElementsInShadowTree -
2855 otherwhise <symbol><use xlink:href="#someOtherSymbol"></symbol> the <use> gets expanded to a <symbol>. Though no one expands
2856 the <symbol> element - and we're end up in hitting an assertion. Avoid that.
2858 * bindings/js/JSSVGElementWrapperFactory.cpp:
2859 * bindings/js/kjs_dom.cpp:
2861 * bindings/objc/DOM.mm:
2862 (WebCore::createElementClassMap):
2864 (WebCore::Element::recalcStyle):
2865 * ksvg2/svg/SVGElement.cpp:
2866 (WebCore::shadowTreeParentElementForShadowTreeElement):
2867 (WebCore::SVGElement::dispatchEvent):
2868 * ksvg2/svg/SVGElementInstance.cpp:
2869 * ksvg2/svg/SVGElementInstance.h:
2870 * ksvg2/svg/SVGElementInstance.idl:
2871 * ksvg2/svg/SVGElementInstanceList.cpp:
2872 * ksvg2/svg/SVGElementInstanceList.h:
2873 * ksvg2/svg/SVGElementInstanceList.idl:
2874 * ksvg2/svg/SVGStyledElement.cpp:
2875 (WebCore::SVGStyledElement::notifyAttributeChange):
2876 (WebCore::SVGStyledElement::updateElementInstance):
2877 * ksvg2/svg/SVGStyledElement.h:
2878 * ksvg2/svg/SVGUseElement.cpp:
2879 (WebCore::SVGUseElement::attributeChanged):
2880 (WebCore::SVGUseElement::notifyAttributeChange):
2881 (WebCore::SVGUseElement::recalcStyle):
2882 (WebCore::SVGUseElement::buildPendingResource):
2883 (WebCore::SVGUseElement::buildShadowTreeForSymbolTag):
2884 (WebCore::SVGUseElement::alterShadowTreeForSVGTag):
2885 (WebCore::SVGUseElement::buildShadowTree):
2886 (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2887 (WebCore::SVGUseElement::attachShadowTree):
2888 * ksvg2/svg/SVGUseElement.h:
2889 * ksvg2/svg/SVGUseElement.idl:
2890 * ksvg2/svg/svgtags.in:
2892 2007-03-05 Brady Eidson <beidson@apple.com>
2896 Fixes <rdar://problem/4974258>
2897 Adds some key null checking
2899 * bindings/js/kjs_html.cpp:
2900 (KJS::JSHTMLElement::implementsCall): Null check doc/frame
2901 * bindings/objc/DOMInternal.mm:
2902 (-[WebScriptObject _initializeScriptDOMNodeImp]): Null check doc/frame
2904 2007-03-06 Nikolas Zimmermann <zimmermann@kde.org>
2908 Path::normalAngleAtLength() / Path::pointAtLength() don't work correctly.
2909 pointAtLength() was not implemented, basically and normalAngleAtLength()
2910 had a bug in the tangent slope calculation.
2912 The normalAngleAtLength() stuff can only be tested with my local textPath support.
2913 New LayoutTest: svg/custom/path-textPath-simulation.svg
2915 * platform/graphics/Path.cpp:
2916 (WebCore::pathLengthApplierFunction):
2917 * platform/graphics/PathTraversalState.cpp:
2918 (WebCore::PathTraversalState::quadraticBezierTo):
2919 (WebCore::PathTraversalState::cubicBezierTo):
2920 * platform/graphics/PathTraversalState.h:
2921 (WebCore::PathTraversalState::):
2923 2007-03-05 Alexey Proskuryakov <ap@webkit.org>
2927 http://bugs.webkit.org/show_bug.cgi?id=12970
2928 Fix and import 4XPath test_core_functions.html test
2930 * xml/XPathExpression.cpp:
2931 (WebCore::XPathExpression::evaluate): Fully initialize the evaluation context.
2933 * xml/XPathFunctions.cpp:
2934 (WebCore::XPath::FunSubstring::doEvaluate): Fixed handling of edge cases.
2935 (WebCore::XPath::FunRound::round): Reimplemented to match the spec; exposed FunRound::round() to be used in
2938 2007-03-05 Alexey Proskuryakov <ap@webkit.org>
2942 http://bugs.webkit.org/show_bug.cgi?id=12954
2943 XPath relative operations are implemented incorrectly
2945 * xml/XPathPredicate.cpp:
2946 (WebCore::XPath::NumericOp::doEvaluate):
2947 (WebCore::XPath::EqTestOp::compare):
2948 (WebCore::XPath::EqTestOp::doEvaluate):
2949 Reimplemented relative equality operations to match the spec.
2951 * xml/XPathPredicate.h:
2952 (WebCore::XPath::NumericOp::):
2953 (WebCore::XPath::EqTestOp::):
2954 Moved relative operations to EqTestOp.
2956 * xml/XPathGrammar.y:
2957 * xml/XPathParser.cpp:
2958 (WebCore::XPath::Parser::nextTokenInternal):
2959 (WebCore::XPath::Parser::lex):
2960 Adapted for the above changes.
2962 2007-03-05 Mark Rowe <mrowe@apple.com>
2966 Fix http://bugs.webkit.org/show_bug.cgi?id=12947
2967 Bug 12947: REGRESSION: ASSERTION FAILED: maxWidth >= 0 in StringTruncator.cpp:109 in WebCore::truncateString()
2969 Handle nil window correctly in toUserSpace and toDeviceSpace. On Intel Macs a message to nil that returns a
2970 float will return 0.0. We use this as the divisor in calculating a scale factor, which results in NaN being
2971 introduced into our rect.
2973 * platform/mac/ScreenMac.mm:
2974 (WebCore::toUserSpace):
2975 (WebCore::toDeviceSpace):
2977 2007-03-05 Rob Buis <buis@kde.org>
2981 http://bugs.webkit.org/show_bug.cgi?id=12868
2982 parts of the CSS classes in this simple SVG example are not applied
2984 Make sure the xml stylesheets are parsed in strict mode.
2986 * dom/ProcessingInstruction.cpp:
2987 (WebCore::ProcessingInstruction::parseStyleSheet):
2989 2007-03-04 Adele Peterson <adele@apple.com>
2993 Change to dispatch the keypress event during the defaultEventHandler for keydown events. This matches IE behavior.
2994 This is preparation for fixing event dispatch with input methods (http://bugs.webkit.org/show_bug.cgi?id=10871)
2996 Test: fast/events/keydown-keypress-preventDefault.html
2998 * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler): Call the defaultKeyboardEventHandler for keydown events.
2999 * page/EventHandler.cpp:
3000 (WebCore::eventTargetNodeForDocument): Return 0 instead of false since the return type in EventTargetNode.
3001 (WebCore::EventHandler::keyEvent): Removed dispatch of keypress event, since this is now done in the default event handler.
3002 (WebCore::EventHandler::defaultKeyboardEventHandler): For keydown events, create and dispatch a keypress event.
3004 2007-03-04 Alexey Proskuryakov <ap@webkit.org>
3006 Reviewed by Nikolas Zimmermann (yay!).
3008 http://bugs.webkit.org/show_bug.cgi?id=12962
3009 4XPath tests crash on lang() function
3011 Covered by 4XPath tests, to be landed later.
3013 * platform/StringImpl.cpp:
3014 (WebCore::StringImpl::reverseFind): Do not crash with empty strings.
3015 * xml/XPathFunctions.cpp:
3016 (WebCore::XPath::FunLang::doEvaluate): Do not crash when an element has no
3017 attributes. Use a proper namespace for xml:lang (not sure where "xms" came from).
3018 Rewrote the algorithm for suffix removing to match the spec.
3020 2007-03-02 Anders Carlsson <acarlsson@apple.com>
3024 <rdar://problem/5028165>
3025 http://bugs.webkit.org/show_bug.cgi?id=12915
3026 REGRESSION: XMLHttpRequest.abort() does not stop loading (12915)
3028 * loader/DocumentLoader.cpp:
3029 (WebCore::DocumentLoader::stopLoading):
3030 Save the value of m_loading since calling FrameLoader::stopLoading could set it to false.
3032 * loader/SubresourceLoader.cpp:
3033 (WebCore::SubresourceLoader::didCancel):
3034 * loader/SubresourceLoader.h:
3035 Get rid of didCancel now, it's not needed anymore.
3037 * xml/xmlhttprequest.cpp:
3038 (WebCore::XMLHttpRequest::abort):
3039 Call cancel() instead of stopLoading(). Also, set m_aborted to true so the XMLHttpRequest object
3040 won't be dereferenced in didFail when aborting.
3042 2007-03-04 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
3044 Reviewed by Nikolas Zimmermann.
3046 Move ScrollView stubs to ScrollViewGdk.cpp
3048 * platform/gdk/FrameGdk.h: remove comment that no longer makes sense
3049 * platform/gdk/ScrollViewGdk.cpp:
3050 (WebCore::ScrollView::addChild):
3051 (WebCore::ScrollView::removeChild):
3052 (WebCore::ScrollView::scrollPointRecursively):
3053 (WebCore::ScrollView::inWindow):
3054 (WebCore::ScrollView::wheelEvent):
3055 (WebCore::ScrollView::updateScrollbars):
3056 (WebCore::ScrollView::updateScrollInfo):
3057 (WebCore::ScrollView::windowToContents):
3058 (WebCore::ScrollView::contentsToWindow):
3059 (WebCore::ScrollView::scrollbarUnderMouse):
3060 * platform/gdk/TemporaryLinkStubs.cpp:
3062 2007-03-02 Kevin McCullough <kmccullough@apple.com>
3066 - rdar://problem/4922454
3067 - This fixes a security issue by making remote referrers not able to access local
3068 resources, unless they register their schemes to be treated as local. The result is
3069 that those schemes can access local resources and cannot be accessed by remote
3071 Because this behavior is new a link-on-or-after check is made to determine if the
3072 app should use the older, less safe, behavior.
3074 * WebCore.exp: added exported functions
3075 * bindings/objc/DOM.mm: consolodated function to base class
3076 (-[DOMElement image]):
3077 (-[DOMElement _imageTIFFRepresentation]):
3078 * dom/Document.cpp: Cache the document's ability to load local resources.
3079 (WebCore::Document::Document):
3080 (WebCore::Document::setURL):
3081 (WebCore::Document::shouldBeAllowedToLoadLocalResources):
3082 (WebCore::Document::stylesheetLoaded):
3083 * dom/Document.h: Cache the docuent's ability to load local resources.
3084 (WebCore::Document::getPendingSheet):
3085 (WebCore::Document::isAllowedToLoadLocalResources):
3086 * html/HTMLImageLoader.cpp: Moved functionality into base class.
3087 (WebCore::HTMLImageLoader::updateFromElement):
3088 (WebCore::HTMLImageLoader::dispatchLoadEvent):
3089 * html/HTMLLinkElement.cpp: Handles null returns correctly now.
3090 * html/HTMLTokenizer.cpp: Moved functionality into base class.
3091 (WebCore::HTMLTokenizer::notifyFinished):
3092 * ksvg2/misc/SVGImageLoader.cpp: Moved functionality into base class.
3093 (WebCore::SVGImageLoader::dispatchLoadEvent):
3094 * loader/Cache.cpp: Checks if the cached resource can be loaded.
3095 (WebCore::Cache::requestResource):
3096 * loader/CachedCSSStyleSheet.cpp: Moved functionality into base class.
3097 (WebCore::CachedCSSStyleSheet::ref):
3098 (WebCore::CachedCSSStyleSheet::error):
3099 * loader/CachedImage.cpp: Moved functionality into base class.
3100 (WebCore::CachedImage::CachedImage):
3101 * loader/CachedImage.h: Moved functionality into base class.
3102 (WebCore::CachedImage::canRender):
3103 * loader/CachedResource.cpp: Cache if the CachedResource should be treated as local
3104 (WebCore::CachedResource::CachedResource):
3105 * loader/CachedResource.h: Moved functionality into base class.
3106 (WebCore::CachedResource::errorOccurred):
3107 (WebCore::CachedResource::shouldTreatAsLocal):
3108 * loader/CachedScript.cpp: Moved functionality into base class.
3109 (WebCore::CachedScript::CachedScript):
3110 * loader/CachedScript.h: Moved functionality into base class.
3111 (WebCore::CachedScript::schedule):
3112 * loader/CachedXBLDocument.cpp: Moved functionality into base class.
3113 (WebCore::CachedXBLDocument::error):
3114 * loader/CachedXSLStyleSheet.cpp: Moved functionality into base class.
3115 (WebCore::CachedXSLStyleSheet::error):
3116 * loader/FrameLoader.cpp: See comments for each function below.
3117 (WebCore::FrameLoader::loadSubframe): Use new canLoad.
3118 (WebCore::FrameLoader::restrictAccessToLocal): return value of linked-on-or-after check.
3119 (WebCore::FrameLoader::setRestrictAccessToLocal): set value for linked-on-or-after check.
3120 (WebCore::localSchemes): Return set of schemes that are to be treated as local.
3121 (WebCore::FrameLoader::loadPlugin): Use new canLoad.
3122 (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.
3123 (WebCore::FrameLoader::shouldHideReferrer): Extracted out the logic to determine if the referrer should be hidden so it is only calculated when needed.
3124 (WebCore::FrameLoader::loadResourceSynchronously): No longer calls canLoad to get hideReferrer info.
3125 (WebCore::FrameLoader::registerSchemeAsLocal): Functionality to register a scheme to be treated as local.
3126 (WebCore::FrameLoader::treatURLAsLocal): Given a URL this function determines if it should be treated as local.
3127 * loader/FrameLoader.h: Declared functions for this security fix. See above.
3128 * loader/MainResourceLoader.cpp: Optized order of bools to regain performance.
3129 (WebCore::MainResourceLoader::continueAfterContentPolicy):
3130 * loader/SubresourceLoader.cpp: Now restricts remote from loading local resources.
3131 (WebCore::SubresourceLoader::create):
3132 * page/EventHandler.cpp: Moved functionality into base class.
3133 (WebCore::selectCursor):
3134 * platform/KURL.cpp: KURLs need to check all the registered schemes now.
3135 (WebCore::KURL::isLocalFile):
3136 * rendering/HitTestResult.cpp: Moved functionality into base class.
3137 (WebCore::HitTestResult::image):
3138 * rendering/RenderImage.cpp: Moved functionality into base class.
3139 (WebCore::RenderImage::setCachedImage):
3140 (WebCore::RenderImage::imageChanged):
3141 (WebCore::RenderImage::paint):
3142 (WebCore::RenderImage::layout):
3143 (WebCore::RenderImage::calcAspectRatioWidth):
3144 (WebCore::RenderImage::calcAspectRatioHeight):
3145 * rendering/RenderImage.h: Moved functionality into base class.
3146 (WebCore::RenderImage::errorOccurred):
3147 * rendering/RenderListItem.cpp: Moved functionality into base class.
3148 (WebCore::RenderListItem::setStyle):
3149 * rendering/RenderListMarker.cpp: Moved functionality into base class.
3150 (WebCore::RenderListMarker::isImage):
3151 * xml/xmlhttprequest.cpp: Check doc's cached value instead of determining independently.
3152 (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):
3154 2007-03-02 Justin Garcia <justin.garcia@apple.com>
3158 <rdar://problem/5028447>
3159 REGRESSION: Gmail Editor: Copied message text pastes at the wrong font size
3161 * editing/markup.cpp:
3162 (WebCore::createMarkup): The style of the div that holds
3163 a fully selected body's styles didn't include styles inherited
3164 from the body's ancestors.
3166 2007-03-02 Justin Garcia <justin.garcia@apple.com>
3168 Reviewed by harrison
3170 <rdar://problem/4545040>
3171 innerHTML does not HTML-escape text nodes inside PRE elements
3172 <rdar://problem/5027857>
3173 Pasting into Mail from Safari's view-source window renders the HTML
3175 * editing/HTMLInterchange.cpp:
3176 (WebCore::convertHTMLTextToInterchangeFormat): Send this function
3177 the node that the text comes from as a parameter. It shouldn't convert
3178 '\n's to spaces/nbsps if the text is coming from text where newlines are
3180 * editing/HTMLInterchange.h:
3181 * editing/markup.cpp:
3182 (WebCore::startMarkup): Escape text inside the children of PREs.
3184 2007-03-02 Sam Weinig <sam@webkit.org>
3188 Try to fix the Qt build.
3190 * platform/qt/TemporaryLinkStubs.cpp: Add stubs.
3191 (WebCore::searchMenuNoRecentSearchesText):
3192 (WebCore::searchMenuRecentSearchesText):
3193 (WebCore::searchMenuClearRecentSearchesText):
3194 (WebCore::AXWebAreaText):
3195 (WebCore::AXLinkText):
3196 (WebCore::AXListMarkerText):
3197 (WebCore::AXImageMapText):
3198 (WebCore::AXHeadingText):
3200 2007-03-02 David Harrison <harrison@apple.com>
3204 A more efficient solution to rdar://4961431.
3206 * bridge/mac/WebCoreAXObject.mm:
3207 (-[WebCoreAXObject accessibilityIsIgnored]):
3209 2007-03-01 Justin Garcia <justin.garcia@apple.com>
3213 <rdar://problem/5032095>
3214 Gmail Editor: Copied text pastes on a new line instead of current line
3216 Start merge failed to occur because positionAtStartOfInsertedContent
3219 * editing/ReplaceSelectionCommand.cpp:
3220 (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent):
3221 Was failing when inserting <span><div>foo/div></span>. Return the
3222 inserted content's first VisiblePosition.
3224 2007-03-02 Dave Hyatt <hyatt@apple.com>
3226 Fix crasher in glyph map code (buffer overrun).
3230 * platform/win/GlyphPageTreeNodeWin.cpp:
3231 (WebCore::GlyphPage::fill):
3233 2007-03-01 Antti Koivisto <antti@apple.com>
3237 Fix for http://bugs.webkit.org/show_bug.cgi?id=12895
3238 REGRESSION: imagemap: pointer cursor is shown everywhere
3239 <rdar://problem/5028163>
3241 Image with imagemap should never itself be URLElement in hit test results.
3243 No layout test, cursor state can't be captured.
3245 * rendering/RenderLayer.cpp:
3246 (WebCore::RenderLayer::hitTest):
3248 2007-03-01 Antti Koivisto <antti@apple.com>
3252 Fix http://bugs.webkit.org/show_bug.cgi?id=12690
3253 REGRESSION: can not log in to bank of america with TOT webkit
3254 <rdar://problem/4990044>
3256 and http://bugs.webkit.org/show_bug.cgi?id=12604
3257 REGRESSION: After closing the "Would you like to save password" sheet, the form fails
3258 to submit automatically at http://www.mac.com/WebObjects/HomePage.woa
3259 <rdar://problem/4871752>
3261 and http://bugs.webkit.org/show_bug.cgi?id=12020
3262 REGRESSION: Flickr uploading broken
3263 <rdar://problem/4928662>
3265 Turn protection against multiple forms submission back on. This approach is buggy
3266 but it is way better than not having it at all. Not protecting against this
3267 breaks number of major sites.
3269 * bridge/mac/WebCoreAXObject.mm:
3270 (-[WebCoreAXObject accessibilityPerformAction:]):
3271 * loader/FrameLoader.cpp:
3272 (WebCore::FrameLoader::resetMultipleFormSubmissionProtection):
3273 (WebCore::FrameLoader::submitForm):
3274 (WebCore::FrameLoader::receivedMainResourceError):
3275 * loader/FrameLoader.h:
3276 * page/EventHandler.cpp:
3277 (WebCore::EventHandler::keyEvent):
3279 (WebCore::Frame::setView):
3280 * page/mac/EventHandlerMac.mm:
3281 (WebCore::EventHandler::mouseDown):
3283 2007-03-01 Kevin McCullough <kmccullough@apple.com>
3287 - Added the test case: external-script-URL-location.html
3288 - Fix an issue where the url of a document is null after an open if the document
3292 (WebCore::Document::open):
3294 2007-03-01 Anders Carlsson <acarlsson@apple.com>
3298 <rdar://problem/4960250>
3299 http://bugs.webkit.org/show_bug.cgi?id=11627
3300 REGRESSION: Reproducible crash at IMDb in WebCore::FrameLoader::stopLoadingSubframes
3302 In rare cases, we could end up calling checkLoadComplete twice for the same frame. This would cause the
3303 didFailProvisionalLoad delegate method to be called twice for the same frame, and also cause the provisional document loader
3304 to be reset to null when other code wasn't expecting it.
3306 This regressed in revision 10904 with the fix for <rdar://problem/4184719>. The fix is to only call stopLoading on the frame
3307 if either the document loader is loading, or the document is still being parsed. I've verified that the bug is still fixed and
3308 that no leaks occur.
3310 * loader/DocumentLoader.cpp:
3311 (WebCore::DocumentLoader::stopLoading):
3313 2007-03-01 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
3317 Fix ARM crash due to accessing non-4-byte-aligned memory
3320 * platform/AtomicString.cpp:
3321 (WebCore::UCharBufferTranslator::equal):
3323 2007-03-01 David Harrison <harrison@apple.com>
3327 <rdar://problem/5033905> Have the DOM secondary thread check raise an exception by default
3329 * platform/mac/ThreadCheck.mm:
3330 (WebCore::_WebCoreThreadViolationCheck):
3331 Initialize threadViolationIsException to true.
3333 2007-03-01 Brady Eidson <beidson@apple.com>
3337 <rdar://problem/5030628> - Crash opening a new window with the
3338 "New windows open to the same page" pref set
3340 * history/HistoryItem.cpp:
3341 (WebCore::HistoryItem::HistoryItem): Set the m_subItems vector capacity correctly
3343 2007-03-01 Alexey Proskuryakov <ap@webkit.org>
3347 http://bugs.webkit.org/show_bug.cgi?id=12801
3348 Assertion failure in createMarkup() (root) when doing Select All, Copy in an SVG document
3350 Test: editing/pasteboard/createMarkup-assert.xml
3352 * editing/markup.cpp:
3353 (WebCore::createMarkup): Removed the assertion, because it's wrong in a non-HTML world.
3355 2007-02-28 Adam Roben <aroben@apple.com>
3357 Reviewed by Oliver and Hyatt.
3359 Fix <rdar://problem/5024233> Crash while using Find on empty document
3361 No layout test possible, as this involves a null document.
3364 (WebCore::rangeOfContents): Added an ASSERT.
3366 (WebCore::Frame::findString): Added a null-check for document().
3367 (WebCore::Frame::markAllMatchesForText): Ditto.
3369 2007-02-28 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
3371 Not reviewed - simple gdk build fix.
3373 Add stubs for newly introduced localized strings.
3375 * platform/gdk/TemporaryLinkStubs.cpp:
3376 (WebCore::searchMenuNoRecentSearchesText):
3377 (WebCore::searchMenuRecentSearchesText):
3378 (WebCore::searchMenuClearRecentSearchesText):
3380 2007-02-28 Brady Eidson <beidson@apple.com>
3384 Move the Thread Safety Check functions into their own header for export to WebKit
3386 * WebCore.exp: Export the function
3387 * WebCore.xcodeproj/project.pbxproj:
3388 * bindings/scripts/CodeGeneratorObjC.pm: Include the new header
3389 * platform/Logging.h: Move stuff to ThreadCheck.h
3390 * platform/ThreadCheck.h: Added.
3391 * platform/mac/LoggingMac.mm: Move stuff to ThreadCheck.mm
3392 * platform/mac/ThreadCheck.mm: Added.
3393 (WebCore::_WebCoreThreadViolationCheck):
3394 (WebCoreReportThreadViolation):
3396 2007-02-28 Beth Dakin <bdakin@apple.com>
3400 Fix for http://bugs.webkit.org/show_bug.cgi?id=12923 REGRESSION:
3401 Assertion failure copying standalone image
3403 * platform/mac/PasteboardMac.mm:
3404 (WebCore::Pasteboard::writeImage): Use the CachedImage as the
3405 resource. This makes more sense anyway. There is no need to null-
3406 check the renderer or the CachedImage since we return early if
3407 there is no Image* and the HitTestResult::image() function checks
3410 2007-02-28 Adele Peterson <adele@apple.com>
3414 Fix for <rdar://problem/4887423> REGRESSION: search results popup menu strings are not localized
3415 and <rdar://problem/3517227> accessibility-related strings in WebCore are not localized
3417 Use localized strings from WebKit instead of hard coded strings.
3419 * bridge/mac/WebCoreAXObject.mm: (-[WebCoreAXObject roleDescription]):
3420 * page/mac/WebCoreViewFactory.h:
3421 * platform/LocalizedStrings.h:
3422 * platform/mac/LocalizedStringsMac.mm:
3423 (WebCore::searchMenuNoRecentSearchesText):
3424 (WebCore::searchMenuRecentSearchesText):
3425 (WebCore::searchMenuClearRecentSearchesText):
3426 (WebCore::AXWebAreaText):
3427 (WebCore::AXLinkText):
3428 (WebCore::AXListMarkerText):
3429 (WebCore::AXImageMapText):
3430 (WebCore::AXHeadingText):
3431 * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::itemText):
3433 2007-02-27 Antti Koivisto <antti@apple.com>
3437 - fix http://bugs.webkit.org/show_bug.cgi?id=12911
3438 GoogleDocs: Ordered lists don't update immediately when start attribute changed
3440 Update list marker value when start attribute changes.
3442 * html/HTMLOListElement.cpp:
3443 (WebCore::HTMLOListElement::parseMappedAttribute):
3445 2007-02-28 Nikolas Zimmermann <zimmermann@kde.org>
3449 Corrected the use of the new ENABLE() macros in some ksvg2/svg files.
3450 Add new build-webkit flags "--(no-)xpath" / "--(no-)xslt", to be able
3451 to switch off build features easily. Also add "--(no-)svg-experimental-features"
3452 flag, to be able to test filters/animations/use/foreignObject easily.
3454 * DerivedSources.make:
3455 * ksvg2/scripts/make_names.pl:
3456 * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
3457 * ksvg2/svg/SVGStyledElement.cpp:
3458 * ksvg2/svg/SVGUseElement.cpp:
3460 2007-02-28 Rob Buis <buis@kde.org>
3464 http://bugs.webkit.org/show_bug.cgi?id=12609
3465 Any SVG element will create renderers even when children of HTML elements
3467 Allow creation of svg renderers only when parent is SVG, except for
3470 * ksvg2/svg/SVGAElement.h:
3471 * ksvg2/svg/SVGAnimationElement.h:
3472 * ksvg2/svg/SVGCircleElement.h:
3473 * ksvg2/svg/SVGClipPathElement.h:
3474 (WebCore::SVGClipPathElement::rendererIsNeeded):
3475 * ksvg2/svg/SVGDefsElement.cpp:
3476 * ksvg2/svg/SVGDefsElement.h:
3477 * ksvg2/svg/SVGDescElement.h:
3478 (WebCore::SVGDescElement::rendererIsNeeded):
3479 * ksvg2/svg/SVGElement.cpp:
3480 * ksvg2/svg/SVGEllipseElement.h:
3481 * ksvg2/svg/SVGFilterElement.h:
3482 (WebCore::SVGFilterElement::rendererIsNeeded):
3483 * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
3484 (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
3485 * ksvg2/svg/SVGForeignObjectElement.h:
3486 * ksvg2/svg/SVGGElement.h:
3487 * ksvg2/svg/SVGGradientElement.h:
3488 * ksvg2/svg/SVGImageElement.h:
3489 * ksvg2/svg/SVGLineElement.h:
3490 * ksvg2/svg/SVGMarkerElement.h:
3491 * ksvg2/svg/SVGMaskElement.h:
3492 * ksvg2/svg/SVGPathElement.h:
3493 * ksvg2/svg/SVGPatternElement.h:
3494 * ksvg2/svg/SVGPolyElement.h:
3495 * ksvg2/svg/SVGRectElement.h:
3496 * ksvg2/svg/SVGStopElement.h:
3497 * ksvg2/svg/SVGStyledElement.cpp:
3498 (WebCore::SVGStyledElement::rendererIsNeeded):
3499 * ksvg2/svg/SVGStyledElement.h:
3500 * ksvg2/svg/SVGSwitchElement.h:
3501 * ksvg2/svg/SVGSymbolElement.h:
3502 (WebCore::SVGSymbolElement::rendererIsNeeded):
3503 * ksvg2/svg/SVGTRefElement.h:
3504 * ksvg2/svg/SVGTSpanElement.h:
3505 * ksvg2/svg/SVGTextElement.h:
3506 * ksvg2/svg/SVGTitleElement.h:
3507 (WebCore::SVGTitleElement::rendererIsNeeded):
3508 * ksvg2/svg/SVGUseElement.h:
3509 * ksvg2/svg/SVGViewElement.h:
3510 (WebCore::SVGViewElement::rendererIsNeeded):
3512 2007-02-28 Rob Buis <buis@kde.org>
3516 http://bugs.webkit.org/show_bug.cgi?id=12913
3517 Markers do not render in webkit when it misses markerWidth or markerHeight attribute
3519 Set defaults for markerWidth/markerHeight so markers that do not specify them render.
3521 * ksvg2/svg/SVGMarkerElement.cpp:
3522 (WebCore::SVGMarkerElement::SVGMarkerElement):
3524 2007-02-27 Anders Carlsson <acarlsson@apple.com>