WebKit-https.git
13 years ago * Scripts/parse-malloc-history: Added copyright info.
ggaren [Tue, 20 Feb 2007 23:26:28 +0000 (23:26 +0000)]
    * Scripts/parse-malloc-history: Added copyright info.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19749 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebCore:
thatcher [Tue, 20 Feb 2007 22:53:51 +0000 (22:53 +0000)]
WebCore:

        Reviewed by Darin.

        <rdar://problem/4900579> WebKit -finalize methods are not thread-safe; design change needed

        Call WebCoreObjCFinalizeOnMainThread from the initialize method of all the classes
        that have a finalizer that needs called on the main thread.

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/WebScriptObject.mm:
        (+[WebScriptObject initialize]):
        * bridge/mac/WebCoreScriptDebugger.mm:
        (+[WebCoreScriptDebugger initialize]):
        * platform/mac/SharedBufferMac.mm:
        (+[SharedBufferData initialize]):
        * platform/mac/WebCoreObjCExtras.c: Added.
        (WebCoreObjCFinalizeOnMainThread):
        * platform/mac/WebCoreObjCExtras.h: Added.

WebKit:

        Reviewed by Darin.

        <rdar://problem/4900579> WebKit -finalize methods are not thread-safe; design change needed

        Call WebCoreObjCFinalizeOnMainThread from the initialize method of all the classes
        that have a finalizer that needs called on the main thread. Assert in finalize that we
        are on the main thread.

        * Carbon/CarbonWindowAdapter.m:
        (+[CarbonWindowAdapter initialize]):
        (-[CarbonWindowAdapter finalize]):
        * History/WebBackForwardList.mm:
        (+[WebBackForwardList initialize]):
        (-[WebBackForwardList finalize]):
        * History/WebHistoryItem.mm:
        (+[WebHistoryItem initialize]):
        * Misc/WebElementDictionary.mm:
        (+[WebElementDictionary initialize]):
        (-[WebElementDictionary finalize]):
        * Plugins/WebBaseNetscapePluginStream.m:
        (+[WebBaseNetscapePluginStream initialize]):
        (-[WebBaseNetscapePluginStream finalize]):
        * Plugins/WebBaseNetscapePluginView.mm:
        (+[WebBaseNetscapePluginView initialize]):
        (-[WebBaseNetscapePluginView finalize]):
        * Plugins/WebBasePluginPackage.m:
        (+[WebBasePluginPackage initialize]):
        (-[WebBasePluginPackage finalize]):
        * Plugins/WebNetscapePluginStream.mm:
        (-[WebNetscapePluginStream finalize]):
        * WebCoreSupport/WebEditorClient.mm:
        (+[WebEditCommand initialize]):
        (-[WebEditCommand finalize]):
        * WebCoreSupport/WebFrameBridge.mm:
        (+[WebFrameBridge initialize]):
        (-[WebFrameBridge finalize]):
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (+[WebFramePolicyListener initialize]):
        (-[WebFramePolicyListener finalize]):
        * WebView/WebHTMLView.mm:
        (+[WebHTMLView initialize]):
        (-[WebHTMLView finalize]):
        * WebView/WebView.mm:
        (+[WebViewPrivate initialize]):
        (-[WebViewPrivate finalize]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19747 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by darin
justing [Tue, 20 Feb 2007 22:44:28 +0000 (22:44 +0000)]
    Reviewed by darin

        <rdar://problem/4838199>
        Integrate Mail and WebKit paste operations

        Mail overrides paste: because it has different
        preferred pasteboard types, but it should use our
        fragment creation code.

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
        Moved fragment creation code into a new method.
        (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:]):
        Moved fragment creation code here.
        * WebView/WebHTMLViewPrivate.h: Exposed
        _documentFragmentFromPasteboard:forType:inContext: as SPI.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19745 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Tim Hatcher
sullivan [Tue, 20 Feb 2007 22:32:21 +0000 (22:32 +0000)]
    Reviewed by Tim Hatcher

        * Misc/WebKitNSStringExtras.h:
        * Misc/WebKitNSStringExtras.m:
        removed _webkit_userVisibleBundleVersionFromFullVersion; we decided to do this without
        adding SPI for it.

        * WebView/WebView.mm:
        (-[WebView _userVisibleBundleVersionFromFullVersion:]):
        new method, moved here from WebKitNSStringExtras, and is now a WebView method rather than
        an NSString method
        (-[WebView _computeUserAgent]):
        updated for method signature change

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19744 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin Adler.
ggaren [Tue, 20 Feb 2007 22:09:07 +0000 (22:09 +0000)]
    Reviewed by Darin Adler.

        New script to parse the output from malloc_history, so we can determine
        what's using memory in WebKit.

        * Scripts/parse-malloc-history: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19743 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Not not reviewed by Mitz Pettel.
ggaren [Tue, 20 Feb 2007 21:32:26 +0000 (21:32 +0000)]
    Not not reviewed by Mitz Pettel.

        Fixed http://bugs.webkit.org/show_bug.cgi?id=12827 | <rdar://problem/5006671>
        REGRESSION: -[DOMCSSStyleDeclaration setValue:forKey:] doesn't have an
        immediate effect

        Let's just pretend this never happened.

        I attempted a layout test but I couldn't get the old code to fail because
        there's no obvious way to isolate the ObjC bindings in a test that's
        controlled by JS.

        * bindings/objc/WebScriptObject.mm:
        (_didExecute):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19742 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Maciej S.
kjk [Tue, 20 Feb 2007 21:21:21 +0000 (21:21 +0000)]
    Reviewed by Maciej S.

        Gdk build fixes for recent refactorings.

        * Projects/gdk/webcore-gdk.bkl:
        * WebCoreSources.bkl:
        * page/gdk/DragControllerGdk.cpp:
        (WebCore::DragController::dragOperation):
        (WebCore::DragController::maxDragImageSize):
        * page/gdk/EventHandlerGdk.cpp:
        (WebCore::EventHandler::createDraggingClipboard):
        * platform/DragImage.h:
        * platform/gdk/ChromeClientGdk.h:
        * platform/gdk/CursorGdk.cpp:
        (WebCore::verticalTextCursor):
        (WebCore::cellCursor):
        (WebCore::contextMenuCursor):
        (WebCore::noDropCursor):
        (WebCore::copyCursor):
        (WebCore::progressCursor):
        (WebCore::aliasCursor):
        (WebCore::noneCursor):
        (WebCore::notAllowedCursor):
        * platform/gdk/EditorClientGdk.cpp:
        (WebCore::EditorClientGdk::shouldChangeSelectedRange):
        (WebCore::EditorClientGdk::isEditable):
        (WebCore::EditorClientGdk::textFieldDidBeginEditing):
        (WebCore::EditorClientGdk::textFieldDidEndEditing):
        (WebCore::EditorClientGdk::textDidChangeInTextField):
        (WebCore::EditorClientGdk::doTextFieldCommandFromEvent):
        (WebCore::EditorClientGdk::textWillBeDeletedInTextField):
        (WebCore::EditorClientGdk::textDidChangeInTextArea):
        * platform/gdk/EditorClientGdk.h:
        * platform/gdk/FrameGdk.cpp:
        (WebCore::Frame::print):
        (WebCore::Frame::issueTransposeCommand):
        (WebCore::Frame::respondToChangedSelection):
        (WebCore::Frame::cleanupPlatformScriptObjects):
        (WebCore::Frame::isCharacterSmartReplaceExempt):
        (WebCore::Frame::dragImageForSelection):
        * platform/gdk/FrameGdk.h:
        * platform/gdk/MimeTypeRegistryGdk.cpp: Added.
        * platform/gdk/TemporaryLinkStubs.cpp:
        (ChromeClientGdk::tabsToLinks):
        (ChromeClientGdk::windowResizerRect):
        (ChromeClientGdk::addToDirtyRegion):
        (ChromeClientGdk::scrollBackingStore):
        (ChromeClientGdk::updateBackingStore):
        * webcore-base.bkl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19741 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin.
kjk [Tue, 20 Feb 2007 21:13:34 +0000 (21:13 +0000)]
    Reviewed by Darin.

        Allow over-writting Product, ProductSub, Vendor and VendorSub
        js properties via #define WEBCORE_NAVIGATOR_*

        * bindings/js/kjs_navigator.cpp:
        (KJS::Navigator::getValueProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19740 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by John.
thatcher [Tue, 20 Feb 2007 20:41:54 +0000 (20:41 +0000)]
    Reviewed by John.

        * Misc/WebKitNSStringExtras.h: Added _webkit_userVisibleBundleVersionFromFullVersion.
        * Misc/WebKitNSStringExtras.m:
        (-[NSString _webkit_userVisibleBundleVersionFromFullVersion]): If the version is 4 digits long or longer,
        then the first digit represents the version of the OS. Our user agent string should not
        include this first digit, so strip it off and report the rest as the version.
        * WebView/WebView.mm:
        (-[WebView _computeUserAgent]): Call _webkit_userVisibleBundleVersionFromFullVersion on the CFBundleVersion.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19739 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agogit-svn-id: https://svn.webkit.org/repository/webkit/trunk@19738 268f45cc-cd09-0410...
kmccullo [Tue, 20 Feb 2007 19:27:57 +0000 (19:27 +0000)]
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19738 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebCore:
darin [Tue, 20 Feb 2007 18:18:39 +0000 (18:18 +0000)]
WebCore:

        Reviewed by Anders.

        - prepare to fix some "stop loading" bugs by moving state from the
          FrameLoader class to the DocumentLoader class

        * WebCore.exp: Update since cancelMainResourceLoad is now on the document loader.

        * html/HTMLDocument.h:
        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::HTMLDocument): Removed unused bodyElement and htmlElement
        data members.
        (WebCore::HTMLDocument::lastModified): Call getResponseModifiedHeader directly on
        the document loader.

        * loader/DocumentLoader.h: Moved m_mainResourceLoader, m_subresourceLoaders, and
        m_plugInStreamLoaders here.
        * loader/DocumentLoader.cpp:
        (WebCore::cancelAll): Moved here from FrameLoader.
        (WebCore::setAllDefersLoading): Ditto.
        (WebCore::DocumentLoader::mainResourceData): Moved the body of FrameLoader's
        mainResourceData function here.
        (WebCore::DocumentLoader::stopLoading): Replaced calls to hasMainResourceLoader
        and cancelMainResourceLoad with code that works directly on m_mainResourceLoader.
        Call the stop functions moved from FrameLoader here on ourselves.
        (WebCore::DocumentLoader::setupForReplaceByMIMEType): Ditto.
        (WebCore::DocumentLoader::setPrimaryLoadComplete): Moved the code to store the
        main resource data here; it doesn't require separate functions.
        (WebCore::DocumentLoader::isLoadingInAPISense): Removed call to isLoadingSubresources
        and instead just check if the m_subresourceLoaders set is empty.
        (WebCore::DocumentLoader::setDefersLoading): Moved code here from FrameLoader.
        (WebCore::DocumentLoader::stopLoadingPlugIns): Ditto.
        (WebCore::DocumentLoader::stopLoadingSubresources): Ditto.
        (WebCore::DocumentLoader::addSubresourceLoader): Ditto.
        (WebCore::DocumentLoader::removeSubresourceLoader): Ditto.
        (WebCore::DocumentLoader::addPlugInStreamLoader): Ditto.
        (WebCore::DocumentLoader::removePlugInStreamLoader): Ditto.
        (WebCore::DocumentLoader::isLoadingSubresources): Ditto.
        (WebCore::DocumentLoader::isLoadingPlugIns): Ditto.
        (WebCore::DocumentLoader::startLoadingMainResource): Ditto.
        (WebCore::DocumentLoader::cancelMainResourceLoad): Ditto.

        * loader/FrameLoader.h: Removed stopLoadingPlugIns, stopLoadingSubresources,
        cancelMainResourceLoad, hasMainResourceLoader, isLoadingSubresources,
        mainResourceData, releaseMainResourceLoader, lastModified, startLoadingMainResource,
        isLoadingPlugIns, m_mainResourceLoader, m_subresourceLoaders, m_plugInStreamLoaders,
        m_responseRefreshHeader, and m_responseModifiedHeader.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::setDefersLoading): Call setDefersLoading on all the document
        loaders.
        (WebCore::FrameLoader::stopLoading): Get rid of code to set m_responseRefreshHeader
        and m_responseModifiedHeader.
        (WebCore::FrameLoader::receivedFirstData): Call httpHeaderField on the response
        here to get the Refresh, instead of storing it in a data member.
        (WebCore::FrameLoader::addPlugInStreamLoader): Change to just call this on the
        document loader.
        (WebCore::FrameLoader::removePlugInStreamLoader): Ditto.
        (WebCore::FrameLoader::isLoading): Change to call isLoadingSubresources and
        isLoadingPlugIns on the document loader.
        (WebCore::FrameLoader::addSubresourceLoader): Change to just call this on the
        document loader.
        (WebCore::FrameLoader::removeSubresourceLoader): Ditto.
        (WebCore::FrameLoader::commitProvisionalLoad): Call stopLoadingSubresources and
        stopLoadingPlugIns on the document loader. Removed code to set
        m_responseModifiedHeader.
        (WebCore::FrameLoader::startLoading): Call isLoadingMainResource and
        startLoadingMainResource on the document loader.

        * loader/ImageDocument.cpp: (WebCore::ImageTokenizer::finish): Call
        mainResourceData() on the document loader instead of the frame loader.

        - other changes

        * loader/DocLoader.cpp:
        (WebCore::DocLoader::checkCacheObjectStatus): Fixed indentation.

WebKit:

        Reviewed by Anders.

        * Plugins/WebPluginController.mm: (-[WebPluginController pluginView:receivedResponse:]):
        Call cancelMainResourceLoad on the document loader instead of the frame loader.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19737 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Mitz.
andersca [Tue, 20 Feb 2007 17:24:44 +0000 (17:24 +0000)]
    Reviewed by Mitz.

        <rdar://problem/5009627> REGRESSION: Repro overrelease of WebView in failed load, seen in DumpRenderTree

        * WebView/WebView.mm:
        (-[WebView _removeObjectForIdentifier:]):
        Return early if the identifier can't be found in the map.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19736 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoFix focus handling and make the forms
zack [Tue, 20 Feb 2007 17:19:59 +0000 (17:19 +0000)]
Fix focus handling and make the forms
work as expected.
r=Lars

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19735 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin and then Sam.
weinig [Tue, 20 Feb 2007 16:00:18 +0000 (16:00 +0000)]
    Reviewed by Darin and then Sam.

        - fix http://bugs.webkit.org/show_bug.cgi?id=10735
          Clicking in SVG results causes WebKit to consume 100% CPU for several minutes

        No test since there is no change in functionality.

        * CMakeLists.txt:
        * WebCore.pro:
        * WebCore.xcodeproj/project.pbxproj: Added PositionIterator.{cpp,h}.
        * WebCoreSources.bkl:
        * dom/Position.cpp:
        (WebCore::Position::Position): Added converting constructor from
        PositionIterator.
        (WebCore::Position::previous): Changed assert() to ASSERT().
        (WebCore::Position::next): Ditto.
        (WebCore::isStreamer): Changed the argument to a PositionIterator.
        (WebCore::Position::upstream): Changed to use PositionIterator.
        (WebCore::Position::downstream): Ditto.
        (WebCore::Position::inRenderedText): Made public.
        (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight): Changed
        into a static member function.
        (WebCore::Position::nodeIsUserSelectNone): Ditto.
        * dom/Position.h:
        * dom/PositionIterator.cpp: Added. A Position iterator with constant-time
        increment, decrement, and several predicates on the Position it is at.
        Conversion to/from Position is O(n) in the offset.
        (WebCore::PositionIterator::increment):
        (WebCore::PositionIterator::decrement):
        (WebCore::PositionIterator::atStart):
        (WebCore::PositionIterator::atEnd):
        (WebCore::PositionIterator::atStartOfNode):
        (WebCore::PositionIterator::atEndOfNode):
        (WebCore::PositionIterator::isCandidate):
        * dom/PositionIterator.h: Added.
        (WebCore::PositionIterator::PositionIterator):
        (WebCore::PositionIterator::node):
        (WebCore::PositionIterator::offsetInLeafNode):
        * editing/htmlediting.cpp:
        (WebCore::nextCandidate): Changed to use PositionIterator.
        (WebCore::previousCandidate): Changed to use PositionIterator.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19734 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin.
rwlbuis [Tue, 20 Feb 2007 15:39:04 +0000 (15:39 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=12439
        SVG parser complains about points attribute in polygon and polyline element

        Return true when the parsed points specification is valid.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19732 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoMake editing of forms work plus make sure that non-void methods
zack [Tue, 20 Feb 2007 14:46:51 +0000 (14:46 +0000)]
Make editing of forms work plus make sure that non-void methods
always return something.
r=Lars

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19730 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoRedo form-theming (aka. make Qt pretty, so very, very pretty)
zack [Tue, 20 Feb 2007 12:30:12 +0000 (12:30 +0000)]
Redo form-theming (aka. make Qt pretty, so very, very pretty)
r=Lars

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19729 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-19 Lars Naesbye Christensen <lars@naesbye.dk>
ap [Tue, 20 Feb 2007 10:33:37 +0000 (10:33 +0000)]
2007-02-19  Lars Naesbye Christensen <lars@naesbye.dk>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=12815
        Two image files not included in project file

        * WebCore.xcodeproj/project.pbxproj: Added crossHairCursor.png and
        notAllowedCursor.png.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19728 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebKitTools:
gdennis [Tue, 20 Feb 2007 10:11:17 +0000 (10:11 +0000)]
WebKitTools:
        Reviewed by Darin Adler.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=12802
        WebKit.framework is built with SVG_SUPPORT for No-SVG build

        * Scripts/build-webkit: Pass the "FEATURE_DEFINES=" option when building WebKit as well.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19727 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam Roben.
ggaren [Tue, 20 Feb 2007 05:33:03 +0000 (05:33 +0000)]
    Reviewed by Adam Roben.

        Fixed some leaks in RenderThemeMac.

        No test case because 'leaks' can't detect these leaks inside DRT, even if
        DRT forces the WebView to paint. ('leaks' can detect these leaks inside
        Safari. Weird.)

        * rendering/RenderThemeMac.h:
            - Renamed data members to m_*, to match our style guidelines.
            - Renamed *Is* to is**, to match our style guidelines.
            - Removed a few unnecessary data members.
            - Made cached values like m_checkbox mutable, since they can change
            inside functions that don't change the logical state of a RenderTheme
            object. (The alternative was to make some const functions non-const.)

        (WebCore::RenderThemeMac::paintMenuList): Took CFType pointers that just
        used to leak and placed them in RetainPtrs.
        (WebCore::RenderThemeMac::paintMenuListButtonGradients): ditto

        Factored inline implementations of lazy initialization into these accessor
        functions, for better encapsulation:

        (WebCore::RenderThemeMac::checkbox):
        (WebCore::RenderThemeMac::radio):
        (WebCore::RenderThemeMac::button):
        (WebCore::RenderThemeMac::popupButton):
        (WebCore::RenderThemeMac::search):
        (WebCore::RenderThemeMac::sliderThumbHorizontal): The inline version of
        this initialization used to confuse the retained data member with a local
        stack value, causing both a leak and a failure to initialize. Fixed now.
        (WebCore::RenderThemeMac::sliderThumbVertical): ditto
        (WebCore::RenderThemeMac::resizeCornerImage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19726 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Geoff.
thatcher [Tue, 20 Feb 2007 05:19:51 +0000 (05:19 +0000)]
    Reviewed by Geoff.

        <rdar://problem/4636301> Deprecate JavaScriptGlue

        * JavaScriptGlue.h: adds DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER to everything
        * JavaScriptGlue.xcodeproj/project.pbxproj: use -Wno-deprecated-declarations to keep the project building
        * config.h: define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER as empty on other systems

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19725 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
weinig [Tue, 20 Feb 2007 03:01:04 +0000 (03:01 +0000)]
LayoutTests:

        Reviewed by Hyatt.

        - repaint test for http://bugs.webkit.org/show_bug.cgi?id=12817
          REGRESSION (r18634): Table border-collapse problems with right margin

        * fast/repaint/table-outer-border-expected.checksum: Added.
        * fast/repaint/table-outer-border-expected.png: Added.
        * fast/repaint/table-outer-border-expected.txt: Added.
        * fast/repaint/table-outer-border.html: Added.

WebCore:

        Reviewed by Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12817
          REGRESSION (r18634): Table border-collapse problems with right margin

        Test: fast/repaint/table-outer-border.html

        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::layout): Reordered to initialize horizontal overflow
        after table sections have computed their outer horizontal borders.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19719 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin
sullivan [Tue, 20 Feb 2007 02:39:29 +0000 (02:39 +0000)]
    Reviewed by Darin

        - fixed <rdar://problem/4613701> REGRESSION: A line break in the source HTML of a link becomes visible after drag & drop

        * page/DragController.cpp:
        (WebCore::DragController::startDrag):
        Call simplifyWhiteSpace() on the proposed link title to match what's displayed on the web page, instead of using the
        raw source HTML text.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19718 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Fix for Radar 4981605, regression where button grows randomly when a select is
hyatt [Tue, 20 Feb 2007 01:41:26 +0000 (01:41 +0000)]
    Fix for Radar 4981605, regression where button grows randomly when a select is
        opened.  With the new form controls, the WinIE quirk for using line width
        ended up being used for them more.

        This patch removes the quirk after verifying that Firefox doesn't implement
        the quirk at all.  usesLineWidth is being renamed to shrinksToAvoidFloats to
        make it clear that the new method only applies to block objects that avoid floats
        and that have auto width.

        Also fixed a regression where whitespace after a floating <select> at the start
        of a block got incorrectly rendered.  Make sure skipWhitespace always skips
        through floating/positioned elements regardless of the whitespace setting (this
        way the white-space:pre value on floating <select>s doesn't cause trouble).

        Reviewed by darin

        fast/block/float/float-avoidance.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::collapseMargins):
        (WebCore::RenderBlock::clearFloatsIfNeeded):
        (WebCore::RenderBlock::layoutBlockChildren):
        (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::containingBlockWidth):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::shrinkToAvoidFloats):
        * rendering/RenderObject.h:
        * rendering/bidi.cpp:
        (WebCore::RenderBlock::skipWhitespace):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19717 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
weinig [Tue, 20 Feb 2007 01:22:06 +0000 (01:22 +0000)]
LayoutTests:

        Reviewed by Darin.

        1. Test for background image with relative url, when base url element
        is present. .html has a base url, which according to the html spec is supposed
        to be absolute, is actually a relative url. Absolute url would not work with file:// scheme.
        2. Test for base element and @import with relative url.
        http://bugs.webkit.org/show_bug.cgi?id=12214

        * fast/css/background-image-with-baseurl-expected.checksum: Added.
        * fast/css/background-image-with-baseurl-expected.png: Added.
        * fast/css/background-image-with-baseurl-expected.txt: Added.
        * fast/css/background-image-with-baseurl.html: Added.
        * fast/css/import_with_baseurl-expected.checksum: Added.
        * fast/css/import_with_baseurl-expected.png: Added.
        * fast/css/import_with_baseurl-expected.txt: Added.
        * fast/css/import_with_baseurl.html: Added.
        * fast/css/resources/background_image.css: Added.

WebCore:

        Reviewed by Darin.

        Update stylesheet href, when document's baseUrl changes. It needs
        update when the stylesheet is constructed before the parser hits the base tag.
        http://bugs.webkit.org/show_bug.cgi?id=12214

        * css/StyleSheet.h:
        (WebCore::StyleSheet::setHref):
        * dom/Document.cpp:
        (WebCore::Document::setBaseURL):
        * dom/Document.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19716 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam.
weinig [Tue, 20 Feb 2007 01:05:27 +0000 (01:05 +0000)]
    Reviewed by Adam.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11518
          REGRESSION (r14376): View Source not available after Back navigation from a non-HTML page

        The FrameLoader's responseMIMEType was not being updated when a page was
        brought back from the page cache.

        Moved the line that updates the MIME type from commitProvisionalLoad() to
        transitionToCommitted().

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::transitionToCommitted):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19715 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Build fix.
ggaren [Tue, 20 Feb 2007 00:01:08 +0000 (00:01 +0000)]
    Build fix.

        * Scripts/check-for-global-initializers: Ignore the global counter I added
        for SubresourceLoaders.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19714 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Oliver.
andersca [Mon, 19 Feb 2007 23:32:12 +0000 (23:32 +0000)]
    Reviewed by Oliver.

        Make DragController::maxDragImageSize a function to get rid of the global initializer.

        * page/DragController.cpp:
        (WebCore::DragController::doImageDrag):
        * page/DragController.h:
        * page/mac/DragControllerMac.mm:
        (WebCore::DragController::maxDragImageSize):
        * page/qt/DragControllerQt.cpp:
        (WebCore::DragController::maxDragImageSize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19713 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Tim Hatcher.
darin [Mon, 19 Feb 2007 23:19:06 +0000 (23:19 +0000)]
    Reviewed by Tim Hatcher.

        * Scripts/check-for-global-initializers: Delete the linked executable if the check fails.
        Without this, you only see the global initializer error once, which makes it very easy
        to miss them.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19712 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin Adler.
thatcher [Mon, 19 Feb 2007 23:09:51 +0000 (23:09 +0000)]
    Reviewed by Darin Adler.

        <rdar://problem/4841078> Remove the Mail.app editable link clicking behavior workaround when it is no longer needed

        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebView.mm:
        (-[WebView setPreferences:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19711 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Hyatt.
darin [Mon, 19 Feb 2007 21:44:13 +0000 (21:44 +0000)]
    Reviewed by Hyatt.

        - <rdar://problem/5006414> REGRESSION: Crash occurs at WebCore::Frame::loader()
          when loading AFL Ladder widget

        * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::openURL):
        Add missing null check so this fails without crashing when called on an element
        that's no longer in a frame.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19710 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam.
andersca [Mon, 19 Feb 2007 21:39:26 +0000 (21:39 +0000)]
    Reviewed by Adam.

        <rdar://problem/4868242>
        http://bugs.webkit.org/show_bug.cgi?id=12670
        REGRESSION: Many 3rd Party Apps crash in WebCore::DocumentLoader::frameLoader() (12670)

        Bring back the semantic we had that a web view should be retained for as long as something is loading. Use the identifier
        to object hash map for this.

        * WebView/WebView.mm:
        (-[WebView _addObject:forIdentifier:]):
        (-[WebView _removeObjectForIdentifier:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19709 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoRemove two imports of FrameMac.h, fixes clean Mac builds.
thatcher [Mon, 19 Feb 2007 19:41:01 +0000 (19:41 +0000)]
Remove two imports of FrameMac.h, fixes clean Mac builds.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19708 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
antti [Mon, 19 Feb 2007 15:43:42 +0000 (15:43 +0000)]
LayoutTests:

        Reviewed by Mitz.

        - test for http://bugs.webkit.org/show_bug.cgi?id=10990
          REGRESSION: Pressing a pop-up's access key doesn't focus it
          <rdar://problem/4823138>

        * fast/forms/select-accesskey-expected.checksum: Added.
        * fast/forms/select-accesskey-expected.png: Added.
        * fast/forms/select-accesskey-expected.txt: Added.
        * fast/forms/select-accesskey.html: Added.

WebCore:

        Reviewed by Mitz.

        - fix for http://bugs.webkit.org/show_bug.cgi?id=10990
          REGRESSION: Pressing a pop-up's access key doesn't focus it
          <rdar://problem/4823138>

        Focus the select element too in accessKeyAction.

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::accessKeyAction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19707 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Hyatt.
antti [Mon, 19 Feb 2007 09:20:35 +0000 (09:20 +0000)]
    Reviewed by Hyatt.

        - really fix http://bugs.webkit.org/show_bug.cgi?id=11974
        REGRESSION: Caret drawn over input when smaller than font size on initial focus
        <rdar://problem/4960258>

        Avoid double painting caret when it is on a block element.

        Layout test for this already went in previous try (it only fails in pixel mode) in r19626.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintCaret):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19706 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Added a one line patch from Olliej to create the
lars [Mon, 19 Feb 2007 08:13:56 +0000 (08:13 +0000)]
    Added a one line patch from Olliej to create the
        clipboard on demand (to stop things from crashing),
        and added lots of notImplemented() warnings all
        over the place.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19705 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Oliver
beidson [Mon, 19 Feb 2007 07:58:20 +0000 (07:58 +0000)]
    Reviewed by Oliver

        <rdar://problem/4985321> - Can't edit templates for Web Gallery/Web Page Export in Aperture

        * Misc/WebKitVersionChecks.h: Add a #define for this APERTURE quirk
        * WebView/WebView.mm:
        (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
         If the current app is Aperture and it was linked against Tiger WebKit, always allow selection change

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19704 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agofix compilation.
lars [Mon, 19 Feb 2007 07:57:46 +0000 (07:57 +0000)]
fix compilation.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19703 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebCore:
mjs [Mon, 19 Feb 2007 07:54:13 +0000 (07:54 +0000)]
WebCore:

        Reviewed by Maciej.

        Additional coding by Maciej, additional review by Oliver.

        Get rid of the FrameMac and FrameQt classes. Instead
        move all methods into Frame directly, and implement
        some platform specific methods in foo/FrameFoo.cpp.

        Some general cleanup in Frame:
        * Move some methods out of Frame, to the place where they
        belong.
        * Unify the different ways of creating the JavaScript wrappers
        for <object>, <embed> and <applet>
        * Some cleanup of the WebCoreFrameBridge

        * ForwardingHeaders/bindings/NP_jsobject.h: Added.
        * ForwardingHeaders/bindings/npruntime_impl.h: Added.
        * ForwardingHeaders/bindings/runtime_root.h: Added.
        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_binding.cpp:
        (KJS::ScriptInterpreter::shouldInterruptScript):
        * bindings/objc/DOM.mm:
        (-[DOMNode KJS::Bindings::]):
        * bindings/objc/DOMInternal.mm:
        (-[WebScriptObject _initializeScriptDOMNodeImp]):
        * bridge/EditorClient.h:
        * bridge/mac/FrameViewMac.mm:
        (WebCore::FrameView::updateBorder):
        (WebCore::FrameView::updateDashboardRegions):
        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject rendererForView:]):
        * dom/Position.cpp:
        (WebCore::Position::next):
        * editing/CommandByName.cpp:
        (WebCore::Frame::execCopy):
        (WebCore::Frame::execCut):
        (WebCore::Frame::execPaste):
        * editing/Editor.cpp:
        (WebCore::Editor::canEdit):
        (WebCore::Editor::pasteWithPasteboard):
        (WebCore::Editor::paste):
        (WebCore::Editor::pasteAsPlainText):
        * editing/Editor.h:
        * editing/JSEditor.cpp:
        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::getInstance):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::getInstance):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::formData):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::getInstance):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::clear):
        (WebCore::FrameLoader::detachFromParent):
        * loader/mac/ImageDocumentMac.mm:
        (WebCore::finishImageLoad):
        * loader/qt/DocumentLoaderQt.cpp:
        * page/Chrome.cpp:
        (WebCore::Chrome::shouldInterruptJavaScript):
        * page/Chrome.h:
        * page/ChromeClient.h:
        * page/Frame.cpp:
        (WebCore::Frame::~Frame):
        (WebCore::Frame::markedTextRange):
        (WebCore::Frame::shouldChangeSelection):
        (WebCore::Frame::shouldDeleteSelection):
        (WebCore::Frame::isContentEditable):
        (WebCore::Frame::setSecureKeyboardEntry):
        (WebCore::Frame::isSecureKeyboardEntry):
        (WebCore::Frame::bindingRootObject):
        (WebCore::Frame::createRootObject):
        (WebCore::Frame::windowScriptNPObject):
        (WebCore::Frame::cleanupScriptObjects):
        (WebCore::FramePrivate::FramePrivate):
        * page/Frame.h:
        * page/FramePrivate.h:
        * page/FrameView.h:
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::tabsToLinks):
        (WebCore::EventHandler::tabsToAllControls):
        (WebCore::EventHandler::focusDocumentView):
        (WebCore::EventHandler::passMouseDownEventToWidget):
        (WebCore::EventHandler::handleDrag):
        (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
        (WebCore::EventHandler::keyboardUIMode):
        * page/mac/FrameMac.h: Removed.
        * page/mac/FrameMac.mm:
        (WebCore::Frame::setBridge):
        (WebCore::Frame::bridge):
        (WebCore::Frame::searchForLabelsAboveCell):
        (WebCore::Frame::searchForLabelsBeforeElement):
        (WebCore::Frame::matchLabelsAgainstElement):
        (WebCore::Frame::focusWindow):
        (WebCore::Frame::unfocusWindow):
        (WebCore::Frame::imageFromRect):
        (WebCore::Frame::selectionImage):
        (WebCore::Frame::snapshotDragImage):
        (WebCore::Frame::fontAttributesForSelectionStart):
        (WebCore::Frame::baseWritingDirectionForSelectionStart):
        (WebCore::Frame::print):
        (WebCore::Frame::issuePasteCommand):
        (WebCore::Frame::issueTransposeCommand):
        (WebCore::Frame::respondToChangedSelection):
        (WebCore::Frame::textFieldDidBeginEditing):
        (WebCore::Frame::textFieldDidEndEditing):
        (WebCore::Frame::textDidChangeInTextField):
        (WebCore::Frame::textDidChangeInTextArea):
        (WebCore::Frame::doTextFieldCommandFromEvent):
        (WebCore::Frame::textWillBeDeletedInTextField):
        (WebCore::Frame::setSecureKeyboardEntry):
        (WebCore::Frame::isSecureKeyboardEntry):
        (WebCore::Frame::setMarkedTextRange):
        (WebCore::Frame::dashboardRegionsDictionary):
        (WebCore::Frame::dashboardRegionsChanged):
        (WebCore::Frame::willPopupMenu):
        (WebCore::Frame::isCharacterSmartReplaceExempt):
        (WebCore::Frame::setNeedsReapplyStyles):
        (WebCore::Frame::customHighlightLineRect):
        (WebCore::Frame::paintCustomHighlight):
        (WebCore::Frame::createScriptInstanceForWidget):
        (WebCore::Frame::windowScriptObject):
        (WebCore::Frame::cleanupPlatformScriptObjects):
        * page/mac/WebCoreFrameBridge.h:
        * page/mac/WebCoreFrameBridge.mm:
        (createRootObject):
        (bridge):
        (-[WebCoreFrameBridge _frame]):
        * page/qt/EventHandlerQt.cpp:
        * page/qt/FrameQt.cpp:
        (WebCore::Frame::unfocusWindow):
        (WebCore::Frame::focusWindow):
        (WebCore::Frame::issueTransposeCommand):
        (WebCore::Frame::respondToChangedSelection):
        (WebCore::Frame::print):
        (WebCore::Frame::createScriptInstanceForWidget):
        (WebCore::Frame::cleanupPlatformScriptObjects):
        (WebCore::Frame::isCharacterSmartReplaceExempt):
        * page/qt/FrameQt.h: Removed.
        * platform/MimeTypeRegistry.h:
        * platform/graphics/svg/SVGImage.cpp:
        (WebCore::SVGImage::setData):
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyChromeClient::shouldInterruptJavaScript):
        (WebCore::SVGEmptyEditorClient::shouldChangeSelectedRange):
        * platform/mac/ClipboardMac.h:
        * platform/mac/ClipboardMac.mm:
        (WebCore::ClipboardMac::ClipboardMac):
        * platform/mac/FileChooserMac.mm:
        (-[OpenPanelController beginSheetWithFrame:]):
        * platform/mac/MimeTypeRegistryMac.mm:
        (WebCore::MimeTypeRegistry::getMIMETypeForPath):
        * platform/mac/PopupMenuMac.mm:
        (WebCore::PopupMenu::show):
        * platform/mac/WidgetMac.mm:
        (WebCore::Widget::setFocus):
        (WebCore::Widget::setIsSelected):
        * platform/network/mac/ResourceHandleMac.mm:
        * platform/network/qt/ResourceHandleManagerQt.cpp:
        * platform/network/qt/ResourceHandleQt.cpp:
        (WebCore::ResourceHandle::start):
        * platform/qt/MimeTypeRegistryQt.cpp:
        (WebCore::MimeTypeRegistry::getMIMETypeForPath):
        * platform/qt/PopupMenuQt.cpp:
        * platform/qt/ScrollViewCanvasQt.cpp:
        * platform/qt/ScrollViewQt.cpp:
        * platform/win/TemporaryLinkStubs.cpp:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintCustomHighlight):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintCustomHighlight):
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::addHighlightOverflow):
        (WebCore::RootInlineBox::paintCustomHighlight):

WebKit:

        Reviewed by Maciej.

        Additional coding by Maciej, additional review by Oliver.

        Added implementations for the new callbacks in EditorClient
        and ChromeClient (basically moved from WebFrameBridge).
        Cleaned up some code paths that are not called anymore
        and done fully inside WebCore now.

        * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
        * Misc/WebElementDictionary.mm:
        * Misc/WebNSAttributedStringExtras.mm:
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView getVariable:value:]):
        * Plugins/WebNetscapePluginEmbeddedView.mm:
        * Plugins/WebNetscapePluginStream.mm:
        * Plugins/WebPluginContainerCheck.mm:
        * WebCoreSupport/WebChromeClient.h:
        * WebCoreSupport/WebChromeClient.mm:
        (WebChromeClient::shouldInterruptJavaScript):
        * WebCoreSupport/WebEditorClient.h:
        * WebCoreSupport/WebEditorClient.mm:
        (WebEditorClient::shouldChangeSelectedRange):
        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge finishInitializingWithPage:frameName:frameView:ownerElement:]):
        (-[WebFrameBridge fini]):
        * WebCoreSupport/WebFrameLoaderClient.mm:
        * WebView/WebArchiver.mm:
        * WebView/WebFrame.mm:
        (core):
        (kit):
        (-[WebFrame _updateBackground]):
        * WebView/WebFrameInternal.h:
        * WebView/WebFrameView.mm:
        * WebView/WebHTMLRepresentation.mm:
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _updateMouseoverWithEvent:]):
        (-[WebHTMLView _isEditable]):
        (-[WebHTMLView validateUserInterfaceItem:]):
        (-[WebHTMLView maintainsInactiveSelection]):
        (-[WebHTMLView scrollWheel:]):
        (-[WebHTMLView acceptsFirstMouse:]):
        (-[WebHTMLView shouldDelayWindowOrderingForEvent:]):
        (-[WebHTMLView cut:]):
        (-[WebHTMLView paste:]):
        (-[WebHTMLView selectedAttributedString]):
        * WebView/WebScriptDebugDelegate.mm:
        * WebView/WebView.mm:
        (-[WebView _dashboardRegions]):
        (-[WebView setProhibitsMainFrameScrolling:]):
        (-[WebView _setInViewSourceMode:]):
        (-[WebView _inViewSourceMode]):
        (-[WebView shouldClose]):
        (-[WebView setEditable:]):

WebKitQt:

        Reviewed by Maciej.

        Additional coding by Maciej, additional review by Oliver.

        Add stubs for the new methods in ChormeClient and EditorClient,
        remove all references to FrameQt.

        * Api/qwebframe.cpp:
        (QWebFrame::QWebFrame):
        * Api/qwebframe_p.h:
        * Api/qwebpage.cpp:
        * WebCoreSupport/ChromeClientQt.cpp:
        (WebCore::ChromeClientQt::shouldInterruptJavaScript):
        * WebCoreSupport/ChromeClientQt.h:
        * WebCoreSupport/EditorClientQt.cpp:
        (WebCore::EditorClientQt::shouldChangeSelectedRange):
        (WebCore::EditorClientQt::isEditable):
        * WebCoreSupport/EditorClientQt.h:
        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::setFrame):
        (WebCore::FrameLoaderClientQt::webFrame):
        * WebCoreSupport/FrameLoaderClientQt.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19702 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-18 Oliver Hunt <oliver@apple.com>
oliver [Mon, 19 Feb 2007 07:18:06 +0000 (07:18 +0000)]
2007-02-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by NOBODY (Buildfix).

        Oops, missed a 'const'

        * platform/qt/ClipboardQt.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19701 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-18 Oliver Hunt <oliver@apple.com>
oliver [Mon, 19 Feb 2007 07:04:16 +0000 (07:04 +0000)]
2007-02-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Adding stubbed out implementation of Clipboard for Qt to stop
        it crashing whenever someone drags the mouse.

        * WebCore.pro:
        * page/qt/EventHandlerQt.cpp:
        (WebCore::EventHandler::createDraggingClipboard):
        * platform/qt/ClipboardQt.cpp: Added.
        (WebCore::ClipboardQt::ClipboardQt):
        (WebCore::ClipboardQt::clearData):
        (WebCore::ClipboardQt::clearAllData):
        (WebCore::ClipboardQt::getData):
        (WebCore::ClipboardQt::setData):
        (WebCore::ClipboardQt::types):
        (WebCore::ClipboardQt::dragLocation):
        (WebCore::ClipboardQt::dragImage):
        (WebCore::ClipboardQt::setDragImage):
        (WebCore::ClipboardQt::dragImageElement):
        (WebCore::ClipboardQt::setDragImageElement):
        (WebCore::ClipboardQt::createDragImage):
        (WebCore::ClipboardQt::declareAndWriteDragImage):
        (WebCore::ClipboardQt::writeURL):
        (WebCore::ClipboardQt::writeRange):
        (WebCore::ClipboardQt::hasData):
        * platform/qt/ClipboardQt.h: Added.
        (WebCore::ClipboardQt::~ClipboardQt):
        (WebCore::ClipboardQt::isForDragging):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19700 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-18 Oliver Hunt <oliver@apple.com>
oliver [Mon, 19 Feb 2007 06:07:14 +0000 (06:07 +0000)]
2007-02-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Don't even attempt to do a document based drag if there isn't a document
        Fixes rdar://problem/4960109

        * page/DragController.cpp:
        (WebCore::DragController::tryDocumentDrag):
           Null check m_document
        (WebCore::DragController::tryDHTMLDrag):
           ASSERT(m_document) -- tryDocumentDrag is the only
           thing that will ever call us, but lets play it safe

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19699 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Hyatt.
aroben [Mon, 19 Feb 2007 00:26:32 +0000 (00:26 +0000)]
    Reviewed by Hyatt.

        A little preparation for <rdar://problem/5006872>.

        * platform/PopupMenu.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19698 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adele.
ap [Sun, 18 Feb 2007 21:07:30 +0000 (21:07 +0000)]
    Reviewed by Adele.

        http://bugs.webkit.org/show_bug.cgi?id=12807
        XPath incorrectly converts NaN to boolean

        Test: fast/xpath/nan-to-boolean.html

        * xml/XPathValue.cpp:
        (WebCore::XPath::Value::toBoolean): Convert NaN to false.
        * xml/XPathFunctions.cpp:
        (WebCore::XPath::FunSubstringAfter::doEvaluate): Fix substring-after to actually work.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19697 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-18 Mitz Pettel <mitz@webkit.org>
ap [Sun, 18 Feb 2007 16:15:07 +0000 (16:15 +0000)]
2007-02-18  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12123
          REGRESSION: Incomplete repaint of floats' overflows

        Tests: fast/repaint/float-overflow.html
               fast/repaint/float-overflow-right.html
               fast/repaint/table-cell-vertical-overflow.html

        - fix http://bugs.webkit.org/show_bug.cgi?id=10116
          REGRESSION: Menu item drawn 2 pixels short on WWDC 2006 Attendee Site

        Reflected in existing test results.

        Unified floats and overflow for the purposes of painting and hit-testing.
        Overhanging and overflowing floats are now factored into a block's overflow
        unless their painting has been propagated to an ancestor.

        Changed table cells to no longer expand to enclose overflow, thus making
        it purely "visual overflow", having no effect on layout in WebCore. It
        still determines scrolling dimensions.

        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::placeBoxesHorizontally): Include inline blocks'
        horizontal overflow in the inline box's dimensions.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutBlock): Removed the expand to enclose overflows
        behavior. Added code to add this block's floats (and their overflow) to its
        overflow rect if it is not in a block formatting context. Otherwise, the
        inclusion of floats in the overflow is deferred until this block's parent
        examines its floats and possibly adopts overhanging floats.
        (WebCore::RenderBlock::layoutBlockChildren):
        (WebCore::RenderBlock::paint):
        (WebCore::RenderBlock::floatRect): Made non-virtual and changed to return an empty
        rect if there are no floats or the floats are clipped, instead of returning the border
        box.
        (WebCore::RenderBlock::addOverhangingFloats): Any floats of the child that
        are not to be painted by the parent are added to the child's overflow rect.
        (WebCore::RenderBlock::addVisualOverflow): Added. Adjusts the overflow
        bounds to include the given rect.
        (WebCore::RenderBlock::nodeAtPoint):
        * rendering/RenderBlock.h:
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::layoutBlock):
        (WebCore::RenderFlexibleBox::layoutHorizontalBox): After placing a normal
        child, add its floats to its overflow, since painting of floats does not
        propagate to flexible boxes.
        (WebCore::RenderFlexibleBox::layoutVerticalBox): Ditto.
        * rendering/RenderForeignObject.cpp:
        (WebCore::RenderForeignObject::layout):
        * rendering/RenderHTMLCanvas.cpp:
        (WebCore::RenderHTMLCanvas::layout):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::layout):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::RenderLayer::absoluteBoundingBox):
        * rendering/RenderLayer.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::expandsToEncloseOverhangingFloats):
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::layout):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::layout):
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::layout):
        * rendering/RenderTable.h: Removed the override of overflowHeight() since now tables can have
        vertical overflow.
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::paint): Made sure that overflow is repainted.
        * rendering/RenderTableCell.h:
        (WebCore::RenderTableCell::expandsToEncloseOverhangingFloats): Removed.
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::RenderTableSection):
        (WebCore::RenderTableSection::layoutRows): Factor in vertical overflow from cells.
        (WebCore::RenderTableSection::paint):
        * rendering/RenderTableSection.h:
        (WebCore::RenderTableSection::overflowHeight):
        (WebCore::RenderTableSection::overflowTop):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19696 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-18 Oliver Hunt <oliver@apple.com>
oliver [Sun, 18 Feb 2007 14:23:39 +0000 (14:23 +0000)]
2007-02-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by NOBODY (Buildfix).

        Build fix for the build fix -- can't call something that isn't a function

        * platform/qt/CursorQt.cpp:
        (WebCore::notAllowedCursor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19695 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-18 Oliver Hunt <oliver@apple.com>
oliver [Sun, 18 Feb 2007 13:48:13 +0000 (13:48 +0000)]
2007-02-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by NOBODY (Build fix).

        Adding platform/DragImage.cpp and platform/qt/DragImageQt.cpp to the Qt
        project files

        Stubbed method for WebCore::notAllowedCursor -- not sure what it should return,
        have returned blank cursor, possibly needs to return something else

        * WebCore.pro:
        * platform/qt/CursorQt.cpp:
        (WebCore::notAllowedCursor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19694 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-18 Oliver Hunt <oliver@apple.com>
oliver [Sun, 18 Feb 2007 13:07:56 +0000 (13:07 +0000)]
2007-02-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by NOBODY (Buildfix).

        Build fix -- adding DragClientQt method stubs

        * WebCoreSupport/DragClientQt.cpp:
        (WebCore::DragClientQt::willPerformDragSourceAction):
        (WebCore::DragClientQt::startDrag):
        (WebCore::DragClientQt::createDragImageForLink):
        * WebCoreSupport/DragClientQt.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19693 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-18 Oliver Hunt <oliver@apple.com>
oliver [Sun, 18 Feb 2007 12:59:37 +0000 (12:59 +0000)]
2007-02-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by NOBODY (Buildfix).

        Sigh, obnoxious occasional auto conversion from float to int

        * platform/mac/ClipboardMac.mm:
        (WebCore::ClipboardMac::createDragImage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19692 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Hyatt.
ap [Sun, 18 Feb 2007 12:48:44 +0000 (12:48 +0000)]
    Reviewed by Hyatt.

        http://bugs.webkit.org/show_bug.cgi?id=12799
        REGRESSION: Webpage doesn't load correctly (www.cincinnati.com
        redirects to the wrong URL)

        Test: http/tests/misc/refresh-meta-with-newline.html

        * platform/network/HTTPParsers.cpp:
        (WebCore::skipWhiteSpace):
        (WebCore::parseHTTPRefresh):
        * platform/network/HTTPParsers.h:
        In HTML, all characters with codes <= 0x20 are whitespace, while in
        HTTP, only space and tab are such.

        * dom/Document.cpp:
        (WebCore::Document::processHttpEquiv):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::receivedFirstData):
        Pass parseHTTPRefresh() a flag telling about the source of data.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19691 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-18 Oliver Hunt <oliver@apple.com>
oliver [Sun, 18 Feb 2007 12:44:24 +0000 (12:44 +0000)]
2007-02-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by NOBODY (Build fix).

        Buld fix -- surprisingly RetainPtr doesn't exist on Qt

        * platform/DragImage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19690 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-18 Oliver Hunt <oliver@apple.com>
oliver [Sun, 18 Feb 2007 12:30:55 +0000 (12:30 +0000)]
2007-02-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.
WebCore:
        More drag and drop migration, now the entirety of the
        drag initiation logic has been rendered platform independent
        This has required a number of new interfaces, and a reasonable
        amount of logic migration.

        As a side effect, this patch also fixes rdar://problem/4945341

        There are some basic Qt stubs that should stop the build from failing,
        however the absence of ClipboardQt means any attempt to initiate a drag
        may cause a crash.

        * WebCore.exp:
           Exporting new symbols

        * WebCore.xcodeproj/project.pbxproj:
           New files

        * dom/Clipboard.cpp:
        (WebCore::Clipboard::canSaveAsWebArchive):
          Migrated from WebKit

        * dom/Clipboard.h:
          Added more methods to allow Clipboard to be used as a
          platform independent container for drag and drop

        * page/DragClient.h:
        (WebCore::DragClient::declareAndWriteDragImage):
          This is a mac only helper function, so i've made it have an empty implementation,
          that way we won't need a PLATFORM(MAC) block in SVGImageEmptyClients

        * page/DragController.cpp:
        (WebCore::DragController::dragExited):
        (WebCore::DragController::performDrag):
        (WebCore::DragController::tryDocumentDrag):
        (WebCore::DragController::tryDHTMLDrag):
          Using RefPtrs now
        (WebCore::getCachedImage):
        (WebCore::getImage):
          Helper functions
        (WebCore::dragLocForDHTMLDrag):
        (WebCore::dragLocForSelectionDrag):
        (WebCore::DragController::startDrag):
        (WebCore::DragController::doImageDrag):
        (WebCore::DragController::doSystemDrag):
          Logic that generates drag images and clipboard content, and
          initiates the actual system drag operation

        * page/DragController.h:
          Method and variable declarations

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleDrag):
          handleDrag is now platform independent
        (WebCore::EventHandler::handleTextInputEvent):
           formatting

        * page/EventHandler.h:
        (WebCore::EventHandler::eventLoopHandleMouseDragged):
          Forgot to define this stub function

        * page/Frame.h:
          Declaring dragImageForSelection to provide drag image for selected content

        * page/mac/DragControllerMac.mm:
          Defining drag images control vars

        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::createDraggingClipboard):
          Migrated old clipboard creation to here

        * page/mac/FrameMac.mm:
        (WebCore::Frame::dragImageForSelection):
          Wrap FrameMac::selectionImage

        * page/qt/DragControllerQt.cpp:
          Defining drag images control vars

        * page/qt/EventHandlerQt.cpp:
        (WebCore::EventHandler::createDraggingClipboard):
          stub

        * page/qt/FrameQt.cpp:
        (WebCore::Frame::dragImageForSelection):
          stub

        * platform/DragImage.cpp: Added.
        (WebCore::fitDragImageToMaxSize):
        (WebCore::createDragImageForSelection):
           Platform independent processing for drag images

        * platform/DragImage.h: Added.
           Declaring typedefs and wrapper functions to abstract the handling
           of drag images

        * platform/Pasteboard.h:
          Declaring extracted writeURL and writeSelection methods

        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyDragClient::willPerformDragSourceAction):
        (WebCore::SVGEmptyDragClient::startDrag):
        (WebCore::SVGEmptyDragClient::createDragImageForLink):
          Stubs FTW!

        * platform/mac/ClipboardMac.h:
        (WebCore::ClipboardMac::pasteboard):
          Provide accessor for underlying NSPasteboard

        * platform/mac/ClipboardMac.mm:
        (WebCore::ClipboardMac::hasData):
        (WebCore::ClipboardMac::writeRange):
        (WebCore::ClipboardMac::writeURL):
        (WebCore::ClipboardMac::declareAndWriteDragImage):
        (WebCore::ClipboardMac::createDragImage):
           Implemented new Clipboarid functionality.
        (WebCore::ClipboardMac::dragNSImage):
           Made this a const method

        * platform/mac/DragImageMac.mm: Added.
        (WebCore::dragImageSize):
        (WebCore::deleteDragImage):
        (WebCore::scaleDragImage):
        (WebCore::dissolveDragImageToFraction):
        (WebCore::createDragImageFromImage):
        (WebCore::createDragImageIconForCachedImage):
           Implemented platform specific DragImage functions

        * platform/mac/PasteboardMac.mm:
        (WebCore::writeSelection):
        (WebCore::Pasteboard::writeSelection):
        (WebCore::writeURL):
        (WebCore::Pasteboard::writeURL):
           Extracted member implementations of these functions, so that
           Clipboard could also make use of this functionality.
           Pasteboard methods now call the new non-member implementations.
           Also fixed implementations to respect the list of requested types.

        * platform/qt/DragImageQt.cpp: Added.
        (WebCore::dragImageSize):
        (WebCore::deleteDragImage):
        (WebCore::scaleDragImage):
        (WebCore::dissolveDragImageToFraction):
        (WebCore::createDragImageFromImage):
        (WebCore::createDragImageIconForCachedImage):
          Stubs

WebKit:
        Moving the drag initiation logic to WebCore.
        The redundant code in webkit will be moved out in a later patch.

        * WebCoreSupport/WebDragClient.h:
        * WebCoreSupport/WebDragClient.mm:
        (getTopHTMLView):
          Helper function
        (WebDragClient::willPerformDragSourceAction):
        (WebDragClient::startDrag):
        (WebDragClient::createDragImageForLink):
          Implemented new DragClient methods
        (WebDragClient::declareAndWriteDragImage):
          Helper function for the Mac to allow new drag and drop
          code to match behaviour

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _dragImageForURL:withLabel:]):
        (-[WebHTMLView _dragImageForLinkElement:]):
          Refactoring old _dragImageForLinkElement function so that
          the link drag image can be created with just a URL and label,
          rather than requiring the original element
        (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]):
          Removed logic that is no longer necessary
        (-[WebHTMLView _mouseDownEvent]):
          The WebDragClient may need the original mouseDownEvent of a drag when initiating
          a drag
        * WebView/WebHTMLViewInternal.h:
          Declaring _mouseDownEvent

        * WebView/WebHTMLViewPrivate.h:
          Declaring _dragImageForURL

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19689 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-18 Kevin Ollivier <kevino@theolliviers.com>
ap [Sun, 18 Feb 2007 08:48:33 +0000 (08:48 +0000)]
2007-02-18  Kevin Ollivier  <kevino@theolliviers.com>

        Reviewed by Adam Roben.

        Fix cases where MSVC-specific code was identified as Win32 platform
        code. (as it should be compiled for e.g. wx port when using MSVC too)

        * wtf/Assertions.h:
        * wtf/MathExtras.h:
        * wtf/StringExtras.h:
        changed PLATFORM(WIN) sections to COMPILER(MSVC) as necessary

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19688 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Fix textarea resizers to not fill with black by making sure the fill color...
hyatt [Sun, 18 Feb 2007 01:58:34 +0000 (01:58 +0000)]
    Fix textarea resizers to not fill with black by making sure the fill color starts off as
        transparent instead of black.

        Reviewed by aroben

        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContextState::GraphicsContextState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19687 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Added missing Radar references to ChangeLogs.
aroben [Sat, 17 Feb 2007 22:23:21 +0000 (22:23 +0000)]
    Added missing Radar references to ChangeLogs.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19686 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-17 Lars Knoll <lars@trolltech.com>
aroben [Sat, 17 Feb 2007 22:21:19 +0000 (22:21 +0000)]
2007-02-17  Lars Knoll <lars@trolltech.com>

LayoutTests:

        Reviewed by Adam.

        test for http://bugs.webkit.org/show_bug.cgi?id=11476
        <img> tags nested inside <map> where not showing up

        * fast/images/image-in-map-expected.checksum: Added.
        * fast/images/image-in-map-expected.png: Added.
        * fast/images/image-in-map-expected.txt: Added.
        * fast/images/image-in-map.html: Added.

WebCore:

        Reviewed by Adam.

        fix http://bugs.webkit.org/show_bug.cgi?id=11476
        <img> tags nested inside <map> where not showing up

        Test: fast/images/image-in-map.html

        * html/HTMLMapElement.cpp:
        (WebCore::HTMLMapElement::checkDTD):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19685 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
weinig [Sat, 17 Feb 2007 22:09:10 +0000 (22:09 +0000)]
LayoutTests:

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=12733
        XPath namespace is attached to a wrong step

        * fast/xpath/namespace-vs-predicate-expected.txt: Added.
        * fast/xpath/namespace-vs-predicate.xhtml: Added.

WebCore:

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=12733
        XPath namespace is attached to a wrong step

        * xml/XPathGrammar.y: NAMETEST is different from other NodeTests in that its
        resulting type is an expanded name, rather than a string. It is not really possible
        to store the namespace inside Parser, because it gets used in wrong steps then.

        * xml/XPathParser.cpp:
        (WebCore::XPath::Parser::expandQName):
        * xml/XPathParser.h:
        Moved code that expands a QName from XPathGrammar.y. Removed m_currentNamespaceURI.

        * xml/XPathStep.cpp:
        (WebCore::XPath::Step::Step):
        * xml/XPathStep.h:
        Added a constructor that takes a namespace.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19684 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
adele [Sat, 17 Feb 2007 19:03:01 +0000 (19:03 +0000)]
LayoutTests:

        Reviewed by Maciej.

        - test for http://bugs.webkit.org/show_bug.cgi?id=12479
          ASSERTION FAILURE: resource->inCache() in WebCore::Cache::remove

        * fast/loader/resources/simultaneous-reloads-assert-frame.html: Added.
        * fast/loader/simultaneous-reloads-assert-expected.txt: Added.
        * fast/loader/simultaneous-reloads-assert.html: Added.

WebCore:

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12479
          ASSERTION FAILURE: resource->inCache() in WebCore::Cache::remove

        Test: fast/loader/simultaneous-reloads-assert.html

        * loader/Cache.cpp:
        (WebCore::Cache::remove): Replaced the assertion with a check whether the
        resource is in the cache. The resource could have been removed from the cache
        as a result of a reload occurring simultaneously in a different document.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19683 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam.
adele [Sat, 17 Feb 2007 18:58:37 +0000 (18:58 +0000)]
    Reviewed by Adam.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=12711
        Prettier and more distinct cursors

        * Resources/crossHairCursor.png: Added.
        * Resources/northEastSouthWestResizeCursor.png:
        * Resources/northWestSouthEastResizeCursor.png:
        * Resources/notAllowedCursor.png: Added.
        * page/EventHandler.cpp: (WebCore::selectCursor):
        * platform/Cursor.h:
        * platform/mac/CursorMac.mm:
        (WebCore::crossCursor):
        (WebCore::notAllowedCursor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19682 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
adele [Sat, 17 Feb 2007 18:35:29 +0000 (18:35 +0000)]
LayoutTests:

        Reviewed by Darin.

        - test for http://bugs.webkit.org/show_bug.cgi?id=12780
          REGRESSION (r19341-r19385): Reproducible crash in "onselectstart" event

        * fast/events/shadow-boundary-crossing-expected.txt: Added.
        * fast/events/shadow-boundary-crossing.html: Added.

WebCore:

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12780
          REGRESSION (r19341-r19385): Reproducible crash in "onselectstart" event

        Test: fast/events/shadow-boundary-crossing.html

        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::dispatchGenericEvent): Changed to use the new
        eventParentNode() function for constructing the chain of ancestors for
        capture and bubbling.
        * dom/Node.h:
        (WebCore::Node::eventParentNode): Added. Returns the node's parent for the
        purpose of of event capture and bubbling. The base class implementation is
        to return the parent node.
        * ksvg2/svg/SVGElement.h:
        (WebCore::SVGElement::eventParentNode): Added. Since in SVG events bubble
        to and can be captured across the shadow DOM boundary, returns the shadow parent
        for shadow nodes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19681 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoImprove textarea resizer painting.
hyatt [Sat, 17 Feb 2007 09:50:52 +0000 (09:50 +0000)]
Improve textarea resizer painting.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19680 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago JavaScriptCore:
kjk [Sat, 17 Feb 2007 09:07:39 +0000 (09:07 +0000)]
  JavaScriptCore:

        Reviewed by Adam Roben.

        Fix crashes on ARM due to different struct packing. Based on a patch
        by Mike Emmel.
        * kjs/ustring.cpp: compile-time assert to make sure sizeof(UChar) == 2
        * kjs/ustring.h: pack UChar struct to ensure that sizeof(UChar) == 2
        * wtf/Assertions.h: add COMPILE_ASSERT macro for compile-time assertions

  WebCore:

        Reviewed by Adam Roben.

        Fix crashes on ARM due to different struct packing. Based on a patch
        from Mike Emmel.

        * platform/DeprecatedString.cpp: compile-time assert to make sure sizeof(DeprecatedChar) == 2
        * platform/DeprecatedString.h: pack DeprecatedChar struct to ensure that
        sizeof(DeprecatedChar) == 2. Move _internalBuffer in DeprecatedStringData
        to the end, to avoid crashes on ARM due to different struct packing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19679 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
adele [Sat, 17 Feb 2007 08:27:05 +0000 (08:27 +0000)]
LayoutTests:

        Reviewed by Mitz.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=11534
        <rdar://problem/4946947> REGRESSION: Readonly text fields don't scroll when selecting content

        * fast/forms/input-readonly-autoscroll-expected.checksum: Added.
        * fast/forms/input-readonly-autoscroll-expected.png: Added.
        * fast/forms/input-readonly-autoscroll-expected.txt: Added.
        * fast/forms/input-readonly-autoscroll.html: Added.

WebCore:

        Reviewed by Mitz.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=11534
        <rdar://problem/4946947> REGRESSION: Readonly text fields don't scroll when selecting content

        Test: fast/forms/input-readonly-autoscroll.html

        Implemented autoscroll methods for RenderTextControl, so this works on non-editable text controls.

        * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::autoscroll):
        * rendering/RenderTextControl.h: (WebCore::RenderTextControl::shouldAutoscroll):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19678 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam Roben.
kjk [Sat, 17 Feb 2007 08:14:02 +0000 (08:14 +0000)]
    Reviewed by Adam Roben.

        Curl networking improvements inspired by Mike Emmel's patches in
        http://bugs.webkit.org/show_bug.cgi?id=11332.
        Fix FrameLoaderClientGdk due to changed FrameLoaderClient API.

        * loader/gdk/FrameLoaderClientGdk.cpp: Massage for changed API.
        (WebCore::FrameLoaderClientGdk::saveViewStateToItem):
        (WebCore::FrameLoaderClientGdk::restoreViewState):
        (WebCore::FrameLoaderClientGdk::generatedMIMETypeForURLScheme):
        (WebCore::FrameLoaderClientGdk::willUseArchive):
        * loader/gdk/FrameLoaderClientGdk.h: Ditto.
        * platform/network/ResourceHandleInternal.h: Remember url and custom headers
        for the request lifetime and free them at the end.
        (WebCore::ResourceHandleInternal::ResourceHandleInternal):
        * platform/network/gdk/ResourceHandleCurl.cpp: Ditto.
        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
        * platform/network/gdk/ResourceHandleManager.cpp: url improvements:
        - remove m_useSimple code-path since it wasn't used anywhere
        - don't use hashmap for keeping track of outstanding jobs - curl does it anyway
        - set custom headers from request
        - enable gzip and deflate through Accept-Encoding
        - setup curl to share cookies and DNS cache between requests
        - enable persisting of cookies in a file (if client provides file name
          for cookies via ResourceHandleManager::setCookieJarFileName())
        (WebCore::ResourceHandleManager::ResourceHandleManager):
        (WebCore::ResourceHandleManager::setCookieJarFileName):
        (WebCore::ResourceHandleManager::downloadTimerCallback):
        (WebCore::ResourceHandleManager::removeFromCurl):
        (WebCore::ResourceHandleManager::setupPUT):
        (WebCore::ResourceHandleManager::setupPOST):
        (WebCore::ResourceHandleManager::add):
        (WebCore::ResourceHandleManager::cancel):
        * platform/network/gdk/ResourceHandleManager.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19677 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam Roben.
kjk [Sat, 17 Feb 2007 08:09:09 +0000 (08:09 +0000)]
    Reviewed by Adam Roben.

        Gdk fixes.

        * page/gdk/EventHandlerGdk.cpp: Comment out chatty message.
        (WebCore::EventHandler::handleDrag):
        * platform/gdk/EditorClientGdk.cpp: Enable entering text into text field.
        (WebCore::EditorClientGdk::shouldInsertText):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19676 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam Roben.
kjk [Sat, 17 Feb 2007 06:33:26 +0000 (06:33 +0000)]
    Reviewed by Adam Roben.

        Move Path implementation from TemporaryLinkStubs.cpp to
        its own file.
        Implement setLineCap, setLineJoin and setMiterLimit for
        cairo's GraphicsContext.

        * WebCoreSources.bkl:
        * platform/gdk/TemporaryLinkStubs.cpp:
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::setPlatformFillColor):
        (WebCore::GraphicsContext::setPlatformStrokeColor):
        (WebCore::GraphicsContext::setLineCap):
        (WebCore::GraphicsContext::setLineJoin):
        (WebCore::GraphicsContext::setMiterLimit):
        * platform/graphics/cairo/PathCairo.cpp: Added.
        (WebCore::Path::Path):
        (WebCore::Path::~Path):
        (WebCore::Path::contains):
        (WebCore::Path::translate):
        (WebCore::Path::boundingRect):
        (WebCore::Path::operator=):
        (WebCore::Path::clear):
        (WebCore::Path::moveTo):
        (WebCore::Path::addLineTo):
        (WebCore::Path::addQuadCurveTo):
        (WebCore::Path::addBezierCurveTo):
        (WebCore::Path::addArcTo):
        (WebCore::Path::closeSubpath):
        (WebCore::Path::addArc):
        (WebCore::Path::addRect):
        (WebCore::Path::addEllipse):
        (WebCore::Path::transform):
        (WebCore::Path::apply):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19675 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoFix uninitialized variable
staikos [Sat, 17 Feb 2007 05:00:44 +0000 (05:00 +0000)]
Fix uninitialized variable

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19674 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-16 Ada Chan <adachan@apple.com>
adachan [Sat, 17 Feb 2007 04:39:57 +0000 (04:39 +0000)]
2007-02-16  Ada Chan  <adachan@apple.com>

        Reviewed by Adam and Maciej.

        Use a RefPtr to store the old hover node.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateHoverActiveState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19673 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adele.
darin [Sat, 17 Feb 2007 01:15:48 +0000 (01:15 +0000)]
    Reviewed by Adele.

        - fix <rdar://problem/4990864> ASSERT in FormDelegate.m while dragging text between frames

        This symptom is specific to Safari, so no layout test.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::doApply): Only call textWillBeDeletedInTextField if the
        text field is focused.
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::aboutToUnload): Only call textFieldDidEndEditing if the text
        field is focused.
        (WebCore::HTMLInputElement::dispatchBlurEvent): Remove unneeded type cast.
        (WebCore::HTMLInputElement::defaultEventHandler): Only call doTextFieldCommandFromEvent if
        the text field is focused.
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::subtreeHasChanged): Only call textDidChangeInTextArea,
        textFieldDidBeginEditing, and textDidChangeInTextField if the element is focused.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19672 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoAPI tweaks to widget and scrollview.
hyatt [Sat, 17 Feb 2007 01:04:08 +0000 (01:04 +0000)]
API tweaks to widget and scrollview.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19671 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Tim Hatcher
sullivan [Sat, 17 Feb 2007 00:31:39 +0000 (00:31 +0000)]
    Reviewed by Tim Hatcher

        - fixed <rdar://problem/4811446> "Check Grammar" checkbox in Spelling+Grammar window doesn't
        live update with menu change in WebKit

        * WebView/WebView.mm:
        (-[WebView setGrammarCheckingEnabled:]):
        Use sekrit AppKit knowledge to tell NSSpellChecker about the change, since there's no API
        for this yet. Also restructured a little to avoid extra work when the value hasn't changed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19670 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam.
andersca [Fri, 16 Feb 2007 22:29:29 +0000 (22:29 +0000)]
    Reviewed by Adam.

        <rdar://problem/4943985>
        REGRESSION: Dragging standalone images to Finder fails to download the image file

        Set the data and response on the image resource. Also, since this is platform-independent we don't need to do it in
        ImageDocumentMac.mm

        * loader/ImageDocument.cpp:
        (WebCore::ImageTokenizer::finish):
        * loader/mac/ImageDocumentMac.h:
        * loader/mac/ImageDocumentMac.mm:
        (WebCore::finishImageLoad):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19667 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Anders.
darin [Fri, 16 Feb 2007 21:56:43 +0000 (21:56 +0000)]
    Reviewed by Anders.

        - fix <rdar://problem/5000216> JavaScriptGlue framework started turning all CFNumbers
          into signed 32bit values

        Circumstantial evidence seems to indicate that JavaScriptGlue was depending on a bug
        in CFNumber where CFNumberIsFloatType was returning true for 64-bit integer values.

        * JSUtils.cpp: (JSObjectKJSValue): Removed the call to CFNumberIsFloatType in the
        conversion of numeric values, and always use kCFNumberDoubleType, since double is
        the internal format of numbers in JavaScriptCore. There's no value to having a
        separate code path for integers. There's also no reason to check the return value
        from CFNumberGetValue -- if it returns false it still does the best it can to convert
        to a double, which is what we want.

        * UserObjectImp.cpp: (UserObjectImp::toString): Removed a similar code path that
        tried to handle integers separate from double. Instead, always use a double. For
        compatibility, use a format without a decimal point when CFNumberIsFloatType returns
        false. Also removed a bogus cast to float; the "%f" format string takes a double,
        not a float, so all the cast did was cut down on precision.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19666 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam.
harrison [Fri, 16 Feb 2007 21:54:56 +0000 (21:54 +0000)]
    Reviewed by Adam.

        <rdar://problem/5004746> Need mechanism to protect against WebKit calls from secondary threads (DOM APIs)

        * platform/mac/LoggingMac.mm:
        (WebCore::_WebCoreThreadViolationCheck):
        Change the default to log the violations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19665 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Mitz.
adele [Fri, 16 Feb 2007 19:40:33 +0000 (19:40 +0000)]
    Reviewed by Mitz.

        Fixed: http://bugs.webkit.org/show_bug.cgi?id=12768
        <rdar://problem/4995250> REGRESSION: Crash occurs at WebCore::RenderLayer::scrollToOffset() when leaving page that has focus in field

        No test case added.  This crash doesn't occur in DumpRenderTree because the B/F cache is turned off.

        * dom/Node.cpp: (WebCore::Node::willRemove): Check that the document is not in the page cache before

        * dom/Element.cpp: (WebCore::Element::updateFocusAppearance): Added restorePreviousSelection argument, with appropriate default values.
        * dom/Element.h: ditto.
        * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateFocusAppearance): ditto.
        * html/HTMLInputElement.h: ditto.
        * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateFocusAppearance): ditto.
        * html/HTMLTextAreaElement.h: ditto.

        * page/PageState.cpp: (WebCore::PageState::restore): Call updateFocusAppearance on the focused node for this page.  Pass true for the
          restorePreviousSelection argument.

        * rendering/RenderLayer.cpp: Added ASSERTS and nil checks on the RenderView.  It shouldn't be null, but if it is,
          we'll fail silently on release builds.
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::RenderLayer::scrollToOffset):
        (WebCore::RenderLayer::windowClipRect):
        (WebCore::RenderLayer::calculateClipRects):
        (WebCore::RenderLayer::calculateRects):
        (WebCore::RenderLayer::intersectsDamageRect):
        (WebCore::RenderLayer::absoluteBoundingBox):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19662 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Mitz.
andersca [Fri, 16 Feb 2007 19:16:05 +0000 (19:16 +0000)]
    Reviewed by Mitz.

        http://bugs.webkit.org/show_bug.cgi?id=12788
        REGRESSION: Going back one page in history has a noticeable delay

        Um...if all elements in two vectors are equal, then I guess we could say that
        the two vectors are equal too.

        * wtf/Vector.h:
        (WTF::):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19661 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin.
andersca [Fri, 16 Feb 2007 19:00:18 +0000 (19:00 +0000)]
    Reviewed by Darin.

        <rdar://problem/4993055> auto_refcount_underflow_error: WebCore::FrameLoader::continueAfterNavigationPolicy () over-releases under GC

        Add ::adoptNS and ::adoptCF methods to RetainPtr to indicate what type of reference to adopt.

        * platform/cf/RetainPtr.h:
        (WebCore::):
        (WebCore::adoptNSReference):
        (WebCore::RetainPtr::RetainPtr):
        (WebCore::::adoptCF):
        (WebCore::::adoptNS):
        * platform/mac/FileChooserMac.mm:
        (WebCore::FileChooser::FileChooser):
        * platform/network/mac/ResourceErrorMac.mm:
        (WebCore::ResourceError::operator NSError*):
        * platform/network/mac/ResourceRequestMac.mm:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        * platform/network/mac/ResourceResponseMac.mm:
        (WebCore::ResourceResponse::nsURLResponse):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19660 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Lost Objective-C Hippyness (or hippiness)
beidson [Fri, 16 Feb 2007 05:19:56 +0000 (05:19 +0000)]
    Reviewed by Lost Objective-C Hippyness (or hippiness)

        Oh boy, did I ever botch this one up...

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem): Null check the FrameView

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19653 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam's complaint
beidson [Fri, 16 Feb 2007 04:44:36 +0000 (04:44 +0000)]
    Reviewed by Adam's complaint

        aroben wanted me to do an early return, instead.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19652 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adele
beidson [Fri, 16 Feb 2007 04:40:54 +0000 (04:40 +0000)]
    Reviewed by Adele

        Forgot to bring the null check with me when I backed this code out of
        the FrameLoaderClient

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem): null check the HistoryItem

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19651 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoWebCore:
beidson [Fri, 16 Feb 2007 04:11:18 +0000 (04:11 +0000)]
WebCore:

        Reviewed by Adam

        Save scroll state for back/forward navigation in FrameLoader, not the client

       * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem): Actually save the scroll position
         here instead of asking the FrameLoaderClient
        (WebCore::FrameLoader::restoreScrollPositionAndViewState): Ditto

        * loader/FrameLoaderClient.h: Renamed/repurposed 2 methods

        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::restoreViewState): Ditto
        (WebCore::SVGEmptyFrameLoaderClient::saveViewStateToItem): Ditto

WebKit:

        Reviewed by Adam

        Save scroll state for back/forward navigation in FrameLoader, not the client

        * WebCoreSupport/WebFrameLoaderClient.h: Renamed the save/restore methods
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::saveViewStateToItem): Save viewstate only
        (WebFrameLoaderClient::restoreViewState): Restore viewstate only

WebKitQt:

        Reviewed by Adam

        Moved scroll state down into the cross platform FrameLoader -
        Blind attempt at keeping Qt building

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::restoreViewState):
        (WebCore::FrameLoaderClientQt::saveViewStateToItem):
        * WebCoreSupport/FrameLoaderClientQt.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19650 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-16 Mark Rowe <mrowe@apple.com>
bdash [Fri, 16 Feb 2007 04:00:04 +0000 (04:00 +0000)]
2007-02-16  Mark Rowe  <mrowe@apple.com>

        Not reviewed.

        <rdar://problem/4982312> leaks bot should run in normal mode, rather than quiet mode

        * BuildSlaveSupport/build.webkit.org-config/webkit/steps.py: Switch back to default verbosity for output of leaks tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19649 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
justing [Fri, 16 Feb 2007 02:35:16 +0000 (02:35 +0000)]
LayoutTests:

        Reviewed by harrison

        <rdar://problem/4989774>
        REGRESSION: Pasting a image into a plain text message can place image on a new line

        Added:
        * editing/pasteboard/4989774-expected.checksum: Added.
        * editing/pasteboard/4989774-expected.png: Added.
        * editing/pasteboard/4989774-expected.txt: Added.
        * editing/pasteboard/4989774.html: Added.
        Equivalent trees:
        * editing/deleting/delete-3857753-fix-expected.txt:
        * editing/pasteboard/paste-list-001-expected.txt:
        * editing/pasteboard/paste-table-001-expected.txt:
        * editing/pasteboard/paste-text-001-expected.txt:
        * editing/pasteboard/paste-text-at-tabspan-001-expected.txt:
        * editing/pasteboard/paste-text-at-tabspan-002-expected.txt:
        * editing/pasteboard/paste-text-at-tabspan-003-expected.txt:

WebCore:

        Reviewed by harrison

        <rdar://problem/4989774>
        REGRESSION: Pasting a image into a plain text message can place image on a new line

        <span><img><span><img></span></span> will appear as two
        images on different lines because of a layout/rendering
        bug.  This patch avoids the bug by producing cleaner
        markup so that the paste code can safely remove the style
        spans.

        * editing/markup.cpp:
        (WebCore::createMarkup): Get the default style from the
        editable root or body instead of the document element.
        This produces cleaner markup since we don't inline the
        root's styles.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19648 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Adam Roben.
kjk [Fri, 16 Feb 2007 01:47:02 +0000 (01:47 +0000)]
    Reviewed by Adam Roben.

        Add gdk version of ContextMenuClient based on qt version.

        * WebCoreSources.bkl:
        * page/gdk/ContextMenuClientGdk.cpp: Added.
        (WebCore::ContextMenuClientGdk::contextMenuDestroyed):
        (WebCore::ContextMenuClientGdk::getCustomMenuFromDefaultItems):
        (WebCore::ContextMenuClientGdk::contextMenuItemSelected):
        (WebCore::ContextMenuClientGdk::downloadURL):
        (WebCore::ContextMenuClientGdk::copyImageToClipboard):
        (WebCore::ContextMenuClientGdk::searchWithGoogle):
        (WebCore::ContextMenuClientGdk::lookUpInDictionary):
        (WebCore::ContextMenuClientGdk::speak):
        (WebCore::ContextMenuClientGdk::stopSpeaking):
        * page/gdk/ContextMenuClientGdk.h: Added.
        * webcore-base.bkl: curl is needed when building webcore_base files.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19647 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin.
kdecker [Thu, 15 Feb 2007 22:10:12 +0000 (22:10 +0000)]
   Reviewed by Darin.

       Fixed: <rdar://problem/4983883> Background of a .mov window should not be white

       * loader/PluginDocument.cpp:
       (WebCore::PluginTokenizer::createDocumentStructure): Set a background color of gray
       for full frame plug-ins, which makes it easier on the eyes. It's also the same
       gray that PDFKit uses, too.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19645 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin.
weinig [Thu, 15 Feb 2007 22:05:55 +0000 (22:05 +0000)]
    Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12625
          REGRESSION: Crash when closing the web inspector with text selected

        The problem was that selectionRect() was being called on a render tree that
        had pending style changes. The changes were committed as a side effect in
        the middle of traversing the render tree, and the current object got
        deleted as a result. The solution is to update the render tree before
        starting to traverse it.

        The inspector was affected because it makes style changes in response to
        an AppKit notification that's sent right before the windowDidResignKey:
        notification, under which WebKit calls selectionRect(). I couldn't recreate
        the same conditions (having uncommitted style changes in the tree when the
        window becomes inactive) using HTML/JS in Safari, hence the lack of
        a regression test to go with this patch.

        * rendering/RenderView.cpp:
        (WebCore::RenderView::selectionRect): Added call to updateRendering().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19644 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin.
weinig [Thu, 15 Feb 2007 21:03:37 +0000 (21:03 +0000)]
    Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=10127
          REGRESSION: Crash undoing delete in textarea

        Document::removeMarkers() was using a Vector iterator (which is just a
        pointer) and inserting into the Vector at the same time, which made the
        iterator invalid as the Vector's data buffer was relocated.

        Replaced all instances of Vector<DocumentMarker>::iterator with indices.

        * dom/Document.cpp:
        (WebCore::Document::addMarker):
        (WebCore::Document::copyMarkers):
        (WebCore::Document::removeMarkers):
        (WebCore::Document::repaintMarkers):
        (WebCore::Document::shiftMarkers):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19643 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago * projects/performance/index.html: Fix i-Bench link.
darin [Thu, 15 Feb 2007 19:00:36 +0000 (19:00 +0000)]
    * projects/performance/index.html: Fix i-Bench link.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19642 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
weinig [Thu, 15 Feb 2007 18:46:15 +0000 (18:46 +0000)]
LayoutTests:

        Reviewed by Darin.

        - updated results for http://bugs.webkit.org/show_bug.cgi?id=12777
          REGRESSION (r18574): User profile pages display incorrectly at ebay.ca

        * tables/mozilla/bugs/bug45486-expected.checksum:
        * tables/mozilla/bugs/bug45486-expected.png:
        * tables/mozilla/bugs/bug45486-expected.txt:
        * tables/mozilla_expected_failures/core/col_span2-expected.txt:

WebCore:

        Reviewed by Darin.

        - http://bugs.webkit.org/show_bug.cgi?id=12777
          REGRESSION (r18574): User profile pages display incorrectly at ebay.ca

        Fixes existing layout tests: tables/mozilla/bugs/bug45486.html
                                     tables/mozilla_expected_failures/core/col_span2.html

        * rendering/AutoTableLayout.cpp:
        (WebCore::AutoTableLayout::calcEffectiveWidth): Fixed a mismatch between which
        columns count as percentage columns when adding up the total percent and
        which columns count as percentage columns when converting non-percentage
        columns to effectively-percentage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19641 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Beth Dakin.
ggaren [Thu, 15 Feb 2007 18:21:20 +0000 (18:21 +0000)]
    Reviewed by Beth Dakin.

        * DumpRenderTree/DumpRenderTree.m: Don't ignore NSAttributedString WebCore::Node
        leaks anymore, either, since r19486 fixed them, too.
        (shouldIgnoreWebCoreNodeLeaks):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19640 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago * Scripts/run-webkit-tests: Don't ignore NSAttributedString leaks any more...
darin [Thu, 15 Feb 2007 17:47:13 +0000 (17:47 +0000)]
    * Scripts/run-webkit-tests: Don't ignore NSAttributedString leaks any more. Those were
        fixed by change 19486.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19639 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Beth Dakin.
ggaren [Thu, 15 Feb 2007 17:29:14 +0000 (17:29 +0000)]
    Reviewed by Beth Dakin.

        Ignore another leak, seen recently on the buildbot.

        * Scripts/run-webkit-tests:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19638 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago2007-02-14 Mitz Pettel <mitz@webkit.org>
bdash [Thu, 15 Feb 2007 05:51:11 +0000 (05:51 +0000)]
2007-02-14  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Sam Weinig!

        - fix http://bugs.webkit.org/show_bug.cgi?id=12773
          REGRESSION (r19490): Crash on ipx-server.de

        * manual-tests/background-image-change-in-page-cache.html: Added.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::imageChanged): Bail out if the object is not in a view,
        which can happen if the document is in the page cache and the same cached
        image used for its background is also being used in another document that
        is currently in view.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19637 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
aroben [Thu, 15 Feb 2007 03:17:54 +0000 (03:17 +0000)]
LayoutTests:

        Reviewed by Darin.

        Test for http://bugs.webkit.org/show_bug.cgi?id=12517
        <rdar://problem/4971227> REGRESSION: Tab order incorrect when input
        inside frame/iframe gets initial focus (12517)

        * fast/events/frame-programmatic-focus-expected.txt: Added.
        * fast/events/frame-programmatic-focus.html: Added.
        * fast/forms/focus2-expected.txt: Updated results to now-correct
        behavior.

WebCore:

        Reviewed by Darin.

        Fix http://bugs.webkit.org/show_bug.cgi?id=12517
        <rdar://problem/4971227> REGRESSION: Tab order incorrect when input
        inside frame/iframe gets initial focus (12517)

        Test: fast/events/frame-programmatic-focus.html

        * dom/Element.cpp:
        (WebCore::Element::focus): Call FocusController::setFocusedNode to set
        the focus for the whole page.
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::focus): Ditto.
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::focus): Ditto.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleTextInputEvent): Send the textInput
        event to the same target that was sent the keypress event before it.
        * page/FocusController.cpp:
        (WebCore::FocusController::advanceFocus): Added a FIXME.
        (WebCore::FocusController::setFocusedNode): Added. Sets the focused
        node for a whole page.
        * page/FocusController.h: Added declaration.
        * platform/cf/RetainPtr.h: Removed unused pointer_cast functions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19636 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
justing [Thu, 15 Feb 2007 01:15:11 +0000 (01:15 +0000)]
LayoutTests:

        Reviewed by adele

        <rdar://problem/4976800>
        Outdent combines 2 separate strings on 2 different lines

        * editing/execCommand/4976800-expected.txt: Added.
        * editing/execCommand/4976800.html: Added.

WebCore:

        Reviewed by adele

        <rdar://problem/4976800>
        Outdent combines 2 separate strings on 2 different lines

        * editing/IndentOutdentCommand.cpp:
        (WebCore::IndentOutdentCommand::outdentParagraph): Add line breaks
        if removing the indented node causes content before or after it to
        collapse into the same paragraph as its content.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19635 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by adele
justing [Thu, 15 Feb 2007 01:11:02 +0000 (01:11 +0000)]
    Reviewed by adele

        <rdar://problem/4960120>
        REGRESSION: First Enter key ignored on initial focus of textarea after page load (11967)

        We'd insert a newline, but into an empty div.  We need two newlines
        in that case.

        * editing/InsertLineBreakCommand.cpp:
        (WebCore::lineBreakExistsAtPosition): Returns true if there is a
        br or a '\n' in text that preserves newlines at the incoming position.
        (WebCore::InsertLineBreakCommand::doApply): Fixed to handle the empty
        block case, the anonymous block case.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19634 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoLayoutTests:
darin [Thu, 15 Feb 2007 00:35:33 +0000 (00:35 +0000)]
LayoutTests:

        Reviewed by Hyatt.

        - test for http://bugs.webkit.org/show_bug.cgi?id=12417
          <rdar://problem/4990046> REGRESSION: pressing "Return" in a <select>
          box does not submit the form (12697)

        * fast/forms/select-enter-key-expected.txt: Added.
        * fast/forms/select-enter-key.html: Added.

WebCore:

        Reviewed by Hyatt.

        - test or http://bugs.webkit.org/show_bug.cgi?id=12417
          <rdar://problem/4990046> REGRESSION: pressing "Return" in a <select>
          box does not submit the form (12697)

        Test: fast/forms/select-enter-key.html

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
        Add code to submit when someone hits the Enter key.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19633 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin.
andersca [Wed, 14 Feb 2007 23:50:27 +0000 (23:50 +0000)]
    Reviewed by Darin.

        <rdar://problem/4960112>
        http://bugs.webkit.org/show_bug.cgi?id=12417
        REGRESSION: "Are you sure you want to send a form again?" sheet is displayed twice (validator.w3.org)

        The problem was that doing a reload would cause the "Cache-Control" HTTP header to be set on the request _after_ the first
        navigation policy delegate callback was called. This would break the request equality check that's used to prevent multiple policy
        delegate callbacks from getting called for the same request. The solution is to set the header as early as possible.

        This patch also fixes some bugs in the ResourceRequest equality operator.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::reload):
        Set the "Cache-Control" header field on the request here.

        * platform/network/FormData.h:
        (WebCore::operator==):
        Short-circuit if the pointers are the same.

        * platform/network/ResourceRequest.cpp:
        (WebCore::operator==):
        Check the equality of the objects, not the pointers.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19632 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Reviewed by Darin.
andersca [Wed, 14 Feb 2007 23:42:44 +0000 (23:42 +0000)]
    Reviewed by Darin.

        Add new canCompareWithMemcmp vector trait and use it to determine whether
        operator== can use memcmp.

        * wtf/Vector.h:
        (WTF::):
        (WTF::VectorTypeOperations::compare):
        (WTF::operator==):
        * wtf/VectorTraits.h:
        (WTF::):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19631 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Move setPlatformData out of FontFallbackListMac.mm and delete the file. ...
hyatt [Wed, 14 Feb 2007 23:31:30 +0000 (23:31 +0000)]
    Move setPlatformData out of FontFallbackListMac.mm and delete the file.  The function was completely
        cross-platform already.

        Reviewed by Ada

        * WebCore.xcodeproj/project.pbxproj:
        * platform/FontFallbackList.cpp:
        (WebCore::FontFallbackList::setPlatformFont):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19630 268f45cc-cd09-0410-ab3c-d52691b4dbfc