1. 23 Jul, 2009 1 commit
    • treat@webkit.org's avatar
      WebCore: · bc00ddcf
      treat@webkit.org authored
      2009-07-22  Viet-Trung Luu  <viettrungluu@gmail.com>
      
              Reviewed by David Hyatt.
      
              https://bugs.webkit.org/show_bug.cgi?id=27289
              When a mouse click occurs on a scrollbar without a preceding mouse move
              onto it, the release isn't handled correctly (since
              EventHandler::m_lastScrollbarUnderMouse isn't set on mouse down, but
              only on mouse move). (Side comment: That scrollbar-handling code
              in EventHandler is ugly. It should be fixed properly.)
      
              Tests: scrollbars/scrollbar-miss-mousemove.html
                     scrollbars/scrollbar-miss-mousemove-disabled.html
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::EventHandler::handleMouseMoveEvent):
              (WebCore::EventHandler::updateLastScrollbarUnderMouse):
              * page/EventHandler.h:
      
      LayoutTests:
      2009-07-22  Viet-Trung Luu  <viettrungluu@gmail.com>
      
              Reviewed by David Hyatt.
      
              https://bugs.webkit.org/show_bug.cgi?id=27289
              Tests that mouse clicks/releases are handled properly on scrollbars
              even when there is no mouse move onto the scrollbar (two cases: enabled
              and disabled controls).
      
              * scrollbars/scrollbar-miss-mousemove-disabled-expected.txt: Added.
              * scrollbars/scrollbar-miss-mousemove-disabled.html: Added.
              * scrollbars/scrollbar-miss-mousemove-expected.txt: Added.
              * scrollbars/scrollbar-miss-mousemove.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc00ddcf
  2. 14 Jul, 2009 1 commit
    • bfulgham@webkit.org's avatar
      JavaScriptCore: · 8a8a2f45
      bfulgham@webkit.org authored
      2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
      
              Reviewed by Darin Adler.
      
              Change all Noncopyable inheriting visibility to public.
              https://bugs.webkit.org/show_bug.cgi?id=27225
      
              Change all Noncopyable inheriting visibility to public because
              it is needed to the custom allocation framework (bug #20422).
      
              * bytecode/SamplingTool.h:
              * bytecompiler/RegisterID.h:
              * interpreter/CachedCall.h:
              * interpreter/RegisterFile.h:
              * parser/Lexer.h:
              * parser/Parser.h:
              * runtime/ArgList.h:
              * runtime/BatchedTransitionOptimizer.h:
              * runtime/Collector.h:
              * runtime/CommonIdentifiers.h:
              * runtime/JSCell.h:
              * runtime/JSGlobalObject.h:
              * runtime/JSLock.h:
              * runtime/JSONObject.cpp:
              * runtime/SmallStrings.cpp:
              * runtime/SmallStrings.h:
              * wtf/CrossThreadRefCounted.h:
              * wtf/GOwnPtr.h:
              * wtf/Locker.h:
              * wtf/MessageQueue.h:
              * wtf/OwnArrayPtr.h:
              * wtf/OwnFastMallocPtr.h:
              * wtf/OwnPtr.h:
              * wtf/RefCounted.h:
              * wtf/ThreadSpecific.h:
              * wtf/Threading.h:
              * wtf/Vector.h:
              * wtf/unicode/Collator.h:
      
      WebCore:
      
      2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
      
              Reviewed by Darin Adler.
      
              Change all Noncopyable inheriting visibility to public.
              https://bugs.webkit.org/show_bug.cgi?id=27225
      
              Change all Noncopyable inheriting visibility to public because
              it is needed to the custom allocation framework (bug #20422).
      
              * bindings/js/GCController.h:
              * bindings/js/WorkerScriptController.h:
              * bindings/v8/V8DOMMap.cpp:
              (WebCore::):
              * bridge/runtime.h:
              * css/CSSSelector.h:
              * css/CSSSelectorList.h:
              * css/CSSStyleSelector.h:
              * dom/ClassNames.h:
              * dom/MessagePortChannel.h:
              * dom/XMLTokenizerLibxml2.cpp:
              * dom/XMLTokenizerScope.h:
              * editing/ReplaceSelectionCommand.cpp:
              * editing/SelectionController.h:
              * editing/TextIterator.cpp:
              * history/PageCache.h:
              * html/CanvasRenderingContext2D.h:
              * html/HTMLParser.h:
              * html/HTMLParserQuirks.h:
              * html/PreloadScanner.h:
              * loader/Cache.h:
              * loader/CrossOriginPreflightResultCache.h:
              * loader/FrameLoader.h:
              * loader/ProgressTracker.h:
              * loader/ThreadableLoader.h:
              * loader/appcache/ApplicationCacheGroup.h:
              * loader/archive/ArchiveResourceCollection.h:
              * loader/icon/IconDatabase.h:
              * loader/icon/IconLoader.h:
              * loader/icon/PageURLRecord.h:
              * loader/loader.h:
              * page/ContextMenuController.h:
              * page/EventHandler.h:
              * page/FrameTree.h:
              * page/Page.h:
              * page/PageGroup.h:
              * page/PageGroupLoadDeferrer.h:
              * page/mac/EventHandlerMac.mm:
              * platform/AutodrainedPool.h:
              * platform/ContextMenu.h:
              * platform/EventLoop.h:
              * platform/HostWindow.h:
              * platform/Pasteboard.h:
              * platform/PurgeableBuffer.h:
              * platform/RunLoopTimer.h:
              * platform/ThreadGlobalData.h:
              * platform/ThreadTimers.h:
              * platform/Timer.h:
              * platform/TreeShared.h:
              * platform/graphics/FontData.h:
              * platform/graphics/GlyphWidthMap.h:
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/ImageBuffer.h:
              * platform/graphics/ImageSource.h:
              * platform/graphics/MediaPlayer.h:
              * platform/graphics/skia/GraphicsContextPlatformPrivate.h:
              * platform/graphics/skia/PlatformContextSkia.h:
              * platform/graphics/win/QTMovieWin.cpp:
              * platform/mac/LocalCurrentGraphicsContext.h:
              * platform/network/FormDataBuilder.h:
              * platform/network/ResourceHandleInternal.h:
              * platform/network/soup/ResourceHandleSoup.cpp:
              * platform/text/StringBuffer.h:
              * platform/text/TextCodec.h:
              * platform/win/WindowMessageBroadcaster.h:
              * rendering/CounterNode.h:
              * rendering/LayoutState.h:
              * rendering/RenderFrameSet.h:
              * rendering/RenderView.h:
              * rendering/TransformState.h:
              * svg/SVGAnimatedProperty.h:
              * svg/SynchronizableTypeWrapper.h:
              * workers/WorkerMessagingProxy.h:
              * workers/WorkerRunLoop.cpp:
              * xml/XPathExpressionNode.h:
              * xml/XPathParser.h:
              * xml/XPathPredicate.h:
              * xml/XPathStep.h:
      
      WebKit/gtk:
      
      2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
      
              Reviewed by Darin Adler.
      
              Change all Noncopyable inheriting visibility to public.
              https://bugs.webkit.org/show_bug.cgi?id=27225
      
              Change all Noncopyable inheriting visibility to public because
              it is needed to the custom allocation framework (bug #20422).
      
              * webkit/webkitdownload.cpp:
      
      WebKit/win:
      
      2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
      
              Reviewed by Darin Adler.
      
              Change all Noncopyable inheriting visibility to public.
              https://bugs.webkit.org/show_bug.cgi?id=27225
      
              Change all Noncopyable inheriting visibility to public because
              it is needed to the custom allocation framework (bug #20422).
      
              * COMEnumVariant.h:
              * WebDatabaseManager.cpp:
              * WebInspector.h:
              * WebLocalizableStrings.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a8a2f45
  3. 06 Jul, 2009 1 commit
    • andersca@apple.com's avatar
      WebCore: · e460e1ac
      andersca@apple.com authored
      2009-07-06  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Adele Peterson.
      
              Add the ability for wheel events to latch to a node.
              
              * WebCore.base.exp:
              * page/EventHandler.cpp:
              (WebCore::EventHandler::EventHandler):
              (WebCore::EventHandler::clear):
              (WebCore::EventHandler::handleWheelEvent):
              * page/EventHandler.h:
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::wheelEvent):
              * platform/mac/WebCoreSystemInterface.h:
              * platform/mac/WebCoreSystemInterface.mm:
      
      WebKit/mac:
      
      2009-07-06  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Adele Peterson.
      
              Initialize wkIsLatchingWheelEvent.
              
              * WebCoreSupport/WebSystemInterface.m:
              (InitWebCoreSystemInterface):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e460e1ac
  4. 26 Jun, 2009 2 commits
    • bweinstein@apple.com's avatar
      2009-06-26 Brian Weinstein <bweinstein@apple.com> · c06336f8
      bweinstein@apple.com authored
              Reviewed by Simon Fraser.
              
              Changed call of scrollbarUnderMouse to scrollbarUnderPoint to match new API.
      
              * Api/qwebpage.cpp:
              (QWebPage::swallowContextMenuEvent):
      
      2009-06-26  Brian Weinstein  <bweinstein@apple.com>
      
              Reviewed by Simon Fraser.
      
              https://bugs.webkit.org/show_bug.cgi?id=26695
      
              Added hit testing on scrollbars, so if you start a gesture over a scrollbar,
              it isn't counted, and lets the user drag the scrollbar itself instead of a
              panning gesture. Also cleaned up code in gesture.
      
              * WebView.cpp:
              (WebView::gestureNotify):
              (WebView::gesture):
      
      
      2009-06-26  Brian Weinstein  <bweinstein@apple.com>
      
              Reviewed by Simon Fraser.
      
              https://bugs.webkit.org/show_bug.cgi?id=26695
              
              Added the ability to do scrollbar hit testing in EventHandler, changed the
              signature of a PlatformWheelEvent constructor, and changed scrollbarUnderMouse
              to scrollbarUnderPoint, and updated all calls to that function.        
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::hitTestResultAtPoint):
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::EventHandler::handleMouseMoveEvent):
              * page/EventHandler.h:
              (WebCore::):
              * platform/PlatformWheelEvent.h:
              * platform/ScrollView.cpp:
              (WebCore::ScrollView::scrollbarUnderPoint):
              * platform/ScrollView.h:
              * platform/chromium/PopupMenuChromium.cpp:
              (WebCore::PopupListBox::handleMouseDownEvent):
              (WebCore::PopupListBox::handleMouseMoveEvent):
              * platform/win/WheelEventWin.cpp:
              (WebCore::PlatformWheelEvent::PlatformWheelEvent):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c06336f8
    • eric@webkit.org's avatar
      2009-06-26 Yongjun Zhang <yongjun.zhang@nokia.com> · cf9680e8
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              Bug 20303: [Qt] Key events are not working in frames.
      
              Add a layout test to test the event is sent to the right sub-frame.
      
              * platform/qt/fast/events/event-sender-keydown-frame-expected.txt: Added.
              * platform/qt/fast/events/event-sender-keydown-frame.html: Added.
      
      2009-06-26  Yongjun Zhang  <yongjun.zhang@nokia.com>
      
              Reviewed by Eric Seidel.
      
              Test: platform/qt/fast/events/event-sender-keydown-frame.html
      
              Bug 20303: [Qt] Key events are not working in frames.
      
              Merge scrolling handling code in qt and win port, move it to
              EventHandler.
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::scrollRecursively):
              * page/EventHandler.h:
      
      2009-06-26  Yongjun Zhang  <yongjun.zhang@nokia.com>
      
              Reviewed by Eric Seidel.
      
              Bug 20303: [Qt] Key events are not working in frames.
      
              Send scrolling events to current focused frame, bubble the event
              up to parent frame if it is not handled.  Use EventHandler's new
              shared scrolling code.
      
              * Api/qwebpage.cpp:
              (QWebPagePrivate::keyPressEvent):
              (QWebPagePrivate::handleScrolling):
              * Api/qwebpage_p.h:
      
      2009-06-26  Yongjun Zhang  <yongjun.zhang@nokia.com>
      
              Reviewed by Eric Seidel.
      
              Bug 20303: [Qt] Key events are not working in frames.
      
              Move the scroll handling code to EventHandler so that other
              ports can share the functionality.
      
              * WebView.cpp:
              (WebView::keyDown):
              (EnumTextMatches::QueryInterface):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf9680e8
  5. 02 Jun, 2009 1 commit
    • darin@apple.com's avatar
      WebCore: · bd433bc4
      darin@apple.com authored
      2009-06-02  Darin Adler  <darin@apple.com>
      
              Reviewed by David Hyatt.
      
              Bug 26112: viewless WebKit -- make events work
              https://bugs.webkit.org/show_bug.cgi?id=26112
      
              The main fix here is to make mouse and wheel event coordinates in the coordinate
              system of the top level NSView rather than the NSWindow when in the viewless mode.
              This is the design Hyatt chose, but the event part of it wasn't done yet.
      
              Also fix FrameView to do normal reference counting instead of a strange model with
              an explicit deref near creation time.
      
              * WebCore.base.exp: Updated.
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::eventLoopHandleMouseUp): Moved this function into the file
              to reduce conditionals in the header.
              (WebCore::EventHandler::eventLoopHandleMouseDragged): Ditto.
      
              * page/EventHandler.h: Reduced includes. Fixed formatting of Objective-C types.
              Made currentNSEvent a static member function. Added sendContextMenuEvent and
              eventMayStartDrag functions that takes NSEvent * so the conversion to PlatformMouseEvent
              can be done here rather than in WebKit. Reduced #if by making eventLoopHandleMouseUp and
              eventLoopHandleMouseDragged unconditional.
      
              * page/Frame.cpp:
              (WebCore::Frame::setView): Made this take a PassRefPtr since it takes ownership.
              (WebCore::Frame::createView): Changed to use RefPtr and FrameView::create and remove
              the explicit deref.
      
              * page/Frame.h: Changed setView to take a PassRefPtr.
      
              * page/FrameTree.cpp: Added newly-needed include.
      
              * page/FrameView.cpp:
              (WebCore::FrameView::FrameView): Got rid of one of the two constructors, and removed
              the initialization of m_refCount and call to show from the reamining one.
              (WebCore::FrameView::create): Added two create functions that do what the two
              constructors did before, except that they return a PassRefPtr to make sure the
              reference counting is handled correctly.
              (WebCore::FrameView::~FrameView): Removed assertion from when FrameView implemented
              its own reference counting.
      
              * page/FrameView.h: Inherit from RefCounted for reference counting. Made the
              constructor private and added create functions. Got rid of the hand-implemented
              reference counting in this class.
      
              * page/mac/EventHandlerMac.mm:
              (WebCore::currentNSEventSlot): Renamed currentEvent to currentNSEventSlot to
              make it more clear how it relates to currentNSEvent.
              (WebCore::EventHandler::currentNSEvent): Updated.
              (WebCore::CurrentEventScope::CurrentEventScope): Added. Use to set/reset the
              current event in a foolproof way.
              (WebCore::CurrentEventScope::~CurrentEventScope): Ditto.
              (WebCore::EventHandler::wheelEvent): Use CurrentEventScope. Pass the platform
              window in when constructing the PlatformWheelEvent.
              (WebCore::EventHandler::keyEvent): Use CurrentEventScope.
              (WebCore::lastEventIsMouseUp): Use currentNSEvent.
              (WebCore::EventHandler::passMouseDownEventToWidget): Ditto.
              (WebCore::EventHandler::eventLoopHandleMouseDragged): Ditto.
              (WebCore::EventHandler::eventLoopHandleMouseUp): Ditto.
              (WebCore::EventHandler::passSubframeEventToSubframe): Use
              currentPlatformMouseEvent to get a mouse event that has the appropriate
              platform window passed to create it.
              (WebCore::EventHandler::passWheelEventToWidget): Ditto.
              (WebCore::EventHandler::mouseDown): Ditto.
              (WebCore::EventHandler::mouseDragged): Ditto.
              (WebCore::EventHandler::mouseUp): Ditto.
              (WebCore::EventHandler::mouseMoved): Ditto.
              (WebCore::EventHandler::currentPlatformMouseEvent): Added. Passes the
              platform window that's now needed to create a PlatformMouseEvent.
              (WebCore::EventHandler::sendContextMenuEvent): Added.
              (WebCore::EventHandler::eventMayStartDrag): Added.
      
              * platform/HostWindow.h: Removed unneeded includes and constructor definition.
      
              * platform/PlatformMouseEvent.h: Sorted things in alphabetical order.
              Changed Mac constructor to take a windowView as well as the event. This is
              needed in viewless mode, since the "window" is actually an NSView, so the
              event has to know which view to compute the coordinates with. Made the
              same change to pointForEvent.
              * platform/PlatformWheelEvent.h: Ditto.
      
              * platform/mac/PlatformMouseEventMac.mm:
              (WebCore::pointForEvent): Convert point from window coordinates to view
              coordinates if a windowView is passed in. This is used in viewless mode.
              (WebCore::PlatformMouseEvent::PlatformMouseEvent): Ditto.
              * platform/mac/WheelEventMac.mm:
              (WebCore::PlatformWheelEvent::PlatformWheelEvent): Ditto.
      
              * platform/mac/WidgetMac.mm:
              (WebCore::Widget::convertFromContainingWindow): Fixed case where there
              is no platform widget and no parent. Before it would yield unpredictable
              results because of dispatching to a nil object and returning a structure.
              Now it returns the point without changing coordinates at all, which is what
              we need for this case in viewless mode.
      
              * rendering/RenderApplet.cpp: Removed unneeded includes.
              (WebCore::RenderApplet::intrinsicSize): Use widget function.
              (WebCore::RenderApplet::createWidgetIfNecessary): Ditto.
      
              * rendering/RenderApplet.h: Make more things private. Get rid of unneeded
              explicit destructor.
      
              * rendering/RenderFrame.cpp: Removed unneeded includes.
              (WebCore::RenderFrame::edgeInfo): Updated to use node function so header
              doesn't have to define element function.
              (WebCore::RenderFrame::viewCleared): Ditto. Also changed to use widget
              function.
      
              * rendering/RenderFrame.h: Removed unneeded includes. Made some things
              private. Got rid of element function.
      
              * rendering/RenderPart.cpp: Removed unneeded includes.
              (WebCore::RenderPart::~RenderPart): Changed to use clearWidget function.
              (WebCore::RenderPart::setWidget): Changed to use widget function.
              (WebCore::RenderPart::deleteWidget): Changed to use passed-in widget.
              This is now only called by the clearWidget function.
      
              * rendering/RenderPart.h: Removed unneeded forward declarations.
              Made more functions private. Updated deleteWidget to take widget argument.
      
              * rendering/RenderPartObject.cpp:
              (WebCore::RenderPartObject::~RenderPartObject): use frameView function
              instead of getting at m_view directly.
              (WebCore::RenderPartObject::updateWidget): Ditto.
              (WebCore::RenderPartObject::layout): Ditto. Same for widget and m_widget.
              (WebCore::RenderPartObject::viewCleared): Ditto.
      
              * rendering/RenderPartObject.h: Made some functions private.
      
              * rendering/RenderWidget.cpp:
              (WebCore::RenderWidget::RenderWidget): Initialize m_frameView with
              construction syntax instead of assignment.
              (WebCore::RenderWidget::destroy): Updated for name change of m_view
              to m_frameView.
              (WebCore::RenderWidget::~RenderWidget): Use clearWidget to delete
              the widget.
              (WebCore::RenderWidget::setWidget): Use clearWidget.
              (WebCore::RenderWidget::paint): Updated for name change of m_view
              to m_frameView.
              (WebCore::RenderWidget::deleteWidget): Changed to use passed-in widget.
      
              * rendering/RenderWidget.h: Made many functions protected, others
              private and made all data members private.
      
              * svg/animation/SMILTime.h: Removed unhelpful max and min functions. These
              just do what std::max and std::min will already do automatically for this
              type, so they are not helpful.
      
              * svg/graphics/SVGImage.cpp:
              (WebCore::SVGImage::SVGImage): Removed unneeded initial values for types
              that initialize to zero without anything explicit.
              (WebCore::SVGImage::~SVGImage): Update since m_frame and m_frameView are
              no longer stored.
              (WebCore::SVGImage::setContainerSize): Ditto.
              (WebCore::SVGImage::usesContainerSize): Ditto.
              (WebCore::SVGImage::size): Ditto.
              (WebCore::SVGImage::hasRelativeWidth): Ditto.
              (WebCore::SVGImage::hasRelativeHeight): Ditto.
              (WebCore::SVGImage::draw): Ditto.
              (WebCore::SVGImage::nativeImageForCurrentFrame): Ditto.
              (WebCore::SVGImage::dataChanged): Ditto.
      
              * svg/graphics/SVGImage.h: Removed unneeded includes and unneeded data
              members m_document, m_frame, m_frameView, and m_minSize.
      
      WebKit/mac:
      
      2009-06-02  Darin Adler  <darin@apple.com>
      
              Reviewed by David Hyatt.
      
              Bug 26112: viewless WebKit -- make events work
              https://bugs.webkit.org/show_bug.cgi?id=26112
      
              One change here is to make the -[WebFrame frameView] function assert if ever called
              in viewless mode, and fix many callers that would trip that assertion.
      
              A major change is to put some methods and data in WebView that are currently in
              WebHTMLView, used only in viewless mode. A next step will be to use the WebView
              methods whenever possible, even when not in the viewless mode.
      
              Also fix FrameView to do normal reference counting instead of a strange model with
              an explicit deref near creation time.
      
              * WebCoreSupport/WebChromeClient.mm:
              (WebChromeClient::scrollRectIntoView): Add code to start in the appropriate place
              when dealing with viewless mode. This gets triggered when visiting the Google home page.
              (WebChromeClient::setToolTip): Changed to call WebView instead of WebHTMLView.
              (WebChromeClient::print): Changed to use a new selector that doesn't require a
              WebFrameView if present. Also don't even try to use the old selector in viewless mode.
      
              * WebCoreSupport/WebEditorClient.mm:
              (WebEditorClient::respondToChangedSelection): Changed to call WebView instead of WebHTMLView.
      
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::transitionToCommittedForNewPage): Added more code paths for
              viewless mode to skip things we can't do in that mode, with appropriate FIXME.
              Use Frame::create and RefPtr and eliminate the strange reference counting of FrameView.
      
              * WebView/WebDataSource.mm:
              (-[WebDataSource _receivedData:]): Added a _usesDocumentViews guard around code that's
              specific to document views.
      
              * WebView/WebFrame.mm:
              (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): Added a _usesDocumentViews
              guard around code that's specific to document views.
              (-[WebFrame _hasSelection]): Added an implementation for viewless mode.
              (-[WebFrame _clearSelection]): Assert we're not in viewless mode; it doesn't really
              make sense to clear the selection in only one frame in viewless mode. Later we can
              decide what to do.
              (-[WebFrame _dragSourceMovedTo:]): Assert we're not in viewless mode; the dragging
              code for viewless mode shouldn't have to involve the WebFrame object at all.
              (-[WebFrame _dragSourceEndedAt:operation:]): Ditto.
              (-[WebFrame frameView]): Assert we're not in viewless mode. This assertion fires
              often, but it's a great pointer to code that needs to be changed.
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView hitTest:]): Tweaked a comment.
              (-[WebHTMLView _updateMouseoverWithEvent:]): Fixed a bug where the fake event for
              moving the mouse out of the old view ended up overwriting the event for moving
              the mouse within the new view.
              (-[WebHTMLView mouseDown:]): Got rid of explicit conversion of event to
              PlatformMouseEvent in call to sendContextMenuEvent; that's no longer possible
              without passing another argument, and it's now handled in EventHandler.
      
              * WebView/WebTextCompletionController.h: Copied from WebKit/mac/WebView/WebHTMLView.mm.
              Removed everything except for the WebTextCompletionController class.
              * WebView/WebTextCompletionController.mm: Copied from WebKit/mac/WebView/WebHTMLView.mm.
              Ditto.
      
              * WebView/WebUIDelegatePrivate.h: Added webView:printFrame: method.
      
              * WebView/WebView.mm: Moved includes and fields in from WebHTMLView.
              (-[WebView _usesDocumentViews]): Updated for name change from useDocumentViews
              to usesDocumentViews.
              (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Ditto.
              (-[WebView drawSingleRect:]): Ditto.
              (-[WebView isFlipped]): Ditto.
              (-[WebView setFrameSize:]): Ditto. Also changed to use _mainCoreFrame method.
              (-[WebView _viewWillDrawInternal]): Ditto.
              (-[WebView viewWillDraw]): Ditto.
              (-[WebView drawRect:]): Ditto.
              (-[WebView _close]): Added code to nil out the lastMouseoverView global.
              (-[WebView _dashboardRegions]): Use _mainCoreFrame.
              (-[WebView setProhibitsMainFrameScrolling:]): Ditto.
              (-[WebView _setInViewSourceMode:]): Ditto.
              (-[WebView _inViewSourceMode]): Ditto.
              (-[WebView _attachScriptDebuggerToAllFrames]): Ditto.
              (-[WebView _detachScriptDebuggerFromAllFrames]): Ditto.
              (-[WebView textIteratorForRect:]): Ditto.
              (-[WebView _executeCoreCommandByName:value:]): Ditto.
              (-[WebView addWindowObserversForWindow:]): Ditto.
              (-[WebView removeWindowObservers]): Ditto.
              (-[WebView _updateFocusedAndActiveState]): Ditto.
              (-[WebView _updateFocusedAndActiveStateForFrame:]): Turned into a class method.
              Added code to handle the viewless case without calling frameView.
              (-[WebView _windowDidBecomeKey:]): Updated for name change from useDocumentViews
              to usesDocumentViews.
              (-[WebView _windowDidResignKey:]): Ditto.
              (-[WebView _windowWillOrderOnScreen:]): Ditto.
              (-[WebView mainFrame]): Tweaked.
              (-[WebView selectedFrame]): Added a conditional to avoid trying to get at the
              frame view in viewless case.
              (-[WebView _setZoomMultiplier:isTextOnly:]): Use _mainCoreFrame.
              (-[WebView setCustomTextEncodingName:]): Ditto.
              (-[WebView windowScriptObject]): Ditto.
              (-[WebView setHostWindow:]): Ditto. Also put some code that's needed only for
              document views inside _private->usesDocumentViews.
              (-[WebView _hitTest:dragTypes:]): Tweaked.
              (-[WebView acceptsFirstResponder]): Added case for viewless mode along with a
              FIXME, since it's not complete.
              (-[WebView becomeFirstResponder]): Ditto.
              (-[WebView _webcore_effectiveFirstResponder]): Put the body of this inside
              a usesDocumentView check, because we don't need the first responder forwarding
              in viewless mode.
              (-[WebView setNextKeyView:]): Ditto.
              (-[WebView mouseDown:]): Added. Copied from WebHTMLView. FIXME in here suggests
              that we make WebHTMLView share this one soon, which I think is practical.
              (-[WebView mouseUp:]): Ditto.
              (-[WebView setHoverFeedbackSuspended:]): Added a code path for viewless mode.
              (-[WebView shouldClose]): Use _mainCoreFrame.
              (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
              (-[WebView setEditable:]): Ditto.
              (-[WebView _frameViewAtWindowPoint:]): Added an assertion that we're not in
              viewless mode since this method makes no sense in that mode.
              (-[WebView _setMouseDownEvent:]): Added. Copied from WebHTMLView. I plan to
              eliminate the one in WebHTMLView soon.
              (-[WebView _cancelUpdateMouseoverTimer]): Ditto.
              (-[WebView _stopAutoscrollTimer]): Ditto.
              (+[WebView _updateMouseoverWithEvent:]): Ditto.
              (-[WebView _updateMouseoverWithFakeEvent]): Ditto.
              (-[WebView _setToolTip:]): Added. Calls through to the WebHTMLView version.
              (-[WebView _selectionChanged]): Ditto.
              (-[WebView _mainCoreFrame]): Added.
              (-[WebView _needsOneShotDrawingSynchronization]): Moved into the WebInternal
              category.
              (-[WebView _setNeedsOneShotDrawingSynchronization:]): Ditto.
              (-[WebView _startedAcceleratedCompositingForFrame:]): Ditto.
              (-[WebView _stoppedAcceleratedCompositingForFrame:]): Ditto.
              (viewUpdateRunLoopObserverCallBack): Ditto.
              (-[WebView _scheduleViewUpdate]): Ditto.
      
              * WebView/WebViewInternal.h: Made most of the file not compile at all when
              included from non-C++ source files, elminating some excess declarations and
              typedefs. Moved more methods into the real internal category. Added new
              methods _setMouseDownEvent, _cancelUpdateMouseoverTimer, _stopAutoscrollTimer,
              _updateMouseoverWithFakeEvent, _selectionChanged, and _setToolTip:.
      
      WebKit/wx:
      
      2009-06-02  Darin Adler  <darin@apple.com>
      
              Reviewed by David Hyatt.
      
              * WebKitSupport/FrameLoaderClientWx.cpp:
              (WebCore::FrameLoaderClientWx::transitionToCommittedForNewPage): Use FrameView::create
              and RefPtr instead of the old "crazy" reference counting.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd433bc4
  6. 21 Apr, 2009 1 commit
    • timothy@apple.com's avatar
      Change pending unload and beforeunload counts to store the listeners in a... · c9fbbab7
      timothy@apple.com authored
      Change pending unload and beforeunload counts to store the listeners in a single data structure that can be quickly iterated for dispatch.
      
      WebCore:
      
      2009-04-17  Timothy Hatcher  <timothy@apple.com>
      
              Change pending unload and beforeunload counts to store the listeners
              in a single data structure that can be quickly iterated for dispatch.
      
              <rdar://problem/6383352&6383379&6383940>
      
              Reviewed by Darin Adler.
      
              * WebCore.base.exp: Change what symbols are exported.
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::stopLoading): Remove count updating code
              and move an if inside a block already checking m_frame->document().
              * page/Chrome.cpp: Remove disableSuddenTermination/enableSuddenTermination.
              * page/Chrome.h: Ditto.
              * page/ChromeClient.h: Ditto.
              * page/DOMWindow.cpp:
              (WebCore::pendingUnloadEventListenerMap): Create a static map.
              (WebCore::pendingBeforeUnloadEventListenerMap): Ditto.
              (WebCore::addPendingEventListener): Add the event listener to the map.
              (WebCore::removePendingEventListener): Remove the event listener from the map.
              (WebCore::removePendingEventListeners): Remove all listeners for the window.
              (WebCore::dispatchWindowEventToListeners): Dispatch the event to the given listeners.
              (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): Send the beforeunload event.
              (WebCore::DOMWindow::pendingUnloadEventListeners): Return a count of pending listeners.
              (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Send the unload event.
              (WebCore::DOMWindow::~DOMWindow): Remove the window from both event listener maps.
              (WebCore::DOMWindow::addEventListener): Call addPendingEventListener when needed.
              (WebCore::DOMWindow::removeEventListener): Call removePendingEventListener when needed.
              (WebCore::DOMWindow::removeAllEventListeners): Call removePendingEventListeners.
              (WebCore::DOMWindow::removeInlineEventListenerForType): Call removePendingEventListener when needed.
              * page/DOMWindow.h:
              (WebCore::DOMWindow::frame): Changed to be const.
              * page/EventHandler.cpp:
              (WebCore::EventHandler::EventHandler): Remove count tracking code.
              * page/EventHandler.h: Ditto.
              * page/Page.cpp:
              (WebCore::Page::Page): Ditto.
              * page/Page.h: Ditto.
      
      WebKit/mac:
      
      2009-04-17  Timothy Hatcher  <timothy@apple.com>
      
              Change how sudden termination works with WebView teardown.
      
              <rdar://problem/6383352&6383379&6383940>
      
              Reviewed by Darin Adler.
      
              * WebCoreSupport/WebChromeClient.h: Remove disableSuddenTermination/enableSuddenTermination.
              * WebCoreSupport/WebChromeClient.mm: Ditto.
              * WebView/WebFrame.mm:
              (-[WebFrame _pendingFrameUnloadEventCount]): Ask the DOMWindow.
              * WebView/WebView.mm:
              (+[WebView canCloseAllWebViews]): Call DOMWindow::dispatchAllPendingBeforeUnloadEvents.
              (+[WebView closeAllWebViews]): Call DOMWindow::dispatchAllPendingUnloadEvents and
              call close on all the WebViews.
              (-[WebView _closeWithFastTeardown]): Remove code for unload event dispatch.
              (-[WebView _close]): Correct a comment.
              (+[WebView _applicationWillTerminate]): Call closeAllWebViews.
              * WebView/WebViewPrivate.h: Add canCloseAllWebViews and closeAllWebViews.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9fbbab7
  7. 10 Feb, 2009 1 commit
  8. 07 Feb, 2009 1 commit
  9. 05 Feb, 2009 1 commit
    • weinig@apple.com's avatar
      WebCore: · 5bd5cc90
      weinig@apple.com authored
      2009-02-04  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Darin Adler.
      
              First stage of merging EventTargetNode up into Node. The intent of this change
              is to both simplify the inheritance hierarchy (at the same time making it more
              closely match the spec which states that all Nodes are EventTargets) and save
              4 bytes per Node that the polymorphic multiple-inheritance was costing us.
      
              This does the bare minimum to get things compiling, the next patch will clean 
      
              * DerivedSources.make:
              * WebCore.base.exp:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDocumentCustom.cpp:
              (WebCore::JSDocument::mark):
              * bindings/js/JSEventListener.cpp:
              (WebCore::JSLazyEventListener::parseCode):
              * bindings/js/JSEventTarget.cpp:
              (WebCore::toEventTarget):
              * bindings/js/JSEventTarget.h:
              * bindings/js/JSEventTargetNodeCustom.cpp:
              (WebCore::JSNode::addEventListener):
              (WebCore::JSNode::removeEventListener):
              (WebCore::JSNode::pushEventHandlerScope):
              * bindings/js/JSStyleSheetCustom.cpp:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bindings/scripts/CodeGeneratorObjC.pm:
              * dom/Attr.idl:
              * dom/CharacterData.h:
              * dom/CharacterData.idl:
              * dom/Document.idl:
              * dom/DocumentFragment.idl:
              * dom/Element.idl:
              * dom/EventTarget.cpp:
              (WebCore::EventTarget::toNode):
              * dom/EventTarget.h:
              * dom/EventTarget.idl:
              * dom/EventTargetNode.cpp:
              (WebCore::Node::scriptExecutionContext):
              (WebCore::Node::eventListeners):
              (WebCore::Node::insertedIntoDocument):
              (WebCore::Node::removedFromDocument):
              (WebCore::Node::willMoveToNewOwnerDocument):
              (WebCore::Node::didMoveToNewOwnerDocument):
              (WebCore::Node::addEventListener):
              (WebCore::Node::removeEventListener):
              (WebCore::Node::removeAllEventListenersSlowCase):
              (WebCore::Node::handleLocalEvents):
              (WebCore::Node::dispatchEvent):
              (WebCore::Node::dispatchGenericEvent):
              (WebCore::Node::dispatchSubtreeModifiedEvent):
              (WebCore::Node::dispatchWindowEvent):
              (WebCore::Node::dispatchUIEvent):
              (WebCore::Node::dispatchKeyEvent):
              (WebCore::Node::dispatchMouseEvent):
              (WebCore::Node::dispatchSimulatedMouseEvent):
              (WebCore::Node::dispatchSimulatedClick):
              (WebCore::Node::dispatchWheelEvent):
              (WebCore::Node::dispatchWebKitAnimationEvent):
              (WebCore::Node::dispatchWebKitTransitionEvent):
              (WebCore::Node::dispatchFocusEvent):
              (WebCore::Node::dispatchBlurEvent):
              (WebCore::Node::dispatchEventForType):
              (WebCore::Node::dispatchProgressEvent):
              (WebCore::Node::dispatchStorageEvent):
              (WebCore::Node::removeInlineEventListenerForType):
              (WebCore::Node::setInlineEventListenerForType):
              (WebCore::Node::setInlineEventListenerForTypeAndAttribute):
              (WebCore::Node::inlineEventListenerForType):
              (WebCore::Node::disabled):
              (WebCore::Node::defaultEventHandler):
              (WebCore::Node::onabort):
              (WebCore::Node::setOnabort):
              (WebCore::Node::onblur):
              (WebCore::Node::setOnblur):
              (WebCore::Node::onchange):
              (WebCore::Node::setOnchange):
              (WebCore::Node::onclick):
              (WebCore::Node::setOnclick):
              (WebCore::Node::oncontextmenu):
              (WebCore::Node::setOncontextmenu):
              (WebCore::Node::ondblclick):
              (WebCore::Node::setOndblclick):
              (WebCore::Node::onerror):
              (WebCore::Node::setOnerror):
              (WebCore::Node::onfocus):
              (WebCore::Node::setOnfocus):
              (WebCore::Node::oninput):
              (WebCore::Node::setOninput):
              (WebCore::Node::onkeydown):
              (WebCore::Node::setOnkeydown):
              (WebCore::Node::onkeypress):
              (WebCore::Node::setOnkeypress):
              (WebCore::Node::onkeyup):
              (WebCore::Node::setOnkeyup):
              (WebCore::Node::onload):
              (WebCore::Node::setOnload):
              (WebCore::Node::onmousedown):
              (WebCore::Node::setOnmousedown):
              (WebCore::Node::onmousemove):
              (WebCore::Node::setOnmousemove):
              (WebCore::Node::onmouseout):
              (WebCore::Node::setOnmouseout):
              (WebCore::Node::onmouseover):
              (WebCore::Node::setOnmouseover):
              (WebCore::Node::onmouseup):
              (WebCore::Node::setOnmouseup):
              (WebCore::Node::onmousewheel):
              (WebCore::Node::setOnmousewheel):
              (WebCore::Node::onbeforecut):
              (WebCore::Node::setOnbeforecut):
              (WebCore::Node::oncut):
              (WebCore::Node::setOncut):
              (WebCore::Node::onbeforecopy):
              (WebCore::Node::setOnbeforecopy):
              (WebCore::Node::oncopy):
              (WebCore::Node::setOncopy):
              (WebCore::Node::onbeforepaste):
              (WebCore::Node::setOnbeforepaste):
              (WebCore::Node::onpaste):
              (WebCore::Node::setOnpaste):
              (WebCore::Node::ondragenter):
              (WebCore::Node::setOndragenter):
              (WebCore::Node::ondragover):
              (WebCore::Node::setOndragover):
              (WebCore::Node::ondragleave):
              (WebCore::Node::setOndragleave):
              (WebCore::Node::ondrop):
              (WebCore::Node::setOndrop):
              (WebCore::Node::ondragstart):
              (WebCore::Node::setOndragstart):
              (WebCore::Node::ondrag):
              (WebCore::Node::setOndrag):
              (WebCore::Node::ondragend):
              (WebCore::Node::setOndragend):
              (WebCore::Node::onreset):
              (WebCore::Node::setOnreset):
              (WebCore::Node::onresize):
              (WebCore::Node::setOnresize):
              (WebCore::Node::onscroll):
              (WebCore::Node::setOnscroll):
              (WebCore::Node::onsearch):
              (WebCore::Node::setOnsearch):
              (WebCore::Node::onselect):
              (WebCore::Node::setOnselect):
              (WebCore::Node::onselectstart):
              (WebCore::Node::setOnselectstart):
              (WebCore::Node::onsubmit):
              (WebCore::Node::setOnsubmit):
              (WebCore::Node::onunload):
              (WebCore::Node::setOnunload):
              * dom/EventTargetNode.h:
              (WebCore::toEventTargetNode):
              (WebCore::EventTargetNodeCast):
              * dom/EventTargetNode.idl: Removed.
              * dom/MouseEvent.cpp:
              (WebCore::MouseEvent::MouseEvent):
              (WebCore::MouseEvent::initMouseEvent):
              (WebCore::MouseEvent::toElement):
              (WebCore::MouseEvent::fromElement):
              * dom/MouseEvent.h:
              (WebCore::MouseEvent::create):
              (WebCore::MouseEvent::relatedTarget):
              * dom/Node.cpp:
              (WebCore::Node::~Node):
              * dom/Node.h:
              (WebCore::Node::isEventTargetNode):
              (WebCore::Node::toNode):
              (WebCore::Node::removeAllEventListeners):
              (WebCore::Node::refEventTarget):
              (WebCore::Node::derefEventTarget):
              * dom/Node.idl:
              * page/EventHandler.h:
              * page/FrameView.h:
              * xml/XPathResult.h:
              (WebCore::XPathResult::create):
      
      LayoutTests:
      
      2009-02-05  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Darin Layer.
      
              Fix after merging EventTargetNode up into Node.
      
              * fast/dom/Window/window-properties-expected.txt:
              * fast/dom/prototype-chain-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5bd5cc90
  10. 02 Feb, 2009 2 commits
    • jhoneycutt@apple.com's avatar
      2009-02-26 Jon Honeycutt <jhoneycutt@apple.com> · 91516b4e
      jhoneycutt@apple.com authored
              Build fix after r40486.
      
              Rubber-stamped by Ada Chan.
      
              * dom/Document.h:
              * page/EventHandler.h:
              * rendering/EllipsisBox.h:
              * rendering/InlineBox.h:
              * rendering/InlineFlowBox.h:
              * rendering/RenderLayer.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      91516b4e
    • treat@webkit.org's avatar
      2009-02-02 Adam Treat <adam.treat@torchmobile.com> · 16eda3f3
      treat@webkit.org authored
              Reviewed by Nikolas Zimmermann.
      
              https://bugs.webkit.org/show_bug.cgi?id=23587
              Refactor HitTestRequest to eliminate all the ugly boolean arguments and
              use an enum bitflag instead.  Cleanup all the code that constructs the
              various HitTestRequests to make the code more readable.
      
              * dom/Document.cpp:
              (WebCore::Document::elementFromPoint):
              (WebCore::Document::prepareMouseEvent):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::contains):
              * page/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
              (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::eventMayStartDrag):
              (WebCore::EventHandler::updateSelectionForMouseDrag):
              (WebCore::EventHandler::hitTestResultAtPoint):
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::EventHandler::handleMouseDoubleClickEvent):
              (WebCore::EventHandler::handleMouseMoveEvent):
              (WebCore::EventHandler::handleMouseReleaseEvent):
              (WebCore::EventHandler::updateDragAndDrop):
              (WebCore::EventHandler::handleWheelEvent):
              (WebCore::EventHandler::sendContextMenuEvent):
              (WebCore::EventHandler::hoverTimerFired):
              (WebCore::EventHandler::handleDrag):
              * page/EventHandler.h:
              * rendering/HitTestRequest.h:
              (WebCore::HitTestRequest::):
              (WebCore::HitTestRequest::HitTestRequest):
              (WebCore::HitTestRequest::readOnly):
              (WebCore::HitTestRequest::active):
              (WebCore::HitTestRequest::mouseMove):
              (WebCore::HitTestRequest::mouseUp):
              (WebCore::HitTestRequest::ignoreClipping):
              * rendering/RenderFrameSet.cpp:
              (WebCore::RenderFrameSet::nodeAtPoint):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::hitTest):
              (WebCore::RenderLayer::hitTestLayer):
              (WebCore::RenderLayer::updateHoverActiveState):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      16eda3f3
  11. 30 Jan, 2009 1 commit
  12. 28 Jan, 2009 1 commit
  13. 26 Jan, 2009 2 commits
  14. 09 Jan, 2009 1 commit
    • darin@apple.com's avatar
      WebCore: · 2ca65e12
      darin@apple.com authored
      2009-01-09  Darin Adler  <darin@apple.com>
      
              Reviewed by Jon Honeycutt.
      
              Bug 22913: REGRESSION: Space bar doesn't scroll on windows
              https://bugs.webkit.org/show_bug.cgi?id=22913
              rdar://problem/6479834
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::defaultKeyboardEventHandler): Added code to call
              defaultSpaceEventHandler.
              (WebCore::EventHandler::defaultSpaceEventHandler): Added. Scrolls down or up based
              on the shift key.
              * page/EventHandler.h: Added defaultSpaceEventHandler.
      
              * platform/mac/ScrollViewMac.mm:
              (WebCore::ScrollView::platformScroll): Return false, because this function does
              not scroll. In an earlier version of this patch, I used this to prevent the
              patch from affecting the Mac, but I decided to use #if instead.
      
      WebKit/win:
      
      2009-01-09  Darin Adler  <darin@apple.com>
      
              Reviewed by Jon Honeycutt.
      
              Bug 22913: REGRESSION: Space bar doesn't scroll on windows
              https://bugs.webkit.org/show_bug.cgi?id=22913
              rdar://problem/6479834
      
              * WebView.cpp:
              (WebView::keyPress): Removed code to handle space bar here; put it in
              WebCore instead.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2ca65e12
  15. 16 Nov, 2008 1 commit
  16. 06 Nov, 2008 1 commit
    • ap@webkit.org's avatar
      Reviewed by Darin Adler. · d9634612
      ap@webkit.org authored
              https://bugs.webkit.org/show_bug.cgi?id=21107
              <rdar://problem/6264219> New access key combination conflicts with VoiceOver
      
              * page/EventHandler.h:
              * page/gtk/EventHandlerGtk.cpp:
              (WebCore::EventHandler::accessKeyModifiers):
              * page/qt/EventHandlerQt.cpp:
              (WebCore::EventHandler::accessKeyModifiers):
              * page/win/EventHandlerWin.cpp:
              (WebCore::EventHandler::accessKeyModifiers):
              * page/wx/EventHandlerWx.cpp:
              (WebCore::EventHandler::accessKeyModifiers):
              Access access key modifiers via a function, not a static variable.
      
              * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::accessKeyModifiers):
              Use Ctrl when VoiceOver is enabled, because a conflict with Emacs-style key bindings is
              less troublesome than one with VO keys.
      
              * page/EventHandler.cpp: (WebCore::EventHandler::handleAccessKey):
              Also fix an access key matching bug introduced in r32424 - Any superset of specified
              modifier set invoked access keys. We can use simple equality comparison instead because
              CapsLock is not part of modifiers(), so it doesn't need to be ignored explicitly.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9634612
  17. 08 Oct, 2008 1 commit
    • zimmermann@webkit.org's avatar
      Reviewed by Oliver Hunt & Sam Weining. · abd88452
      zimmermann@webkit.org authored
       Fixes: https://bugs.webkit.org/show_bug.cgi?id=15413 (SVGElementInstance does not implement EventTarget)
       Fixes: https://bugs.webkit.org/show_bug.cgi?id=15430 (SVGElementInstances should rebuild themselves lazily)
       Fixes: https://bugs.webkit.org/show_bug.cgi?id=20550 (SVGUseElement.setAttribute crashes Safari)
      
       Rebuild SVG use element shadow tree lazily. Mark SVGElementInstance with the "needsUpdate" flag.
       Next time SVGUseElement::recalcStyle is invoked (ie. via Document::updateDocumentsRendering()) the
       use tree is rebuild.
      
       Make SVGElementInstance a real EventTarget, as the SVG specification demands.
       When dispatching events to a shadow tree element of a use element, the associated SVGElementInstance
       is used as event target. The SVGElementInstance, the shadow tree element and the corresponding element
       share an event listener list. Every event listener change on the SVGElementInstance object is forwared
       to the corresponding element. Each change marks the SVGElementInstance tree dirty, and causes a reclone.
       Each event listener defined via attributes (onclick/onkeydown/...) is copied from the correspondingElement
       to the shadow tree element - through the cloneNode calls - if the use element's shadow tree gets rebuild.
       Each listener, dynamically created using addEventListener, gets copied to the corersponding element as well.
      
       Now that the target/currentTarget properties of the Events are correct, event bubbling works as expected,
       see resources/use-instanceRoot-event-bubbling.js for details.
      
       Tests: svg/custom/use-elementInstance-event-target.svg (reenabled)
              svg/custom/use-elementInstance-methods.svg (reenabled)
              svg/custom/use-setAttribute-crash.svg (covers bug 20550)
              svg/custom/use-instanceRoot-as-event-target.xhtml (covers bug 15413)
              svg/custom/use-instanceRoot-event-bubbling.xhtml (covers bug 15413)
              svg/custom/use-instanceRoot-event-listeners.xhtml (covers bug 15413 & 15430)
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      abd88452
  18. 13 Sep, 2008 1 commit
  19. 26 Aug, 2008 1 commit
    • britto@apple.com's avatar
      2008-08-26 Maxime Britto <britto@apple.com> · 616ef6d1
      britto@apple.com authored
              Reviewed by Adele.
      
              <rdar://6159244> Pan-scrolling does not work on particular sites (starmagazine.com, nytimes.com)
              This patch fixes the issues and modify the behavior of the panscroll by allowing it to jump to a parent layer when it reaches the end of its scrollable area.
              This is matching the behavior of the mouse wheel when trying to scroll in a smaller layer of the page (div, textarea, ...) and when we reach the edge and keep scrolling then the whole page scrolls.
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::updateAutoscrollRenderer): if we switch to the parent layer to do the scroll we want to change the renderer for the panning
              * page/EventHandler.h:
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::panScrollFromPoint): now calls the scrollByRecursively method when it has computed the xDelta and yDelta
              (WebCore::RenderLayer::scrollByRecursively): try to scroll the current layer by the xDelta and yDelta provided, if it can't it ask its parent layer to do so.
              * rendering/RenderLayer.h:
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::canBeProgramaticallyScrolled): a RenderObject must have a RenderLayer to be programatically scrolled
              (WebCore::RenderObject::autoscroll): No need to check for the layer anymore since we verify it's present in the upmentionned method
              (WebCore::RenderObject::panScroll): No need to check for the layer anymore too.
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      616ef6d1
  20. 03 Aug, 2008 1 commit
    • britto@apple.com's avatar
      2008-08-02 Maxime Britto <britto@apple.com> · 0dbc02df
      britto@apple.com authored
              Reviewed by Eric Seidel.
      
              <rdar://problem/6118969>
              https://bugs.webkit.org/show_bug.cgi?id=19971 
              Modifiy the cursor interactively when on panning mode (middle click auto scroll)
              When the panning is in progress the cursor is an arrow representing the direction of the current scroll
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::autoscrollTimerFired): Before each scroll we actualize the cursor to match the current direction
              (WebCore::EventHandler::setPanScrollCursor): determines the direction of the upcoming scroll.
              (WebCore::EventHandler::handleMouseMoveEvent):
              * page/EventHandler.h: 
              * platform/Cursor.h: Add propotypes for the new cursor functions
              * platform/gtk/CursorGtk.cpp: to avoid build break
              (WebCore::middlePanningCursor):
              (WebCore::eastPanningCursor):
              (WebCore::northPanningCursor):
              (WebCore::northEastPanningCursor):
              (WebCore::northWestPanningCursor):
              (WebCore::southPanningCursor):
              (WebCore::southEastPanningCursor):
              (WebCore::southWestPanningCursor):
              (WebCore::westPanningCursor):
              * platform/mac/CursorMac.mm: to avoid build break
              (WebCore::middlePanningCursor):
              (WebCore::eastPanningCursor):
              (WebCore::northPanningCursor):
              (WebCore::northEastPanningCursor):
              (WebCore::northWestPanningCursor):
              (WebCore::southPanningCursor):
              (WebCore::southEastPanningCursor):
              (WebCore::southWestPanningCursor):
              (WebCore::westPanningCursor):
              * platform/qt/CursorQt.cpp: to avoid build break
              (WebCore::middlePanningCursor):
              (WebCore::eastPanningCursor):
              (WebCore::northPanningCursor):
              (WebCore::northEastPanningCursor):
              (WebCore::northWestPanningCursor):
              (WebCore::southPanningCursor):
              (WebCore::southEastPanningCursor):
              (WebCore::southWestPanningCursor):
              (WebCore::westPanningCursor):
              * platform/win/CursorWin.cpp: Add specific icons for the panning as windows resizing icons are both sides arrows
              (WebCore::middlePanningCursor):
              (WebCore::eastPanningCursor):
              (WebCore::northPanningCursor):
              (WebCore::northEastPanningCursor):
              (WebCore::northWestPanningCursor):
              (WebCore::southPanningCursor):
              (WebCore::southEastPanningCursor):
              (WebCore::southWestPanningCursor):
              (WebCore::westPanningCursor):
              * platform/wx/CursorWx.cpp: to avoid build break
              (WebCore::middlePanningCursor):
              (WebCore::eastPanningCursor):
              (WebCore::northPanningCursor):
              (WebCore::northEastPanningCursor):
              (WebCore::northWestPanningCursor):
              (WebCore::southPanningCursor):
              (WebCore::southEastPanningCursor):
              (WebCore::southWestPanningCursor):
              (WebCore::westPanningCursor):
      
      2008-08-02  Maxime Britto  <britto@apple.com>
      
              Reviewed by Eric Seidel.
            
              These icons are copies from the resizers in WebCore/Ressources
      
              * ChangeLog:
              * WebKit.vcproj/WebKit.rc:
              * WebKit.vcproj/panEastCursor.png: Added.
              * WebKit.vcproj/panNorthCursor.png: Added.
              * WebKit.vcproj/panNorthEastCursor.png: Added.
              * WebKit.vcproj/panNorthWestCursor.png: Added.
              * WebKit.vcproj/panSouthCursor.png: Added.
              * WebKit.vcproj/panSouthEastCursor.png: Added.
              * WebKit.vcproj/panSouthWestCursor.png: Added.
              * WebKit.vcproj/panWestCursor.png: Added.
              * WebKit.vcproj/resource.h:
              * WebKitDLL.cpp:
              (loadResourceIntoBuffer):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0dbc02df
  21. 09 Jul, 2008 1 commit
    • britto@apple.com's avatar
      2008-07-09 Maxime Britto <britto@apple.com> · 5ed8b2c3
      britto@apple.com authored
              Reviewed by NOBODY (OOPS!).
      
              http://bugs.webkit.org/show_bug.cgi?id=14227
              Add the middle click panning feature to the windows release.
              Details on almost each method below.
              Manual test is included in the patch.
      
              * ChangeLog:
              * WebCore.vcproj/WebCore.vcproj:
              * manual-tests/panScroll.html: Added.
              * manual-tests/resources/big-page.html: Added.
              * page/EventHandler.cpp: Added the panScroll start/stop handlers and adapted the autoscroll for both to share some functions.
              (WebCore::EventHandler::EventHandler): Initialize the new class members for the panScroll
              (WebCore::EventHandler::handleMouseDraggedEvent): Prevent the autoscroll to trigger if the panScroll is in progress
              (WebCore::EventHandler::handleMouseReleaseEvent): Prevent the autoscroll to stop the panScroll on mouse release
              (WebCore::EventHandler::handleAutoscroll): Added the specific calls for the panScroll (save mouse position, draw the panScroll icon) to the shared code
              (WebCore::EventHandler::autoscrollTimerFired): Specify the calls to perform for each function (autoscroll and panScroll)
              (WebCore::EventHandler::stopAutoscrollTimer): Specify the calls to perform for each function (autoscroll and panScroll)
              (WebCore::EventHandler::handleMousePressEvent): Trigger for the panScroll. Test is the button is the middle button and try to find a renderer where the panScroll is possible. If it finds one, it calls the handleAutoscroll method.
              * page/EventHandler.h:
              (WebCore::EventHandler::panScrollInProgress): Getter used by the sub frames's EventHandler to notice the main frame EventHandler
              (WebCore::EventHandler::setPanScrollInProgress): Setter used by the sub frames's EventHandler to notice the main frame EventHandler
              * platform/ScrollView.h: Added a method used by the RenderObject to test if the view can be scrolled. Added the print/remove panScroll icon methods between the windows platform flags
              * platform/gtk/ScrollViewGtk.cpp:
              (WebCore::ScrollView::isScrollable): Not implemented : returns true
              * platform/mac/ScrollViewMac.mm: Implemented because it was useful for the autoscroll feature.
              (WebCore::ScrollView::isScrollable):
              * platform/qt/ScrollViewQt.cpp:
              (WebCore::ScrollView::isScrollable): Not implemented : returns true
              * platform/win/ScrollViewWin.cpp:
              (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate): Added a boolean and an IntPoint to draw the icon.
              (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore): If the icon must be drawn, define the rect to invalidate to erase the previous icon and to display the new one.
              (WebCore::ScrollView::updateContents): I split this method to be able to invalidate a rect with window coordinates instead of contents coordinates. This function now converts the contents coord in window coord and calls the new updateWindowRect() method  
              (WebCore::ScrollView::updateWindowRect): New method which performs the work that was doing the end of the old updateContents : invalidate a rect with window coordinates
              (WebCore::ScrollView::isScrollable): checks is the view has scrollbars
              (WebCore::ScrollView::printPanScrollIcon): sets the boolean and the IntPoint for the icon. Invalidate his rect and ask for repaint.
              (WebCore::ScrollView::removePanScrollIcon): sets the boolean to false. Invalidate his rect and ask for repaint.
              (WebCore::ScrollView::paint): Modified to draw the icon if needed.
              * platform/wx/ScrollViewWx.cpp:
              (WebCore::ScrollView::isScrollable): Not implemented : returns true
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::panScrollFromPoint): Receives the Middle click location and retrieves the currentMouse position from the EventHandler. With these informations it computes the direction to scroll to and the speed then calls for the final scroll.
              * rendering/RenderLayer.h:
              * rendering/RenderListBox.cpp: Adapt the panScroll to the ListBox object to scroll by lines instead of pixels
              (WebCore::RenderListBox::panScroll):
              (WebCore::RenderListBox::scrollToward):
              (WebCore::RenderListBox::autoscroll):
              * rendering/RenderListBox.h:
              (WebCore::RenderListBox::shouldPanScroll):
              * rendering/RenderObject.cpp: 
              (WebCore::RenderObject::shouldAutoscroll): Improved the verification to avoid triggering the autoscroll/panScroll when the root object can't scroll
              (WebCore::RenderObject::panScroll): Calls the RenderLayer's panScrollFromPoint() method
              * rendering/RenderObject.h:
              (WebCore::RenderObject::stopPanScroll): 
      
      2008-07-09  Maxime Britto  <britto@apple.com>
      
              Reviewed by NOBODY (OOPS!).
      		
      	Added the panning icon in the ressources.
              Its name is compass.png to make a difference with moveCursor.png (from the WebCore ressources)
      
              * ChangeLog:
              * WebKit.vcproj/WebKit.rc:
              * WebKit.vcproj/panIcon.png: Added.
              * WebKit.vcproj/resource.h:
              * WebKitDLL.cpp: Declared the new ressource with the name "panIcon"
              (loadResourceIntoBuffer):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ed8b2c3
  22. 14 Jun, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · d5ceaf86
      darin@apple.com authored
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more of https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * kjs/nodes.cpp:
              (KJS::ParserRefCounted::hasOneRef): Added. Replaces refcount.
              * kjs/nodes.h: Replaced refcount with hasOneRef.
      
              * wtf/ListRefPtr.h:
              (WTF::ListRefPtr::~ListRefPtr): Changed to use hasOneRef instead of
              refcount, so this class can be used with the RefCounted template.
      
              * wtf/RefCounted.h:
              (WTF::RefCounted::hasOneRef): Made const, since there's no reason for
              it to be non-const.
      
      WebCore:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more work on https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * WebCore.base.exp: Added some new exports needed for functions that are now
              non-virtual.
      
              * WebCore.xcodeproj/project.pbxproj: Moved the "icon" group to the correct
              location in the project. Before it was inside "appcache"!
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              * dom/Clipboard.cpp:
              (WebCore::Clipboard::Clipboard):
              * editing/mac/EditorMac.mm:
              (WebCore::Editor::newGeneralClipboard):
              * editing/qt/EditorQt.cpp:
              (WebCore::Editor::newGeneralClipboard):
              * editing/wx/EditorWx.cpp:
              (WebCore::Editor::newGeneralClipboard):
              * loader/DocumentLoader.cpp:
              (WebCore::DocumentLoader::DocumentLoader):
              * loader/DocumentLoader.h:
              (WebCore::DocumentLoader::create):
              * loader/icon/IconDatabase.cpp:
              (WebCore::IconDatabase::defaultIcon):
              (WebCore::IconDatabase::setIconDataForIconURL):
              (WebCore::IconDatabase::setIconURLForPageURL):
              (WebCore::IconDatabase::getOrCreateIconRecord):
              (WebCore::IconDatabase::performURLImport):
              * loader/icon/IconDatabase.h:
              * loader/icon/IconRecord.cpp:
              (WebCore::IconRecord::IconRecord):
              * loader/icon/IconRecord.h:
              (WebCore::IconRecord::create):
              * page/EventHandler.h:
              * page/Frame.cpp:
              (WebCore::Frame::Frame):
              * page/Frame.h:
              (WebCore::Frame::create):
              * page/gtk/EventHandlerGtk.cpp:
              (WebCore::EventHandler::createDraggingClipboard):
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::createDraggingClipboard):
              * page/qt/EventHandlerQt.cpp:
              (WebCore::EventHandler::createDraggingClipboard):
              * page/win/EventHandlerWin.cpp:
              (WebCore::EventHandler::createDraggingClipboard):
              * page/wx/EventHandlerWx.cpp:
              (WebCore::EventHandler::createDraggingClipboard):
              * platform/Cursor.h:
              (WebCore::SharedCursor::create):
              (WebCore::SharedCursor::~SharedCursor):
              (WebCore::SharedCursor::SharedCursor):
              * platform/DragData.h:
              * platform/PopupMenu.h:
              (WebCore::PopupMenu::create):
              (WebCore::PopupMenu::isActive):
              * platform/ScrollBar.cpp:
              (WebCore::Scrollbar::Scrollbar):
              * platform/SearchPopupMenu.h:
              (WebCore::SearchPopupMenu::create):
              * platform/graphics/FontFamily.cpp:
              (WebCore::FontFamily::FontFamily):
              (WebCore::operator==):
              * platform/graphics/FontFamily.h:
              (WebCore::FontFamily::FontFamily):
              (WebCore::SharedFontFamily::create):
              (WebCore::SharedFontFamily::SharedFontFamily):
              (WebCore::operator!=):
              (WebCore::FontFamily::next):
              (WebCore::FontFamily::appendFamily):
              (WebCore::FontFamily::releaseNext):
              * platform/graphics/Icon.h:
              * platform/graphics/gtk/IconGtk.cpp:
              (WebCore::Icon::Icon):
              (WebCore::Icon::~Icon):
              (WebCore::Icon::newIconForFile):
              * platform/graphics/mac/IconMac.mm:
              (WebCore::Icon::Icon):
              (WebCore::Icon::newIconForFile):
              * platform/graphics/qt/IconQt.cpp:
              (WebCore::Icon::Icon):
              (WebCore::Icon::newIconForFile):
              * platform/graphics/win/IconWin.cpp:
              (WebCore::Icon::Icon):
              (WebCore::Icon::~Icon):
              (WebCore::Icon::newIconForFile):
              * platform/gtk/ClipboardGtk.cpp:
              (WebCore::Editor::newGeneralClipboard):
              * platform/gtk/ClipboardGtk.h:
              (WebCore::ClipboardGtk::create):
              * platform/gtk/PlatformScrollBar.h:
              (WebCore::PlatformScrollbar::create):
              * platform/gtk/PopupMenuGtk.cpp:
              (WebCore::PopupMenu::PopupMenu):
              * platform/gtk/ScrollViewGtk.cpp:
              (WebCore::ScrollViewScrollbar::create):
              (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
              (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
              * platform/mac/ClipboardMac.h:
              (WebCore::ClipboardMac::create):
              * platform/mac/DragDataMac.mm:
              (WebCore::DragData::createClipboard):
              (WebCore::DragData::containsCompatibleContent):
              * platform/mac/PlatformScrollBar.h:
              (WebCore::PlatformScrollbar::create):
              (WebCore::PlatformScrollbar::horizontalScrollbarHeight):
              (WebCore::PlatformScrollbar::verticalScrollbarWidth):
              * platform/mac/PopupMenuMac.mm:
              (WebCore::PopupMenu::PopupMenu):
              * platform/qt/ClipboardQt.h:
              (WebCore::ClipboardQt::create):
              * platform/qt/DragDataQt.cpp:
              (WebCore::DragData::createClipboard):
              * platform/qt/PlatformScrollBar.h:
              (WebCore::PlatformScrollbar::create):
              * platform/qt/PopupMenuQt.cpp:
              (WebCore::PopupMenu::PopupMenu):
              * platform/qt/ScrollViewQt.cpp:
              (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
              (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
              * platform/win/ClipboardWin.h:
              (WebCore::ClipboardWin::create):
              * platform/win/CursorWin.cpp:
              (WebCore::Cursor::Cursor):
              (WebCore::loadSharedCursor):
              * platform/win/DragDataWin.cpp:
              (WebCore::DragData::createClipboard):
              * platform/win/EditorWin.cpp:
              (WebCore::Editor::newGeneralClipboard):
              * platform/win/PlatformScrollBar.h:
              (WebCore::PlatformScrollbar::create):
              * platform/win/PopupMenuWin.cpp:
              (WebCore::PopupMenu::PopupMenu):
              (WebCore::PopupMenu::show):
              * platform/win/ScrollViewWin.cpp:
              (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
              (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
              * platform/wx/ClipboardWx.h:
              (WebCore::ClipboardWx::create):
              * platform/wx/PlatformScrollBar.h:
              (WebCore::PlatformScrollbar::create):
              * platform/wx/PopupMenuWx.cpp:
              (WebCore::PopupMenu::PopupMenu):
              * platform/wx/TemporaryLinkStubs.cpp:
              (Icon::Icon):
              (Icon::newIconForFile):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::createScrollbar):
              * rendering/RenderListBox.cpp:
              (WebCore::RenderListBox::updateFromElement):
              * svg/graphics/SVGImage.cpp:
              (WebCore::SVGImage::dataChanged):
              * svg/graphics/SVGImageEmptyClients.h:
              (WebCore::SVGEmptyFrameLoaderClient::createDocumentLoader):
      
      WebKit/gtk:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * WebCoreSupport/FrameLoaderClientGtk.cpp:
              (WebKit::FrameLoaderClient::createDocumentLoader): Use create instead of new.
              * webkit/webkitwebframe.cpp:
              (webkit_web_frame_new): Ditto.
              (webkit_web_frame_init_with_web_view): Ditto.
      
      WebKit/mac:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more of https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::createDocumentLoader): Use create instead of new.
              (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by
              a ref call inside the Frame constructor. The lifetime rules for Frame are now the
              conventional ones without a special case.
      
              * WebView/WebDataSource.mm:
              (-[WebDataSource _initWithDocumentLoader:]): Changed argument to be a PassRefPtr, since
              this function takes ownership of the DocumentLoader.
              (-[WebDataSource initWithRequest:]): Use create instead of new.
              * WebView/WebDataSourceInternal.h: Changed _initWithDocumentLoader argument to be a
              PassRefPtr and also cleaned up the header a bit.
      
              * WebView/WebDocumentLoaderMac.h:
              (WebDocumentLoaderMac::create): Added. Also made the constructor and a couple of virtual
              functions private.
      
              * WebView/WebFrame.mm:
              (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Use create instead
              of new.
      
      WebKit/qt:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * Api/qwebframe.cpp:
              (QWebFramePrivate::init): Use create instead of new.
              * WebCoreSupport/FrameLoaderClientQt.cpp:
              (WebCore::FrameLoaderClientQt::createDocumentLoader): Ditto.
      
      WebKit/win:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more of https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * WebCoreSupport/WebFrameLoaderClient.cpp:
              (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by
              a ref call inside the Frame constructor. The lifetime rules for Frame are now the
              conventional ones without a special case.
      
              * WebFrame.cpp:
              (WebFrame::init): Renamed function from initWithWebFrameView and removed the unused
              IWebFrameView argument (every caller was passing 0). Also changed this to return the
              WebCore Frame object, which is needed to straighten out the lifetime and ownership
              issues.
              * WebFrame.h: Ditto.
      
              * WebView.cpp:
              (WebView::initWithFrame): Changed to call new init function and use the return value.
      
      WebKit/wx:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam.
      
              - more https://bugs.webkit.org/show_bug.cgi?id=17257
                start ref counts at 1 instead of 0 for speed
      
              * WebKitSupport/FrameLoaderClientWx.cpp:
              (WebCore::FrameLoaderClientWx::createDocumentLoader): Use create function
              instead of new.
      
      LayoutTests:
      
      2008-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - test for https://bugs.webkit.org/show_bug.cgi?id=19538
                <rdar://problem/5957595> Reading transition property from the style JS gives the wrong value
      
              * fast/dom/CSSStyleDeclaration/resources/transition-property-names.js: Added.
              * fast/dom/CSSStyleDeclaration/transition-property-names-expected.txt: Added.
              * fast/dom/CSSStyleDeclaration/transition-property-names.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d5ceaf86
  23. 08 Jun, 2008 1 commit
    • darin@apple.com's avatar
      WebCore: · 8f7bd3b3
      darin@apple.com authored
      2008-06-08  Tony Chang  <idealisms@gmail.com>
      
              Reviewed by Eric Seidel.
      
              - fix https://bugs.webkit.org/show_bug.cgi?id=18167
                there should be no text-drag delay on any platform except for Mac
      
              Move the drag text delay value into the platform specific files.
      
              Test: editing/selection/drag-text-delay.html
      
              * page/EventHandler.cpp:
              * page/EventHandler.h:
              * page/gtk/EventHandlerGtk.cpp:
              * page/mac/EventHandlerMac.mm:
              * page/qt/EventHandlerQt.cpp:
              * page/win/EventHandlerWin.cpp:
              * page/wx/EventHandlerWx.cpp:
      
      LayoutTests:
      
      2008-06-08  Tony Chang  <idealisms@gmail.com>
      
              Reviewed by Eric Seidel.
      
              - test for https://bugs.webkit.org/show_bug.cgi?id=18167
                there should be no text-drag delay on any platform except for Mac
              
              Also updated two tests which depend on the drag text delay to be greater
              than 0 by making them no longer select text before the mouse down.
      
              * editing/selection/drag-text-delay-expected.txt: Added.
              * editing/selection/drag-text-delay.html: Added.
              * platform/mac/editing/selection/drag-text-delay-expected.txt: Added.
      
              * fast/events/autoscroll.html:
              * fast/forms/input-readonly-autoscroll.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8f7bd3b3
  24. 16 May, 2008 2 commits
    • slewis@apple.com's avatar
      2008-05-16 Stephanie Lewis <slewis@apple.com> · ca64f343
      slewis@apple.com authored
              Reviewed by Maciej.
      
              track onbeforeunlaod event counts. Pretty much identical to unload event tracking.
              Also rename methods from onunload tracking to be more clear.
      
              increment/decrement event counts when onunload and onbeforeunload events are added/removed
              * dom/Document.cpp:
              (WebCore::Document::removeHTMLWindowEventListener):
              (WebCore::Document::addWindowEventListener):
              (WebCore::Document::removeWindowEventListener):
              (WebCore::Document::addPendingFrameUnloadEventCount):
              (WebCore::Document::removePendingFrameUnloadEventCount):
              (WebCore::Document::addPendingFrameBeforeUnloadEventCount):
              (WebCore::Document::removePendingFrameBeforeUnloadEventCount):
              * dom/Document.h:
              
              clear onunload count after unload events are dispatched
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::stopLoading):
      
              track onunload and onbeforeunload event counts for each frame
              * page/EventHandler.cpp:
              (WebCore::EventHandler::EventHandler):
              (WebCore::EventHandler::addPendingFrameUnloadEventCount):
              (WebCore::EventHandler::removePendingFrameUnloadEventCount):
              (WebCore::EventHandler::clearPendingFrameUnloadEventCount):
              (WebCore::EventHandler::pendingFrameBeforeUnloadEventCount):
              (WebCore::EventHandler::addPendingFrameBeforeUnloadEventCount):
              (WebCore::EventHandler::removePendingFrameBeforeUnloadEventCount):
              (WebCore::EventHandler::clearPendingFrameBeforeUnloadEventCount):
              * page/EventHandler.h:
              
              clear unbeforeunload count after unbeforeunload events are detached
              * page/Frame.cpp:
              (WebCore::Frame::shouldClose):
      
              track total event count at page level
              * page/Page.cpp:
              (WebCore::Page::Page):
              (WebCore::Page::changePendingUnloadEventCount):
              (WebCore::Page::pendingBeforeUnloadEventCount):
              (WebCore::Page::changePendingBeforeUnloadEventCount):
              * page/Page.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ca64f343
    • cfleizach@apple.com's avatar
      <rdar://problem/5710317> REGRESSION:Selecting ranges of text should be... · 56259ab2
      cfleizach@apple.com authored
      <rdar://problem/5710317> REGRESSION:Selecting ranges of text should be possible using the keyboard (15310)
      
      Adds support to select text ranges when enhanced accessibility is turned on
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      56259ab2
  25. 15 May, 2008 1 commit
    • slewis@apple.com's avatar
      2008-05-15 Stephanie Lewis <slewis@apple.com> · 930e76d0
      slewis@apple.com authored
              Reviewed by Anders.
      
              Keep track on pending unload event counts
      
              No change in behavior so no new tests, but I am dumping the 
              unload event count to track the new variable.
      
              * WebCore.base.exp:
      
              increment/decrement the count when an event is added/removed
              * dom/Document.cpp:
              (WebCore::Document::removeHTMLWindowEventListener):
              (WebCore::Document::addWindowEventListener):
              (WebCore::Document::removeWindowEventListener):
              (WebCore::Document::setPendingFrameUnloadEventCount):
              * dom/Document.h:
      
              set the count to 0 for each frame after the unload event has been dispatched
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::stopLoading):
      
              keep track of the number of pending unload events for the eventHandler's frame
              * page/EventHandler.cpp:
              (WebCore::EventHandler::EventHandler):
             (WebCore::EventHandler::pendingFrameUnloadEventCount):
              (WebCore::EventHandler::setPendingFrameUnloadEventCount):
              * page/EventHandler.h:
      
              keep track of the total number of pending unload events for all of the frames
              * page/Page.cpp:
              (WebCore::Page::Page):
              (WebCore::Page::pendingUnloadEventCount):
              (WebCore::Page::setPendingUnloadEventCount):
                 age/Page.h:
      
              get the pending frame unload count from WebCore
      
              * WebView/WebFrame.mm:
              (-[WebFrame _pendingFrameUnloadEventCount]):
              * WebView/WebFramePrivate.h:
      
              Dump the unload count for a frame after parsing is finished.
      
              * DumpRenderTree/mac/FrameLoadDelegate.mm:
              (-[FrameLoadDelegate webView:didFinishDocumentLoadForFrame:]):
      
              Dump unload event counts for frames.
      
              * fast/dom/Window/get-set-properties-expected.txt:
              * fast/events/onunload-expected.txt:
              * fast/events/onunload-not-on-body-expected.txt:
              * fast/events/onunload-window-property-expected.txt:
              * fast/forms/button-state-restore-expected.txt:
              * fast/history/history_reload-expected.txt:
              * fast/loader/onunload-form-submit-crash-2-expected.txt:
              * fast/loader/onunload-form-submit-crash-expected.txt:
              * http/tests/xmlhttprequest/xhr-onunload-expected.txt:
              * platform/mac/fast/loader/start-load-in-unload-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      930e76d0
  26. 22 Apr, 2008 1 commit
    • jhoneycutt@apple.com's avatar
      2008-04-22 Jon Honeycutt <jhoneycutt@apple.com> · eccdc5fd
      jhoneycutt@apple.com authored
              Reviewed by Sam.
      
              Add a method to query which modifier keys the platform uses for access
              key actions.
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleAccessKey): Bitwise and the event's
              modifier keys with the platform's access key modifier mask to determine
              whether this event can perform an access key action.
              * page/EventHandler.h: Added s_accessKeyModifiers, a platform-defined
              mask of modifier keys used for access key actions, and a getter.
              * page/mac/EventHandlerMac.mm: Use PlatformKeyboardEvent::CtrlKey for
              access key actions.
              * page/qt/EventHandlerQt.cpp: Same.
              * page/gtk/EventHandlerGtk.cpp: Use AltKey.
              * page/win/EventHandlerWin.cpp: Same.
              * page/wx/EventHandlerWx.cpp: Same.
              * platform/PlatformKeyboardEvent.h: Added an enum, ModifierKey.
              (WebCore::PlatformKeyboardEvent::):
              (WebCore::PlatformKeyboardEvent::modifiers): Return which modifier keys
              were active, a combination of ModifierKey values.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eccdc5fd
  27. 09 Jan, 2008 1 commit
    • adachan@apple.com's avatar
      WebCore: · 5dfb49d2
      adachan@apple.com authored
              Tabs with ctrl, meta, or altgraph modifier key down should not advance focus.
      
              Reviewed by Darin.
      
              Test: fast/forms/tabs-with-modifiers.html
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::defaultKeyboardEventHandler):
              (WebCore::EventHandler::defaultTabEventHandler): bail if ctrl, meta, or altgraph key is down.  
              Clean up the code a bit.
              * page/EventHandler.h:
              * page/FocusController.cpp: Remove the advanceFocus() that takes in a KeyboardEvent.  It was
              only called in EventHandler::defaultTabEventHandler() but we have cleaned up the code there and
              no longer needs it.
              * page/FocusController.h:
              
      LayoutTests:
              Tests tabbing with different combinations of modifiers keys, where some
              should advance focus and some should not.
      
              Reviewed by Darin.
      
              * fast/forms/tabs-with-modifiers-expected.txt: Added.
              * fast/forms/tabs-with-modifiers.html: Copied from fast/forms/focus2.html.
              
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5dfb49d2
  28. 27 Dec, 2007 1 commit
    • mitz@apple.com's avatar
      WebCore: · 4f8770ab
      mitz@apple.com authored
              Reviewed by Oliver Hunt.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=16603
                <rdar://problem/5664199> Crash when resizing text field
      
              Test: fast/layers/resize-layer-deletion-crash.html
      
              The event handler has only a weak reference to the layer that is
              currently in resize mode, so it is the layer's responsibility to let
              the event handler know if it has been destroyed while in that mode.
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets
              m_resizeLayer to 0.
              * page/EventHandler.h:
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::~RenderLayer): Added a call to
              EventHandler::resizeLayerDestroyed() if the layer is in resize mode.
      
      LayoutTests:
      
              Reviewed by Oliver Hunt.
      
              - test for http://bugs.webkit.org/show_bug.cgi?id=16603
                <rdar://problem/5664199> Crash when resizing text field
      
              * fast/layers/resize-layer-deletion-crash-expected.txt: Added.
              * fast/layers/resize-layer-deletion-crash.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4f8770ab
  29. 16 Dec, 2007 1 commit
  30. 13 Dec, 2007 1 commit
  31. 12 Nov, 2007 1 commit
  32. 10 Nov, 2007 1 commit
    • mitz@apple.com's avatar
      Reviewed by Darin Adler. · bb707344
      mitz@apple.com authored
              - fix <rdar://problem/5450655> Control-clicking text in a link can surprisingly select only part of the link, should select entire link
      
              No test because context menu events cannot be tested in DumpRenderTree.
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Added.
              If the click occurred in an active link, selects the entire link
              element. Otherwise selects the closest word.
              (WebCore::EventHandler::sendContextMenuEvent): Call
              selectClosestWordOrLinkFromMouseEvent().
              * page/EventHandler.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb707344
  33. 30 Oct, 2007 1 commit
    • adele's avatar
      WebCore: · e902c4c2
      adele authored
              Reviewed by Darin.
      
              WebCore part of fix for http://bugs.webkit.org/show_bug.cgi?id=10577
              <rdar://problem/5103625> REGRESSION: Caps lock icon should show in password fields
      
              Test: manual-tests/password-caps-lock.html
      
              * WebCore.base.exp: Added symbol for capsLockStateMayHaveChanged.
      
              * page/Frame.cpp: (WebCore::Frame::setIsActive): Calls capsLockStateMayHaveChanged.
              * page/EventHandler.cpp: (WebCore::EventHandler::capsLockStateMayHaveChanged): Added. Tells the focused node's renderer that the capsLockStateMayHaveChanged.
              * page/EventHandler.h:
      
              * platform/PlatformKeyboardEvent.h:
              * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::currentCapsLockState): Added.
              * platform/win/KeyEventWin.cpp: (WebCore::PlatformKeyboardEvent::currentCapsLockState): Added.
      
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::RenderTextControl):
              (WebCore::RenderTextControl::paint): Added.  If m_shouldDrawCapsLockIndicator is true, paints the caps lock indicator after the background.
              (WebCore::RenderTextControl::forwardEvent): When the control gets and loses focus, update the caps lock state.
              (WebCore::RenderTextControl::capsLockStateMayHaveChanged): Added. Updates m_shouldDrawCapsLockIndicator, which is true if the field is a password field, 
               and the frame is active, and the element is focused, and the caps lock is on.  Causes a repaint when m_shouldDrawCapsLockIndicator changes state.
              * rendering/RenderTextControl.h: Added m_shouldDrawCapsLockIndicator.
              * rendering/RenderObject.h: (WebCore::RenderObject::capsLockStateMayHaveChanged): Added.
      
              * rendering/RenderTheme.h: (WebCore::RenderTheme::paintCapsLockIndicator): Added.
              * rendering/RenderThemeMac.h:
              * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintCapsLockIndicator): Added.  Calls wkDrawCapsLockIndicator.
              * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::paintCapsLockIndicator): Added.  Calls paintThemePart for the CapsLockPart.
              * rendering/RenderThemeSafari.h:
      
      WebKit:
      
              Reviewed by Darin.
      
              WebKit part of fix for http://bugs.webkit.org/show_bug.cgi?id=10577
              <rdar://problem/5103625> REGRESSION: Caps lock icon should show in password fields
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView flagsChanged:]): Call capsLockStateMayHaveChanged so WebCore knows it may have to update a password field.
              (+[WebHTMLView _postFlagsChangedEvent:]): Added a comment with a Radar number for why this isn't just in flagsChanged.
              (-[WebHTMLView scrollWheel:]): Instead of calling the next responder explicitly, we can just call super, which will take care of this.
      
      win:
      
              Reviewed by Darin.
      
              WebKitWin part of fix for http://bugs.webkit.org/show_bug.cgi?id=10577
              <rdar://problem/5110427> REGRESSION: Caps lock icon should show in password fields
      
              * WebView.cpp: (WebView::keyDown): Call capsLockStateMayHaveChanged so WebCore knows it may have to update a password field.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e902c4c2
  34. 19 Sep, 2007 1 commit
    • adele's avatar
      WebCore: · 79c8ed27
      adele authored
              Reviewed by Maciej.
      
              Fix for <rdar://problem/5472062> -webkit-user-select: none makes selection difficult
              and for <rdar://problem/5472056> REGRESSION: Cannot type into edit fields on a form (sccsheriff.org)
      
              Tests:
      
              This fix has a few steps:
              1) Removes the ignore value for the -webkit-user-select property.  We now decide when to prevent selection from starting by calling canStartSelection on the node.
              2) Implements canStartSelection which returns false for all elements that used to have -webkit-user-select:ignore set, true for content editable nodes, 
                 and walks up the tree to ask the parent before allowing selection to be started on any other nodes.
              3) We used to disallow selection from starting within -webkit-user-select:none blocks, but now we only use canStartSelection for that.  This will allow easy selections
                 in cases like iChat where there's a mix of selectable and non-selectable content.
              4) Makes -webkit-user-select inherited.  After removing the "ignore" value, -webkit-user-select would behave like it was inherited anyways since we already allowed the text value to override the none value.
      
      
              * css/html4.css: Removed all usage of -webkit-user-select: ignore.  This is now handled internally with canStartSelection().
                Now -webkit-user-select won't be unintentionally overridden by nodes that don't want to allow selection to be started, but do want to honor the -webkit-user-select to
                determine whether or not selection is allowed at all.
      
              * editing/SelectionController.cpp: (WebCore::SelectionController::selectAll):
                Don't try to determine whether selection is allowed inside the root node here.  VisiblePosition and Selection creation will keep Selection endpoints out of -webkit-user-select:none regions.
              
              * dom/Node.h:
              * dom/Node.cpp: (WebCore::Node::canStartSelection): Added. Always allows selection to be started in a content editable node.  If there's a parent, ask the parent if starting a selection is allowed.
                If there's no parent, default to allowing selection.
              * html/HTMLAnchorElement.h:
              * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::canStartSelection): Added. If its not a link, then calls the base class. Disallows selection for non-editable links.
                Allows selection for editable links.
                This logic used to be done in CSSStyleSelector by changing the user-select property.
              * html/HTMLButtonElement.h: (WebCore::HTMLButtonElement::canStartSelection): Added. Disallows selection from starting in buttons.
              * html/HTMLImageElement.h: (WebCore::HTMLImageElement::canStartSelection): Added. Disallows selection from starting in images.
              * html/HTMLInputElement.h:
              * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::canStartSelection): Added. Disallows selection from anything that's not a text field.  Text fields call up to the base class.
                When they're editable, text controls will always be selectable because of the case for content editable content. Otherwise, they'll respect their parent element's decision about starting a selection. 
              * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::canStartSelection): Added. Disallows selection from starting in popup buttons.
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::selectClosestWordFromMouseEvent): Use canMouseDownStartSelect instead of the ambiguously named shouldSelect().
              (WebCore::EventHandler::handleMousePressEventTripleClick): ditto.
              (WebCore::EventHandler::handleMousePressEventSingleClick): ditto.
              (WebCore::EventHandler::updateSelectionForMouseDrag): Use canMouseDragExtendSelect.
              (WebCore::EventHandler::selectCursor): Paint an ibeam in any region that allows you to click to create a selection.
              (WebCore::EventHandler::canMouseDownStartSelect): Now fires the selectStart event, and calls canStartSelection instead of checking the user-select property.
              (WebCore::EventHandler::canMouseDragExtendSelect): This is identical to canMouseDownStartSelect because of 12823, even though it seems strange that we would fire the selectStart event here.
              * page/EventHandler.h:
              * page/FocusController.cpp: (WebCore::clearSelectionIfNeeded): Calls canStartSelection instead of checking the user-select property to decide when to prevent selection creation. 
              * rendering/RenderObject.cpp: (WebCore::RenderObject::draggableNode): ditto.
              * rendering/RenderObject.h: Removed helper methods that are no longer needed.
      
              * rendering/RenderStyle.h: Made userSelect inherited.  After removing the "ignore" value, -webkit-user-select would behave like it was inherited 
                anyways since we already allowed the text value to override the none value.
                Removed the SELECT_AUTO and SELECT_IGNORE values since they're no longer used.
              (WebCore::):
              (WebCore::RenderStyle::userSelect):
              (WebCore::RenderStyle::setUserSelect):
              (WebCore::RenderStyle::initialUserSelect):
              * rendering/RenderStyle.cpp:
              (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
              (WebCore::StyleRareNonInheritedData::operator==):
              (WebCore::StyleRareInheritedData::StyleRareInheritedData):
              (WebCore::StyleRareInheritedData::operator==):
              (WebCore::RenderStyle::diff):
      
              * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Remove case for SELECT_AUTO and SELECT_IGNORE
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::adjustRenderStyle):  Remove adjustment for links.  This is now handled in HTMLAnchorElement::canStartSelection.
              (WebCore::CSSStyleSelector::applyProperty): Map CSS_VAL_AUTO to SELECT_TEXT.  Remove CSS_VAL_IGNORE.
      
      LayoutTests:
      
              Reviewed by Maciej.
      
              Tests for <rdar://problem/5472062> -webkit-user-select: none makes selection difficult
              and for <rdar://problem/5472056> REGRESSION: Cannot type into edit fields on a form (sccsheriff.org)
      
              * fast/css/computed-style-expected.txt: Updated for default -webkit-user-select value.
              * fast/css/computed-style-without-renderer-expected.txt: ditto.
      
              * editing/selection/5333725.html: Re-enabled.
              * editing/selection/5333725.html-disabled: Removed.
      
              * editing/selection/user-select-text-inside-user-select-ignore.html-disabled: Removed. Adjusted this test to be more specific and renamed it to textfield-inside-anchor. 
              * editing/selection/user-select-text-inside-user-select-ignore-expected.txt: Removed. 
              * fast/forms/textfield-inside-anchor-expected.txt: Added.
              * fast/forms/textfield-inside-anchor.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      79c8ed27
  35. 10 Sep, 2007 1 commit
    • justing's avatar
      WebCore: · 91d64cca
      justing authored
              Reviewed by Darin.
      
              <rdar://problem/5467405> 
              Revert back behavior of -webkit-user-select to fix widget selection problems
              
              Rolled out r25086 and r25057.  I will be re-opening:
              <rdar://problem/5333725> -webkit-user-select: none makes selection difficult
              Which we will either to defer or fix by introducing a new value of -webkit-user-select.
              <rdar://problem/5370059> REGRESSION: Cannot type into edit fields on a form (sccsheriff.org)
              Which we will either defer or fix with Adele's patch that doesn't involve making 
              -webkit-user-select inherited.
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::adjustRenderStyle):
              (WebCore::CSSStyleSelector::applyProperty):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::selectAll):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::selectClosestWordFromMouseEvent):
              (WebCore::EventHandler::handleMousePressEventTripleClick):
              (WebCore::EventHandler::handleMousePressEventSingleClick):
              (WebCore::EventHandler::updateSelectionForMouseDrag):
              (WebCore::EventHandler::selectCursor):
              (WebCore::EventHandler::canMouseDownStartSelect):
              * page/EventHandler.h:
              * rendering/RenderObject.cpp:
              (WebCore::selectStartNode):
              (WebCore::RenderObject::canSelect):
              (WebCore::RenderObject::shouldSelect):
              (WebCore::RenderObject::draggableNode):
              * rendering/RenderObject.h:
              * rendering/RenderStyle.cpp:
              (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
              (WebCore::StyleRareNonInheritedData::operator==):
              (WebCore::StyleRareInheritedData::StyleRareInheritedData):
              (WebCore::StyleRareInheritedData::operator==):
              (WebCore::RenderStyle::diff):
              * rendering/RenderStyle.h:
              (WebCore::):
              (WebCore::RenderStyle::userSelect):
              (WebCore::RenderStyle::setUserSelect):
              (WebCore::RenderStyle::initialUserSelect):
      
      LayoutTests:
      
              Reviewed by Darin.
              
              <rdar://problem/5467405> 
              Revert back behavior of -webkit-user-select to fix widget selection problems
      
              * editing/selection/5333725.html: Removed.
              * editing/selection/5333725.html-disabled: Added.
              * editing/selection/user-select-text-inside-user-select-ignore.html: Removed.
              * editing/selection/user-select-text-inside-user-select-ignore.html-disabled: Added.
              * fast/css/computed-style-expected.txt:
              * fast/css/computed-style-without-renderer-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      91d64cca
  36. 13 Aug, 2007 1 commit
    • justing's avatar
      LayoutTests: · 3fbf44cb
      justing authored
              Reviewed by Darin.
              
              <rdar://problem/5333725> -webkit-user-select: none makes selection difficult
      
              * editing/selection/5333725-expected.checksum: Added.
              * editing/selection/5333725-expected.png: Added.
              * editing/selection/5333725-expected.txt: Added.
              * editing/selection/5333725.html: Added.
              
              Added a workaround for a bug where -webkit-user-select:none
              has no effect on the body if placed on the html element:
              * editing/selection/select-all-user-select-none.html:
      
      WebCore:
      
              Reviewed by Darin.
              
              <rdar://problem/5333725> -webkit-user-select: none makes selection difficult
              
              Let users create selections if they mouse down in a -webkit-user-select:none
              region, just (continue to) disallow selection endpoints in those regions, and
              don't paint those regions as selected if they are fully enclosed by a selection. 
              For example, in xxyyyxx where x is -webkit-user-select:none, a user can mouse down
              between the first two xs and drag across yyy to the second two xs to create a 
              selection xx^yyy^xx.
              
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::selectAll): Allow selectAll inside a root
              that has -webkit-user-select:none, because it may contain content that
              is selectable (VisiblePosition and Selection creation will keep Selection
              endpoints out of -webkit-user-select:none regions).
              * page/EventHandler.cpp:
              (WebCore::EventHandler::selectClosestWordFromMouseEvent): Use canMouseDownStartSelect
              instead of the ambiguously named shouldSelect().
              (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
              (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
              (WebCore::EventHandler::updateSelectionForMouseDrag): Use canMouseDragExtendSelect.
              (WebCore::EventHandler::selectCursor): Paint an ibeam in -webkit-user-select:none regions,
              because you can click in those regions to create a selection.
              (WebCore::EventHandler::canMouseDownStartSelect): Now fires the selectStart event, and
              returns true in -webkit-user-select: none regions.
              (WebCore::EventHandler::canMouseDragExtendSelect): This is identical to 
              canMouseDownStartSelect because of 12823, even though it seems strange that we would fire 
              the selectStart event here.
              * page/EventHandler.h:
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::draggableNode): Only -webkit-user-select:ignore regions will
              prevent selection creation.
              * rendering/RenderObject.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3fbf44cb