1 2007-09-10 Antti Koivisto <antti@apple.com>
5 Fix <rdar://problem/5444866>
6 REGRESSION: missing text in Acrobat "Getting Started" screen due to change in load ordering of large resources
8 Make external scripts loaded using file: wait until all style sheet loads have completed before executing.
9 Fixes a class of problems where there is a dependency between script and stylesheet and results would effectively
10 get randomized based on which order the resources arrived. In Tiger file loads were effectively serialized by
11 lower level components, which is why this regressed.
13 Test: http/tests/local/stylesheet-and-script-load-order.html
16 (WebCore::Document::removePendingSheet):
18 (WebCore::Tokenizer::executeScriptsWaitingForStylesheets):
19 * html/HTMLTokenizer.cpp:
20 (WebCore::HTMLTokenizer::HTMLTokenizer):
21 (WebCore::HTMLTokenizer::begin):
22 (WebCore::HTMLTokenizer::executeScriptsWaitingForStylesheets):
23 (WebCore::HTMLTokenizer::notifyFinished):
24 * html/HTMLTokenizer.h:
26 2007-09-08 David Smith <catfish.man@gmail.com>
28 Reviewed by Maciej Stachowiak.
30 http://bugs.webkit.org/show_bug.cgi?id=15148
31 Bug 15148: Poor performance on crazy DOM raytracer
33 Switch data structures to avoid quadratic behavior.
35 * rendering/RenderBlock.cpp:
36 (WebCore::RenderBlock::layoutPositionedObjects): Update for ListHashSet
37 (WebCore::RenderBlock::markPositionedObjectsForLayout): Update for ListHashSet
38 (WebCore::RenderBlock::insertPositionedObject): Use ListHashSet to avoid expensive uniqueing
39 (WebCore::RenderBlock::removePositionedObject): Update for ListHashSet
40 (WebCore::RenderBlock::removePositionedObjects): Update for ListHashSet
41 (WebCore::RenderBlock::lowestPosition): Update for ListHashSet
42 (WebCore::RenderBlock::rightmostPosition): Update for ListHashSet
43 (WebCore::RenderBlock::leftmostPosition): Update for ListHashSet
44 (WebCore::RenderBlock::rightBottom): Update for ListHashSet
45 * rendering/RenderBlock.h: Change m_positionedObjects from DeprecatedPtrList to ListHashSet
47 2007-09-09 Brady Eidson <beidson@apple.com>
49 Rubberstamped by Darin
51 pthread_main_np() is a Darwin thing, not a Mac thing
53 * loader/icon/IconDatabase.cpp:
54 (WebCore::IconDatabase::IconDatabase):
56 2007-09-09 Holger Hans Peter Freyther <zecke@selfish.org>
58 Build fix for Gtk+ by adding WebCore::callOnMainThread to the TemporaryLinkStubs.
60 * platform/gdk/TemporaryLinkStubs.cpp:
61 (WebCore::callOnMainThread):
63 2007-09-08 George Staikos <staikos@kde.org>
67 Separate out and implement FileSystem functions, and stub out the
68 icondatabase function for future implementation.
71 * platform/qt/FileSystemQt.cpp: Added.
72 (WebCore::fileExists):
73 (WebCore::deleteFile):
74 * platform/qt/TemporaryLinkStubs.cpp:
75 * platform/qt/ThreadingQt.cpp: Added.
76 (WebCore::callOnMainThread):
78 2007-09-08 Mark Rowe <mrowe@apple.com>
80 Build fix for when ENABLE(ICONDATABASE) is not set.
82 * loader/icon/IconDatabaseNone.cpp:
83 (WebCore::IconDatabase::~IconDatabase):
85 2007-09-08 Mark Rowe <mrowe@apple.com>
87 More fixes for the Qt and Gtk builds.
89 * WebCore.pro: Update for file changes.
90 * loader/icon/IconDatabase.cpp: Include errno.h for EDEADLK.
91 * loader/icon/PageURLRecord.h:
93 2007-09-08 Justin Garcia <justin.garcia@apple.com>
95 Backing my change back in without the changes to VisiblePosition::next
96 and previous that weren't necessary to fix the bug and were causing some
97 layout test failures. Most of the failures appeared to be fixes but I
98 want more time to investigate and have to move to on to another task.
100 * editing/Selection.cpp:
101 (WebCore::Selection::validate):
102 * editing/visible_units.cpp:
103 (WebCore::endOfWord):
105 2007-09-08 Brady Eidson <beidson@apple.com>
107 Reviewed by Mark Rowe
109 Fix the _NSAutoreleaseNoPool() errors on launch - We were using NSFileManager on the secondary
110 thread with no NSAutoreleasePool in place
112 * loader/icon/IconDatabase.cpp:
113 (WebCore::IconDatabase::iconDatabaseSyncThread):
115 2007-09-08 Sam Weinig <sam@webkit.org>
117 Add fix to the correct file.
119 * loader/icon/SQLDatabase.h:
120 * loader/icon/SQLStatement.h:
122 2007-09-08 Sam Weinig <sam@webkit.org>
126 * loader/icon/SQLStatement.h: Disable boolean conversion warning.
128 2007-09-08 Brady Eidson <beidson@apple.com>
130 Build fix for non-Mac platforms that use Icon Database
132 * loader/icon/IconDatabase.cpp:
133 (WebCore::IconDatabase::IconDatabase): Apparently only Mac has the beauty that is pthread_main_np()
135 2007-09-08 Mark Rowe <mrowe@apple.com>
139 * WebCore.xcodeproj/project.pbxproj: Headers used up in WebKit need to be be "private" rather than "project".
141 2007-09-08 Brady Eidson <beidson@apple.com>
145 <rdar://problem/5434431> - Asynchronous Icon Database
147 The IconDatabase API was originally designed to be fully asynchronous - if an icon wasn't read in from disk
148 when you asked for it, you would be notified when it was.
150 Safari 2 did writes on a background thread, but reads blocked the main thread.
152 The current WebCore implementation using SQLite attempted to get rid of the background thread by defering expensive
153 writes via timers, but falls short in moderate to extreme usage cases
155 Time to make the IconDatabase live up to it's fully asynchronous destiny.
158 - Make the browser instantly usable while converting Safari 2 icons in the background occurs
159 - Remedy any UI slowness/blocking when on slow network home directories
160 - Remedy random UI slowness, pauses, and stutters do to random I/O occurring at the exact wrong time or under heavy
161 disk usage from swapping or other apps on the system
162 - Allow certain long-running procedures to be interruptible (Safari 2 import, reading icons in from disk when trying to quit, etc)
164 This will have a noticeable effect on current Safari 2 and Safari 3 beta browsers, including icons not appearing in bookmarks, history,
165 or the location field the first time they're asked for, as current released Safari's don't properly listen for these async notifations.
166 The second time such a menu or view is brought up, the icon should be there.
168 Additionally this includes a SQLite schema change which will be a lot more efficient but will result in the loss of current SQLite icons.
169 Converting from Safari 2 style icons will still work.
171 WebCore, welcome to multi-threadedness
174 * WebCore.xcodeproj/project.pbxproj:
175 * WebCore.vcproj/WebCore.vcproj:
177 * loader/DocumentLoader.cpp:
178 (WebCore::DocumentLoader::iconLoadDecisionAvailable): Called when an Icon becomes available that was requested by this
179 DocumentLoader (to support the webView:didReceiveIcon: delegate call in WebKit)
180 * loader/DocumentLoader.h:
182 * loader/FrameLoader.cpp:
183 (WebCore::FrameLoader::iconLoadDecisionAvailable): Called from the DocumentLoaders who get notified - if the FrameLoader
184 ends up not caring because the WebView has transitioned to a new page, nothing occurs. Otherwise, the FrameLoader possibly
185 starts it Icon Loader and possibly sends the webView:didReceiveIcon: delegate call
186 (WebCore::FrameLoader::startIconLoader): Instead of "Yes, load the icon now" or "No, don't load it" there is a third possibility -
187 "You might be asked to load your icon later." Add supporting logic for receiving this state, and being called a second time
188 when the load decision is finally available.
189 * loader/FrameLoader.h:
191 * loader/FrameLoaderClient.h: Added "registerForIconNotification" which is a way to tell WebViews "The icon you are interested in might
192 become available via the generic WebIconDatabaseDidAddIconNotification instead of a targeted delegate call"
193 A WebView can then receive the generic notification and pass on it's own targeted delegate call.
195 * loader/icon/IconDataCache.cpp: Removed.
196 * loader/icon/IconDataCache.h: Removed.
198 * loader/icon/IconDatabase.cpp:
199 (WebCore::urlForLogging): Cut a URL down in length for sane logging and debugging
200 (WebCore::defaultClient): Return the default, empty IconDatabaseClient incase the API doesn't set one.
202 Following block of methods are for the Main thread's usage -
203 (WebCore::IconDatabase::setClient):
204 (WebCore::makeAllDirectories): Small optimization that checks to see if the entire path exists already, and doesn't try to loop
205 through each patch component if the full path is already present
206 (WebCore::IconDatabase::open): Makes all directories to the target path and kicks off the background thread - nothing more.
207 (WebCore::IconDatabase::close): Signals the thread to quit and waits for it to do so
208 (WebCore::IconDatabase::removeAllIcons): Purge the icon database
209 (WebCore::IconDatabase::iconForPageURL):
210 (WebCore::IconDatabase::readIconForPageURLFromDisk):
211 (WebCore::IconDatabase::iconURLForPageURL):
212 (WebCore::IconDatabase::defaultIcon):
213 (WebCore::IconDatabase::retainIconForPageURL):
214 (WebCore::IconDatabase::releaseIconForPageURL):
215 (WebCore::IconDatabase::setIconDataForIconURL):
216 (WebCore::IconDatabase::setIconURLForPageURL):
217 (WebCore::IconDatabase::loadDecisionForIconURL): Determine if an icon loader should load now. If the decision is "maybe later", then
218 mark the DocumentLoader to be notified later when the final decision is available.
219 (WebCore::IconDatabase::iconDataKnownForIconURL): Determine if the actual image data has been read from disk (or set from the loader) for
221 (WebCore::IconDatabase::setEnabled):
222 (WebCore::IconDatabase::isEnabled):
223 (WebCore::IconDatabase::setPrivateBrowsingEnabled):
224 (WebCore::IconDatabase::isPrivateBrowsingEnabled):
225 (WebCore::IconDatabase::delayDatabaseCleanup): Restore this method from a year ago, as asynchronous pruning of icons can now occur on a
227 (WebCore::IconDatabase::allowDatabaseCleanup):
228 (WebCore::IconDatabase::checkIntegrityBeforeOpening):
229 (WebCore::IconDatabase::pageURLMappingCount):
230 (WebCore::IconDatabase::retainedPageURLCount):
231 (WebCore::IconDatabase::iconRecordCount):
232 (WebCore::IconDatabase::iconRecordCountWithData):
233 (WebCore::IconDatabase::IconDatabase):
234 (WebCore::IconDatabase::~IconDatabase):
235 (WebCore::IconDatabase::notifyPendingLoadDecisions): Tell all the registered DocumentLoaders "Hey, we've read in all URL mappings from disk,
236 so check to see if you are interested in any of them"
237 (WebCore::IconDatabase::notifyPendingLoadDecisionsInternal):
238 (WebCore::IconDatabase::wakeSyncThread): Wake the sync thread, if it is idle
239 (WebCore::IconDatabase::scheduleOrDeferSyncTimer): Even though we're on a background thread, we still defer writing out to disk during
240 periods of high activity
241 (WebCore::IconDatabase::syncTimerFired): Call wakeSyncThread()
243 Following block of methods may be used by either thread -
244 (WebCore::IconDatabase::isOpen):
245 (WebCore::IconDatabase::databasePath):
246 (WebCore::IconDatabase::defaultDatabaseFilename):
247 (WebCore::IconDatabase::getOrCreateIconRecord):
248 (WebCore::IconDatabase::getOrCreatePageURLRecord):
250 Following block of methods are used by the secondary thread only -
251 (WebCore::IconDatabase::importIconURLForPageURL): For the Safari 2 import procedure - write a URL mapping directly out to disk
252 (WebCore::IconDatabase::importIconDataForIconURL): For the Safari 2 import procedure - write an Icon directly out to disk
253 (WebCore::IconDatabase::shouldStopThreadActivity): To check and see if the thread should stop what it is doing now to do something
254 more important (such as quit, or delete all icons)
255 (WebCore::IconDatabase::iconDatabaseSyncThreadStart):
256 (WebCore::IconDatabase::iconDatabaseSyncThread): Entry point for the background thread
257 (WebCore::databaseVersionNumber):
258 (WebCore::isValidDatabase):
259 (WebCore::createDatabaseTables):
260 (WebCore::IconDatabase::performOpenInitialization): Open and validate the SQLite database, making sure it's schema jives with what
262 (WebCore::IconDatabase::checkIntegrity):
263 (WebCore::IconDatabase::performURLImport): Import all the Page URL -> Icon URL mappings from the database. Done "1st thing" on startup,
264 this is necessary to be able to give the loader decisions about whether or not it should load icons from the network
265 (WebCore::IconDatabase::syncThreadMainLoop): Main loop - sleeps until woken up, then does a read cycle and a write cycle until both cycles
266 do no work - then it goes back to sleep.
267 (WebCore::IconDatabase::readFromDatabase): Reads icons from the database that clients are waiting on
268 (WebCore::IconDatabase::writeToDatabase): Writes any changes page -> icon url mappings to disk, as well as any new image data that has
269 been received from the loader
270 (WebCore::IconDatabase::pruneUnretainedIcons): Done only once, and only after the first write to the database, this procedure removes all
271 icons and page URLs from disk that haven't been retained by any client. Note that the prune can be delayed by utilizing delayDatabaseCleanup()
272 (WebCore::IconDatabase::checkForDanglingPageURLs): Usually part of the prune procedure, prunes any pages who point to icons that no longer exist
274 (WebCore::IconDatabase::removeAllIconsOnThread): Completely purge both the on-disk and in memory records of all icons
275 (WebCore::IconDatabase::deleteAllPreparedStatements): Part of removeAllIcons and the thread cleanup procedure
276 (WebCore::IconDatabase::cleanupSyncThread): Write out any last remaining writes to disk, close the database, and then end the thread
277 (WebCore::IconDatabase::imported): Checks the DB to see if the Safari 2 import has occured
278 (WebCore::IconDatabase::setImported): Sets the "Safari 2 imported" flag
279 (WebCore::readySQLStatement):
280 (WebCore::IconDatabase::setIconURLForPageURLInSQLDatabase): This and the following "SQLDatabase" suffixed methods are pretty self explanatory
281 (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
282 (WebCore::IconDatabase::removePageURLFromSQLDatabase):
283 (WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase):
284 (WebCore::IconDatabase::addIconURLToSQLDatabase):
285 (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
286 (WebCore::IconDatabase::removeIconFromSQLDatabase):
287 (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase):
288 * loader/icon/IconDatabase.h:
290 * loader/icon/IconDatabaseClient.h: Added.
291 (WebCore::IconDatabaseClient::~IconDatabaseClient):
292 (WebCore::IconDatabaseClient::performImport): Perform the Safari 2 import, implemented by WebKit
293 (WebCore::IconDatabaseClient::dispatchDidRemoveAllIcons): Send the API notification
294 (WebCore::IconDatabaseClient::dispatchDidAddIconForPageURL): Ditto
296 * loader/icon/IconDatabaseNone.cpp: Best attempt to keep non icon-DB platforms building
297 (WebCore::IconDatabase::defaultDatabaseFilename):
298 (WebCore::IconDatabase::readIconForPageURLFromDisk):
299 (WebCore::IconDatabase::loadDecisionForIconURL):
300 (WebCore::IconDatabase::iconDataKnownForIconURL):
301 (WebCore::IconDatabase::setIconURLForPageURL):
302 (WebCore::IconDatabase::isEnabled):
303 (WebCore::IconDatabase::delayDatabaseCleanup):
304 (WebCore::IconDatabase::allowDatabaseCleanup):
305 (WebCore::IconDatabase::setClient):
307 * loader/icon/IconRecord.cpp: Added.
308 (WebCore::IconRecord::IconRecord): IconRecord used to be "IconDataCache" - it is merely a container for the url, timestamp, and image for a site icon.
309 It is Shared, and therefore ref counted - PageURLRecords are the owning containers. This is a tricky way to track how many page urls are retaining
310 an IconRecord and therefore tracking when we should try to get rid of one.
311 (WebCore::IconRecord::~IconRecord):
312 (WebCore::IconRecord::image):
313 (WebCore::IconRecord::setImageData):
314 (WebCore::IconRecord::loadImageFromResource):
315 (WebCore::IconRecord::imageDataStatus): Return whether the image data hasn't been read yet, exists in memory, or is absent (site with no icon)
316 (WebCore::IconRecord::snapshot): Returns a snapshot of the icon's data - url, timestamp, and image data - to be written to disk
317 * loader/icon/IconRecord.h: Added.
318 (WebCore::IconSnapshot::IconSnapshot):
319 (WebCore::IconRecord::getTimestamp):
320 (WebCore::IconRecord::setTimestamp):
321 (WebCore::IconRecord::iconURL):
322 (WebCore::IconRecord::retainingPageURLs):
324 * loader/icon/PageURLRecord.cpp: Added.
325 (WebCore::PageURLRecord::PageURLRecord): PageURLRecord is fundamentally a pairing of a Page URL to an Icon. It has manual ref counting for the sake
326 of "retainIconForPageURL" and "releaseIconForPageURL", and can provide a quick snapshot of it's Page URL -> Icon URL mapping for writing to
328 (WebCore::PageURLRecord::setIconRecord):
329 (WebCore::PageURLRecord::snapshot):
330 * loader/icon/PageURLRecord.h: Added.
331 (WebCore::PageURLSnapshot::PageURLSnapshot):
332 (WebCore::PageURLRecord::url):
333 (WebCore::PageURLRecord::PageURLRecord::iconRecord):
334 (WebCore::PageURLRecord::retain):
335 (WebCore::PageURLRecord::release):
336 (WebCore::PageURLRecord::retainCount):
338 * platform/SharedBuffer.cpp:
339 (WebCore::SharedBuffer::copy): Added a deep copy method for the purposes of handing icon data across the thread boundary into the icon database
340 * platform/SharedBuffer.h:
342 * platform/graphics/svg/SVGImageEmptyClients.h:
343 (WebCore::SVGEmptyFrameLoaderClient::registerForIconNotification):
345 * platform/win/TemporaryLinkStubs.cpp:
346 (WebCore::callOnMainThread): Only other IconDatabase utilizing platform - keep their build going
348 2007-09-07 David Kilzer <ddkilzer@apple.com>
350 Reviewed by Timothy Hatcher.
352 Housekeeping. No test required.
354 * bindings/objc/WebScriptObjectInternal.h: Removed unused file.
355 * bindings/objc/WebScriptObjectPrivate.h: Updated copyright statement.
357 2007-09-07 Justin Garcia <justin.garcia@apple.com>
359 Rolling out my changes from r25421 while I investigate the layout test failures
362 * editing/Selection.cpp:
363 (WebCore::Selection::validate):
364 * editing/VisiblePosition.cpp:
365 (WebCore::VisiblePosition::next):
366 (WebCore::VisiblePosition::previous):
367 (WebCore::VisiblePosition::lastEditablePositionAtOrBefore):
368 (WebCore::VisiblePosition::firstEditablePositionAtOrAfter):
369 * editing/VisiblePosition.h:
370 * editing/visible_units.cpp:
371 (WebCore::endOfWord):
372 (WebCore::previousWordPosition):
373 (WebCore::nextWordPosition):
374 (WebCore::startOfLine):
375 (WebCore::endOfLine):
376 (WebCore::previousSentencePosition):
377 (WebCore::nextSentencePosition):
379 2007-09-05 Geoffrey Garen <ggaren@apple.com>
381 Reviewed by Darin Adler, Maciej Stachowiak, Mark Rowe, Tim Hatcher.
383 Fixed <rdar://problem/5326009> Make non-browser WebKit clients have no
384 memory cache, or a very tiny one
386 Added a client callback to notify WebKit when the first navigation has
387 taken place. "Navigation" here means a transition from one page to
388 another that ends up in the back/forward list.
390 WebKit Mac uses this notification to grow its cache model under certain
393 * loader/FrameLoader.cpp:
394 (WebCore::FrameLoader::addBackForwardItemClippedAtTarget):
395 * loader/FrameLoaderClient.h:
397 * platform/graphics/svg/SVGImageEmptyClients.h:
398 (WebCore::SVGEmptyFrameLoaderClient::didPerformFirstNavigation): Ah,
399 SVGEmptyFrameLoaderClient, my old friend.
401 2007-09-07 Adele Peterson <adele@apple.com>
403 Reviewed by Dave Harrison.
405 Fix for <rdar://problem/5428427> Wrong characters are re-converted after doing reconversion with Kotoeri
407 Revert change for<rdar://problem/5279521> and add nil checks for the result of TextIterator::rangeFromLocationAndLength
408 TextIterator::exitNode shouldn't require the m_lastTextNode to be true, but we can't change that without making the logic in _web_attributedStringFromRange match.
409 We'll get that for free when we switch to use TextIterator in _web_attributedStringFromRange.
411 * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyBlockStyle): Added nil checks.
412 * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::indentRegion): ditto.
413 * editing/TextIterator.cpp: (WebCore::TextIterator::exitNode): Re-added check for m_lastTextNode before emitting newline.
415 2007-09-07 Ada Chan <adachan@apple.com>
417 <rdar://problem/5395928> Need to be able to handle context menu item selection by index
421 * platform/ContextMenu.h: Added method to retrieve context menu item by index
422 * platform/win/ContextMenuWin.cpp:
423 (WebCore::ContextMenu::ContextMenu): call setPlatformDescription() since that will handle
424 adding the MNS_NOTIFYBYPOS style to the context menu.
425 (WebCore::contextMenuItemByIdOrPosition): helper method so we don't have to duplicate code
426 between itemWithAction() and itemAtIndex().
427 (WebCore::ContextMenu::itemWithAction):
428 (WebCore::ContextMenu::itemAtIndex):
429 (WebCore::ContextMenu::setPlatformDescription): add MNS_NOTIFYBYPOS style to the context menu
430 so we will get notified by menu position through WM_MENUCOMMAND when the item is selected.
432 2007-09-07 Justin Garcia <justin.garcia@apple.com>
436 <rdar://problem/5057506> Double-clicking after ToDo content doesn't select the paragraph break
438 * editing/Selection.cpp:
439 (WebCore::Selection::validate):
440 Moved the code that moves across a paragraph boundary
441 when expanding selections by word granularity from
443 In the word and paragraph granularity cases, if the
444 end of the selection is at the end of the last paragraph
445 in the last cell of a block table, expand it so that
446 it ends at the start of the paragraph after the table,
447 instead of just after the table, so that ToDo content
448 gets the same double/tripled click behavior that normal
449 paragraphs get (added two testcases).
450 When expanding the selection to include paragraph
451 breaks, pass VisiblePosition::next true so that it
452 doesn't change editability.
453 * editing/VisiblePosition.cpp:
454 (WebCore::VisiblePosition::next): Renamed the bool because it's now also
455 used to keep non-editable positions non-editable.
456 (WebCore::VisiblePosition::previous): Ditto.
457 (WebCore::VisiblePosition::lastPositionWithSameEditabilityAtOrBefore):
458 Renamed this function and made it also work with non-editable positions.
459 (WebCore::VisiblePosition::firstPositionWithSameEditabilityAtOrAfter):
461 * editing/VisiblePosition.h:
462 * editing/visible_units.cpp:
463 (WebCore::endOfWord): Called the renamed function.
464 (WebCore::previousWordPosition): Ditto.
465 (WebCore::nextWordPosition): Ditto.
466 (WebCore::startOfLine): Ditto.
467 (WebCore::endOfLine): Ditto.
468 (WebCore::previousSentencePosition): Ditto.
469 (WebCore::nextSentencePosition): Ditto.
471 2007-09-07 Brady Eidson <beidson@apple.com>
475 <rdar://problem/5089241> - ASSERT and other funky effects in IconLoader with large 404 pages
477 There were two problems:
478 1 - I originally didn't expect SubresourceLoader to keep pulling in data after it received a 404 response,
479 but if the server sends back a complex 404 page, the loader did just that. That could result in the
480 IconLoader "finishing" twice
481 2 - In this case, the long messy 404 page would be committed to the database as image data. This would
482 result in wasted space on disk, wasted space in RAM, and wasting processor time trying to parse 50k+
483 of HTML as image data
485 Fix is two parts - 1, monitor the "m_loadIsInProgress" flag and 2, make ::finishLoading() take an actual
486 SharedBuffer argument that is what should be committed to the database so the ResourceHandle is unnecessary
488 * loader/icon/IconLoader.cpp:
489 (WebCore::IconLoader::didReceiveResponse): If the response is not valid, commit null data
490 (WebCore::IconLoader::didFail): If we've already finished loading once (the 404 response), don't
492 (WebCore::IconLoader::didFinishLoading): Ditto
493 (WebCore::IconLoader::finishLoading): Take a SharedBuffer argumnt as the actual data to commit
494 * loader/icon/IconLoader.h: Add a SharedBuffer arg to ::finishLoading()
496 2007-09-07 Brady Eidson <beidson@apple.com>
500 Inline the in-header definitions for non-Mac platforms
502 * platform/AutodrainedPool.h:
503 (WebCore::AutodrainedPool::AutodrainedPool):
504 (WebCore::AutodrainedPool::~AutodrainedPool):
505 (WebCore::AutodrainedPool::cycle):
507 2007-09-07 Brady Eidson <beidson@apple.com>
511 Add some AutoreleasePool and Threading utilities in preparation for the multi-threaded
512 fix for <rdar://problem/5434431>
514 AutodrainedPool wraps an NSAutoreleasePool and tracks a "cycle" count. This allows clients
515 in WebCore to simply call ::cycle() and after a preset number of iterations the pool will drain
516 and recreate the underlying NSAutoreleasePool
518 Threading utilities include C++ wrappers for pthread mutexes and conditions, as well as a generic
519 "callOnMainThread()" function for any non-main thread to use.
521 * platform/AutodrainedPool.h: Added.
522 (WebCore::AutodrainedPool::AutodrainedPool): Empty implementations for all non-mac platforms
523 (WebCore::AutodrainedPool::~AutodrainedPool): ditto
524 (WebCore::AutodrainedPool::cycle): ditto
525 * platform/mac/AutodrainedPool.mm: Added.
526 (WebCore::AutodrainedPool::AutodrainedPool):
527 (WebCore::AutodrainedPool::~AutodrainedPool):
528 (WebCore::AutodrainedPool::cycle): Keep track of number of cycles, and drain/recreate the pool if the
531 * platform/Threading.h: Added.
532 (WebCore::Mutex::Mutex): C++ wrapper for pthread_mutex
533 (WebCore::Mutex::~Mutex):
534 (WebCore::Mutex::lock):
535 (WebCore::Mutex::tryLock):
536 (WebCore::Mutex::unlock):
537 (WebCore::MutexLocker::MutexLocker): Handles automatically locking/unlocking a Mutex (for early returns
538 from a function, for example)
539 (WebCore::MutexLocker::~MutexLocker):
540 (WebCore::ThreadCondition::ThreadCondition): C++ wrapper for pthread_condition
541 (WebCore::ThreadCondition::~ThreadCondition):
542 (WebCore::ThreadCondition::wait):
543 (WebCore::ThreadCondition::signal):
544 (WebCore::ThreadCondition::broadcast):
545 * platform/mac/Threading.mm: Added.
546 (-[WebCoreFunctionWrapper initWithFunction:]): Obj-C implementation of "callOnMainThread"
547 (-[WebCoreFunctionWrapper _call]):
548 (WebCore::callOnMainThread):
550 2007-09-07 George Staikos <staikos@kde.org>
554 * loader/ProgressTracker.h:
555 (WebCore::ProgressTracker::totalPageAndResourceBytesToLoad):
557 2007-09-07 Qing Zhao <qing@staikos.net>
559 Reviewed by Anders and George.
561 Add accessors for these two variables.
563 * loader/ProgressTracker.h:
564 (WebCore::ProgressTracker::totalPageAndResourseBytesToLoad):
565 (WebCore::ProgressTracker::totalBytesReceived):
567 2007-09-06 Tristan O'Tierney <tristan@apple.com>
569 Reviewed by Maciej Stachowiak.
571 <rdar://problem/5333496> Back button stopped working on sfgate.com (14957)
573 This fix is specifically targted to address sfgate.com and reuters.com with minimal
574 impact to other areas of the frameloader. It does not cause any regression tests to fail.
575 I've added two layout tests: One to detect this particular bug, and one to address
576 a secondary issue: if an iframe navigation occurs during onload by a timeout an
577 additional history item is added, similarly to firefox. We tried to match firefox
578 more than IE with this fix but did gain a little bit of IE compatability.
580 Tests: http/tests/navigation/onload-navigation-iframe-timeout.html
581 http/tests/navigation/onload-navigation-iframe.html
584 (WebCore::Document::processingLoadEvent):
585 Return the m_processingLoadEvent boolean so FrameLoader knows
586 that the document is in the middle of calling <body onload>
588 * html/HTMLFrameOwnerElement.cpp:
589 (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
590 * html/HTMLFrameOwnerElement.h:
591 (WebCore::HTMLFrameOwnerElement::createdByParser):
592 (WebCore::HTMLFrameOwnerElement::setCreatedByParser):
593 Added support for a new member variable of frame elements: m_createdByParser.
594 This lets us specifically target the fix to only iframes created via JS
597 * loader/FrameLoader.cpp:
598 (WebCore::FrameLoader::FrameLoader):
599 Initialize m_navigationDuringLoad to false
601 (WebCore::FrameLoader::provisionalLoadStarted):
602 Determine if the load we're about to start is occuring during
605 (WebCore::FrameLoader::updateHistoryForStandardLoad):
606 If the current frameloader is for a child frame, and the navigation is occuring
607 during an onload update the current history item rather than adding a new one.
609 * loader/FrameLoader.h:
610 Added a new member variable, m_navigationDuringLoad to track
611 the navigation status during the on load, rather than trying to determine
612 the status after (which is nearly impossible due to a new runloop spin).
614 2007-09-06 David Kilzer <ddkilzer@apple.com>
618 The implementation of BackForwardList::clearPageCache() was removed in r21793.
619 It's now safe to remove it from the header.
621 * history/BackForwardList.h: Removed clearPageCache().
623 2007-09-06 Anders Carlsson <andersca@apple.com>
627 <rdar://problem/5457844>
628 Crash when using mouse wheel with plug-ins disabled.
630 Null check the widget.
632 * page/EventHandler.cpp:
633 (WebCore::EventHandler::handleWheelEvent):
635 2007-09-06 Anders Carlsson <andersca@apple.com>
641 * plugins/win/PluginStreamWin.cpp:
642 (WebCore::PluginStreamWin::startStream):
644 2007-09-06 Anders Carlsson <andersca@apple.com>
646 Reviewed by Adam and Steve.
648 <rdar://problem/5459321>
649 ADOBE: Safari 3 on Windows is passing bogus values in stream->headers in NPP_NewStream, causing Flash Player to crash.
651 Serialize the headers into a stream and pass it to NPP_NewStream in stream->headers.
653 * plugins/win/PluginStreamWin.cpp:
654 (WebCore::PluginStreamWin::startStream):
655 * plugins/win/PluginStreamWin.h:
657 2007-09-06 Darin Adler <darin@apple.com>
661 - fix http://bugs.webkit.org/show_bug.cgi?id=15153
662 REGRESSION: Assertion failure in FrameView::scheduleRelayout() (m_frame->view() == this)
664 Back out the willRemove() part of the previous patch.
665 It was incorrect and not needed to fix the bug anyway.
667 * dom/Document.cpp: (WebCore::Document::detach): Remove willRemove().
669 * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Put the willRemove() call
670 back here where it was originally before the previous fix.
672 * history/CachedPage.cpp: (WebCore::CachedPage::clear):
674 (WebCore::Frame::setView):
675 (WebCore::Frame::setDocument):
676 Added FIXMEs about the fact that we call detach() on the document but not willRemove().
678 2007-09-05 Timothy Hatcher <timothy@apple.com>
682 Changed the blocked exception log message to match AppKit's blocked exception message.
684 * platform/mac/BlockExceptions.mm:
685 (ReportBlockedObjCException):
687 2007-09-06 Darin Adler <darin@apple.com>
691 - <rdar://problem/5457865> REGRESSION (9A527): Safari crashes when opening a page
692 that immediately redirects to a PDF
694 I don't know how to make an automated test that trips over this.
696 The immediate cause of this regression was making a back/forward list entry in
697 this case. Earlier, the quick redirect would not results in a separate entry.
698 That's possibly a bug too, but it's better to fix the crash first.
700 The page cache was putting the document into a strange state: Still attached but
701 with the renderer set to 0. There was no good reason to do this, so got rid of it.
702 Moved the responsibility to the caller of not calling detach() when moving into
703 the page cache. This is more of a frame loader thing than a document thing.
705 * dom/Document.cpp: (WebCore::Document::detach): Added assertions that this is
706 only called on a document that's attached and not in the page cache. Also moved
707 the call to willRemove in here, so that callers can't make the mistake of not
708 calling that function. Removed the incorrectly-positioned code that made this
709 function do less if it was called on a document in the page cache.
711 * history/CachedPage.cpp: (WebCore::CachedPage::clear): Removed the code to handle
712 a document with a renderer of 0. There was no need to put the document into this
713 state. Any document in the page cache will always be "attached".
715 * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Added a check to prevent
716 from calling an unnecessary cancelParsing() on a document that's in the page cache
717 and guard the call to detach() with a check of attached(), like all other calls to
718 detach() on DOM objects.
721 (WebCore::Frame::setView): Added a missing check of attached(), like all other
722 calls to detach() on DOM objects. Also added code to not call detach() on the
723 document when it's in the page cache.
724 (WebCore::Frame::setDocument): This call site already had the attached() check,
725 but was missing the page cache check.
727 2007-09-05 David Harrison <harrison@apple.com>
731 Follow up on my fix for <rdar://problem/5306171>.
732 My first patch (r25373) broke svg/custom/stroke-width-click.svg.
734 * editing/TextIterator.cpp:
735 (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
736 Add currPos.isNotNull() check because positions in non-html content (like svg)
737 do not have visible positions, and we don't want to emit for them either.
739 2007-09-06 Mitz Pettel <mitz@webkit.org>
741 Reviewed by Adam Roben.
743 - fix http://bugs.webkit.org/show_bug.cgi?id=14685
744 <rdar://problem/5349755> text-align affects <select> button but not its drop-down menu
746 * platform/PlatformString.h:
747 (WebCore::String::defaultWritingDirection):
748 * platform/StringImpl.cpp:
749 (WebCore::StringImpl::defaultWritingDirection): Moved textDirectionForParagraph()
750 from RenderMenuList.cpp here.
751 * platform/StringImpl.h:
752 * platform/win/PopupMenuWin.cpp:
753 (WebCore::PopupMenu::itemWritingDirectionIsNatural): Changed to return 'true'.
754 (WebCore::PopupMenu::paint): Changed to use natural directionality for menu
756 * rendering/RenderMenuList.cpp:
757 (WebCore::RenderMenuList::adjustInnerStyle): Use defaultWritingDirection.
759 2007-09-06 Maciej Stachowiak <mjs@apple.com>
761 Reviewed by Oliver Hunt.
763 - fixed <rdar://problem/5455457> REGRESSION (9A527-9A535): Colloquy crash on launch in WebCoreScriptDebugger initWithDelegate (with announce.js plug-in installed)
765 * page/mac/FrameMac.mm:
766 (WebCore::Frame::windowScriptObject): Ensure that -[WebView
767 windowScriptObject] and -[WebFrame windowObject] return null until
768 the windowScriptObjectAvailable: delegate method is sent.
770 2007-09-05 David Harrison <harrison@apple.com>
772 Reviewed by Kevin Decker.
774 <rdar://problem/5306171> Mail: The first return after an attachment in multipart/mixed message is lost
776 Test added: editing/selection/toString-1.html
779 * editing/TextIterator.cpp:
780 (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
781 - Remove outdated and erroneous check for m_lastTextNode.
782 - Fix VisiblePosition check to look for line diff. Simple position diff gives the
783 wrong answer when the start is table/0 and the current is the first position
784 inside the content of the table.
786 2007-09-04 Marvin Decker <marv.decker@gmail.com>
788 Reviewed by Maciej Stachowiak.
790 http://bugs.webkit.org/show_bug.cgi?id=15072
791 Bug 15072: Fix ImageDecoder.cpp to not copy incoming data
793 Change ImageDecoder::setData to take a SharedBuffer*.
795 * platform/graphics/cairo/ImageSourceCairo.cpp:
796 (WebCore::ImageSource::setData):
797 * platform/image-decoders/ImageDecoder.h:
798 (WebCore::RGBA32Buffer::bytes):
799 (WebCore::RGBA32Buffer::height):
800 (WebCore::ImageDecoder::setData):
801 * platform/image-decoders/gif/GIFImageDecoder.cpp:
802 (WebCore::GIFImageDecoder::setData):
803 (WebCore::GIFImageDecoder::frameCount):
804 (WebCore::GIFImageDecoder::decode):
805 (WebCore::GIFImageDecoder::decodingHalted):
806 (WebCore::GIFImageDecoder::initFrameBuffer):
807 * platform/image-decoders/gif/GIFImageDecoder.h:
808 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
809 (WebCore::JPEGImageDecoder::setData):
810 (WebCore::JPEGImageDecoder::decode):
811 * platform/image-decoders/jpeg/JPEGImageDecoder.h:
812 * platform/image-decoders/png/PNGImageDecoder.cpp:
813 (WebCore::PNGImageDecoder::setData):
814 (WebCore::PNGImageDecoder::decode):
815 (WebCore::PNGImageDecoder::headerAvailable):
816 (WebCore::PNGImageDecoder::rowAvailable):
817 * platform/image-decoders/png/PNGImageDecoder.h:
819 2007-09-04 David Hyatt <hyatt@apple.com>
821 Fix for <rdar://problem/5271213>, resizing iChat window is slower than in
822 Tiger. This patch implements a fast scaling mode that can be used by
823 WebViews, e.g., during window resizing.
825 Reviewed by John Sullivan
828 * WebCore.xcodeproj/project.pbxproj:
830 (WebCore::FramePrivate::FramePrivate):
832 (WebCore::Page::Page):
833 (WebCore::Page::inLowQualityImageInterpolationMode):
834 (WebCore::Page::setInLowQualityImageInterpolationMode):
836 * platform/graphics/GraphicsContext.cpp:
837 (WebCore::GraphicsContext::drawImage):
838 * platform/graphics/GraphicsContext.h:
839 (WebCore::GraphicsContext::setUseLowQualityImageInterpolation):
840 (WebCore::GraphicsContext::useLowQualityImageInterpolation):
841 * platform/graphics/cg/GraphicsContextCG.cpp:
842 (WebCore::GraphicsContext::setUseLowQualityImageInterpolation):
843 (WebCore::GraphicsContext::useLowQualityImageInterpolation):
844 * rendering/RenderImage.cpp:
845 (WebCore::RenderImage::paint):
847 2007-09-04 Brady Eidson <beidson@apple.com>
851 Some SQLite tweaks for debugging
852 -In debug builds, track the thread that opened the database and enforce that any statements
853 that operate on the SQLDatabase do so from the thread that opened it
854 -Track whether or not a transaction is in progress for the SQLDatabase to find cases where
855 someone opens a new transaction while there is still one outstanding (a SQLite logic error)
857 * loader/icon/SQLDatabase.cpp:
858 (WebCore::SQLDatabase::SQLDatabase):
859 (WebCore::SQLDatabase::open): Track the opening thread. Also, return false if the DB failed to
860 open instead of trying to run a PRAGMA on it!
861 (WebCore::SQLDatabase::close): Reset the opening thread
862 * loader/icon/SQLDatabase.h:
863 (WebCore::SQLDatabase::transactionInProgress):
864 (WebCore::SQLDatabase::sqlite3Handle): For access to the raw sqlite3* handle to do a thread
867 * loader/icon/SQLStatement.cpp:
868 (WebCore::SQLStatement::prepare): Use the new sqlite3Handle accessor
869 (WebCore::SQLStatement::step): Ditto
871 * loader/icon/SQLTransaction.cpp:
872 (WebCore::SQLTransaction::SQLTransaction): Removed the c'tor form that could automatically
873 begin the transaction - never used and shouldn't be in practice!
874 (WebCore::SQLTransaction::begin): Maintain the transaction-in-progress flag on the DB
875 (WebCore::SQLTransaction::commit): Ditto
876 (WebCore::SQLTransaction::rollback): Ditto
877 * loader/icon/SQLTransaction.h:
879 2007-09-04 David Harrison <harrison@apple.com>
881 Reviewed by Maciej and John.
883 <rdar://problem/5452675> CrashTracer: [USER] 10 crashes in Mail at com.apple.WebCore: WebCore::Node::nodeIndex const + 6
885 * editing/InsertParagraphSeparatorCommand.cpp:
886 (WebCore::InsertParagraphSeparatorCommand::doApply):
887 Adjust pos to pos.downstream() after the refNode is calculated, but before the insertion. Doing it earlier
888 undid the logic of positionAvoidingSpecialElementBoundary(). The downstream is still needed just to set the
891 2007-09-04 Antti Koivisto <antti@apple.com>
895 Fix <rdar://problem/5452112>
896 REGRESSION: Initially focused textfield on www.mac.com login page has no insertion point, and doesn't accept typed characters
898 Use updateLayoutIgnorePendingStylesheets() instead of updateLayout(). We need to have rendering to set input focus.
900 Test: fast/forms/focus-style-pending.html
903 (WebCore::Element::focus):
905 2007-09-04 Girish Ramakrishnan <girish@trolltech.com>
909 Fixed Qt build on Windows
911 * html/HTMLFormElement.cpp:
912 (WebCore::pathGetFilename):
914 2007-09-03 David Harrison <harrison@apple.com>
916 Reviewed by Kevin Decker.
918 <rdar://problem/5456785> REGRESSION (r15963-r15970): Heading text not placed in VoiceOver Item Chooser (15132)
920 * bridge/mac/WebCoreAXObject.mm:
921 (-[WebCoreAXObject title]):
922 For headings, return the text under the element instead of nil.
924 2007-08-20 Oleg Sukhodolsky <son.two@gmail.com>
928 WebKitQt/WebCoreSupport should not be added to INCLUDEPATH for gdk-port
932 2007-09-03 Mark Rowe <mrowe@apple.com>
934 Reviewed by Tim Hatcher.
936 <rdar://problem/5452164> Production build with in symbols directory has no debug info
938 Enable debug symbol generation on all build configurations. Production builds are stripped
939 of symbols by Xcode during deployment post-processing.
941 * Configurations/Base.xcconfig:
942 * WebCore.xcodeproj/project.pbxproj:
944 2007-09-02 Brady Eidson <beidson@apple.com>
946 Reviewed by John Sullivan and Mark Rowe
948 Groundwork for support for monitoring IconDatabase in-memory statistics
951 * loader/icon/IconDatabase.cpp:
952 (WebCore::IconDatabase::pageURLMappingCount): Stub for now
953 (WebCore::IconDatabase::retainedPageURLCount): Ditto
954 (WebCore::IconDatabase::iconRecordCount): Ditto
955 (WebCore::IconDatabase::iconRecordCountWithData): Ditto
956 * loader/icon/IconDatabase.h:
958 2007-09-02 Mark Rowe <mrowe@apple.com>
962 <rdar://problem/5454704> WebKit seems to get too-narrow widths for "Monotype Corsiva", so lays out incorrectly
964 * platform/mac/FontDataMac.mm:
965 (WebCore::FontData::determinePitch): Work around NSFont incorrectly reporting Monotype Corsiva as fixed pitch.
967 2007-09-01 Darin Adler <darin@apple.com>
969 - rolled out fix for bug 12988 because it broke getElementById in a layout test
970 I'm working on a new fix.
972 * dom/Document.cpp: Rolled out.
974 2007-09-01 Oliver Hunt <oliver@apple.com>
978 <rdar://problem/5344848> IME is incorrectly used for key events when on non-editable regions
980 Adding a new EditorClient method so it is possible to inform WebKit of focus changes.
981 Also added new virtual method Node::shouldUseInputMethod to allow us to trivially check
982 whether an input method should be used when processing input for the currently focused
985 * bridge/EditorClient.h:
987 (WebCore::Node::shouldUseInputMethod):
989 * html/HTMLInputElement.cpp:
990 (WebCore::HTMLInputElement::shouldUseInputMethod):
991 * html/HTMLInputElement.h:
992 * html/HTMLTextAreaElement.cpp:
993 (WebCore::HTMLTextAreaElement::shouldUseInputMethod):
994 * html/HTMLTextAreaElement.h:
995 * page/FocusController.cpp:
996 (WebCore::FocusController::setFocusedNode):
997 * platform/graphics/svg/SVGImageEmptyClients.h:
998 (WebCore::SVGEmptyEditorClient::setInputMethodState):
1000 2007-09-01 Rob Buis <buis@kde.org>
1004 http://bugs.webkit.org/show_bug.cgi?id=12988
1005 First element (in document order) is not returned when other duplicate ID-ed elements were created first
1007 Reset the element id cache when id's are added or removed and there
1008 are duplicates for that id.
1010 Tests: fast/dom/duplicate-ids-document-order.html
1013 (WebCore::Document::getElementById):
1014 (WebCore::Document::addElementById):
1015 (WebCore::Document::removeElementById):
1017 2007-09-01 Rob Buis <buis@kde.org>
1021 http://bugs.webkit.org/show_bug.cgi?id=15083
1022 Some symbols in WebKit do not need to be exported
1024 Do not export these symbols.
1026 * dom/QualifiedName.cpp:
1027 (WebCore::hashComponents):
1028 * dom/XMLTokenizer.cpp:
1029 (WebCore::toString):
1030 (WebCore::getTokenizer):
1031 * history/HistoryItem.cpp:
1032 (WebCore::defaultNotifyHistoryItemChanged):
1033 * platform/Arena.cpp:
1034 (WebCore::CeilingLog2):
1035 * platform/graphics/Color.cpp:
1037 * platform/graphics/Path.cpp:
1038 (WebCore::pathLengthApplierFunction):
1039 * platform/graphics/cg/PathCG.cpp:
1040 (WebCore::CGPathToCFStringApplierFunction):
1041 (WebCore::CFStringFromCGPath):
1042 * rendering/RenderText.cpp:
1043 (WebCore::isSpaceAccordingToStyle):
1045 2007-08-31 Alice Liu <alice.liu@apple.com>
1047 Reviewed by Tim Hatcher.
1049 Fixed <rdar://problem/5420682> Mail crashes at WebCore::InsertLineBreakCommand::doApply() after dropping a selected image over container's close box
1051 * editing/DeleteButtonController.cpp:
1052 (WebCore::DeleteButtonController::show):
1053 Factored out the code in ::show() that created and styled the elements of the Deletion UI
1055 (WebCore::DeleteButtonController::createDeletionUI):
1056 Neglecting to move the append of the deletionUI elements into the same clause that handles the creation
1057 of them ended up creating multiple elements at were repeatedly appended to the target, resulting in a
1058 bloated table deletion UI which was slow to show and hide.
1060 * editing/DeleteButtonController.h:
1061 (WebCore::DeleteButtonController::enabled):
1062 Restore this function to how it used to be pre-r25305, sans asserts
1064 * editing/EditCommand.cpp:
1065 Add disable/enable sandwich when undoing/redoing commands too
1066 (WebCore::EditCommand::unapply):
1067 (WebCore::EditCommand::reapply):
1069 2007-08-31 Antti Koivisto <antti@apple.com>
1073 Fix <rdar://problem/5452943>
1074 REGRESSION (r25283): Reproducible crash in HTMLObjectElement::getInstance under guard malloc
1076 Calling updateLayoutIgnorePendingStylesheets() may do arbitrary things to render tree so
1077 no RenderObjects can be cached over it.
1079 * html/HTMLEmbedElement.cpp:
1080 (WebCore::findWidgetRenderer):
1081 (WebCore::HTMLEmbedElement::getInstance):
1082 * html/HTMLObjectElement.cpp:
1083 (WebCore::HTMLObjectElement::getInstance):
1085 2007-08-31 Anders Carlsson <andersca@apple.com>
1089 <rdar://problem/5443936>
1090 Crash after QT movie completes playback at apple.com/imac
1092 If the plug-in or one of its children have focus, set it to NULL to prevent the web view window from getting the focus,
1093 which can cause a layout to happen while in HTMLObjectElement::detach. (This is what we do on the Mac).
1095 * plugins/win/PluginViewWin.cpp:
1096 (WebCore::PluginViewWin::setParent):
1098 2007-08-30 Adele Peterson <adele@apple.com>
1102 Fix for <rdar://problem/5450600> REGRESSION: can't paste in textfield if its in a body that has user-select:none set (affects widgets)
1104 Test: editing/pasteboard/paste-plaintext-user-select-none.html
1106 * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::insertFragmentForTestRendering):
1107 Copy the user-select style from the current selection node and apply it so it is considered during the test rendering.
1108 This is important since we recently changed user-select to be inherited. When we consider valid VisiblePositions for the test rendering,
1109 we need to have the correct user-select value that will actually be used for the real insertion.
1111 2007-08-31 Anders Carlsson <andersca@apple.com>
1115 <rdar://problem/5423939>
1116 http://bugs.webkit.org/show_bug.cgi?id=15013
1117 ASSERTION FAILED !m_inDestructor in WebCore::Shared<WebCore::PluginStreamWin>::ref() on Windows
1119 Protect the stream in case it's destroyed by the plug-in.
1121 * plugins/win/PluginStreamWin.cpp:
1122 (WebCore::PluginStreamWin::didReceiveData):
1124 a2007-08-31 Darin Adler <darin@apple.com>
1128 - http://bugs.webkit.org/show_bug.cgi?id=15122
1130 * editing/htmlediting.cpp: (WebCore::avoidIntersectionWithNode):
1131 Change assertion so that it only fires when actually modifying the selection.
1132 This isn't nearly as helpful, because the old assertion could catch potential
1133 problems in more cases, but it's not obvious how to do better.
1135 2007-08-30 Oliver Hunt <oliver@apple.com>
1139 <rdar://problem/5430772> REGRESSION(303-310A5) list items do not show with mouse over on istweb.apple.com/quack.apple.com
1141 VC++ treats bitfields as signed members, so Node::m_styleChange would be
1142 sign extended if it was assigned the value FullStyleChange. This caused
1143 style recalculation to stop propagating.
1145 We work around this VC++ oddity by storing the enum as an unsigned, and
1146 casting back to StyleChangeType in the getter.
1148 Test: fast/css/hover-affects-child.html
1151 (WebCore::Node::styleChangeType):
1153 2007-08-29 Justin Garcia <justin.garcia@apple.com>
1157 <rdar://problem/5368833>
1158 REGRESSION: Pasting a triple-clicked line of quoted text at the top of a message adds an extra, quoted line
1160 * editing/CompositeEditCommand.cpp:
1161 (WebCore::CompositeEditCommand::insertParagraphSeparator): Added an option for
1162 using a plain div to hold the new paragraph, instead of a clone of the previous
1164 * editing/CompositeEditCommand.h:
1165 * editing/InsertParagraphSeparatorCommand.cpp: Ditto.
1166 (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Ditto.
1167 (WebCore::InsertParagraphSeparatorCommand::doApply): Ditto.
1168 * editing/InsertParagraphSeparatorCommand.h:
1169 * editing/ReplaceSelectionCommand.cpp:
1170 (WebCore::ReplaceSelectionCommand::doApply): Use a default block element when creating
1171 new paragraphs, so that empty paragraphs don't contain the block style of the previous
1173 Don't expand collapsed brs at the end of inserted content, this was the root of the bug.
1174 We'd copy <blockquote>hello<br></blockquote><br class="Apple-interchange-newline">
1175 and get an extra paragraph. The removed code used to make sure that if the copied
1176 selection ends with a paragraph break that is represented in the copied markup by a
1177 regular br (not an interchange newline br), that that paragraph break appears in the
1178 pasted content, but shouldMergeEnd, which was introduced after this code was written,
1179 now takes care of that.
1180 (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Inserted content should always
1181 displace placeholder brs, even if that inserted content ends with a br.
1182 * editing/markup.cpp:
1183 (WebCore::needInterchangeNewlineAfter): This code failed to add an interchange newline
1184 if the user copied <div>hello</div><br>, only don't add an interchange newline when
1185 copying ^hello<br>^<br>, because then the copied paragraph break will already be
1186 represented in the copied markup by a br.
1187 (WebCore::createMarkup):
1189 2007-08-30 David Harrison <harrison@apple.com>
1193 <rdar://problem/5423900> Seed: safari crashes on submit feedback page in -[WebCoreAXObject isAttachment]
1195 * bridge/mac/WebCoreAXObject.mm:
1196 (-[WebCoreAXObject isAttachment]):
1197 Add nil check since element could be detached.
1199 2007-08-30 Mitz Pettel <mitz@webkit.org>
1201 Reviewed by Dave Hyatt.
1203 - fix http://bugs.webkit.org/show_bug.cgi?id=13282
1204 <rdar://problem/5126392> REGRESSION (NativePopUp): Rightmost character cut off in pop-up menu
1206 * rendering/RenderMenuList.cpp:
1207 (WebCore::RenderMenuList::updateOptionsWidth): When measuring option text, use
1208 the same WebCore run rounding behavior that is used to draw it in the popup button.
1210 2007-08-30 Riku Voipio <riku.voipio@iki.fi>
1212 Reviewed by Dave Kilzer.
1216 * platform/DeprecatedString.h: Update comments to reflect the
1217 change and update test to fit changes to Platform.h.
1219 2007-08-30 Darin Adler <darin@apple.com>
1221 Reviewed by Tim Hatcher.
1223 - fix http://bugs.webkig.org/show_bug.cgi?id=14981
1224 DEBUG builds of WebKit hang videwing Yahoo! Mail messages
1225 with ~5 MB text attachment
1227 * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::checkConsistency):
1228 * rendering/RenderFlow.cpp: (WebCore::RenderFlow::checkConsistency):
1229 * rendering/RenderText.cpp: (WebCore::RenderText::checkConsistency):
1230 Put the actual consistency check inside an ifdef. If you need it you can
1231 turn it on. There's still some function call overhead in builds that don't
1232 have NDEBUG defined, but that's worth it so we can turn this on and off
1233 without recompiling the world.
1235 - small code style improvement to recently changed function
1237 * editing/TextIterator.cpp: (WebCore::plainTextToMallocAllocatedBuffer):
1238 Use a typedef and make_pair to make the code dealing with the pair simpler to read.
1240 2007-08-30 Simon Hausmann <hausmann@kde.org>
1244 Fix Qt/Gdk build. gcc on Linux at least doesn't like initializing
1245 variables between jumps with goto ("jump to label foo crosses
1246 initialization of bar").
1248 * editing/TextIterator.cpp:
1249 (WebCore::plainTextToMallocAllocatedBuffer):
1251 2007-08-30 Darin Adler <darin@apple.com>
1255 - fix <rdar://problem/5423270> CrashTracer: [USER] 1 crash in Safari at com.apple.WebCore:
1256 WebCore::plainTextToMallocAllocatedBuffer + 762
1258 * editing/TextIterator.cpp: (WebCore::plainTextToMallocAllocatedBuffer):
1259 Check for a malloc failure and exit the function if it failed.
1261 2007-08-29 Anders Carlsson <andersca@apple.com>
1265 <rdar://problem/5404329>
1266 Plugin content starves WM_TIMER events on UI thread (affects idle behavior of app) on http://www.vincent-vella.com/, http://www.sagmeister.com/
1268 Add a tiny delay to invalidation timer to prevent it from starving other timers.
1270 * plugins/win/PluginViewWin.cpp:
1271 (WebCore::PluginViewWin::invalidateRect):
1273 2007-08-29 Darin Adler <darin@apple.com>
1277 * editing/htmlediting.cpp: (WebCore::avoidIntersectionWithNode):
1278 Fix an assert that was firing for me all the time when doing editing operations.
1280 2007-08-29 Anders Carlsson <andersca@apple.com>
1284 <rdar://problem/5386098>
1285 Repro hang with some Flash plugin content (http://dougmccune.com/blog/2007/07/25/coming-to-flexcamp-at-adobe/)
1287 In some cases, Flash ends up starving the main loop by sending a lot of WM_USER + 1 messages. Throttle these
1288 messages so they won't end up hanging the web browser.
1290 * plugins/win/PluginViewWin.cpp:
1291 (WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin):
1292 (WebCore::PluginMessageThrottlerWin::~PluginMessageThrottlerWin):
1293 (WebCore::PluginMessageThrottlerWin::appendMessage):
1294 (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
1295 (WebCore::PluginMessageThrottlerWin::allocateMessage):
1296 (WebCore::PluginMessageThrottlerWin::isInlineMessage):
1297 (WebCore::PluginMessageThrottlerWin::freeMessage):
1298 (WebCore::PluginViewWndProc):
1299 (WebCore::PluginViewWin::wndProc):
1300 (WebCore::PluginViewWin::determineQuirks):
1301 * plugins/win/PluginViewWin.h:
1303 (WebCore::PluginViewWin::pluginWndProc):
1305 2007-08-29 Beth Dakin <bdakin@apple.com>
1309 Fix for <rdar://problem/5436800> REGRESSION: PLT is 1.5% slower due
1310 to r24593 and r25098
1312 In r25098, we only called setCreatedByParser for XML! This patch
1313 calls it for HTML too, and takes care of the performance
1316 * html/HTMLElementFactory.cpp:
1317 (WebCore::styleConstructor):
1319 2007-08-29 Antti Koivisto <antti@apple.com>
1323 Fix <rdar://problem/5425951>
1324 REGRESSION: change to updateLayoutIgnorePendingStylesheets causes SAP Portal page to render wrong
1326 If new nodes have been added or style recalc has been done with style sheets still pending, some nodes
1327 may not have had their real style calculated yet. Normally this state gets cleaned when style sheets arrive
1328 but in updateLayoutIgnorePendingStylesheets() we need to do full style recalc to get up-to-date style immediatly.
1330 Added a document flag to track if there are any nodes that did not have their real style calculated due to
1331 pending stylesheets.
1333 Test: fast/dynamic/style-access-late-stylesheet-load.html
1335 * css/CSSStyleSelector.cpp:
1336 (WebCore::CSSStyleSelector::styleForElement):
1338 (WebCore::Document::Document):
1339 (WebCore::Document::recalcStyle):
1340 (WebCore::Document::updateLayoutIgnorePendingStylesheets):
1342 (WebCore::Document::setHasNodesWithPlaceholderStyle):
1344 2007-08-29 Alice Liu <alice.liu@apple.com>
1348 We disable the DeleteButton UI before applying any editing commands.
1349 This patch simply moves those disable/enable calls to a more correct place, closer to the actual application of the editing command.
1351 * editing/EditCommand.cpp:
1352 (WebCore::EditCommand::apply):
1353 (WebCore::applyCommand):
1355 2007-08-28 Alice Liu <alice.liu@apple.com>
1357 fixed <rdar://problem/5420682> Mail crashes at WebCore::InsertLineBreakCommand::doApply()
1358 after dropping a selected image over container's close box
1360 Reviewed by Darin and Maciej.
1362 * editing/DeleteButtonController.cpp:
1363 (WebCore::DeleteButtonController::show):
1364 (WebCore::DeleteButtonController::hide):
1365 * editing/DeleteButtonController.h:
1366 (WebCore::DeleteButtonController::enabled):
1367 General changes made to DeleteButtonController: when hiding, it's not necessary to clear out
1368 the m_containerElement and m_target, especially since to fix this bug we need to keep
1369 their values around. It's sufficient to just detach the container from target.
1371 * editing/EditCommand.cpp:
1372 (WebCore::EditCommand::EditCommand):
1373 Move the selection out of the deletion UI since we don't want to expose the deletion UI to any editing.
1375 * editing/Editor.cpp:
1376 (WebCore::Editor::rangeForPoint):
1377 Move the range out of the deletion UI since we don't want to expose the deletion UI to any editing.
1379 * editing/htmlediting.cpp:
1380 * editing/htmlediting.h:
1381 (WebCore::avoidIntersectionWithNode):
1382 Moved function that operates on Range from markup.cpp to here
1383 Added new implementation for function that operates on Selection
1385 * editing/markup.cpp:
1386 (WebCore::createMarkup):
1387 Moved function out of this file to htmlediting.cpp, and renamed to avoidIntersectionWithNode
1389 2007-08-29 David Hyatt <hyatt@apple.com>
1391 Fix for 5441281, remove our dependency on cursor rects and drag margins
1392 in AppKit for a large performance boost on the PLT and iBench.
1396 * platform/mac/WidgetMac.mm:
1397 (WebCore::safeRemoveFromSuperview):
1398 (WebCore::Widget::addToSuperview):
1399 Suppress the resetting of drag margins when views are added and removed.
1401 (WebCore::Widget::setCursor):
1402 Just use NSCursor's set method to immediately set the cursor. We no longer
1403 rely on NSScrollView/NSClipView setDocumentCursor, since that is implemented
1406 2007-08-29 Rick <rick@writhe.org.uk>
1408 Reviewed by Tim Hatcher.
1410 Fix http://bugs.webkit.org/show_bug.cgi?id=14853
1411 Bug 14853: Incorrect implementation of ArrayImpl's equality operator
1413 * platform/ArrayImpl.cpp:
1414 (WebCore::ArrayImpl::operator==):
1415 Fixed typo so that correct variable is used in equality comparison.
1417 2007-08-29 Peter Kasting <zerodpx@gmail.com>
1421 - fix http://bugs.webkit.org/show_bug.cgi?id=15096
1422 Move the GIF frame duration minimum check into the various
1423 ImageSource*.cpp backends and use the same values as
1426 * platform/graphics/cairo/ImageSourceCairo.cpp:
1427 (WebCore::ImageSource::frameDurationAtIndex):
1428 * platform/graphics/qt/ImageSourceQt.cpp:
1429 (WebCore::ImageSource::frameDurationAtIndex):
1430 * platform/image-decoders/gif/GIFImageReader.cpp:
1431 (GIFImageReader::read):
1433 2007-08-29 Peter Kasting <zerodpx@gmail.com>
1437 - fix http://bugs.webkit.org/show_bug.cgi?id=15097
1438 Make PNGImageDecoder.cpp size its frame buffer vector in its
1439 constructor, so it never throws decoded image data away no matter
1440 what order its functions are called in.
1442 * platform/image-decoders/png/PNGImageDecoder.cpp:
1443 (WebCore::PNGImageDecoder::PNGImageDecoder):
1444 (WebCore::PNGImageDecoder::frameBufferAtIndex):
1445 (WebCore::PNGImageDecoder::decode):
1446 (WebCore::PNGImageDecoder::rowAvailable):
1447 (WebCore::PNGImageDecoder::pngComplete):
1449 2007-08-29 Peter Kasting <zerodpx@gmail.com>
1453 - fix http://bugs.webkit.org/show_bug.cgi?id=15104
1454 Don't double-compensate for sizeof(unsigned) when making a buffer
1455 overflow check in the GIF decoder. Now interlaced GIFs don't
1456 sometimes get nothing/garbage in some of the bottom rows.
1458 * platform/image-decoders/gif/GIFImageDecoder.cpp:
1459 (WebCore::GIFImageDecoder::haveDecodedRow):
1461 2007-08-28 Sam Weinig <sam@webkit.org>
1465 Update fix landed in r25249 to account for XMLHttpRequest, which can also be EventTargets.
1467 Tests: http/tests/security/listener/xss-XMLHttpRequest-addEventListener.html
1468 http/tests/security/listener/xss-XMLHttpRequest-shortcut.html
1470 * bindings/js/JSXMLHttpRequest.cpp:
1471 (KJS::JSXMLHttpRequest::putValueProperty): Use the Window object associated with document's frame, not the active Window.
1472 (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction): ditto
1473 * xml/XMLHttpRequest.h:
1474 (WebCore::XMLHttpRequest::document): Expose Document member so bindings can access the correct frame.
1476 2007-08-28 Anders Carlsson <andersca@apple.com>
1480 <rdar://problem/5424866> Bottom portion of any Web Clip widget appears transparent
1482 Restore the previous behavior, creating plug-ins on attach, for WebKit plug-ins. Netscape plug-ins
1483 are still created during the first layout.
1485 * html/HTMLEmbedElement.cpp:
1486 (WebCore::HTMLEmbedElement::getInstance):
1487 Only call layout if the renderer doesn't have a widget.
1489 * html/HTMLObjectElement.cpp:
1490 (WebCore::HTMLObjectElement::getInstance):
1493 * loader/FrameLoader.cpp:
1494 (WebCore::FrameLoader::shouldUsePlugin):
1495 Update for enum change.
1497 * loader/FrameLoaderTypes.h:
1498 Add ObjectContentNetscapePlugin and ObjectContentOtherPlugin.
1500 * page/mac/WebCoreFrameBridge.h:
1501 Get rid of the enum here, we can use the one in FrameLoaderTypes.h
1503 * rendering/RenderPartObject.cpp:
1504 (WebCore::RenderPartObject::updateWidget):
1505 Only create the plug-in if it's not a Netscape plug-in.
1507 (WebCore::RenderPartObject::layout):
1510 2007-08-28 David Harrison <harrison@apple.com>
1514 <rdar://problem/5415006> Command Left in a To Do causes caret to disappear
1516 The selection was ending up inside non-editable content at the To Do Options
1517 arrow image, rather then at the editable position just to the left of that image.
1518 The problem was that startPositionForLine looked only at line boxes, and there
1519 is no linebox for the editable position at the far left of a To Do, which is
1520 a table. Addressed by having startPositionForLine use table offset 0 instead
1521 of the first VisiblePosition inside the table.
1523 Found and fixed the similar case with option-left (move by word position).
1526 * editing/selection/mixed-editability-8.html: Added.
1527 * editing/selection/mixed-editability-9.html: Added.
1530 * editing/SelectionController.cpp:
1531 (WebCore::SelectionController::modifyMovingLeftBackward):
1533 * editing/VisiblePosition.cpp:
1534 (WebCore::VisiblePosition::next):
1535 (WebCore::VisiblePosition::previous):
1536 (WebCore::VisiblePosition::stayInEditableContentLeft):
1537 (WebCore::VisiblePosition::stayInEditableContentRight):
1538 Factored stayInEditableContentLeft() and stayInEditableContentRight()
1539 out of previous() and next().
1541 * editing/VisiblePosition.h:
1542 Declare stayInEditableContentLeft() and stayInEditableContentRight().
1544 * editing/visible_units.cpp:
1545 (WebCore::previousWordPosition):
1546 (WebCore::nextWordPosition):
1547 (WebCore::startOfLine):
1548 (WebCore::endOfLine):
1549 (WebCore::previousSentencePosition):
1550 (WebCore::nextSentencePosition):
1551 Call stayInEditableContentLeft() or stayInEditableContentRight(), as
1552 appropriate, so prevent crossing from editable content into
1555 (WebCore::startPositionForLine):
1556 Use table offset 0 instead of the first VisiblePosition in the table.
1558 2007-08-28 Mark Rowe <mrowe@apple.com>
1560 Reviewed by Darin Adler.
1562 <rdar://problem/5443453> Decreasing history expiration time from 1 year to 1 week can lead to long hang while icon database syncs
1564 Perform the sync inside a SQLite transaction. This drops the time taken for the sync from over 90s to under half a second in the
1565 extreme case of over 90,000 URLs being pruned.
1567 * loader/icon/IconDatabase.cpp:
1568 (WebCore::IconDatabase::syncDatabase):
1570 2007-08-28 Mark Rowe <mrowe@apple.com>
1572 Reviewed by Darin Adler.
1574 <rdar://problem/5437983> Loading history containing 100,000 entries adds 20s to Safari's startup
1576 Add a new constructor for HistoryItem that initializes the alternate title. This prevents WebHistoryItem
1577 in WebKit from having explicitly set the display title, which triggers a history item changed notification
1578 to be posted, for each history item loaded.
1581 * history/HistoryItem.cpp:
1582 (WebCore::HistoryItem::HistoryItem):
1583 * history/HistoryItem.h:
1585 2007-08-28 Anders Carlsson <andersca@apple.com>
1589 <rdar://problem/5298296> XMLHttpRequest readyState 3 & responseText buffer issues
1591 Add a shouldContentSniff flag to ResourceLoader and ResourceHandle and have XMLHttpRequest
1592 pass in false when creating its subresource loader.
1595 * loader/MainResourceLoader.cpp:
1596 (WebCore::MainResourceLoader::MainResourceLoader):
1597 (WebCore::MainResourceLoader::loadNow):
1598 * loader/ResourceLoader.cpp:
1599 (WebCore::ResourceLoader::ResourceLoader):
1600 (WebCore::ResourceLoader::load):
1601 * loader/ResourceLoader.h:
1602 * loader/SubresourceLoader.cpp:
1603 (WebCore::SubresourceLoader::SubresourceLoader):
1604 (WebCore::SubresourceLoader::create):
1605 * loader/SubresourceLoader.h:
1606 * loader/mac/NetscapePlugInStreamLoaderMac.mm:
1607 (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
1608 * platform/mac/WebCoreSystemInterface.h:
1609 * platform/mac/WebCoreSystemInterface.mm:
1610 * platform/network/ResourceHandle.cpp:
1611 (WebCore::ResourceHandle::ResourceHandle):
1612 (WebCore::ResourceHandle::create):
1613 * platform/network/ResourceHandle.h:
1614 * platform/network/ResourceHandleInternal.h:
1615 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1616 * platform/network/mac/ResourceHandleMac.mm:
1617 (WebCore::ResourceHandle::start):
1618 * xml/XMLHttpRequest.cpp:
1619 (WebCore::XMLHttpRequest::send):
1621 2007-08-27 Steve Falkenburg <sfalken@apple.com>
1623 Added getter for committedFirstRealDocumentLoad.
1627 * loader/FrameLoader.h: Added committedFirstRealDocumentLoad.
1628 (WebCore::FrameLoader::committedFirstRealDocumentLoad): Added.
1630 2007-08-27 Antti Koivisto <antti@apple.com>
1634 Fix <rdar://problem/5433144>
1635 REGRESSION: Unable to click "Select" link at Expedia for car rentals
1637 javascript: URLs need special handling when serializing. Escaping them like
1638 normal attribute values can do bad things. Try hard to not escape anything,
1639 escape quote characters only if really necessary. Try to match Firefox.
1641 Test: fast/innerHTML/javascript-url.html
1643 * editing/markup.cpp:
1644 (WebCore::urlAttributeToQuotedString):
1645 (WebCore::startMarkup):
1647 2007-08-27 David Hyatt <hyatt@apple.com>
1649 Fix for 5441224, micro-optimizations to improve the PLT by 1%.
1653 * css/CSSStyleSelector.cpp:
1654 (WebCore::CSSStyleSelector::canShareStyleWithElement):
1655 * platform/mac/FontMac.mm:
1656 (WebCore::Font::drawGlyphs):
1657 * rendering/RenderInline.cpp:
1658 (WebCore::RenderInline::requiresLayer):
1659 * rendering/RenderObject.cpp:
1660 (WebCore::RenderObject::isBody):
1661 * rendering/RenderObject.h:
1662 (WebCore::RenderObject::renderArena):
1663 (WebCore::RenderObject::isRoot):
1665 2007-08-27 Mitz Pettel <mitz@webkit.org>
1669 - fix http://bugs.webkit.org/show_bug.cgi?id=15091
1670 Crash in RenderBlock::skipWhitespace during layout <rdar://problem/5439631>
1672 Test: fast/replaced/applet-disabled-positioned.html
1674 * html/HTMLAppletElement.cpp:
1675 (WebCore::HTMLAppletElement::createRenderer): Changed to call
1676 RenderObject::createObject(), which accounts for style.
1678 2007-08-26 Antti Koivisto <antti@apple.com>
1682 Fix for <rdar://problem/5433726>
1683 Mail crash at WebCore::Frame::styleForSelectionStart() when deleting a selection in a HTML message (http://www.yahoo.com/)
1685 Test: editing/style/temporary-span-crash.html
1688 (WebCore::Frame::styleForSelectionStart):
1689 Temporary span created here might not have renderer if document has style sheet that makes it display:none.
1690 Set display:inline explicitly in spans style attribute. This temporary span does not need to get its display
1691 value from actual document style sheets. Null check the renderer too to be sure.
1694 2007-08-24 Sam Weinig <sam@webkit.org>
1698 Fix for <rdar://problem/5426142>
1700 Use the EventTarget's frame when creating the EventListener.
1702 Tests: http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener.html
1703 http/tests/security/listener/xss-JSTargetNode-onclick-shortcut.html
1704 http/tests/security/listener/xss-window-onclick-addEventListener.html
1705 http/tests/security/listener/xss-window-onclick-shortcut.html
1707 * bindings/js/JSEventTargetNode.cpp:
1708 (WebCore::JSEventTargetNode::setListener):
1709 (WebCore::JSEventTargetNodePrototypeFunction::callAsFunction):
1710 * bindings/js/kjs_window.cpp:
1711 (KJS::WindowFunc::callAsFunction):
1713 2007-08-25 Mitz Pettel <mitz@webkit.org>
1715 Reviewed by Sam Weinig.
1717 - fix http://bugs.webkit.org/show_bug.cgi?id=15077
1718 REGRESSION: Cannot drag selected text out of a background window
1720 * manual-tests/drag-out-of-background-window.html: Added.
1721 * page/EventHandler.cpp:
1722 (WebCore::EventHandler::eventMayStartDrag): Added missing coordinate
1725 2007-08-25 Rob Buis <buis@kde.org>
1729 http://bugs.webkit.org/show_bug.cgi?id=14848
1730 DOM table rules are not updated when changed
1732 On a dynamic rules attr change, mark the table cells and
1733 their ancestors (up to and including the table tag) as
1736 Tests: fast/table/rules-attr-dynchange1.html
1737 fast/table/rules-attr-dynchange2.html
1739 * html/HTMLTableElement.cpp:
1740 (WebCore::isTableCellAncestor):
1741 (WebCore::setTableCellsChanged):
1742 (WebCore::HTMLTableElement::parseMappedAttribute):
1744 2007-08-25 Adele Peterson <adele@apple.com>
1748 Fix for http://bugs.webkit.org/show_bug.cgi?id=15073
1749 <rdar://problem/5426557> REGRESSION: Can no longer drag text from textareas
1751 Test: fast/forms/drag-out-of-textarea.html
1753 * rendering/RenderTextControl.cpp: (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
1754 Only restricts hit testing if the placeholder text is visible.
1755 * rendering/RenderTextControl.h: (WebCore::RenderTextControl::placeholderIsVisible): Added.
1757 2007-08-25 Peter Kasting <zerodpx@gmail.org>
1759 Reviewed by Sam Weinig.
1761 Part 2 of http://bugs.webkit.org/show_bug.cgi?id=14967.
1762 Eliminate all remaining implicit conversions of wtf::Vector<T> to T*. Where code was
1763 previously checking that the Vector's data pointer was non-NULL, check !Vector::isEmpty()
1766 * bindings/js/kjs_navigator.cpp:
1767 (KJS::PluginBase::cachePluginDataIfNecessary):
1768 * loader/mac/LoaderNSURLExtras.m:
1769 (suggestedFilenameWithMIMEType):
1770 * page/FrameView.cpp:
1771 (WebCore::FrameView::~FrameView):
1772 (WebCore::FrameView::pauseScheduledEvents):
1773 (WebCore::FrameView::resumeScheduledEvents):
1774 (WebCore::FrameView::dispatchScheduledEvents):
1775 * platform/mac/PlugInInfoStoreMac.mm:
1776 (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
1778 2007-08-25 Mitz Pettel <mitz@webkit.org>
1780 Rubber-stamped by Adam Roben
1782 - remove unused file
1784 * platform/win/MouseEventWin.cpp: Removed.
1786 2007-08-25 Jasper Bryant-Greene <m@ni.ac.nz>
1788 Reviewed by Oliver Hunt.
1790 Set paintingDisabled to true in Cairo's GraphicsContext constructor
1791 when passed a null PlatformGraphicsContext.
1793 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1794 (WebCore::GraphicsContext::GraphicsContext):
1796 2007-08-25 Mitz Pettel <mitz@webkit.org>
1798 Reviewed by Dave Hyatt.
1800 - fix http://bugs.webkit.org/show_bug.cgi?id=15056
1801 REGRESSION (r21472): Digg Podcasts Episodes Render "Digg" counter incorrectly
1803 Covered by fast/parser/residual-style-close-across-n-blocks.html
1805 * html/HTMLParser.cpp:
1806 (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): If the
1807 residual style was closed before anything else in the block (so it does
1808 not apply to anything inside the block) avoid creating an empty element for
1809 it inside the block.
1811 2007-08-25 Mitz Pettel <mitz@webkit.org>
1813 Reviewed by Dave Hyatt.
1815 - fix http://bugs.webkit.org/show_bug.cgi?id=14972
1816 Moving cursor down in contentEditable section fails if styled line-height:1em
1818 Test: editing/selection/move-by-line-003.html
1820 * rendering/RenderText.cpp:
1821 (WebCore::RenderText::positionForCoordinates): Changed hit testing so that each
1822 line is tested for hits between its overflow top and the next line's overflow top.
1823 This matches RenderBlock::positionForCoordinates.
1825 2007-08-25 Mitz Pettel <mitz@webkit.org>
1829 - fix http://bugs.webkit.org/show_bug.cgi?id=14792
1830 <rdar://problem/5367763> REGRESSION: Copy inserts carriage return in middle of selection
1832 Test: editing/pasteboard/newlines-around-floating-or-positioned.html
1834 * editing/TextIterator.cpp:
1835 (WebCore::shouldEmitNewlinesBeforeAndAfterNode): Do not emit newlines around
1836 floating or positioned blocks. This behavior seems to match WinIE's.
1838 2007-08-23 Justin Garcia <justin.garcia@apple.com>
1842 <rdar://problem/5432254> GoogleDocs: A hang occurs when applying list style to selected table
1844 * editing/DeleteSelectionCommand.cpp:
1845 (WebCore::DeleteSelectionCommand::handleGeneralDelete): If the position
1846 that marked the start of the range to delete has been removed from the
1847 document, and it was inside the node that holds the position that marks
1848 the end of the range to delete, don't remove any children of that node,
1849 because we don't know how many to remove. For example, if the end is
1850 [a, 5] and the start was in some descendant of a and was removed, don't
1851 remove any of the children of a. We will now refuse to remove some content
1852 incorrectly, but that's less dangerous than removing content incorrectly.
1853 Long term we need to update these positions as we remove content from the
1854 document, but that seems like a more risky change. Added a testcase.
1855 * editing/InsertListCommand.cpp:
1856 (WebCore::InsertListCommand::modifyRange): If the end of the selection to
1857 modify is just after a table, and if the start of the selection is inside
1858 that table, the last paragraph that we'll want modify is the last one inside
1859 the table, not the paragraph that contains the table itself. Adjust
1860 startOfLastParagraph here to avoid infinite recursion.
1862 2007-08-24 Anders Carlsson <andersca@apple.com>
1866 <rdar://problem/5430165>
1867 REGRESSION: Dynamically loaded images fail to load
1869 * html/HTMLImageLoader.cpp:
1870 (WebCore::HTMLImageLoader::HTMLImageLoader):
1871 Initialize the m_elementIsProtected member.
1873 (WebCore::HTMLImageLoader::~HTMLImageLoader):
1874 Assert that the element is not protected.
1876 (WebCore::HTMLImageLoader::setLoadingImage):
1877 If the image is not null, protect the element. Otherwise, unprotect it.
1879 (WebCore::HTMLImageLoader::dispatchLoadEvent):
1880 Unprotect the element here.
1882 (WebCore::HTMLImageLoader::protectElement):
1883 (WebCore::HTMLImageLoader::unprotectElement):
1884 New methods which protect and unprotect the element.
1886 * html/HTMLImageLoader.h:
1888 2007-08-24 Kevin McCullough <kmccullough@apple.com>
1892 2007-08-24 Beth Dakin <bdakin@apple.com>
1894 Reviewed by Hyatt and Adele.
1896 Fix for <rdar://problem/5417203> Google Gmail 1.0 widget - unread
1899 * rendering/FixedTableLayout.cpp:
1900 (WebCore::FixedTableLayout::calcWidthArray): Calc pref widths for
1901 our cells, if needed.
1903 2007-08-24 Kevin McCullough <kmccullough@apple.com>
1907 <rdar://problem/5437038> 1 credential object leaked for each call to credentialWithUser:password:persistence
1908 - Use initWithUser instead of credentialWithUser because credentialWithUser leaks.
1910 * platform/network/mac/AuthenticationMac.mm:
1912 * platform/network/mac/ResourceHandleMac.mm:
1913 (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
1914 (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]):
1916 2007-08-24 Jon Honeycutt <jhoneycutt@apple.com>
1920 <rdar://problem/5433236> Print preview of empty txt file crashes Safari
1921 Fix: Adjust computePageRectsForFrame to always return at least one
1922 page rect, even if document height is zero.
1924 * WebCore.vcproj/WebCore.vcproj:
1925 * bridge/win/FrameWin.h: Added Vector& parameter to
1926 computePagesRectsForFrame; changed its return type to void.
1927 * bridge/win/FrameWin.cpp:
1928 (WebCore::computePageRectsForFrame): Reordered the loop that inserts
1929 rects into the vector.
1931 2007-08-24 Antti Koivisto <antti@apple.com>
1935 Fix <rdar://problem/5393758>
1936 Crash in WebCore::FontData::platformInit
1938 Null check glyph page.
1940 If font has somehow failed to initialize it is possible to have null glyph page. Based on
1941 crash dumps this seems to occasionally happen when running Mail under guard malloc.
1943 No test case, I don't know how to get to this state.
1945 * platform/FontData.cpp:
1946 (WebCore::FontData::FontData):
1947 * platform/mac/FontDataMac.mm:
1948 (WebCore::FontData::platformInit):
1950 2007-08-24 George Wright <george.wright@collabora.co.uk>
1954 http://bugs.webkit.org/show_bug.cgi?id=15071
1955 [cairo] SVG skews are incorrect
1957 Fix Cairo implementation of AffineTransform::shear so that shearing is
1958 done in the correct direction.
1960 * platform/graphics/cairo/AffineTransformCairo.cpp:
1961 (WebCore::AffineTransform::shear):
1963 2007-08-23 Anders Carlsson <andersca@apple.com>
1967 If necessary, re-set the window proc after each call to NPP_SetWindow. This is to ensure that
1968 our window proc is always run even if a plug-in subclasses the window and replaces the window proc.
1970 Also, make sure that the default window proc is of type ASCII so we can eliminate the
1971 * plugins/win/PluginViewWin.cpp:
1972 (WebCore::registerPluginView):
1973 (WebCore::PluginViewWndProc):
1974 (WebCore::PluginViewWin::setNPWindowRect):
1975 (WebCore::PluginViewWin::stop):
1976 (WebCore::PluginViewWin::determineQuirks):
1977 (WebCore::PluginViewWin::PluginViewWin):
1978 (WebCore::PluginViewWin::init):
1979 * plugins/win/PluginViewWin.h:
1981 (WebCore::PluginViewWin::pluginWndProc):
1983 2007-08-23 Justin Garcia <justin.garcia@apple.com>
1987 <rdar://problem/5156801> REGRESSION: Crash at DeleteSelectionCommand::doApply() when deleting table content
1989 * editing/DeleteSelectionCommand.cpp:
1990 (WebCore::DeleteSelectionCommand::handleGeneralDelete): Use a RefPtr
1991 for node. If the node to be removed contains the selection, and if
1992 the next node to be removed (nextNode) is inside the deletion UI,
1993 removing node will remove nextNode from the document. nextNode is
1994 a RefPtr, but node isn't and when nextNode falls out of scope the node
1995 that node points to will be destroyed and we'll end up using a stale pointer.
1996 Long term we should probably just disable the deletion UI before editing
1997 operations because the undo of the removal of node in the situation
1998 described above relies on the presence of the deletion UI, but it isn't
1999 present because its added and removed in a non-undoable way.
2001 2007-08-23 Mitz Pettel <mitz@webkit.org>
2005 - fix http://bugs.webkit.org/show_bug.cgi?id=14899
2006 !d->m_view->needsLayout() in Frame::paint() (Causes assert)
2008 WebKit copies the width and height attributes of an <embed> to its
2009 nearest <object> ancestor. This used to be done in updateWidget(), but
2010 that could lead to the document being dirty right after layout and
2011 before painting. The patch moves the copying of the attributes to when
2012 the <embed> is inserted into the document or its attributes change.
2014 * html/HTMLEmbedElement.cpp:
2015 (WebCore::HTMLEmbedElement::insertedIntoDocument):
2016 (WebCore::HTMLEmbedElement::attributeChanged):
2017 * html/HTMLEmbedElement.h:
2018 * manual-tests/bugzilla-14899.html: Added.
2019 * rendering/RenderPartObject.cpp:
2020 (WebCore::RenderPartObject::updateWidget):
2022 2007-08-22 Anders Carlsson <andersca@apple.com>
2024 Reviewed by Darin and Oliver.
2026 <rdar://problem/5422410>
2027 http://bugs.webkit.org/show_bug.cgi?id=15019
2028 REGRESSION (r25124-r25140): New posts and hot topics won't show at mobile01.com
2030 Remove the call to checkCallImplicitClose(). Calling it in loadPlugin is bad for two reasons:
2032 1. It could cause onload to be dispatched even when the page has subresources that are still
2033 loading, such as images.
2035 2. Now that loadPlugin is called during layout, it could cause onload to be dispatched during
2036 layout, which can execute javascript and do pretty much anything while the render tree is in an
2039 * loader/FrameLoader.cpp:
2040 (WebCore::FrameLoader::loadPlugin):
2042 2007-08-22 Anders Carlsson <andersca@apple.com>
2046 <rdar://problem/5430584>
2047 http://bugs.webkit.org/show_bug.cgi?id=15053
2048 WebKit does not check Windows Registry HKEY_CURRENT_USER for NPAPI plugin locations
2050 * plugins/win/PluginDatabaseWin.cpp:
2051 (WebCore::addPluginsFromRegistry):
2052 (WebCore::PluginDatabaseWin::getPluginsInPaths):
2054 2007-08-22 Justin Garcia <justin.garcia@apple.com>
2058 <rdar://problem/5418891> CrashTracer: [USER] 1 crash in Mail at -[WebViewEditor webView:shouldInsertText:replacingDOMRange:givenAction:]
2060 * editing/BreakBlockquoteCommand.cpp:
2061 (WebCore::BreakBlockquoteCommand::doApply): We're reusing the topBlockquote
2062 variable. Null it out first. If there is no new topBlockquote and we don't null
2063 it out first, we'll assume that there was a new one and crash.
2065 2007-08-22 Kevin McCullough <kmccullough@apple.com>
2069 - rdar:5423067 Reapplyingthe change but only when the text area is in focus.
2071 * html/HTMLTextAreaElement.cpp:
2072 (WebCore::HTMLTextAreaElement::setValue):
2074 2007-08-21 David Hyatt <hyatt@apple.com>
2076 Fix for <rdar://problem/5249757> Painting of JPGs in WebKit is too slow.
2078 Use a new Leopard API for fast tiling of images. We only use this API
2079 when the whole image is being tiled and when the current CGImageRef to tile
2080 has a size that matches the size of the whole image.
2082 We can optimize border-image in the future by adding a cache of the 9
2087 * platform/graphics/cg/ImageCG.cpp:
2088 (WebCore::Image::drawPattern):
2090 2007-08-22 Kevin McCullough <kmccullough@apple.com>
2092 - Rolling back since I need to update some layouttests this change breaks.
2094 * html/HTMLTextAreaElement.cpp:
2095 (WebCore::HTMLTextAreaElement::setValue):
2097 2007-08-21 Kevin McCullough <kmccullough@apple.com>
2099 Reviewed by Geof, Adam, Hyatt, Maciej and Oliver.
2101 - In order to match the behavior of the other major browsers, selection is moved to the end of the text value when a change occurs to the contents of a text area instead of remembering the location of the selection.
2102 - <rdar://problem/5423067> gmail is super annoying when trying to add a new name to the TO, CC or BCC fields
2104 * html/HTMLTextAreaElement.cpp:
2105 (WebCore::HTMLTextAreaElement::setValue):
2107 2007-08-21 Adam Roben <aroben@apple.com>
2111 Keep FrameView::layoutIfNeededRecursive Windows- and Gtk-only for now
2112 (sadly). This will have to wait until we merge ScrollView and FrameView.
2116 * page/FrameView.cpp:
2119 2007-08-21 Adam Roben <aroben@apple.com>
2121 Fix an ASSERT when using Find in Page
2127 * bridge/win/FrameWin.cpp:
2128 (WebCore::imageFromSelection): Make sure to update layout before
2129 painting so we don't hit an ASSERT in painting code (Frame::selectionImage
2130 in FrameMac.mm does this as well).
2132 2007-08-21 Adam Roben <aroben@apple.com>
2134 Made FrameView::layoutIfNeededRecursive available to all platforms
2136 Currently it's only used on Gtk+ and Windows.
2140 * page/FrameView.cpp: Removed #ifdef.
2141 * page/FrameView.h: Ditto.
2143 2007-08-21 Adele Peterson <adele@apple.com>
2145 Build fix for release build.
2147 * rendering/AutoTableLayout.cpp:
2148 (WebCore::AutoTableLayout::calcEffectiveWidth):
2149 (WebCore::AutoTableLayout::layout):
2151 2007-08-21 Mitz Pettel <mitz@webkit.org>
2155 - fix http://bugs.webkit.org/show_bug.cgi?id=15010
2156 <rdar://problem/5423956> REGRESSION (r25000-r25065): Table rendering broken by a recent nightly
2158 Test: fast/table/max-width-integer-overflow.html
2160 Avoid integer overflows when dealing with maximum widths by
2161 1) using floating point arithmetic when summing or multiplying column max widths
2162 2) capping max widths at INT_MAX / 2
2164 * rendering/AutoTableLayout.cpp:
2165 (WebCore::AutoTableLayout::calcPrefWidths):
2166 (WebCore::AutoTableLayout::calcEffectiveWidth):
2167 (WebCore::AutoTableLayout::layout):
2169 2007-08-20 John Sullivan <sullivan@apple.com>
2171 Reviewed by Adam Roben
2173 WebCore part of fix for:
2174 <rdar://problem/5417777> WebKit focus ring color no longer matches system focus rings
2176 Adele wrote the first version of this patch. No test cases added because I made sure the
2177 layout tests are unaffected. Two additional bug fixes were made in passing, but neither
2178 of them had any effect on any known real-world case, and both were too difficult to write
2179 test cases for to be worthwhile.
2182 added symbols for these new functions so WebKit can call them
2184 * WebCore.xcodeproj/project.pbxproj:
2185 updated for new file
2187 * platform/graphics/mac/ColorMac.h: Added.
2188 New file to hold the increasing amount of Mac-specific color stuff.
2190 * platform/graphics/Color.h:
2191 removed #if PLATFORM(MAC) code, which is now in ColorMac.h
2193 * platform/graphics/mac/ColorMac.mm:
2194 (WebCore::makeRGBAFromNSColor):
2195 new static function to convert an NSColor object to an RGBA32 struct
2196 (WebCore::colorFromNSColor):
2197 new public function to convert an NSColor object to a WebCore-style Color object
2198 (WebCore::focusRingColor):
2199 Uses (cached) systemFocusRingColor instead of hardwired values, unless usesTestModeFocusRingColor is true,
2200 in which case it uses the old hardwired color
2201 (WebCore::usesTestModeFocusRingColor):
2202 returns value of global var
2203 (WebCore::setUsesTestModeFocusRingColor):
2204 sets value of global var
2205 (+[WebCoreControlTintObserver controlTintDidChange]):
2206 Uses [NSColor keyboardFocusIndicatorColor] to set systemFocusRingColor; don't compile if COLORMATCH_EVERYTHING
2207 is set since we don't know what it would take to satisfy this state.
2209 * bindings/objc/DOMRGBColor.mm:
2210 now includes ColorMac.h to account for moved declarations
2211 * bridge/mac/WebCoreAXObject.mm:
2214 * page/mac/FrameMac.mm:
2215 (WebCore::convertAttributesToUnderlines):
2216 now uses new colorFromNSColor. The old code was swapping G & B, but it didn't matter in practice because
2217 this function is only used to convert the color of an input manager's marked text underline, which is always black
2219 * page/mac/WebCoreFrameBridge.mm:
2220 (-[WebCoreFrameBridge setBaseBackgroundColor:]):
2221 now uses new colorFromNSColor. The old code was swapping G & B, but it didn't matter in practice because
2222 this function is only called with a grayscale color perhaps containing an alpha value
2224 * rendering/RenderView.cpp:
2225 (WebCore::RenderView::paintBoxDecorations):
2226 just updated a comment
2228 2007-08-20 Mitz Pettel <mitz@webkit.org>
2230 Reviewed by Dave Hyatt.
2232 - fix http://bugs.webkit.org/show_bug.cgi?id=15023
2233 REGRESSION (r21113-r21143): JavaScript tooltip rendering bug
2235 Test: fast/repaint/layer-visibility.html
2237 * rendering/RenderLayer.cpp:
2238 (WebCore::RenderLayer::setHasVisibleContent): Cache the layer's
2239 rects when it changes to visible.
2241 2007-08-20 Kevin Decker <kdecker@apple.com>
2245 Fixed: <rdar://problem/5325262> REGRESSION (Tiger-Leopard): PictureTalk plug-in doesn't work
2247 The problem was that this particular plug-in handles "text/ptf", but WebCore wasn't giving the plug-in a chance to load
2248 any type with "text/"
2250 * dom/DOMImplementation.cpp:
2251 (WebCore::DOMImplementation::createDocument): Allow plug-ins to once again use "text/" MIME types, but only if the MIME
2252 type is not "text/plain". Disallowing plug-ins to use text/plain prevents plug-ins from hijacking a fundamental type
2253 that the browser is expected to handle, and also serves as an optimization to prevent loading the plug-in database in
2256 2007-08-20 Adam Roben <aroben@apple.com>
2258 Remove workarounds for <rdar://problem/5386894> now that it's been fixed
2262 Tests: fast/loader/local-svg-parsed-as-svg.svg
2263 fast/loader/local-xhtml-parsed-as-xhtml.xhtml
2265 * platform/network/cf/ResourceResponseCFNet.cpp:
2266 (WebCore::ResourceResponse::doUpdateResourceResponse): Removed hackish
2269 2007-08-20 Anders Carlsson <andersca@apple.com>
2273 <rdar://problem/5412988>
2274 Crash when visiting http://www.rockonflash.com/blog/?p=58
2276 * plugins/win/PluginViewWin.cpp:
2277 (WebCore::PluginViewWin::updateWindow):
2278 Just return if the plugin view hasn't been inserted in the hierarchy yet.
2280 2007-08-20 Holger Hans Peter Freyther <zecke@selfish.org>
2284 Do not define svg as ImageMIMEType if we can use ksvg2.
2286 * platform/MIMETypeRegistry.cpp:
2287 (WebCore::initialiseSupportedImageMIMETypes):
2289 2007-08-19 Adam Roben <aroben@apple.com>
2293 * platform/gdk/TemporaryLinkStubs.cpp: Removed const.
2295 2007-08-19 Adam Roben <aroben@apple.com>
2297 Fix <rdar://5395835> REGRESSION (r24527): Context menu for edit fields is missing "Font & Writing Direction"
2299 The problem was that ContextMenuItem::setSubMenu was just copying the
2300 HMENU from the ContextMenu passed in on Windows, but that HMENU was
2301 later getting destroyed when the ContextMenu went out of scope.
2303 I added a new ContextMenu::releasePlatformDescription method that is
2304 used in setSubMenu instead. I think an ultimately better design would
2305 be for setSubMenu to take ownership of the ContextMenu that's passed in
2306 (as should insertItem and appendItem), but I decided to be conservative
2307 and just make the changes needed to fix the bug.
2313 * platform/ContextMenu.h: Added releasePlatformDescription.
2314 * platform/gdk/TemporaryLinkStubs.cpp: Added stub implementation.
2315 * platform/mac/ContextMenuMac.mm:
2316 (WebCore::ContextMenu::releasePlatformDescription): Implemented, though
2317 it's never called on this platform.
2318 * platform/qt/ContextMenuQt.cpp:
2319 (WebCore::ContextMenu::releasePlatformDescription): Ditto.
2320 * platform/win/ContextMenuItemWin.cpp:
2321 (WebCore::ContextMenuItem::setSubMenu): Call releasePlatformDescription
2322 since we need to take ownership of the HMENU.
2323 * platform/win/ContextMenuWin.cpp:
2324 (WebCore::ContextMenu::releasePlatformDescription): Implemented.
2326 2007-08-18 Maciej Stachowiak <mjs@apple.com>
2330 - fixed <rdar://problem/5198272> REGRESSION: PLT 1.5% slower due to r21367 (change to start frames with empty documents)
2332 There were three main cuases of extra time due to creating the initial empty document:
2334 1) Creating an extra WebHTMLView and swapping it for a new one for each frame created.
2335 2) Parsing the minimal markup for the initial document's contents.
2336 3) Clearing the Window object an extra time and dispatching the corresponding delegate method.
2338 The WebCore part of the fixes addresses 2 and 3.
2340 * loader/FrameLoader.cpp:
2341 (WebCore::FrameLoader::init): Don't parse "<html><body>" for the initial
2342 empty document; it turns out not to be needed.
2343 (WebCore::FrameLoader::dispatchWindowObjectAvailable): Don't
2344 dispatch the delegate if we haven't created a ScriptInterpreter yet.
2345 * bindings/js/kjs_proxy.cpp:
2346 (WebCore::KJSProxy::initScriptIfNeeded): Dispatch the window object
2347 delegate when we first create the interpreter, since that is now done
2349 * loader/FrameLoader.h:
2350 (WebCore::FrameLoader::committingFirstRealLoad): Helper for WebKit
2351 to know when to reuse a WebHTMLView.
2353 2007-08-19 Mitz Pettel <mitz@webkit.org>
2355 Reviewed by Adam Roben.
2357 - fix http://bugs.webkit.org/show_bug.cgi?id=15008
2358 ASSERTION FAILED: !firstLineBox() == !lastLineBox() setting content on image
2360 Test: fast/images/text-content-crash-2.html
2362 * html/HTMLImageLoader.cpp:
2363 (WebCore::HTMLImageLoader::setImage): Added a check that the renderer is an
2365 (WebCore::HTMLImageLoader::updateFromElement): Ditto.
2366 (WebCore::HTMLImageLoader::notifyFinished): Ditto.
2368 2007-08-17 Maciej Stachowiak <mjs@apple.com>
2372 - WebCore part of fix to scrollbar suppression hack for Leopard
2374 * loader/FrameLoader.cpp:
2375 (WebCore::FrameLoader::transitionToCommitted): Suppress scrollbars earlier, so it happens
2376 before any potential view swap.
2378 2007-08-17 Antti Koivisto <antti@apple.com>
2382 Fix <rdar://problem/5403773>
2383 CrashTracer: [USER] 88 crashes in Safari at com.apple.WebCore: WebCore::RenderTableSection::paint + 846
2385 * rendering/RenderBlock.cpp:
2386 (WebCore::RenderBlock::removePositionedObjects):
2388 Fix crash in http://www.infobae.com/interior/home.html
2389 Positioned objects removed from m_positionedObjects would in some cases not get added back to any
2390 positioned objects list. Adding objects happens in block layout but since layout was not invalidated
2391 correctly in removePositionedObjects() it would not get invoked. As a result some positioned objects
2392 would stay in layout dirty state leading to crashes and other bad things.
2394 * rendering/RenderTableSection.cpp:
2395 (WebCore::RenderTableSection::paint):
2397 Add needLayout() guard to eliminate this class of crashes from release builds.
2398 Assert commented out for now since one existing layout test can't handle it.
2400 2007-08-17 Kevin Decker <kdecker@apple.com>
2402 Code change by Darin, landed and reviewed by me.
2404 Fixed: <rdar://problem/5252836> Adobe Help Viewer: Japanese characters in the Help Tree structure are shown as garbage
2405 Added fast/encoding/namespace-tolerance.html test.
2407 * loader/TextResourceDecoder.cpp:
2408 (WebCore::TextResourceDecoder::checkForHeadCharset): Slightly loosen the charset decoder heuristic by tweaking it
2409 to ignore namespaces. This restores compatibility to documents which (1) use namespace prefixes on HTML elements
2410 (2) specify a non-latin charset and (3) contain non-latin characters.
2412 Added fast/encoding/namespace-tolerance.html test.
2414 2007-08-17 Anders Carlsson <andersca@apple.com>
2416 Reviewed by Dave Hyatt.
2418 <rdar://problem/5379040>
2419 REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes
2421 Instantiate plug-ins during the first layout instead of doing so when creating the renderer.
2422 This ensures that the plug-in widget will have a correct initial size.
2424 * html/HTMLEmbedElement.cpp:
2425 (WebCore::HTMLEmbedElement::getInstance):
2426 Force a layout if the plug-in doesn't have an instance.
2428 (WebCore::HTMLEmbedElement::attach):
2429 Pass true to updateWidget, causing it to only create a widget if it won't be a plug-in.
2431 * html/HTMLIFrameElement.cpp:
2432 (WebCore::HTMLIFrameElement::attach):
2433 Pass false to updateWidget, this will only create subframes anyway.
2435 * html/HTMLObjectElement.cpp:
2436 (WebCore::HTMLObjectElement::getInstance):
2437 Force a layout if the plug-in doesn't have an instance.
2439 (WebCore::HTMLObjectElement::attach):
2440 Pass true to updateWidget, causing it to only create a widget if it won't be a plug-in.
2442 * loader/FrameLoader.cpp:
2443 (WebCore::FrameLoader::loadPlugin):
2444 Get the size from the renderer and pass it to the client.
2446 * loader/FrameLoaderClient.h:
2447 * page/mac/WebCoreFrameBridge.h:
2448 * platform/graphics/svg/SVGImageEmptyClients.h:
2449 (WebCore::SVGEmptyFrameLoaderClient::createPlugin):
2450 Update declarations.
2452 * rendering/RenderPart.cpp:
2453 (WebCore::RenderPart::setWidget):
2454 No need to mark the renderer as dirty here.
2456 * rendering/RenderPartObject.h:
2457 * rendering/RenderPartObject.cpp:
2458 (WebCore::RenderPartObject::updateWidget):
2459 Add a parameter, onlyCreateNonPlugins. If this is true the widget
2460 will only be created if it's not a plug-in.
2462 (WebCore::RenderPartObject::layout):
2463 Call updateWidget here if m_widget is 0, causing the plug-in to be instantiated.
2465 2007-08-17 Oliver Hunt <oliver@apple.com>
2469 http://bugs.webkit.org/show_bug.cgi?id=14189
2470 <rdar://problem/5319511> REPRODUCIBLE CRASH: Canvas createPattern(canvas, ...) crashes on Windows (14189)
2472 Ensure that we actually retain the CG pattern correctly.
2474 Credit to Henry Mason <hmason@mac.com> for finding the cause of this.
2476 * html/CanvasPattern.cpp:
2477 (WebCore::CanvasPattern::~CanvasPattern):
2478 (WebCore::CanvasPattern::createPattern):
2479 * html/CanvasPattern.h:
2480 (WebCore::CanvasPattern::platformImage):
2482 2007-08-16 Geoffrey Garen <ggaren@apple.com>
2487 (WebCore::Cache::pruneLiveResources):
2488 (WebCore::Cache::pruneDeadResources):
2490 2007-08-16 Justin Garcia <justin.garcia@apple.com>
2492 Reviewed by Harrison.
2494 <rdar://problem/5378473>
2495 REGRESSION: Undoing a deletion that is part of an open typing command fails to reinsert the caret
2497 We recently made Undo of a series of deletes select all of the
2498 characters that were deleted, not just the most recently deleted
2499 character. But the code that did this set a new starting selection
2500 after every delete, even those that were part of an open typing
2501 command that started with character insertions or forward deletes,
2502 operations that when undone, remove the starting selection being
2503 set from the document.
2505 After this change we only set a new starting selection if the open typing
2506 command was opened by a backward delete. The new behavior matches TextEdit.
2507 We don't do something similar or forward deletes because TextEdit opens
2508 and closes a new typing command on forward delete (added a FIXME about this).
2510 * editing/TypingCommand.cpp:
2511 (WebCore::TypingCommand::TypingCommand): Initialize
2512 m_openedByBackwardDelete.
2513 (WebCore::TypingCommand::forwardDeleteKeyPressed): Added a FIXME about
2514 how in TextEdit, forward deletes open and close a new typing command.
2515 (WebCore::TypingCommand::doApply): Set m_openedByBackwardDelete
2517 (WebCore::TypingCommand::deleteKeyPressed): Only set the starting
2518 selection if this delete is the first one in an open typing command
2519 or one in a series of deletes that opened the typing command.
2520 * editing/TypingCommand.h: Added m_openedByBackwardDelete.
2522 2007-08-13 Geoffrey Garen <ggaren@apple.com>
2524 Reviewed by Dave Hyatt.
2526 Tweaked the cache eviction model to better balance between live and
2529 For the sake of avoiding evictions during the PLT, the old model
2530 required the sum of dead and live resources to grow to twice the cache
2531 capacity before evicting, and would then evict dead or live down to 0
2532 if necessary. This was a too-high high water mark, which would nullify
2533 much of the value of eviction, and a too-low low water mark, which
2534 would nullify much of the value of the LRU-SP strategy.
2536 This patch changes the model in 3 ways.
2538 1. The new model for dead resources is a flexible window with a fixed
2539 minimum and maximum. The dead resource window is big when live resource
2540 pressure is small, and vice versa. This has the immediate advantage of
2541 cutting the high water mark by up to 50%. It also enables the following
2542 tunable optimizations in future patches:
2543 a. A dead resource limit of 0 for clients who want that. (Just set
2544 the fixed maximum to 0.)
2545 b. A much higher low water mark. (Just set the fixed minimum to,
2546 say, 25% of the cache's capacity.)
2547 c. A much lower high water mark for users who browse simple pages
2548 in one tab. (Just set the fixed maximum to, say, 50% of the cache's
2551 I plan to make the changes that actually take advantage of these
2552 tunable optimizations in another check-in.
2554 The new model won't hurt the PLT because it will notice the PLT's low
2555 live resource size, and up the dead resource capacity in response. For
2556 the same reason, the new model should establish a good balance in
2559 2. Live resource eviction is now based on size(), not encodedSize().
2560 So, a page with lots of large, encoded images will start evicting
2561 resources, if necessary, even before all the images paint. This allows
2562 you to more accurately stipulate an exact high water mark.
2564 3. When pruning, prune to a small percentage below capacity, to avoid
2565 just having to prune again immediately.
2567 Layout tests pass. PLT shows no regression.
2569 * history/PageCache.cpp:
2570 (WebCore::PageCache::releaseAutoreleasedPagesNow): Updated for rename.
2572 * loader/Cache.cpp: Implemented the algorithm explained above.
2573 * loader/Cache.h: Removed explicit tracking of decoded data size, since
2576 * loader/CachedResource.cpp: ditto on tracking of decoded data size
2578 2007-08-16 Darin Adler <darin@apple.com>
2580 Reviewed by Tim Hatcher.
2582 - fix <rdar://problem/5415029> In Mail, a crash occurs at WebCore::Node::isDescendantOf()
2583 when attempting to delete a selection in a table
2585 The bug was caused by createMarkup trying to operate on a range that
2586 has an endpoint in the delete button DOM, because it removes that DOM
2587 during its operation! Still working on a regression test -- it's hard
2588 to make the kind of bad selection that's needed with the DOM, so I might
2589 have to use the eventSender.
2591 * editing/DeleteButtonController.h: Made some of the identifiers private.
2592 We can make them public if we need to use them. Added a getter function
2593 for the container element so we can figure out if a given node is inside
2594 the DOM added for the delete button.
2596 * editing/markup.cpp:
2597 (WebCore::moveEndpointsBeforeNode): Added. General purpose helper function
2598 that moves endpoints of a range to before a given node -- we do this before
2599 removing the delete button, so the endpoint is where the delete button was,
2600 rather than having an endpoint that's not in the document.
2601 (WebCore::createMarkup): Always return empty string, not null string.
2602 Get the document by calling ownerDocument on the range rather than getting
2603 the document of the commonAncestorContainer. That's because we need to
2604 get at the delete button before calling commonAncestorContainer. Call
2605 moveEndpointsBeforeNode to move the range endpoints out of the delete
2606 button interface before calling disable() which will remove it from the
2607 DOM if it's in there. Added an early return for the case where commonAncestor
2608 is non-0. If this happens, we would crash later because pastEndNode would
2609 not be in the tree. This change alone would prevent the crash, but we'd get
2610 bad markup, so we need the moveEndpointsBeforeNode fix. Added null checks
2611 for the frame to the range version as in the single-node version so this
2612 won't crash immediately on documents that are not in a frame. For the
2613 single-node version, added a check if a ndoe of 0 and a node inside the
2614 delete button user interface, and return the empty string for those cases.
2616 2007-08-16 Justin Garcia <justin.garcia@apple.com>
2620 <rdar://problem/5378847> After creating and removing a ToDo, the caret disappears as soon as I start to type
2622 * editing/InsertTextCommand.cpp:
2623 (WebCore::InsertTextCommand::input): A whitespace text node inserted by Mail
2624 when a ToDo is removed is completely removed by deleteInsignificantWhitespace,
2625 and since it contains the text insertion position, insertion fails.
2626 Save the position before the node where text insertion will occur,
2627 and if that node is removed, use the saved position for insertion.
2629 2007-08-16 Darin Adler <darin@apple.com>
2633 - fix <rdar://problem/5413488> REGRESSION: every DOM element is about 40
2634 bytes bigger because it has a Timer
2636 Moved the timer to the document from the element.
2638 * dom/Document.h: Made frame() inline. Added updateFocusApperanceSoon(),
2639 cancelFocusAppearanceUpdate(), m_updateFocusAppearanceTimer,
2640 clearXMLVersion(), and updateFocusAppearanceTimerFired(). Also made
2641 everything that was previously protected be private instead.
2643 (WebCore::Document::Document): Initialize m_updateFocusAppearanceTimer.
2644 (WebCore::Document::updateFocusAppearanceSoon): Added. Starts timer.
2645 (WebCore::Document::cancelFocusAppearanceUpdate): Added. Stops timer.
2646 (WebCore::Document::updateFocusAppearanceTimerFired): Added. If the
2647 focused node is a focusable element, then calls
2648 updateFocusAppearance(false) on it.
2650 * dom/Element.h: Removed default value of the boolean parameter to
2651 updateFocusAppareance. Removed needsFocusAppearanceUpdate(),
2652 setNeedsFocusAppearanceUpdate(), updateFocusAppearanceTimerFired(),
2653 stopUpdateFocusAppearanceTimer(), m_updateFocusAppearanceTimer, and
2654 m_needsFocusAppearanceUpdate. Added
2655 updateFocusAppearanceSoonAfterAttach() and cancelFocusAppearanceUpdate().
2657 (WebCore::ElementRareData::ElementRareData): Added initializer for
2658 m_needsFocusAppearanceUpdateSoonAfterAttach.
2659 (WebCore::Element::Element): Removed initializers for
2660 m_updateFocusAppearanceTimer and m_needsFocusAppearanceUpdate.
2661 (WebCore::Element::attach): Updated code that starts the focus
2662 appearance timer to instead call updateFocusAppearanceSoon() on the
2664 (WebCore::Element::detach): Replaced call to
2665 stopUpdateFocusAppearanceTimer with call to cancelFocusAppearanceUpdate.
2666 (WebCore::Element::focus): Added check for node that's already focused,
2667 to match the logic that's in the derived classes. This makes it safe for
2668 us to remove the override in the derived classes. Also replaced the code
2669 that called setNeedsFocusAppearanceUpdate(true) with code to set the
2670 rare data flag m_needsFocusAppearanceUpdateSoonAfterAttach and added a
2671 call to cancelFocusAppearanceUpdate() in the case where there's no focus
2673 (WebCore::Element::blur): Replaced call to
2674 stopUpdateFocusAppearanceTimer with call to cancelFocusAppearanceUpdate.
2675 (WebCore::Element::cancelFocusAppearanceUpdate): Added. Sets
2676 m_needsFocusAppearanceUpdateSoonAfterAttach to false, and then calls
2677 cancelFocusAppearanceUpdate() on the document, but only if the element
2678 is the focused node of the document.
2680 * html/HTMLDocument.cpp:
2681 (WebCore::HTMLDocument::HTMLDocument): Replaced code that sets
2682 m_xmlVersion directly with a call to a new inline clearXMLVersion()
2684 (WebCore::HTMLDocument::setCookie): Replaced use of m_policyBaseURL with
2686 (WebCore::HTMLDocument::createTokenizer): Replaced uses of m_frame with
2688 (WebCore::HTMLDocument::determineParseMode): Replaced code that sets
2689 pMode and hMode directly with calls to setParseMode and setHTMLMode.
2690 Replaced use of m_styleSelector with styleSelector().
2692 * html/HTMLInputElement.h: Removed now-unneed override of focus().
2693 Removed default value of the boolean parameter to updateFocusAppareance.
2694 * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateFocusAppearance):
2695 Pass the restorePreviousSelection boolean through -- while it's ignored,
2696 it no longer has a default value.
2698 * html/HTMLTextAreaElement.h: Removed now-unneed override of focus().
2699 Removed default value of the boolean parameter to updateFocusAppareance.
2700 * html/HTMLTextAreaElement.cpp: Ditto.
2702 * WebCore.exp: Removed the Document::frame() symbol, since it's now inline.
2704 2007-08-15 Antti Koivisto <antti@apple.com>
2708 Fix <rdar://problem/5388936>
2709 Crash while setting display:none for a table cell with selection
2711 Super class destroy() could (through some selection code in removeChild()) trigger section recalc
2712 in middle of RenderTableCell::destroy(), cleaning section dirty bit. This would later crash in
2713 layout since cell grid would still have refence to the dead cell.
2715 Ensure table sections are dirty when leaving destroy method.
2717 I can't figure out tests for row and section changes but they look like
2718 they could crash in similar way as cell.
2720 * rendering/RenderTableCell.cpp:
2721 (WebCore::RenderTableCell::destroy):
2722 * rendering/RenderTableRow.cpp:
2723 (WebCore::RenderTableRow::destroy):
2724 * rendering/RenderTableSection.cpp:
2725 (WebCore::RenderTableSection::destroy):
2727 2007-08-15 Maciej Stachowiak <mjs@apple.com>
2731 <rdar://problem/5389696> leak of 32-byte NSData object (and more?) in WebIconDatabase code path with each refresh of http://www.apple.com
2733 * platform/graphics/BitmapImage.h: Use RetainPtr for m_nsImage and m_tiffRep
2734 * platform/graphics/mac/ImageMac.mm:
2735 (WebCore::BitmapImage::initPlatformData): No need to do anything now
2736 (WebCore::BitmapImage::invalidatePlatformData): Simplify
2737 (WebCore::BitmapImage::getTIFFRepresentation): Use RetainPtr to avoid leaks
2738 (WebCore::BitmapImage::getNSImage): Use RetainPtr to avoid leaks
2740 2007-08-15 Darin Adler <darin@apple.com>
2744 - fix <rdar://problem/5094895> REGRESSION (r19094): JavaScript timers don't
2745 work inside showModalDialog; caret also doesn't blink
2747 * platform/Timer.h: Added fireTimersInNestedEventLoop.
2748 * platform/Timer.cpp:
2749 (WebCore::TimerBase::fireTimers): Added code to exit if the timersReadyToFire
2750 is cleared. This indicates that someone fired the timers in the nested event
2751 loop, so we should not fire any more timers ourselves.
2752 (WebCore::TimerBase::fireTimersInNestedEventLoop): Added. Sets timersReadyToFire
2753 to 0 so we won't return early and do nothing if the shared timer first. Then
2754 calls updateSharedTimer() so the shared timer will get scheduled as needed based
2755 on any pending timers.
2757 * page/Chrome.cpp: (WebCore::Chrome::runModal): Call
2758 fireTimersInNestedEventLoop before calling runModal on the client.
2760 * manual-tests/modal-dialog.html: Added a test that uses a timeout.
2761 * manual-tests/show-modal-dialog-test.html: Fixed a typo.
2763 2007-08-15 Justin Garcia <justin.garcia@apple.com>
2767 http://bugs.webkit.org/show_bug.cgi?id=14971
2768 REGRESSION: cannot select reporter's e-mail in bugzilla
2770 * page/EventHandler.cpp:
2771 (WebCore::EventHandler::canMouseDragExtendSelect): Allow drag-selecting inside
2772 a -webkit-user-select:ignore region.
2774 2007-08-15 Beth Dakin <bdakin@apple.com>
2778 Rolling back in. I made a silly mistake in XMLTokenizer that caused
2779 this patch to crash SVG tests. It's fixed now!
2781 Refactor of change for <rdar://problem/5404899> REGRESSION: Mail
2782 crash in WebCore::FontFallbackList::fontDataAt() after dragging
2783 image into text multiple times
2785 The original fix that I made last night prevents the pending style
2786 sheet count from being incremented until the element is in the
2787 document. This fix prevents the style sheet from loading at all
2788 until it is in the document.
2791 * dom/StyleElement.cpp:
2792 (WebCore::StyleElement::insertedIntoDocument): Call process.
2793 (WebCore::StyleElement::removedFromDocument): This can be reverted
2794 to its original state before my patch last night.
2795 (WebCore::StyleElement::process): childrenChanged is now called
2796 process. Return early if your not in the document.
2797 (WebCore::StyleElement::createSheet): Revert change from last
2798 night. The inDocument check is now in caller childrenChanged.
2799 * dom/StyleElement.h: insertedIntoDocument() must now accept an
2800 element in addition to a document.
2802 This is an optimization to prevent calling updateStyleSelector()
2804 * dom/XMLTokenizer.cpp:
2805 (WebCore::XMLTokenizer::startElementNs):
2806 * html/HTMLStyleElement.cpp:
2807 (WebCore::HTMLStyleElement::HTMLStyleElement):
2808 (WebCore::HTMLStyleElement::finishedParsing):
2809 (WebCore::HTMLStyleElement::insertedIntoDocument):
2810 (WebCore::HTMLStyleElement::childrenChanged):
2811 (WebCore::HTMLStyleElement::sheetLoaded):
2812 * html/HTMLStyleElement.h:
2813 * ksvg2/svg/SVGStyleElement.cpp:
2814 (WebCore::SVGStyleElement::SVGStyleElement):
2815 (WebCore::SVGStyleElement::finishedParsing):
2816 (WebCore::SVGStyleElement::insertedIntoDocument):
2817 (WebCore::SVGStyleElement::childrenChanged):
2818 (WebCore::SVGStyleElement::sheetLoaded):
2819 * ksvg2/svg/SVGStyleElement.h:
2820 (WebCore::SVGStyleElement::setCreatedByParser):
2822 This is a name change. Document::stylesheetLoaded()
2823 is now Document::removePendingSheet()
2825 (WebCore::Document::removePendingSheet):
2827 * dom/ProcessingInstruction.cpp:
2828 (WebCore::ProcessingInstruction::sheetLoaded):
2829 * html/HTMLLinkElement.cpp:
2830 (WebCore::HTMLLinkElement::~HTMLLinkElement):
2831 (WebCore::HTMLLinkElement::setDisabledState):
2832 (WebCore::HTMLLinkElement::process):
2833 (WebCore::HTMLLinkElement::sheetLoaded):
2835 (WebCore::UserStyleSheetLoader::~UserStyleSheetLoader):
2836 (WebCore::UserStyleSheetLoader::setCSSStyleSheet):
2838 This is another name change. closeRenderer() is now
2841 (WebCore::Node::finishedParsing):
2842 * dom/XMLTokenizer.cpp:
2843 (WebCore::XMLTokenizer::endElementNs):
2845 * html/HTMLAppletElement.cpp:
2846 (WebCore::HTMLAppletElement::finishedParsing):
2847 * html/HTMLAppletElement.h:
2848 * html/HTMLGenericFormElement.cpp:
2849 (WebCore::HTMLFormControlElementWithState::finishedParsing):
2850 * html/HTMLGenericFormElement.h:
2851 * html/HTMLObjectElement.cpp:
2852 (WebCore::HTMLObjectElement::finishedParsing):
2853 * html/HTMLObjectElement.h:
2854 * html/HTMLParser.cpp:
2855 (WebCore::HTMLParser::insertNode):
2856 (WebCore::HTMLParser::popOneBlockCommon):
2857 * html/HTMLScriptElement.cpp:
2858 (WebCore::HTMLScriptElement::finishedParsing):
2859 * html/HTMLScriptElement.h:
2860 (WebCore::HTMLStyleElement::setCreatedByParser):
2861 * ksvg2/svg/SVGAnimationElement.cpp:
2862 (WebCore::SVGAnimationElement::finishedParsing):
2863 * ksvg2/svg/SVGAnimationElement.h:
2864 * ksvg2/svg/SVGElement.cpp:
2865 (WebCore::SVGElement::finishedParsing):
2866 * ksvg2/svg/SVGElement.h:
2868 2007-08-15 David Harrison <harrison@apple.com>
2870 Reviewed by Antti Koivisto.
2872 <rdar://problem/5411803> Bumpercar crashes when loading a partial URL (FrameLoader::receivedMainResourceError())
2874 * loader/MainResourceLoader.cpp:
2875 (WebCore::MainResourceLoader::receivedError):
2876 Nil check for the FrameLoader.
2878 2007-08-14 Steve Falkenburg <sfalken@apple.com>
2880 <rdar://problem/5411482> Windows user agent language always returns "en"
2882 Implement defaultLanguage().
2886 * WebCore.vcproj/WebCore.vcproj: Added Language.cpp.
2887 * platform/win/Language.cpp: Added.
2888 (WebCore::localeInfo): Added.
2889 (WebCore::defaultLanguage): Added.
2890 * platform/win/TemporaryLinkStubs.cpp: Remove defaultLanguage stub.
2892 2007-08-14 Sam Weinig <sam@webkit.org>
2894 Reviewed by Geoff and Oliver.
2896 Fix for <rdar://problem/5267870>
2897 Mangleme: Reproducible assertion failure in -[WebCoreFrameBridge installInFrame:]
2899 - Change embed/plugin code path to detach the frame on willRemove instead of detach.
2900 This matches what frame and iframe do.
2902 Test: http/tests/misc/embedCrasher.html
2904 * html/HTMLPlugInElement.cpp:
2905 (WebCore::HTMLPlugInElement::willRemove):
2906 * html/HTMLPlugInElement.h:
2908 2007-08-14 Adele Peterson <adele@apple.com>
2912 Fix for <rdar://problem/5370059> REGRESSION: Cannot type into edit fields on a form (sccsheriff.org)
2914 This change makes -webkit-user-select an inherited css property. For "user-select: none" we were already
2915 acting like it was an inheritable property, where we let user-select:text on the children override its parent's user-select:none.
2916 By making user-select really inherited (instead of inherited for some values), we eliminate the need for crawling up the tree to see
2917 if an ancestor has user-select ignore set.
2919 * page/EventHandler.cpp: (WebCore::EventHandler::canMouseDownStartSelect):
2920 Now that user-select is inherited, you don't need to walk up the render tree looking for ancestors with user-select:ignore set.
2922 * css/CSSStyleSelector.cpp: Eliminate SELECT_AUTO.
2923 (WebCore::CSSStyleSelector::adjustRenderStyle):
2924 (WebCore::CSSStyleSelector::applyProperty):
2925 * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2927 * rendering/RenderStyle.h:
2928 (WebCore::): Eliminate SELECT_AUTO. Make userSelect inherited.
2929 (WebCore::RenderStyle::userSelect):
2930 (WebCore::RenderStyle::setUserSelect):
2931 (WebCore::RenderStyle::initialUserSelect):
2932 * rendering/RenderStyle.cpp:
2933 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2934 (WebCore::StyleRareNonInheritedData::operator==):
2935 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2936 (WebCore::StyleRareInheritedData::operator==):
2937 (WebCore::RenderStyle::diff):
2939 2007-08-15 Peter Kasting <zerodpx@gmail.org>
2943 http://bugs.webkit.org/show_bug.cgi?id=14967 part 1 - Eliminate most implicit
2944 conversions of wtf::Vector<T> to T* by explicitly calling .data()
2946 * html/HTMLSelectElement.cpp:
2947 (WebCore::HTMLSelectElement::saveState):
2948 * platform/KURL.cpp:
2949 (WebCore::KURL::KURL):
2950 (WebCore::KURL::init):
2951 (WebCore::KURL::decode_string):
2952 (WebCore::KURL::parse):
2953 (WebCore::KURL::encode_string):
2954 * platform/cf/KURLCFNet.cpp:
2955 (WebCore::KURL::KURL):
2956 * platform/mac/KURLMac.mm:
2957 (WebCore::KURL::KURL):
2958 * rendering/RenderFrameSet.cpp:
2959 (WebCore::RenderFrameSet::layOutAxis):
2961 2007-08-14 Ricci Adams <iccir@apple.com>
2963 Reviewed by Darin, Hyatt.
2965 - fix <rdar://problem/5407795> -apple-line-clamp should never display less than one line
2967 * rendering/RenderFlexibleBox.cpp:(WebCore::RenderFlexibleBox::layoutVerticalBox): Use
2968 max to make sure it never computes a minimum of less than one line.
2970 2007-08-14 Brady Eidson <beidson@apple.com>
2972 Reviewed by Darin, John, Maciej, Oliver, and Tim
2974 <rdar://problem/5394708> - Crash on launch with corrupt icon database
2976 The main part of the fix is to not disable SQLite's default level of protection - to leave the sync options at their normal,
2979 But in case lightning strikes at the exact right moment and someone ends up with a corrupt database, add some support code to
2980 detect that condition and recover from it.
2982 This is mainly accomplished by exposing the "PRAGMA integrity_check;" facilities of sqlite through IconDatabase SPI as well as
2983 running that integrity check if a journal file is detected at launch (a strong indication that the last quit was not clean).
2984 There's also a method exposed to allow clients to tell the icon database "I suspect something bad happened, please check integrity"
2986 * loader/icon/IconDatabase.cpp:
2987 (WebCore::IconDatabase::checkIntegrityBeforeOpening): Allow clients to suggest an integrity check
2988 (WebCore::IconDatabase::open): Add a check to see if the journal file for the database exists. If it does, run the integrity
2989 check. Also run the check if a client has suggested it to be necessary.
2990 If the integrity-check fails, we sadly have to destroy the database and recreate from scratch.
2991 Also - quite importantly - do not adjust the default sync preferences for the SQLDatabase. They were an optimization that
2992 might have been valid at one time but no longer affects any benchmarks we care about.
2993 (WebCore::IconDatabase::checkIntegrity): Perform the SQLite integrity_check pragma
2994 * loader/icon/IconDatabase.h:
2996 * loader/icon/IconDatabaseNone.cpp:
2997 (WebCore::IconDatabase::checkIntegrity): Keep IconDatabaseNone users building
2998 (WebCore::IconDatabase::checkIntegrityBeforeOpening): Ditto
3000 * loader/icon/SQLDatabase.cpp:
3001 (WebCore::SQLDatabase::open): Make a copy of the path string so we don't accidentally mutate anyone else's string on ::close()
3003 * platform/FileSystem.h: Added. Begin a long-needed platform file system abstraction
3004 * platform/mac/FileSystemMac.mm: Added.
3005 (WebCore::fileExists): Check if a file exists
3006 (WebCore::deleteFile): Delete a file
3008 * platform/gdk/TemporaryLinkStubs.cpp:
3009 (WebCore::fileExists):
3010 (WebCore::deleteFile):
3011 * platform/qt/TemporaryLinkStubs.cpp:
3012 (WebCore::fileExists):
3013 (WebCore::deleteFile):
3014 * platform/win/TemporaryLinkStubs.cpp:
3015 (WebCore::fileExists):
3016 (WebCore::deleteFile):
3019 * WebCore.xcodeproj/project.pbxproj:
3021 2007-08-14 Jon Honeycutt <jhoneycutt@apple.com>
3025 Build fix for Windows.
3027 * html/HTMLFormElement.cpp:
3029 2007-08-14 George Staikos <staikos@kde.org>
3031 Only connect the menu signal once.
3033 * platform/qt/ContextMenuQt.cpp:
3034 (WebCore::ContextMenu::ContextMenu):
3035 (WebCore::ContextMenu::insertItem):
3037 2007-08-14 Justin Garcia <justin.garcia@apple.com>
3041 <rdar://problem/5408255> REGRESSION: In Mail, clicking the containing element's UI closebox doesn't delete element
3043 * editing/DeleteButtonController.cpp:
3044 (WebCore::DeleteButtonController::show): Use -webkit-user-select:ignore for
3047 2007-08-14 Antti Koivisto <antti@apple.com>
3051 Fix <rdar://problem/5143183>
3052 Air Mail postmark shows up wrong in Firefox due to use of CSS background-position-x/y
3054 Safari was using non-standard background-position-x/y properties when serializing style, both normal
3055 and computed. As a result Safari generated CSS would not render correctly in Firefox.
3057 Use standard background-position property instead.
3059 * css/CSSComputedStyleDeclaration.cpp:
3061 * css/CSSMutableStyleDeclaration.cpp:
3062 (WebCore::CSSMutableStyleDeclaration::cssText):
3064 2007-08-14 Sam Weinig <sam@webkit.org>
3066 Reviewed by Brady and Dr. Harrison.
3068 Fix typo. 'whitespace' property is spelled 'white-space'.
3070 * page/inspector/inspector.css:
3072 2007-08-13 Beth Dakin <bdakin@apple.com>
3076 Fix for <rdar://problem/5404899> REGRESSION: Mail crash in
3077 WebCore::FontFallbackList::fontDataAt() after dragging image into
3080 We were crashing because style information was not up-to-date. This
3081 patch fixes the problem in two ways:
3083 Style information was not up to date at the time of the crash
3084 because the document thought there was still a pending style sheet.
3085 The pending style sheet counter was incremented when a call to
3086 cloneNode from Mail cloned a style node with an imported style
3087 sheet. Because Mail disables the cache, the style sheet did not
3088 load immediately for the cloned node, and we do not check again to
3089 see if it has loaded in time to decrement the pending style sheet
3090 counter before the crash point. The fix here is only to increment
3091 the pending style sheet counter for elements that are already in
3093 * dom/StyleElement.cpp:
3094 (WebCore::StyleElement::insertedIntoDocument): If we have a CSS
3095 style sheet that is currently loading, increment the pending style
3096 sheet counter. This should keep the counter accurate in the case
3097 where a style node is cloned and then immediately inserted into the
3099 (WebCore::StyleElement::removedFromDocument): If we have a CSS
3100 style sheet that is currently loading, decrement the pending style
3101 sheet count. This is required to keep the correct balance, given
3103 (WebCore::StyleElement::createSheet): Only addPendingSheet() and
3104 checkLoaded() if we are in the document.
3106 Here is Darin's original fix. It seems worth keeping this fix too.
3107 Font style information should not cause a crash if there are still
3108 pending style sheets. This is good belt-and-suspenders in case
3109 there is another way to run into this bug with a wacky timing
3111 * css/CSSStyleSelector.cpp:
3112 (WebCore::CSSStyleSelector::styleForElement): Update the font.
3114 2007-08-13 Alexey Proskuryakov <ap@webkit.org>
3118 http://bugs.webkit.org/show_bug.cgi?id=14635
3119 rdar://problem/5340188
3120 Uploading file with non-ASCII character in path fails
3122 File upload cannot be tested in DumpRenderTree.
3124 * html/HTMLFormElement.cpp:
3125 (WebCore::pathGetFilename): A cross-platform helper that extracts a file name from a path.
3126 (WebCore::HTMLFormElement::formData): Use the above helper instead of code that doesn't
3129 2007-08-13 Alexey Proskuryakov <ap@webkit.org>
3133 http://bugs.webkit.org/show_bug.cgi?id=14951
3134 REGRESSION: page interpreted as UTF-8 because of stray <?xml> after <head>
3136 Test: fast/encoding/misplaced-xml-declaration.html
3138 * loader/TextResourceDecoder.cpp:
3139 (WebCore::TextResourceDecoder::checkForHeadCharset): Only honor XML declaration
3140 at the very beginning of the file.
3142 2007-08-13 Oliver Hunt <oliver@apple.com>
3146 Correct accidentally modified code.
3148 * platform/mac/FontDataMac.mm:
3149 (WebCore::FontData::platformInit):
3151 2007-08-13 Adele Peterson <adele@apple.com>
3155 Fix for http://bugs.webkit.org/show_bug.cgi?id=14746
3156 <rdar://problem/5401041> REGRESSION: Form state not saved for forms that submit via HTTPS even if they do not contain a password field
3158 * loader/FrameLoader.cpp: (WebCore::FrameLoader::saveDocumentState): Restore our old behavior that will save form state for secure forms.
3159 This will also match Firefox behavior.
3161 * dom/Document.cpp: Removed secureFormAdded(), secureFormRemoved(), hasSecureForm() which are no longer used.
3163 * html/HTMLFormElement.cpp:
3164 (WebCore::HTMLFormElement::attach):
3165 (WebCore::HTMLFormElement::parseMappedAttribute):
3167 2007-08-13 Oliver Hunt <oliver@apple.com>
3171 <rdar://problem/5386183> REGRESSION (9A504-9A508): Underline of inline hole is too thin
3172 on Japanese DotMac page
3174 Hack the line metrics for the Hiragino font families so that they always allow space for
3175 the marked text underline.
3177 * platform/mac/FontDataMac.mm:
3178 (WebCore::FontData::platformInit):
3180 2007-08-13 David Hyatt <hyatt@apple.com>
3184 <rdar://problem/5400446> messed up content on calendar.yahoo.com and my.yahoo.com
3186 Fix some more bad assumptions about <html> being the first child of the document now that we
3187 properly support HTML5's model (where a comment node preceding <html> will in fact be its sibling).
3189 * html/HTMLParser.cpp:
3190 (WebCore::HTMLParser::handleError):
3191 (WebCore::HTMLParser::createHead):
3193 2007-08-13 Justin Garcia <justin.garcia@apple.com>
3197 <rdar://problem/5333725> -webkit-user-select: none makes selection difficult
3199 Let users create selections if they mouse down in a -webkit-user-select:none
3200 region, just (continue to) disallow selection endpoints in those regions, and
3201 don't paint those regions as selected if they are fully enclosed by a selection.
3202 For example, in xxyyyxx where x is -webkit-user-select:none, a user can mouse down
3203 between the first two xs and drag across yyy to the second two xs to create a
3204 selection xx^yyy^xx.
3206 * editing/SelectionController.cpp:
3207 (WebCore::SelectionController::selectAll): Allow selectAll inside a root
3208 that has -webkit-user-select:none, because it may contain content that
3209 is selectable (VisiblePosition and Selection creation will keep Selection
3210 endpoints out of -webkit-user-select:none regions).
3211 * page/EventHandler.cpp:
3212 (WebCore::EventHandler::selectClosestWordFromMouseEvent): Use canMouseDownStartSelect
3213 instead of the ambiguously named shouldSelect().
3214 (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
3215 (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
3216 (WebCore::EventHandler::updateSelectionForMouseDrag): Use canMouseDragExtendSelect.
3217 (WebCore::EventHandler::selectCursor): Paint an ibeam in -webkit-user-select:none regions,
3218 because you can click in those regions to create a selection.
3219 (WebCore::EventHandler::canMouseDownStartSelect): Now fires the selectStart event, and
3220 returns true in -webkit-user-select: none regions.
3221 (WebCore::EventHandler::canMouseDragExtendSelect): This is identical to
3222 canMouseDownStartSelect because of 12823, even though it seems strange that we would fire
3223 the selectStart event here.
3224 * page/EventHandler.h:
3225 * rendering/RenderObject.cpp:
3226 (WebCore::RenderObject::draggableNode): Only -webkit-user-select:ignore regions will
3227 prevent selection creation.
3228 * rendering/RenderObject.h:
3230 2007-08-13 Anders Carlsson <andersca@apple.com>
3234 <rdar://problem/5360748>
3235 REGRESSION (r21002-r21003): Flash widget sniffer doesn't work (affects iWeb)
3237 Don't check whether the document is being parsed or not, because the node list
3238 could be accessed after the document has finished parsing.
3241 (WebCore::Node::registerNodeList):
3243 2007-08-13 Lars Knoll <lars@trolltech.com>
3247 no need to update regions that are not visible on the webpage.
3249 * platform/qt/ScrollViewQt.cpp:
3250 (WebCore::ScrollView::updateContents):
3252 2007-08-12 Maciej Stachowiak <mjs@apple.com>
3254 Reviewed by Darin and Sam.
3256 <rdar://problem/5395213> cross-domain access to individual components of location object should be denied.
3258 * bindings/js/kjs_window.cpp:
3259 (KJS::Location::put): Add the appropriate cross-domain access checks.
3261 2007-08-12 Darin Adler <darin@apple.com>
3263 Reviewed by John Sullivan.
3265 - fix <rdar://problem/5403724> REGRESSION: text inputs are not scrolled to make inline input visible (14912)
3267 * editing/Editor.h: Made setIgnoreMarkedTextSelectionChange no longer inline.
3268 It now has a side effect of revealing the selection when you set it to false.
3269 Added private revealSelectionAfterEditingOperation helper.
3270 * editing/Editor.cpp:
3271 (WebCore::Editor::deleteRange): Calls revealSelectionAfterEditingOperation instead
3272 of calling m_frame->revealSelection directly.
3273 (WebCore::Editor::replaceSelectionWithFragment): Ditto.
3274 (WebCore::Editor::insertOrderedList): Ditto.
3275 (WebCore::Editor::insertUnorderedList): Ditto.
3276 (WebCore::Editor::increaseSelectionListLevel): Ditto.
3277 (WebCore::Editor::increaseSelectionListLevelOrdered): Ditto.
3278 (WebCore::Editor::increaseSelectionListLevelUnordered): Ditto.
3279 (WebCore::Editor::decreaseSelectionListLevel): Ditto.
3280 (WebCore::Editor::insertLineBreak): Ditto.
3281 (WebCore::Editor::insertParagraphSeparator): Ditto.
3282 (WebCore::Editor::replaceMarkedText): Ditto.
3283 (WebCore::Editor::revealSelectionAfterEditingOperation): Added. Calls revealSelection,
3284 unless we are in the ignoreMarkedTextSelectionChange state. If we are in that state,
3285 we're in the middle of a composite editing operation and we shouldn't try to scroll
3286 to reveal the selection until the operation is done.
3287 (WebCore::Editor::setIgnoreMarkedTextSelectionChange): Made no longer inline. If
3288 changing the state from true to false, then calls revealSelectionAfterEditingOperation.
3290 * WebCore.exp: Add new entry point for no-longer-inline setter function.
3292 2007-08-12 Geoffrey Garen <ggaren@apple.com>
3294 Reviewed by Maciej Stachowiak, Dave Hyatt.
3296 Changed the dead resource LRU-SP algorithm to measure an object's
3297 total size, not just its encoded size. This will allow us to make
3298 better decisions about what data to evict when the cache is small. For
3299 example, the PLT can now run with a 16MB cache without fully evicting
3302 (Previously, we had assumed that decoded size would be an OK estimate
3303 of encoded size, but that is not true of GIF, whose decoded size can be
3304 orders of magnitude greater than its encoded size.)
3306 Subtly, destroying a resource's decoded data now increases its recency
3307 by moving it to the head of a smaller LRU list. This is slightly odd,
3308 but, since all resources get the same treatment, it shouldn't hurt
3309 the eviction algorithm.
3311 * history/PageCache.cpp:
3312 (WebCore::PageCache::releaseAutoreleasedPagesNow): Make sure that a
3313 dead resource eviction doesn't happen until we've released all of our
3314 dead pages. Otherwise, the cache will make terrible decisions about
3315 what to evict because all of our dead resources will seem live.
3318 (WebCore::Cache::Cache):
3319 (WebCore::Cache::pruneLiveResources):
3320 (WebCore::Cache::pruneDeadResources): Removed call to
3321 removeFromLiveDecodedResourcesList because this happens automatically
3322 now as a part of the process of changing the resource's decoded size.
3323 (WebCore::Cache::lruListFor): *** The key change. *** Compute the
3324 appropriate LRU list based on total size, not encoded size.
3325 (WebCore::Cache::dumpLRULists): Added debug logging function to help
3326 visualize the cache.
3329 (WebCore::Cache::setDeadResourcePruneEnabled):
3330 (WebCore::Cache::deadResourcePruneEnabled):
3332 * loader/CachedImage.cpp: Moved decoded size tracking code from here
3333 up into the base class. Currently, only CachedImage has a use for that
3334 functionality, but other subclasses might need it in the future, and
3335 the base class is already responsible for similar code related to
3336 encoded size tracking.
3337 (WebCore::CachedImage::decodedSizeChanged):
3338 * loader/CachedImage.h:
3340 * loader/CachedResource.cpp:
3341 (WebCore::CachedResource::CachedResource):
3342 (WebCore::CachedResource::setDecodedSize): Move us in the LRU-SP list
3343 just like setEncodedSize does, since decoded size counts now, too.
3344 (WebCore::CachedResource::setEncodedSize): Changed slightly to match
3345 the style of setDecodedSize.
3347 * loader/CachedResource.h:
3348 (WebCore::CachedResource::decodedSize):
3350 2007-08-11 Mitz Pettel <mitz@webkit.org>
3354 - fix http://bugs.webkit.org/show_bug.cgi?id=13670
3355 <rdar://problem/5399619> Table misrender when one of the TDs has width=100%
3357 Tests: fast/table/100-percent-cell-width.html
3358 fast/table/percent-widths-stretch.html
3360 * rendering/AutoTableLayout.cpp:
3361 (WebCore::AutoTableLayout::calcPrefWidths): Changed the value used instead of
3362 0% to avoid division by zero from 1% to less than 0.01%. Removed code that
3363 added 0.5px to non-percent widths when calculating the scaling factor. The
3364 latter change is covered by the percent-widths-stretch test, where the new
3365 results match both WinIE 7 and Firefox 3.
3367 2007-08-11 Darin Adler <darin@apple.com>
3371 - fix <rdar://problem/5266535> REGRESSION: <img> inside <map> no longer allowed in strict mode
3372 (breaks chemicalelements.com)
3374 Test: fast/parser/strict-img-in-map.html
3376 * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::checkDTD): Removed FIXME saying this
3377 code is strange, since this code matches the HTML 4 specification almost exactly. Made
3378 <img> elements allowed even in strict mode and added small comments to clarify what comes
3379 from the DTD and what is non-standard.
3381 2007-08-11 Holger Hans Peter Freyther <zecke@selfish.org>
3385 Implement passing events to a subframe. The code is copied from
3386 the windows port and passSubframeEventToSubframe was removed as it
3387 is not called and it is not avilable in the windows port as well.
3389 * page/gdk/EventHandlerGdk.cpp:
3390 (WebCore::EventHandler::passMousePressEventToSubframe):
3391 (WebCore::EventHandler::passMouseMoveEventToSubframe):
3392 (WebCore::EventHandler::passMouseReleaseEventToSubframe):
3394 2007-08-11 Holger Hans Peter Freyther <zecke@selfish.org>
3398 GdkEventKey::string is not supposed to be used. The length
3399 of this string is zero for non ascii characters. Use the
3400 gdk_unicode_to_keyval to convert the keyval to a UChar and construct
3401 a String. This change makes it possible to input non ascii
3404 * platform/gdk/KeyEventGdk.cpp:
3405 (WebCore::keyIdentifierForGdkKeyCode):
3406 (WebCore::singleCharacterString):
3407 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3409 2007-08-11 Andrew Wellington <proton@wiretapped.net>
3411 Reviewed by Mark Rowe.
3413 Fix http://bugs.webkit.org/show_bug.cgi?id=14645
3414 getPropertyValue should be case insensitive
3416 When we get the propertyID for a given string we convert to lowercase.
3418 This also applies to setProperty, removeProperty and others.
3420 * css/CSSStyleDeclaration.cpp:
3421 (WebCore::propertyID):
3423 2007-08-11 Mark Rowe <mrowe@apple.com>
3425 Build fix. Change "#ifdef PLATFORM(GDK)" to "#if PLATFORM(GDK)".
3427 * page/FrameView.cpp:
3430 2007-08-11 Holger Hans Peter Freyther <zecke@selfish.org>
3434 Copy the WebFrame::layoutIfNeededRecursive method of the windows port
3435 to FrameView to be used by the Gtk+ port. Simplify the implementation due
3436 moving it to the FrameView class.
3438 Implement the ScrollView::children() method for the Gtk+ port and make it
3439 available to the FrameView as children() is used within the layoutIfNeededRecursive method.
3441 * page/FrameView.cpp:
3442 (WebCore::FrameView::layoutIfNeededRecursive):
3444 * platform/ScrollView.h:
3445 * platform/gdk/ScrollViewGdk.cpp:
3447 2007-08-11 Holger Hans Peter Freyther <zecke@selfish.org>
3451 To fix text selection make the PlatformMouseEvent set the pressed
3452 button even when moving the mouse.
3454 Add building of the WebKit::DragClient stubs as they are needed to
3455 make text selection work.
3458 * platform/gdk/MouseEventGdk.cpp:
3459 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3461 2007-08-10 Anders Carlsson <andersca@apple.com>
3463 Reviewed by Darin and Maciej.
3465 <rdar://problem/5360748>
3466 REGRESSION(r21002-r21003) Flash widget sniffer doesn't work
3468 Add a per-document NodeList counter. When parsing, only call notifyNodeListsChildrenChanged
3469 if the document has node lists. Also, make sure to reset the cache when the node list count has
3470 been 0 and a new node list is registered to avoid any stale cache information.
3472 * dom/ContainerNode.cpp:
3473 (WebCore::ContainerNode::addChild):
3475 (WebCore::Document::Document):
3477 (WebCore::Document::addNodeList):
3478 (WebCore::Document::removeNodeList):
3479 (WebCore::Document::hasNodeLists):