ChangeLog 1.83 MB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
2009-09-30  Dave Hyatt  <hyatt@apple.com>

        Reviewed by Tim Hatcher.

        Make sure the removal of user stylesheets results in all of the WebViews being updated to
        reflect the changes.

        * page/PageGroup.cpp:
        (WebCore::PageGroup::removeUserContentWithURLForWorld):
        (WebCore::PageGroup::removeUserContentForWorld):

12 13 14 15 16 17 18 19 20 21 22 23 24
2009-09-30  Dan Bernstein  <mitz@apple.com>

        Reviewed by Sam Weinig.

        REGRESSION(r47440): drop down menus at americanexpress.com disappear on mouse out
        https://bugs.webkit.org/show_bug.cgi?id=29209

        Test: fast/inline/relative-positioned-overflow.html

        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::computeVerticalOverflow): Add self-painting
        inlines to overflow to ensure that they are included in hit-testing.

25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
2009-09-30  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Mark Rowe.

        transforms/3d tests are not run in Release builds
        https://bugs.webkit.org/show_bug.cgi?id=29827

        Make sure we export the WebCoreHas3DRendering symbol in Release builds,
        because this symbols is used by run-webkit-tests (via 'nm') to detect whether
        WebCore was built with ENABLE_3D_RENDERING turned on.

        * DerivedSources.make:
        * WebCore.3DRendering.exp: Added.
        * WebCore.xcodeproj/project.pbxproj:

40 41 42 43 44 45
2009-09-30  Jeremy Orlow  <jorlow@chromium.org>

        Build fix for QT.  Didn't know WebCore.pro existed.

        * WebCore.pro:

46 47 48 49 50 51 52 53 54 55
2009-09-30  Dave Hyatt  <hyatt@apple.com>

        Reviewed by Adam Roben.

        Add a method for removal of user scripts and stylesheets by URL from a specific world.

        * page/PageGroup.cpp:
        (WebCore::PageGroup::removeUserContentURLForWorld):
        * page/PageGroup.h:

56 57 58 59 60 61 62 63 64 65 66
2009-09-30  Chris Hawk  <hawk@chromium.org>

        Reviewed by Dimitri Glazkov.

        Fix for conditionals in the WebCore gyp file, which contained two separate
        'conditions' values for the webcore target. The first entry was ignored,
        resulting in some missine defines.
        https://bugs.webkit.org/show_bug.cgi?id=29907

        * WebCore.gyp/WebCore.gyp:

67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
2009-09-21  Jeremy Orlow  <jorlow@chromium.org>

        Reviewed by Adam Barth.

        DOM Storage needs to be more careful about where "ThreadSafe" objects are destroyed.
        https://bugs.webkit.org/show_bug.cgi?id=29265

        DOM Storage needs to be more careful about where "ThreadSafe" objects are
        destroyed.  With the current code, there actually isn't a race condition, but
        it sure would be easy for someone to introduce one.  A bunch of
        ThreadSafeShared objects have RefPtrs to objects that are NOT ThreadSafeShared
        objects.  If it were possible any of these objects' destructors to be fired off
        the main thread, then the you'd have a race condition.  The code should be more
        clear and self-documenting about how things related to each other.

        Since the lifetime of a LocalStorageTask is bounded by the LocalStorageThread
        which is bounded by the StorageSyncManager, StorageAreaImpl, and
        StorageAreaSync, there's no reason for LocalStorageTask to store anything other
        than pointers.  By breaking this dependency, we can eliminate the risk.

        Note that we _could_ have LocalStorageThread's task queue just store
        LocalStorageTask*'s rather than RefPtr<LocalStorageTask>s but then we'd need to
        manually take care of deleting.  It'd probably also be possible to change
        LocalStorageThread around so that it needn't hold onto a reference of itself
        and have a more deterministic shutdown, but my initial attempts to do so
        failed, and I decided it wasn't worth changing.  The queue is killed before
        hand, so the thread is 100% impotent before the main thread continues anyway.

        The constructors and destructors of StorageSyncManager, StorageAreaImpl, and
        StorageAreaSync now have ASSERTs to verify they're running on the main thread. 
        I'm fairly positive that it'd be impossible to hit these asserts and the fact
        that these classes are no longer ThreadSafeShared should make it clear how
        they're meant to be used, but I think it's worth it to be extra sure.  Of
        course, ideally, we'd have such an assert every time a ref is incremented or
        decremented.

        Behavior should be unchanged and this is just an internal code cleanup, so no
        new tests.

        * storage/LocalStorageTask.cpp:
        (WebCore::LocalStorageTask::LocalStorageTask):
        (WebCore::LocalStorageTask::performTask):
        * storage/LocalStorageTask.h:
        (WebCore::LocalStorageTask::createImport):
        (WebCore::LocalStorageTask::createSync):
        (WebCore::LocalStorageTask::createTerminate):
        * storage/LocalStorageThread.cpp:
        (WebCore::LocalStorageThread::scheduleImport):
        (WebCore::LocalStorageThread::scheduleSync):
        * storage/LocalStorageThread.h:
        * storage/StorageArea.h:
        * storage/StorageAreaImpl.cpp:
        (WebCore::StorageAreaImpl::~StorageAreaImpl):
        (WebCore::StorageAreaImpl::StorageAreaImpl):
        * storage/StorageAreaSync.cpp:
        (WebCore::StorageAreaSync::StorageAreaSync):
        (WebCore::StorageAreaSync::~StorageAreaSync):
        * storage/StorageSyncManager.cpp:
        (WebCore::StorageSyncManager::StorageSyncManager):
        (WebCore::StorageSyncManager::~StorageSyncManager):
        (WebCore::StorageSyncManager::scheduleImport):
        (WebCore::StorageSyncManager::scheduleSync):
        * storage/StorageSyncManager.h:

131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
2009-09-28  Jeremy Orlow  <jorlow@chromium.org>

        Reviewed by Darin Fisher.

        Chromium needs to be able to override the way storage events are delivered
        https://bugs.webkit.org/show_bug.cgi?id=29655

        Chromium needs to be able to override the way storage events are delivered.
        This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
        faster (no vtables and extra allocation) and somewhat cleaner (no dependency
        injection).  This is necessary because Chromium needs to transport events across
        a process barrier and then dispatch them without use of a Frame*.

        Behavior should not change with this, so no updates to tests.

        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * storage/StorageAreaImpl.cpp:
        (WebCore::StorageAreaImpl::setItem):
        (WebCore::StorageAreaImpl::removeItem):
        (WebCore::StorageAreaImpl::clear):
        * storage/StorageAreaImpl.h:
        * storage/StorageEventDispatcher.cpp: Copied from WebCore/storage/StorageAreaImpl.cpp.
        (WebCore::StorageEventDispatcher::dispatch):
        * storage/StorageEventDispatcher.h: Added.  (Well, technically in the other half of this patch.)

160 161 162 163 164 165 166 167 168 169 170 171
2009-09-30  Jian Li  <jianli@chromium.org>

        Reviewed by Darin Adler.

        Need to check NULL frame in EventHandler::updateDragAndDrop.
        https://bugs.webkit.org/show_bug.cgi?id=29929

        Test: http/tests/misc/drag-over-iframe-invalid-source-crash.html

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

172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
2009-09-29  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dan Bernstein.

        ASSERTION FAILED: !repaintContainer || repaintContainer == this
        https://bugs.webkit.org/show_bug.cgi?id=29755
        
        Generalize the fix for this bug to account for cases where there may be multiple
        containing blocks between the repaint container, and the container of the element
        being repainted.

        Test: compositing/repaint/opacity-between-absolute2.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::mapLocalToContainer):
        Call offsetFromAncestorContainer() to get the correct offset.
        
        (WebCore::RenderBox::computeRectForRepaint): Ditto
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::computeRectForRepaint): Ditto.
        
        * rendering/RenderObject.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::offsetFromAncestorContainer):
        New method that computes an offset from some object in the ancestor container() chain.

198 199 200 201 202 203 204 205 206 207
2009-09-30  Andras Becsi  <becsi.andras@stud.u-szeged.hu>

        Reviewed by Simon Hausmann.

        [Qt] Fix TextCodecQt::decode method after r48752 to return a non-null string if the length of the input is 0.
        This fixes https://bugs.webkit.org/show_bug.cgi?id=29736.

        * platform/text/qt/TextCodecQt.cpp:
        (WebCore::TextCodecQt::decode):

208 209 210 211 212 213 214 215 216 217 218 219
2009-09-29  Dave Hyatt  <hyatt@apple.com>

        Reviewed by Jon Honeycutt.

        Fix a couple of bugs with patterns.  Move the setting of the document URL to before the style
        selector gets constructed so that pattern match testing gets the correct URL.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::begin):
        * page/UserContentURLPattern.cpp:
        (WebCore::UserContentURLPattern::parse):

220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
2009-09-29  Alexey Proskuryakov  <ap@apple.com>

        Rubber-stamped by Brady Eidson.

        Assertion failure in http/tests/xmlhttprequest/failed-auth.html.

        I couldn't find out why this only started to happen now, but it was incorrect to check
        persistence of a credential returned by CredentialStorage::get() without checking that it
        was non-null. When there is no credential for the protection space in storage, get()
        returns a new object, and Credentil constructor doesn't initialize m_persistence.

        * platform/network/mac/ResourceHandleMac.mm:
        (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Moved the
        assertion after credential null check.
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Added the same persistence
        assertion, matching sync code (and CF one, as well).

237 238 239 240 241 242 243 244 245 246
2009-09-29  Yong Li  <yong.li@torchmobile.com>

        Reviewed by Darin Adler.

        Add an ASSERT for UTF8Encoding().isValid()
        https://bugs.webkit.org/show_bug.cgi?id=29908

        * platform/text/TextEncoding.cpp:
        (WebCore::UTF8Encoding):

247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
2009-09-29  Dave Hyatt  <hyatt@apple.com>

        Reviewed by Jon Honeycutt.

        https://bugs.webkit.org/show_bug.cgi?id=29892
        Add support for whitelist patterns to control conditional injection of user scripts and
        user stylesheets.

        No new tests. Not testable until WebKit portion is added in followup patch.

        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::pageGroupUserSheets):
        * page/Frame.cpp:
        (WebCore::Frame::injectUserScriptsForWorld):
        * page/UserContentURLPattern.cpp: Added.
        (WebCore::UserContentURLPattern::matchesPatterns):
        (WebCore::UserContentURLPattern::parse):
        (WebCore::UserContentURLPattern::matches):
        (WebCore::UserContentURLPattern::matchesHost):
        (WebCore::MatchTester::MatchTester):
        (WebCore::MatchTester::testStringFinished):
        (WebCore::MatchTester::patternStringFinished):
        (WebCore::MatchTester::eatWildcard):
        (WebCore::MatchTester::eatSameChars):
        (WebCore::MatchTester::test):
        (WebCore::UserContentURLPattern::matchesPath):
        * page/UserContentURLPattern.h: Added.
        (WebCore::UserContentURLPattern::UserContentURLPattern):
        (WebCore::UserContentURLPattern::scheme):
        (WebCore::UserContentURLPattern::host):
        (WebCore::UserContentURLPattern::path):
        (WebCore::UserContentURLPattern::matchSubdomains):

285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
2009-09-29  Enrica Casucci  <enrica@apple.com>

        Reviewed by Adele Peterson.

        Reproducible crash pressing return inside quoted content
        at WebCore::BreakBlockquoteCommand::doApply.
        <rdar://problem/7085453>
        In some case, like the one provided in the test case, m_downStreamEnd
        refers to a node that gets deleted when executing the DeleteSelectionCommand.
        We shouldn't use m_downStreamEnd to recalculate the new m_endPosition when
        pruning is needed, because it may be point to a node that has been deleted, but
        rather rely on removeNode in CompositeEditCommand to update m_endPosition correctly.

        Test: editing/selection/blockquote-crash.html

        * editing/BreakBlockquoteCommand.cpp:
        (WebCore::BreakBlockquoteCommand::doApply): Added check for invalid position
        to avoid dereferencing a null node pointer.
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::mergeParagraphs): Don't reset m_endPosition
        using the value in m_downStreamEnd when it is necessary to prune the start block.
        
ap@apple.com's avatar
ap@apple.com committed
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321
2009-09-29  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Brady Eidson.

        Basic authentication credentials are not sent automatically to top resources
        https://bugs.webkit.org/show_bug.cgi?id=29901

        No new tests - I don't want to pollute root directory of http tests to check for this rather
        minor issue.

        * platform/network/CredentialStorage.cpp:
        (WebCore::CredentialStorage::set): Changed to always preserve leading slash.
        (WebCore::CredentialStorage::getDefaultAuthenticationCredential): Made breaking out of the
        loop more explicit.

322 323 324 325 326 327 328 329 330 331 332 333 334
2009-09-29  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Oliver Hunt.

        Web Inspector REGRESSION(r47820-r47822): Profiles aren't
        added to the inspector unless the inspector is already open
        when the profile completes.

        https://bugs.webkit.org/show_bug.cgi?id=29897

        * inspector/front-end/ProfilesPanel.js:
        (WebInspector.ProfilesPanel.prototype._populateProfiles):

335 336 337 338 339 340 341 342 343 344 345 346
2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Rubberstamped by David Hyatt.

        Fix to logic of earlier commit 48902.

        When merging two if's before committing, I forgot to invert the
        bool check.

        * platform/network/qt/QNetworkReplyHandler.cpp:
        (WebCore::ignoreHttpError):

347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
2009-09-29  Stephen White  <senorblanco@chromium.org>

        Unreviewed, build fix.

        Fixing Chromium build, following r48884.

        [https://bugs.webkit.org/show_bug.cgi?id=29894]

        * bindings/v8/V8AbstractEventListener.cpp:
        (WebCore::V8AbstractEventListener::handleEvent):
        * bindings/v8/V8AbstractEventListener.h:
        * bindings/v8/V8WorkerContextEventListener.cpp:
        (WebCore::V8WorkerContextEventListener::handleEvent):
        * bindings/v8/V8WorkerContextEventListener.h:

362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
2009-09-29  Kent Tamura  <tkent@chromium.org>

        Reviewed by Darin Adler.

        Follows HTML5's maxLength change in September 2009.
        - Change HTMLTextAreaElement.maxLength type to signed.
        - HTMLTextAreaElement.maxLength returns -1 if maxlength= attribute is missing.
        - HTMLTextAreaElement.maxLength and HTMLInputElement.maxLength
          throw INDEX_SIZE_ERR for setting negative values.
        https://bugs.webkit.org/show_bug.cgi?id=29796

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::setMaxLength):
        * html/HTMLInputElement.h:
        * html/HTMLInputElement.idl:
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
        (WebCore::HTMLTextAreaElement::maxLength):
        (WebCore::HTMLTextAreaElement::setMaxLength):
        * html/HTMLTextAreaElement.h:
        * html/HTMLTextAreaElement.idl:

384 385 386 387 388 389 390 391
2009-09-29  Dimitri Glazkov  <dglazkov@chromium.org>

        No review, rolling out r48894, because review discussion was not complete.
        http://trac.webkit.org/changeset/48894

        * platform/sql/SQLiteTransaction.cpp:
        (WebCore::SQLiteTransaction::begin):

392 393 394 395 396 397 398 399 400 401 402 403 404 405 406
2009-09-29  Dirk Schulze  <krit@webkit.org>

        Reviewed by Nikolas Zimmermann.

        SVG Filter feComposite implementation is missing
        [https://bugs.webkit.org/show_bug.cgi?id=28362]

        feComposite implementation for SVG.

        Test: svg/filters/feComposite.svg

        * platform/graphics/filters/FEComposite.cpp:
        (WebCore::arithmetic):
        (WebCore::FEComposite::apply):

407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422
2009-09-29  Dumitru Daniliuc  <dumi@chromium.org>

        Reviewed by Dimitri Glazkov.

        Starting all read-only transactions with an explicit BEGIN
        DEFERRED command instead of BEGIN, since some ports (chromium)
        might compile their own SQLite library and set BEGIN to BEGIN
        IMMEDIATE by default; which would result in a deadlock in case of
        two concurrent read-only transactions on the same DB, and would
        unnecessarily delay other potential transactions to the same DB.

        https://bugs.webkit.org/show_bug.cgi?id=29729

        * platform/sql/SQLiteTransaction.cpp:
        (WebCore::SQLiteTransaction::begin):

dglazkov@chromium.org's avatar
dglazkov@chromium.org committed
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438
2009-09-29  Kenneth Russell  <kbr@google.com>

        Reviewed by Dimitri Glazkov.

        Add support for run-time flag for 3D canvas
        https://bugs.webkit.org/show_bug.cgi?id=29826

        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::getContext): Check page settings for
        experimental WebGL flag before returning 3D graphics context.
        * page/Settings.cpp:
        (WebCore::Settings::Settings): Initialize new flag to false.
        (WebCore::Settings::setExperimentalWebGLEnabled):
        * page/Settings.h: Set new flag.
        (WebCore::Settings::experimentalWebGLEnabled): Return new flag.

439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456
2009-09-29  Jeremy Orlow  <jorlow@chromium.org>

        Reviewed by Darin Fisher.

        Chromium needs to be able to override the way storage events are delivered - part 1
        https://bugs.webkit.org/show_bug.cgi?id=29889

        Chromium needs to be able to override the way storage events are delivered.
        This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
        faster (no vtables and extra allocation) and somewhat cleaner (no dependency
        injection).  This is necessary because Chromium needs to transport events across
        a process barrier and then dispatch them without use of a Frame*.

        This patch should be a no-op for all ports other than Chromium.

        * WebCore.gypi:
        * storage/StorageEventDispatcher.h: Added.

457 458 459 460 461 462 463 464
2009-09-29  Oliver Hunt  <oliver@apple.com>

        Reviewed by NOBODY (missed file).

        Adding file missed in previous commit.

        * manual-tests/gtk/resources/long_cell.cur: Copied from WebCore/dom/PositionCreationFunctions.h.

465 466 467 468 469 470 471 472 473 474 475 476 477 478
2009-09-29  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Darin Fisher.

        [V8] Correct an issue with XMLHttpRequest attribute event listeners never being cleared.
        https://bugs.webkit.org/show_bug.cgi?id=29888

        Test: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html

        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
        (WebCore::getEventListener): Added isAttribute parameter.
        (WebCore::ACCESSOR_SETTER): Made all event listener setters create attribute listeners.
        (WebCore::CALLBACK_FUNC_DECL): Made addEventListener create object listener.

479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495
2009-09-22  Martin Robinson  <martin.james.robinson@gmail.com>

        Reviewed by Eric Seidel.

        Fix corruption for non-square images.

        [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
        https://bugs.webkit.org/show_bug.cgi?id=29654

        Added an additional manual-test for this issue to the existing Gtk
        cursor image test.

        * manual-tests/gtk/cursor-image.html:
        * manual-tests/gtk/resources/long_cell.cur: Added.
        * platform/graphics/gtk/ImageGtk.cpp:
        (WebCore::BitmapImage::getGdkPixbuf):

ap@apple.com's avatar
ap@apple.com committed
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510
2009-09-29  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Timothy Hatcher.

        Build fix - pass a proper ScriptExecutipnContext to getEventListenerHandlerBody()

        * bindings/js/ScriptEventListener.cpp:
        (WebCore::getEventListenerHandlerBody):
        * bindings/js/ScriptEventListener.h:
        * bindings/v8/ScriptEventListener.cpp:
        (WebCore::getEventListenerHandlerBody):
        * bindings/v8/ScriptEventListener.h:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::buildObjectForEventListener):

511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528
2009-09-29  Nate Chapin  <japhet@chromium.org>

        Reviewed by Eric Seidel.

        Ensure that we don't scroll lock to an anchor node after a
        user-initiated scroll, even if that scroll doesn't propagate
        all the way up to FrameView.

        Test: fast/events/node-event-anchor-lock.html

        * page/EventHandler.cpp: Call setFrameWasScrolledByUser() when a scroll is handled by a node rather than a frame.
        (WebCore::EventHandler::scrollOverflow):
        (WebCore::EventHandler::handleWheelEvent):
        (WebCore::EventHandler::sendScrollEvent): Use setFrameWasScrolledByUser();
        (WebCore::EventHandler::setFrameWasScrolledByUser): Split out of sendScrollEvent();
        (WebCore::EventHandler::passMousePressEventToScrollbar):
        * page/EventHandler.h: Declare setFrameWasScrolledByUser().

529 530 531 532 533 534 535 536 537 538 539 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 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636
2009-09-28  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Darin Adler and Sam Weinig.

        Onclick not fired for an element copied with cloneContents() or cloneNode()
        https://bugs.webkit.org/show_bug.cgi?id=25130

        The change here is that JS event listeners don't keep a reference to a global object from
        where they were created, and instead take it as a parameter when parsing source code. Also,
        the listener creation won't fail just because it happens for an element in a frameless
        document.
        Thus, moving nodes between documents no longer results in having incorrect registered
        lazy event listeners on them.

        Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
               fast/events/attribute-listener-cloned-from-frameless-doc-context.html
               fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
               fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
               fast/events/attribute-listener-extracted-from-frameless-doc-context.html

        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
        (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
        getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
        (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
        (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
        (WebCore::JSEventListener::reportError): Ditto.

        * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
        to JSDOMGlobalObject.

        * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
        creation was split between this function and ScriptEventListener; moved it here, as JS
        global object can be different now.

        * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
        which can not be determined at parsing time.

        * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
        for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
        expect that errors are logged at document parsing time, and because I don't know what other
        side effects moving it vould have.

        * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
        because JSC needs a global context here.

        * bindings/js/JSAbstractWorkerCustom.cpp:
        (WebCore::JSAbstractWorker::addEventListener):
        (WebCore::JSAbstractWorker::removeEventListener):
        * bindings/js/JSDOMApplicationCacheCustom.cpp:
        (WebCore::JSDOMApplicationCache::addEventListener):
        (WebCore::JSDOMApplicationCache::removeEventListener):
        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::addEventListener):
        (WebCore::JSDOMWindow::removeEventListener):
        * bindings/js/JSEventSourceCustom.cpp:
        (WebCore::JSEventSource::addEventListener):
        (WebCore::JSEventSource::removeEventListener):
        * bindings/js/JSMessagePortCustom.cpp:
        (WebCore::JSMessagePort::addEventListener):
        (WebCore::JSMessagePort::removeEventListener):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::JSNode::addEventListener):
        (WebCore::JSNode::removeEventListener):
        * bindings/js/JSSVGElementInstanceCustom.cpp:
        (WebCore::JSSVGElementInstance::addEventListener):
        (WebCore::JSSVGElementInstance::removeEventListener):
        * bindings/js/JSWorkerContextCustom.cpp:
        (WebCore::JSWorkerContext::addEventListener):
        (WebCore::JSWorkerContext::removeEventListener):
        * bindings/js/JSXMLHttpRequestCustom.cpp:
        (WebCore::JSXMLHttpRequest::addEventListener):
        (WebCore::JSXMLHttpRequest::removeEventListener):
        * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
        (WebCore::JSXMLHttpRequestUpload::addEventListener):
        (WebCore::JSXMLHttpRequestUpload::removeEventListener):
        * bindings/objc/ObjCEventListener.h:
        * bindings/objc/ObjCEventListener.mm:
        (WebCore::ObjCEventListener::handleEvent):
        * bindings/scripts/CodeGeneratorJS.pm:
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::fireEventListeners):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::handleEvent):
        * inspector/InspectorDOMAgent.h:
        * inspector/InspectorDOMStorageResource.cpp:
        (WebCore::InspectorDOMStorageResource::handleEvent):
        * inspector/InspectorDOMStorageResource.h:
        * loader/ImageDocument.cpp:
        (WebCore::ImageEventListener::handleEvent):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::ConditionEventListener::handleEvent):
        * workers/WorkerContext.cpp:
        (WebCore::WorkerContext::reportException):
        Don't pass global object to JSEventListener::create(), which no longer needs it.
        Note that some of these functions still have an early return for null global object, which
        can probably be removed in a later patch.
        Pass ScriptExecutionContext to EventListener methods that now need it.

        * bindings/scripts/CodeGeneratorCOM.pm: Don't force EventTarget implementation on Node -
        it doesn't work yet (it didn't quite work before this patch, too, because it assumed that
        any object implementing EventTarget COM interface originated from WebCore).

        * dom/EventListener.idl: Just like in ObjC, EventListener should be a pure interface in
        COM bindings.

637 638 639 640 641 642 643 644 645 646 647 648 649 650
2009-09-28  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Removed virtual destructor from JSGlobalObjectData to eliminate pointer
        fix-ups when accessing JSGlobalObject::d.
        
        Replaced with an explicit destructor function pointer.

        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::JSDOMGlobalObject::destroyJSDOMGlobalObjectData):
        * bindings/js/JSDOMGlobalObject.h:
        (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):

651 652 653 654 655 656 657 658 659 660 661
2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Reviewed by Simon Hausmann.

        Don't rely on QNetworkReply::NetworkError codes, but
        on HTTP error codes instead.

        * platform/network/qt/QNetworkReplyHandler.cpp:
        (WebCore::ignoreHttpError):
        (WebCore::QNetworkReplyHandler::finish):

662 663 664 665 666 667 668 669 670
2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Reviewed by Simon Hausmann.

        Use const references when using Qt's foreach.

        * platform/network/qt/QNetworkReplyHandler.cpp:
        (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):

671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691
2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Reviewed by Simon Hausmann.

        Fix handling of QNetworkReply errors.

        In the QNetworkReplyHandler::finish() a response was sent even when
        the reply contained an error. This resulted in a sendResponseIfNeeded()
        calling didReceiveResponse on the client, leading to the destruction
        of the m_resourceHandle, discontinuing further processing in finish(),
        and thus not calling didFail on the client.

        Instead it continued as everything went fine, and
        FrameLoaderClientQt::dispatchDecidePolicyForMIMEType() changed the
        policy to PolicyDownload due to not being able to show the non existing
        MIMEType. As the download also obviously fails, it ended up with a
        policy change error.

        * platform/network/qt/QNetworkReplyHandler.cpp:
        (WebCore::QNetworkReplyHandler::finish):

692 693 694 695 696 697 698 699 700 701 702
2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Reviewed by Simon Hausmann.

        The code for showing error pages when the response was
        a 401/403/404, was not actually doing so. This patch
        fixes that.

        * platform/network/qt/QNetworkReplyHandler.cpp:
        (WebCore::QNetworkReplyHandler::finish):

ap@apple.com's avatar
ap@apple.com committed
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
2009-09-28  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Brady Eidson.

        <rdar://problem/7259965> REGRESSION: http/tests/xmlhttprequest/cross-origin-authorization.html
        is failing/crashing intermittently
        https://bugs.webkit.org/show_bug.cgi?id=29322

        This was caused by CStringBuffer::encodeBase64() returning a buffer that wasn't zero terminated.
        The code had other issues as well, so I removed it altogether:
        - it claimed to avoid some buffer copies, but it didn't;
        - and I don't think that base64 encoding should be part of CString interface.

        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::encodeBasicAuthorization): Encode username and password using Base64.h directly.
        (WebCore::ResourceHandle::start): Use encodeBasicAuthorization().
        (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Ditto.
        (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Extended logging
        to synchronous case.
        (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Ditto.
        (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Ditto.
        (-[WebCoreSynchronousLoader connection:didReceiveResponse:]): Ditto.
        (-[WebCoreSynchronousLoader connection:didReceiveData:]): Ditto.
        (-[WebCoreSynchronousLoader connectionDidFinishLoading:]): Ditto.
        (-[WebCoreSynchronousLoader connection:didFailWithError:]): Ditto.

        * platform/network/cf/ResourceHandleCFNet.cpp: Matched Mac changes.

        * platform/text/CString.cpp:
        * platform/text/CString.h:
        (WebCore::CStringBuffer::create):
        (WebCore::CStringBuffer::CStringBuffer):
        Removed code that was added for Base64 in r48363.

737 738 739 740 741 742 743 744 745 746 747
2009-09-29  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>

        Reviewed by Simon Hausmann.

        Fix typo in Localizations.cpp

        https://bugs.webkit.org/show_bug.cgi?id=29872

        * platform/qt/Localizations.cpp:
        (WebCore::localizedMediaControlElementHelpText):

748 749 750 751 752 753 754 755 756 757
2009-09-29  Simon Hausmann  <simon.hausmann@nokia.com>

        Reviewed by Tor Arne Vestbø.

        Make the XSLT conditional in DOMWindow.idl's xsltProcessor
        attribute conditional in the generated files, similar to
        r44116.

        * page/DOMWindow.idl:

758 759 760 761 762 763 764 765 766 767 768 769 770
2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Reviewed by Simon Hausmann and Tor Arne Vestbø.

        Use the ResourceError as it is supposed to and handle
        not HTTP errors from QNetworkReply.

        Thanks to Adam Roben for his input.

        * platform/network/qt/QNetworkReplyHandler.cpp:
        (WebCore::QNetworkReplyHandler::finish):

009-09-29  Pavel Feldman  <pfeldman@chromium.org>
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786

        Reviewed by Timothy Hatcher.

        Web Inspector: Encapsulate JS listeners specifics into ScriptEventListener.

        https://bugs.webkit.org/show_bug.cgi?id=29816

        * bindings/js/ScriptEventListener.cpp:
        (WebCore::getEventListenerHandlerBody):
        * bindings/js/ScriptEventListener.h:
        * bindings/v8/ScriptEventListener.cpp:
        (WebCore::getEventListenerHandlerBody):
        * bindings/v8/ScriptEventListener.h:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::buildObjectForEventListener):

787 788 789 790 791 792 793
2009-09-29  Xan Lopez  <xlopez@igalia.com>

        Unreviewed attempt to fix the build.

        * page/Settings.cpp:
        (WebCore::Settings::Settings):

794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812
2009-09-28  Fumitoshi Ukai  <ukai@chromium.org>

        Reviewed by Eric Seidel.

        Add experimentalWebSocketsEnabled in Settings.
        https://bugs.webkit.org/show_bug.cgi?id=28941

        * WebCore.base.exp:
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::webSocket):
        * bindings/v8/V8DOMWrapper.cpp:
        (WebCore::V8DOMWrapper::getConstructor):
        * bindings/v8/custom/V8WebSocketCustom.cpp:
        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        (WebCore::Settings::setExperimentalWebSocketsEnabled):
        * page/Settings.h:
        (WebCore::Settings::experimentalWebSocketsEnabled):
        
813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828
2009-09-11  Fumitoshi Ukai  <ukai@chromium.org>

        Reviewed by Adam Barth.

        Add platform code to support WebSocket for chromium.
        https://bugs.webkit.org/show_bug.cgi?id=29171

        To build within chromium tree, it requires a patch in bug 29174.
        Real implementation will be landed in chromium tree.

        * WebCore.gypi:
        * platform/network/chromium/SocketStreamError.h: Added.
        (WebCore::SocketStreamError::SocketStreamError):
        * platform/network/chromium/SocketStreamHandle.h: Added.
        (WebCore::SocketStreamHandle::create):

829 830 831 832 833 834 835 836 837 838 839
2009-09-28  Dan Bernstein  <mitz@apple.com>

        Reviewed by Sam Weinig.

        <rdar://problem/7157288> Crash in RenderStyle::computedLineHeight()
        when Times New Roman is not installed

        * platform/graphics/win/FontCacheWin.cpp:
        (WebCore::FontCache::getLastResortFallbackFont): If Times New Roman is
        not available, use the Windows default GUI font.

840 841 842 843 844 845 846 847 848 849 850 851 852
2009-09-28  Jian Li  <jianli@chromium.org>

        Reviewed by David Levin.

        Do not add platform-specific methods to cross-platform header
        FileSystem.h per Darin's feedback for 29109.
        https://bugs.webkit.org/show_bug.cgi?id=29830

        * platform/FileSystem.h:
        * platform/chromium/DragDataChromium.cpp:
        (WebCore::DragData::asURL):
        * platform/chromium/FileSystemChromium.cpp:

853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868
2009-09-28  Dumitru Daniliuc  <dumi@chromium.org>

        Reviewed by Dimitri Glazkov.

        Register Chromium's VFSs with a proper sqlite3_io_methods
        finder. This should only affect the POSIX implementation. The
        Windows change is included for consistency and in case sqlite
        starts using something similar in its Windows VFS in the future.

        https://bugs.webkit.org/show_bug.cgi?id=29743

        * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
        (WebCore::SQLiteFileSystem::registerSQLiteVFS):
        * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
        (WebCore::SQLiteFileSystem::registerSQLiteVFS):

869 870 871 872 873 874 875 876 877 878 879 880 881 882 883
2009-09-28  Nate Chapin  <japhet@chromium.org>

        Reviewed by Adam Barth.

        Change the V8 bindings' handling of window.toString(),
        so we return [object DOMWindow] (like JSC), not [object global].

        https://bugs.webkit.org/show_bug.cgi?id=29742

        This will fix a couple of Chromium port test failures and enable us to
        use the default expectations for a bunch more.

        * bindings/v8/custom/V8DOMWindowCustom.cpp: Use the DOMWindow wrapper instead
        of the global object wrapper when it's available in the DOMWindow toString callback.

884 885 886 887 888 889 890 891
2009-09-28  Nate Chapin  <japhet@chromium.org>

        Rubber stamped by David Levin.

        Chromium build fix, add back in #include of V8Proxy.h in V8WebKitPointConstructor.cpp.

        * bindings/v8/custom/V8WebKitPointConstructor.cpp: Re-include V8Proxy.h.

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 927 928 929 930 931 932 933 934 935
2009-09-28  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        NotNullPassRefPtr: smart pointer optimized for passing references that are not null
        https://bugs.webkit.org/show_bug.cgi?id=29822
        
        Added NotNullPassRefPtr, and deployed it in all places that initialize
        JavaScript objects.

        * bindings/js/DOMObjectWithSVGContext.h:
        (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
        * bindings/js/JSDOMBinding.cpp:
        (WebCore::cacheDOMStructure):
        * bindings/js/JSDOMBinding.h:
        (WebCore::DOMObject::DOMObject):
        (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
        (WebCore::DOMConstructorObject::DOMConstructorObject):
        (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
        * bindings/js/JSDOMGlobalObject.h:
        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::JSDOMWindowBase):
        * bindings/js/JSDOMWindowBase.h:
        * bindings/js/JSHTMLAllCollection.h:
        (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
        * bindings/js/JSInspectedObjectWrapper.cpp:
        (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
        * bindings/js/JSInspectedObjectWrapper.h:
        * bindings/js/JSInspectorCallbackWrapper.cpp:
        (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
        * bindings/js/JSInspectorCallbackWrapper.h:
        * bindings/js/JSQuarantinedObjectWrapper.cpp:
        (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
        * bindings/js/JSQuarantinedObjectWrapper.h:
        * bindings/js/JSWorkerContextBase.cpp:
        (WebCore::JSWorkerContextBase::JSWorkerContextBase):
        * bindings/js/JSWorkerContextBase.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        * bridge/runtime_object.cpp:
        (JSC::RuntimeObjectImp::RuntimeObjectImp):
        * bridge/runtime_object.h:

936 937 938 939 940 941 942 943 944 945 946
2009-09-28  Nate Chapin  <japhet@chromium.org>

        Reviewed by Dimitri Glazkov.

        Allow V8 to handle x/y parameters in a WebKitPoint constructor.
        https://bugs.webkit.org/show_bug.cgi?id=29823

        Fixes V8's handling of LayoutTests/fast/dom/Window/webkitConvertPoint.html

        * bindings/v8/custom/V8WebKitPointConstructor.cpp: Allow for x/y parameters in constructor.

947 948 949 950 951 952
2009-09-28  Mark Rowe  <mrowe@apple.com>

        Fix the build by doing something approximating reasonableness in the Xcode project.

        * WebCore.xcodeproj/project.pbxproj:

953 954 955 956 957 958
2009-09-28  Simon Hausmann  <hausmann@webkit.org>

        Prospective Tiger build fix.

        * WebCore.xcodeproj/project.pbxproj: Try to use unique IDs for the new files.

959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977
2009-09-28  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Web Inspector: Add explicit frontend event for commit load.

        https://bugs.webkit.org/show_bug.cgi?id=29814

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::didCommitLoad):
        * inspector/InspectorFrontend.cpp:
        (WebCore::InspectorFrontend::didCommitLoad):
        * inspector/InspectorFrontend.h:
        * inspector/front-end/DOMAgent.js:
        (WebInspector.DOMAgent.prototype._setDocument):
        * inspector/front-end/inspector.js:
        (WebInspector.addResource):
        (WebInspector.didCommitLoad):

978 979 980 981 982 983 984 985 986 987 988 989 990
2009-09-28  Yaar Schnitman  <yaar@chromium.org>

        Reviewed by Dimitri Glazkov.

        Chromium port - recognize we are being built independently
        of chromium and look for dependencies under webkit/chromium rather
        than chromium/src.

        https://bugs.webkit.org/show_bug.cgi?id=29722

        * WebCore.gyp/WebCore.gyp: See above. Also removed a few files from
          the sources list, since they are not supposed to be built here.

991 992 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
2009-09-28  Jakub Wieczorek  <faw217@gmail.com>

        Reviewed by Simon Hausmann.

        [Qt] Implement XSLT support with QtXmlPatterns.
        https://bugs.webkit.org/show_bug.cgi?id=28303

        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCoreSources.bkl:
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::~Document):
        (WebCore::Document::setTransformSource):
        * dom/Document.h:
        (WebCore::Document::transformSource):
        * dom/TransformSource.h: Added.
        (WebCore::TransformSource::platformSource):
        * dom/TransformSourceLibxslt.cpp: Added.
        (WebCore::TransformSource::TransformSource): Wraps a libxml2 document.
        (WebCore::TransformSource::~TransformSource):
        * dom/TransformSourceQt.cpp: Added.
        (WebCore::TransformSource::TransformSource): Wraps a plain string.
        (WebCore::TransformSource::~TransformSource):
        * dom/XMLTokenizerLibxml2.cpp:
        (WebCore::XMLTokenizer::doEnd):
        * dom/XMLTokenizerQt.cpp:
        (WebCore::XMLTokenizer::doEnd):
        (WebCore::XMLTokenizer::parseProcessingInstruction):
        * xml/XSLStyleSheet.h:
        (WebCore::XSLStyleSheet::sheetString):
        * xml/XSLStyleSheetLibxslt.cpp:
        (WebCore::XSLStyleSheet::document):
        * xml/XSLStyleSheetQt.cpp: Added.
        * xml/XSLTProcessor.h:
        * xml/XSLTProcessorLibxslt.cpp:
        (WebCore::xmlDocPtrFromNode):
        * xml/XSLTProcessorQt.cpp: Added.
        (WebCore::XSLTMessageHandler::XSLTMessageHandler): A subclass of QAbstractMessageHandler.
        (WebCore::XSLTMessageHandler::handleMessage): Forwards all processor messages to the Console.
        (WebCore::XSLTProcessor::transformToString): Uses QXmlQuery.

1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055
2009-09-28  Andrew Scherkus  <scherkus@chromium.org>

        Reviewed by Eric Carlson.

        Delegate implementation of rendererIsNeeded() for media control elements to RenderTheme.

        https://bugs.webkit.org/show_bug.cgi?id=28689

        Covered by LayoutTests/media/video-no-audio.html

        * rendering/MediaControlElements.cpp: Removed subclass implementations of rendererIsNeeded().
        (WebCore::MediaControlElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
        (WebCore::MediaControlInputElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
        * rendering/MediaControlElements.h:
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::shouldRenderMediaControlPart): New method.  Contains logic moved from subclass implementations of rendererIsNeeded().
        * rendering/RenderTheme.h:
        * rendering/RenderThemeChromiumSkia.cpp:
        (WebCore::RenderThemeChromiumSkia::shouldRenderMediaControlPart): Override to always render mute button.
        * rendering/RenderThemeChromiumSkia.h:

1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073
2009-09-28  Jian Li  <jianli@chromium.org>

        Reviewed by David Levin.

        [chromium] DragData::asURL should return file URL.
        https://bugs.webkit.org/show_bug.cgi?id=29109

        Tested by LayoutTests/fast/events/drag-to-navigate.html.

        * platform/FileSystem.h:
        * platform/chromium/ChromiumBridge.h:
        * platform/chromium/DragDataChromium.cpp:
        (WebCore::DragData::asURL):
        * platform/chromium/FileSystemChromium.cpp:
        (WebCore::getAbsolutePath):
        (WebCore::isDirectory):
        (WebCore::filePathToURL):

1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086
2009-09-28  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by David Levin.

        [V8] Add a special case to handle index arguments, because we need to be
        able to see if they're < 0.
        https://bugs.webkit.org/show_bug.cgi?id=29810

        Test: LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.html

        * bindings/scripts/CodeGeneratorV8.pm: Added special case (matching CodeGeneratorJS.pm)
          for index arguments.

1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098
2009-09-28  Dan Bernstein  <mitz@apple.com>

        Reviewed by Darin Adler.

        Extend the MediaWiki/KHTMLFixes.css workaround to cover older MediaWiki versions
        https://bugs.webkit.org/show_bug.cgi?id=29792

        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::setCSSStyleSheet): If site specific hacks are
        enabled, check if the linked style sheet is one of two versions of the
        MediaWiki KHTMLFixes.css. If so, remove the offending rule.

1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111
2009-09-28  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Adam Barth.

        [V8] Fix an error in type logic in CodeGeneratorV8.pm, where
        unsigned ints are accidentally used as signed.
        https://bugs.webkit.org/show_bug.cgi?id=29810

        Test: LayoutTests/fast/forms/textarea-maxlength.html

        * bindings/scripts/CodeGeneratorV8.pm: Made sure "unsigned long" in IDL is
          properly generates on "unsigned" return value.

1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133
2009-09-28  Jakub Wieczorek  <faw217@gmail.com>

        Reviewed by Simon Hausmann.

        Rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp.
        https://bugs.webkit.org/show_bug.cgi?id=28303

        In preparation for adding XSLT support with QtXmlPatterns to the Qt
        port, rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp as we will
        have our own implementation which most likely will not share any code
        with the current one.

        Additionally, fix some coding style issues.

        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * xml/XSLStyleSheet.cpp: Renamed to XSLStyleSheetLibxslt.cpp.
        * xml/XSLStyleSheetLibxslt.cpp: Added.

1134 1135 1136 1137 1138 1139 1140 1141 1142
2009-09-28  Simon Hausmann  <simon.hausmann@nokia.com>

        Prospective build fix for r48812.

        Forgot to remove the inline reset() implementation when reverting the indentation
        changes in the file.

        * xml/XSLTProcessor.h:

1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159
2009-09-28  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by nobody (trivial follow up fix), Joseph Pecoraro LGTM-ed.

        Web Inspector: Follow up to r48809.
        InspectorController.wrapObject should only be called on the inspectable page side.

        https://bugs.webkit.org/show_bug.cgi?id=17429

        * inspector/front-end/EventListenersSidebarPane.js:
        (WebInspector.EventListenersSidebarPane.prototype.update.callback):
        (WebInspector.EventListenersSidebarPane.prototype.update):
        (WebInspector.EventListenersSection):
        (WebInspector.EventListenersSection.prototype.update):
        (WebInspector.EventListenerBar):
        (WebInspector.EventListenerBar.prototype.update):

1160 1161 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
2009-09-28  Jakub Wieczorek  <faw217@gmail.com>

        Reviewed by Simon Hausmann.

        Move the libxslt specific part of XSLTProcessor to a separate file.
        https://bugs.webkit.org/show_bug.cgi?id=28303

        In preparation for adding XSLT support with QtXmlPatterns to the Qt
        port, move the libxslt part of the XSLTProcessor implementation into
        another file and leave the part that can be reused and shared.

        Additionally, fix some coding style issues.

        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * xml/XSLTProcessor.cpp:
        (WebCore::XSLTProcessor::createDocumentFromSource): Remove trailing whitespaces.
        (WebCore::createFragmentFromSource): Remove trailing whitespaces.
        (WebCore::XSLTProcessor::transformToFragment): Remove trailing whitespaces.
        (WebCore::XSLTProcessor::reset): Moved out of the class definition.
        * xml/XSLTProcessorLibxslt.cpp: Added.
        (WebCore::XSLTProcessor::genericErrorFunc): Moved.
        (WebCore::XSLTProcessor::parseErrorFunc): Moved.
        (WebCore::docLoaderFunc): Moved.
        (WebCore::setXSLTLoadCallBack): Moved.
        (WebCore::writeToVector): Moved.
        (WebCore::saveResultToString): Moved.
        (WebCore::xsltParamArrayFromParameterMap): Moved.
        (WebCore::freeXsltParamArray): Moved.
        (WebCore::xsltStylesheetPointer): Moved.
        (WebCore::xmlDocPtrFromNode): Moved.
        (WebCore::resultMIMEType): Moved.
        (WebCore::XSLTProcessor::transformToString): Moved.

1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208
2009-09-28  Charles Wei  <charles.wei@torchmobile.com.cn>

        Reviewed by Nikolas Zimmermann.

        Fix the crash of SVG that crashes when use a non-exist symbol
        https://bugs.webkit.org/show_bug.cgi?id=27693

        Test: svg/custom/use-non-existing-symbol-crash.svg

        * svg/SVGUseElement.cpp:
        (WebCore::shadowTreeContainsChangedNodes):

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 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281
2009-09-28  Joseph Pecoraro  <joepeck@webkit.org>

        Reviewed by Timothy Hatcher.

        Inspector Should Show Event Listeners/Handlers Registered on each Node
        https://bugs.webkit.org/show_bug.cgi?id=17429
        
          Extracted a method from dispatchEvent to get the event ancestor chain
        
        * dom/Node.cpp:
        (WebCore::Node::eventAncestors): the extracted method
        (WebCore::Node::dispatchGenericEvent): use eventAncestors
        * dom/Node.h:

          Asynchronous Flow For the Inspector, Backend -> DOM Agent -> Frontend
          The DOMAgent's getEventListenersForNode handles the logic of finding
          all the relevant listeners in the event flow.

        * inspector/InspectorBackend.cpp:
        (WebCore::InspectorBackend::getEventListenersForNode):
        * inspector/InspectorBackend.h:
        * inspector/InspectorBackend.idl:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::getEventListenersForNode):
        (WebCore::InspectorDOMAgent::buildObjectForEventListener):
        (WebCore::InspectorDOMAgent::buildObjectForNode): added localName
        * inspector/InspectorDOMAgent.h:
        (WebCore::EventListenerInfo::EventListenerInfo):
        * inspector/InspectorFrontend.cpp:
        (WebCore::InspectorFrontend::didGetEventListenersForNode):
        * inspector/InspectorFrontend.h:
        (WebCore::InspectorFrontend::scriptState):
        * inspector/front-end/DOMAgent.js: added localName to WebInspector.DOMNode from payload
        (WebInspector.EventListeners.getEventListenersForNodeAsync.mycallback):
        (WebInspector.EventListeners.getEventListenersForNodeAsync):

          New Sidebar Pane in the Element's Panel
          Includes Gear Menu for filtering the Event Listeners on the
          "Selected Node Only" or "All Nodes"

        * inspector/front-end/ElementsPanel.js: Handles refreshing the Pane when necessary
        (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
        (WebInspector.ElementsPanel):
        (WebInspector.ElementsPanel.prototype.updateEventListeners):
        * inspector/front-end/EventListenersSidebarPane.js: Added. 
        (WebInspector.EventListenersSidebarPane): The 1st level in the Pane
        (WebInspector.EventListenersSidebarPane.prototype.update.callback):
        (WebInspector.EventListenersSidebarPane.prototype.update):
        (WebInspector.EventListenersSection): The 2nd level in the Pane
        (WebInspector.EventListenersSection.prototype.update): filters on Preference
        (WebInspector.EventListenersSection.prototype.addListener):
        (WebInspector.EventListenerBar): The 3rd level in the Pane
        (WebInspector.EventListenerBar.prototype._getNodeDisplayName):
        (WebInspector.EventListenerBar.prototype._getFunctionDisplayName):
        (WebInspector.EventListenersSidebarPane.prototype._changeSetting): For the Gear Menu
        
          Consolidated "appropriateSelectorForNode"

        * inspector/front-end/StylesSidebarPane.js:
        * inspector/front-end/utilities.js:

          Miscellaneous Updates

        * English.lproj/localizedStrings.js: "Event Listeners", "No Event Listeners", "Selected Node Only", "All Nodes"
        * WebCore.gypi: included the new inspector files
        * WebCore.vcproj/WebCore.vcproj: included source files that were missing
        * inspector/front-end/Images/grayConnectorPoint.png: Added. Thanks to Timothy Hatcher.
        * inspector/front-end/Images/whiteConnectorPoint.png: Added. Thanks to Timothy Hatcher.
        * inspector/front-end/inspector.js: Preferences for the Gear Menu Event Listeners filter
        * inspector/front-end/inspector.css: reused as much as possible
        * inspector/front-end/inspector.html: include the new script
        * inspector/front-end/WebKit.qrc: included the new inspector files

1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310
2009-09-27  Sam Weinig  <sam@webkit.org>

        Reviewed by Dan Bernstein.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=29760
        Implement CSSOM Range.getClientRects/getBoundingClientRect 

        Tests: fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html
               fast/dom/Range/getBoundingClientRect.html
               fast/dom/Range/getClientRects.html

        * dom/Range.cpp:
        (WebCore::Range::getClientRects):
        (WebCore::Range::getBoundingClientRect):
        (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoom):
        (WebCore::Range::getBorderAndTextQuads):
        * dom/Range.h:
        * dom/Range.idl:
        Implement Range.getClientRects/getBoundingClientRect.

        * dom/Element.cpp:
        * rendering/RenderObject.h: 
        (WebCore::adjustForAbsoluteZoom):
        (WebCore::adjustIntRectForAbsoluteZoom):
        (WebCore::adjustFloatPointForAbsoluteZoom):
        (WebCore::adjustFloatQuadForAbsoluteZoom):
        Move point/quad adjustment methods from Element.cpp to RenderObject.h
        so that Range.cpp can use them as well.

1311 1312 1313 1314 1315 1316 1317 1318 1319
2009-09-27  Simon Hausmann  <hausmann@webkit.org>

        Unreviewed fix for WebInspector with Qt build.

        Simply re-generate the Qt resource file by running
        WebKitTools/Scripts/generate-qt-inspector-resource

        * inspector/front-end/WebKit.qrc:

1320 1321 1322 1323 1324 1325
2009-09-27  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by nobody (trivial ChangeLog fix).

        Restore WebCore/ChangeLog truncated in r48778.

1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339
2009-09-27  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Web Inspector: DOM store is being unbound twice, leading to assertion failure.

        https://bugs.webkit.org/show_bug.cgi?id=29770

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::didOpenDatabase):
        (WebCore::InspectorController::didUseDOMStorage):
        * inspector/InspectorDOMStorageResource.cpp:
        (WebCore::InspectorDOMStorageResource::unbind):

1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361
2009-09-26  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Web Inspector: Do not track DOM changes while inspector window is closed.

        https://bugs.webkit.org/show_bug.cgi?id=29769

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
        (WebCore::InspectorController::populateScriptObjects):
        (WebCore::InspectorController::resetScriptObjects):
        (WebCore::InspectorController::didCommitLoad):
        * inspector/InspectorController.h:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::setDocument):
        * inspector/InspectorDOMAgent.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::dispatchWindowObjectAvailable):
        * page/android/InspectorControllerAndroid.cpp:
        (WebCore::InspectorController::inspectedWindowScriptObjectCleared):

1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376
2009-09-26  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Web Inspector: [REGRESSION] Double Clicking Resources Fails to Open in New Window

        https://bugs.webkit.org/show_bug.cgi?id=29762

        * inspector/front-end/InjectedScript.js:
        (InjectedScript.setStyleText):
        (InjectedScript.openInInspectedWindow):
        * inspector/front-end/InjectedScriptAccess.js:
        * inspector/front-end/ResourcesPanel.js:
        (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):

1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395
2009-09-26  David Kilzer  <ddkilzer@apple.com>

        Part 2 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets

        Reviewed by Darin Adler.

        Fix ENABLE_ORIENTATION_EVENTS for non-Mac platforms.

        * DerivedSources.make: Moved Platform.h check for
        ENABLE_ORIENTATION_EVENTS into Mac-only section and added
        default of ENABLE_ORIENTATION_EVENTS = 0 to non-Mac section.
        Added ifndef test to make it possible to override both
        ENABLE_DASHBOARD_SUPPORT and ENABLE_ORIENTATION_EVENTS external
        to the makefile.  Moved addition of ENABLE_ORIENTATION_EVENTS to
        ADDITIONAL_IDL_DEFINES to common section.
        * GNUmakefile.am: Added support for ENABLE_ORIENTATION_EVENTS if
        it is ever used.
        * WebCore.pro: Ditto.

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
2009-09-26  Kent Tamura  <tkent@chromium.org>

        Reviewed by David Kilzer.

        Move placeholder-related code to HTMLTextFormControlElement from
        HTMLInputElement, WMLInputElement, InputElement, and
        HTMLTextAreaElement.
        https://bugs.webkit.org/show_bug.cgi?id=28703

        * dom/InputElement.cpp:
        (WebCore::InputElement::dispatchFocusEvent):
        (WebCore::InputElement::dispatchBlurEvent):
        (WebCore::InputElement::setValueFromRenderer):
        * dom/InputElement.h:
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
        (WebCore::HTMLTextFormControlElement::~HTMLTextFormControlElement):
        (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
        (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
        (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
        (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
        * html/HTMLFormControlElement.h:
        (WebCore::HTMLTextFormControlElement::handleFocusEvent):
        (WebCore::HTMLTextFormControlElement::handleBlurEvent):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::HTMLInputElement):
        (WebCore::HTMLInputElement::handleFocusEvent):
        (WebCore::HTMLInputElement::handleBlurEvent):
        (WebCore::HTMLInputElement::parseMappedAttribute):
        (WebCore::HTMLInputElement::createRenderer):
        (WebCore::HTMLInputElement::setValue):
        (WebCore::HTMLInputElement::setValueFromRenderer):
        * html/HTMLInputElement.h:
        (WebCore::HTMLInputElement::supportsPlaceholder):
        (WebCore::HTMLInputElement::isEmptyValue):
        * html/HTMLIsIndexElement.cpp:
        (WebCore::HTMLIsIndexElement::parseMappedAttribute):
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
        (WebCore::HTMLTextAreaElement::createRenderer):
        * html/HTMLTextAreaElement.h:
        (WebCore::HTMLTextAreaElement::supportsPlaceholder):
        (WebCore::HTMLTextAreaElement::isEmptyValue):
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::RenderTextControl):
        * rendering/RenderTextControl.h:
        * rendering/RenderTextControlMultiLine.cpp:
        (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
        * rendering/RenderTextControlMultiLine.h:
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
        (WebCore::RenderTextControlSingleLine::updateFromElement):
        * rendering/RenderTextControlSingleLine.h:
        * wml/WMLInputElement.cpp:
        (WebCore::WMLInputElement::setValue):
        (WebCore::WMLInputElement::createRenderer):
        * wml/WMLInputElement.h:

1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466
2009-09-26  Shu Chang  <Chang.Shu@nokia.com>

        Reviewed by Alexey Proskuryakov.

        Optimize the code so only the text from start to end is scanned.
        https://bugs.webkit.org/show_bug.cgi?id=29092

        On a platform with webkit+Qt+Symbian, the parsing time for a 600K text
        file improved from 400ms to 40ms (10x faster).

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

1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487
2009-09-26  Xiaomei Ji  <xji@chromium.org>

        Reviewed by Eric Seidel.

        This Patch fixes [chromium] the drop-down is always left-aligned even
        for RTL element.
        https://bugs.webkit.org/show_bug.cgi?id=29612

        For auto-complete, the items in drop-down should be right-aligned if
        the directionality of <input> field is RTL.
        For <select><option>, the items in drop-down should be right-aligned
        if the directionality of <select> is RTL.

        No automatic test is possible. Manual tests are added.

        * manual-tests/autofill_alignment.html: Added.
        * manual-tests/select_alignment.html: Added.
        * platform/chromium/PopupMenuChromium.cpp:
        (WebCore::PopupListBox::paintRow): Adjust the starting x-axis of text to
        be paint if it should be right-aligned.

1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502
2009-09-25  Dan Bernstein  <mitz@apple.com>

        Reviewed by Sam Weinig.

        REGRESSION (r48775) FontList.plist written by TOT WebKit causes Safari 4
        to crash on launch
        https://bugs.webkit.org/show_bug.cgi?id=29759

        * platform/graphics/win/FontDatabase.cpp:
        (WebCore::writeFontDatabaseToPlist): Reverted to saving the CG font DB
        property list at the root of FontList.plist, but with an additional
        key for the last value of the Fonts registry key.
        (WebCore::populateFontDatabase): Pass the FontList.plist in its entirety
        to populatFontDatabaseFromPlist.

1503 1504 1505 1506 1507 1508
2009-09-25  Kevin Ollivier  <kevino@theolliviers.com>

        Build fix. Adding missing header files.

        * bindings/js/JSNamedNodeMapCustom.cpp:

1509 1510 1511 1512 1513 1514 1515 1516 1517
2009-09-25  David Kilzer  <ddkilzer@apple.com>

        Part 1 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets

        Reviewed by Darin Adler.

        * DerivedSources.make: Move tests for ENABLE_CONTEXT_MENUS,
        ENABLE_DRAG_SUPPORT and ENABLE_INSPECTOR into Mac-only section.

1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531
2009-09-25  Adam Barth  <abarth@webkit.org>

        Reviewed by Darin Adler.

        Load blocks during unload should not affect targeted loads
        https://bugs.webkit.org/show_bug.cgi?id=29747

        Move the check of the unload state after checking for targeted links.

        Test: fast/loader/unload-hyperlink-targeted.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadURL):

1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 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 1592 1593
2009-09-25  Kenneth Russell  <kbr@google.com>

        Reviewed by Dimitri Glazkov.

        [Chromium] Add initial V8 bindings for WebGL
        https://bugs.webkit.org/show_bug.cgi?id=29664

        * WebCore.gypi:
        * bindings/scripts/CodeGeneratorV8.pm:
        * bindings/v8/DOMObjectsInclude.h:
        * bindings/v8/DerivedSourcesAllInOne.cpp:
        * bindings/v8/V8DOMWrapper.cpp:
        (WebCore::V8DOMWrapper::getTemplate):
        * bindings/v8/V8Index.cpp:
        * bindings/v8/V8Index.h:
        * bindings/v8/custom/V8CanvasArrayBufferCustom.cpp: Added.
        (WebCore::CALLBACK_FUNC_DECL):
        * bindings/v8/custom/V8CanvasArrayCustom.h: Added.
        (WebCore::constructCanvasArray):
        * bindings/v8/custom/V8CanvasByteArrayCustom.cpp: Added.
        (WebCore::CALLBACK_FUNC_DECL):
        (WebCore::INDEXED_PROPERTY_GETTER):
        (WebCore::INDEXED_PROPERTY_SETTER):
        * bindings/v8/custom/V8CanvasFloatArrayCustom.cpp: Added.
        (WebCore::CALLBACK_FUNC_DECL):
        (WebCore::INDEXED_PROPERTY_GETTER):
        (WebCore::INDEXED_PROPERTY_SETTER):
        * bindings/v8/custom/V8CanvasIntArrayCustom.cpp: Added.
        (WebCore::CALLBACK_FUNC_DECL):
        (WebCore::INDEXED_PROPERTY_GETTER):
        (WebCore::INDEXED_PROPERTY_SETTER):
        * bindings/v8/custom/V8CanvasRenderingContext3DCustom.cpp: Added.
        (WebCore::jsArrayToFloatArray):
        (WebCore::jsArrayToIntArray):
        (WebCore::CALLBACK_FUNC_DECL):
        (WebCore::):
        (WebCore::vertexAttribAndUniformHelperf):
        (WebCore::uniformHelperi):
        (WebCore::uniformMatrixHelper):
        * bindings/v8/custom/V8CanvasShortArrayCustom.cpp: Added.
        (WebCore::CALLBACK_FUNC_DECL):
        (WebCore::INDEXED_PROPERTY_GETTER):
        (WebCore::INDEXED_PROPERTY_SETTER):
        * bindings/v8/custom/V8CanvasUnsignedByteArrayCustom.cpp: Added.
        (WebCore::CALLBACK_FUNC_DECL):
        (WebCore::INDEXED_PROPERTY_GETTER):
        (WebCore::INDEXED_PROPERTY_SETTER):
        * bindings/v8/custom/V8CanvasUnsignedIntArrayCustom.cpp: Added.
        (WebCore::CALLBACK_FUNC_DECL):
        (WebCore::INDEXED_PROPERTY_GETTER):
        (WebCore::INDEXED_PROPERTY_SETTER):
        * bindings/v8/custom/V8CanvasUnsignedShortArrayCustom.cpp: Added.
        (WebCore::CALLBACK_FUNC_DECL):
        (WebCore::INDEXED_PROPERTY_GETTER):
        (WebCore::INDEXED_PROPERTY_SETTER):
        * bindings/v8/custom/V8CustomBinding.h:
        * bindings/v8/custom/V8DocumentCustom.cpp:
        (WebCore::CALLBACK_FUNC_DECL):
        * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
        (WebCore::CALLBACK_FUNC_DECL):
        * platform/graphics/GraphicsContext3D.h:

1594 1595 1596 1597 1598 1599 1600 1601 1602
2009-09-25  Jeremy Orlow  <jorlow@chromium.org>

        This is breaking Chromium try bots, so I'm counting this as a build fix.

        Add more svn:ignore exceptions.  On different platforms, these files are
        generated with different case for WebCore.

        * WebCore.gyp: Changed property svn:ignore.

1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676
2009-09-25  Alexey Proskuryakov  <ap@apple.com>

        Reverting r48767, as it broke Windows build in a non-trivial way.

        * bindings/js/JSAbstractWorkerCustom.cpp:
        (WebCore::JSAbstractWorker::addEventListener):
        (WebCore::JSAbstractWorker::removeEventListener):
        * bindings/js/JSDOMApplicationCacheCustom.cpp:
        (WebCore::JSDOMApplicationCache::addEventListener):
        (WebCore::JSDOMApplicationCache::removeEventListener):
        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::addEventListener):
        (WebCore::JSDOMWindow::removeEventListener):
        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::JSEventListener):
        (WebCore::JSEventListener::jsFunction):
        (WebCore::JSEventListener::markJSFunction):
        (WebCore::JSEventListener::handleEvent):
        (WebCore::JSEventListener::reportError):
        * bindings/js/JSEventListener.h:
        (WebCore::JSEventListener::create):
        * bindings/js/JSEventSourceCustom.cpp:
        (WebCore::JSEventSource::addEventListener):
        (WebCore::JSEventSource::removeEventListener):
        * bindings/js/JSLazyEventListener.cpp:
        (WebCore::JSLazyEventListener::JSLazyEventListener):
        (WebCore::JSLazyEventListener::jsFunction):
        (WebCore::JSLazyEventListener::parseCode):
        * bindings/js/JSLazyEventListener.h:
        (WebCore::JSLazyEventListener::create):
        * bindings/js/JSMessagePortCustom.cpp:
        (WebCore::JSMessagePort::addEventListener):
        (WebCore::JSMessagePort::removeEventListener):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::JSNode::addEventListener):
        (WebCore::JSNode::removeEventListener):
        * bindings/js/JSSVGElementInstanceCustom.cpp:
        (WebCore::JSSVGElementInstance::addEventListener):
        (WebCore::JSSVGElementInstance::removeEventListener):
        * bindings/js/JSWorkerContextCustom.cpp:
        (WebCore::JSWorkerContext::addEventListener):
        (WebCore::JSWorkerContext::removeEventListener):
        * bindings/js/JSXMLHttpRequestCustom.cpp:
        (WebCore::JSXMLHttpRequest::addEventListener):
        (WebCore::JSXMLHttpRequest::removeEventListener):
        * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
        (WebCore::JSXMLHttpRequestUpload::addEventListener):
        (WebCore::JSXMLHttpRequestUpload::removeEventListener):
        * bindings/js/ScriptEventListener.cpp:
        (WebCore::createAttributeEventListener):
        * bindings/objc/ObjCEventListener.h:
        * bindings/objc/ObjCEventListener.mm:
        (WebCore::ObjCEventListener::handleEvent):
        * bindings/scripts/CodeGeneratorJS.pm:
        * dom/EventListener.h:
        (WebCore::EventListener::reportError):
        (WebCore::EventListener::jsFunction):
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::fireEventListeners):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::handleEvent):
        * inspector/InspectorDOMAgent.h:
        * inspector/InspectorDOMStorageResource.cpp:
        (WebCore::InspectorDOMStorageResource::handleEvent):
        * inspector/InspectorDOMStorageResource.h:
        * loader/ImageDocument.cpp:
        (WebCore::ImageEventListener::handleEvent):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::ConditionEventListener::handleEvent):
        * workers/WorkerContext.cpp:
        (WebCore::WorkerContext::reportException):

1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689
2009-09-24  Tony Chang  <tony@chromium.org>

        Reviewed by David Levin.

        Add a gyp variable to allow building a debug webcore without debug
        symbols.  This allows for faster compile, link, and gdb times.

        https://bugs.webkit.org/show_bug.cgi?id=29721

        No new tests, build config change.

        * WebCore.gyp/WebCore.gyp:

1690 1691 1692 1693 1694 1695 1696 1697 1698
2009-09-25  Darin Fisher  <darin@chromium.org>

        Reviewed by Dimitri Glazkov.

        Declare RegisteredEventListener as a class instead of a struct.
        This fixes a warning in the Chromium build.

        * dom/RegisteredEventListener.h:

mitz@apple.com's avatar
mitz@apple.com committed
1699 1700 1701 1702 1703 1704 1705 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
2009-09-25  Dan Bernstein  <mitz@apple.com>

        Reviewed by Jon Honeycutt.

        WebCore part of
        <rdar://problem/7211635> 2 byte characters are displayed as garbaged
        <rdar://problem/7212626> garbled/gibberish text (off-by-one)

        When the Windows Fonts directory contains more than one font file for a
        given font name, which of the fonts gets assigned to the name in the
        Core Graphics font database was determined arbitrarily and did not
        always match the font GDI used for the same font name. The mismatch
        caused character-to-glyph mapping to use one font and glyph rendering to
        use another.

        The fix is to update the Core Graphics font database from the registry
        entries (that reflect the name-to-font mapping that GDI uses) after
        populating it with the result of scanning the Fonts directory. As a
        consequence, the directory needs to be scanned at startup every time the
        registry key changes, so the last value of the registry key is kept
        in the property list on disk so that it could be compared to the current
        value on startup.

        * platform/graphics/win/FontDatabase.cpp:
        (WebCore::populateFontDatabaseFromPlist): Now takes a property list as
        a parameter and avoids round-tripping through XML by calling
        wkAddFontsFromPlist() instead of wkAddFontsFromPlistRepresentation().
        (WebCore::fontFilenamesFromRegistryKey):
        (WebCore::cgFontDBKey):
        (WebCore::writeFontDatabaseToPlist): Now takes the CG font DB property
        list and a property list with the font filenames from the registry and
        writes a dictionary with those property lists as values.
        (WebCore::fontFilenamesFromRegistry): Added. Returns an array with the
        values in the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
        registry key.
        (WebCore::populateFontDatabase): Changed to read the contents of the
        Fonts registry key and compare it with the last-saved value from the
        property list, and to call wkAddFontsFromRegistry() after populating the
        CG font DB from the file system. Uses wkCreateFontsPlist() instead of
        wkCreateFontsPlistRepresentation() to avoid round-tripping through XML.

1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752
2009-09-25  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Inlined some object creation code, including lexicalGlobalObject access
        https://bugs.webkit.org/show_bug.cgi?id=29750

        * bindings/js/JSInspectorBackendCustom.cpp:
        (WebCore::JSInspectorBackend::currentCallFrame):
        * inspector/JavaScriptDebugServer.cpp:
        (WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
        API changes.

1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774
2009-09-25  Dave Hyatt  <hyatt@apple.com>

        Reviewed by Anders Carlsson.

        https://bugs.webkit.org/show_bug.cgi?id=24399
        Make @import work in user stylesheets.  The first bug was that the URL wasn't being set on the
        user sheets themselves, so relative @import URLs couldn't resolve properly.  The second bug
        was that the loads would be denied.  This is fixed by using the requestUserCSSStyleSheet method
        instead of the normal request method.  In order to know when to do this, CSSStyleSheets now have
        a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not.

        * css/CSSImportRule.cpp:
        (WebCore::CSSImportRule::insertedIntoParent):
        * css/CSSStyleSheet.cpp:
        (WebCore::CSSStyleSheet::CSSStyleSheet):
        * css/CSSStyleSheet.h:
        (WebCore::CSSStyleSheet::setIsUserStyleSheet):
        (WebCore::CSSStyleSheet::isUserStyleSheet):
        * dom/Document.cpp:
        (WebCore::Document::pageUserSheet):
        (WebCore::Document::pageGroupUserSheets):

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
2009-09-25  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Darin Adler.

        ASSERTION FAILED: !repaintContainer || repaintContainer == this
        https://bugs.webkit.org/show_bug.cgi?id=29755
        
        It's possible for RenderObject::container() to return an object that is higher
        in the hierarchy than the repaintContainer that is being used to repaint an
        object. For example, this can happen when running an accelerated opacity
        transition on an element with a position:absolute parent, and a position:absolute child.
        
        In this case we need to detect when RenderObject::container() will skip over
        repaintContainer, and in that case adjust the coords to shift into repaintContainer's space.

        Test: compositing/repaint/opacity-between-absolute.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::mapLocalToContainer):
        (WebCore::RenderBox::computeRectForRepaint):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::computeRectForRepaint):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::container):
        * rendering/RenderObject.h:

1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815
2009-09-25  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Darin Adler.

        Crash with hardware accelerated rotation of a PDF image in a data URL
        <rdar://problem/7250378>
        
        PDF images don't return a color space from CGImageGetColorSpace(),
        so we need to null-check the return value before use.

        Test: compositing/color-matching/pdf-image-match.html

        * platform/graphics/mac/GraphicsLayerCA.mm:
        (WebCore::GraphicsLayerCA::setContentsToImage):

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 1848 1849 1850
2009-09-25  Darin Adler  <darin@apple.com>

        Reviewed by Geoffrey Garen.

        Null-deref when first access to an Attr node is after its Element is destroyed
        https://bugs.webkit.org/show_bug.cgi?id=29748

        Test: fast/dom/Attr/access-after-element-destruction.html

        * bindings/js/JSAttrCustom.cpp:
        (WebCore::JSAttr::markChildren): Added. Keeps the ownerElement alive as
        long as the Attr is alive.

        * bindings/js/JSNamedNodeMapCustom.cpp:
        (WebCore::JSNamedNodeMap::markChildren): Added. Keeps the Element alive as
        long as the NamedNodeMap is alive.

        * dom/Attr.idl: Added CustomMarkFunction attribute.

        * dom/NamedAttrMap.cpp:
        (WebCore::NamedNodeMap::getAttributeItem): Tweaked formatting.
        (WebCore::NamedNodeMap::detachFromElement): Call clearAttributes so we don't
        have attributes hanging around that might need an Attr node created; that way
        we won't crash with a null-dereference trying to deal with one of them. This
        can't happen when working with JavaScript since the Element will be kept
        alive due to the change above.
        (WebCore::NamedNodeMap::addAttribute): Fix function name in comment.
        (WebCore::NamedNodeMap::removeAttribute): Removed unneeded "+ 1" and added
        missing braces.

        * dom/NamedAttrMap.h: Made the element function public so it can be used by
        the JavaScript binding to keep the Element alive.

        * dom/NamedNodeMap.idl: Added CustomMarkFunction attribute.

1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 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 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951
2009-09-24  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Darin Adler and Sam Weinig.

        Onclick not fired for an element copied with cloneContents() or cloneNode()
        https://bugs.webkit.org/show_bug.cgi?id=25130

        The change here is that JS event listeners don't keep a reference to a global object from
        where they were created, and instead take it as a parameter when parsing source code. Also,
        the listener creation won't fail just because it happens for an element in a frameless
        document.
        Thus, moving nodes between documents no longer results in having incorrect registered
        lazy event listeners on them.

        Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
               fast/events/attribute-listener-cloned-from-frameless-doc-context.html
               fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
               fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
               fast/events/attribute-listener-extracted-from-frameless-doc-context.html

        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
        (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
        getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
        (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
        (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
        (WebCore::JSEventListener::reportError): Ditto.

        * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
        to JSDOMGlobalObject.

        * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
        creation was split between this function and ScriptEventListener; moved it here, as JS
        global object can be different now.

        * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
        which can not be determined at parsing time.

        * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
        for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
        expect that errors are logged at document parsing time, and because I don't know what other
        side effects moving it vould have.

        * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
        because JSC needs a global context here.

        * bindings/js/JSAbstractWorkerCustom.cpp:
        (WebCore::JSAbstractWorker::addEventListener):
        (WebCore::JSAbstractWorker::removeEventListener):
        * bindings/js/JSDOMApplicationCacheCustom.cpp:
        (WebCore::JSDOMApplicationCache::addEventListener):
        (WebCore::JSDOMApplicationCache::removeEventListener):
        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::addEventListener):
        (WebCore::JSDOMWindow::removeEventListener):
        * bindings/js/JSEventSourceCustom.cpp:
        (WebCore::JSEventSource::addEventListener):
        (WebCore::JSEventSource::removeEventListener):
        * bindings/js/JSMessagePortCustom.cpp:
        (WebCore::JSMessagePort::addEventListener):
        (WebCore::JSMessagePort::removeEventListener):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::JSNode::addEventListener):
        (WebCore::JSNode::removeEventListener):
        * bindings/js/JSSVGElementInstanceCustom.cpp:
        (WebCore::JSSVGElementInstance::addEventListener):
        (WebCore::JSSVGElementInstance::removeEventListener):
        * bindings/js/JSWorkerContextCustom.cpp:
        (WebCore::JSWorkerContext::addEventListener):
        (WebCore::JSWorkerContext::removeEventListener):
        * bindings/js/JSXMLHttpRequestCustom.cpp:
        (WebCore::JSXMLHttpRequest::addEventListener):
        (WebCore::JSXMLHttpRequest::removeEventListener):
        * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
        (WebCore::JSXMLHttpRequestUpload::addEventListener):
        (WebCore::JSXMLHttpRequestUpload::removeEventListener):
        * bindings/objc/ObjCEventListener.h:
        * bindings/objc/ObjCEventListener.mm:
        (WebCore::ObjCEventListener::handleEvent):
        * bindings/scripts/CodeGeneratorJS.pm:
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::fireEventListeners):
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::handleEvent):
        * inspector/InspectorDOMAgent.h:
        * inspector/InspectorDOMStorageResource.cpp:
        (WebCore::InspectorDOMStorageResource::handleEvent):
        * inspector/InspectorDOMStorageResource.h:
        * loader/ImageDocument.cpp:
        (WebCore::ImageEventListener::handleEvent):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::ConditionEventListener::handleEvent):
        * workers/WorkerContext.cpp:
        (WebCore::WorkerContext::reportException):
        Don't pass global object to JSEventListener::create(), which no longer needs it.
        Note that some of these functions still have an early return for null global object, which
        can probably be removed in a later patch.
        Pass ScriptExecutionContext to EventListener methods that now need it.

1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981
2009-09-25  Enrica Casucci  <enrica@apple.com>

        Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=29740
        <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line

        Change the way style is preserved when inserting a new paragraph.
        The original code handled insertion at the beginning and at the end of a paragraph as special
        cases. The newly created paragraph contained a set of nodes generated starting from the
        computed style of the insertion node. This approach has two problems:
        1. if the insertion node has a non opaque background color and one of the parent element did have
        a solid background color the new paragraph did not have the element with the solid color in the tree.
        2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
        background color and some font attribute was being reproduced as span + bold + italic + font as separate tags.
        The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
        paragraph where the insertion point is.

        Test: editing/inserting/insert-bg-font.html

        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
        between the insert node and the outer block.
        (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
        in the new paragraph the same element hierarchy present in the starting paragraph.
        (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
        in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
        at the end of the paragraph to use the new methods instead of applying the calculated style.
        * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.

1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996
2009-09-25  Patrick Mueller  <Patrick_Mueller@us.ibm.com>

        Reviewed by Timothy Hatcher.

        Content-type parameters not taken into account when building form-data
        https://bugs.webkit.org/show_bug.cgi?id=28970

        existing manual test case extended with new tests

        * English.lproj/localizedStrings.js:
        * inspector/front-end/ResourceView.js:
        (WebInspector.ResourceView.prototype._refreshFormData):
        (WebInspector.ResourceView.prototype._refreshParms):
        * manual-tests/inspector/display-form-data.html:

1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
2009-09-25  Yuan Song  <song.yuan@ericsson.com>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=14566

        Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value.

        Test: fast/js/invalid-domain-change-throws-exception.html

        * dom/Document.cpp:
        (WebCore::Document::setDomain):
        * dom/Document.h:
        * dom/Document.idl:

2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031
2009-09-25  Adam Barth  <abarth@webkit.org>

        Reviewed by Dimitri Glazkov.

        [V8] Teach ScheduledAction::execute about isolated worlds
        https://bugs.webkit.org/show_bug.cgi?id=27703

        When setTimeout is called with a string argument in an isolated
        world, we now compile the string in the isolated world.

        Last time we tried this change, we got a lot of crashes.  This
        time we're using a fresh local handle as our context to avoid
        trouble if the peristent handle gets disposed before we leave
        the context.

        Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html

        * bindings/v8/ScheduledAction.cpp:
        (WebCore::ScheduledAction::execute):

2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045
2009-09-25  Paul Godavari  <paul@chromium.org>

        Reviewed by Darin Fisher.

        Fix a regression in Mac Chromium popup menus, where the user's
        selection was ignored and the popup became unresponsive.
        https://bugs.webkit.org/show_bug.cgi?id=29726

        The fix is to notify the popup's client that the popup was hidden,
        even if the popup has no parent.

        * platform/chromium/PopupMenuChromium.cpp:
        (WebCore::PopupListBox::hidePopup):

2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064
2009-09-25  Alexander Pavlov  <apavlov@chromium.org>

        Reviewed by Dan Bernstein.

        Enable Pasteboard::writePlainText for Chromium and fix code style nits.
        https://bugs.webkit.org/show_bug.cgi?id=29734

        * platform/chromium/PasteboardChromium.cpp:
        (WebCore::Pasteboard::writePlainText):
        * platform/gtk/PasteboardGtk.cpp:
        (WebCore::Pasteboard::writePlainText):
        (WebCore::Pasteboard::writeURL):
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::writeSelection):
        (WebCore::Pasteboard::writePlainText):
        (WebCore::Pasteboard::writeURL):
        * platform/qt/PasteboardQt.cpp:
        (WebCore::Pasteboard::writePlainText):

2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077
2009-09-25  Yongjun Zhang  <yongjun.zhang@nokia.com>

        Reviewed by Ariya Hidayat.

        https://bugs.webkit.org/show_bug.cgi?id=28876
        [Qt] reduce peak memory consumption of text decoding.

        Chop large input buffer into small buffers to reduce peak memory
        during decoding.

        * platform/text/qt/TextCodecQt.cpp:
        (WebCore::TextCodecQt::decode):

2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173
2009-09-24  Jon Honeycutt  <jhoneycutt@apple.com>

        Add a mechanism for automatically halting plug-ins.

        Reviewed by Oliver Hunt and Alice Liu.

        * GNUmakefile.am:

        * WebCore.base.exp:
        Update export of Page constructor.

        * WebCore.gypi:

        * WebCore.pro:

        * WebCore.vcproj/WebCore.vcproj:
        Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
        HaltablePlugin.h.

        * WebCore.xcodeproj/project.pbxproj:
        Add files to Mac project.

        * loader/EmptyClients.h:
        Added an empty PluginHalterClient.
        (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
        Return false.

        * page/PluginHalter.cpp: Added.
        (WebCore::PluginHalter::PluginHalter):
        (WebCore::PluginHalter::didStartPlugin):
        Add the object to the plug-in set. If this is the only item in the set,
        set m_oldestStartTime to this object's time, and start the timer.
        (WebCore::PluginHalter::didStopPlugin):
        Remove the plug-in from the set.
        (WebCore::PluginHalter::timerFired):
        Find the cut-off time as the current time minus the allowed run time;
        plug-ins older than this may be halted. Iterate over the plug-ins. Find
        the object with the oldest start time that is too young to be halted;
        we'll use its start time to set the timer's next fire time. For all
        plug-ins that are candidates to be halted, call the
        PluginHalterClient's shouldHaltPlugin(). If this function returns true,
        call the plug-in's halt() function. Remove these objects from the set
        of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
        (WebCore::PluginHalter::startTimerIfNecessary):
        If the timer is set to fire, or the set of tracked plug-ins is empty,
        return early. Set the timer to fire after the oldest plug-in has run
        for the allowed run time.

        * page/PluginHalter.h: Added.
        (WebCore::PluginHalter::setPluginAllowedRunTime):

        * page/PluginHalterClient.h: Added.
        (WebCore::PluginHalterClient::~PluginHalterClient):

        * page/Page.cpp:
        (WebCore::Page::Page):
        Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
        to create the PluginHalter if necessary.
        (WebCore::Page::pluginHalterEnabledStateChanged):
        If plug-in halting is enabled, create the PluginHalter. If it is
        disabled, clear it.
        (WebCore::Page::pluginAllowedRunTimeChanged):
        If there is a plug-in halter, call its setPluginAllowedRunTime().
        (WebCore::Page::didStartPlugin):
        If there is a plug-in halter, call its didStartPlugin().
        (WebCore::Page::didStopPlugin):
        If there is a plug-in halter, call its didStopPlugin().

        * page/Page.h:
        Add a parameter to the Page constructor for the PluginHalterClient.
        Added declarations for didStartPlugin() and didStopPlugin(), which are
        called when HaltablePlugins are added to or removed from the page. Adds
        pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
        notify the Page when these settings are changed. Added members to hold
        the PluginHalter and the PluginHalterClient.

        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        (WebCore::Settings::setPluginHalterEnabled):
        If the enabled state has changed, call the Page's
        pluginHalterEnabledStateChanged().
        (WebCore::Settings::setPluginAllowedRunTime):
        Call the Page's pluginAllowedRunTimeChanged().

        * page/Settings.h:
        (WebCore::Settings::pluginHalterEnabled):
        (WebCore::Settings::pluginAllowedRunTime):

        * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that
        can be automatically halted.
        (WebCore::HaltablePlugin::~HaltablePlugin):

        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::dataChanged):
        Pass a dummy PluginHalterClient.

2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188
2009-09-24  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dan Bernstein.

        REGRESSION: webkit-transform scale no longer works properly in nightly build
        https://bugs.webkit.org/show_bug.cgi?id=29730
        
        When the initial or final state of a scale animation does not specify a transform,
        use a default scale of 1, rather than zero.

        Test: compositing/transitions/scale-transition-no-start.html

        * platform/graphics/mac/GraphicsLayerCA.mm:
        (WebCore::getTransformFunctionValue):

2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208
2009-09-24  John Gregg  <johnnyg@google.com>

        Reviewed by Eric Seidel.

        isEnabled switch for notifications (experimental) in Page Settings
        https://bugs.webkit.org/show_bug.cgi?id=28930

        Adds a run-time flag in Settings object that controls whether
        to expose desktop notifications.

        No new test, but test code also modified to set this preference.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::webkitNotifications): check preference before returning notifications object
        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        (WebCore::Settings::setExperimentalNotificationsEnabled):
        * page/Settings.h:
        (WebCore::Settings::experimentalNotificationsEnabled):

2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221
2009-09-24  Dan Bernstein  <mitz@apple.com>

        Reviewed by Sam Weinig.

        Fix <rdar://problem/7162000> Crash while trying to
        calculate the horizontal position of image

        Test: fast/inline-block/relative-positioned-rtl-crash.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Corrected an
        isInline() test to isRenderInline(). This is similar to r41259.

2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233
2009-09-24  Jessie Berlin  <jberlin@webkit.org>

        Reviewed by Timothy Hatcher.

        Fix expanding profile call stacks being broken after sorting.
        https://bugs.webkit.org/show_bug.cgi?id=26423

        * inspector/front-end/ProfileDataGridTree.js:
        (WebInspector.ProfileDataGridNode.prototype.sort):
        Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
        causes the children to be placed in the right positions.

2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250
2009-09-24  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Stephanie Lewis.

        Fixed sudden termination console spew due to too many calls to
        enableSuddenTermination.
        
        <rdar://problem/7063125> 10A410: Safari logging enableSuddenTermination errors

        * page/DOMWindow.cpp:
        (WebCore::removeUnloadEventListener):
        (WebCore::removeAllUnloadEventListeners):
        (WebCore::removeBeforeUnloadEventListener):
        (WebCore::removeAllBeforeUnloadEventListeners): Only
        enableSuddenTermination if the set of listeners is empty *and* this
        window was in the set. Otherwise, a no-op will cause us to enableSuddenTermination.

2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262
2009-09-24  Carol Szabo  <carol.szabo@nokia.com>

        Reviewed by Alexey Proskuryakov.

        WebKit returns "" instead of null when getting
        inexistent, forbidden or invalidly named headers.
        https://bugs.webkit.org/show_bug.cgi?id=29140

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::getResponseHeader):
        Changed to return null as it should according to the spec.

2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289
2009-09-24  Jeremy Orlow  <jorlow@chromium.org>

        Reviewed by Dimitri Glazkov.

        Add GYP generated files to svn:ignore
        https://bugs.webkit.org/show_bug.cgi?id=29724

        Adding the following files to the svn:ignore list (all in the
        WebCore/WebCore.gyp directory)

        WebCore.xcodeproj
        WebCore.sln
        WebCore.vcproj
        WebCore_Debug.rules
        WebCore_Release.rules
        WebCore_Release - no tcmalloc.rules
        WebCore_Purify.rules
        WebCore.mk
        WebCore_Debug_rules.mk
        WebCore_Release_rules.mk
        WebCore_Release - no tcmalloc_rules.mk
        WebCore_Purify_rules.mk
        WebCore.scons
        WebCore_main.scons

        * WebCore.gyp: Changed property svn:ignore.

kov@webkit.org's avatar
kov@webkit.org committed
2290 2291 2292 2293 2294 2295 2296 2297
2009-09-24  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        Unreviewed. Mac build fix.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
        remove unused parameter from function signature;

2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318
2009-09-24  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        Reviewed by Oliver Hunt.

        Implement correct horizontal scrollbar behavior for GTK+ also on
        styled scrollbars.

        https://bugs.webkit.org/show_bug.cgi?id=29348
        [Gtk] Scrollwheel on horizontal scrollbars should slide horizontally

        Test: platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleWheelEvent): on GTK+, when using the
        wheel with the pointer on the horizontal scrollbar, scroll
        horizontally;
        * platform/PlatformWheelEvent.h:
        * platform/gtk/WheelEventGtk.cpp:
        (WebCore::PlatformWheelEvent::swapOrientation): allow adding a
        vertical scroll to the horizontal one;

2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335
2009-09-24  Jeremy Orlow  <jorlow@chromium.org>

        Reviewed by Eric Seidel.

        StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
        https://bugs.webkit.org/show_bug.cgi?id=29290

        Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
        per http://webkit.org/coding/RefPtr.html

        No behavior change, so no tests.

        * storage/StorageNamespace.h:
        * storage/StorageNamespaceImpl.cpp:
        (WebCore::StorageNamespaceImpl::storageArea):
        * storage/StorageNamespaceImpl.h:

2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355
2009-09-24  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Added back enable/disableSuddenTermination() functionality I accidentally
        removed in my last patch.

        * page/DOMWindow.cpp:
        (WebCore::addUnloadEventListener):
        (WebCore::removeUnloadEventListener):
        (WebCore::removeAllUnloadEventListeners):
        (WebCore::addBeforeUnloadEventListener):
        (WebCore::removeBeforeUnloadEventListener):
        (WebCore::removeAllBeforeUnloadEventListeners):
        (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
        (WebCore::DOMWindow::~DOMWindow):
        (WebCore::DOMWindow::addEventListener):
        (WebCore::DOMWindow::removeEventListener):
        (WebCore::DOMWindow::removeAllEventListeners):

2356 2357 2358 2359 2360 2361 2362 2363
2009-09-24  Sam Weinig  <sam@webkit.org>

        Reviewed by Steve Falkenburg and Mark Rowe.

        Don't pass -F to GCC on non-mac platforms since it is an darwin only.

        * DerivedSources.make:

weinig@apple.com's avatar
weinig@apple.com committed
2364 2365 2366 2367 2368 2369
2009-09-24  Sam Weinig  <sam@webkit.org>

        Fix windows build.

        * dom/Element.idl:

2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384
2009-09-23  Stephen White  <senorblanco@chromium.org>

        Reviewed by Eric Seidel.

        Revert the relevant parts of r47925, and implement an alternate
        fix (localize the coordinate check to GraphicsContext::clipPath()).
        This fixes http://crbug.com/21174.

        Covered by LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html.

        * platform/graphics/skia/GraphicsContextSkia.cpp:
        (WebCore::GraphicsContext::clipPath):
        * platform/graphics/skia/PlatformContextSkia.cpp:
        (PlatformContextSkia::currentPathInLocalCoordinates):

2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398
2009-09-24  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam Weinig.

        Merge changes from Mozilla's FTP directory parser.
        <rdar://problem/7227620> and https://bugs.webkit.org/show_bug.cgi?id=29294

        FTP layout tests not possible at this time.
        https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible.

        * loader/FTPDirectoryParser.cpp:
        (WebCore::ParsingFailed):
        (WebCore::parseOneFTPLine):

kov@webkit.org's avatar
WebCore  
kov@webkit.org committed
2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412
2009-09-24  Philippe Normand  <pnormand@igalia.com>

        Reviewed by Gustavo Noronha.

        [GTK] re-enable some media tests
        https://bugs.webkit.org/show_bug.cgi?id=29716

        make canPlayType() return "probably" if mime-type is known
        and codecs string is not empty. If codecs is empty return
        "maybe".

        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivate::supportsType):

2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444
2009-09-24  Sam Weinig  <sam@webkit.org>

        Reviewed by Dan Bernstein.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=29703
        Add a function to element to check whether it matches a CSS selector

        Implement Element.webkitMatchesSelector.

        * css/CSSSelectorList.cpp:
        (WebCore::forEachTagSelector):
        (WebCore::forEachSelector):
        (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
        (WebCore::CSSSelectorList::selectorsNeedNamespaceResolution):
        * css/CSSSelectorList.h:
        Moved code to iterate the CSSSelectorList and determine if any
        selectors need namespace resolution from a static function in
        Node.cpp to CSSSelectorList so that it can be used by webkitMatchesSelector
        as well as querySelector/querySelectorAll.

        * dom/Element.cpp:
        (WebCore::Element::webkitMatchesSelector):
        * dom/Element.h: 
        * dom/Element.idl:
        Implement the new function. Handles exceptional cases identically to
        querySelector/querySelectorAll.

        * dom/Node.cpp:
        (WebCore::Node::querySelector):
        (WebCore::Node::querySelectorAll):
        Moved selectorsNeedNamespaceResolution to CSSSelectorList from here.

2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468