1. 23 Jan, 2007 20 commits
    • oliver's avatar
      2007-01-23 Oliver Hunt <oliver@apple.com> · 72661129
      oliver authored
              Reviewed by Adam.
              Fixes dropping of files into safari
              * page/DragController.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • andersca's avatar
      Reviewed by Darin. · d0283b5c
      andersca authored
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              Copy APICasts.h
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • justing's avatar
      Reviewed by john · 41d2d60f
      justing authored
              REGRESSION: Items duplicated when moved inside contenteditable element (11766)
              * editing/pasteboard/4947130-expected.checksum: Added.
              * editing/pasteboard/4947130-expected.png: Added.
              * editing/pasteboard/4947130-expected.txt: Added.
              * editing/pasteboard/4947130.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • beidson's avatar
      Reviewed by Darin · 8f6011f3
      beidson authored
              Added a couple of CF things previously missed
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ggaren's avatar
      Reviewed by Maciej Stachowiak. · 94d02334
      ggaren authored
              Fixed <rdar://problem/4885131> Move CFString function declarations from 
              JSStringRef.h to JSStringRefCF.h
              Also removed remaining API FIXMEs and changed them into Radars.
              * API/JSClassRef.cpp:
              (OpaqueJSClass::OpaqueJSClass): Added Radar numbers for UTF8 conversion.
              * API/JSContextRef.cpp:
              (JSGlobalContextCreate): Replaced FIXME for NULL JSContextRef with Radar number.
              * API/JSObjectRef.h: Removed FIXME, which is unprofessional in a public header.
              * API/JSStringRef.cpp: Moved CF related implementations to JSStringRefCF.cpp.
              (JSStringCreateWithUTF8CString): Replaced FIXME with Radar number.
              * API/JSStringRef.h: Moved CF related declarations to JSStringRefCF.h. Added
              #include of JSStringRefCF.h as a stopgap until clients start #including
              it as needed by themselves.
              * API/JSStringRefCF.cpp: Added.
              (JSStringCopyCFString): Replaced JSChar cast with UniChar cast, which is 
              more appropriate for a CF call.
              * API/JSStringRefCF.h: Added.
              * JavaScriptCore.xcodeproj/project.pbxproj:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zimmermann's avatar
      Reviewed by Maciej. · 178423c6
      zimmermann authored
      Fix evil genericContext() assertion, which occours sometimes when running DRT.
      Fixes: http://bugs.webkit.org/show_bug.cgi?id=12379
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • bdakin's avatar
      WebCore: · 426f7c67
      bdakin authored
              Reviewed by Hyatt.
              Fix for <rdar://problem/4843226> REGRESSION: Pull down menu appears 
              clipped at http://istweb.apple.com/
              * rendering/RenderLayer.cpp:
              (WebCore::transparencyClipBox): Always unite with sibling rects.
              Reviewed by Hyatt.
              Test for <rdar://problem/4843226> REGRESSION: Pull down menu 
              appears clipped at http://istweb.apple.com/
              * fast/clip/nestedTransparencyClip-expected.checksum: Added.
              * fast/clip/nestedTransparencyClip-expected.png: Added.
              * fast/clip/nestedTransparencyClip-expected.txt: Added.
              * fast/clip/nestedTransparencyClip.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • justing's avatar
      LayoutTests: · 604aedb0
      justing authored
              Reviewed by john
              REGRESSION: GMail Editor: Attempting to remove formatting from selection results in a crash at WebCore::Range::checkDeleteEx
              Reviewed by john
              REGRESSION: GMail Editor: Attempting to remove formatting from selection results in a crash at WebCore::Range::checkDeleteExtract()
              * dom/Range.cpp:
              (WebCore::Range::checkDeleteExtract): Return if there is no
              commonAncestor container or if commonAncestorContainer() throws
              an exception.
              * editing/Editor.cpp:
              (WebCore::Editor::removeFormattingAndStyle): Fixed a bug that reversed
              the order of the selected paragraphs.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zimmermann's avatar
      Reviewed by Sam. · 7cc2322c
      zimmermann authored
      Fix dynamic creation/updates of markers, masks, clipPaths, and several tiny pattern issues.
      Added 16 (!) new layout tests covering quite some weird scenerios - Batik & Opera do have problems, we don't.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • adele's avatar
      WebCore: · 1c204837
      adele authored
              Reviewed by Darin.
              WebCore part of fix for <rdar://problem/4946753>REGRESSION: Inserting tabs is broken in Mail
              In addition to this fix, I also reorganized some event handling code for keyPress events to
              prepare for another fix.  There's also just a little bit of unrelated cleanup.
              * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler):
                Move tab focus behavior into new defaultKeyboardEventHandler method.
              * bridge/EditorClient.h: Added handleKeyPress.
              * editing/Editor.cpp:
              (WebCore::Editor::handleKeyPress): Added. Calls over to the client method.
              (WebCore::Editor::deleteRange): Removed unnecessary propogateDOMException.
              * editing/Editor.h: Added handleKeyPress.
              (WebCore::Editor::addToKillRing): Formatting cleanup.
              * editing/mac/EditorMac.mm: Removed unnecessary propogateDOMException.
              * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): Added. Checks
                the tabKeyCyclesThroughElements setting before advancing focus for tab key events.  Calls handleKeyPress.
              * page/EventHandler.h: Added defaultKeyboardEventHandler.
              * page/Page.cpp: (WebCore::Page::Page): Initialize m_tabKeyCyclesThroughElements to true.
              * page/Page.h: Added m_tabKeyCyclesThroughElements.
              (WebCore::Page::setTabKeyCyclesThroughElements): Added.
              (WebCore::Page::tabKeyCyclesThroughElements): Added.
              * platform/PlatformKeyboardEvent.h: Added ability to get NSEvent from PlatformKeyboardEvent.
              * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
                Initialize m_macEvent to the NSEvent.
              * platform/graphics/svg/SVGImageEmptyClients.h: (WebCore::SVGEmptyEditorClient::handleKeyPress): Added.
              Reviewed by Darin.
              WebKit part of fix for <rdar://problem/4946753>REGRESSION: Inserting tabs is broken in Mail
              In addition to this fix, I also reorganized some event handling code for keyPress events to
              prepare for another fix.
              * WebCoreSupport/WebEditorClient.h: Added handleKeyPress method.
              * WebCoreSupport/WebEditorClient.mm:
              (WebEditorClient::handleKeyPress): Added.  Code moved from WebHTMLView keyDown method.
               This is called from the defaultEventHandler so that in the future, we can make the right 
               decision about which selection the keyPress should apply to.
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView keyDown:]): Moved _interceptEditingKeyEvent call to handleKeyPress.
              (-[WebHTMLView _interceptEditingKeyEvent:]): Prevents intercepting keys for cmd-modified events. Removed tabCycling checks
               since this is now handled in WebCore.
              * WebView/WebHTMLViewInternal.h: Made _interceptEditingKeyEvent SPI.
              * WebView/WebView.mm: Use new tabKeyCyclesThroughElements methods on the page.
              (-[WebViewPrivate init]): ditto.
              (-[WebView setTabKeyCyclesThroughElements:]): ditto.
              (-[WebView tabKeyCyclesThroughElements]): ditto.
              (-[WebView setEditable:]): ditto
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • staikos's avatar
      Temporary measure to make it possible to use the Qt port until the official Qt · 9fd5a74a
      staikos authored
      API is done
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • staikos's avatar
      Compile with a released Qt. · 309162be
      staikos authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • lars's avatar
      Reviewed by Zack · 441f8272
      lars authored
              Widget and ScrollView do not own the Qt widgets
              anymore. Make sure they can handle the case of
              a null QWidget and never delete them.
              Fix refcounting of FrameViews (they get created with a
              refcount of 1) and add a few safety checks to the 
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zack's avatar
      Forgot to add this file to the build (fix the build for real) · c42e7c9f
      zack authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zack's avatar
      Adjust the DragClient to latest changes. · c03f0c71
      zack authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zack's avatar
      Fix the Qt build · 1bd89127
      zack authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • lars's avatar
      Reviewed by Maciej · 1e1dad3d
      lars authored
              Make the last remaining pieces of the FrameLoader platform 
              independent. Move most of the code over to WebFrameLoaderClient.
              Some smaller cleanups in the WebFrameBridge, and moved some
              platform independent functionality over to the shared code
              in WebCore.
              Add support for Frames to the Qt build and fix some issues
              in the API classes.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • oliver's avatar
      2007-01-23 Oliver Hunt <oliver@apple.com> · 609a7d0e
      oliver authored
              Reviewed by Adam.
              Qt build stubs for Drop logic
              * WebCoreSupport/DragClientQt.cpp: Added.
              * WebCoreSupport/DragClientQt.h: Added.
              * WebKitPart/WebKitPart.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • oliver's avatar
      2007-01-23 Oliver Hunt <oliver@apple.com> · 67ff178d
      oliver authored
              Reviewed by Adam.
              Drop logic bindings for WebKit
              * WebCoreSupport/WebDragClient.h: Added.
              * WebCoreSupport/WebDragClient.mm: Added.
                Standard client impl
              * WebCoreSupport/WebFrameBridge.mm:
              (-[WebFrameBridge startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
                Updated to use DragController to track drag state
              * WebCoreSupport/WebPasteboardHelper.h: Added.
                A *temporary* Helper class to access NSPasteboard access and 
                manipulation functions present in WebKit
              * WebCoreSupport/WebPasteboardHelper.mm: Added.
                See header comment
              * WebKit.xcodeproj/project.pbxproj:
              * WebView/WebDocumentInternal.h:
                Remove unnecessary protocol
              * WebView/WebFrameView.mm:
              (-[WebFrameView _setDocumentView:]):
                Updating to use DragController to track drag state
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
              (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]):
              (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
              (-[WebHTMLView draggedImage:endedAt:operation:]):
              (-[WebHTMLView _documentFragmentForPasteboard:]):
                Helper method to generate DocumentFragment from NSPasteboard without regressing 
              (-[WebHTMLView _canProcessDragWithDraggingInfo:]):
                Updating to use DragController to track drag state
              (-[WebHTMLView _isMoveDrag:]):
              (-[WebHTMLView _isNSColorDrag:]):
              * WebView/WebHTMLViewInternal.h:
                Removing unnecessary fields and methods
              * WebView/WebView.mm:
              (-[WebViewPrivate dealloc]):
                Remove obsolete ASSERT
              (-[WebView _setInitiatedDrag:]):
                Now passes directly through to DragController
              (-[WebView _commonInitializationWithFrameName:groupName:]):
              (-[WebView _loadingDragOperationForDraggingInfo:]):
              (-[WebView draggingEntered:]):
                Updated to use DragController
              (-[WebView draggingUpdated:]):
              (-[WebView draggingExited:]):
              (-[WebView performDragOperation:]):
              (-[WebView _hitTest:dragTypes:]):
              * WebView/WebViewInternal.h:
                remove unnecessary method def
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • oliver's avatar
      2007-01-23 Oliver Hunt <oliver@apple.com> · aeffa297
      oliver authored
              Reviewed by Adam.
              Added DragController to handled drag and drop state and control logic.
              Currently this only handles logic for Dragging and Dropping, and is 
              unable to initialise a drag itself.
              platform/DragData encapsulate the paltform Drag data (NSDraggingInfo on Mac, 
              QMimeType in Qt).  This provides methods to pull data out the drag data as a String, 
              a URL, a DocumentFragment (for rich content), or a Colour.
              * WebCore.exp:
              * WebCore.pro:
              * WebCore.xcodeproj/project.pbxproj:
              * dom/Clipboard.cpp: Added.
                move platform independent functions from ClipboardMac to Clipboard
              * dom/Clipboard.h:
                as above -- also removed virtual modifier from now 
                platform independent methods
              * editing/Editor.cpp:
              * editing/Editor.h:
                adding calls through to EditorClient
              * page/DragActions.h: Added.
                Replicates a number of NS* enums in the WebCore namespace
              * page/DragClient.h: Added.
                Standard client interface for dragging UIDelegate
              * page/DragController.cpp: Added.
                Class to handle state and logic for dragging and dropping
              * page/DragController.h: Added.
                See above
              * page/Page.cpp:
                Update Page to have DragController
              * page/Page.h:
              * page/mac/DragControllerMac.mm: Added.
                Platform specific portions of the DragController
              * page/mac/EventHandlerMac.mm:
                Convert from NSDragOperation to WebCore::DragOperation
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
                Remove obsolete Drag functions
              * page/qt/DragControllerQt.cpp: Added.
                Basic stubs to maintain Qt  build
              * platform/DragData.cpp: Added.
              * platform/DragData.h: Added.
                DragData class to encapsulate platform drag data/event
              * platform/graphics/svg/SVGImage.cpp:
                Addition of dummy DragClient
              * platform/graphics/svg/SVGImageEmptyClients.h:
              * platform/mac/ClipboardMac.h:
              * platform/mac/ClipboardMac.mm:
               Moving platform independent logic to Clipboard, and updating
               platform specific methods to use appropriate accessors rather than 
               directly manipulating data they no longer own
              * platform/mac/DragDataMac.mm: Added.
                Mac implementations of DragData methods.  A number of these use
                a Helper class that accesses WebKit functionality.  That functionality 
                should be migrated to WebCore in the future.
              * platform/mac/PasteboardHelper.h: Added.
                Temporary, and Mac only, helper class to access WebKit functionality 
                from WebCore
              * platform/qt/DragDataQt.cpp: Added.
               Basic stubs to maintain Qt build
              * rendering/HitTestResult.cpp:
               Correct HitTestResult copy contructor to copy localPoint
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  2. 22 Jan, 2007 14 commits
    • bdash's avatar
      2007-01-22 Mark Rowe <mrowe@apple.com> · fa8c5eca
      bdash authored
              Reviewed by Maciej.
              Bug 11692: REGRESSION(r17352): Disappearing page title
              * dom/Document.cpp:
              (WebCore::Document::setTitle): If the title has already been set explicitly via JavaScript,
              ignore any changes to it due to encountering <title> tags.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • weinig's avatar
      LayoutTests: · f98f37cd
      weinig authored
              Reviewed by Darin.
              - test for http://bugs.webkit.org/show_bug.cgi?id=12344
                NativeListBox: item hit testing does not account for top padding and border
              * fast/forms/listbox-selection-2-expected.checksum: Added.
              * fast/forms/listbox-selection-2-expected.png: Added.
              * fast/forms/listbox-selection-2-expected.txt: Added.
              * fast/forms/listbox-selection-2.html: Added.
              Reviewed by Darin.
              - fix http://bugs.webkit.org/show_bug.cgi?id=12344
                NativeListBox: item hit testing does not account for top padding and border
              Test: fast/forms/listbox-selection-2.html
              * rendering/RenderListBox.cpp:
              (WebCore::RenderListBox::numVisibleItems): Changed height() to contentHeight()
              since items are visible only in the content box.
              (WebCore::RenderListBox::listIndexAtOffset): Adjusted for vertical padding and
              borders. Changed to return -1 instead of the last item's index if the given offset
              is below the last item.
              (WebCore::RenderListBox::autoscroll): Adjusted for vertical padding and borders.
              (WebCore::RenderListBox::controlClipRect): Changed to return the content box since
              items should not spill into the padding box. This change is the reason the test
              generates pixel results.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • justing's avatar
      LayoutTests: · 0982ef50
      justing authored
              Reviewed by darin
              editing/pasteboard/4641033 layout test is broken (12328)
              The fixes not only make this test pass, but also fix a bug that 
              was reflected in the results checked in for this test.  The caret
              was in the wrong position:
              * editing/pasteboard/4641033-expected.checksum:
              * editing/pasteboard/4641033-expected.png:
              * editing/pasteboard/4641033-expected.txt:
              * editing/pasteboard/4944770-1-expected.checksum: Added.
              * editing/pasteboard/4944770-1-expected.png: Added.
              * editing/pasteboard/4944770-1-expected.txt: Added.
              * editing/pasteboard/4944770-1.html: Added.
              * editing/pasteboard/4944770-2-expected.checksum: Added.
              * editing/pasteboard/4944770-2-expected.png: Added.
              * editing/pasteboard/4944770-2-expected.txt: Added.
              * editing/pasteboard/4944770-2.html: Added.
              * editing/pasteboard/4944770-expected.checksum: Added.
              * editing/pasteboard/4944770-expected.png: Added.
              * editing/pasteboard/4944770-expected.txt: Added.
              Equivalent render trees:
              * editing/execCommand/format-block-from-range-selection-expected.txt:
              * editing/pasteboard/drag-drop-modifies-page-expected.txt:
              * editing/pasteboard/nested-blocks-with-text-area-expected.checksum:
              * editing/pasteboard/nested-blocks-with-text-area-expected.png:
              * editing/pasteboard/nested-blocks-with-text-area-expected.txt:
              * editing/pasteboard/nested-blocks-with-text-field-expected.checksum:
              * editing/pasteboard/nested-blocks-with-text-field-expected.png:
              * editing/pasteboard/nested-blocks-with-text-field-expected.txt:
              Reviewed by darin
              editing/pasteboard/4641033 layout test is broken (12328)
              This layout test failure demonstrates three bugs:
              Smart replace shouldn't be turned on, but is because a word
              selection granularity from the previous test isn't cleared.
              Smart replace shouldn't add any spaces because the paste is performed
              in an empty paragraph.
              Smart replace spaces are added to the text of options inside
              the select element instead of before/after the select element.
              This patch fixes the second two problems.  During a 
              ReplaceSelectionCommand, the VisiblePosition for the end of 
              the inserted content is the last position in the last leaf 
              inserted.  This is a problem when the last leaf is inside a 
              select element, since VP creation is inconsistent there.  
              Second, smart spaces were inserted inside the last leaf, not
              at the endOfInsertedContent.
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::shouldMergeStart): Renamed 
              m_lastNodeInserted to m_lastLeafInserted.  Use the 
              start/endOfInsertedContent getters.
              (WebCore::ReplaceSelectionCommand::shouldMergeEnd): Ditto.
              (WebCore::ReplaceSelectionCommand::removeNodePreservingChildren): Ditto.
              (WebCore::ReplaceSelectionCommand::removeRedundantStyles): Ditto.
              (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): Added.
              Special case for when the last leaf inserted is inside a select 
              element: return the VisiblePosition after the select element.
              (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): Added.
              (WebCore::ReplaceSelectionCommand::doApply): Did renaming.  Used
              the start/endOfInsertedContent getters.  Insert smart replace spaces
              into the right nodes.
              (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Renaming.
              (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
              (WebCore::ReplaceSelectionCommand::updateNodesInserted): Ditto.
              * editing/ReplaceSelectionCommand.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Adam. · 03488715
      darin authored
              - fix http://bugs.webkit.org/show_bug.cgi?id=12273
                REGRESSION: File input value invisible after removing and re-appending
              - made more of the file chooser code cross-platform
              - fixed an Objective-C garbage collection problem in FileChooser
              - tried to remove layering violations where FileChooser in the platform
                directory knows about the rendering and DOM trees (but wasn't able to
                do it entirely)
              * platform/FileChooser.cpp: Added.
              (WebCore::FileChooser::create): Changed parameters.
              (WebCore::FileChooser::chooseFile): Changed to call chooseIcon function.
              (WebCore::FileChooser::chooseIcon): Added.
              * platform/FileChooser.h: Added FileChooserClient so this file doesn't have
              to know about RenderFileUploadControl. Used RetainPtr instead of retain/release
              so this works properly with Objective-C GC. Replaced disconnectUploadControl
              with disconnectClient, which has a simple inline implementation. Moved the
              Document parameter from the constructor to openFileChooser, along with a comment
              about why it should not be there. Added a filename parameter to the constructor
              for the initial filename. Added a font parameter to basenameForWidth so we don't
              depend on having a pointer to the renderer. Removed the uploadControl() and
              document() functions since no one calls either of them.
              * platform/mac/FileChooserMac.mm: Removed code that is now cross-platform.
              (-[OpenPanelController beginSheetWithFrame:]): Added frame parameter, instead
              of storing a document pointer in the FileChooser.
              (WebCore::FileChooser::FileChooser): Updated for changed parameters. Also added
              code to choose the icon based on the initial filename. Pass the adopt parameter
              to the constructor of the RetainPtr.
              (WebCore::FileChooser::~FileChooser): Removed the release call, since the
              RetainPtr will take care of it. Added a call to disconnectFileChooser here.
              There's no need to disconnect at disconnectClient time, and that lets us have
              one more cross-platform function.
              (WebCore::FileChooser::openFileChooser): Added document parameter. Added code
              to get the frame from the document. And added a nil check since there's no
              ironclad guarantee the document won't have outlived its frame.
              (WebCore::FileChooser::basenameForWidth): Added font parameter. Use that instead
              of going at the upload control's style. The caller can handle that now.
              * rendering/RenderFileUploadControl.h: Removed unnecessary includes.
              Made class inherit privately from FileChooserClient. Changed constructor
              parameter to HTMLInputElement rather than Node. Made protected members be
              private instead, and made a couple function members const.
              * rendering/RenderFileUploadControl.cpp: Moved constants to the top of the file,
              but after the "using namespace"
              (WebCore::RenderFileUploadControl::RenderFileUploadControl): Updated for changes
              to the FileChooser::create function and the parameter types.
              (WebCore::RenderFileUploadControl::~RenderFileUploadControl): Removed unneeded
              null check -- there's no case where the FileChooser fails to be created.
              (WebCore::RenderFileUploadControl::click): Pass document to openFileChooser.
              (WebCore::RenderFileUploadControl::updateFromElement): Tweaked code a bit by
              using updateFromElement and setValue instead of casting the renderer to a
              RenderButton and calling setText directly. Put setInputType call here.
              (WebCore::RenderFileUploadControl::maxFilenameWidth): Made const. Broke long line.
              (WebCore::RenderFileUploadControl::createButtonStyle): Made const.
              (WebCore::RenderFileUploadControl::paintObject): Moved buttonShadowHeight constant
              to the top of the file. Call isEmpty instead of checking width and height of
              IntRect for 0. Computed font to pass to FileChooser::basenameForWidth. Broke
              long lines.
              Moved the setInputType call to the caller; concept here is that this class is
              as simple as possible, rather than doing as much of the button job as possible.
              * WebCore.xcodeproj/project.pbxproj: Added FileChooser.cpp.
              * WebCore.pro: Ditto.
              * CMakeLists.txt: Ditto.
              * WebCoreSources.bkl: Ditto.
              * platform/gdk/TemporaryLinkStubs.cpp: Updated stubs.
              * platform/qt/FileChooserQt.cpp: Updated stubs.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • bdakin's avatar
      Reviewed by Darin. · cc931d0a
      bdakin authored
              Darin and I looked into these tests that are adding an empty 
              RenderText, and we think they just need new results. Here they are!
              * editing/execCommand/find-after-replace-expected.txt:
              * fast/css/beforeSelectorOnCodeElement-expected.txt:
              * fast/forms/control-restrict-line-height-expected.txt:
              * fast/forms/select-size-expected.txt:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • weinig's avatar
      LayoutTests: · fb8a8a78
      weinig authored
              Reviewed by Darin.
              - pixel test for http://bugs.webkit.org/show_bug.cgi?id=12364
                REGRESSSION (NativeListBox): Selected option's background is not clipped to the list box
              * fast/forms/select-item-background-clip-expected.checksum: Added.
              * fast/forms/select-item-background-clip-expected.png: Added.
              * fast/forms/select-item-background-clip-expected.txt: Added.
              * fast/forms/select-item-background-clip.html: Added.
              Reviewed by Darin.
              - fix http://bugs.webkit.org/show_bug.cgi?id=12364
                REGRESSSION (NativeListBox): Selected option's background is not clipped to the list box
              Test: fast/forms/select-item-background-clip.html
              * rendering/RenderListBox.cpp:
              (WebCore::RenderListBox::paintItemBackground): Intersect the item's rect with
              the list box's clip rect.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • sullivan's avatar
      * WebView/WebHTMLView.mm: · b394adc1
      sullivan authored
              (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
              Tiger build fix: remove unused variable for return value of dictionaryServiceWindowShow
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Beth. · ca718e15
      darin authored
              - fix http://bugs.webkit.org/show_bug.cgi?id=12369
                REGRESSION (r19027): amazon.com home page crashes WebKit r19028 debug build
              I caused this a few hours ago. Oops!
              * rendering/RenderText.cpp: (WebCore::RenderText::setStyle):
              Compute whether the font changed before calling RenderObject::setStyle.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • sullivan's avatar
      Reviewed by Adam and Darin · 97833a23
      sullivan authored
              - fixed <rdar://problem/4794320> "Look Up in Dictionary" does nothing in WebKit 
              (need to adopt new API)
              * Misc/WebNSURLExtras.m:
              (-[NSString _web_isUserVisibleURL]):
              random typo correction in comment
              * English.lproj/StringsNotToBeLocalized.txt:
              updated for these changes
              * WebView/WebHTMLView.mm:
              new function to convert an AppKit screen point to a CG screen point
              (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
              on Leopard now uses new API. There's something of an impedance mismatch between
              this API and WebKit, but that was true for the SPI we were using in Tiger also.
              Bug 4945808 covers the ways in which this is not perfect.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • bdakin's avatar
      Reviewed by Maciej. · 5df49692
      bdakin authored
              Fix for <rdar://problem/4912129> REGRESSION: Crash occurs at 
              WebCore::Frame::eventHandler() after clicking to dismiss a 
              contextual menu on the page
              * page/EventHandler.cpp:
              (WebCore::EventHandler::stopAutoscrollTimer): Added nil-check.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Mitz. · 8a4fb2be
      darin authored
              - a couple tiny tweaks to make --reset-results work better
              * Scripts/run-webkit-tests: Always generate results when --reset-results is specified.
              Don't make a separate "new" entry while generating results when --reset-results
              is specified since new results are the norm in that case.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      LayoutTests: · 42563ac5
      darin authored
              Test by Andrew Wellington <proton@wiretapped.net>.
              Reviewed by Darin.
              - test for fix to http://bugs.webkit.org/show_bug.cgi?id=11197
                REGRESSION: Specifying a counter for a CODE tag's content style
                property on before or after causes a crash.
              * fast/css/beforeSelectorOnCodeElement-expected.checksum: Added.
              * fast/css/beforeSelectorOnCodeElement-expected.png: Added.
              * fast/css/beforeSelectorOnCodeElement-expected.txt: Added.
              * fast/css/beforeSelectorOnCodeElement.html: Added.
              Test by Mitz.
              Reviewed by Darin.
              - test for monospace problem mentioned in the above bug
              * fast/text/monospace-width-cache-expected.checksum: Added.
              * fast/text/monospace-width-cache-expected.png: Added.
              * fast/text/monospace-width-cache-expected.txt: Added.
              * fast/text/monospace-width-cache.html: Added.
              Reviewed by Mitz.
              Inspired by a much simpler patch by Andrew Wellington <proton@wiretapped.net>.
              - fix http://bugs.webkit.org/show_bug.cgi?id=11197
                REGRESSION: Specifying a counter for a CODE tag's content style property
                on before or after causes a crash.
              Test: fast/css/beforeSelectorOnCodeElement.html
              - fix regression I recently introduced where the monospace cache could be
                used for text that was not ASCII, if text was changed after the style was set
              Test: fast/text/monospace-width-cache.html
              - streamline RenderText.h -- remove unneeded functions, make some needlessly
                virtual functions non-virtual, remove unneeded header includes, replace use
                of Font* with Font& for consistency with RenderStyle, use "text" consistently
                instead of "string"
              * rendering/RenderText.h: Removed unneeded include of "Text.h", declarations of
              SOFT_HYPHEN, DocumentMarker, InlineBox, Position, String. Got rid of friend
              declaration for InlineTextBox. Changed constructor to take a PassRefPtr since
              we do take owership of the passed-in text. Made deleteTextBoxes() private.
              Removed unneeded data(). Made override of length() private so people will use
              the faster textLength() instead. Renamed string() to text() so it matches up
              better with setText(). Same for stringLength(), originalString(), and
              setInternalString(), which are now textLength(), originalText(), and
              setTextInternal(). Renamed the old text() function to characters(), since it
              returns a pointer as StringImpl::characters does. Changed Font* to Font& everywhere.
              Renamed the internal calcMinMaxWidth() function to calcMinMaxWidthInternal() and
              made it non-virtual since it's not overriden anywhere. Also made the
              trimmedMinMaxWidth() function non-virtual. Made containsOnlyWhitespace() private.
              Removed both font() functions (one was needlessly virtual) and element().
              Renamed cacheWidths() to updateMonospaceCharacterWidth() and removed the
              shouldUseMonospaceCache() function. Renamed allAscii() to isAllASCII() and made
              it an inline function. Removed the m_allAsciiChecked flag and renamed the
              m_allAscii flag to m_isAllASCII.
              * rendering/RenderText.cpp:
              (WebCore::RenderText::RenderText): Removed initialization of m_allAsciiChecked.
              Initialize m_isAllASCII. Changed all occurrences of m_str->length() and
              m_str->characters () to use the stringLength() and characters() inline functions
              (WebCore::RenderText::setStyle): Replaced the unconditional call to cacheWidths
              with a conditional call to updateMonospaceCharacterWidth. This speeds up the common
              case where style is changed without changing the font.
              (WebCore::RenderText::originalText): Changed code to not depend on overridden
              element() function with casts to a Text node -- this was one of only two call sites.
              Also renamed.
              (WebCore::RenderText::positionForCoordinates): Name change.
              (WebCore::RenderText::caretRect): Ditto.
              (WebCore::RenderText::updateMonospaceCharacterWidth): Renamed from cacheWidths and
              incorporate the check that was formerly in a separate shouldUseMonospaceCache
              (WebCore::RenderText::widthFromCache): Changed to take a Font& instead of Font*.
              Changed to take advantage of the fact that the string is known to be all ASCII in
              the m_monospaceCharacterWidth code path.
              (WebCore::RenderText::trimmedMinMaxWidth): Ditto. Also use style()->font() instead
              of font(false).
              (WebCore::RenderText::calcMinMaxWidth): Ditto. Also changed to use softHyphen instead
              of SOFT_HYPHEN.
              (WebCore::RenderText::containsOnlyWhitespace): More of the same.
              (WebCore::RenderText::setSelectionState): Ditto.
              (WebCore::RenderText::setTextWithOffset): Ditto.
              (WebCore::isInlineFlowOrEmptyText): Ditto.
              (WebCore::RenderText::setTextInternal): Updated for name changes. Also changed to
              set the m_isAllASCII flag every time, in the more-efficient way we use elsewhere
              (or'ing all the characters together), and to call updateMonospaceCharacterWidth
              if the "all ASCII"-ness of the text changes.
              (WebCore::RenderText::setText): Updated for name changes.
              (WebCore::RenderText::width): More like above.
              (WebCore::RenderText::selectionRect): Ditto.
              (WebCore::RenderText::caretMaxOffset): Ditto.
              (WebCore::RenderText::previousOffset): Ditto.
              (WebCore::RenderText::nextOffset): Ditto.
              * dom/Position.cpp:
              * dom/Range.cpp:
              * editing/CompositeEditCommand.cpp:
              * editing/DeleteSelectionCommand.cpp:
              * editing/VisiblePosition.cpp:
              * html/HTMLElement.cpp:
              Added now-needed include of "Text.h" which is no longer included by "RenderText.h".
              * editing/SelectionController.cpp:
              * editing/TextIterator.cpp:
              Update for name changes of stringLength(), string(), and originalString() to
              textLength(), text(), and originalText(), and to always use textLength() instead
              of length() when we have a RenderText* rather than a RenderObject*.
              * editing/visible_units.cpp:
              (WebCore::startOfParagraph): Ditto.
              (WebCore::endOfParagraph): Ditto.
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::placeBoxesHorizontally): Ditto. Also removed use of the
              RenderObject::font() function and replaced it with explicit access to the style.
              (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::selectionRect): Ditto.
              (WebCore::InlineTextBox::isLineBreak): Ditto.
              (WebCore::InlineTextBox::paint): Ditto.
              (WebCore::InlineTextBox::selectionStartEnd): Ditto.
              (WebCore::InlineTextBox::paintSelection): Ditto.
              (WebCore::InlineTextBox::paintMarkedTextBackground): Ditto.
              (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
              (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
              (WebCore::InlineTextBox::offsetForPosition): Ditto.
              (WebCore::InlineTextBox::positionForOffset): Ditto.
              * rendering/RenderContainer.cpp:
              (WebCore::RenderContainer::addChild): Ditto.
              * rendering/RenderCounter.cpp:
              (WebCore::RenderCounter::originalText): Ditto.
              (WebCore::RenderCounter::calcMinMaxWidth): Ditto.
              * rendering/RenderCounter.h: Ditto.
              * rendering/RenderTextFragment.cpp:
              (WebCore::RenderTextFragment::originalText): Ditto.
              * rendering/RenderTextFragment.h: Ditto.
              * rendering/SVGInlineFlowBox.cpp:
              (WebCore::placePositionedBoxesHorizontally): Ditto.
              (WebCore::placeBoxesVerticallyWithAbsBaseline): Ditto.
              * rendering/bidi.cpp:
              (WebCore::BidiIterator::increment): Ditto.
              (WebCore::BidiIterator::current): Ditto.
              (WebCore::BidiIterator::direction): Ditto.
              (WebCore::addRun): Ditto.
              (WebCore::checkMidpoints): Ditto.
              (WebCore::RenderBlock::computeHorizontalPositionsForLine): Ditto.
              (WebCore::RenderBlock::skipWhitespace): Ditto.
              (WebCore::RenderBlock::findNextLineBreak): Ditto.
              * rendering/RenderBR.h: Updated signature of width function which now takes a
              Font& instead of a Font*.
              * rendering/RenderBlock.cpp: (WebCore::stripTrailingSpace): Updated to no longer
              use the RenderObject::font() function, and added a comment about first-line, which
              is not handled properly here.
              * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::text):
              * rendering/RenderTreeAsText.cpp: (WebCore::writeTextRun):
              Eliminated use of RenderText::data().
              * rendering/RenderObject.h: Removed RenderObject::font(). This had the bad effect of
              having everyone pass in a boolean rather than using the cleaner style() and
              firstLineStyle() functions in cases where there's no a firstLineStyle boolean.
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::getVerticalPosition): Replaced use of RenderObject::font()
              with direct use of the style instead, which is arguably easier to understand anyway.
              (WebCore::RenderObject::baselinePosition): Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • weinig's avatar
      Reviewed by The Mitz. · 1c07d1d2
      weinig authored
              Move JSHTMLSelectElementCustom.cpp from bindings to bindings/js
              where it belongs.
              * WebCore.pro:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/JSHTMLSelectElementCustom.cpp: Removed.
              * bindings/js/JSHTMLSelectElementCustom.cpp: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zack's avatar
      Fix Qt build · a1a29ac9
      zack authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  3. 21 Jan, 2007 6 commits
    • ap's avatar
      Reviewed by Darin. · 9ce7dcca
      ap authored
              REGRESSION: prototype.js logs error (HTMLFormElement) on webkit builds
              Added constructors for most HTML elements; started auto-generating HTMLSelectElement JS binding.
              Test: fast/dom/Window/element-constructors-on-window.html
              * DerivedSources.make: Generate JSHTMLSelectElement.
              * WebCore.xcodeproj/project.pbxproj: Added JSHTMLSelectElement{Custom}.
              * bindings/js/JSHTMLElementWrapperFactory.cpp: Create a proper binding for SELECT.
              * bindings/js/kjs_html.cpp:
              * bindings/js/kjs_html.h:
              Removed everything related to SELECT. Renamed getHTMLOptionsCollection to toJS for autogenerated code 
              to be happy, and rewrote it using cacheDOMObject.
              * bindings/scripts/CodeGeneratorJS.pm: Added HTMLElement to the list of types that cannot fail conversion.
              * html/HTMLAnchorElement.idl:
              * html/HTMLAppletElement.idl:
              * html/HTMLAreaElement.idl:
              * html/HTMLBRElement.idl:
              * html/HTMLBaseElement.idl:
              * html/HTMLBaseFontElement.idl:
              * html/HTMLBodyElement.idl:
              * html/HTMLButtonElement.idl:
              * html/HTMLCanvasElement.idl:
              * html/HTMLDListElement.idl:
              * html/HTMLDirectoryElement.idl:
              * html/HTMLDivElement.idl:
              * html/HTMLFieldSetElement.idl:
              * html/HTMLFontElement.idl:
              * html/HTMLFormElement.idl:
              * html/HTMLHRElement.idl:
              * html/HTMLHeadElement.idl:
              * html/HTMLHeadingElement.idl:
              * html/HTMLHtmlElement.idl:
              * html/HTMLImageElement.idl:
              * html/HTMLInputElement.idl:
              * html/HTMLIsIndexElement.idl:
              * html/HTMLLIElement.idl:
              * html/HTMLLabelElement.idl:
              * html/HTMLLegendElement.idl:
              * html/HTMLLinkElement.idl:
              * html/HTMLMapElement.idl:
              * html/HTMLMenuElement.idl:
              * html/HTMLMetaElement.idl:
              * html/HTMLModElement.idl:
              * html/HTMLOListElement.idl:
              * html/HTMLOptGroupElement.idl:
              * html/HTMLParagraphElement.idl:
              * html/HTMLParamElement.idl:
              * html/HTMLPreElement.idl:
              * html/HTMLQuoteElement.idl:
              * html/HTMLScriptElement.idl:
              * html/HTMLStyleElement.idl:
              * html/HTMLTextAreaElement.idl:
              * html/HTMLTitleElement.idl:
              * html/HTMLUListElement.idl:
              Generate constructors.
              * html/HTMLSelectElement.cpp:
              * html/HTMLSelectElement.h:
              Make length() return unsigned for auto-generated code to be happy.
              * html/HTMLSelectElement.idl: Adjusted to be usable for JS.
              * bindings/JSHTMLSelectElementCustom.cpp: Added. Implements remove().
              * page/DOMWindow.idl:
              Added properties for most elements' constructors.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • bdash's avatar
      2007-01-21 Mark Rowe <mrowe@apple.com> · 46f7ec9c
      bdash authored
              Reviewed by Maciej.
              Bug 12357: Reproducible crash in WebCore::Settings::isJavaScriptEnabled in svg/custom/js-update-bounce.svg under guard-malloc
              * page/Frame.cpp:
              (WebCore::Frame::~Frame): Access the global object directly rather than via Window::retrieveWindow to prevent our reference to
              a deleted settings object being used.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      Reviewed by Maciej. · 4e5519d7
      darin authored
              - fix <rdar://problem/4930503> REGRESSION: Page changes title when
                command-clicking on named anchor link (12299)
              * loader/FrameLoader.cpp:
              Return if shouldContinue is false. This matches the other similar
              functions and prevents us from doing extra work in the "ignore" case.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • bdash's avatar
      2007-01-21 Mark Rowe <mrowe@apple.com> · 41546709
      bdash authored
              Reviewed by Darin.
              Bug 12355: Reproducible crash in WebCore::parseNumber in svg/custom/js-update-bounce.svg under guard-malloc
              * ksvg2/svg/SVGParserUtilities.cpp:
              (WebCore::parseNumber): Parenthesize to prevent reading past end of buffer.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      LayoutTests: · 311522cc
      darin authored
              Reviewed by Darin.
              - pixel test for http://bugs.webkit.org/show_bug.cgi?id=12345
                REGRESSION: Disabled pop-up text is not grayed out
              * fast/forms/select-disabled-appearance-expected.checksum: Added.
              * fast/forms/select-disabled-appearance-expected.png: Added.
              * fast/forms/select-disabled-appearance-expected.txt: Added.
              * fast/forms/select-disabled-appearance.html: Added.
              Reviewed by Darin.
              - fix http://bugs.webkit.org/show_bug.cgi?id=12345
                REGRESSION: Disabled pop-up text is not grayed out
              Test: fast/forms/select-disabled-appearance.html
              * rendering/RenderThemeMac.mm:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • darin's avatar
      - fix non-Mac builds · ee3987d4
      darin authored
              * CMakeLists.txt: Added JSDocumentCustom.cpp.
              * WebCore.pro: Ditto.
              * WebCoreSources.bkl: Ditto.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19019 268f45cc-cd09-0410-ab3c-d52691b4dbfc