1. 04 Dec, 2007 1 commit
    • aroben@apple.com's avatar
      Make the implementation of Frame::setNeedsReapplyStyles cross-platform · 4cfcb8ae
      aroben@apple.com authored
       WebCore:
      
               Make the implementation of Frame::setNeedsReapplyStyles cross-platform
      
               Reviewed by Hyatt.
      
               No change in functionality.
      
               * page/Frame.cpp:
               (WebCore::Frame::setNeedsReapplyStyles): Added. Invalidates the
               FrameView so that FrameView::layout will be called, which ends up
               calling reapplyStyles.
               (WebCore::Frame::needsReapplyStyles): Added.
               (WebCore::Frame::reapplyStyles): Renamed from reparseConfiguration.
               (WebCore::FramePrivate::FramePrivate):
               * page/Frame.h:
               * page/FramePrivate.h: Added new boolean member.
               * page/FrameView.cpp:
               (WebCore::FrameView::layout): Call Frame::reapplyStyles if needed.
               (WebCore::FrameView::needsLayout): Say that we need layout if the
               Frame needs styles reapplied.
               * page/mac/WebCoreFrameBridge.h: Removed setNeedsReapplyStyles.
               * page/mac/WebCoreFrameBridge.mm:
               (-[WebCoreFrameBridge reapplyStylesForDeviceType:]): Updated for
               rename.
      
               * bridge/win/FrameWin.cpp: Removed Frame::setNeedsReapplyStyles.
               * page/gtk/FrameGtk.cpp: Ditto.
               * page/mac/FrameMac.mm: Ditto.
               * page/qt/FrameQt.cpp: Ditto.
               * platform/wx/TemporaryLinkStubs.cpp: Ditto.
      
       WebKit/mac:
      
               Remove -[WebFrameBridge setNeedsReapplyStyles]
      
               This functionality is now WebCore's responsibility.
      
               Reviewed by Hyatt.
      
               * WebCoreSupport/WebFrameBridge.mm:
               * WebKit.order:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4cfcb8ae
  2. 03 Dec, 2007 1 commit
    • mitz@apple.com's avatar
      WebCore: · fe1e11ac
      mitz@apple.com authored
              Reviewed by Dave Hyatt.
      
              - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame
      
              Test: fast/events/resize-subframe.html
      
              * page/FrameView.cpp:
              (WebCore::FrameViewPrivate::FrameViewPrivate): Added a timer used when
              deferring tasks that need to be done after layout.
              (WebCore::FrameViewPrivate::reset):
              (WebCore::FrameView::~FrameView):
              (WebCore::FrameView::layout): Moved the updating of widget positions,
              loading plug-ins and sending events queued up during layout into
              performPostLayoutTasks(). performPostLayoutTasks() is called after
              layout unless the layout was triggered by a previous layout's post-
              layout tasks. In the latter case, performPostLayoutTasks() is scheduled
              to run later.
              (WebCore::FrameView::performPostLayoutTasks): Performs work that needs
              to be done after layout but which can result in arbitrary code
              execution and therefore may re-invalidate the layout. This includes
              updating widget positions, loading plug-ins, and dispatching layout-
              related DOM events (scroll, overflow and resize).
              (WebCore::FrameView::postLayoutTimerFired):
              (WebCore::FrameView::dispatchScheduledEvents):
              * page/FrameView.h:
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm: Removed -sendResizeEvent since this
              is handled by FrameView now.
      
      WebKit/gtk:
      
              Reviewed by Dave Hyatt.
      
              - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame
      
              * WebView/webkitwebview.cpp: Remove the call to sendResizeEvent() since
              FrameView sends it now.
      
      WebKit/mac:
      
              Reviewed by Dave Hyatt.
      
              - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Removed the code
              that checked if the view had resized and sent the resize event, since
              FrameView sends resize events now.
              * WebView/WebHTMLViewInternal.h:
      
      WebKit/win:
      
              Reviewed by Dave Hyatt.
      
              - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame
      
              * WebView.cpp:
              (WebViewWndProc): Removed call to sendResizeEvent() since FrameView
              sends them now.
      
      LayoutTests:
      
              Reviewed by Dave Hyatt.
      
              - test for <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame
      
              * fast/events/resize-subframe-expected.txt: Added.
              * fast/events/resize-subframe.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe1e11ac
  3. 17 Nov, 2007 1 commit
    • ap@webkit.org's avatar
      Reviewed by Darin. · fa4fbed0
      ap@webkit.org authored
              http://bugs.webkit.org/show_bug.cgi?id=15969
              Eliminate Editor::deleteRange()
      
              No change in functionality.
      
      WebCore:
              * editing/CompositeEditCommand.h: Removed unimplemented deleteKeyPressed().
      
              * editing/Editor.cpp:
              (WebCore::Editor::deleteWithDirection):
              (WebCore::Editor::cut):
              (WebCore::Editor::performDelete):
              * editing/Editor.h:
              Moved relevant Editor::deleteRange() functionality to its callers.
              Removed deleteSelectionWithSmartDelete(void), which was more confusing than helpful
              in my opinion.
      
              * editing/mac/EditorMac.mm:
              (WebCore::initializeKillRingIfNeeded):
              (WebCore::Editor::addToKillRing):
              (WebCore::Editor::yank):
              (WebCore::Editor::yankAndSelect):
              (WebCore::Editor::setMark):
              (WebCore::unionDOMRanges):
              (WebCore::Editor::deleteToMark):
              (WebCore::Editor::selectToMark):
              (WebCore::Editor::swapWithMark):
              Pushed kill ring handling down from WebCore.
      
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
              Removed setMarkDOMRange (the corresponding getter is still needed).
      
              * WebCore.base.exp: No longer need to export Editor::deleteRange() and Editor::insertTextWithoutSendingTextEvent().
              Export the new kill ring functions.
      
      WebKit:
              * WebView/WebHTMLView.mm:
              (+[WebHTMLView initialize]):
              (-[WebHTMLView yank:]):
              (-[WebHTMLView yankAndSelect:]):
              (-[WebHTMLView setMark:]):
              (-[WebHTMLView deleteToMark:]):
              (-[WebHTMLView selectToMark:]):
              (-[WebHTMLView swapWithMark:]):
              Pushed all kill ring methods to WebCore. They were guilty of using Editor::deleteRange()!
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa4fbed0
  4. 08 Nov, 2007 1 commit
    • darin@apple.com's avatar
      WebCore: · 02405e32
      darin@apple.com authored
              Reviewed by Steve.
      
              - cut down on notImplemented() functions on Windows
      
              * bridge/AXObjectCache.h: Put #if around the accessibility
              global.
      
              * bridge/win/FrameWin.cpp: (WebCore::Frame::setNeedsReapplyStyles):
              Moved here from TemporaryLinkStubs.
      
              * dom/Document.cpp: (WebCore::Document::lastModified): Re-implemented
              using the ResourceResponse that's now available from the DocumentLoader.
      
              * editing/JSEditor.cpp: (execTranspose): Changed to call transpose() on
              the Editor instead of the obsolete one on the Frame.
      
              * loader/DocumentLoader.h: Removed getResponseModifiedHeader.
              * loader/FrameLoader.h: Removed overrideMediaType.
      
              * loader/gtk/DocumentLoaderGtk.cpp: Removed.
              * loader/mac/DocumentLoaderMac.mm: Removed.
              * loader/qt/DocumentLoaderQt.cpp: Removed.
      
              * page/Frame.cpp: Removed transpose.
              * page/Frame.h: Ditto.
              * page/FrameView.h: Removed updateBorder.
              * page/gtk/FrameGtk.cpp: Removed issueTransposeCommand.
              * page/mac/FrameMac.mm: Ditto.
              * page/mac/WebCoreFrameBridge.h: Removed issueTransposeCommand and
              overrideMediaType.
              * page/qt/FrameQt.cpp: Removed issueTransposeCommand.
      
              * platform/gtk/TemporaryLinkStubs.cpp: Removed gAccessibilityEnabled.
              * platform/qt/TemporaryLinkStubs.cpp: Ditto.
              * platform/win/TemporaryLinkStubs.cpp: Removed or moved all but 3 of the stubs.
              * platform/wx/TemporaryLinkStubs.cpp: Removed gAccessibilityEnabled,
              issueTransposeCommand, and overrideMediaType.
      
              * platform/network/cf/ResourceHandleCFNet.cpp:
              (WebCore::ResourceHandle::loadsBlocked): Moved here from TemporaryLinkStubs.
              (WebCore::ResourceHandle::willLoadFromCache): Ditto.
              * platform/win/GraphicsContextWin.cpp:
              (WebCore::GraphicsContextPlatformPrivate::clip): Ditto.
              * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::inWindow): Ditto.
              * platform/win/SystemTimeWin.cpp: (WebCore::userIdleTime): Ditto.
              * platform/win/WidgetWin.cpp: (WebCore::Widget::setIsSelected): Ditto.
      
              * WebCore.pro: Updated for removed files.
              * WebCore.xcodeproj/project.pbxproj: Updated for removed file.
      
      WebKit/mac:
      
              Reviewed by Steve.
      
              - removed some unused WebCore bridge methods
      
              * WebCoreSupport/WebFrameBridge.mm: Removed issueTransposeCommand and overrideMediaType.
      
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::overrideMediaType): Changed to call WebView directly instead of
              using the bridge object.
      
      WebKit/win:
      
              Reviewed by Steve.
      
              * Interfaces/IWebUIDelegate.idl: Added the functions needed below.
              * WebChromeClient.cpp:
              (WebChromeClient::setMenubarVisible): Eliminated the notImplemented()
              here by calling through the UI delegate.
              (WebChromeClient::menubarVisible): Ditto.
              (WebChromeClient::runDatabaseSizeLimitPrompt): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      02405e32
  5. 06 Nov, 2007 1 commit
    • ap's avatar
      Reviewed by Darin. · 7a07131a
      ap authored
              http://bugs.webkit.org/show_bug.cgi?id=15847
              Some editing cleanup
      
              No change in functionality.
      
      WebCore:
              * editing/TextIterator.cpp:
              (WebCore::plainText):
              * editing/TextIterator.h:
              Made WebCore::plainText() return String instead of DeprecatedString.
      
              * bridge/mac/WebCoreAXObject.mm:
              (-[WebCoreAXObject textUnderElement]):
              (-[WebCoreAXObject value]):
              (-[WebCoreAXObject doAXBoundsForTextMarkerRange:]):
              (-[WebCoreAXObject doAXNextSentenceEndTextMarkerForTextMarker:]):
              (-[WebCoreAXObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
              Updated for the above change. There is no need to explicitly convert to NSString now.
      
              * editing/EditCommand.cpp:
              (WebCore::EditCommand::EditCommand): m_startingSelection and m_endingSelection are actually
              initialized in constructor body, so the work done in initializer list was wasted.
      
              (WebCore::EditCommand::apply): Moved some stars.
              (WebCore::EditCommand::unapply): Ditto.
              (WebCore::EditCommand::reapply): Ditto.
              (WebCore::EditCommand::setStartingSelection): The loop exit condition was evaluated twice,
              removed one of the checks.
      
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::toString): plainText() result type now matches what we need here.
      
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
              Removed unused -[WebCoreFrameBridge deleteKeyPressedWithSmartDelete:granularity:] and
              -[WebCoreFrameBridge forwardDeleteKeyPressedWithSmartDelete:granularity:].
      
      WebKit:
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView deleteToEndOfLine:]):
              (-[WebHTMLView deleteToEndOfParagraph:]):
              WebCore had a duplicate of the same logic already. We are passing a boundary value to
              a function that expects granularity, this may need to be straightened out in the future.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a07131a
  6. 16 Oct, 2007 1 commit
    • darin's avatar
      WebCore: · d4efa444
      darin authored
              Reviewed by Adele.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=15525
                transpose (control-T) should do the last two characters on a line if at end of line
              - remove unused CommandByName class
              - move transpose command implementation here from Mac OS X WebKit
      
              * editing/Editor.h:
              * editing/Editor.cpp:
              (WebCore::execTranspose): Added.
              (WebCore::Editor::transpose): Added. This has the transpose implementation from
              WebCoreFrameBridge and WebHTMLView, translated into WebCore-style C++ and with
              a special case for the end of a paragraph.
      
              * page/Frame.h: Removed unused command() function member.
              * page/FramePrivate.h: Removed unused m_command data member.
              * page/Frame.cpp: Ditto.
      
              * page/mac/WebCoreFrameBridge.h: Removed rangeOfCharactersAroundCaret method.
              * page/mac/WebCoreFrameBridge.mm: Ditto.
      
              * WebCore.pro: Removed CommandByName.h/cpp.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
      
              * editing/CommandByName.cpp: Removed.
              * editing/CommandByName.h: Removed.
      
      WebKit:
      
              Reviewed by Adele.
      
              - moved transpose command implementation into WebCore
      
              * WebView/WebHTMLView.mm: Removed transpose: and replaced it with standard WebCore forwarding.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d4efa444
  7. 13 Sep, 2007 1 commit
    • darin's avatar
      WebCore: · ead9a459
      darin authored
              Reviewed by Oliver.
      
              - fix <rdar://problem/5470457> REGRESSION: Input method inline hole is mishandled in text
                <input> elements with maxlength limit
      
              * editing/Editor.h: Moved MarkedTextUnderline here and renamed it CompositionUnderline.
              Moved the rest of the marked text API here and used the term that will be more familiar
              to those on platforms other than Macintosh, "composition". This helps prevent confusion
              with the other kinds of mark -- the emacs "mark" and spelling/grammar marks. Also
              cleaned up the conditionals a bit for the Macintosh-specific parts of this header.
      
              * editing/Editor.cpp:
              (WebCore::Editor::Editor): Updated for name change.
              (WebCore::Editor::clear): Added. To be called by FrameLoader::clear().
              (WebCore::Editor::insertTextWithoutSendingTextEvent): Removed code to make inserted
              text replace the marked text range -- we now deal with this explicitly by not
              calling this function to replace marked text. Also removed unneeded code that was
              specific to the use of this to replace the marked text.
              (WebCore::Editor::selectComposition): Renamed from selectMarkedText. Updated since
              the composition range is not stored as a Range.
              (WebCore::Editor::confirmComposition): Added. To be called when changing a composition
              into actual text. Unlike the old code path, deletes the composition first, then inserts
              the text, triggering the normal insertion code path and events. This is helpful because
              it means the inserted text will be truncated by the <input> element, for example.
              (WebCore::Editor::confirmCompositionWithoutDisturbingSelection): Added.
              (WebCore::Editor::setComposition): Added. To be called when changing the composition.
              Takes parameters for the underlines and selection. Unlike the old code path, this passes
              a flag down that indicates the inserted text is part of a composition. This is helpful
              because we don't send the event that will cause the <input> element to do truncation.
              It's also a better API for future improvements to our input method handling.
              (WebCore::Editor::revealSelectionAfterEditingOperation): Updated for name change.
              (WebCore::Editor::setIgnoreCompositionSelectionChange): Ditto.
              (WebCore::Editor::compositionRange): Added. Needed now that the composition is not
              stored as a Range.
              (WebCore::Editor::getCompositionSelection): Added.
      
              * editing/TypingCommand.h:
              * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertText):
              Added an insertedTextIsComposition parameter, and don't send the BeforeTextInsertedEvent
              if it's true.
      
              * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Replaced the Macintosh-specific
              call to setMarkedTextRange with a call to the new Editor::clear().
      
              * page/Frame.h:
              * page/Frame.cpp:
              * page/FramePrivate.h:
              * page/mac/FrameMac.mm:
              Removed the marked text code. It was streamlined and moved to Editor, except for the
              Mac-specific code, which was moved into WebKit.
      
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm: Removed some now-unneeded marked text code.
              (-[WebCoreFrameBridge markedTextNSRange]): Updated for name/API change.
      
              * rendering/InlineTextBox.h:
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paint): Updated marked text code for name changes, and also
              streamlined the code a bit for the case where there is no composition.
              (WebCore::InlineTextBox::paintCompositionBackground): Name change.
              (WebCore::InlineTextBox::paintCompositionUnderline): Ditto.
      
              * rendering/RenderTextControl.h:
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::finishText): Added. Helper function shared by the
              (WebCore::RenderTextControl::text):
              (WebCore::getNextSoftBreak):
              (WebCore::RenderTextControl::textWithHardLineBreaks):
      
              * platform/CharacterNames.h: Added newlineCharacter.
      
              * dom/Range.h: Remove the now-unneeded version of toString that converts <br>
              elements into newlines.
              * dom/Range.cpp:
              (WebCore::Range::toString): Changed this to use a Vector<UChar> instead of
              a String so it will not have pathological reallocation performance, and removed
              the <br> feature.
              (WebCore::Range::pastEndNode): Made this return 0 when there is no start node.
              This bit of extra robustness guarantees you can't do a null dereference if the
              start node is 0 and the end node is not. Not sure this case really exists.
      
              * page/ContextMenuController.cpp: (ContextMenuController::contextMenuItemSelected):
              Removed a semi-bogus use of Range::toString(true). The right function to use here
              is plainText().
      
              * bridge/EditorClient.h: Removed obsolete markedTextAbandoned function.
      
              * WebCore.exp: Updated for above changes. 
      
      WebKit:
      
              Reviewed by Oliver.
      
              - fix <rdar://problem/5470457> REGRESSION: Input method inline hole is mishandled in text
                <input> elements with maxlength limit
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _selectionChanged]): Tweaked code a bit.
              (-[WebHTMLView markedRange]): Simplified logic, since markedTextNSRange works when there's
              no composition range.
              (-[WebHTMLView hasMarkedText]): Call directly to Editor instead of bridge.
              (-[WebHTMLView unmarkText]): Call new confirmComposition to make it clear that this is
              confirming text, not just unmarking it to discard it.
              (extractUnderlines): Added. Converts directly from an NSAttributedString to the
              CompositionUnderline vector that's used by WebCore.
              (-[WebHTMLView setMarkedText:selectedRange:]): Changed to use the new setComposition.
              (-[WebHTMLView insertText:]): Changed to use confirmComposition when appropriate, instead
              of relying on special behavior of Editor::insertText.
              (-[WebHTMLView _updateSelectionForInputManager]): Rewrote to use getCompositionSelection
              and confirmCompositionWithoutDisturbingSelection.
      
              * WebCoreSupport/WebEditorClient.h:
              * WebCoreSupport/WebEditorClient.mm:
              Removed obsolete markedTextAbandoned function.
      
      win:
      
              Reviewed by Oliver.
      
              - fix <rdar://problem/5470457> REGRESSION: Input method inline hole is mishandled in text
                <input> elements with maxlength limit
      
              * WebView.cpp:
              (WebView::resetIME): Change to use confirmCompositionWithoutDisturbingSelection.
              (WebView::updateSelectionForIME): Update for name changes, and to use new functions
              in Editor.
              (WebView::onIMEStartComposition): Removed unneeded call to unmarkText.
              (compositionToUnderlines): Removed startOffset parameter, since setComposition now
              handles this.
              (WebView::onIMEComposition): Changed to use confirmComposition and setComposition.
              Logic gets a lot cleaner.
              (WebView::onIMEEndComposition): Removed unneeded calls to Editor.
              (WebView::onIMERequestCharPosition): Updated for name changes.
      
      LayoutTests:
      
              Reviewed by Oliver.
      
              - updated test results changed by change in input manager logic
      
              * platform/mac/editing/input/firstrectforcharacterrange-styled-expected.txt:
              * platform/mac/editing/input/text-input-controller-expected.txt:
              * platform/mac/editing/input/wrapped-line-char-rect-expected.txt:
              Updated. Small changes in which delegate methods are called.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ead9a459
  8. 28 Aug, 2007 1 commit
    • andersca's avatar
      WebCore: · 878d2ffb
      andersca authored
              Reviewed by Darin.
      
              <rdar://problem/5424866> Bottom portion of any Web Clip widget appears transparent
      
              Restore the previous behavior, creating plug-ins on attach, for WebKit plug-ins. Netscape plug-ins
              are still created during the first layout.
              
              * html/HTMLEmbedElement.cpp:
              (WebCore::HTMLEmbedElement::getInstance):
              Only call layout if the renderer doesn't have a widget.
              
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::getInstance):
              Likewise.
              
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::shouldUsePlugin):
              Update for enum change.
              
              * loader/FrameLoaderTypes.h:
              Add ObjectContentNetscapePlugin and ObjectContentOtherPlugin.
              
              * page/mac/WebCoreFrameBridge.h:
              Get rid of the enum here, we can use the one in FrameLoaderTypes.h
              
              * rendering/RenderPartObject.cpp:
              (WebCore::RenderPartObject::updateWidget):
              Only create the plug-in if it's not a Netscape plug-in.
              
              (WebCore::RenderPartObject::layout):
              Fix indentation.
      
      WebKit:
      
              Reviewed by Darin.
      
              <rdar://problem/5424866> Bottom portion of any Web Clip widget appears transparent
              
              * WebCoreSupport/WebFrameBridge.mm:
              Use the enum from FrameLoaderTypes.h.
              
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::objectContentType):
              Return ObjectContentNetscapePlugin and ObjectContentOtherPlugin depending on the plug-in type.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      878d2ffb
  9. 17 Aug, 2007 1 commit
    • andersca's avatar
      LayoutTests: · f2184b9d
      andersca authored
              Reviewed by Dave Hyatt.
      
              <rdar://problem/5379040>
              REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes
              
              Add test.
              
              * plugins/netscape-plugin-setwindow-size-expected.txt: Added.
              * plugins/netscape-plugin-setwindow-size.html: Added.
      
      WebCore:
      
              Reviewed by Dave Hyatt.
              
              <rdar://problem/5379040>
              REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes
      
              Instantiate plug-ins during the first layout instead of doing so when creating the renderer.
              This ensures that the plug-in widget will have a correct initial size.
              
              * html/HTMLEmbedElement.cpp:
              (WebCore::HTMLEmbedElement::getInstance):
              Force a layout if the plug-in doesn't have an instance.
              
              (WebCore::HTMLEmbedElement::attach):
              Pass true to updateWidget, causing it to only create a widget if it won't be a plug-in.
              
              * html/HTMLIFrameElement.cpp:        
              (WebCore::HTMLIFrameElement::attach):
              Pass false to updateWidget, this will only create subframes anyway.
              
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::getInstance):
              Force a layout if the plug-in doesn't have an instance.
              
              (WebCore::HTMLObjectElement::attach):
              Pass true to updateWidget, causing it to only create a widget if it won't be a plug-in.
              
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::loadPlugin):
              Get the size from the renderer and pass it to the client.
              
              * loader/FrameLoaderClient.h:
              * page/mac/WebCoreFrameBridge.h:
              * platform/graphics/svg/SVGImageEmptyClients.h:
              (WebCore::SVGEmptyFrameLoaderClient::createPlugin):
              Update declarations.
              
              * rendering/RenderPart.cpp:
              (WebCore::RenderPart::setWidget):
              No need to mark the renderer as dirty here.
              
              * rendering/RenderPartObject.h:
              * rendering/RenderPartObject.cpp:
              (WebCore::RenderPartObject::updateWidget):
              Add a parameter, onlyCreateNonPlugins. If this is true the widget 
              will only be created if it's not a plug-in.
              
              (WebCore::RenderPartObject::layout):
              Call updateWidget here if m_widget is 0, causing the plug-in to be instantiated.
      
      WebKit:
      
              Reviewed by Dave Hyatt.
      
              <rdar://problem/5379040> 
              REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes
              
              Pass the right size when creating the views.
              
              * WebCoreSupport/WebFrameBridge.mm:
              (-[WebFrameBridge viewForPluginWithFrame:URL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
              * WebCoreSupport/WebFrameLoaderClient.h:
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::createPlugin):
      
      WebKitTools:
      
              Reviewed by Dave Hyatt.
      
              <rdar://problem/5379040>
              REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes
      
              Add a way for the plug-in to dump the width and height when it gets its  NPP_SetWindow call.
              
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
              (pluginAllocate):
              * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
              * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
              (NPP_New):
              (NPP_SetWindow):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f2184b9d
  10. 10 Aug, 2007 1 commit
    • thatcher's avatar
      JavaScriptCore: · 43a079ef
      thatcher authored
              Reviewed by Adam.
      
              <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit
      
              Disable the NPAPI for 64-bit on Mac OS X.
      
              * Configurations/JavaScriptCore.xcconfig: Use the 64-bit export file.
              * JavaScriptCore.xcodeproj/project.pbxproj: Create a 64-bit export file
              that filters out the NPN fnctions.
              * bindings/NP_jsobject.cpp: #ifdef out this for 64-bit on Mac OS X
              * bindings/NP_jsobject.h: Ditto.
              * bindings/c/c_class.cpp: Ditto.
              * bindings/c/c_class.h: Ditto.
              * bindings/c/c_instance.cpp: Ditto.
              * bindings/c/c_instance.h: Ditto.
              * bindings/c/c_runtime.cpp: Ditto.
              * bindings/c/c_runtime.h: Ditto.
              * bindings/c/c_utility.cpp: Ditto.
              * bindings/c/c_utility.h: Ditto.
              * bindings/npapi.h: Ditto.
              * bindings/npruntime.cpp: Ditto.
              * bindings/npruntime.h: Ditto.
              * bindings/npruntime_impl.h: Ditto.
              * bindings/npruntime_priv.h: Ditto.
              * bindings/runtime.cpp:
              (KJS::Bindings::Instance::createBindingForLanguageInstance):
               don't creat an NPObject on Mac OS X in 64-bit.
      
      WebCore:
      
              Reviewed by Adam.
      
              <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit
      
              Disable NPObject use in 64-bit on Mac OS X.
      
              * Configurations/WebCore.xcconfig: Add a framework search path to the sub-framworks of Carbon.
              * WebCore.xcodeproj/project.pbxproj: Filter out the Frame::windowScriptNPObject() symbol in 64-bit.
              * bindings/objc/DOM.mm:
              (-[DOMElement _NPObject]): Return null in 64-bit.
              * config.h: Set WTF_USE_NPOBJECT to 0 in 64-bit Mac OS X.
              * page/Frame.cpp:
              (WebCore::Frame::cleanupScriptObjects): Add more #if USE(NPOBJECT) blocks where needed.
              * page/Frame.h: Ditto.
              * page/mac/FrameMac.mm:
              (WebCore::Frame::createScriptInstanceForWidget): Ditto.
              * page/mac/WebCoreFrameBridge.h: Ditto.
              * page/mac/WebCoreFrameBridge.mm: Ditto.
      
      WebKit:
      
              Reviewed by Adam.
      
              <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit
      
              Disable NPObject use in 64-bit on Mac OS X. Also generate the 64-bit export file.
      
              * Configurations/WebKit.xcconfig: Point to the generated 64-bit export file.
              * Plugins/WebBasePluginPackage.h:
              * Plugins/npfunctions.h: #ifdef out this header in 64-bit on Mac OS X.
              * WebKit.LP64.exp: Removed.
              * WebKit.xcodeproj/project.pbxproj: Generate the the 64-bit export file.
              * WebKitPrefix.h: Define WTF_USE_NPOBJECT.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      43a079ef
  11. 24 Jul, 2007 1 commit
    • oliver's avatar
      WebCore: · 55cc92b5
      oliver authored
              Reviewed by Adam and Justin.
      
              <rdar://problem/5141779> WebView editableDOMRangeForPoint: & moveDragCaretToPoint: returns last position in DOMText range
      
              Remove bridge implementation for editableDOMRangeForPoint: and moveDragCaretToPoint:. 
              Now use cross-platform code Editor::rangeForPoint and DragController::placeDragCaret instead.
              This required lifting local code from DragController.cpp into the shared methods
              Frame::visiblePositionForPoint and Frame::documentAtPoint.
      
              * WebCore.exp:
              * editing/Editor.cpp:
              (WebCore::Editor::rangeForPoint):
              * editing/Editor.h:
              * page/DragController.cpp:
              (WebCore::DragController::dragEnded):
              (WebCore::DragController::performDrag):
              (WebCore::DragController::dragEnteredOrUpdated):
              (WebCore::DragController::tryDocumentDrag):
              (WebCore::DragController::operationForLoad):
              (WebCore::setSelectionToDragCaret):
              (WebCore::DragController::concludeDrag):
              (WebCore::DragController::placeDragCaret):
              * page/DragController.h:
              * page/Frame.cpp:
              (WebCore::Frame::visiblePositionForPoint):
              (WebCore::Frame::documentAtPoint):
              * page/Frame.h:
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
      
      WebKit:
      
              Reviewed by Adam and Justin.
      
              <rdar://problem/5141779> WebView editableDOMRangeForPoint: & moveDragCaretToPoint: returns last position in DOMText range
      
              editableDOMRangeForPoint:, moveDragCaretToPoint:, and removeDragCaret now call directly into
              WebCore without relying on bridge look up through the now removed _bridgeAtPoint:.
      
              * WebKit.xcodeproj/project.pbxproj:
              * WebView/WebView.mm:
              (-[WebView moveDragCaretToPoint:]):
              (-[WebView removeDragCaret]):
              (-[WebView editableDOMRangeForPoint:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@24616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      55cc92b5
  12. 16 Jul, 2007 1 commit
    • aroben's avatar
      Replace Frame::print with Chrome::print and remove -[WebFrameBridge print] · a64dcca8
      aroben authored
      WebCore:
      
              Replace Frame::print with Chrome::print
      
              This also adds a Frame* parameter to Chrome::print and
              ChromeClient::print so that it knows which Frame to print.
      
              Reviewed by Darin.
      
              All tests pass.
      
              * bindings/js/kjs_window.cpp:
              (KJS::WindowFunc::callAsFunction): Call Chrome::print.
              * editing/JSEditor.cpp: Ditto.
      
              * bridge/win/FrameWin.cpp: Removed Frame::print.
              * page/Frame.h: Ditto.
              * page/mac/FrameMac.mm: Ditto.
              * page/qt/FrameQt.cpp: Ditto.
              * platform/gdk/FrameGdk.cpp: Ditto.
              * page/mac/WebCoreFrameBridge.h: Removed -print.
      
              * page/Chrome.cpp: Added Frame* parameter to Chrome::print and pass it
              up to the ChromeClient.
              * page/Chrome.h: Ditto.
              * page/ChromeClient.h: Ditto.
              * platform/gdk/TemporaryLinkStubs.cpp: Ditto.
              * platform/graphics/svg/SVGImageEmptyClients.h: Ditto.
      
      WebKit:
      
              Move printing from WebFrameBridge to WebChromeClient
      
              Reviewed by Darin.
      
              * WebCoreSupport/WebChromeClient.h: Updated for ChromeClient changes.
              * WebCoreSupport/WebChromeClient.mm:
              (WebChromeClient::print): Moved code from WebFrameBridge.
              * WebCoreSupport/WebFrameBridge.mm: Removed -print.
      
      WebKit/win:
      
              Updated WebChromeClient for ChromeClient changes.
      
              Reviewed by Darin.
      
              * WebChromeClient.cpp:
              (WebChromeClient::print): Added a Frame* parameter.
              * WebChromeClient.h: Ditto.
      
      WebKitQt:
      
              Updated ChromeClientQt for ChromeClient changes.
      
              Reviewed by Darin.
      
              * WebCoreSupport/ChromeClientQt.cpp:
              (WebCore::ChromeClientQt::print): Added a Frame* parameter.
              * WebCoreSupport/ChromeClientQt.h: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@24330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a64dcca8
  13. 06 Jul, 2007 1 commit
    • oliver's avatar
      WebCore: · 4c510c0f
      oliver authored
              Reviewed by Maciej.
      
              Pulled a number of methods from WebKit and WebCoreFrameBridge into 
              C++ objects.
      
              * WebCore.exp:
              * WebCore.xcodeproj/project.pbxproj:
              * editing/Editor.cpp:
              (WebCore::Editor::replaceMarkedText):
                  From -[WebCoreFrameBridge replaceMarkedTextWithText:]
              * editing/Editor.h:
              * page/Frame.cpp:
              (WebCore::Frame::setMarkedTextRange):
                  Pulled platform independent logic from Mac specific implementation
              (WebCore::Frame::selectRangeInMarkedText):
                  Converted from -[WebHTMLView _selectRangeInMarkedText:]
              * page/Frame.h:
              * page/mac/FrameMac.mm:
              (WebCore::Frame::setMarkedTextRange):
                  Now only does Mac specific logic when manipulating initial
                  NSAttributedString
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
                  Removed -[WebCoreFrameBridge replaceMarkedTextWithText:]
      
      WebKit:
      
              Reviewed by Maciej.
      
              <rdar://problem/5318756> Need to refactor IM/Marked text code to share logic with windows.
      
              Moved a number of methods from WebHTMLView into WebCore.
              Replaced bridge methods with calls directly into WebCore objects.
      
              * WebKit.xcodeproj/project.pbxproj:
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView setMarkedText:selectedRange:]):
                Now calls WebCore object methods directly, rather than calling 
                via the bridge.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@24085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4c510c0f
  14. 04 Jul, 2007 1 commit
    • aliceli1's avatar
      Reviewed by Adam. · 7f9f8407
      aliceli1 authored
              Fixed <rdar://problem/5225119> support smart pasting on Windows
      
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
                  Added new files
              * editing/SmartReplace.cpp: Added.
              (WebCore::isCharacterSmartReplaceExempt):
                  Added non-CF implementation placeholder
              * editing/SmartReplace.h: Added.
              * editing/SmartReplaceCF.cpp: Added.
              (WebCore::getSmartSet):
              (WebCore::isCharacterSmartReplaceExempt):
                  Added new implementation
      
              * bridge/win/FrameWin.cpp:
              * page/Frame.h:
              * page/mac/FrameMac.mm:
                  Removed old declaration and implementation
      
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::doApply):
                  Changed to call the new function instead of old
      
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
                  Removed old declaration and implementation
              (-[WebCoreFrameBridge smartInsertForString:replacingRange:beforeString:afterString:]):
                  Changed to call the new function instead of old
      
              * platform/win/PasteboardWin.cpp:
              (WebCore::Pasteboard::Pasteboard):
                  Register new clipboard format
              (WebCore::Pasteboard::writeSelection):
                  Set data for smartpaste format on clipboard
              (WebCore::Pasteboard::canSmartReplace):
                  Added non-stub implementation
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f9f8407
  15. 25 May, 2007 1 commit
    • ggaren's avatar
      WebCore: · 2e941233
      ggaren authored
              Reviewed by Darin Adler.
      
              Fixed <rdar://problem/5055182> The page cache has no global cap.
              
              Beefed up the PageCache class to track which HistoryItems are 
              cached, and decide how to evict old HistoryItems as new ones are
              added.
      
              * history/BackForwardList.cpp: Removed support for managing the page cache
              through the BackForwardList since this is deprecated in Mac's 
              WebBackForwardList, and doesn't exist on other platforms.
              
              Added a Page* back pointer so that Mac WebBackForwardList can still support 
              its deprecated API, using the new hotness. This isn't a big burden, since 
              Page is responsible for calling BackForwardList::close upon destruction, 
              anyway.
      
              * history/HistoryItem.cpp: Replaced CachedPage* with boolean that tells
              you whether you're in the page cache. This prevents us from having more
              than one persistent repository for cached pages.
      
              * history/PageCache.cpp: If you're playing along at home, this code is 
              the reason for the patch.
      
              * loader/FrameLoader.cpp: If you're playing along at home, the minuses in
              this file are the reason for the patch.
              
              Replaced call to FrameLoaderClient::loadedFromCachedPage with its one-line
              implementation because WebCore calling itself through WebKit is uncivilized.
      
              * page/Settings.cpp: Added support for removing a Page's HistoryItems from
              the page cache.
      
      WebKit:
      
              Reviewed by Darin Adler.
      
              Fixed <rdar://problem/5055182> The page cache has no global cap.
              
              The main WebKit changes are:
                  1. Changed -[WebBackForwardList setPageCacheSize] and -[WebBackForwardList 
                  pageCacheSize] to accomodate the new global page cache model, updating
                  their documentation. 
                  
                  2. Added -[WebPreferences setShouldUsePageCache] and -[WebPreferences 
                  shouldUsePageCache] as pending public API.
                  
                  3. Centralized calculation of object cache and page cache sizes inside
                  WebPreferences. 
                  
                  Cchanged our old behavior of reading a preference and applying a fudge 
                  factor with a new behavior of just using the preference directly. The 
                  old behavior was confusing and often inappropriate. (For example, if 
                  you set a page cache size of 100, a 256MB machine would somewhat 
                  arbitrarily reduce that number to 98. ???)
      
              * WebView/WebView.mm: Added support for two flags to determine whether
              to use the page cache. If either -[WebBackForwardList setPageCacheSize:0]
              or -[WebPreferences setShouldUsePageCache:NO] is called, we don't use
              the page cache.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e941233
  16. 15 May, 2007 1 commit
    • oliver's avatar
      2007-05-15 Oliver Hunt <oliver@apple.com> · 889f22d8
      oliver authored
      WebCore:
      
              Reviewed by Sam and Geoff.
      
              Removing dead code left behind from drag and drop refactoring.
      
              * page/mac/WebCoreFrameBridge.h:
      
      WebKit:
      
              Reviewed by Sam and Geoff.
              
              Removing dead code left behind from drag and drop refactoring.
      
              * WebCoreSupport/WebFrameBridge.mm:
              * WebView/WebHTMLView.mm:
              * WebView/WebHTMLViewPrivate.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      889f22d8
  17. 27 Apr, 2007 1 commit
    • harrison's avatar
      WebCore: · 218a3991
      harrison authored
              Reviewed by Darin.
      
              <rdar://problem/5160627> Export JS list creation support as ObjC SPI for Mail
      
              * WebCore.exp:
              * editing/Editor.h:
              * editing/Editor.cpp:
              (WebCore::Editor::insertOrderedList):
              (WebCore::Editor::insertUnorderedList):
              (WebCore::Editor::canIncreaseSelectionListLevel):
              (WebCore::Editor::canDecreaseSelectionListLevel):
              (WebCore::Editor::increaseSelectionListLevel):
              (WebCore::Editor::increaseSelectionListLevelOrdered):
              (WebCore::Editor::increaseSelectionListLevelUnordered):
              (WebCore::Editor::decreaseSelectionListLevel):
              Add insertOrderedList() and insertUnorderedList().
              Move existing list management functions from WebCoreFrameBridge.
              The level increasing functions now return a PassRefPtr<Node> instead of Node.
              Add check for canEditRichly.
              
              - in many other functions, condense the check for nil client().
              
              * editing/InsertListCommand.h:
              * editing/InsertListCommand.cpp:
              (WebCore::InsertListCommand::insertList):
              (WebCore::InsertListCommand::fixOrphanedListChild):
              (WebCore::InsertListCommand::doApply):
              Add insertList(), which returns the new list element.
              Don't set the list element's ID if the specified ID was an empty string.
                      
              * editing/ModifySelectionListLevel.h:
              * editing/ModifySelectionListLevel.cpp:
              (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelWithType):
              (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel):
              (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered):
              (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered):
              Return PassRefPtr<Node> instead of Node.
      
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
              Move list management functions to Editor.h and Editor.cpp.
      
      WebKit:
      
              Reviewed by Darin.
      
              <rdar://problem/5160627> Export JS list creation support as ObjC SPI for Mail
      
              * WebKit.xcodeproj/project.pbxproj:
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _selectedRange]):
              (-[WebHTMLView _shouldDeleteRange:]):
              (-[WebHTMLView _canEdit]):
              (-[WebHTMLView _canEditRichly]):
              (-[WebHTMLView _hasSelection]):
              (-[WebHTMLView _hasSelectionOrInsertionPoint]):
              (-[WebHTMLView _hasInsertionPoint]):
              (-[WebHTMLView _isEditable]):
              Condense the check for nil [self frame].
              Remove canEditRichly checks and rely on the editor to do the check instead.
              
              (-[WebHTMLView _insertOrderedList]):
              (-[WebHTMLView _insertUnorderedList]):
              New.
              
              (-[WebHTMLView _canIncreaseSelectionListLevel]):
              (-[WebHTMLView _canDecreaseSelectionListLevel]):
              (-[WebHTMLView _increaseSelectionListLevel]):
              (-[WebHTMLView _increaseSelectionListLevelOrdered]):
              (-[WebHTMLView _increaseSelectionListLevelUnordered]):
              (-[WebHTMLView _decreaseSelectionListLevel]):
              Moved from bridge to frame editor.
      
              * WebView/WebHTMLViewPrivate.h:
              Add _insertOrderedList and _insertUnorderedList to WebHTMLView(WebPrivate)
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      218a3991
  18. 10 Apr, 2007 1 commit
    • beidson's avatar
      WebCore: · 448a6e77
      beidson authored
              Reviewed by Darin
      
              <rdar://problem/4887095> - PageCache and PageState should be combined
      
              These two objects are a relic of when the PageCache was split between WebCore and WebKit
              It just makes good sense to combine them now, and the new object is more appropriately
              called "CachedPage"
      
              This patch is vast in scope, but simple in depth - anywhere a PageCache or PageState object 
              was used has been adjusted to use a CachedPage object instead.  The most notable change is
              that HistoryItem - which always used to have a PageCache object which may or may not have 
              had a PageState - now may or may not have a CachedPage.  This actually simplifies the 
              HistoryItem code a bit while making the role of CachedPage much more clear.
      
              * WebCore.exp:
              * WebCore.xcodeproj/project.pbxproj:
      
              * history/BackForwardList.cpp:
              (WebCore::BackForwardList::addItem):
              (WebCore::BackForwardList::setCapacity):
              (WebCore::BackForwardList::setPageCacheSize):
              (WebCore::BackForwardList::clearPageCache):
              (WebCore::BackForwardList::close):
      
              * history/PageCache.cpp: Removed.
              * history/PageCache.h: Removed.
              * page/PageState.cpp: Removed.
              * page/PageState.h: Removed.
              * history/CachedPage.cpp: Added.
              (WebCore::CachedPage::create):
              (WebCore::CachedPage::CachedPage):
              (WebCore::CachedPage::~CachedPage):
              (WebCore::CachedPage::restore):
              (WebCore::CachedPage::clear):
              (WebCore::CachedPage::setDocumentLoader):
              (WebCore::CachedPage::documentLoader):
              (WebCore::CachedPage::setTimeStamp):
              (WebCore::CachedPage::setTimeStampToNow):
              (WebCore::CachedPage::timeStamp):
              * history/CachedPage.h: Added.
              (WebCore::CachedPage::document):
              (WebCore::CachedPage::mousePressNode):
              (WebCore::CachedPage::URL):
      
              * history/HistoryItem.cpp:
              (WebCore::HistoryItem::HistoryItem):
              (WebCore::HistoryItem::setCachedPage):
              (WebCore::HistoryItem::setURL):
              (WebCore::HistoryItem::alwaysAttemptToUseCachedPage):
              (WebCore::HistoryItem::setAlwaysAttemptToUseCachedPage):
              (WebCore::HistoryItem::cachedPage):
              (WebCore::cachedPagesPendingRelease):
              (WebCore::HistoryItem::releaseCachedPagesOrReschedule):
              (WebCore::HistoryItem::releaseAllPendingCachedPages):
              (WebCore::HistoryItem::scheduleCachedPageForRelease):
              * history/HistoryItem.h:
              * history/mac/HistoryItemMac.mm:
      
              * history/HistoryItemTimer.cpp:
              (WebCore::HistoryItemTimer::HistoryItemTimer):
              (WebCore::HistoryItemTimer::callReleaseCachedPagesOrReschedule):
              * history/HistoryItemTimer.h:
      
              * history/mac/PageCacheMac.mm: Removed.
              * history/mac/CachedPageMac.mm: Added.
              (WebCore::CachedPage::close):
              (WebCore::CachedPage::setDocumentView):
              (WebCore::CachedPage::documentView):
      
              * loader/DocumentLoader.cpp:
              (WebCore::DocumentLoader::DocumentLoader):
              (WebCore::DocumentLoader::loadFromCachedPage):
              (WebCore::DocumentLoader::setLoadingFromCachedPage):
              (WebCore::DocumentLoader::isLoadingFromCachedPage):
              * loader/DocumentLoader.h:
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::provisionalLoadStarted):
              (WebCore::FrameLoader::commitProvisionalLoad):
              (WebCore::FrameLoader::transitionToCommitted):
              (WebCore::FrameLoader::open):
              (WebCore::FrameLoader::startLoading):
              (WebCore::FrameLoader::receivedMainResourceError):
              (WebCore::FrameLoader::opened):
              (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
              (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
              (WebCore::FrameLoader::cachePageToHistoryItem):
              (WebCore::FrameLoader::createHistoryItem):
              (WebCore::FrameLoader::purgePageCache):
              (WebCore::FrameLoader::invalidateCurrentItemCachedPage):
              (WebCore::FrameLoader::loadItem):
              (WebCore::FrameLoader::updateHistoryForStandardLoad):
              (WebCore::FrameLoader::updateHistoryForClientRedirect):
              (WebCore::FrameLoader::updateHistoryForBackForwardNavigation):
              (WebCore::FrameLoader::updateHistoryForReload):
              (WebCore::FrameLoader::updateHistoryForInternalLoad):
              (WebCore::FrameLoader::updateHistoryForCommit):
              * loader/FrameLoader.h:
              * loader/FrameLoaderClient.h:
      
              * page/mac/WebCoreFrameBridge.h: Got rid of unused WebCorePageCacheStateKey
              * page/mac/WebCoreFrameBridge.mm: Ditto
      
              * platform/graphics/svg/SVGImage.cpp:
              * platform/graphics/svg/SVGImageEmptyClients.h: Update to reflect the new names
              (WebCore::SVGEmptyFrameLoaderClient::loadProvisionalItemFromCachedPage):
              (WebCore::SVGEmptyFrameLoaderClient::invalidateCurrentItemCachedPage):
              (WebCore::SVGEmptyFrameLoaderClient::loadedFromCachedPage):
              (WebCore::SVGEmptyFrameLoaderClient::clearLoadingFromCachedPage):
              (WebCore::SVGEmptyFrameLoaderClient::isLoadingFromCachedPage):
              (WebCore::SVGEmptyFrameLoaderClient::setDocumentViewFromCachedPage):
              (WebCore::SVGEmptyFrameLoaderClient::saveDocumentViewToCachedPage):
      
      WebKit:
      
              Reviewed by Darin
      
              <rdar://problem/4887095> - PageCache and PageState should be combined
      
              WebKit side of the change to reflect the new object name of CachedPage and new Client method names
      
              * History/WebHistoryItem.mm:
              (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
              (+[WebHistoryItem _releaseAllPendingPageCaches]):
              (-[WebWindowWatcher windowWillClose:]):
      
              * WebCoreSupport/WebFrameLoaderClient.h:
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::setDocumentViewFromCachedPage):
              (WebFrameLoaderClient::loadedFromCachedPage):
              (WebFrameLoaderClient::saveDocumentViewToCachedPage):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      448a6e77
  19. 18 Mar, 2007 1 commit
    • hyatt's avatar
      WebCore: · 0fa2fbcf
      hyatt authored
              Move frame borders out of WebKit and into WebCore.
      
              Reviewed by aroben, olliej
      
              * bridge/mac/FrameViewMac.mm:
              * css/html4.css:
              * html/HTMLFrameSetElement.cpp:
              (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
              (WebCore::HTMLFrameSetElement::mapToEntry):
              (WebCore::HTMLFrameSetElement::parseMappedAttribute):
              (WebCore::HTMLFrameSetElement::attach):
              * html/HTMLFrameSetElement.h:
              (WebCore::HTMLFrameSetElement::hasBorderColor):
              * page/FrameView.cpp:
              (WebCore::FrameViewPrivate::FrameViewPrivate):
              * page/FrameView.h:
              * page/mac/WebCoreFrameBridge.h:
              * platform/graphics/IntRect.h:
              (WebCore::IntRect::topLeft):
              (WebCore::IntRect::topRight):
              (WebCore::IntRect::bottomLeft):
              (WebCore::IntRect::bottomRight):
              * rendering/RenderFrame.cpp:
              (WebCore::RenderFrame::viewCleared):
              * rendering/RenderFrameSet.cpp:
              (WebCore::borderStartEdgeColor):
              (WebCore::borderEndEdgeColor):
              (WebCore::RenderFrameSet::paintColumnBorder):
              (WebCore::RenderFrameSet::paintRowBorder):
              (WebCore::RenderFrameSet::paint):
              * rendering/RenderFrameSet.h:
              * rendering/RenderPartObject.cpp:
              (WebCore::RenderPartObject::viewCleared):
              * rendering/RenderView.cpp:
              (WebCore::RenderView::repaintViewRectangle):
      
      WebKit:
      
              Move frame borders out of WebKit and into WebCore.
      
              Reviewed by aroben, olliej
      
              * WebCoreSupport/WebFrameBridge.mm:
              * WebKit.xcodeproj/project.pbxproj:
              * WebView/WebFrameView.mm:
              (-[WebFrameView drawRect:]):
              (-[WebFrameView setFrameSize:]):
              * WebView/WebFrameViewInternal.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0fa2fbcf
  20. 13 Mar, 2007 1 commit
    • oliver's avatar
      2007-03-13 Oliver Hunt <oliver@apple.com> · a258f43a
      oliver authored
              Reviewed by Brady.
      WebCore:
              To fix <rdar://problem/5044366> we now pass a NSString
              representation of the URL extracted with _web_originalDataAsString
              instead of relying on [NSURL absoluteString] in the bridge
      
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge getData:andResponse:forURL:]):
      WebKit:
              Modify subresourceForURL to take NSString argument 
              so we can avoid [NSURL absoluteString]
      
              * WebView/WebDataSource.mm:
              (-[WebDataSource subresourceForURL:]):
      LayoutTests:
              Test for <rdar://problem/5044366> make sure we can create
              a WebArchive from a page with a partially decoded url.
      
              * webarchive/archive-with-unencoded-url-expected.txt: Added.
              * webarchive/archive-with-unencoded-url.html: Added.
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a258f43a
  21. 11 Mar, 2007 1 commit
    • oliver's avatar
      2007-03-11 Oliver Hunt <oliver@apple.com> · 7bb7dc3d
      oliver authored
              Reviewed by Adele.
      WebCore:
              Moving Frame{Mac}::respondToChangedSelection to Frame.cpp
              Added new EditorClient method to handle old bridge function
              
              * bridge/EditorClient.h:
                 Added respondToChangedSelection to replace old bridge function
              * editing/Editor.cpp:
              (WebCore::Editor::respondToChangedSelection):
                 Add client call to replace old bridge call from Frame::respondToChangedSelection
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::setSelection):
                 No longer directly call Editor as Frame::respondToChangedSelection
                 makes the call
              * page/Frame.cpp:
              (WebCore::Frame::respondToChangedSelection):
                 Moved from FrameMac, replaced bridge call with call to Editor
              * page/mac/FrameMac.mm:
                 Moved respondToChangedSelection to Frame.cpp
              * page/mac/WebCoreFrameBridge.h:
                 Removed respondToChangedSelection from bridge
              * page/qt/FrameQt.cpp:
                 Remove stub method for respondToChangedSelection
      WebKit:
              Moved respondToChangedSelection from FrameBridge to EditorClient
      
              * WebCoreSupport/WebEditorClient.h:
              * WebCoreSupport/WebEditorClient.mm:
              (WebEditorClient::respondToChangedSelection):
              * WebCoreSupport/WebFrameBridge.mm:
                Removed respondToChangedSelection from bridge
      WebKitQt:
              Stub for EditorClientQt::respondToChangedSelection
      
              * WebCoreSupport/EditorClientQt.cpp:
              (WebCore::EditorClientQt::respondToChangedSelection):
              * WebCoreSupport/EditorClientQt.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7bb7dc3d
  22. 08 Mar, 2007 1 commit
    • thatcher's avatar
      WebCore: · 0c0b046a
      thatcher authored
              Reviewed by John.
      
              <rdar://problem/4664697> highlighter SPI needs a node parameter to give more context
      
              Pass the RenderObject's node to customHighlightLineRect and paintCustomHighlight.
      
              * page/Frame.h:
              * page/mac/FrameMac.mm:
              (WebCore::Frame::customHighlightLineRect):
              (WebCore::Frame::paintCustomHighlight):
              * page/mac/WebCoreFrameBridge.h:
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paintCustomHighlight):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::paintCustomHighlight):
              * rendering/RootInlineBox.cpp:
              (WebCore::RootInlineBox::addHighlightOverflow):
              (WebCore::RootInlineBox::paintCustomHighlight):
      
      WebKit:
      
              Reviewed by John.
      
              <rdar://problem/4664697> highlighter SPI needs a node parameter to give more context
      
              Added new methods to the WebHTMLHighlighter protocol that include the DOMNode being painted.
      
              * WebCoreSupport/WebFrameBridge.mm:
              (-[WebFrameBridge customHighlightRect:forLine:representedNode:WebCore::]):
              (-[WebFrameBridge paintCustomHighlight:forBox:onLine:behindText:entireLine:representedNode:WebCore::]):
              * WebKit.xcodeproj/project.pbxproj:
              * WebView/WebHTMLViewPrivate.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c0b046a
  23. 19 Feb, 2007 1 commit
    • mjs's avatar
      WebCore: · c13fa54c
      mjs authored
              Reviewed by Maciej.
              
              Additional coding by Maciej, additional review by Oliver.
      
              Get rid of the FrameMac and FrameQt classes. Instead
              move all methods into Frame directly, and implement
              some platform specific methods in foo/FrameFoo.cpp.
      
              Some general cleanup in Frame:
              * Move some methods out of Frame, to the place where they 
              belong.
              * Unify the different ways of creating the JavaScript wrappers
              for <object>, <embed> and <applet>
              * Some cleanup of the WebCoreFrameBridge
      
              * ForwardingHeaders/bindings/NP_jsobject.h: Added.
              * ForwardingHeaders/bindings/npruntime_impl.h: Added.
              * ForwardingHeaders/bindings/runtime_root.h: Added.
              * WebCore.exp:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/kjs_binding.cpp:
              (KJS::ScriptInterpreter::shouldInterruptScript):
              * bindings/objc/DOM.mm:
              (-[DOMNode KJS::Bindings::]):
              * bindings/objc/DOMInternal.mm:
              (-[WebScriptObject _initializeScriptDOMNodeImp]):
              * bridge/EditorClient.h:
              * bridge/mac/FrameViewMac.mm:
              (WebCore::FrameView::updateBorder):
              (WebCore::FrameView::updateDashboardRegions):
              * bridge/mac/WebCoreAXObject.mm:
              (-[WebCoreAXObject rendererForView:]):
              * dom/Position.cpp:
              (WebCore::Position::next):
              * editing/CommandByName.cpp:
              (WebCore::Frame::execCopy):
              (WebCore::Frame::execCut):
              (WebCore::Frame::execPaste):
              * editing/Editor.cpp:
              (WebCore::Editor::canEdit):
              (WebCore::Editor::pasteWithPasteboard):
              (WebCore::Editor::paste):
              (WebCore::Editor::pasteAsPlainText):
              * editing/Editor.h:
              * editing/JSEditor.cpp:
              * html/HTMLAppletElement.cpp:
              (WebCore::HTMLAppletElement::getInstance):
              * html/HTMLEmbedElement.cpp:
              (WebCore::HTMLEmbedElement::getInstance):
              * html/HTMLFormElement.cpp:
              (WebCore::HTMLFormElement::formData):
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::getInstance):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::clear):
              (WebCore::FrameLoader::detachFromParent):
              * loader/mac/ImageDocumentMac.mm:
              (WebCore::finishImageLoad):
              * loader/qt/DocumentLoaderQt.cpp:
              * page/Chrome.cpp:
              (WebCore::Chrome::shouldInterruptJavaScript):
              * page/Chrome.h:
              * page/ChromeClient.h:
              * page/Frame.cpp:
              (WebCore::Frame::~Frame):
              (WebCore::Frame::markedTextRange):
              (WebCore::Frame::shouldChangeSelection):
              (WebCore::Frame::shouldDeleteSelection):
              (WebCore::Frame::isContentEditable):
              (WebCore::Frame::setSecureKeyboardEntry):
              (WebCore::Frame::isSecureKeyboardEntry):
              (WebCore::Frame::bindingRootObject):
              (WebCore::Frame::createRootObject):
              (WebCore::Frame::windowScriptNPObject):
              (WebCore::Frame::cleanupScriptObjects):
              (WebCore::FramePrivate::FramePrivate):
              * page/Frame.h:
              * page/FramePrivate.h:
              * page/FrameView.h:
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::tabsToLinks):
              (WebCore::EventHandler::tabsToAllControls):
              (WebCore::EventHandler::focusDocumentView):
              (WebCore::EventHandler::passMouseDownEventToWidget):
              (WebCore::EventHandler::handleDrag):
              (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
              (WebCore::EventHandler::keyboardUIMode):
              * page/mac/FrameMac.h: Removed.
              * page/mac/FrameMac.mm:
              (WebCore::Frame::setBridge):
              (WebCore::Frame::bridge):
              (WebCore::Frame::searchForLabelsAboveCell):
              (WebCore::Frame::searchForLabelsBeforeElement):
              (WebCore::Frame::matchLabelsAgainstElement):
              (WebCore::Frame::focusWindow):
              (WebCore::Frame::unfocusWindow):
              (WebCore::Frame::imageFromRect):
              (WebCore::Frame::selectionImage):
              (WebCore::Frame::snapshotDragImage):
              (WebCore::Frame::fontAttributesForSelectionStart):
              (WebCore::Frame::baseWritingDirectionForSelectionStart):
              (WebCore::Frame::print):
              (WebCore::Frame::issuePasteCommand):
              (WebCore::Frame::issueTransposeCommand):
              (WebCore::Frame::respondToChangedSelection):
              (WebCore::Frame::textFieldDidBeginEditing):
              (WebCore::Frame::textFieldDidEndEditing):
              (WebCore::Frame::textDidChangeInTextField):
              (WebCore::Frame::textDidChangeInTextArea):
              (WebCore::Frame::doTextFieldCommandFromEvent):
              (WebCore::Frame::textWillBeDeletedInTextField):
              (WebCore::Frame::setSecureKeyboardEntry):
              (WebCore::Frame::isSecureKeyboardEntry):
              (WebCore::Frame::setMarkedTextRange):
              (WebCore::Frame::dashboardRegionsDictionary):
              (WebCore::Frame::dashboardRegionsChanged):
              (WebCore::Frame::willPopupMenu):
              (WebCore::Frame::isCharacterSmartReplaceExempt):
              (WebCore::Frame::setNeedsReapplyStyles):
              (WebCore::Frame::customHighlightLineRect):
              (WebCore::Frame::paintCustomHighlight):
              (WebCore::Frame::createScriptInstanceForWidget):
              (WebCore::Frame::windowScriptObject):
              (WebCore::Frame::cleanupPlatformScriptObjects):
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
              (createRootObject):
              (bridge):
              (-[WebCoreFrameBridge _frame]):
              * page/qt/EventHandlerQt.cpp:
              * page/qt/FrameQt.cpp:
              (WebCore::Frame::unfocusWindow):
              (WebCore::Frame::focusWindow):
              (WebCore::Frame::issueTransposeCommand):
              (WebCore::Frame::respondToChangedSelection):
              (WebCore::Frame::print):
              (WebCore::Frame::createScriptInstanceForWidget):
              (WebCore::Frame::cleanupPlatformScriptObjects):
              (WebCore::Frame::isCharacterSmartReplaceExempt):
              * page/qt/FrameQt.h: Removed.
              * platform/MimeTypeRegistry.h:
              * platform/graphics/svg/SVGImage.cpp:
              (WebCore::SVGImage::setData):
              * platform/graphics/svg/SVGImageEmptyClients.h:
              (WebCore::SVGEmptyChromeClient::shouldInterruptJavaScript):
              (WebCore::SVGEmptyEditorClient::shouldChangeSelectedRange):
              * platform/mac/ClipboardMac.h:
              * platform/mac/ClipboardMac.mm:
              (WebCore::ClipboardMac::ClipboardMac):
              * platform/mac/FileChooserMac.mm:
              (-[OpenPanelController beginSheetWithFrame:]):
              * platform/mac/MimeTypeRegistryMac.mm:
              (WebCore::MimeTypeRegistry::getMIMETypeForPath):
              * platform/mac/PopupMenuMac.mm:
              (WebCore::PopupMenu::show):
              * platform/mac/WidgetMac.mm:
              (WebCore::Widget::setFocus):
              (WebCore::Widget::setIsSelected):
              * platform/network/mac/ResourceHandleMac.mm:
              * platform/network/qt/ResourceHandleManagerQt.cpp:
              * platform/network/qt/ResourceHandleQt.cpp:
              (WebCore::ResourceHandle::start):
              * platform/qt/MimeTypeRegistryQt.cpp:
              (WebCore::MimeTypeRegistry::getMIMETypeForPath):
              * platform/qt/PopupMenuQt.cpp:
              * platform/qt/ScrollViewCanvasQt.cpp:
              * platform/qt/ScrollViewQt.cpp:
              * platform/win/TemporaryLinkStubs.cpp:
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paintCustomHighlight):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::paintCustomHighlight):
              * rendering/RootInlineBox.cpp:
              (WebCore::RootInlineBox::addHighlightOverflow):
              (WebCore::RootInlineBox::paintCustomHighlight):
      
      WebKit:
      
              Reviewed by Maciej.
      
              Additional coding by Maciej, additional review by Oliver.
      
              Added implementations for the new callbacks in EditorClient
              and ChromeClient (basically moved from WebFrameBridge).
              Cleaned up some code paths that are not called anymore
              and done fully inside WebCore now.
      
              * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
              * Misc/WebElementDictionary.mm:
              * Misc/WebNSAttributedStringExtras.mm:
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView getVariable:value:]):
              * Plugins/WebNetscapePluginEmbeddedView.mm:
              * Plugins/WebNetscapePluginStream.mm:
              * Plugins/WebPluginContainerCheck.mm:
              * WebCoreSupport/WebChromeClient.h:
              * WebCoreSupport/WebChromeClient.mm:
              (WebChromeClient::shouldInterruptJavaScript):
              * WebCoreSupport/WebEditorClient.h:
              * WebCoreSupport/WebEditorClient.mm:
              (WebEditorClient::shouldChangeSelectedRange):
              * WebCoreSupport/WebFrameBridge.mm:
              (-[WebFrameBridge finishInitializingWithPage:frameName:frameView:ownerElement:]):
              (-[WebFrameBridge fini]):
              * WebCoreSupport/WebFrameLoaderClient.mm:
              * WebView/WebArchiver.mm:
              * WebView/WebFrame.mm:
              (core):
              (kit):
              (-[WebFrame _updateBackground]):
              * WebView/WebFrameInternal.h:
              * WebView/WebFrameView.mm:
              * WebView/WebHTMLRepresentation.mm:
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _updateMouseoverWithEvent:]):
              (-[WebHTMLView _isEditable]):
              (-[WebHTMLView validateUserInterfaceItem:]):
              (-[WebHTMLView maintainsInactiveSelection]):
              (-[WebHTMLView scrollWheel:]):
              (-[WebHTMLView acceptsFirstMouse:]):
              (-[WebHTMLView shouldDelayWindowOrderingForEvent:]):
              (-[WebHTMLView cut:]):
              (-[WebHTMLView paste:]):
              (-[WebHTMLView selectedAttributedString]):
              * WebView/WebScriptDebugDelegate.mm:
              * WebView/WebView.mm:
              (-[WebView _dashboardRegions]):
              (-[WebView setProhibitsMainFrameScrolling:]):
              (-[WebView _setInViewSourceMode:]):
              (-[WebView _inViewSourceMode]):
              (-[WebView shouldClose]):
              (-[WebView setEditable:]):
      
      WebKitQt:
      
              Reviewed by Maciej.
      
              Additional coding by Maciej, additional review by Oliver.
      
              Add stubs for the new methods in ChormeClient and EditorClient,
              remove all references to FrameQt.
      
              * Api/qwebframe.cpp:
              (QWebFrame::QWebFrame):
              * Api/qwebframe_p.h:
              * Api/qwebpage.cpp:
              * WebCoreSupport/ChromeClientQt.cpp:
              (WebCore::ChromeClientQt::shouldInterruptJavaScript):
              * WebCoreSupport/ChromeClientQt.h:
              * WebCoreSupport/EditorClientQt.cpp:
              (WebCore::EditorClientQt::shouldChangeSelectedRange):
              (WebCore::EditorClientQt::isEditable):
              * WebCoreSupport/EditorClientQt.h:
              * WebCoreSupport/FrameLoaderClientQt.cpp:
              (WebCore::FrameLoaderClientQt::setFrame):
              (WebCore::FrameLoaderClientQt::webFrame):
              * WebCoreSupport/FrameLoaderClientQt.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c13fa54c
  24. 12 Feb, 2007 1 commit
    • darin's avatar
      WebCore: · d1fbfdcc
      darin authored
              Reviewed by Oliver.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=12677
                <rdar://problem/4759563> REGRESSION: Return key is always sent when you confirm
                a clause in kotoeri (12677)
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=12596
                <rdar://problem/4794346> REGRESSION: Tab key shifts form field focus instead of
                navigating prediction window (12596)
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=10010
                <rdar://problem/4822935> REGRESSION: Pressing Return with unconfirmed text in
                Hangul inserts carriage return (10010)
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=12531
                <rdar://problem/4975126> REGRESSION: Inline text input types repeated keys in
                latest nightly (r19336) (12531)
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=12539
                <rdar://problem/4975130> REGRESSION: Pressing Backspace while in inline input
                area moves to the previous page in history (12539)
      
              This area still needs work because keypress events are being sent for all the
              events before they go to the input methods, and it seems that this is not
              compatible with what other browsers do and with what sites assume. That's covered
              by this bug:
      
                  http://bugs.webkit.org/show_bug.cgi?id=10871
                  <rdar://problem/4823129> REGRESSION: IME key events different in nightly (10871)
      
              which is still open.
      
              * bindings/objc/ExceptionHandlers.h: Remove selectRange helper that doesn't really
              belong here, and also isn't needed since the callers don't want to raise ObjC
              exceptions.
              * bindings/objc/ExceptionHandlers.mm: Ditto. Also removed unneeded external globals
              that aren't exported anyway and unneeded includes.
      
              * bridge/EditorClient.h: Added Mac-specific function, markedTextAbandoned. Long term
              this might move into platform instead, but it's fine to have it on the client for now
              as long as it doesn't cause trouble for platforms other than Mac.
      
              * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler): Since
              all the event handling code in this function is intended to run on the node itself,
              not parent nodes, check and do nothing if this event is bubbling up from another
              node. Added code to call a function on EventHandler for default handling of text
              input events.
      
              * dom/KeyboardEvent.h:
              * dom/KeyboardEvent.cpp: (WebCore::findKeyboardEvent): Added. Just like the
              findUIEventWithKeyState function, but specific to keyboard events.
      
              * dom/TextEvent.h: Added isLineBreak and isBackTab flags so that we can carry
              additional information about what a text input event is trying to do, but still
              go through the DOM event machinery.
              * dom/TextEvent.cpp: Ditto.
      
              * editing/Editor.h:
              * editing/Editor.cpp:
              (WebCore::Editor::handleKeyPress): Removed unneeded check of isCaretOrRange, since
              isContentEditable already checks that.
              (WebCore::Editor::canEdit): Ditto.
              (WebCore::Editor::canEditRichly): Ditto.
              (WebCore::Editor::canPaste): Changed to call canEdit for brevity.
              (WebCore::Editor::replaceSelectionWithText): Changed to take a const String&.
              (WebCore::Editor::shouldInsertText): Ditto.
              (WebCore::hasEditableSelection): Removed unneeded check of isCaretOrRange, since
              isContentEditable already checks that.
              (WebCore::Editor::Editor): Initialize the new m_ignoreMarkedTextSelectionChange
              flag. Moved here from WebHTMLView.
              (WebCore::Editor::insertText): Moved most of the code from -[WebHTMLView insertText:]
              here, since this needs to be done in response to a text input event and we don't want
              to go back over the WebKit side for that.
              (WebCore::Editor::insertLineBreak): Added. Moved here from -[WebHTMLView insertLineBreak:]
              for the same reason -- needs to be done in response to text input events.
              (WebCore::Editor::insertParagraphSeparator): Ditto.
              (WebCore::Editor::selectMarkedText): Added. Used by insertText.
              (WebCore::Editor::discardMarkedText): Added. Used by insertText.
              (WebCore::Editor::unmarkText): Added. Used by insertText.
              * editing/mac/EditorMac.mm:
              (WebCore::Editor::unmarkText): Added. Used by insertText.
      
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::canHaveSelection): Changed to use isTextField to avoid repeating
              the switch statement.
              (WebCore::HTMLInputElement::selectionStart): Ditto.
              (WebCore::HTMLInputElement::selectionEnd): Ditto.
              (WebCore::HTMLInputElement::setSelectionStart): Ditto.
              (WebCore::HTMLInputElement::setSelectionEnd): Ditto.
              (WebCore::HTMLInputElement::select): Ditto.
              (WebCore::HTMLInputElement::setSelectionRange): Ditto.
              (WebCore::HTMLInputElement::createRenderer): Resorted cases alphaebtically.
              (WebCore::HTMLInputElement::defaultEventHandler): Added code to make hitting return cause the
              form to be submitted when it comes through as a text input event. This is now the normal case
              on Macintosh, because enter key presses normally turn into this. In addition, change the other
              event handling to run only after trying the base defaultEventHandler. That makes the key
              handling done in EventTargetNode take precedence over the event handling here for editable text
              fields, which is what we want. This gets rid of the need for the hack where we check
              inputManagerHasMarkedText and suppress the handling of the enter key.
      
              * page/EventHandler.h: Removed unneeded includes. Moved EventHandlerDragState down into the
              private part of the class. Changed sendContextMenuEvent to take a const&. Added new
              handleTextInputEvent and defaultTextInputEventHandler functions. Made eventLoopHandleMouseUp
              and eventLoopHandleMouseDragged private. Added private defaultTabEventHandler function.
              * page/EventHandler.cpp:
              (WebCore::EventHandler::sendContextMenuEvent): Changed parameter to be a const&.
              (WebCore::EventHandler::defaultKeyboardEventHandler): Rearranged things so that the key bindings
              handling in handleKeyPress comes before special tab event handling. In cases where the tab turns
              into text to insert, we now handle it in the text input event handler.
              (WebCore::EventHandler::handleTextInputEvent): Added. Creates and dispatches a text input event.
              (WebCore::EventHandler::defaultTextInputEventHandler): Added. Inserts text, but has special cases
              for the tab and newline character cases.
              (WebCore::EventHandler::defaultTabEventHandler): Added. Shared by the tab-handling code in
              the keyboard event and text input event handlers.
              * page/mac/EventHandlerMac.mm: Tweak formatting, remove some unused functions.
      
              * page/FocusController.h: Removed unnneded includes and forwards, and added an overload of
              advanceFocus that takes a FocusDirection parameter.
              * page/FocusController.cpp: (WebCore::FocusController::advanceFocus): Changed to allow a 0 for
              the event pointer. Also added a version where the direction is passed explicitly, to be used
              for cases where we want to tab backward even if the event doesn't have a shift modifier key set.
      
              * platform/graphics/svg/SVGImageEmptyClients.h: Updated for change to EditorClient.
              This should really probably just use 0 for the EditorClient.
      
              * WebCore.exp: Update both for newly used and no-longer-used entry points.
      
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm: Removed two unused methods.
      
      WebKit:
      
              Reviewed by Oliver.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=12677
                <rdar://problem/4759563> REGRESSION: Return key is always sent when you confirm
                a clause in kotoeri (12677)
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=12596
                <rdar://problem/4794346> REGRESSION: Tab key shifts form field focus instead of
                navigating prediction window (12596)
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=10010
                <rdar://problem/4822935> REGRESSION: Pressing Return with unconfirmed text in
                Hangul inserts carriage return (10010)
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=12531
                <rdar://problem/4975126> REGRESSION: Inline text input types repeated keys in
                latest nightly (r19336) (12531)
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=12539
                <rdar://problem/4975130> REGRESSION: Pressing Backspace while in inline input
                area moves to the previous page in history (12539)
      
              * WebCoreSupport/WebEditorClient.h:
              * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::markedTextAbandoned):
              Added.
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView menuForEvent:]): Added explicit constructor needed now that the
              function takes a const&.
              (-[WebHTMLView becomeFirstResponder]): Removed fake event code, no longer needed
              since advanceFocus now works fine with 0 for a DOM event.
              (-[WebHTMLView _expandSelectionToGranularity:]): Changed to use the normal
              selection controller function instead of selectRange.
              (-[WebHTMLView insertTab:]): Changed to call bottleneck that receives the DOM
              event.
              (-[WebHTMLView insertBacktab:]): Ditto.
              (-[WebHTMLView insertNewline:]): Ditto.
              (-[WebHTMLView insertLineBreak:]): Ditto.
              (-[WebHTMLView insertParagraphSeparator:]): Ditto.
              (-[WebHTMLView insertNewlineIgnoringFieldEditor:]): Ditto.
              (-[WebHTMLView insertTabIgnoringFieldEditor:]): Ditto.
              (-[WebHTMLView yank:]): Updated to call Editor directly since the insertText
              code now works via a text input event which is not what we want for paste-like
              things such as yank.
              (-[WebHTMLView yankAndSelect:]): Ditto.
              (-[WebHTMLView selectToMark:]): Changed to use the normal selection controller
              function instead of selectRange, which also allows us to remove the ObjC exception
              handling code.
              (-[WebHTMLView swapWithMark:]): Ditto.
              (-[WebHTMLView transpose:]): Ditto.
              (-[WebHTMLView unmarkText]): Since this is one of the calls back from the input
              manager, added code to set the "event was handled" flag. Moved the actual work
              into the Editor class in WebCore and just call that from here.
              (-[WebHTMLView _selectRangeInMarkedText:]): Changed to use the normal selection
              controller function instead of selectRange.
              (-[WebHTMLView setMarkedText:selectedRange:]): Since this is one of the calls
              back from the input manager, added code to set the "event was handled" flag.
              Also changed the ignoreMarkedTextSelectionChange to use the flag over on the
              WebCore side, since we moved it there and to call selectMarkedText over on
              the WebCore side too.
              (-[WebHTMLView doCommandBySelector:]): Added special cases for newline and tab
              selectors so that the event is passed along. These selectors are special because
              they are ones that turn into text input events.
              (-[WebHTMLView _discardMarkedText]): Moved the body of this function into the
              Editor class in WebCore and just call that from here.
              (-[WebHTMLView insertText:]): Added code to send a text input event instead of
              calling the editor to do text insertion. The insertion is then done in the
              default handler for the text input event.
              (-[WebHTMLView _insertNewlineWithEvent:isLineBreak:]): Added. Sends a text
              input event.
              (-[WebHTMLView _insertTabWithEvent:isBackTab:]): Ditto.
              (-[WebHTMLView _updateSelectionForInputManager]): Changed to use the
              ignoreMarkedTextSelectionChange flag in Editor now that the one here is gone.
      
              * WebView/WebHTMLViewInternal.h: Remove ignoreMarkedTextSelectionChange field.
      
              * WebView/WebView.mm: (-[WebView setSelectedDOMRange:affinity:]): Changed to
              use the normal selection controller function instead of selectRange.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d1fbfdcc
  25. 09 Feb, 2007 1 commit
    • justing's avatar
      LayoutTests: · a1919e50
      justing authored
              Reviewed by darin
      
              * editing/selection/4975120-expected.checksum: Added.
              * editing/selection/4975120-expected.png: Added.
              * editing/selection/4975120-expected.txt: Added.
              * editing/selection/4975120.html: Added.
      
      WebCore:
      
              Reviewed by darin
      
              <rdar://problem/4975120>
              REGRESSION: double-cursor after switching window away/back (11770)
              <http://bugs.webkit.org/show_bug.cgi?id=11328>
              Gmail Editor: Caret can simultaneously appear in both the TO: and message body fields
      
              * page/mac/WebCoreFrameBridge.h: Removed two unused methods
              left over from the old form control implementation.
      
      WebKit:
      
              Reviewed by darin
              
              <rdar://problem/4975120>
              REGRESSION: double-cursor after switching window away/back (11770)
              <http://bugs.webkit.org/show_bug.cgi?id=11328>
              Gmail Editor: Caret can simultaneously appear in both the TO: and message body fields
      
              * WebCoreSupport/WebFrameBridge.mm: Removed unused methods.
              * WebView/WebHTMLView.mm: Ditto.
              (-[WebHTMLView _web_firstResponderCausesFocusDisplay]): Don't 
              appear focused if a descendant view is firstResponder.
              (-[WebHTMLView _updateActiveState]): Removed the check for a BOOL
              that was always false.
              * WebView/WebHTMLViewInternal.h: Removed a BOOL that's always false.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a1919e50
  26. 07 Feb, 2007 1 commit
    • andersca's avatar
      WebCore: · fe6e4dd1
      andersca authored
              Reviewed by Maciej.
      
              Move shouldInterruptJavaScript to the Chrome.
      
              * bindings/js/kjs_binding.cpp:
              (KJS::ScriptInterpreter::shouldInterruptScript):
              * page/Chrome.cpp:
              (WebCore::Chrome::shouldInterruptJavaScript):
              * page/Chrome.h:
              * page/ChromeClient.h:
              * page/Frame.h:
              * page/mac/FrameMac.h:
              * page/mac/FrameMac.mm:
              * page/mac/WebCoreFrameBridge.h:
              * platform/graphics/svg/SVGImageEmptyClients.h:
              (WebCore::SVGEmptyChromeClient::shouldInterruptJavaScript):
      
      WebKit:
      
              Reviewed by Maciej.
      
              Move shouldInterruptJavaScript to the Chrome.
              
              * WebCoreSupport/WebChromeClient.h:
              * WebCoreSupport/WebChromeClient.mm:
              (WebChromeClient::shouldInterruptJavaScript):
              * WebCoreSupport/WebFrameBridge.mm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe6e4dd1
  27. 31 Jan, 2007 1 commit
    • oliver's avatar
      · a485c2f2
      oliver authored
      liver Hunt  <oliver@apple.com>
      
              Reviewed by Adam.
      WebCore:
              Migrate more drag and drop logic to WebCore, start preparing
              to move EventHandler::handleDrag from EventHandlerMac to EventHandler 
      
              * WebCore.exp:   
                updating methods
                          
              * dom/Clipboard.cpp:
              * dom/Clipboard.h:
              (WebCore::Clipboard::Clipboard):
              (WebCore::Clipboard::setDragHasStarted):
              (WebCore::Clipboard::dragStarted): 
                Moving from ClipboardMac to Clipboard 
      
              * dom/EventTargetNode.cpp:
              (WebCore::EventTargetNode::dispatchMouseEvent):
                PlatformMouseEvent no longer lies about button state, however 
                DOM Events don't allow NoButton, so we need to convert NoButton 
                to LeftButton when we create a DOM Event from PlatformMouseEvent
      
              * page/DragClient.h:
                Tidying comment 
      
              * page/DragController.cpp:
              (WebCore::createMouseEvent):
                Updated for new PlatformMouseEvent constructors
              (WebCore::DragController::mayStartDragAtEventLocation):
                Migrated from WebKit
      
              * page/DragController.h:
                Added above function declarations
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::dragState): 
              (WebCore::EventHandler::dragHysteresisExceeded):
              (WebCore::EventHandler::freeClipboard):
              (WebCore::EventHandler::shouldDragAutoNode):
                Moved from EventHandlerMac
              (WebCore::EventHandler::handleMouseMoveEvent):
              (WebCore::EventHandler::eventMayStartDrag):
              (WebCore::EventHandler::handleMousePressEvent):
                Use DragController     
      
              * page/EventHandler.h:
                Added DragState struct definition to EventHandler
      
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::eventActivatedView):
              (WebCore::EventHandler::handleDrag):
              (WebCore::EventHandler::handleMouseUp):
              (WebCore::EventHandler::mouseDown):
                Update to use DragController and PlatformMouseEvent
      
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge dragSourceMovedTo:]):
              (-[WebCoreFrameBridge dragSourceEndedAt:operation:]):
                Use DragController for state               
      
      WebKit:
              Migrating methods to WebCore
      
              * WebCoreSupport/WebFrameBridge.mm:
              * WebView/WebHTMLView.mm:
              * WebView/WebHTMLViewPrivate.h:
                                               
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a485c2f2
  28. 29 Jan, 2007 2 commits
    • adele's avatar
      WebCore: · 91175f31
      adele authored
              Reviewed by Darin.
      
              More preparation for event handling fixes.
      
              * bridge/EditorClient.h: Removed EventTargetNode parameter from handleKeyPress since we can just get that from the event.
              * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler): ditto.
              * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): ditto.
              * page/EventHandler.h: ditto.
              * platform/graphics/svg/SVGImageEmptyClients.h: (WebCore::SVGEmptyEditorClient::handleKeyPress): ditto.
      
              * editing/Editor.h:
              * editing/Editor.cpp:
              (WebCore::Editor::handleKeyPress): Removed EventTargetNode parameter.
              (WebCore::Editor::execCommand): Made commandMap use AtomicStringImpls instead of Strings.
              (WebCore::Editor::insertText): Moved from the bridge.
      
              * page/mac/WebCoreFrameBridge.h: Moved insertText method to Editor.
              * page/mac/WebCoreFrameBridge.mm:
      
              * WebCore.exp: Updated exports.
      
      WebKit:
      
              Reviewed by Darin.
      
              More preparation for event handling fixes.
      
              * WebCoreSupport/WebEditorClient.h: Removed EventTargetNode parameter, since you can
                just get this from the KeyboardEvent.
              * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::handleKeyPress): ditto.
      
              * WebView/WebHTMLViewInternal.h: Added interpretKeyEventsParameters struct.
              * WebView/WebViewInternal.h: Changed parameter from NSEvent to WebCoreKeyboardEvent in _interceptEditingKeyEvent.
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView yankAndSelect:]): Updated for new triggeringEvent parameter.
              (-[WebHTMLView _interceptEditingKeyEvent:]): Set the WebHTMLViewInterpretKeyEventsParameters.
              (-[WebHTMLView doCommandBySelector:]): Access WebHTMLViewInterpretKeyEventsParameters.
              (-[WebHTMLView insertText:]): ditto.
              (-[WebHTMLView _insertText:selectInsertedText:triggeringEvent:]): Added parameter for triggeringEvent.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      91175f31
    • oliver's avatar
      2007-01-25 Oliver Hunt <oliver@apple.com> · e71315c1
      oliver authored
              Reviewed by Adam.
      WebKit:
              Migrated drag state and logic to WebCore, removed superfluous methods
      
              * ChangeLog:
              * WebCoreSupport/WebDragClient.h:
              * WebCoreSupport/WebDragClient.mm:
              (WebDragClient::dragSourceActionMaskForPoint):
              * WebCoreSupport/WebFrameBridge.mm:
                 allowDHTMLDrag move to WebCore::EventHandler
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
              (-[WebHTMLView draggedImage:movedTo:]):
              (-[WebHTMLView draggedImage:endedAt:operation:]):
                dragOffset and dragSourecAction is now stored in WebCore::DragController
                migrated _delegateDragSourceActionMask to WebCore::DragController
              * WebView/WebHTMLViewInternal.h:
                Removed dragOffset declaration, migrated to WebCore::DragController
              * WebView/WebView.mm:
                removed unnecessary method, _loadingDragOperationForDraggingInfo                       
      
      WebKitQt:       
              Reviewed by Adam.
      
              Stub for new DragClient method
      
              * WebCoreSupport/DragClientQt.cpp:
              (WebCore::DragClientQt::dragSourceActionMaskForPoint):
              * WebCoreSupport/DragClientQt.h:                  
      
      WebCore:
              Reviewed by Adam.
      
              Migrated more drag logic and state to WebCore
                                                    
              * page/DragClient.h:       
      
              * page/DragController.cpp:
              (WebCore::DragController::delegateDragSourceAction):
                New forwarding method for the UI delegate
              * page/DragController.h:
              (WebCore::DragController::dragOffset):
                Now store the drag offset -- the offset of the cursor relative to the drag image)
                in DragController
              * page/EventHandler.cpp:
              (WebCore::EventHandler::allowDHTMLDrag):
                Moved from WebFrameBridge
              * page/EventHandler.h:
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::eventMayStartDrag):
              (WebCore::EventHandler::handleDrag):                  
                EventHandlerMac now uses EventHandler::allowDHTMLDrag rather than the 
                implementation in WebFrameBridge
              * page/mac/WebCoreFrameBridge.h:
                removed definition of allowDHTMLDrag from WebFrameBridge
              * platform/graphics/svg/SVGImageEmptyClients.h:
              (WebCore::SVGEmptyDragClient::dragSourceActionMaskForPoint):
                Updated empty DragClient
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e71315c1
  29. 23 Jan, 2007 1 commit
    • oliver's avatar
      2007-01-23 Oliver Hunt <oliver@apple.com> · aeffa297
      oliver authored
              Reviewed by Adam.
      
              Added DragController to handled drag and drop state and control logic.
              Currently this only handles logic for Dragging and Dropping, and is 
              unable to initialise a drag itself.
      
              platform/DragData encapsulate the paltform Drag data (NSDraggingInfo on Mac, 
              QMimeType in Qt).  This provides methods to pull data out the drag data as a String, 
              a URL, a DocumentFragment (for rich content), or a Colour.
      
              * WebCore.exp:
              * WebCore.pro:
              * WebCore.xcodeproj/project.pbxproj:
              * dom/Clipboard.cpp: Added.
              (WebCore::Clipboard::setAccessPolicy):
              (WebCore::dragOpFromIEOp):
              (WebCore::IEOpFromDragOp):
              (WebCore::Clipboard::sourceOperation):
              (WebCore::Clipboard::destinationOperation):
              (WebCore::Clipboard::setSourceOperation):
              (WebCore::Clipboard::setDestinationOperation):
              (WebCore::Clipboard::setDropEffect):
              (WebCore::Clipboard::setEffectAllowed):
                move platform independent functions from ClipboardMac to Clipboard
      
              * dom/Clipboard.h:
              (WebCore::Clipboard::Clipboard):
              (WebCore::Clipboard::dropEffect):
              (WebCore::Clipboard::effectAllowed):
              (WebCore::Clipboard::policy):
                as above -- also removed virtual modifier from now 
                platform independent methods
      
              * editing/Editor.cpp:
              (WebCore::Editor::smartInsertDeleteEnabled): 
              (WebCore::Editor::shouldApplyStyle):
              * editing/Editor.h:
                adding calls through to EditorClient
               
              * page/DragActions.h: Added.
              (WebCore::):
                Replicates a number of NS* enums in the WebCore namespace
      
              * page/DragClient.h: Added.
              (WebCore::DragClient::~DragClient):
                Standard client interface for dragging UIDelegate
      
              * page/DragController.cpp: Added.
              (WebCore::createMouseEvent):
              (WebCore::DragController::DragController):
              (WebCore::DragController::~DragController):
              (WebCore::documentFragmentFromDragData):
              (WebCore::DragController::isMoveDrag):
              (WebCore::visiblePositionForPoint):
              (WebCore::DragController::cancelDrag):
              (WebCore::documentAtPoint):
              (WebCore::DragController::dragEntered):
              (WebCore::DragController::dragExited):
              (WebCore::DragController::dragUpdated):
              (WebCore::DragController::performDrag):
              (WebCore::DragController::dragEnteredOrUpdated):
              (WebCore::DragController::tryDocumentDrag):
              (WebCore::DragController::operationForLoad):
              (WebCore::DragController::concludeDrag):
              (WebCore::DragController::canProcessDrag):
              (WebCore::DragController::tryDHTMLDrag):
                Class to handle state and logic for dragging and dropping
      
              * page/DragController.h: Added.
              (WebCore::DragController::client):
              (WebCore::DragController::didInitiateDrag):
              (WebCore::DragController::isHandlingDrag):
              (WebCore::DragController::dragOperation):
              (WebCore::DragController::document):
              (WebCore::DragController::dragInitiator):
              (WebCore::DragController::dragDestinationAction):
              (WebCore::DragController::dragSourceAction):
              (WebCore::DragController::dragEnded):
              (WebCore::DragController::setIsHandlingDrag):
              (WebCore::DragController::setDidInitiateDrag):
              (WebCore::DragController::setDragOperation):
              (WebCore::DragController::setDragSourceAction):
              (WebCore::DragController::setDragInitiator):
                See above
      
              * page/Page.cpp:
              (WebCore::Page::Page):
                Update Page to have DragController
      
              * page/Page.h:
              (WebCore::Page::dragController):
                ditto
      
              * page/mac/DragControllerMac.mm: Added.
              (WebCore::DragController::isCopyKeyDown):
              (WebCore::DragController::dragOperation):
                Platform specific portions of the DragController
      
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::handleDrag):
              (WebCore::EventHandler::dragSourceEndedAt):
                Convert from NSDragOperation to WebCore::DragOperation
      
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
                Remove obsolete Drag functions
      
              * page/qt/DragControllerQt.cpp: Added.
              (WebCore::DragController::isCopyKeyDown):
              (WebCore::DragController::dragOperation):
                Basic stubs to maintain Qt  build
      
              * platform/DragData.cpp: Added.
              (WebCore::DragData::DragData):
              * platform/DragData.h: Added.
              (WebCore::DragData::clientPosition):
              (WebCore::DragData::globalPosition):
              (WebCore::DragData::platformData):
              (WebCore::DragData::draggingSourceOperationMask):
                DragData class to encapsulate platform drag data/event
      
              * platform/graphics/svg/SVGImage.cpp:
              (WebCore::SVGImage::setData):
                Addition of dummy DragClient
      
              * platform/graphics/svg/SVGImageEmptyClients.h:
              (WebCore::SVGEmptyDragClient::~SVGEmptyDragClient):
              (WebCore::SVGEmptyDragClient::willPerformDragDestinationAction):
              (WebCore::SVGEmptyDragClient::actionMaskForDrag):
              (WebCore::SVGEmptyDragClient::dragControllerDestroyed):
                ditto
      
              * platform/mac/ClipboardMac.h:
              * platform/mac/ClipboardMac.mm:
              (WebCore::ClipboardMac::ClipboardMac):
              (WebCore::ClipboardMac::clearData):
              (WebCore::ClipboardMac::clearAllData):
              (WebCore::ClipboardMac::getData):
              (WebCore::ClipboardMac::setData):
              (WebCore::ClipboardMac::types):
              (WebCore::ClipboardMac::setDragImage):
               Moving platform independent logic to Clipboard, and updating
               platform specific methods to use appropriate accessors rather than 
               directly manipulating data they no longer own
      
              * platform/mac/DragDataMac.mm: Added.
              (WebCore::DragData::DragData):
              (WebCore::DragData::canSmartReplace):
              (WebCore::DragData::containsColor):
              (WebCore::DragData::containsPlainText):
              (WebCore::DragData::asPlainText):
              (WebCore::DragData::asColor):
              (WebCore::DragData::createClipboard):
              (WebCore::imageExistsAtPaths):
              (WebCore::DragData::containsCompatibleContent):
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              (WebCore::DragData::asFragment):
                Mac implementations of DragData methods.  A number of these use
                a Helper class that accesses WebKit functionality.  That functionality 
                should be migrated to WebCore in the future.
      
              * platform/mac/PasteboardHelper.h: Added.
              (WebCore::PasteboardHelper::~PasteboardHelper):
                Temporary, and Mac only, helper class to access WebKit functionality 
                from WebCore
      
              * platform/qt/DragDataQt.cpp: Added.
              (WebCore::DragData::canSmartReplace):
              (WebCore::DragData::containsColor):
              (WebCore::DragData::containsPlainText):
              (WebCore::DragData::asPlainText):
              (WebCore::DragData::asColor):
              (WebCore::DragData::createClipboard):
              (WebCore::DragData::containsCompatibleContent):
              (WebCore::DragData::containsURL):
              (WebCore::DragData::asURL):
              (WebCore::DragData::asFragment):
               Basic stubs to maintain Qt build
      
              * rendering/HitTestResult.cpp:
              (WebCore::HitTestResult::HitTestResult):
               Correct HitTestResult copy contructor to copy localPoint
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aeffa297
  30. 19 Jan, 2007 1 commit
    • andersca's avatar
      WebCore: · 15375c76
      andersca authored
              Reviewed by Adam.
      
              Move JavaScript alert and status bar functions to the chrome.
              
              * bindings/js/kjs_window.cpp:
              (KJS::WindowFunc::callAsFunction):
              * page/Chrome.cpp:
              (WebCore::Chrome::runJavaScriptAlert):
              (WebCore::Chrome::runJavaScriptConfirm):
              (WebCore::Chrome::runJavaScriptPrompt):
              (WebCore::Chrome::setStatusBarText):
              * page/Chrome.h:
              * page/ChromeClient.h:
              * page/Frame.cpp:
              (WebCore::Frame::setJSStatusBarText):
              (WebCore::Frame::setJSDefaultStatusBarText):
              * page/Frame.h:
              * page/mac/FrameMac.h:
              * page/mac/FrameMac.mm:
              * page/mac/WebCoreFrameBridge.h:
              * platform/graphics/svg/SVGImageEmptyClients.h:
              (WebCore::SVGEmptyChromeClient::runJavaScriptAlert):
              (WebCore::SVGEmptyChromeClient::runJavaScriptConfirm):
              (WebCore::SVGEmptyChromeClient::runJavaScriptPrompt):
              (WebCore::SVGEmptyChromeClient::setStatusBarText):
      
      WebKit:
      
              Reviewed by Adam.
      
              Move functions from the bridge to the chrome client.
              
              * WebCoreSupport/WebChromeClient.h:
              * WebCoreSupport/WebChromeClient.mm:
              (WebChromeClient::runJavaScriptAlert):
              (WebChromeClient::runJavaScriptConfirm):
              (WebChromeClient::runJavaScriptPrompt):
              (WebChromeClient::setStatusBarText):
              * WebCoreSupport/WebFrameBridge.mm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      15375c76
  31. 17 Jan, 2007 1 commit
    • sullivan's avatar
      WebCore: · aaa7b63b
      sullivan authored
              Reviewed by Darin
      
              - WebCore part of fix for <rdar://problem/4462420> REGRESSION: Mail hangs during 
                Replace All if the replacement string contains the search string
              
              * page/Frame.h:
              * page/Frame.cpp:
              (WebCore::Frame::findString):
              new startInSelection parameter -- if true, search starts looking in selection; if false,
              search starts looking after the selection
              
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge searchFor:direction:caseSensitive:wrap:startInSelection:]):
              new startInSelection parameter, passed through to Frame::findString()
      
              * editing/JSEditor.cpp:
              pass false for new findString parameter, to match old behavior
      
      WebKit:
      
              Reviewed by Darin
      
              - WebKit part of fix for <rdar://problem/4462420> REGRESSION: Mail hangs during 
                Replace All if the replacement string contains the search string
      
              * Misc/WebKitVersionChecks.h:
              Added extern "C" so this can be used from .mm files. I don't need this change anymore for
              this fix, but it's still worth fixing now so it doesn't bite anyone later.
      
              * WebView/WebDocumentPrivate.h:
              Invented new private protocol WebDocumentIncrementalSearching, that has one method. The one
              method is just like the one WebDocumentSearching method, but with an additional parameter.
              We hope to eliminate this dependence on protocols someday, but adding another one as SPI
              seems like it won't make anything worse.
              
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView searchFor:direction:caseSensitive:wrap:]):
              now calls through to new method that has one additional parameter, passing NO to match old behavior
              (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
              pass new parameter to bridge
              
              * WebView/WebPDFView.h:
              Declare conformance to WebDocumentIncrementalSearching protocol
              
              * WebView/WebPDFView.mm:
              (-[WebPDFView searchFor:direction:caseSensitive:wrap:]):
              now calls through to new method that has one additional parameter, passing NO to match old behavior
              (-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]):
              new method, former guts of searchFor:direction:caseSensitive:wrap: but now handles startInSelection
              parameter
              
              * WebView/WebViewPrivate.h:
              Declare new searchFor:direction:caseSensitive:wrap:startInSelection: method, just like existing
              method but with one additional parameter
      
              * WebView/WebView.mm:
              (-[WebView searchFor:direction:caseSensitive:wrap:]):
              now calls through to new method that has one additional parameter, passing NO to match old behavior
              (-[WebView searchFor:direction:caseSensitive:wrap:startInSelection:]):
              new method, former guts of searchFor:direction:caseSensitive:wrap: but now handles startInSelection
              parameter
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aaa7b63b
  32. 08 Jan, 2007 2 commits
    • andersca's avatar
      WebCore: · b2fc18af
      andersca authored
              Reviewed by Brady.
      
              Move some history related functions off the bridge and into FrameLoader directly.
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::canGoBackOrForward):
              (WebCore::FrameLoader::getHistoryLength):
              (WebCore::FrameLoader::historyURL):
              * loader/mac/FrameLoaderMac.mm:
              * page/mac/WebCoreFrameBridge.h:
      
      WebKit:
      
              Reviewed by Brady.
      
              Remove bridge functions that are implemented directly in FrameLoader now.
              
              * WebCoreSupport/WebFrameBridge.mm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2fc18af
    • weinig's avatar
      Reviewed by Adam. · 91271cab
      weinig authored
              - http://bugs.webkit.org/show_bug.cgi?id=12143
                remove Widget code unneeded now that form elements do not use Widget
      
              * bindings/objc/DOMHTML.mm: (-[DOMHTMLSelectElement _activateItemAtIndex:]):
              Removed useless implementation that would only work with NSView-based
              <select> elements, and added a FIXME about the fact that this function
              doesn't do anything any more. I think it's used by Safari forms auto-fill.
      
              * bridge/mac/WebCoreAXObject.mm: (-[WebCoreAXObject rendererForView:]):
              Removed code that depends on elementForView:, since that always returns
              nil now.
      
              * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::~HTMLFormElement):
              Use a formDestroyed() function rather than clearing m_form directly so that
              this class doesn't have to be a friend of HTMLGenericFormElement.
      
              * html/HTMLGenericFormElement.h: Removed now-unneeded friend declaration
              for HTMLFormElement. Moved definition of supportsFocus into the .cpp file.
              Added a public formDestroyed function for use by HTMLFormElement.
              * html/HTMLGenericFormElement.cpp:
              (WebCore::HTMLGenericFormElement::attach): Removed widget-specific code.
              (WebCore::HTMLGenericFormElement::isKeyboardFocusable): Ditto.
              (WebCore::HTMLGenericFormElement::isMouseFocusable): Ditto.
              (WebCore::HTMLGenericFormElement::supportsFocus): Added this here; it was
              in the header file before, for no good reason.
      
              * page/EventHandler.h: Removed unused Mac-specific
              currentEventIsMouseDownInWidget.
              * page/mac/EventHandlerMac.mm: Ditto.
      
              * page/Frame.cpp: (WebCore::Frame::frameForWidget): Changed to use
              RenderWidget to find the frame rather than the WigetClient element()
              function.
      
              * page/mac/FrameMac.h: Removed unused bridgeForWidget.
              * page/mac/FrameMac.mm: Ditto.
      
              * page/mac/WebCoreFrameBridge.h: Removed elementForView.
              * page/mac/WebCoreFrameBridge.mm: Ditto. While the scroll bar still did
              implement WebCoreWidgetHolder, it does not correspond to a DOM element,
              so this method was always returning nil.
      
              * platform/Widget.h: Moved unused types and functions that are still
              in the platform-specific implementations into a "to be deleted" section:
              FocusPolicy, NoFocus, TabFocus, ClickFocus, StrongFocus, WheelFocus,
              lockDrawingFocus, font, focusPolicy, hasFocus, clearFocus, setFont,
              disableFlushDrawing, enableFlushDrawing, unlockDrawingFocus.
              Removed unused functions that are not in platform-specific implementations:
              sizeHint, baselinePosition, checksDescendantsForFocus.
              * platform/Widget.cpp: Removed functions.
      
              * platform/WidgetClient.h: Emptied out the class. Soon we can delete it.
      
              * platform/mac/PlatformScrollBarMac.mm: (-[WebCoreScrollBar mouseDown:]):
              Got rid of unneeded includes, removed use of the WebCoreWidgetHolder
              protocol and the one method in it, and changed the calls to beforeMouseDown
              and afterMouseDown to pass the widget pointer in.
      
              * platform/mac/WebCoreWidgetHolder.h: Emptied out the file -- to be deleted
              later.
      
              * platform/mac/WidgetMac.mm:
              (WebCore::Widget::~Widget): Removed code to manage deferredFirstResponder.
              (WebCore::Widget::hasFocus): Removed body of function and replaced with
              an assertion that it's never called. Later we'll remove it.
              (WebCore::Widget::setFocus): Tweaked a bit to work given changes to the
              FrameMac class. Also added a FIXME. Given how this works, it does not
              belong in the platform layer.
              (WebCore::Widget::clearFocus): Removed body of function and replaced with
              an assertion that it's never called. Later we'll remove it.
              (WebCore::Widget::focusPolicy): Ditto.
              (WebCore::Widget::font): Ditto.
              (WebCore::Widget::setFont): Ditto.
              (WebCore::Widget::lockDrawingFocus): Ditto.
              (WebCore::Widget::unlockDrawingFocus): Ditto.
              (WebCore::Widget::disableFlushDrawing): Ditto.
              (WebCore::Widget::enableFlushDrawing): Ditto.
              (WebCore::Widget::paint): Removed obsolete comment.
              (WebCore::Widget::sendConsumedMouseUp): Removed body of function and replaced with
              an assertion that it's never called. Later we'll remove it.
              (WebCore::Widget::setIsSelected): Tweaked a bit to work given changes to the
              FrameMac class. Also added a FIXME. Given how this works, it does not
              belong in the platform layer.
              (WebCore::Widget::beforeMouseDown): Changed to take an explicit Widget parameter.
              (WebCore::Widget::afterMouseDown): Ditto.
      
              * rendering/RenderApplet.cpp:
              (WebCore::RenderApplet::intrinsicWidth): Changed to not call sizeHint() any more.
              I didn't change the values returned by the function, but they make no sense and
              this should probably be fixed later.
              (WebCore::RenderApplet::intrinsicHeight): Ditto.
      
              * rendering/RenderWidget.h: Removed unneeded WidgetClient.h include. Changed
              RenderWidget to no longer inherit from WidgetClient. Added a find function to find
              a RenderWidget given a Widget. Removed all the virtual functions that override
              WidgetClient hooks.
              * rendering/RenderWidget.cpp: Removed all the WidgetClient functions.
              (WebCore::widgetRendererMap): Added. Map that gives the RenderWidget for each
              Widget that is owned by a RenderWidget.
              (WebCore::RenderWidget::destroy): Removed the setClient call and added a call to
              remove the widget from the widgetRendererMap.
              (WebCore::RenderWidget::setWidget): Ditto.
              (WebCore::RenderWidget::setStyle): Removed the call to Widget::setFont.
              (WebCore::RenderWidget::find): Added. Returns the RenderWidget for a Widget, if any.
      
              - other changes
      
              * dom/Node.cpp:
              (WebCore::Node::dump): Removed unnecessary use of DeprecatedString.
              (WebCore::appendAttributeDesc): Ditto.
              (WebCore::Node::showNode): Ditto.
              (WebCore::Node::formatForDebugger): Ditto.
      
              * loader/CachedImage.cpp: (WebCore::CachedImage::createImage): Cleaned up
              conditional compilation so adding more MIME types here doesn't make the
              function more and more difficult to read.
      
              * page/Frame.h: Removed unneeded includes and declarations.
              Tweaked formatting.
              * page/Page.h: Removed unneeded declarations.
              * platform/ScrollView.h: Removed unneeded includes.
      
              * rendering/RenderBlock.cpp: (WebCore::RenderBlock::renderName): Tweaked formatting.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      91271cab
  33. 05 Jan, 2007 1 commit
    • aroben's avatar
      WebCore: · 0af8d3b6
      aroben authored
              Reviewed by Geoff, cheered by others.
      
              Dead code elimination.
      
              All layout tests pass.
      
              * page/EventHandler.h:
              * page/mac/EventHandlerMac.mm:
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
      
      WebKit:
      
              Reviewed by Geoff, cheered by others.
      
              Dead code elimination.
      
              * WebView/WebHTMLView.m:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0af8d3b6
  34. 02 Jan, 2007 1 commit
    • beidson's avatar
      WebCore: · 50c3bd88
      beidson authored
              Reviewed extensively and repeatedly by Darin
      
              <rdar://problem/4887137> - WebCore Back/Forward Cache
      
              * WebCore.exp:
              * WebCore.xcodeproj/project.pbxproj:
      
              * bridge/mac/WebCorePageState.h: Removed.
              * bridge/mac/WebCorePageState.mm: Removed.
      
              * history/BackForwardList.cpp: Added - This largely emulates the design of WebBackForwardList
              (WebCore::BackForwardList::BackForwardList):
              (WebCore::BackForwardList::~BackForwardList):
              (WebCore::BackForwardList::addItem):
              (WebCore::BackForwardList::goBack):
              (WebCore::BackForwardList::goForward):
              (WebCore::BackForwardList::goToItem):
              (WebCore::BackForwardList::backItem):
              (WebCore::BackForwardList::currentItem):
              (WebCore::BackForwardList::forwardItem):
              (WebCore::BackForwardList::backListWithLimit):
              (WebCore::BackForwardList::forwardListWithLimit):
              (WebCore::BackForwardList::capacity):
              (WebCore::BackForwardList::setCapacity):
              (WebCore::BackForwardList::setPageCacheSize):
              (WebCore::BackForwardList::pageCacheSize):
              (WebCore::BackForwardList::clearPageCache):
              (WebCore::BackForwardList::usesPageCache):
              (WebCore::BackForwardList::backListCount):
              (WebCore::BackForwardList::forwardListCount):
              (WebCore::BackForwardList::itemAtIndex):
              (WebCore::BackForwardList::entries):
              (WebCore::BackForwardList::close):
              (WebCore::BackForwardList::closed):
              (WebCore::BackForwardList::removeItem):
              (WebCore::BackForwardList::containsItem):
              (WebCore::BackForwardList::setDefaultPageCacheSize):
              (WebCore::BackForwardList::defaultPageCacheSize):
              * history/BackForwardList.h: Added.
      
              * history/HistoryItem.cpp: Added - This largely emulates the design of WebBackForwardList
              (WebCore::defaultNotifyHistoryItemChanged):
              (WebCore::HistoryItem::HistoryItem):
              (WebCore::HistoryItem::~HistoryItem):
              (WebCore::HistoryItem::copy):
              (WebCore::HistoryItem::setHasPageCache):
              (WebCore::HistoryItem::retainIconInDatabase):
              (WebCore::HistoryItem::urlString):
              (WebCore::HistoryItem::originalURLString):
              (WebCore::HistoryItem::title):
              (WebCore::HistoryItem::alternateTitle):
              (WebCore::HistoryItem::icon):
              (WebCore::HistoryItem::lastVisitedTime):
              (WebCore::HistoryItem::url):
              (WebCore::HistoryItem::originalURL):
              (WebCore::HistoryItem::target):
              (WebCore::HistoryItem::parent):
              (WebCore::HistoryItem::setAlternateTitle):
              (WebCore::HistoryItem::setURLString):
              (WebCore::HistoryItem::setURL):
              (WebCore::HistoryItem::setOriginalURLString):
              (WebCore::HistoryItem::setTitle):
              (WebCore::HistoryItem::setTarget):
              (WebCore::HistoryItem::setParent):
              (WebCore::HistoryItem::setLastVisitedTime):
              (WebCore::HistoryItem::visitCount):
              (WebCore::HistoryItem::setVisitCount):
              (WebCore::HistoryItem::scrollPoint):
              (WebCore::HistoryItem::setScrollPoint):
              (WebCore::HistoryItem::clearScrollPoint):
              (WebCore::HistoryItem::setDocumentState):
              (WebCore::HistoryItem::documentState):
              (WebCore::HistoryItem::clearDocumentState):
              (WebCore::HistoryItem::isTargetItem):
              (WebCore::HistoryItem::setIsTargetItem):
              (WebCore::HistoryItem::alwaysAttemptToUsePageCache):
              (WebCore::HistoryItem::setAlwaysAttemptToUsePageCache):
              (WebCore::HistoryItem::addChildItem):
              (WebCore::HistoryItem::childItemWithName):
              (WebCore::HistoryItem::recurseToFindTargetItem):
              (WebCore::HistoryItem::targetItem):
              (WebCore::HistoryItem::pageCache):
              (WebCore::HistoryItem::children):
              (WebCore::HistoryItem::hasChildren):
              (WebCore::HistoryItem::formContentType):
              (WebCore::HistoryItem::formReferrer):
              (WebCore::HistoryItem::rssFeedReferrer):
              (WebCore::HistoryItem::setRSSFeedReferrer):
              (WebCore::HistoryItem::setFormInfoFromRequest):
              (WebCore::HistoryItem::formData):
              (WebCore::HistoryItem::mergeAutoCompleteHints):
              (WebCore::HistoryItem::hasPageCache):
              (WebCore::timer): Function to manage the global release timer
              (WebCore::pendingPageCacheToRelease): Function to manage the global queue of caches to be released
              (WebCore::HistoryItem::releasePageCache):
              (WebCore::closeObjectsInPendingPageCaches):
              (WebCore::HistoryItem::releaseAllPendingPageCaches):
              (WebCore::HistoryItem::scheduleRelease):
              (WebCore::HistoryItem::print):
              * history/HistoryItem.h: Added.
              * history/mac/HistoryItemMac.mm: Added.
              (WebCore::HistoryItem::viewState): In the future we need a platform agnostic way to manage the view state
              (WebCore::HistoryItem::setViewState):
              (WebCore::HistoryItem::getTransientProperty): Transient properties are, for now, only a Mac concept
              (WebCore::HistoryItem::setTransientProperty):
      
              * history/HistoryItemTimer.cpp: Added
              (WebCore::HistoryItemTimer::HistoryItemTimer): We need a specific class to be the history item timer because
              WebCore::Timers only work when you have an instance of an object, but the caches pending release is a static concept
              (WebCore::HistoryItemTimer::isActive):
              (WebCore::HistoryItemTimer::schedule):
              (WebCore::HistoryItemTimer::invalidate):
              (WebCore::HistoryItemTimer::callReleasePageCache):
              * history/HistoryItemTimer.h: Added.
      
              * history/PageCache.cpp Added - This is a class that contains the fields that used to be in an NSDictionary in WebKit
              (WebCore::PageCache::PageCache):
              (WebCore::PageCache::setPageState):
              (WebCore::PageCache::~PageCache):
              (WebCore::PageCache::pageState):
              (WebCore::PageCache::setDocumentLoader):
              (WebCore::PageCache::documentLoader):
              (WebCore::PageCache::setTimeStamp):
              (WebCore::PageCache::setTimeStampToNow):
              (WebCore::PageCache::timeStamp):
              * history/PageCache.h: Added.
              * history/mac/PageCacheMac.mm: Added.
              (WebCore::PageCache::close):
              (WebCore::PageCache::setDocumentView): In the future we need a platform agnostic way to manage the documentView
              (WebCore::PageCache::documentView):
      
              * loader/DocumentLoader.cpp:
              (WebCore::DocumentLoader::loadFromPageCache):
              (WebCore::DocumentLoader::setLoadingFromPageCache): 
              (WebCore::DocumentLoader::isLoadingFromPageCache):
              (WebCore::DocumentLoader::originalURL):
              (WebCore::DocumentLoader::requestURL):
              (WebCore::DocumentLoader::responseURL):
              (WebCore::DocumentLoader::responseMIMEType):
              * loader/DocumentLoader.h:
      
              * loader/FrameLoader.cpp: Responsibilities previously scattered in WebKit but concentrated in WebView and WebFrame 
                are now here, where they should be.
              (WebCore::FrameLoader::clear):
              (WebCore::FrameLoader::restoreDocumentState):
              (WebCore::FrameLoader::goBackOrForward):
              (WebCore::FrameLoader::provisionalLoadStarted):
              (WebCore::FrameLoader::canCachePage):
              (WebCore::FrameLoader::commitProvisionalLoad):
              (WebCore::FrameLoader::transitionToCommitted):
              (WebCore::FrameLoader::open):
              (WebCore::FrameLoader::didFirstLayout):
              (WebCore::FrameLoader::dispatchDidChangeLocationWithinPage):
              (WebCore::FrameLoader::dispatchDidFinishLoadToClient):
              (WebCore::FrameLoader::updateGlobalHistoryForStandardLoad): Marked for usage in future GlobalHistory (uses client for now)
              (WebCore::FrameLoader::updateGlobalHistoryForReload): Ditto
              (WebCore::FrameLoader::shouldGoToHistoryItem):
              (WebCore::FrameLoader::addExtraFieldsToRequest):
              (WebCore::FrameLoader::addHistoryItemForFragmentScroll):
              (WebCore::FrameLoader::loadProvisionalItemFromPageCache):
              (WebCore::FrameLoader::createPageCache):
              (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
              (WebCore::FrameLoader::createItem):
              (WebCore::FrameLoader::addBackForwardItemClippedAtTarget):
              (WebCore::FrameLoader::createItemTree):
              (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem):
              (WebCore::FrameLoader::restoreScrollPositionAndViewState):
              (WebCore::FrameLoader::purgePageCache):
              (WebCore::FrameLoader::invalidateCurrentItemPageCache):
              (WebCore::FrameLoader::saveDocumentState):
              (WebCore::FrameLoader::loadItem):
              (WebCore::FrameLoader::urlsMatchItem):
              (WebCore::FrameLoader::goToItem):
              (WebCore::FrameLoader::recursiveGoToItem):
              (WebCore::FrameLoader::childFramesMatchItem):
              (WebCore::FrameLoader::updateHistoryForStandardLoad):
              (WebCore::FrameLoader::updateHistoryForClientRedirect):
              (WebCore::FrameLoader::updateHistoryForBackForwardNavigation):
              (WebCore::FrameLoader::updateHistoryForReload):
              (WebCore::FrameLoader::updateHistoryForInternalLoad):
              (WebCore::FrameLoader::updateHistoryForCommit):
              (WebCore::FrameLoader::saveDocumentAndScrollState):
              (WebCore::FrameLoader::currentHistoryItem):
              (WebCore::FrameLoader::previousHistoryItem):
              (WebCore::FrameLoader::provisionalHistoryItem):
              (WebCore::FrameLoader::setCurrentHistoryItem):
              (WebCore::FrameLoader::setPreviousHistoryItem):
              (WebCore::FrameLoader::setProvisionalHistoryItem):
              * loader/FrameLoader.h:
      
              * loader/FrameLoaderClient.h:
      
              * loader/mac/DocumentLoaderMac.mm:
              (WebCore::DocumentLoader::DocumentLoader):
              (WebCore::DocumentLoader::getResponseRefreshAndModifiedHeaders):
              (WebCore::DocumentLoader::commitIfReady):
              (WebCore::DocumentLoader::urlForHistory):
      
              * loader/mac/FrameLoaderMac.mm:
              (WebCore::FrameLoader::load):
              (WebCore::FrameLoader::startLoading):
              (WebCore::FrameLoader::receivedMainResourceError):
              (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
              (WebCore::FrameLoader::opened):
              (WebCore::FrameLoader::dataURLBaseFromRequest):
              (WebCore::FrameLoader::didChangeTitle):
              (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
              (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
      
              * page/FrameTree.cpp:
              (WebCore::FrameTree::removeChild):
      
              * page/Page.cpp: Transfered a handful of concepts from WebView
              (WebCore::Page::Page):
              (WebCore::Page::~Page):
              (WebCore::Page::backForwardList):
              (WebCore::Page::goBack):
              (WebCore::Page::goForward):
              (WebCore::Page::goToItem):
              * page/Page.h:
      
              * page/PageState.h:
              * page/mac/FrameMac.h:
              * page/mac/FrameMac.mm:
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
      
              * platform/KURL.cpp:
              (WebCore::KURL::print):  Added debug only method for debugging convenience
              * platform/KURL.h:
      
              * platform/Logging.cpp:
              (WebCore::): Added some logging channels
              * platform/Logging.h:
      
              * platform/PlatformString.h:
              (WebCore::nsStringNilIfEmpty): Added for WebKit use
      
              * platform/SystemTime.h: Added userIdleTime()
      
              * platform/graphics/svg/SVGImage.cpp:
              * platform/graphics/svg/SVGImageEmptyClients.h: Updated for new FrameLoaderClient methods
              (WebCore::SVGEmptyFrameLoaderClient::setDocumentViewFromPageCache):
              (WebCore::SVGEmptyFrameLoaderClient::updateGlobalHistoryForStandardLoad):
              (WebCore::SVGEmptyFrameLoaderClient::updateGlobalHistoryForReload):
              (WebCore::SVGEmptyFrameLoaderClient::shouldGoToHistoryItem):
              (WebCore::SVGEmptyFrameLoaderClient::saveScrollPositionAndViewStateToItem):
              (WebCore::SVGEmptyFrameLoaderClient::saveDocumentViewToPageCache):
              (WebCore::SVGEmptyFrameLoaderClient::canCachePage):
              (WebCore::SVGEmptyEditorClient::~SVGEmptyEditorClient):
      
              * platform/mac/LoggingMac.mm:
              (WebCore::InitializeLoggingChannelsIfNecessary):
      
              * platform/mac/SystemTimeMac.cpp:
              (WebCore::userIdleTime):
      
              * platform/mac/WebCoreSystemInterface.h: Added wkSecondsSinceLastInput for use in userIdleTime
              * platform/mac/WebCoreSystemInterface.mm:
      
              * platform/network/FormData.cpp:
              (WebCore::FormData::FormData):
              (WebCore::FormData::copy):
              * platform/network/FormData.h:
      
              * platform/network/ResourceHandle.h:
              * platform/network/mac/ResourceHandleMac.mm:
              (WebCore::ResourceHandle::willLoadFromCache): For "are you sure you want to resubmit?" nag
      
              * platform/qt/TemporaryLinkStubs.cpp:
              (WebCore::userIdleTime):
              * rendering/RenderPart.h:
      
      WebKit:
      
              Reviewed extensively and repeatedly by Darin
      
              <rdar://problem/4887137> - WebCore Back/Forward Cache 
              Most things not specifically commented on in the ChangeLog can be summed up as 
              "Do things exactly the same way as we used to, but just stick in WebCore-land as much as possible"
      
              * History/WebBackForwardList.mm:
              (kitPrivate): Convenience functions to help with subbing "WebBackForwardListPrivate" for WebCore::BackForwardList
              (core):
              (backForwardListWrappers): A HashMap pattern used to map WebCore objects to their WebKit counterpart
              (kit):
              (+[WebBackForwardList setDefaultPageCacheSizeIfNecessary]):
              (-[WebBackForwardList initWithWebCoreBackForwardList:]):
              (-[WebBackForwardList init]):
              (-[WebBackForwardList dealloc]):
              (-[WebBackForwardList finalize]):
              (-[WebBackForwardList _close]):
              (-[WebBackForwardList addItem:]):
              (-[WebBackForwardList removeItem:]):
              (-[WebBackForwardList containsItem:]):
              (-[WebBackForwardList goBack]):
              (-[WebBackForwardList goForward]):
              (-[WebBackForwardList goToItem:]):
              (-[WebBackForwardList backItem]):
              (-[WebBackForwardList currentItem]):
              (-[WebBackForwardList forwardItem]):
              (vectorToNSArray):
              (-[WebBackForwardList backListWithLimit:]):
              (-[WebBackForwardList forwardListWithLimit:]):
              (-[WebBackForwardList capacity]):
              (-[WebBackForwardList setCapacity:]):
              (-[WebBackForwardList description]):
              (-[WebBackForwardList _clearPageCache]):
              (-[WebBackForwardList setPageCacheSize:]):
              (-[WebBackForwardList pageCacheSize]):
              (-[WebBackForwardList _usesPageCache]):
              (-[WebBackForwardList backListCount]):
              (-[WebBackForwardList forwardListCount]):
              (-[WebBackForwardList itemAtIndex:]):
              * History/WebBackForwardListInternal.h: Added.
      
              * History/WebHistory.m: Removed.
              * History/WebHistory.mm: Added - Needed to be .mm to accept C++ header style
              (-[_WebCoreHistoryProvider containsItemForURLLatin1:length:]):
              (-[_WebCoreHistoryProvider containsItemForURLUnicode:length:]):
      
              * History/WebHistoryItem.mm:
              (kitPrivate): Same pattern as WebBackForwardList
              (core):
              (historyItemWrappers):
              (WKNotifyHistoryItemChanged):
              (-[WebHistoryItem init]):
              (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
              (-[WebHistoryItem dealloc]):
              (-[WebHistoryItem finalize]):
              (-[WebHistoryItem copyWithZone:]):
              (-[WebHistoryItem URLString]):
              (-[WebHistoryItem originalURLString]):
              (-[WebHistoryItem title]):
              (-[WebHistoryItem setAlternateTitle:]):
              (-[WebHistoryItem alternateTitle]):
              (-[WebHistoryItem icon]):
              (-[WebHistoryItem lastVisitedTimeInterval]):
              (-[WebHistoryItem hash]):
              (-[WebHistoryItem isEqual:]):
              (-[WebHistoryItem description]):
              (kit):
              (+[WebHistoryItem entryWithURL:]):
              (+[WebHistoryItem initWindowWatcherIfNecessary]):
              (-[WebHistoryItem initWithURL:target:parent:title:]):
              (-[WebHistoryItem initWithWebCoreHistoryItem:]):
              (-[WebHistoryItem setTitle:]):
              (-[WebHistoryItem setVisitCount:]):
              (-[WebHistoryItem setViewState:]):
              (-[WebHistoryItem _mergeAutoCompleteHints:]):
              (-[WebHistoryItem initFromDictionaryRepresentation:]):
              (-[WebHistoryItem scrollPoint]):
              (-[WebHistoryItem _transientPropertyForKey:]):
              (-[WebHistoryItem _setTransientProperty:forKey:]):
              (-[WebHistoryItem dictionaryRepresentation]):
              (-[WebHistoryItem target]):
              (-[WebHistoryItem isTargetItem]):
              (-[WebHistoryItem visitCount]):
              (-[WebHistoryItem RSSFeedReferrer]):
              (-[WebHistoryItem setRSSFeedReferrer:]):
              (-[WebHistoryItem children]):
              (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
              (-[WebHistoryItem URL]):
              (-[WebHistoryItem _setLastVisitedTimeInterval:]):
              (-[WebHistoryItem _lastVisitedDate]):
              (-[WebHistoryItem targetItem]):
              (+[WebHistoryItem _releaseAllPendingPageCaches]):
              (-[WebWindowWatcher windowWillClose:]):
              * History/WebHistoryItemInternal.h:
              * History/WebHistoryItemPrivate.h:
      
              * WebCoreSupport/WebFrameBridge.mm:
              * WebCoreSupport/WebFrameLoaderClient.h:
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::setDocumentViewFromPageCache):
              (WebFrameLoaderClient::detachedFromParent1):
              (WebFrameLoaderClient::loadedFromPageCache):
              (WebFrameLoaderClient::updateGlobalHistoryForStandardLoad):
              (WebFrameLoaderClient::updateGlobalHistoryForReload):
              (WebFrameLoaderClient::shouldGoToHistoryItem):
              (WebFrameLoaderClient::frameLoadCompleted):
              (WebFrameLoaderClient::saveScrollPositionAndViewStateToItem):
              (WebFrameLoaderClient::restoreScrollPositionAndViewState):
              (WebFrameLoaderClient::provisionalLoadStarted):
              (WebFrameLoaderClient::setTitle):
              (WebFrameLoaderClient::saveDocumentViewToPageCache):
              (WebFrameLoaderClient::canCachePage):
      
              * WebCoreSupport/WebSystemInterface.m:
              (InitWebCoreSystemInterface):
      
              * WebKit.xcodeproj/project.pbxproj:
      
              * WebView/WebDataSource.mm:
              * WebView/WebDataSourceInternal.h:
      
              * WebView/WebFrame.mm:
              (-[WebFramePrivate dealloc]):
              (-[WebFrame _canCachePage]):
              (-[WebFrame _loadURL:referrer:intoChild:]):
              * WebView/WebFrameInternal.h:
      
              * WebView/WebFrameView.mm:
              (-[WebFrameView initWithFrame:]):
              (-[WebFrameView keyDown:]):
      
              * WebView/WebHTMLView.m:
              (-[WebHTMLView closeIfNotCurrentView]): Added for a dirty hack in WebCore that is marked with a FIXME Radar
              * WebView/WebHTMLViewInternal.h:
      
              * WebView/WebView.mm:
              (-[WebViewPrivate init]):
              (-[WebViewPrivate dealloc]):
              (-[WebView _close]):
              (-[WebView _loadBackForwardListFromOtherView:]):
              (-[WebView _commonInitializationWithFrameName:groupName:]):
              (-[WebView initWithCoder:]):
              (-[WebView backForwardList]):
              (-[WebView goBack]):
              (-[WebView goForward]):
              (-[WebView goToBackForwardItem:]):
              (-[WebView canGoBack]):
              (-[WebView canGoForward]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      50c3bd88
  35. 22 Dec, 2006 1 commit
    • ggaren's avatar
      LayoutTests: · 82ecdbec
      ggaren authored
              Reviewed by Brady Eidson.
              
              Test for <rdar://problem/4871518> Leopard9A321: Crash visiting www.audible.com 
              (WebCore::FrameLoader::loadSubframe)
              
              Tests an onload handler for a synchronously loaded iframe removing the iframe 
              from the document.
      
              * fast/frames/onload-remove-iframe-crash-expected.txt: Added.
              * fast/frames/onload-remove-iframe-crash.html: Added.
      
      WebCore:
      
              Reviewed by Brady Eidson.
              
              Fixed <rdar://problem/4871518> Leopard9A321: Crash visiting www.audible.com 
              (WebCore::FrameLoader::loadSubframe)
      
              * loader/mac/FrameLoaderMac.mm:
              (WebCore::FrameLoader::createFrame): Updated to reflect the fact that
              createChildFrameNamed: now returns a WebCore::Frame* instead of a 
              WebCoreFrameBridge *.
              * page/mac/WebCoreFrameBridge.h:
      
      WebKit:
      
              Reviewed by Brady Eidson.
              
              Fixed <rdar://problem/4871518> Leopard9A321: Crash visiting www.audible.com 
              (WebCore::FrameLoader::loadSubframe)
      
              * WebCoreSupport/WebFrameBridge.mm:
              (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
              - The fix: 
                  Changed to re-fetch the child frame we're trying to load before returning it,
                  since its onload handler may have removed it from the document. This
                  allows us to treat a removed frame like a frame that never loaded.
              
              - Plus some cleanup:
                  - Changed to return a WebCore::Frame* instead of a WebFrameBridge *,
                  to simplify some code.
                  - Grouped ObjC objects by usage, and moved calls to -release so that they
                  immediately follow the calls that retain.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82ecdbec
  36. 18 Dec, 2006 1 commit
  37. 11 Dec, 2006 2 commits
    • darin's avatar
      WebCore: · ec94d76b
      darin authored
              Reviewed by Brady.
      
              - did some of the Mac-specific file moves mentioned in my recent mail to the WebKit list
      
              * WebCore.xcodeproj/project.pbxproj: Updated project for file moves.
      
              * bridge/mac/FrameMac.h: Moved to page/mac.
              * bridge/mac/FrameMac.mm: Ditto.
              * bridge/mac/WebCoreFrameBridge.h: Ditto.
              * bridge/mac/WebCoreFrameBridge.mm: Ditto.
              * bridge/mac/WebCoreFrameView.h: Ditto.
              * bridge/mac/WebCoreViewFactory.h: Ditto.
              * bridge/mac/WebCoreViewFactory.m: Ditto.
              * bridge/mac/WebDashboardRegion.h: Ditto.
              * bridge/mac/WebDashboardRegion.m: Ditto.
      
              * bridge/mac/WebCoreKeyboardAccess.h: Moved to page/mac,
              renamed WebCoreKeyboardUIMode.h, and made a C++ header.
      
              * page/EventHandler.h: Updated for change to WebCoreKeyboardAccess.
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::tabsToLinks): Ditto.
              (WebCore::EventHandler::tabsToAllControls): Ditto.
              (WebCore::EventHandler::keyboardUIMode): Ditto.
      
      WebKit:
      
              Reviewed by Brady.
      
              - did some of the Mac-specific file moves mentioned in my recent mail to the WebKit list
      
              * WebCoreSupport/WebFrameBridge.h: Updated for change to WebCoreKeyboardAccess.
              * WebCoreSupport/WebFrameBridge.mm:
              (-[WebFrameBridge _retrieveKeyboardUIModeFromPreferences:]): Ditto.
              (-[WebFrameBridge keyboardUIMode]): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec94d76b
    • darin's avatar
      WebCore: · cb3524af
      darin authored
              Reviewed by Brady.
      
              - http://bugs.webkit.org/show_bug.cgi?id=11794
                fix lifetime problems affecting Frame's ownerElement pointer
      
              * CMakeLists.txt:
              * WebCore.vcproj/WebCore/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              Updated for new source files.
      
              * WebCore.exp: Updated for changes to entry point names.
      
              * bridge/mac/FrameMac.h:
              * bridge/mac/FrameMac.mm: (WebCore::FrameMac::FrameMac):
              * bridge/win/FrameWin.h:
              * bridge/win/FrameWin.cpp: (WebCore::FrameWin::FrameWin):
              * platform/qt/FrameQt.h:
              * platform/qt/FrameQt.cpp: (WebCore::FrameQt::FrameQt):
              Updated owner element type to HTMLFrameOwnerElement.
      
              * bridge/mac/WebCoreFrameBridge.h: Removed non-C++ case since we don't
              use that any more. Updated owner element type to HTMLFrameOwnerElement.
      
              * dom/Document.cpp: Added include so that the ownerElement function can
              compile (since it downcasts an HTMLFrameOwnerElement to an Element).
      
              * html/HTMLFrameElement.cpp:
              (WebCore::containingFrameSetElement): Moved this function in here; it
              doesn't need to be a member function.
              (WebCore::HTMLFrameElement::attach): Updated to call this.
      
              * html/HTMLFrameElementBase.h:
              * html/HTMLFrameElementBase.cpp:
              (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Inherit from
              HTMLFrameOwnerElement. Removed contentFrame, contentDocument, and
              containingFrameSetElement. Removed friend classes.
      
              * html/HTMLFrameOwnerElement.h: Added.
              * html/HTMLFrameOwnerElement.cpp: Added.
      
              * html/HTMLEmbedElement.h:
              * html/HTMLEmbedElement.cpp:
              * html/HTMLObjectElement.h:
              * html/HTMLObjectElement.cpp:
              Remove now-unneeded contentDocument functions.
      
              * html/HTMLPlugInElement.h:
              * html/HTMLPlugInElement.cpp:
              (WebCore::HTMLPlugInElement::HTMLPlugInElement): Inherit from
              HTMLFrameOwnerElement.
      
              * loader/FormState.h:
              * loader/FormState.cpp: Use HTMLFormElement instead of just Element.
      
              * loader/FrameLoader.h:
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::requestFrame): Use HTMLFormElement.
              (WebCore::FrameLoader::loadSubframe): Ditto.
              (WebCore::FrameLoader::requestObject): Don't pass an element parameter
              to shouldUsePlugin, and remove now-unneeded type casts.
              (WebCore::FrameLoader::shouldUsePlugin): Removed unneeded element parameter.
              (WebCore::FrameLoader::handleFallbackContent): Use HTMLFrameOwnerElement.
              (WebCore::FrameLoader::updateBaseURLForEmptyDocument): Ditto.
              (WebCore::FrameLoader::isHostedByObjectElement): Ditto.
              * loader/mac/FrameLoaderMac.mm:
              (WebCore::FrameLoader::load): Use HTMLFormElement.
              (WebCore::FrameLoader::post): Ditto.
              (WebCore::FrameLoader::createFrame): Use HTMLFrameOwnerElement.
      
              * page/Frame.h:
              * page/FramePrivate.h:
              * page/Frame.cpp:
              (WebCore::parentFromOwnerElement): Use HTMLFrameOwnerElement.
              (WebCore::Frame::Frame): Ditto. Also set m_contentFrame on the owner element.
              (WebCore::Frame::ownerElement): Ditto.
              (WebCore::Frame::ownerRenderer): Ditto.
              (WebCore::Frame::disconnectOwnerElement): Clear m_contentFrame on the owner
              element before disconnecting it.
              (WebCore::FramePrivate::FramePrivate): Use HTMLFrameOwnerElement.
      
              * page/mac/EventHandlerMac.mm: Include HTMLFrameOwnerElement.h so that
              the code here will compile (no code changes needed).
      
              * rendering/RenderFrame.cpp: (WebCore::RenderFrame::viewCleared):
              Updated so that RenderFrame doesn't need to be a friend of HTMLFrameElementBase.
      
              * rendering/RenderPart.h:
              * rendering/RenderPart.cpp: (WebCore::RenderPart::RenderPart):
              Use HTMLFrameOwnerElement.
      
              * rendering/RenderPartObject.h:
              * rendering/RenderPartObject.cpp:
              (WebCore::RenderPartObject::RenderPartObject): Use HTMLFrameOwnerElement.
              (WebCore::RenderPartObject::viewCleared): Updated so that RenderFrame doesn't
              need to be a friend of HTMLFrameElementBase.
      
              - other changes
      
              * platform/network/ResourceHandleInternal.h: Added Noncopyable and
              fixed indentation.
      
      WebKit:
      
              Reviewed by Brady.
      
              - http://bugs.webkit.org/show_bug.cgi?id=11794
                fix lifetime problems affecting Frame's ownerElement pointer
      
              * WebCoreSupport/WebFrameBridge.mm:
              (-[WebFrameBridge finishInitializingWithPage:WebCore::frameName:frameView:ownerElement:]):
              (-[WebFrameBridge initSubframeWithOwnerElement:frameName:frameView:]):
              (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
              Use HTMLFrameOwnerElement.
      
              * WebCoreSupport/WebFrameLoaderClient.mm: Include the relevant headers for the
              HTMLFormElement class.
      
              * WebKit.xcodeproj/project.pbxproj: Let Xcode have its way.
      
              * WebView/WebFrame.mm: (-[WebFrame frameElement]): Update includes and types for the
              change in return type of ownerElement.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb3524af