ChangeLog 937 KB
Newer Older
beidson's avatar
beidson committed
1 2 3 4 5 6 7 8
2007-03-16  Brady Eidson  <beidson@apple.com>

        Rubberstamped by Tim Hatcher

        Update the hash table header for Window object properties

        * bindings/js/kjs_window.cpp:

beidson's avatar
beidson committed
9 10 11 12 13 14 15 16 17 18 19 20 21
2007-03-16  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders

        <rdar://problem/5061826> and
        http://bugs.webkit.org/show_bug.cgi?id=12863
        Implement window.stop()

        * bindings/js/kjs_window.cpp:
        (KJS::WindowFunc::callAsFunction): Add case Window::Stop
        * bindings/js/kjs_window.h:
        (KJS::Window::): Add "Stop"

22 23 24 25 26 27 28 29 30 31
2007-03-16  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Brady Eidson.

        Fixed dir creation to account for already existing dirs and missing leading
        dirs in path.
        
        * loader/icon/IconDatabase.cpp:
        (WebCore::makeAllDirectories):

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
2007-03-16  David Hyatt  <hyatt@apple.com>

        Fix for 13084, assertion failure in the Cache.  Convert the client list
        to a HashCountedSet so that multiple refs and derefs are allowed.

        Fix RenderImage so that if it has the same image used as a background/border
        and as the foreground that it will repaint properly (can be tested using
        border-image and a foreground image).

        Optimize list marker so that it doesn't waste time in the base class method,
        since list markers don't support background or border images.

        Reviewed by andersca

        * ChangeLog:
        * loader/CachedResource.cpp:
        (WebCore::CachedResource::ref):
        * loader/CachedResource.h:
        * loader/CachedResourceClientWalker.cpp:
        (WebCore::CachedResourceClientWalker::CachedResourceClientWalker):
        * loader/CachedResourceClientWalker.h:
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::imageChanged):
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::imageChanged):

ggaren's avatar
ggaren committed
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
2007-03-16  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Anders Carlsson.
        
        Fixed <rdar://problem/5065399> REGRESSION: leaks in Frame::bindingRootObject 
        seen on buildbot

        The problem was that we were initializing the same WebScriptObject twice.
        This caused it to leak its original set of ivars.
        
        I think some refactoring could prevent this situation from arising in the
        first place, but I'm just adding a check at the call site for now, to do 
        the simplest thing.

        * bindings/objc/WebScriptObject.mm:
        (-[WebScriptObject _setImp:originRootObject:rootObject:]): Added ASSERTs
        against multiple calls.

        * bindings/objc/WebScriptObjectPrivate.h: Renamed _initializeWithObjectImp
        to setImp because "init" vs "initialize" was a too subtle indication that
        one was a Cocoa initializer and one was not.

lars's avatar
lars committed
80 81 82 83 84 85
2007-03-16  Lars Knoll <lars@trolltech.com>

        don't use #import in .cpp files.

        * editing/qt/EditorQt.cpp:

lars's avatar
lars committed
86 87 88 89 90 91 92 93 94 95 96 97 98
2007-03-16  Lars Knoll <lars@trolltech.com>

        Fix the Qt build once again.

        * platform/qt/PasteboardQt.cpp:
        (WebCore::Pasteboard::Pasteboard):
        (WebCore::Pasteboard::writeSelection):
        (WebCore::Pasteboard::plainText):
        (WebCore::Pasteboard::documentFragment):
        (WebCore::Pasteboard::writeURL):
        (WebCore::Pasteboard::writeImage):
        (WebCore::Pasteboard::clear):

99 100 101 102 103 104 105 106
2007-03-15  Shrikant Gangoda  <shrikant.gangoda@celunite.com>

        Gdk build fix.

        * loader/gdk/FrameLoaderClientGdk.cpp:
        (WebCore::FrameLoaderClientGdk::blockedError):
        * loader/gdk/FrameLoaderClientGdk.h:

bdakin's avatar
bdakin committed
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
2007-03-15  Beth Dakin  <bdakin@apple.com>

        Reviewed by Geoff.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=13088 REGRESSION
        (r19761-19779): Copy image no longer includes image address 
        (rdar://5067927)

        writeURL() does not need an isImage parameter. Now that it accepts 
        the types as a parameter, we can just declare the appropriate image 
        types within writeImage and send them to writeURL(). Also, 
        declaring the types twice is what broke this.

        * platform/Pasteboard.h:
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::writeURL):
        (WebCore::Pasteboard::writeImage):

adele's avatar
adele committed
125 126 127 128 129 130 131 132 133
2007-03-15  Adele Peterson  <adele@apple.com>

        Reviewed by Kevin Decker.

        Fix for <rdar://problem/4926179> Text in menulist control should never update if menu is open

        * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
          Only setTextFromOption if the menu isn't visible.

beidson's avatar
beidson committed
134 135 136 137 138 139 140 141 142 143 144
2007-03-15  Brady Eidson  <beidson@apple.com>

        Reviewed by Oliver

        A few platform specific tweaks

        * platform/cf/RetainPtr.h:
        (WebCore::RetainPtr::releaseRef): Fixed releaseRef to work with CF
        
        * platform/network/ResourceHandle.h: Added a "releaseRef" style call

mjs's avatar
mjs committed
145 146 147 148 149 150
2007-03-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Geoff and Steve.

        * config.h: Remove unneeded hack.

justing's avatar
justing committed
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
2007-03-15  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by john
        
        <rdar://problem/5062376> 
        REGRESSION: In Mail and Gmail, can't change alignment to text after it has been applied
        
        Bring back the remove step in applyBlockStyle.  It's 
        necessary because addBlockStyleIfNeeded assumes that 
        the properties it adds aren't already on the block that 
        it adds them to.

        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyBlockStyle): 
        Bring back the remove step (added a testcase).
        Don't do the add step if m_removeOnly is true (no testcase
        because there aren't any clients using removeOnly functionality
        to remove styles yet, only styled elemets).
        Moved the code for creating new blocks up one level
        to this function so that we can pass blocks to removeCSSStyle.
        When converting VisiblePositions to indices and vice versa,
        use the highest node in the shadow tree if we're in one as
        the scope (working on a testcase).
        (WebCore::ApplyStyleCommand::addBlockStyle): Moved code to
        applyBlockStyle.
        * editing/ApplyStyleCommand.h: 

beidson's avatar
beidson committed
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
2007-03-15  Brady Eidson  <beidson@apple.com>

        Reviewed by Maciej

        <rdar://problem/4429701>
        Implements a port blocking black list that matches Firefox's

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::blockedError): Call through to the client for blockedError 
        * loader/FrameLoader.h:

        * loader/FrameLoaderClient.h: Get the "port blocked" error for the current platform

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::wasBlocked): ResourceHandleClient method to pass on the didFail(error)
        (WebCore::ResourceLoader::blockedError): Following the pattern of "CancelledError()", get the 
          error to fail with for the didFail() call
        * loader/ResourceLoader.h:

        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::blockedError): Added stub

        * platform/network/ResourceHandle.cpp:
        (WebCore::ResourceHandle::create): If the port is blocked, create the handle but schedule it for
          deferred failure on a timer
        (WebCore::ResourceHandle::scheduleBlockedFailure): Do the timer scheduling
        (WebCore::ResourceHandle::fireBlockedFailure): Fire the timer here
        (WebCore::ResourceHandle::portAllowed): Implements checking of Mozilla's
        * platform/network/ResourceHandle.h:
        * platform/network/ResourceHandleClient.h:
        (WebCore::ResourceHandleClient::wasBlocked): Virtual for clients to get the "blocked" message

bdakin's avatar
bdakin committed
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
2007-03-15  Beth Dakin  <bdakin@apple.com>

        Reviewed by Hyatt.

        Fix for <rdar://problem/5065396> REGRESSION: leaks in 
        RenderBlock::layoutInlineChildren seen on buildbot

        This leak appeared after http://trac.webkit.org/projects/webkit/
        changeset/20188. This change shifted line boxes around in 
        removeChild(). But since removeChild() calls 
        setNeedsLayoutAndMinMaxRecalc(), all of the line boxes will be 
        removed once we actually lay out anyway. So this patch fixes the 
        leak by deleting the line boxes instead of shifting them around. 

        * editing/IndentOutdentCommand.cpp:
        (WebCore::IndentOutdentCommand::outdentParagraph): Call into 
        updateLayout(). This fixes an assertion I got in editing/
        execCommand/4976800.html This is very similar to the line box fix I 
        made recently (http://trac.webkit.org/projects/webkit/changeset/
        20177). We need to update layout before relying on VisiblePositions 
        after removing a node.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::deleteLinesForBlock): New helper function 
        since this functionality is needed in three places now.
        (WebCore::RenderBlock::makeChildrenNonInline): Call into new 
        deleteLinesForBlock().
        (WebCore::RenderBlock::removeChild): Same.
        * rendering/RenderBlock.h:

thatcher's avatar
thatcher committed
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
2007-03-15  Timothy Hatcher  <timothy@apple.com>

        Reviewed by John.

        * Factored out most of our common build settings into .xcconfig files. Anything that was common in
          each build configuration was factored out into the shared .xcconfig file.
        * Adds a Version.xcconfig file to define the current framework version, to be used in other places.
        * Use the new $(BUNDLE_VERSION) (defined in Version.xcconfig) in the preprocessed Info.plist.
        * Use the versions defined in Version.xcconfig to set $(DYLIB_CURRENT_VERSION).

        * Configurations/Base.xcconfig: Added.
        * Configurations/DebugRelease.xcconfig: Added.
        * Configurations/Version.xcconfig: Added.
        * Configurations/WebCore.xcconfig: Added.
        * Info.plist:
        * WebCore.xcodeproj/project.pbxproj:

kjk's avatar
kjk committed
256 257 258 259 260 261 262 263 264 265 266
2007-03-15  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Not reviewed - gdk build fixes.

        * platform/gdk/EditorClientGdk.cpp:
        (WebCore::EditorClientGdk::handleKeypress):
        * platform/graphics/cairo/ImageSourceCairo.cpp:
        (WebCore::ImageSource::setData):
        * platform/graphics/gdk/ImageGdk.cpp:
        (WebCore::Image::loadPlatformResource):

justing's avatar
justing committed
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
2007-03-14  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by john
        
        ~2x speed up of 5k rich text paste:
        http://shakespeare.mit.edu/hamlet/full.html        

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply): Remove the top 
        level style span if its unnecessary before inserting
        into the document, its faster than doing it after.
        * editing/ReplaceSelectionCommand.h: Exposed 
        ReplacementFragment::removeNodePreservingChildren so that
        the style span can be removed using non-undoable removes,
        like the rest of the removes done on the ReplacementFragment.
        * editing/markup.cpp:
        (WebCore::createMarkup): Make the style span the top level
        element, otherwise it's useless.  This also facilitates the
        optimization mentioned above.
        When including markup for a fully selected root, include markup
        for all the nodes beneath that fully selected root, to preserve 
        the structure and appearance of the copied markup.  Did this
        by merging with the code for adding markup for descendants of
        special commonAncestorBlocks.

bdakin's avatar
bdakin committed
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
2007-03-15  Beth Dakin  <bdakin@apple.com>

        Rubber-stamped by Adele.

        Rolling out http://trac.webkit.org/projects/webkit/changeset/20148 
        (which is a fix for http://bugs.webkit.org/show_bug.cgi?id=12595 
        and rdar://4722863) because it causes a horrible memory-trasher. 

        * bindings/js/JSHTMLFormElementCustom.cpp:
        (WebCore::JSHTMLFormElement::canGetItemsForName):
        (WebCore::JSHTMLFormElement::nameGetter):
        * bindings/js/kjs_dom.cpp:
        (KJS::):
        (KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
        (KJS::DOMNamedNodesCollection::lengthGetter):
        (KJS::DOMNamedNodesCollection::indexGetter):
        (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
        * bindings/js/kjs_dom.h:
        (KJS::DOMNamedNodesCollection::classInfo):
        * bindings/js/kjs_html.cpp:
        (KJS::JSHTMLCollection::getNamedItems):
        * dom/ChildNodeList.cpp:
        (WebCore::ChildNodeList::ChildNodeList):
        (WebCore::ChildNodeList::length):
        (WebCore::ChildNodeList::item):
        (WebCore::ChildNodeList::nodeMatches):
        * dom/ChildNodeList.h:
        * dom/NameNodeList.cpp:
        (WebCore::NameNodeList::NameNodeList):
        (WebCore::NameNodeList::item):
        (WebCore::NameNodeList::nodeMatches):
        * dom/NameNodeList.h:
        (WebCore::NameNodeList::rootNodeAttributeChanged):
        * dom/Node.cpp:
        (WebCore::TagNodeList::TagNodeList):
        (WebCore::TagNodeList::nodeMatches):
        (WebCore::Node::registerNodeList):
        (WebCore::Node::unregisterNodeList):
        * dom/Node.h:
        * dom/NodeList.cpp:
        (WebCore::NodeList::NodeList):
        (WebCore::NodeList::~NodeList):
        (WebCore::NodeList::recursiveLength):
        (WebCore::NodeList::itemForwardsFromCurrent):
        (WebCore::NodeList::itemBackwardsFromCurrent):
        (WebCore::NodeList::recursiveItem):
        (WebCore::NodeList::itemWithName):
        (WebCore::NodeList::rootNodeChildrenChanged):
        * dom/NodeList.h:
        (WebCore::NodeList::rootNodeAttributeChanged):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::HTMLFormElement):
        (WebCore::HTMLFormElement::~HTMLFormElement):
        (WebCore::HTMLFormElement::formData):
        (WebCore::HTMLFormElement::parseMappedAttribute):
        (WebCore::HTMLFormElement::removeFormElement):
        * html/HTMLFormElement.h:
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLGenericFormElement::parseMappedAttribute):
        (WebCore::HTMLGenericFormElement::insertedIntoTree):
        * html/HTMLGenericFormElement.h:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::parseMappedAttribute):

356 357 358 359 360 361 362
2007-03-15  Geoffrey Garen  <ggaren@apple.com>

        Added an assert to help catch a bug. Hopefully someone will hit it!
        
        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::~KJSProxy):

363 364 365 366 367 368 369 370 371 372 373 374 375
2007-03-14  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adele.

        Fix for rdar://problem/5061737.
        
        This was a regression from the original Objective-C -> C++ conversion
        for the drag logic.  We don't need to call Range::startNode as we just
        need the document that contains the range.   

        * page/DragController.cpp:
        (WebCore::documentFragmentFromDragData):

weinig's avatar
weinig committed
376 377 378 379 380 381 382 383 384 385 386 387
2007-03-14  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Hyatt.

        - http://bugs.webkit.org/show_bug.cgi?id=13071
          REGRESSION: Plain text files no longer wrap lines longer than the width of the browser window

        Test: fast/loader/text-document-wrapping.html

        * loader/TextDocument.cpp:
        (WebCore::TextTokenizer::write): Specified word-wrap:break-word for the <pre> element.

weinig's avatar
weinig committed
388 389 390 391 392 393 394 395 396 397 398 399
2007-03-14  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13072
          REGRESSION (r15617): white-space: pre-wrap breaks off the last character of a wide word

        Test: fast/text/whitespace/pre-wrap-last-char.html

        * rendering/bidi.cpp:
        (WebCore::RenderBlock::findNextLineBreak): Undid the change from r15617.

400 401 402 403 404 405 406 407 408 409
2007-03-14  David Hyatt  <hyatt@apple.com>

        Add asserts to help catch double refs and double derefs of CachedResources.

        Reviewed by mjs

        * loader/CachedResource.cpp:
        (WebCore::CachedResource::ref):
        (WebCore::CachedResource::deref):

aliceli1's avatar
aliceli1 committed
410 411 412 413 414 415 416 417 418
2007-03-14  Alice Liu  <alice.liu@apple.com>

        Rubber-stamped by Hyatt.

        Adding null check to prevent the crash that happens on 2nd run of iBench HTML load test

        * loader/icon/IconDataCache.cpp:
        (WebCore::IconDataCache::writeToDatabase):

thatcher's avatar
thatcher committed
419 420
=== Safari-5522.4 ===

adele's avatar
adele committed
421 422 423 424 425 426 427 428 429 430
2007-03-14  Adele Peterson  <adele@apple.com>

        Reviewed by Adam.

        Fix for <rdar://problem/5062898> REGRESSION: autocomplete window in text fields doesn't come up

        When we moved the initialization of a bunch of variables in the HTMLFormElement constructor, m_autocomplete accidently got initialized to false.

        * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::HTMLFormElement):

431 432 433 434 435 436 437 438 439 440
2007-03-14  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Adam.

        Added missing null check in case this is called on a subframe
        that hasn't started loading.

        * page/Frame.cpp:
        (WebCore::Frame::setMarkedTextMatchesAreHighlighted): Check for a null document.

antti's avatar
antti committed
441 442 443 444 445 446 447 448 449 450 451 452 453 454
2007-03-14  Antti Koivisto  <antti@apple.com>

        Reviewed by Geoff.

        Fix http://bugs.webkit.org/show_bug.cgi?id=13060
        REGRESSION: Repro ASSERT failure in Cache::adjustSize running layout tests
        <rdar://5060208>
        
        Script evaluation may have dereffed the CachedScript object already, causing double deref and
        eventually m_liveResourcesSize underflow.

        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::notifyFinished):

adele's avatar
adele committed
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539
2007-03-14  Adele Peterson  <adele@apple.com>

        Reviewed by Darin.

        Added InsertTab, InsertBacktab, InsertLineBreak, and InsertNewline to the editing command table.
        Added Event parameter to execCommand, and to all of the enabled and exec functions.  Right now,
        the event is only used by the newly added commands.  But in the future, many (and possibly all) of
        these editing commands will need to consider the event so they are applied to the correct selection.

        * WebCore.exp:
        * editing/Editor.cpp:
        (WebCore::execCopy):
        (WebCore::execCut):
        (WebCore::execDelete):
        (WebCore::execBackwardDelete):
        (WebCore::execForwardDelete):
        (WebCore::execMoveBackward):
        (WebCore::execMoveBackwardAndModifySelection):
        (WebCore::execMoveUpByPageAndModifyCaret):
        (WebCore::execMoveDown):
        (WebCore::execMoveDownAndModifySelection):
        (WebCore::execMoveForward):
        (WebCore::execMoveForwardAndModifySelection):
        (WebCore::execMoveDownByPageAndModifyCaret):
        (WebCore::execMoveLeft):
        (WebCore::execMoveLeftAndModifySelection):
        (WebCore::execMoveRight):
        (WebCore::execMoveRightAndModifySelection):
        (WebCore::execMoveToBeginningOfDocument):
        (WebCore::execMoveToBeginningOfDocumentAndModifySelection):
        (WebCore::execMoveToBeginningOfSentence):
        (WebCore::execMoveToBeginningOfSentenceAndModifySelection):
        (WebCore::execMoveToBeginningOfLine):
        (WebCore::execMoveToBeginningOfLineAndModifySelection):
        (WebCore::execMoveToBeginningOfParagraph):
        (WebCore::execMoveToBeginningOfParagraphAndModifySelection):
        (WebCore::execMoveToEndOfDocument):
        (WebCore::execMoveToEndOfDocumentAndModifySelection):
        (WebCore::execMoveToEndOfSentence):
        (WebCore::execMoveToEndOfSentenceAndModifySelection):
        (WebCore::execMoveToEndOfLine):
        (WebCore::execMoveToEndOfLineAndModifySelection):
        (WebCore::execMoveToEndOfParagraph):
        (WebCore::execMoveToEndOfParagraphAndModifySelection):
        (WebCore::execMoveParagraphBackwardAndModifySelection):
        (WebCore::execMoveParagraphForwardAndModifySelection):
        (WebCore::execMoveUp):
        (WebCore::execMoveUpAndModifySelection):
        (WebCore::execMoveWordBackward):
        (WebCore::execMoveWordBackwardAndModifySelection):
        (WebCore::execMoveWordForward):
        (WebCore::execMoveWordForwardAndModifySelection):
        (WebCore::execMoveWordLeft):
        (WebCore::execMoveWordLeftAndModifySelection):
        (WebCore::execMoveWordRight):
        (WebCore::execMoveWordRightAndModifySelection):
        (WebCore::execPaste):
        (WebCore::execSelectAll):
        (WebCore::execToggleBold):
        (WebCore::execToggleItalic):
        (WebCore::execRedo):
        (WebCore::execUndo):
        (WebCore::execInsertTab):
        (WebCore::execInsertBacktab):
        (WebCore::execInsertNewline):
        (WebCore::execInsertLineBreak):
        (WebCore::enabled):
        (WebCore::canPaste):
        (WebCore::hasEditableSelection):
        (WebCore::hasEditableRangeSelection):
        (WebCore::hasRangeSelection):
        (WebCore::hasRichlyEditableSelection):
        (WebCore::canRedo):
        (WebCore::canUndo):
        (WebCore::CommandEntry::):
        (WebCore::Editor::toggleBold):

        (WebCore::Editor::execCommand): Added optional event parameter.
        (WebCore::Editor::insertText): Added.  Calls handleTextInputEvent.
        (WebCore::Editor::insertTextWithoutSendingTextEvent): Renamed from insertText.
         Performs the actual insertion without dispatching any event.
        * editing/Editor.h:
        * page/EventHandler.cpp: (WebCore::EventHandler::defaultTextInputEventHandler):
          Call insertTextWithoutSendingTextEvent.

justing's avatar
justing committed
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568
2007-03-14  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by darin
        
        ~3x speedup pasting 5k lines of rich text:
        http://shakespeare.mit.edu/hamlet/full.html
        ~2x speedup pasting 10k lines of plain text
        
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::computedStyle): Added for convenience.
        * css/CSSComputedStyleDeclaration.h:
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeRedundantStyles):
        The code that pushed down the top level style span had
        a bug in it that made it do unnecessary work.  Instead of
        fixing the bug I removed the code because it was used to 
        help see more redundancies in second level style spans, but 
        createMarkup now *only* creates a top level style span.
        Only remove redundant styles from style spans and only remove
        unstyled elements if they are style spans.  FF doesn't
        remove redundant styles from elements, or remove redundant 
        font tags on copy/paste.  We could offer this functionality 
        through a separate "cleanup" command.
        * editing/markup.cpp:
        (WebCore::createMarkup): Only add markup for ancestors of 
        lastClosed if we're including markup for acommonAncestorBlock 
        (we do this for commonAncestorBlocks like tables and lists),
        otherwise it's unnecessary/redundant.

andersca's avatar
andersca committed
569 570 571 572 573 574 575 576 577 578
2007-03-14  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Ada.

        Make sure to call ResourceLoader::didReceiveData to ensure that there's a shared buffer with the resource
        data, since SubresourceLoaderClients now make use of that buffer.
        
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didReceiveData):

579 580 581 582 583 584 585 586 587
2007-03-14  Administrator  <acarlsson@apple.com>

        Get the size from the shared buffer.
        
        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::setData):
        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::dataChanged):

weinig's avatar
weinig committed
588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604
2007-03-14  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Hyatt, thumbs up by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12782
          Reproducible crash in BidiContext::deref

        Test: fast/dynamic/anonymous-block-orphaned-lines.html

        * rendering/InlineBox.cpp:
        (WebCore::InlineBox::root): Added an assertion that we return a root inline box.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::removeChild): Added code to adopt the line boxes of
        anonymous blocks being destroyed instead of leaving them orphaned, which
        is what caused this crash. The boxes will be deleted on the next layout, but
        this ensures consistency in the mean time.

lars's avatar
lars committed
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621
2007-03-14  Lars Knoll <lars@trolltech.com>

        Reviewed by Antti.

        Fix the Qt build.
        Add a getter to SharedBuffer that returns a reference to the internal
        Vector to avoid an extra copy of the data.

        * platform/SharedBuffer.h:
        (WebCore::SharedBuffer::buffer):
        * platform/graphics/qt/ImageQt.cpp:
        (WebCore::Image::loadPlatformResource):
        * platform/graphics/qt/ImageSourceQt.cpp:
        (WebCore::detectImageFormat):
        (WebCore::createDecoder):
        (WebCore::ImageSource::setData):

antti's avatar
antti committed
622 623 624 625 626 627 628 629 630 631 632 633 634
2007-03-14  Antti Koivisto  <antti@apple.com>

        Reviewed by Mitz.
        
        Fix <rdar://problem/5058774>
        REGRESSION: In Mail, caret appears oversized when typing in a To Do note
        
        Horizontal and vertical were switched. Was regression from
        http://trac.webkit.org/projects/webkit/changeset/20103

        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::addHighlightOverflow):

635 636 637 638 639 640 641 642 643 644 645
2007-03-14  David Hyatt  <hyatt@apple.com>

        Tweak the data() functions of stylesheets and scripts to be internally consistent.

        * loader/CachedCSSStyleSheet.cpp:
        (WebCore::CachedCSSStyleSheet::data):
        * loader/CachedScript.cpp:
        (WebCore::CachedScript::data):
        * loader/CachedXSLStyleSheet.cpp:
        (WebCore::CachedXSLStyleSheet::data):

hyatt's avatar
hyatt committed
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661
2007-03-14  David Hyatt  <hyatt@apple.com>

        Fix Radar 5050688.  

        For large animated GIFs, destroy and recreate the source for every animation frame.  This keeps
        the memory consumption down while giant images are animating.

        Reviewed by andersca

        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::BitmapImage):
        (WebCore::BitmapImage::destroyDecodedData):
        (WebCore::BitmapImage::dataChanged):
        (WebCore::BitmapImage::advanceAnimation):
        * platform/graphics/BitmapImage.h:

662 663 664 665 666 667 668 669 670 671 672
2007-03-14  David Hyatt  <hyatt@apple.com>

        Make sure to use CFDataCreateWithBytesNoCopy where we can.

        Reviewed by andersca

        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::setData):
        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::dataChanged):

hyatt's avatar
hyatt committed
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764
2007-03-13  David Hyatt  <hyatt@apple.com>

        Fix for bugzilla bug 13050 and also radar p1 5050645.

        This patch reworks resource loading to avoid having redundant buffers in the icon database and in cached
        images in the WebCore cache.  It also avoids overcopying in top-level image documents and in the icon
        database.

        There is now only one SharedBuffer for a resource and everybody observes that buffer now instead of ever
        making their own.  Even ImageIO uses the SharedBuffer while decoding.

        The page in 13050 dropped from 145mb down to 45mb of memory use with this change for a stunning savings
        of 100mb.

        Reviewed by olliej, mjs

        * WebCore.exp:
        * loader/CachedCSSStyleSheet.cpp:
        (WebCore::CachedCSSStyleSheet::data):
        * loader/CachedCSSStyleSheet.h:
        * loader/CachedImage.cpp:
        (WebCore::CachedImage::data):
        * loader/CachedImage.h:
        * loader/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        (WebCore::CachedResource::~CachedResource):
        * loader/CachedResource.h:
        (WebCore::CachedResource::data):
        * loader/CachedScript.cpp:
        (WebCore::CachedScript::data):
        * loader/CachedScript.h:
        * loader/CachedXSLStyleSheet.cpp:
        (WebCore::CachedXSLStyleSheet::data):
        * loader/CachedXSLStyleSheet.h:
        * loader/DocLoader.cpp:
        (WebCore::DocLoader::checkCacheObjectStatus):
        * loader/ImageDocument.cpp:
        (WebCore::ImageTokenizer::writeRawData):
        (WebCore::ImageTokenizer::finish):
        * loader/icon/IconDataCache.cpp:
        (WebCore::IconDataCache::setImageData):
        (WebCore::IconDataCache::writeToDatabase):
        * loader/icon/IconDataCache.h:
        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::imageDataForIconURL):
        (WebCore::IconDatabase::iconForPageURL):
        (WebCore::IconDatabase::setIconDataForIconURL):
        (WebCore::IconDatabase::setHaveNoIconForIconURL):
        (WebCore::IconDatabase::imageDataForIconURLQuery):
        * loader/icon/IconDatabase.h:
        * loader/icon/IconLoader.cpp:
        (WebCore::IconLoader::startLoading):
        (WebCore::IconLoader::didReceiveResponse):
        (WebCore::IconLoader::didReceiveData):
        (WebCore::IconLoader::didFail):
        (WebCore::IconLoader::finishLoading):
        (WebCore::IconLoader::clearLoadingState):
        * loader/icon/IconLoader.h:
        * loader/icon/SQLStatement.cpp:
        (WebCore::SQLStatement::getColumnBlobAsVector):
        (WebCore::SQLStatement::isExpired):
        * loader/icon/SQLStatement.h:
        * loader/loader.cpp:
        (WebCore::Loader::didFinishLoading):
        (WebCore::Loader::didReceiveData):
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge getData:andResponse:forURL:]):
        (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
        * platform/SharedBuffer.h:
        (WebCore::SharedBuffer::isEmpty):
        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::destroyDecodedData):
        (WebCore::BitmapImage::dataChanged):
        * platform/graphics/BitmapImage.h:
        * platform/graphics/Image.cpp:
        (WebCore::Image::setData):
        * platform/graphics/Image.h:
        (WebCore::Image::dataChanged):
        (WebCore::Image::data):
        * platform/graphics/ImageSource.h:
        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::setData):
        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::dataChanged):
        * platform/graphics/cg/PDFDocumentImage.h:
        * platform/graphics/mac/ImageMac.mm:
        (WebCore::Image::loadPlatformResource):
        * platform/graphics/svg/SVGImage.cpp:
        (WebCore::SVGImage::setData):
        * platform/mac/PasteboardMac.mm:
        (WebCore::fileWrapperForImage):

justing's avatar
justing committed
765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787
2007-03-13  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by darin
        
        <rdar://problem/5046875> 
        Gmail Editor: Applying alignment to selected text in message also applies alignment to signature

        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::doApply): Don't call applyBlockStyle unless
        there is a block style to apply.
        (WebCore::ApplyStyleCommand::applyBlockStyle): Don't do the remove step.
        It was unnecessary and removed properties from blocks that could contain 
        content outside the range being operated on (added a testcase).
        (WebCore::ApplyStyleCommand::addBlockStyleIfNeeded): Used an early return
        instead of if-nesting.
        * editing/ApplyStyleCommand.h:
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
        Return the new block, if one was created.  Use moveParagraphs to move
        paragraphs into the new block, instead of moving nodes.  The old code moved
        too much (added a testcase).
        * editing/CompositeEditCommand.h:

788 789 790 791 792 793 794 795 796 797 798 799
2007-03-13  Oliver Hunt  <oliver@apple.com>

        Reviewed by Brady.

        To fix <rdar://problem/5044366> we now pass a NSString
        representation of the URL extracted with _web_originalDataAsString
        instead of relying on [NSURL absoluteString] in the bridge

        * page/mac/WebCoreFrameBridge.h:
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge getData:andResponse:forURL:]):

beidson's avatar
beidson committed
800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833
2007-03-13  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders

        <rdar://problem/5048818> - REGRESSION: Incompletely loaded resources being saved to the object cache

        Due to a subtle change in loader behavior back in 10904, we would stop all loaders before calling 
        didFail() on them in the Cache loader.  As a result, we basically cleared all of the Subresource Loaders 
        out of the Cache loader before more properly failing them as errored out.  The result?  Partially loaded
        resources being cached.
        
        Since Loader::didFail() both calls error() on the object *and* removes the loader, the solution is to call 
        didFail() for all cancelled loaders instead of *only* removing them from the set of active loaders.
        
        In addition, pages that didn't completely load were being saved to the back/forward cache.  To fix that,
        I added a null check on the DocumentLoader's error to see if the page ended in an error, or did indeed 
        completely load.

        Note that the layout test for this - if possible - will require other enhancements including possibly adding
        support for window.stop().  That task is documented in <rdar://problem/5061826>

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::provisionalLoadStarted): Fixed a few bugs relating to my original BFCache rewrite to
          more perfectly restore the original behavior - including only caching HTML documents via the 
          m_client->canCachePage() call
        (WebCore::FrameLoader::canCachePage): Don't make the call to m_client->canCachePage() as that serves a different
          purpose
          - Check the mainDocumentError to see if the load ended in error as a further criteria in determining the 
          cachability of a page

        * loader/loader.cpp:
        (WebCore::Loader::cancelRequests): Call didFail(cancelledError()) instead of just removing the loaders from the 
          loaders-in-progress set.  This adds the effect of properly cleaning up the cached object.

bdakin's avatar
bdakin committed
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870
2007-03-13  Beth Dakin  <bdakin@apple.com>

        Rendering part reviewed by Hyatt. Editing part consulted with and 
        rubber stamped by Justin and Harrison.

        Fix for <rdar://problem/5025925> A hang occurs in Safari when 
        attempting to print page at http://www.pcadvisor.co.uk

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::makeChildrenNonInline): 
        RenderBlock::makeChildrenNonInline() takes a block's inline 
        children and turns them into block children. If the children had 
        line boxes, those boxes were being leaked. In the layout test I 
        added with the change (and at pcadvisor.co.uk during printing) 
        children were being made non-inline, and then they were being made 
        inline again. This meant that some of the children ended up 
        pointing to totally stale line boxes that are normally just leaked. 
        This caused an infinite loop in RenderFlow::destroy(). This patch 
        simply deletes everyone's line boxes in 
        RenderBlock::makeChildrenNonInline()

        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply): The other part 
        of this fix is that I added a call to updateLayout in 
        InsertParagraphSeparatorCommand::doApply(). One layout test 
        (editing/spelling/spelling.html) was changed by my patch to 
        RenderBlock. doApply() inserts a node into the render tree. In at 
        least one case in spelling.html, that caused some line boxes to be 
        deleted. Back in doApply() this meant that the RenderTree was out-
        of-date, and we mistakenly thought we were at the end of the 
        paragraph. This caused us to insert a RenderBR() at the end of the 
        tree instead of an empty RenderText(). No one seems to know exactly 
        why we insert either, or if the change is necessarily a problem. It 
        is clear, though, that the RenderTree in doApply() is out-of-date 
        after inserting the node and deleting some line boxes, so it seems 
        prudent to call into updateLayout().

aroben's avatar
aroben committed
871 872 873 874 875 876
2007-03-13  Adam Roben  <aroben@apple.com>

        Reviewed by Anders.

        * platform/FontData.h: Added m_isSystemFont parameter to match NSFont.

bdakin's avatar
bdakin committed
877 878 879 880
2007-03-13  Beth Dakin  <bdakin@apple.com>

        Reviewed by Maciej.

bdakin's avatar
bdakin committed
881
        Export DocumentLoader::setFrame(). Part of fix for <rdar://
bdakin's avatar
bdakin committed
882 883 884 885 886
        problem/4277074> 8F32: Help Viewer crashed on clicking link - 
        KHTMLView::viewportMouseReleaseEvent (12647)

        * WebCore.exp:

darin's avatar
darin committed
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926
2007-03-13  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12794
          <rdar://problem/5028154> REGRESSION: TripTik planner at aaa.com never
          finishes loading due to unclosed canvas tag (12794)

        Change <canvas> elements so that their contents are parsed normally,
        but not rendered. This change fixes the bug, because normal parsing
        rules close the <canvas> element in that case. The special parser
        stuff was just getting in the way.

        Also do some basic cleanup to the HTML parser. This was motivated by
        an earlier version of this patch that made even more changes to the
        parser, but the cleanup is still worth landing.

        Test: fast/canvas/canvas-hides-fallback.html
        Test: fast/canvas/script-inside-canvas-fallback.html
        Test: fast/canvas/unclosed-canvas-1.html
        Test: fast/canvas/unclosed-canvas-2.html
        Test: fast/canvas/unclosed-canvas-3.html
        Test: fast/canvas/unclosed-canvas-4.html

        * html/HTMLCanvasElement.h: Added a data member to keep track of whether the
        renderer is a RenderHTMLCanvas or not.
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::createRenderer): If JavaScript is enabled, create
        a RenderHTMLCanvas. If it's not, let the default code create the default type
        of renderer, which will result in fallback content being visible. The
        RenderHTMLCanvas class already hides all of its children. Set the m_rendererIsCanvas
        boolean accordingly. Since the actual storage for the canvas is allocated lazily
        when you actually get a drawing context, we don't need to do anything special
        to prevent it when JavaScript is disabled; the relevant functions won't be called.
        (WebCore::HTMLCanvasElement::reset): Protect the code that manipulates the
        RenderHTMLCanvas with a check of m_rendererIsCanvas. This is the only code inside
        the DOM element that relies on the renderer type.

        * html/HTMLParser.h: Removed unneeded includes. Marked HTMLParser as
        Noncopyable. Changed the Document parameter to the constructor to instead
darin's avatar
darin committed
927
        be HTMLDocument. Renamed discard_until to m_skipModeTag for clarity.
darin's avatar
darin committed
928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969
        Removed unused noSpaces function and unneeded public doc() function.
        Moved data members all down to the end so you can see them together in order.
        Renamed map to m_currentMapElement and isindex to m_isindexElement.
        Removed unused end and headLoaded data members.  Renamed m_fragment to
        m_isParsingFragment to make it clearer that it's a boolean, not a fragment.

        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::HTMLParser): Changed to use member construction
        syntax instead of calling reset(). This is especially helpful in the
        fragment case, where calling reset() later on is illegal, so not using
        it in the constructor lets us assert.
        (WebCore::HTMLParser::~HTMLParser): Did an explicit deref instead of
        calling setCurrent for its side effect.
        (WebCore::HTMLParser::reset): Updated for member name changes and removal
        and to use document instead of doc().
        (WebCore::HTMLParser::setCurrent): Use document instead of doc().
        (WebCore::HTMLParser::setSkipMode): Added. No longer inline. Now sets the
        m_inCanvasBeforeFirstOpenTag data member to false.
        (WebCore::HTMLParser::parseToken): Tightened up the skip mode logic at the
        top of the function, and added a FIXME about the strange case there where
        we don't skip yet stay in skip mode. Updated for renaming and doc().
        (WebCore::HTMLParser::insertNode): Updated for renaming and doc().
        (WebCore::HTMLParser::handleError): Ditto.
        (WebCore::HTMLParser::framesetCreateErrorCheck): Ditto.
        (WebCore::HTMLParser::isindexCreateErrorCheck): Changed to use RefPtr.
        (WebCore::HTMLParser::noscriptCreateErrorCheck): Updated for renaming and doc().
        (WebCore::HTMLParser::mapCreateErrorCheck): Ditto.
        (WebCore::HTMLParser::getNode): Removed the special case for canvas here.
        Canvas fallback is now handled in the DOM, not the parser. Updated for
        renaming and doc().
        (WebCore::HTMLParser::allowNestedRedundantTag): Changed a #define into a C++
        constant.
        (WebCore::HTMLParser::processCloseTag): Updated for renaming and doc().
        (WebCore::HTMLParser::isInline): Ditto.
        (WebCore::HTMLParser::tagIsOnStack): Added. Used by new canvas logic.
        (WebCore::HTMLParser::popBlock): Updated for renaming and doc(). Also renamed
        the local variable Elem to elem.
        (WebCore::HTMLParser::createHead): Ditto.
        (WebCore::HTMLParser::handleIsindex): Changed to use RefPtr.
        (WebCore::HTMLParser::startBody): Updated for renaming and doc().
        (WebCore::HTMLParser::finished): Ditto.

970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985
2007-03-13  David Hyatt  <hyatt@apple.com>

        Two more cleanup fixes to the cache.  Don't call destroyDecodedData in the BitmapImage destructor, since
        clearing the image source and calling setData on it again causes it to do an extra copy of the encoded
        data.  Since we're about to be destroyed this is just wasteful.

        When the cache prunes, don't allow it to destroy the decoded data of an image that is still actively loading,
        since we've established that ImageIO can actually crash if you yank the rug out from under it like that.

        Reviewed by ggaren

        * loader/Cache.cpp:
        (WebCore::Cache::prune):
        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::~BitmapImage):

andersca's avatar
andersca committed
986 987 988 989 990 991 992
2007-03-13  Anders Carlsson  <acarlsson@apple.com>

        Try fixing the Qt build.
        
        * editing/Editor.h:
        (WebCore::Editor::setStartNewKillRingSequence):

harrison's avatar
harrison committed
993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079
2007-03-13  David Harrison  <harrison@apple.com>

        Reviewed by Justin.

        <rdar://problem/5031181> cntl-k at end of paragraph adds nothing to the kill ring
        <rdar://problem/5031189> REGRESSION: cntl-y yanks only the most recently killed content

        For rdar://5031181, properly extend the selection before the killring handling, and
        make sure plainText of that selection returns a linefeed.
        
        For rdar://5031189, restore Editor::deleteRange() code that continued current killring,
        even though the range deletion implicitly stopped it via changing the selection.
        
        A byproduct of this change is the elimination of RUNDFINDER vs CONTENT TextIterator. The
        only difference between the two was whether to emit a newline when the range started
        with a blockflow element. No callers actually need that any more.

        Tests added:
        * editing/pasteboard/emacs-ctrl-k-y-001-expected.checksum: Added.
        * editing/pasteboard/emacs-ctrl-k-y-001-expected.png: Added.
        * editing/pasteboard/emacs-ctrl-k-y-001-expected.txt: Added.
        * editing/pasteboard/emacs-ctrl-k-y-001.html: Added.

        * editing/Editor.cpp:
        (WebCore::Editor::deleteRange):
        Clear the "start new kill ring sequence" setting, because it was set to true
        when the selection was updated by deleting the range.
        
        (WebCore::Editor::deleteWithDirection):
        If extending the selection to the end of paragraph resulted in a caret selection,
        extend by character, to handle the case when the selection started as a caret at
        the end of paragraph.
        
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::TextIterator):
        Initialize new member variables for tracking handling of the beginning of the range.
        
        (WebCore::TextIterator::advance):
        Call representNodeOffsetZero on the m_endContainer.
        Move visibility checks into handleTextNode and handleReplacedElement.
        
        (WebCore::TextIterator::handleTextNode):
        (WebCore::TextIterator::handleTextBox):
        Call emitText.
        
        (WebCore::TextIterator::handleReplacedElement):
        Moved visibility check into here.
        
        (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
        
        (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
        (WebCore::TextIterator::representNodeOffsetZero):
        New. Emits proper sequence when encountering offset 0 of a node, including the
        m_endContainer. Started with code from handleNonTextNode.
        
        (WebCore::TextIterator::handleNonTextNode):
        Call representNodeOffsetZero.
        
        (WebCore::TextIterator::exitNode):
        Similar to shouldRepresentNodeOffsetZero, do not emit the newline if the node
        was collapsed, and before any other emitted content.
        
        (WebCore::TextIterator::emitCharacter):
        
        (WebCore::TextIterator::emitText):
        New. Consolidates code used by handleText and handleTextBox.
        
        (WebCore::CharacterIterator::CharacterIterator):
        Removed RUNFINDER.

        (WebCore::WordAwareIterator::WordAwareIterator):
        Removed RUNFINDER.
        
        (WebCore::WordAwareIterator::advance):
        Formatting.

        (WebCore::TextIterator::rangeLength):
        Formatting.
        
        * editing/TextIterator.h:
        Added member variables for tracking handling of the beginning of the range.
        Eliminated concept of RUNDFINDER vs CONTENT TextIterator.
        
        * editing/visible_units.cpp:
        (WebCore::nextBoundary):
        Eliminated concept of RUNDFINDER vs CONTENT TextIterator.

1080 1081 1082 1083 1084 1085 1086 1087
2007-03-13  David Hyatt  <hyatt@apple.com>

        Clean up the null image case in CachedImage::data to make sure the size totals will stay accurate.
        I'm not convinced this case can even be hit, but I'm cleaning it up just in case.

        * loader/CachedImage.cpp:
        (WebCore::CachedImage::data):

1088 1089 1090 1091 1092 1093 1094 1095
2007-03-13  David Hyatt  <hyatt@apple.com>

        Reorder the call to allReferencesRemoved, since otherwise the live object size will become
        incorrect.

        * loader/CachedResource.cpp:
        (WebCore::CachedResource::deref):

antti's avatar
antti committed
1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108
2007-03-13  Antti Koivisto  <antti@apple.com>

        Reviewed by Darin.
        
        Fix http://bugs.webkit.org/show_bug.cgi?id=11083
        REGRESSION: Typing tab key fails to insert a tab character in Google Docs editable area
        <rdar://problem/4757650>
        
        Allow inserting tabs in designMode. Backtab behaves like before (matches FF).

        * page/EventHandler.cpp:
        (WebCore::EventHandler::defaultTabEventHandler):

1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123
2007-03-13  David Hyatt  <hyatt@apple.com>

        Fix two counting errors in the decoded size of objects in the WebCore cache.  We need to explicitly
        destroy decoded data when clearing out a partially loaded image that had an error, since the destructor
        (although it does destroy the data) disconnects the observer so that the notification doesn't happen.

        Some CachedImages aren't in the cache (like image documents).  When the decoded size of such an image
        changes we should not notify the cache, since - newsflash - we aren't actually in it.

        Reviewed by ggaren

        * loader/CachedImage.cpp:
        (WebCore::CachedImage::clear):
        (WebCore::CachedImage::decodedSizeChanged):

1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136
2007-03-13  Darin Adler  <darin@apple.com>

        Reviewed by Tim Hatcher and John Sullivan.

        - fix <rdar://problem/4915303> CrashTracer: 36 crashes in Safari at
          com.apple.AppKit: -[NSView getRectsBeingDrawn:count:] + 502

        * page/mac/FrameMac.mm: (WebCore::Frame::imageFromRect):
        This was calling drawRect: directly, but NSView's getRectsBeingDrawn:count:
        method was never really safe to call unless it was AppKit that called your
        drawRect: method. Changed it to call drawSingleRect: instead. A little ugly,
        but seems to work and will almost certainly fix the bug.

weinig's avatar
weinig committed
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161
2007-03-13  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Maciej.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=12974

        Call forgetGenericContext in JSSVGPathSeg destructor, otherwhise
        we'll hit an ASSERT in a debug build, when running svg/custom/js-update-path-changes.svg
        a few dozen times in a single WebKit instance. The ASSERT is good and just warns that
        there was already a generic context pointer registered, and the new "to be registered"
        object already exists, but pointing to a different object. That's because garbage collection
        calls the JSSVGPathSeg destructor, but that didn't cleanup the generic context map.

        Only JSSVGPathSeg is hit by this problem, as it's the only non SVGAnimated* type
        using the generic context system while using a custom JSSVGPathSegList implementation.

        Also cleanup JSSVGPathSegListCustom code to call the static forgetGenericContext
        method instead of doing the same using custom code.

        * bindings/js/JSSVGPathSegListCustom.cpp:
        (WebCore::removeFromPathSegContextMap):
        (WebCore::JSSVGPathSegList::clear):
        (WebCore::JSSVGPathSegList::removeItem):
        * bindings/scripts/CodeGeneratorJS.pm:

darin's avatar
darin committed
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251
2007-03-13  Darin Adler  <darin@apple.com>

        Reviewed by Adele.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12595
          <rdar://problem/4722863> REGRESSION: Can't add item to cart at lnt.com
          (JS type error) (12595)

        Test: fast/forms/old-names.html

        * bindings/js/JSHTMLFormElementCustom.cpp:
        (WebCore::JSHTMLFormElement::canGetItemsForName): If the form collection has
        nothing for a given name, try the form's oldNamedElement function.
        (WebCore::JSHTMLFormElement::nameGetter): Ditto.

        * bindings/js/kjs_dom.h: Removed the DOMNamedNodesCollection. Instead we will use
        a class derived from NodeList.
        * bindings/js/kjs_dom.cpp: Ditto.

        * bindings/js/kjs_html.cpp:
        (KJS::VectorNodeList::VectorNodeList): Added. Constructor for a new class derived
        from NodeList to be used for the named items result from a collection -- uses a
        vector of node pointers.
        (KJS::VectorNodeList::length): Added.
        (KJS::VectorNodeList::item): Added.
        (KJS::JSHTMLCollection::getNamedItems): Use VectorNodeList and the existing wrapper
        for NodeList rather than a custom JavaScript class, DOMNamedNodesCollection.

        * dom/ChildNodeList.h:
        * dom/ChildNodeList.cpp:
        (WebCore::ChildNodeList::ChildNodeList): Updated to derive from TreeNodeList,
        since NodeList is now a simpler class.
        (WebCore::ChildNodeList::elementMatches): Updated for name and parameter change.

        * dom/NameNodeList.h:
        * dom/NameNodeList.cpp:
        (WebCore::NameNodeList::NameNodeList): Updated to derive from TreeNodeList,
        since NodeList is now a simpler class.
        (WebCore::NameNodeList::rootNodeAttributeChanged): Updated for name and
        parameter change.

        * dom/Node.h: Change register/unregister functions to take TreeNodeList.
        * dom/Node.cpp:
        (WebCore::TagNodeList::TagNodeList): Updated to derive from TreeNodeList,
        since NodeList is now a simpler abstract class.
        (WebCore::TagNodeList::elementMatches): Updated for name and parameter change.
        (WebCore::Node::registerNodeList): Changed type from NodeList to TreeNodeList.
        (WebCore::Node::unregisterNodeList): Ditto.

        * dom/NodeList.h: Broke NodeList into a simpler base class and a derived class
        with the machinery for iterating a tree, called TreeNodeList.
        * dom/NodeList.cpp:
        (WebCore::NodeList::~NodeList): Added.
        (WebCore::NodeList::itemWithName): Factored out of the old itemWithName.
        (WebCore::TreeNodeList::TreeNodeList): Renamed from NodeList.
        (WebCore::TreeNodeList::~TreeNodeList): Ditto.
        (WebCore::TreeNodeList::recursiveLength): Ditto.
        (WebCore::TreeNodeList::itemForwardsFromCurrent): Ditto.
        (WebCore::TreeNodeList::itemBackwardsFromCurrent): Ditto.
        (WebCore::TreeNodeList::recursiveItem): Ditto.
        (WebCore::TreeNodeList::itemWithName): Factored half of this into this function,
        the other half in NodeList::itemWithName.
        (WebCore::TreeNodeList::rootNodeAttributeChanged): Added. No longer inline.
        (WebCore::TreeNodeList::rootNodeChildrenChanged): Renamed from NodeList.

        * html/HTMLFormElement.h: Added formElementNameChanged and oldNamedElement
        fucntions, and a map called m_oldNames. Also removed m_boundary, which I
        thought I had already done.
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::HTMLFormElement): Initialize m_oldNames to 0.
        Switched the rest of the members to initialization syntax.
        (WebCore::HTMLFormElement::~HTMLFormElement): Delete m_oldNames.
        (WebCore::HTMLFormElement::formElementNameChanged): Added. Stores a reference
        to one element under each of its old names.
        (WebCore::HTMLFormElement::oldNamedElement): Added. Returns the old element
        that once had a given name.

        * html/HTMLGenericFormElement.h:
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLGenericFormElement::parseMappedAttribute): When the name
        attribute changes, tell the form about the old name.
        (WebCore::HTMLGenericFormElement::insertedIntoTree): When telling a form
        about an element, also store away the old name so that we can use it
        when the name changes later.

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::parseMappedAttribute): Added a call to the
        base class in the nameAttr case, so the code in HTMLGenericFormElement
        above will get called in the input element case.

antti's avatar
antti committed
1252 1253 1254 1255 1256 1257 1258 1259 1260 1261
2007-03-13  Antti Koivisto  <antti@apple.com>

        Reviewed by Alexey.

        Alexey spotted a DOS by using string of 64k unbreakable character in
        fix for http://bugs.webkit.org/show_bug.cgi?id=12833

        * dom/Text.cpp:
        (WebCore::Text::createWithLengthLimit):

lars's avatar
lars committed
1262 1263 1264 1265 1266 1267
2007-03-13  Lars Knoll <lars@trolltech.com>

        Fix the Qt build

        * WebCore.pro:

rwlbuis's avatar
rwlbuis committed
1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280
2007-03-13  Rob Buis  <buis@kde.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=12576
        WebKit does not support xlink:show attributes

        Make an exception for non-empty targets, these should be opened
        in a new window, unless the value is _self.

        * ksvg2/svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler):

1281 1282
2007-03-13  David Hyatt  <hyatt@apple.com>

ddkilzer's avatar
ddkilzer committed
1283
        - fix cache issues seen in http://bugs.webkit.org/show_bug.cgi?id=13050
ddkilzer's avatar
ddkilzer committed
1284 1285 1286
          6 objects and ~200MB leaked after opening then closing tab
          <rdar://problem/5058714>

1287
        Double the encoded size of images for now.  We do this to account for a bug in ImageIO where they hold
ddkilzer's avatar
ddkilzer committed
1288
        a separate copy of image data.  See <rdar://problem/5050645>.
1289

ddkilzer's avatar
ddkilzer committed
1290
        Reviewed by aroben.
1291 1292 1293 1294

        * loader/CachedImage.cpp:
        (WebCore::CachedImage::data):

kjk's avatar
kjk committed
1295 1296 1297 1298 1299 1300 1301
2007-03-12  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Not reviewed - gdk build fix.

        * platform/gdk/TemporaryLinkStubs.cpp:
        (SearchPopupMenu::enabled): add missing stub.

ddkilzer's avatar
ddkilzer committed
1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312
2007-03-12  David Kilzer  <ddkilzer@kilzer.net>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13045
          REGRESSION: Blackboard CourseWare Error with Nightlies after Mar 8

        * html/HTMLFormElement.cpp:
        (WebCore::getUniqueBoundaryString): Speculative fix: remove dashes from
        the boundary prefix that appear after non-dash characters.

ddkilzer's avatar
ddkilzer committed
1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324
2007-03-12  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Anders.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13015
          REGRESSION (r17233-r17241): Repro crash when leaving a page whose unload handler submits a form

        Test: fast/loader/onunload-form-submit-crash-2.html

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::finishedLoading): Added null check.

andersca's avatar
andersca committed
1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341
2007-03-12  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        <rdar://problem/4900071>
        http://bugs.webkit.org/show_bug.cgi?id=6454
        ASSERTION: Navigating 'back' in frameset: !_private->previousItem (6454)

        Change back the behavior of checkLoadComplete to traverse the entire frame tree instead of
        just the parent frames of the current frame. This is needed in order to reset the previous history item
        for all frames when doing a frame navigation. (This was changed in revision 11819)
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::recursiveCheckLoadComplete):
        (WebCore::FrameLoader::checkLoadComplete):
        * loader/FrameLoader.h:

justing's avatar
justing committed
1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357
2007-03-12  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by darin
        
        <rdar://problem/5056619> 
        REGRESSION: Gmail Editor: Dragging text into Reply (textarea) field results in a crash at WebCore::InsertNodeBeforeCommand::doApply()
        
        * editing/SelectionController.cpp:
        (WebCore::removingNodeRemovesPosition): Added.
        (WebCore::SelectionController::nodeWillBeRemoved): Clear the
        selection if it's inside a shadow tree.
        * page/DragController.cpp:
        (WebCore::setSelectionToDragCaret): Return false to signal to
        clients that a drop shouldn't be performed if the second attempt
        to set a selection ends up in non-editable content.

darin's avatar
darin committed
1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500
2007-03-12  Darin Adler  <darin@apple.com>

        Reviewed by Tim Hatcher.

        - fixed JavaScript wrapper classes to be correct for a variety of cases
          that a new test uncovered: was broken for at least 5 classes

        - fixed Objective-C wrapper classes to be correct for a variety of cases
          that a test case uncovered: was broken for ast least 50 classes

        - added missing DOM API for creating OverflowEvent and WheelEvent instances

        Test: fast/dom/wrapper-classes.html

        * DerivedSources.make: Added missing bindings: HTMLCanvasElement for ObjC,
        CDATASection, Comment, and EntityReference for JavaScript.
        * WebCore.xcodeproj/project.pbxproj: Added those new generated files.

        * bindings/js/JSHTMLElementWrapperFactory.cpp:
        (WebCore::createJSHTMLWrapper): Corrected the wrapper classes for <keygen>,
        which needs an HTMLSelectElement wrapper, and <xmp>, which needs an
        HTMLPreElement wrapper.

        * bindings/objc/DOMInternal.h: Updated for new naming scheme.
        Also moved createDOMWrapper from the KJS namespace to the WebCore namespace.
        * bindings/objc/DOMUtility.mm:
        (KJS::createDOMWrapper): Broke the core function into a separate one, and
        left it in the KJS namespace because Objective-C++ rules make it impossible
        for it to work in the WebCore namespace. Used a macro-based implementation
        to cut down on repeated code, and added missing cases for Counter,
        HTMLOptionsCollection, Range, XPathExpression, XPathResult, Event, RGBColor,
        Rect, Window, DOMImplementation, NodeIterator, TreeWalker, and HTMLCollection.
        (WebCore::createDOMWrapper): The other half of the function.

        * bindings/objc/DOM.mm:
        (WebCore::createElementClassMap): Corrected the wrapper classes for
        <canvas>, which needs a DOMHTMLCanvasElement wrapper, <del>, which needs
        a DOMHTMLModElement wrapper, <embed>, which needs a DOMHTMLEmbedElement
        wrapper, <ins>, which needs a DOMHTMLModElement wrapper, <th>, which needs
        a DOMHTMLTableCellElement wrapper, and <xmp>, which needs an
        DOMHTMLPreElement wrapper.
        (+[DOMNode _wrapNode:]): Updated for new naming scheme.
        (+[DOMNode _wrapEventTarget:]): Ditto.
        (+[DOMNodeFilter _wrapNodeFilter:]): Ditto.
        (ObjCNodeFilterCondition::acceptNode): Ditto.
        (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]): Ditto.
        (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]): Ditto.
        (WebCore::ObjCEventListener::handleEvent): Ditto.

        * dom/Document.cpp: (WebCore::Document::createEvent):
        Added cases for OverflowEvent and WheelEvent.

        * dom/OverflowEvent.h: Added empty constructor and initOverflowEvent.
        * dom/OverflowEvent.cpp:
        (WebCore::OverflowEvent::OverflowEvent): Added.
        (WebCore::OverflowEvent::initOverflowEvent): Added.
        * dom/OverflowEvent.idl: Added initOverflowEvent.

        * bindings/objc/PublicDOMInterfaces.h: Added initOverflowEvent.

        * bindings/objc/DOMCSS.mm:
        (+[DOMStyleSheet _wrapStyleSheet:]): Updated for new naming scheme.
        (+[DOMCSSRule _wrapCSSRule:]): Corrected wrapper for CSSUnknownRule.
        (+[DOMCSSValue _wrapCSSValue:]): Updated for new naming scheme.

        * bindings/js/kjs_css.h:
        (KJS::DOMRGBColor::impl): Added. Used when making an ObjC wrapper.
        (KJS::DOMRect::impl): Ditto.

        * bindings/js/kjs_dom.cpp: (KJS::toJS): Corrected the wrapper classes for
        CDATASection, Comment, and EntityReference.

        * bindings/js/kjs_html.cpp: Corrected the class name for HTMLElement
        (was "DOMHTMLElement") and HTMLCollection (was "Collection").

        * bindings/objc/DOMImplementationFront.h:
        * bindings/objc/DOMImplementationFront.cpp:
        (WebCore::implementationFront): Added new overload that returns a front given
        a JavaScript wrapper. Needed by the code that makes the Objective-C wrapper.

        * bindings/objc/WebScriptObject.mm:
        (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
        Updated since createDOMWrapper is now in the WebCore namespace.

        * bindings/scripts/CodeGeneratorObjC.pm: Update the naming scheme for the
        wrapper creation functions to use _wrapElement: rather then _elementWith:
        style. Removed now-unneeded special cases for things that needed to stay
        upper-case, since we don't have to do the whole lcfirst thing.

        * html/HTMLCanvasElement.idl: Added #if so we can successfully generate the
        Objective-C wrapper for this class, even though we can't yet handle the
        DOMObject return type.

        * html/HTMLOptionsCollection.idl: Added GenerateNativeConverter so we get
        an appropriate toJS function.

        * bindings/objc/DOMEvents.mm:
        (+[DOMEvent _wrapEvent:]):
        * bindings/objc/DOMHTML.mm:
        (-[DOMHTMLDocument createDocumentFragmentWithMarkupString:baseURL:]):
        (-[DOMHTMLDocument createDocumentFragmentWithText:]):
        * bindings/objc/DOMObject.mm:
        (-[DOMObject sheet]):
        * bindings/objc/DOMRGBColor.mm:
        (-[DOMRGBColor red]):
        (-[DOMRGBColor green]):
        (-[DOMRGBColor blue]):
        (-[DOMRGBColor alpha]):
        (+[DOMRGBColor _wrapRGBColor:]):
        * bindings/objc/DOMSVGPathSegInternal.mm:
        (+[DOMSVGPathSeg _wrapSVGPathSeg:]):
        * bindings/objc/DOMXPath.mm:
        (+[DOMNativeXPathNSResolver _wrapXPathNSResolver:]):
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge nodesFromList:]):
        (-[WebCoreFrameBridge elementWithName:inForm:]):
        (-[WebCoreFrameBridge formForElement:]):
        (-[WebCoreFrameBridge currentForm]):
        (-[WebCoreFrameBridge controlsInForm:]):
        (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
        (-[WebCoreFrameBridge convertNSRangeToDOMRange:]):
        (-[WebCoreFrameBridge markDOMRange]):
        (-[WebCoreFrameBridge markedTextDOMRange]):
        (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]):
        (-[WebCoreFrameBridge documentFragmentWithMarkupString:baseURLString:]):
        (-[WebCoreFrameBridge documentFragmentWithText:inContext:]):
        (-[WebCoreFrameBridge documentFragmentWithNodesAsParagraphs:]):
        (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
        (-[WebCoreFrameBridge replaceSelectionWithText:selectReplacement:smartReplace:]):
        (-[WebCoreFrameBridge increaseSelectionListLevel]):
        (-[WebCoreFrameBridge increaseSelectionListLevelOrdered]):
        (-[WebCoreFrameBridge increaseSelectionListLevelUnordered]):
        (-[WebCoreFrameBridge dragCaretDOMRange]):
        (-[WebCoreFrameBridge editableDOMRangeForPoint:]):
        (-[WebCoreFrameBridge characterRangeAtPoint:]):
        (-[WebCoreFrameBridge typingStyle]):
        (-[WebCoreFrameBridge rangeOfCharactersAroundCaret]):
        * platform/mac/ClipboardMac.mm:
        (WebCore::ClipboardMac::declareAndWriteDragImage):
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::writeSelection):
        Updated for new naming scheme.

thatcher's avatar
thatcher committed
1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514
2007-03-12  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Darin.

        <rdar://problem/4990691> REGRESSION: Selecting text in Adium's Messages field causes horizontal shift

        Corrected the recursive point conversion and scrolling done in scrollPointRecursively to use the
        document view of each NSClipView.

        * platform/mac/ScrollViewMac.mm:
        (WebCore::ScrollView::scrollPointRecursively): Call convertPoint:fromView: on the document views,
        not the clip views as we encounter them. Then call constrainScrollPoint: on the converted point to
        constrain to the document view bounds. And finally call scrollPoint: on the document view, not the clip view.

antti's avatar
antti committed
1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533
2007-03-12  Antti Koivisto  <antti@apple.com>

        Reviewed by Alexey.

        Fix http://bugs.webkit.org/show_bug.cgi?id=12833
        REGRESSION: Selecting text in 6.6MB txt file is sluggish as of the Feb 19th nightly
        <rdar://problem/5028159>
        
        Divide large text blocks (>64kB) over multiple text nodes. This limits linebox searches to
        a manageable subset.
        
        * dom/Text.cpp:
        (WebCore::Text::createWithLengthLimit):
        * dom/Text.h:
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::parseToken):
        * loader/TextDocument.cpp:
        (WebCore::TextTokenizer::write):

1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547
2007-03-12  David Hyatt  <hyatt@apple.com>

        Fix a regression in printing.  Printer fonts need to be part of the
        font cache key, since printer fonts have different glyph widths.
        (Integer antialiasing is used for screen fonts but not for printer fonts.)

        Reviewed by aroben

        * platform/FontCache.cpp:
        (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
        (WebCore::FontPlatformDataCacheKey::operator==):
        (WebCore::computeHash):
        (WebCore::FontCache::getCachedFontPlatformData):

1548 1549 1550 1551 1552 1553 1554
2007-03-12  Lars Knoll <lars@trolltech.com>

        add missing symbol to fix the Qt build again.

        * platform/qt/SearchPopupMenuQt.cpp:
        (WebCore::SearchPopupMenu::enabled):

adele's avatar
adele committed
1555 1556 1557 1558 1559 1560 1561 1562 1563 1564
2007-03-12  Adele Peterson  <adele@apple.com>

        Reviewed by Oliver.

        Adding the ability to enable or disable a SearchPopupMenu.

        * platform/SearchPopupMenu.h:
        * platform/mac/SearchPopupMenuMac.mm: (WebCore::SearchPopupMenu::enabled):
        * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::showPopup):

rwlbuis's avatar
rwlbuis committed
1565
2007-03-12  Rob Buis  <buis@kde.org>
rwlbuis's avatar
rwlbuis committed
1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591

        Reviewed by Nikolas Zimmermann.

        http://bugs.webkit.org/show_bug.cgi?id=12500
        SVG fails to correctly handle all link style selectors
        http://bugs.webkit.org/show_bug.cgi?id=12567
        <text> elements ignore <a> children

        Allow <a> inside svg text and handle xlink:show.

        * ksvg2/svg/SVGAElement.cpp:
        (WebCore::SVGAElement::createRenderer):
        (WebCore::SVGAElement::defaultEventHandler):
        (WebCore::SVGAElement::childShouldCreateRenderer):
        * ksvg2/svg/SVGAElement.h:
        * ksvg2/svg/SVGElement.h:
        (WebCore::SVGElement::isTextContent):
        * ksvg2/svg/SVGTextContentElement.h:
        (WebCore::SVGTextContentElement::isTextContent):
        * ksvg2/svg/SVGTextElement.cpp:
        (WebCore::SVGTextElement::childShouldCreateRenderer):
        * rendering/SVGInlineFlowBox.cpp:
        (WebCore::translateBox):
        (WebCore::placePositionedBoxesHorizontally):
        (WebCore::placeBoxesVerticallyWithAbsBaseline):

adele's avatar
adele committed
1592 1593 1594 1595 1596 1597 1598 1599 1600
2007-03-12  Adele Peterson  <adele@apple.com>

        Reviewed by Oliver.

        Add a missing parameter to the constructor.

        * platform/PlatformKeyboardEvent.h:
        * platform/win/KeyEventWin.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618
2007-03-12  Lars Knoll <lars@trolltech.com>

        Fix the Qt build. I still get crashes though :/

        * platform/graphics/qt/ImageDecoderQt.cpp:
        (WebCore::ImageDecoderQt::clearFrame):
        * platform/graphics/qt/ImageDecoderQt.h:
        * platform/graphics/qt/ImageSourceQt.cpp:
        (WebCore::ImageSource::setData):
        (WebCore::ImageSource::frameIsCompleteAtIndex):
        (WebCore::ImageSource::clear):
        (WebCore::ImageSource::destroyFrameAtIndex):
        * platform/qt/ClipboardQt.cpp:
        (WebCore::ClipboardQt::ClipboardQt):
        * platform/qt/ClipboardQt.h:
        * platform/qt/DragDataQt.cpp:
        (WebCore::DragData::createClipboard):

kjk's avatar
kjk committed
1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629
2007-03-11  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Not reviewed - gdk build fixes.

        * platform/gdk/EditorClientGdk.cpp:
        (WebCore::EditorClientGdk::respondToChangedSelection): add stub
        * platform/gdk/EditorClientGdk.h:
        * platform/gdk/FrameGdk.cpp:
        * platform/gdk/TemporaryLinkStubs.cpp:
        (Editor::markMisspellings): add stub

ap's avatar
ap committed
1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640
2007-03-11  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Adele.

        http://bugs.webkit.org/show_bug.cgi?id=12560
        W3C XPath test Text_Nodes.svg fails

        * xml/XPathStep.cpp:
        (WebCore::XPath::Step::nodeTestMatches): Revert the fix, as the behavior doesn't appear 
        all that desirable as it did at first glance.

1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656
2007-03-11  Oliver Hunt  <oliver@apple.com>

        Reviewed by hyatt.

        Fix for <rdar://problem/5055690> ASSERTION failure on drop into 
        editable element with content changed on drop 

        After setting the selection for a drop into an editable region 
        we make sure the we succeeded.  If we didn't we assume a focus handler
        or similar altered the element contents and try again, if the second
        attempt fails we bail out.

        * page/DragController.cpp:
        (WebCore::setSelectionToDragCaret):
        (WebCore::DragController::concludeDrag):

1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682
2007-03-11  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adele.

        Moving Frame{Mac}::respondToChangedSelection to Frame.cpp
        Added new EditorClient method to handle old bridge function
        
        * bridge/EditorClient.h:
           Added respondToChangedSelection to replace old bridge function
        * editing/Editor.cpp:
        (WebCore::Editor::respondToChangedSelection):
           Add client call to replace old bridge call from Frame::respondToChangedSelection
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::setSelection):
           No longer directly call Editor as Frame::respondToChangedSelection
           makes the call
        * page/Frame.cpp:
        (WebCore::Frame::respondToChangedSelection):
           Moved from FrameMac, replaced bridge call with call to Editor
        * page/mac/FrameMac.mm:
           Moved respondToChangedSelection to Frame.cpp
        * page/mac/WebCoreFrameBridge.h:
           Removed respondToChangedSelection from bridge
        * page/qt/FrameQt.cpp:
           Remove stub method for respondToChangedSelection

kjk's avatar
kjk committed
1683 1684
2007-03-11  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

1685
        Reviewed by Brady Eidson.
kjk's avatar
kjk committed
1686 1687 1688 1689 1690 1691 1692

        Linux/gdk fix.

        * loader/gdk/FrameLoaderClientGdk.cpp:
        (WebCore::FrameLoaderClientGdk::shouldGoToHistoryItem): return true so
        that FrameLoader:goBackOrForwards() works.

ggaren's avatar
ggaren committed
1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705
2007-03-10  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Fixed <rdar://problem/4587763> PAC file: lock inversion between QT and 
        JSCore causes a hang @ www.panoramas.dk
        
        See JavaScriptCore ChangeLog for details.
        
        * bindings/objc/WebScriptObject.mm:
        (_didExecute): Added helpful ASSERT.
        (+[WebScriptObject throwException:]): Added missing JSLock.

antti's avatar
antti committed
1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773
2007-03-11  Antti Koivisto  <antti@apple.com>

        Reviewed by Hyatt.

        Optimize linebox memory consumption:
        - move all bitfields to baseclass compacting them
        - make InlineTextBox::m_truncation unsigned short and make it relative to m_start
        - remove extremely rarely used EllipsisBox pointer from RootInlineBox and instead
          use a global hashmap to store it if needed
        - use minimum required number of bits to store BidiStatus enum variables in RootInlineBox
        - move overflow variables in RootInlineBox to a separate struct that is instantiated
          only if any of the variables is set to a value that can't trivially be derived from 
          box x, y, width and height
          
        As a result line box objects shrink:
            InlineBox: 44 -> 44 bytes
            InlineTextBox: 68 -> 60 bytes
            InlineFlowBox: 68 -> 64 bytes
            RootInlineBox: 128 -> 88 bytes
            
        The optimizations possiblity was noticed when debugging http://bugs.webkit.org/show_bug.cgi?id=12833
        Bug 12833: REGRESSION: Selecting text in 6.6MB txt file is sluggish as of the Feb 19th nightly
        <rdar://problem/5028159>
        
        On that page the patch saves 11.5MB or some 21% of linebox memory consumption. It also
        actually improves selection performance somewhat by improving memory locality.

        * rendering/InlineBox.h:
        (WebCore::InlineBox::InlineBox):
        * rendering/InlineFlowBox.h:
        (WebCore::InlineFlowBox::InlineFlowBox):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::placeEllipsisBox):
        (WebCore::InlineTextBox::nodeAtPoint):
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::paintDecoration):
        (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
        (WebCore::InlineTextBox::paintMarkedTextUnderline):
        * rendering/InlineTextBox.h:
        (WebCore::InlineTextBox::InlineTextBox):
        * rendering/RootInlineBox.cpp:
        (WebCore::throw):
        (WebCore::RootInlineBox::Overflow::operator delete):
        (WebCore::RootInlineBox::Overflow::destroy):
        (WebCore::RootInlineBox::destroy):
        (WebCore::RootInlineBox::detachEllipsisBox):
        (WebCore::RootInlineBox::clearTruncation):
        (WebCore::RootInlineBox::placeEllipsis):
        (WebCore::RootInlineBox::paintEllipsisBox):
        (WebCore::RootInlineBox::addHighlightOverflow):
        (WebCore::RootInlineBox::nodeAtPoint):
        (WebCore::RootInlineBox::adjustPosition):
        (WebCore::RootInlineBox::selectionTop):
        (WebCore::RootInlineBox::setLineBreakInfo):
        (WebCore::RootInlineBox::ellipsisBox):
        (WebCore::RootInlineBox::setVerticalOverflowPositions):
        (WebCore::RootInlineBox::setHorizontalOverflowPositions):
        (WebCore::RootInlineBox::setVerticalSelectionPositions):
        * rendering/RootInlineBox.h:
        (WebCore::RootInlineBox::RootInlineBox):
        (WebCore::RootInlineBox::topOverflow):
        (WebCore::RootInlineBox::bottomOverflow):
        (WebCore::RootInlineBox::leftOverflow):
        (WebCore::RootInlineBox::rightOverflow):
        (WebCore::RootInlineBox::lineBreakBidiStatus):
        (WebCore::RootInlineBox::selectionBottom):
        (WebCore::RootInlineBox::Overflow::Overflow):

ap's avatar
ap committed
1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847
2007-03-11  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        A partial fix for http://bugs.webkit.org/show_bug.cgi?id=13021
        XPath can be very slow

        * xml/XPathExpression.cpp:
        (WebCore::XPathExpression::evaluate): Cache evaluationContext in a local variable.

        * xml/XPathExpressionNode.cpp:
        (WebCore::XPath::Expression::evaluationContext):
        * xml/XPathExpressionNode.h:
        (WebCore::XPath::Expression::addSubExpression):
        (WebCore::XPath::Expression::subExprCount):
        (WebCore::XPath::Expression::subExpr):
        * xml/XPathFunctions.cpp:
        * xml/XPathFunctions.h:
        (WebCore::XPath::Function::setName):
        (WebCore::XPath::Function::arg):
        (WebCore::XPath::Function::argCount):
        (WebCore::XPath::Function::name):
        Made one-liners critical for performance inline.

        * xml/XPathGrammar.y: Fully parse NodeTests, so that strings are no longer passed for what is
        essentially an enum. Use LocationPath accessors to add steps, instead of directly manipulating
        internal data members.

        * xml/XPathParser.cpp:
        (WebCore::XPath::Parser::parseStatement):
        (WebCore::XPath::Parser::registerNodeTest):
        (WebCore::XPath::Parser::deleteNodeTest):
        * xml/XPathParser.h:
        Added support methods for changes in XPathGrammar.y.

        * xml/XPathPath.cpp:
        (WebCore::XPath::Filter::evaluate): Cache evaluationContext in a local variable. Use swap() to avoid
        performing vector assignments.
        (WebCore::XPath::LocationPath::evaluate): Use swap() to avoid performing vector assignments.
        (WebCore::XPath::LocationPath::optimizeStepPair): This new method is called during LocationPath construction, 
        to simplify the path as it's being built. Currently, the only optimized case is "//*" - it is a basis for
        important operations that cannot be efficiently written in XPath 1.0, but can be optimized with a little bit
        of XPath 2.0.
        (WebCore::XPath::LocationPath::appendStep): A new accessor that modifies m_steps and calls optimizeStepPair().
        (WebCore::XPath::LocationPath::insertFirstStep): Ditto.
        * xml/XPathPath.h:
        (WebCore::XPath::LocationPath::setAbsolute): A new accessor.

        * xml/XPathStep.h:
        (WebCore::XPath::Step::NodeTest::):
        (WebCore::XPath::Step::NodeTest::NodeTest):
        (WebCore::XPath::Step::NodeTest::kind):
        (WebCore::XPath::Step::NodeTest::data):
        Step::NodeTest is a new sub-class that represents a fully parsed NodeTest.
        (WebCore::XPath::Step::axis):
        (WebCore::XPath::Step::nodeTest):
        (WebCore::XPath::Step::nodeTestData):
        (WebCore::XPath::Step::namespaceURI):
        (WebCore::XPath::Step::predicates):
        (WebCore::XPath::Step::setAxis):
        (WebCore::XPath::Step::setNodeTest):
        (WebCore::XPath::Step::setNodeTestData):
        (WebCore::XPath::Step::setNamespaceURI):
        (WebCore::XPath::Step::setPredicates):
        New accessors that let optimizeStepPair() manipulate Step data.

        * xml/XPathStep.cpp:
        (WebCore::XPath::Step::Step): Use the new NodeTest class.
        (WebCore::XPath::Step::evaluate): Cache evaluationContext in a local variable. Use swap() to avoid
        performing unneeded vector assignments.
        (WebCore::XPath::Step::nodesInAxis): Cosmetic changes.
        (WebCore::XPath::Step::nodeTestMatches): Use NodeTest instead of parsing the test from string each time.
        Added a partial implementation of XPath 2.0 element() node test.

ap's avatar
ap committed
1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862
2007-03-10  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=12249
        FCKeditor: <hr>, <ul> and <ol> have id="undefined"

        This fixes the attached reduction, but not the original issue.

        Test: editing/execCommand/default-parameters.html

        * dom/Document.h:
        * dom/Document.idl:
        Make second and third execCommand() parameters optional.

adele's avatar
adele committed
1863 1864 1865 1866 1867 1868 1869 1870 1871 1872
2007-03-10  Adele Peterson  <adele@apple.com>

        Reviewed by Maciej.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=13028
        REGRESSION: textField:doCommandBySelector:inFrame: not being called properly

        * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
          Before calling the base class defaultEventHandler, which will call handleKeypress, call doTextFieldCommandFromEvent.        

ddkilzer's avatar
ddkilzer committed
1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887
2007-03-10  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13013
          REGRESSION: Selection box does not scroll to where the focus jumps when pressing an alphanumeric key

        Test: fast/forms/listbox-typeahead-scroll.html

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::setSelectedIndex): Reordered to set the active selection's
        anchor and end before selecting the option, since the active selection is used to
        decide where to scroll when the selection is made.
        (WebCore::HTMLSelectElement::defaultEventHandler): Removed redundant check.

ddkilzer's avatar
ddkilzer committed
1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913
2007-03-10  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12973
          REGRESSION: Reproducible assert while loading this test file if css is already in the cache

        Test: fast/dom/css-cached-import-rule.html

        Replaced some direct calls to document->stylesheetLoaded() with calls to
        the sheet's checkLoaded(). The latter calls back to the element's sheetLoaded() --
        which notifies the document of the load -- and then updates the sheet's
        loadCompleted() flag, ensuring that it stays in sync with whether the stylesheet
        is still considered pending by the document.

        * dom/ProcessingInstruction.cpp:
        (WebCore::ProcessingInstruction::parseStyleSheet):
        * dom/StyleElement.cpp:
        (WebCore::StyleElement::childrenChanged):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):
        (WebCore::HTMLLinkElement::setCSSStyleSheet):
        * ksvg2/svg/SVGStyleElement.cpp:
        (WebCore::SVGStyleElement::sheetLoaded):
        * ksvg2/svg/SVGStyleElement.h:

ddkilzer's avatar
ddkilzer committed
1914 1915 1916 1917 1918 1919 1920 1921 1922 1923
2007-03-10  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=9609
          REGRESSION: Missing image icon needs to be moved back to WebKit

        * WebCore.exp: Export WebCore::Image::loadPlatformResource(const char*) for use in
        [WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:].

darin's avatar
darin committed
1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937
2007-03-09  Darin Adler  <darin@apple.com>

        Reviewed by Justin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=8928
          <rdar://problem/5045708> REPRODUCIBLE ASSERT: Cannot paste HTML into a
          contenteditable region in an XHTML document (8928)

        Test: editing/pasteboard/paste-xml.xhtml

        * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Added a check for 0
        here, since createContextualFragment can return 0 for XML documents that fail
        to parse. In my testing, callers all seem equipped to handle 0.

weinig's avatar
weinig committed
1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963
2007-03-09  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=9929
          REGRESSION: crash on logging in on mijnpostbank.nl

        Test: http/tests/misc/onload-remove-iframe-crash-2.html

        The resulted from an iframe's load event handler removing the iframe
        from the document.

        * dom/Document.cpp:
        (WebCore::Document::implicitClose): Bail out early if an event handler
        removed the frame.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::FrameLoader):
        (WebCore::FrameLoader::clear):
        (WebCore::FrameLoader::checkCompleted): Protect the frame from deletion
        by event handlers.
        (WebCore::FrameLoader::checkCompletedTimerFired):
        (WebCore::FrameLoader::scheduleCheckCompleted):
        (WebCore::FrameLoader::detachFromParent): Schedule a completion check
        on the parent (in case the child is what has been keeping it from completing).
        * loader/FrameLoader.h:

ddkilzer's avatar
ddkilzer committed
1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976
2007-03-08  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Beth.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13019
          REGRESSION (r20074): Forms don't submit on a variety of websites

        No tests added since LayoutTests/fast/forms/document-write.html was timing out
        and causing a layout test failure.

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::submit): Removed stray code.

kjk's avatar
kjk committed
1977 1978 1979 1980 1981 1982 1983
2007-03-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Not reviewed - gdk build fix.

        * platform/graphics/cairo/ImageSourceCairo.cpp:
        (WebCore::ImageSource::frameIsCompleteAtIndex): add empty stub

justing's avatar
justing committed
1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005
2007-03-08  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by harrison
        
        <rdar://problem/4903193> 
        On particular page, Copy is so slow it seems like a hang
        
        ~2x speedup copying:
        http://shakespeare.mit.edu/henryviii/full.html 
        Also produces less bloated markup.

        * editing/markup.cpp:
        (WebCore::startMarkup): Don't wrap text nodes in style spans.
        For Elements, don't inline styles inherited from ancestors.
        (WebCore::createMarkup): No longer necessary to find 
        the root's default style and pass it to startMarkup.
        Add a wrapper span around the markup with the styles
        that all nodes in the markup inherit (the inheritable 
        styles from the common ancestor container's computed style).
        Added a FIXME about unecessary markup for inline ancestors 
        up to the commonAncestorBlock.

darin's avatar
darin committed
2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030
2007-03-08  Darin Adler  <darin@apple.com>

        Reviewed by Adele.

        - <rdar://problem/4470381> multipart/form-data boundary security vulnerability

        By making the form data boundary a string with some random data in it, we reduce
        the possibility that anyone could take advantage of it by creating a file that
        intentionally has the boundary string in it.

        * html/HTMLFormElement.h: Removed boundary(), setBoundary(), and m_boundary.
        Marked a lot more stuff private.
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::HTMLFormElement): Removed code to initialize
        m_boundary.
        (WebCore::randomNumber): Added. Function that returns a random number, including
        seeding the random number generator the first time it's called. For now, usees the more
        random function random() on Mac OS X and the more-standard rand() on other platforms.
        (WebCore::HTMLFormElement::formData): Take a parameter with the form boundary string,
        and use that instead of m_boundary.
        (WebCore::getUniqueBoundaryString): Added. Makes a boundary string using random numbers
        and base 64 encoding.
        (WebCore::HTMLFormElement::submit): Call getUniqueBoundaryString and pass the boundary
        string into formData for multipart form posts.

mjs's avatar
mjs committed
2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064
2007-03-08  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Adele.
        
        <rdar://problem/4646563> REGRESSION: Unable to send text message from Verizon text message website: vtext.com (12588)
        http://bugs.webkit.org/show_bug.cgi?id=12588

        Carefully revised which focus operations restore previous selection, which clear it, and which
        select the whole control contents.
        
        Tests:
        fast/forms/focus-selection-input.html
        fast/forms/focus-selection-textarea.html
        
        * dom/Element.cpp:
        (WebCore::Element::focus):
        * dom/Element.h:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::focus):
        (WebCore::HTMLInputElement::accessKeyAction):
        * html/HTMLInputElement.h:
        * html/HTMLLabelElement.cpp:
        (WebCore::HTMLLabelElement::focus):
        (WebCore::HTMLLabelElement::accessKeyAction):
        * html/HTMLLabelElement.h:
        * html/HTMLLegendElement.cpp:
        (WebCore::HTMLLegendElement::focus):
        * html/HTMLLegendElement.h:
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::focus):
        * html/HTMLTextAreaElement.h:
        * page/FocusController.cpp:
        (WebCore::FocusController::advanceFocus):

justing's avatar
justing committed
2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079
2007-03-08  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by harrison

        <http://bugs.webkit.org/show_bug.cgi?id=12244>
        FCKeditor: Find dialog doesn't work

        * bindings/js/kjs_window.cpp:
        (KJS::Window::find): Added.  This function doesn't yet 
        support whole word searches, searching in subframes, or
        opening the find dialog.
        (KJS::WindowFunc::callAsFunction):
        * bindings/js/kjs_window.h:
        (KJS::Window::):

2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094
2007-03-08  David Hyatt  <hyatt@apple.com>

        Fix regression from throwing away frames of large animated images.  Alter
        animated images so that they refuse to advance the animation until the
        current displayed frame has been fully decoded.

        Reviewed by ggaren

        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::startAnimation):
        (WebCore::BitmapImage::advanceAnimation):
        * platform/graphics/ImageSource.h:
        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::frameIsCompleteAtIndex):

2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106
2007-03-08  David Hyatt  <hyatt@apple.com>

        Fix 2% performance regression on the PLT.  Increase the large animated
        image cutoff from 1MB to 5MB.

        In addition when pruning we will aggressively discard image sources.

        Reviewed by ggaren

        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::destroyDecodedData):

thatcher's avatar
thatcher committed
2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127
2007-03-08  Timothy Hatcher  <timothy@apple.com>

        Reviewed by John.

        <rdar://problem/4664697> highlighter SPI needs a node parameter to give more context

        Pass the RenderObject's node to customHighlightLineRect and paintCustomHighlight.

        * page/Frame.h:
        * page/mac/FrameMac.mm:
        (WebCore::Frame::customHighlightLineRect):
        (WebCore::Frame::paintCustomHighlight):
        * page/mac/WebCoreFrameBridge.h:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintCustomHighlight):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintCustomHighlight):
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::addHighlightOverflow):
        (WebCore::RootInlineBox::paintCustomHighlight):

justing's avatar
justing committed
2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140
2007-03-08  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by harrison
        
        <http://bugs.webkit.org/show_bug.cgi?id=13000>
        Range.createContextualFragment is not supported

        * dom/Range.cpp:
        (WebCore::Range::createContextualFragment): The
        "startContainer" may not be a container, if the
        range starts inside text.  In that case, look
        to the parent of the start node for an HTMLElement.

justing's avatar
justing committed
2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151
2007-03-08  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by harrison
        
        <rdar://problem/5049671>
        Gmail Editor: With linked text, Remove Formatting doesn't always remove underline

        * editing/Editor.cpp:
        (WebCore::Editor::removeFormattingAndStyle): Clear removed
        anchors after the deletion.

ddkilzer's avatar
ddkilzer committed
2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165
2007-03-08  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by NOBODY (build fix).

        Added missing file for r20059:
        <rdar://problem/4708689> -- REGRESSION: Some symbols with 2-byte display as garbage in Hotmail.

        File was taken from this svn repository which contained versions of ucnv.h and ucnv_err.h
        that were identical to ours:
        http://source.icu-project.org/repos/icu/icu/tags/release-3-2/source/common/unicode/ucnv_cb.h

        * icu/unicode/ucnv_cb.h: Added.

2007-03-08  Shrikant Gangoda  <shrikant.gangoda@celunite.com>
2166 2167 2168 2169 2170 2171 2172

        Gdk build fix.

        * platform/graphics/cairo/ImageSourceCairo.cpp:
        (WebCore::ImageSource::~ImageSource):
        (WebCore::ImageSource::clear):

2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192
2007-03-08  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        To match old TEC behaviour when using ICU we need to use 
        a few manual fallback encodings for the GBK/EUC-CN charsets

        <rdar://problem/4708689> -- REGRESSION: Some symbols with 2-byte display as garbage in Hotmail.

        * platform/TextCodecICU.cpp:
        (WebCore::TextCodecICU::TextCodecICU):
        (WebCore::TextCodecICU::createICUConverter):
        (WebCore::gbkEscapes):
        (WebCore::gbkCallbackEscape):
        (WebCore::gbkCallbackSubstitute):
        (WebCore::TextCodecICU::encode):
        * platform/TextCodecICU.h:
        (WebCore::TextCodecICU::needsGBKFallbacks):
        (WebCore::TextCodecICU::setNeedsGBKFallbacks):

ap's avatar
ap committed
2193 2194 2195 2196 2197 2198 2199
2007-03-08  Alexey Proskuryakov  <ap@webkit.org>

        Build fix.

        * xml/XPathUtil.cpp:
        (WebCore::XPath::stringValue):

2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221
2007-03-08  David Hyatt  <hyatt@apple.com>

        This patch dramatically reduces the memory consumed by animated images.  For large animated GIFs (defined for
        now as >1mb in terms of decoded frame buffer size), we will now aggressively flush previous frames of the
        animated GIF and just re-decode them on the fly if the animation loops.

        Whenever a large animated GIF has its animation reset, we will also just throw out everything and start
        the animation over (in order to get rid of any cached detritus held in the ImageSource).

        With this patch and the sample GIF used to test, WebKit's memory consumption went from 160MB down to 16MB.

        Reviewed by mjs

        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::destroyDecodedData):
        (WebCore::BitmapImage::resetAnimation):
        (WebCore::BitmapImage::advanceAnimation):
        * platform/graphics/ImageSource.h:
        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::~ImageSource):
        (WebCore::ImageSource::clear):

ap's avatar
ap committed
2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233
2007-03-08  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=13006
        XPath string-value is broken for some node types

        Test: fast/xpath/string-value.html

        * xml/XPathUtil.cpp:
        (WebCore::XPath::stringValue): Fix it :-)

andersca's avatar
andersca committed
2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253
2007-03-07  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Adam.

        <rdar://problem/4981000> 
        http://bugs.webkit.org/show_bug.cgi?id=12634
        REGRESSION: crash loading web archive (12634)
        
        The reason this bug wasn't always reproducible is that it involved sending an event to a plugin while 
        the page was loading. Before we send the event to the plugin we defer loads. The problem was that
        MainResourceLoader::setDefersLoad would not work with data loads.
        
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::setRequest):
        Only set m_committed to false if we also have a valid unreachable URL.
        
        * loader/MainResourceLoader.cpp:
        (WebCore::MainResourceLoader::setDefersLoading):
        Make sure to stop and start data loads.

kjk's avatar
kjk committed
2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266
2007-03-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Not reviewed.

        Gdk build fixes.

        * platform/gdk/EditorClientGdk.cpp:
        (WebCore::EditorClientGdk::handleKeypress): renamed
        (WebCore::EditorClientGdk::handleInputMethodKeypress): add a stub
        * platform/gdk/EditorClientGdk.h:
        * platform/graphics/cairo/ImageSourceCairo.cpp:
        (WebCore::ImageSource::destroyFrameAtIndex): add a stub

weinig's avatar
weinig committed
2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332
2007-03-07  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=13004
        Repeatedly calling XPathExpression.evaluate() causes crashes or memory leaks

        Removed XPath::Expression::optimize() and related methods, since they were buggy and almost useless.
        Merged doEvaluate() into evaluate(), since this was all evaluate() was doing after the above changes.

        Test: fast/xpath/evaluate-twice.html

        * xml/XPathExpression.cpp:
        (WebCore::XPathExpression::evaluate):
        * xml/XPathExpressionNode.cpp:
        (WebCore::XPath::Expression::Expression):
        (WebCore::XPath::Expression::~Expression):
        * xml/XPathExpressionNode.h:
        * xml/XPathFunctions.cpp:
        (WebCore::XPath::FunLast::evaluate):
        (WebCore::XPath::FunPosition::evaluate):
        (WebCore::XPath::FunId::evaluate):
        (WebCore::XPath::FunLocalName::evaluate):
        (WebCore::XPath::FunNamespaceURI::evaluate):
        (WebCore::XPath::FunName::evaluate):
        (WebCore::XPath::FunCount::evaluate):
        (WebCore::XPath::FunString::evaluate):
        (WebCore::XPath::FunConcat::evaluate):
        (WebCore::XPath::FunStartsWith::evaluate):
        (WebCore::XPath::FunContains::evaluate):
        (WebCore::XPath::FunSubstringBefore::evaluate):
        (WebCore::XPath::FunSubstringAfter::evaluate):
        (WebCore::XPath::FunSubstring::evaluate):
        (WebCore::XPath::FunStringLength::evaluate):
        (WebCore::XPath::FunNormalizeSpace::evaluate):
        (WebCore::XPath::FunTranslate::evaluate):
        (WebCore::XPath::FunBoolean::evaluate):
        (WebCore::XPath::FunNot::evaluate):
        (WebCore::XPath::FunTrue::evaluate):
        (WebCore::XPath::FunLang::evaluate):
        (WebCore::XPath::FunFalse::evaluate):
        (WebCore::XPath::FunNumber::evaluate):
        (WebCore::XPath::FunSum::evaluate):
        (WebCore::XPath::FunFloor::evaluate):
        (WebCore::XPath::FunCeiling::evaluate):
        (WebCore::XPath::FunRound::evaluate):
        * xml/XPathPath.cpp:
        (WebCore::XPath::Filter::evaluate):
        (WebCore::XPath::LocationPath::evaluate):
        (WebCore::XPath::Path::evaluate):
        * xml/XPathPath.h:
        * xml/XPathPredicate.cpp:
        (WebCore::XPath::Number::evaluate):
        (WebCore::XPath::StringExpression::evaluate):
        (WebCore::XPath::Negative::evaluate):
        (WebCore::XPath::NumericOp::evaluate):
        (WebCore::XPath::EqTestOp::evaluate):
        (WebCore::XPath::LogicalOp::evaluate):
        (WebCore::XPath::Union::evaluate):
        * xml/XPathPredicate.h:
        * xml/XPathStep.cpp:
        * xml/XPathStep.h:
        * xml/XPathVariableReference.cpp:
        (WebCore::XPath::VariableReference::evaluate):
        * xml/XPathVariableReference.h:

weinig's avatar
weinig committed
2333 2334 2335 2336 2337 2338 2339 2340
2007-03-07  Sam Weinig  <sam@webkit.org>

        Reviewed by Tim H.

        Remove unused #import from Objective-C bindings and cleanup the order of #imports.

        * bindings/scripts/CodeGeneratorObjC.pm:

weinig's avatar
weinig committed
2341 2342 2343 2344 2345 2346 2347 2348
2007-03-07  Sam Weinig  <sam@webkit.org>

        Reviewed by Tim H.

        Make sure the baseURI attribute generates for private Objective-C bindings.

        * dom/Node.idl:

andersca's avatar
andersca committed
2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365
2007-03-07  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Maciej.

        <rdar://problem/4874059>
        REGRESSION: Painter IX:register - Crash in WebCore:: ResourceLoader::willSendRequest()

        If a load is done from inside of an error delegate method that is called because we cancel another load, 
        the first load should be ignored since this is what shipping WebKit does. 
        
        (Actually, it does load the page in the data source but doesn't do anything with it since the data source
        won't have a web frame).
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::load):
        Just bail out if m_isStoppingLoad is true.

2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376
2007-03-07  David Hyatt  <hyatt@apple.com>

        Use CGImageRelease instead of CFRelease.

        Reviewed by aroben

        * platform/graphics/cg/ImageCG.cpp:
        (WebCore::FrameData::clear):
        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::destroyFrameAtIndex):

2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398
2007-03-07  David Hyatt  <hyatt@apple.com>

        Fix a regression where the cache size overflows because of a double
        subtraction per resource when they got removed from the cache.  Add an
        assert to adjustSize to detect this case in the future.

        Fix ImageSourceCG so that when we flush decoded data from our cache that
        we also flush it from the ImageSource.

        Reviewed by mjs

        * loader/Cache.cpp:
        (WebCore::Cache::adjustSize):
        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::~BitmapImage):
        (WebCore::BitmapImage::destroyDecodedData):
        * platform/graphics/Image.h:
        * platform/graphics/ImageSource.h:
        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::setData):
        (WebCore::ImageSource::destroyFrameAtIndex):

2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
2007-03-07  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13002
          Incomplete repaint of inset outlines

        Test: fast/repaint/outline-inset.html

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::repaintAfterLayoutIfNeeded):

2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421
2007-03-07  Oliver Hunt  <oliver@apple.com>

        Reviewed by Antti.

        Reset mouse down/drag state variables on mouse button release
        
        Fixes <rdar://problem/5044654>: Drag out of some QuickTime plug-ins converting into image drag

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMouseReleaseEvent):

adele's avatar
adele committed
2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446