1. 21 May, 2009 15 commits
    • ggaren@apple.com's avatar
      WebCore: · 1625e181
      ggaren@apple.com authored
      2009-05-21  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Sam Weinig.
              
              Test for <rdar://problem/6910832> | https://bugs.webkit.org/show_bug.cgi?id=25907
              Incorrect URL returned to the DOM while the user drags a file
      
              * page/DragController.cpp:
              (WebCore::DragController::dragExited):
              (WebCore::DragController::tryDHTMLDrag): Don't base our decision on KURL,
              since that only looks at the text of the document's URL. Do base our
              decision on the securityOrigin(), which knows more about the document's
              actual origin.
      
      LayoutTests:
      
      2009-05-21  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Sam Weinig.
              
              Tests for <rdar://problem/6910832> | https://bugs.webkit.org/show_bug.cgi?id=25907
              Incorrect URL returned to the DOM while the user drags a file
      
              * http/tests/local/drag-over-remote-content-expected.txt: Added.
              * http/tests/local/drag-over-remote-content.html: Added.
              * http/tests/security/drag-over-remote-content-iframe-expected.txt: Added.
              * http/tests/security/drag-over-remote-content-iframe.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1625e181
    • mitz@apple.com's avatar
      Correct change log · 4d8c3b53
      mitz@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d8c3b53
    • mitz@apple.com's avatar
      Rubber-stamped by Mark Rowe. · 7f18d4c6
      mitz@apple.com authored
              - fix https://bugs.webkit.org/show_bug.cgi?id=25947
                Assertion failure in FrameLoader::transitionToCommitted on launch in
                Safari with r43985
      
              Rolled out r43985.
      
              * platform/MIMETypeRegistry.cpp:
              (WebCore::initializeSupportedNonImageMimeTypes):
              (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f18d4c6
    • weinig@apple.com's avatar
      2009-05-21 Sam Weinig <sam@webkit.org> · f1fd6bdc
      weinig@apple.com authored
              Reviewed by Brady Eidson and Mark Rowe.
      
              Fix for <rdar://problem/6901522>
              REGRESSION: Office 2008: Preview with browser is not shown, and Finder window is in the front of Safari
      
              If the NSURLRequest is annotated with a "ForceHTMLMIMEType" property, force
              the MIME type to be text/html.
      
              * platform/network/mac/ResourceHandleMac.mm:
              (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f1fd6bdc
    • kevino@webkit.org's avatar
      Blind windows fix after last commit. · a6a9060e
      kevino@webkit.org authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6a9060e
    • kevino@webkit.org's avatar
      Reviewed by Kevin Ollivier. · 20042a1b
      kevino@webkit.org authored
      Use an environment variable to control which logs are on and off.
      Also, make a generic function for translating channel name to its log.
              
      https://bugs.webkit.org/show_bug.cgi?id=25936
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      20042a1b
    • levin@chromium.org's avatar
      2009-05-21 David Levin <levin@chromium.org> · 27b94505
      levin@chromium.org authored
              Reviewed by Darin Fisher.
      
              Bug 25946: Chromium needs MIMETypeRegistry::getMediaMIMETypeForExtension implementation.
              https://bugs.webkit.org/show_bug.cgi?id=25946
      
              A very simple implementation to keep it working.  A bug has been filed in the chromium db
              (http://code.google.com/p/chromium/issues/detail?id=12441) to investigate doing something more
              complete.
      
              * platform/chromium/MimeTypeRegistryChromium.cpp:
              (WebCore::MIMETypeRegistry::getMediaMIMETypeForExtension):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      27b94505
    • darin@chromium.org's avatar
      2009-05-20 Siddhartha Chattopadhyaya <sidchat@google.com> · 8d742947
      darin@chromium.org authored
              Reviewed by Justin Garcia.
              
              Add automatic spell correction support in WebKit
      
              https://bugs.webkit.org/show_bug.cgi?id=24953
      
              * editing/Editor.cpp:
              (WebCore::findFirstMisspellingInRange):
              (WebCore::Editor::advanceToNextMisspelling):
              (WebCore::Editor::markMisspellingsAfterTypingToPosition):
              (WebCore::markAllMisspellingsInRange):
              (WebCore::markMisspellingsOrBadGrammar):
              (WebCore::Editor::markMisspellings):
              (WebCore::Editor::markBadGrammar):
              (WebCore::Editor::markMisspellingsAndBadGrammar):
              * editing/Editor.h:
              * loader/EmptyClients.h:
              (WebCore::EmptyEditorClient::getAutoCorrectSuggestionForMisspelledWord):
              * page/EditorClient.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8d742947
    • christian@webkit.org's avatar
      2009-05-21 Christian Dywan <christian@twotoasts.de> · 98fe0a12
      christian@webkit.org authored
              Reviewed by Darin Adler.
      
              Text files which have sub MIME types are treated as not displayable
              http://bugs.webkit.org/show_bug.cgi?id=24903
      
              * platform/MIMETypeRegistry.cpp:
              (WebCore::initializeSupportedNonImageMimeTypes):
              (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType): Regard any
              MIME type beginning with "text/" as supported and remove all "text/"
              types from the list.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      98fe0a12
    • ap@webkit.org's avatar
      Reviewed by David Kilzer. · 089d8710
      ap@webkit.org authored
              https://bugs.webkit.org/show_bug.cgi?id=25890
              Implement Network logging channel on Mac
      
              * platform/network/mac/ResourceHandleMac.mm:
              (WebCore::ResourceHandle::~ResourceHandle):
              (WebCore::ResourceHandle::start):
              (WebCore::ResourceHandle::cancel):
              (WebCore::ResourceHandle::setDefersLoading):
              (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
              (-[WebCoreResourceHandleAsDelegate connectionShouldUseCredentialStorage:]):
              (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
              (-[WebCoreResourceHandleAsDelegate connection:didCancelAuthenticationChallenge:]):
              (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
              (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
              (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
              (-[WebCoreResourceHandleAsDelegate connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]):
              (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
              (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
              (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
              Added logging for async requests (as these are most interesting).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      089d8710
    • eric.carlson@apple.com's avatar
      2009-05-21 Eric Carlson <eric.carlson@apple.com> · fa182c8d
      eric.carlson@apple.com authored
              Reviewed by David Kilzer.
      
              <rdar://problem/6902197> WebCore doesn't know about all of the MIME types supported by QTKit
              
              Add a static table to map from some common file extensions to their MIME types so it
              is possible to detect support even when the platform mapping is incomplete. Use the
              table to lookup types not found by UTI on the OSX, and when looking for a media engine
              with a generic or missing type.
      
              * platform/MIMETypeRegistry.cpp:
              (WebCore::initializeMediaTypeMaps): New, initialize the mediaMIMETypeForExtensionMap.
              (WebCore::MIMETypeRegistry::getMediaMIMETypeForExtension): New. Look for the specified
              MIME type in the static mapping table if the platform specific getMIMETypeForExtension
              doesn't find a match.
              * platform/MIMETypeRegistry.h: Declare getMediaMIMETypeForExtension.
      
              * platform/graphics/MediaPlayer.cpp:
              (WebCore::MediaPlayer::load): When the type passed is empty, "application/octet-stream", or
              "text/plain", try to look it up based on the file extension with getMediaMIMETypeForExtension.
      
              * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
              (WebCore::addFileTypesToCache): See if getMediaMIMETypeForExtension can map from file extension
              to MIME type if UTI fails.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa182c8d
    • eric@webkit.org's avatar
      2009-05-21 Eric Seidel <eric@webkit.org> · 3d81d65f
      eric@webkit.org authored
              Reviewed by Alexey Proskuryakov.
      
              Clean up DragController
              https://bugs.webkit.org/show_bug.cgi?id=25926
      
              I renamed m_document to m_documentUnderMouse to better document what it does
              I could call it m_lastDocumentUnderMouse to be most-accurate, but this seemed
              long enough.
      
              I also saw copy/paste code involving clearing the selection when moving out of
              one document and into another.  I moved that code into a function called
              mouseMovedIntoDocument.
      
              I also got rid of a couple needless null-checks after confirming via source
              inspection they were not ever possible.
              In Mac WebKit it's not possible to have a Page that doesn't have a mainFrame()
              I left an ASSERT(m_page->mainFrame()) in case some other port ever violates this.
              It's also not possible to return a document from documentAtPoint that is not
              in a frame (as such a document would not be rendered).
      
              No functional changes, thus no tests.
      
              * page/DragController.cpp:
              (WebCore::DragController::DragController):
              (WebCore::DragController::dragIsMove):
              (WebCore::DragController::dragExited):
              (WebCore::DragController::performDrag):
              (WebCore::DragController::mouseMovedIntoDocument):
              (WebCore::DragController::dragEnteredOrUpdated):
              (WebCore::DragController::tryDocumentDrag):
              (WebCore::DragController::operationForLoad):
              (WebCore::DragController::concludeEditDrag):
              (WebCore::DragController::canProcessDrag):
              (WebCore::DragController::tryDHTMLDrag):
              (WebCore::DragController::placeDragCaret):
              * page/DragController.h:
              (WebCore::DragController::documentUnderMouse):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3d81d65f
    • eric@webkit.org's avatar
      2009-05-21 Eric Seidel <eric@webkit.org> · 5797165d
      eric@webkit.org authored
              Reviewed by Alexey Proskuryakov.
      
              Rename DragController::dragOperation() to sourceDragOperation() for clarity
              Remove unused setDragOperation()
      
              There are two times DragOperation is used.  The source specifies
              what drag operations it supports (in a mask) and the destination
              picks a subset of those as DragOperations it supports if a drop were
              to occur.  I was confused when I first saw this accessor as to which
              it meant.  It turns out that this is only used when WebKit starts a
              drag, and we keep it around so that we can provide this information
              to other Mac OS X applications when they ask.  I've renamed the method
              for clarity so the next person in this code will be less confused.
      
              No functional changes, thus no tests.
      
              * page/DragController.h:
              (WebCore::DragController::sourceDragOperation):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5797165d
    • mitz@apple.com's avatar
      WebCore: · b48ad77e
      mitz@apple.com authored
              Reviewed by Anders Carlsson.
      
              - WebCore part of <rdar://problem/6901751> REGRESSION (r35515): Tiger
                crash painting the selection on registration page of car2go.com
      
              A bug in old versions of Core Graphics causes memory corruption to occur
              when clipping under certain conditions. Make the clipping functions
              fail silently under those conditions.
      
              Test: fast/block/float/selection-gap-clip-out-tiger-crash.html
      
              * WebCore.Tiger.exp: Added wkCGContextIsSafeToClip
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::safeCGContextClip): Added a wrapper around CGContextClip that,
              on Tiger, bails out if wkCGContextIsSafeToClip() returns false.
              (WebCore::safeCGContextEOClip): Ditto for CGContextEOClip.
              (WebCore::safeCGContextClipToRect): Ditto for CGContextClipToRect.
              (WebCore::GraphicsContext::fillPath): Changed to call the safe variants
              of CGContextClip, CGContextEOClip and CGContextClipToRect.
              (WebCore::GraphicsContext::strokePath): Ditto.
              (WebCore::GraphicsContext::fillRect): Ditto.
              (WebCore::GraphicsContext::clip): Ditto.
              (WebCore::GraphicsContext::clipOut): Ditto.
              (WebCore::GraphicsContext::clipOutEllipseInRect): Ditto.
              (WebCore::GraphicsContext::clipPath): Ditto.
              (WebCore::GraphicsContext::addInnerRoundedRectClip): Ditto.
              (WebCore::GraphicsContext::strokeRect): Ditto.
              * platform/mac/WebCoreSystemInterface.h: Added wkCGContextIsSafeToClip.
              * platform/mac/WebCoreSystemInterface.mm: Added wkCGContextIsSafeToClip.
      
      WebKit/mac:
      
              Reviewed by Anders Carlsson.
      
              - WebKit part of <rdar://problem/6901751> REGRESSION (r35515): Tiger
                crash painting the selection on registration page of car2go.com
      
              * WebCoreSupport/WebSystemInterface.m:
              (InitWebCoreSystemInterface): Added CGContextIsSafeToClip.
      
      WebKitLibraries:
      
              Reviewed by Anders Carlsson.
      
              - WebKitSystemInterface part of <rdar://problem/6901751> REGRESSION
                (r35515): Tiger crash painting the selection on registration page of
                car2go.com
      
              * WebKitSystemInterface.h:
              * libWebKitSystemInterfaceTiger.a:
      
      LayoutTests:
      
              Reviewed by Anders Carlsson.
      
              - test for <rdar://problem/6901751> REGRESSION (r35515): Tiger crash
                painting the selection on registration page of car2go.com
      
              * fast/block/float/selection-gap-clip-out-tiger-crash-expected.txt: Added.
              * fast/block/float/selection-gap-clip-out-tiger-crash.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b48ad77e
    • xan@webkit.org's avatar
      2009-05-21 Xan Lopez <xlopez@igalia.com> · 199d078e
      xan@webkit.org authored
              Unreviewed build fix.
      
              https://bugs.webkit.org/show_bug.cgi?id=25910
              WebkitGTK r43960 cannot compile
      
              Do not include local copy of guriescape header, which was
              removed. We now use the copy in glib.
      
              * platform/gtk/FileSystemGtk.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      199d078e
  2. 20 May, 2009 25 commits