Patch by Trey Matteson <trey@usa.net>
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jul 2005 21:36:42 +0000 (21:36 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jul 2005 21:36:42 +0000 (21:36 +0000)
commit7850462ae66e67b5906ee0df073d8b8e2e92c9a0
treea69400217e05aa9ecc217de2ca34308f97ff9fe5
parenta59d59ac9f8b06548b62801f29e6c297bf4f5ab2
Patch by Trey Matteson <trey@usa.net>
        Reviewed by me.

        Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4015
          PDF views should remember viewing mode, scroll position across back/forward
          Note this doesn't work within frames because of a PDFKit bug - see 4164
        Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4091
          PDF views should keep a separate scaling factor from shared text scaling factor

        Basic idea #1 is that we now have a general mechanism for a WebDocView to save/restore some UI
        state to the WebHistoryItem.
        Basic idea #2 is that _WebDocumentTextSizing is expanded to allow for the case of a WebDocView
        keeping its own notion of a scaling factor.  WebPDFView's -_tracksCommonSizeFactor has justification.

        * History.subproj/WebHistoryItem.m:
        (-[WebHistoryItem setViewState:]):  New methods to hold PList of arbitrary WebView state
        (-[WebHistoryItem viewState]):
        * History.subproj/WebHistoryItemPrivate.h:
        * WebKit.xcodeproj/project.pbxproj:  Add Quartz to framework path so we can import PDFKit files
        * WebView.subproj/WebDocumentInternal.h:  New methods added to _WebDocumentTextSizing.
          Also the _ prefix is sufficient instead of _web_WebDocumentTextSizing.
          Added _WebDocumentViewState protocol.
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]):  Rename of save/restore methods.
        (-[WebFrame _detachFromParent]):  Ditto
        (-[WebFrame _transitionToCommitted:]):  Ditto
        (-[WebFrame _checkLoadCompleteForThisFrame]):  Ditto
        (-[WebFrame _loadItem:withLoadType:]):  Ditto
        (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):  Ditto
        (-[WebFrame _saveViewStateToItem:]):  Call doc view to retrieve view state.
        (-[WebFrame _restoreViewState]):  Call doc view to set view state.
        (-[WebFrame _scrollToTop]):  Nuked dead code.
        (-[WebFrame _textSizeMultiplierChanged]):  This work now appears in WebView.
        (-[WebFrame _saveDocumentAndScrollState]):  Same rename, one code cleanup.
        (-[WebFrame _accumulateDocumentViews:]): Add our docview to the array, call kids.
        (-[WebFrame _documentViews]):  New helper to return all docviews.
        (-[WebFrame _didFirstLayout]):  Same name change.
        * WebView.subproj/WebFrameInternal.h:
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebHTMLView.m:  Removed redundant category decl.
        (-[WebHTMLView _makeTextSmaller:]):  Implement new protocol.
        (-[WebHTMLView _makeTextLarger:]):
        (-[WebHTMLView _makeTextStandardSize:]):
        (-[WebHTMLView _tracksCommonSizeFactor]):
        * WebView.subproj/WebPDFRepresentation.m:  Tweak #imports.
        * WebView.subproj/WebPDFView.h:
        * WebView.subproj/WebPDFView.m:
        (-[WebPDFView _menuItemsFromPDFKitForEvent:]):  No longer intercept context menu text sizing items.
        (-[WebPDFView setDataSource:]):  No longer track the WebView's scaling factor.
        (-[WebPDFView scrollPoint]):  Dig through PDFKit view tree to get real scroll position
        (-[WebPDFView setScrollPoint:]):  Ditto
        (-[WebPDFView viewState]):  Return bundle of viewing params
        (-[WebPDFView setViewState:]):  Restore bundle of viewing params
        (-[WebPDFView _makeTextSmaller:]):  Implement new text sizing protocol
        (-[WebPDFView _makeTextLarger:]):
        (-[WebPDFView _makeTextStandardSize:]):
        (-[WebPDFView _tracksCommonSizeFactor]):
        (-[WebPDFView _canMakeTextSmaller]):
        (-[WebPDFView _canMakeTextLarger]):
        (-[WebPDFView _canMakeTextStandardSize]):
        * WebView.subproj/WebTextView.m:
        (-[WebTextView _makeTextSmaller:]):  Implement new text sizing protocol
        (-[WebTextView _makeTextLarger:]):
        (-[WebTextView _makeTextStandardSize:]):
        (-[WebTextView _tracksCommonSizeFactor]):
        * WebView.subproj/WebView.m:
        (-[WebView setTextSizeMultiplier:]):  Calling docViews is now more complicates than just posting
           a notification to the frame.
        (-[WebView _performTextSizingSelector:withObject:onTrackingDocs:selForNonTrackingDocs:]):  Workhorse
           that sends the text sizing method to the right doc views.
        (-[WebView canMakeTextSmaller]):  Call workhorse.
        (-[WebView canMakeTextLarger]):  Ditto
        (-[WebView makeTextSmaller:]):  Ditto
        (-[WebView makeTextLarger:]):  Ditto
        (-[WebView canMakeTextStandardSize]):  Ditto
        (-[WebView makeTextStandardSize:]):  Ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
WebKit/ChangeLog
WebKit/History.subproj/WebHistoryItem.m
WebKit/History.subproj/WebHistoryItemPrivate.h
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView.subproj/WebDocumentInternal.h
WebKit/WebView.subproj/WebFrame.m
WebKit/WebView.subproj/WebFrameInternal.h
WebKit/WebView.subproj/WebFramePrivate.h
WebKit/WebView.subproj/WebHTMLView.m
WebKit/WebView.subproj/WebPDFRepresentation.m
WebKit/WebView.subproj/WebPDFView.h
WebKit/WebView.subproj/WebPDFView.m
WebKit/WebView.subproj/WebTextView.m
WebKit/WebView.subproj/WebView.m