1. 07 Feb, 2003 5 commits
    • rjw's avatar
      WebKit: · 5fd5a7f5
      rjw authored
              Changes to support per WebController preferences.
      
              Reviewed by Maciej and Ken.
      
              * WebView.subproj/WebController.m:
              (-[WebController setPreferences:]):
              * WebView.subproj/WebControllerPrivate.h:
              * WebView.subproj/WebControllerPrivate.m:
              (-[WebControllerPrivate init]):
              (-[WebControllerPrivate dealloc]):
              (-[WebController _setFormDelegate:]):
              (-[WebController _formDelegate]):
              (-[WebController _settings]):
              (-[WebController _updateWebCoreSettingsFromPreferences:]):
              (-[WebController _releaseUserAgentStrings]):
              (-[WebController _preferencesChangedNotification:]):
              * WebView.subproj/WebFrame.m:
              (-[WebFrame initWithName:webView:controller:]):
              * WebView.subproj/WebPreferences.h:
              * WebView.subproj/WebPreferences.m:
              (-[WebPreferences _postPreferencesChangesNotification]):
              (+[WebPreferences load]):
              (-[WebPreferences _stringValueForKey:]):
              (-[WebPreferences _setStringValue:forKey:]):
              (-[WebPreferences _integerValueForKey:]):
              (-[WebPreferences _setIntegerValue:forKey:]):
              (-[WebPreferences _boolValueForKey:]):
              (-[WebPreferences _setBoolValue:forKey:]):
              (-[WebPreferences standardFontFamily]):
              (-[WebPreferences setStandardFontFamily:]):
              (-[WebPreferences fixedFontFamily]):
              (-[WebPreferences setFixedFontFamily:]):
              (-[WebPreferences serifFontFamily]):
              (-[WebPreferences setSerifFontFamily:]):
              (-[WebPreferences sansSerifFontFamily]):
              (-[WebPreferences setSansSerifFontFamily:]):
              (-[WebPreferences cursiveFontFamily]):
              (-[WebPreferences setCursiveFontFamily:]):
              (-[WebPreferences fantasyFontFamily]):
              (-[WebPreferences setFantasyFontFamily:]):
              (-[WebPreferences defaultFontSize]):
              (-[WebPreferences setDefaultFontSize:]):
              (-[WebPreferences defaultFixedFontSize]):
              (-[WebPreferences setDefaultFixedFontSize:]):
              (-[WebPreferences minimumFontSize]):
              (-[WebPreferences setMinimumFontSize:]):
              (-[WebPreferences defaultTextEncodingName]):
              (-[WebPreferences setDefaultTextEncodingName:]):
              (-[WebPreferences userStyleSheetEnabled]):
              (-[WebPreferences setUserStyleSheetEnabled:]):
              (-[WebPreferences userStyleSheetLocation]):
              (-[WebPreferences setUserStyleSheetLocation:]):
              (-[WebPreferences JavaEnabled]):
              (-[WebPreferences setJavaEnabled:]):
              (-[WebPreferences JavaScriptEnabled]):
              (-[WebPreferences setJavaScriptEnabled:]):
              (-[WebPreferences JavaScriptCanOpenWindowsAutomatically]):
              (-[WebPreferences setJavaScriptCanOpenWindowsAutomatically:]):
              (-[WebPreferences pluginsEnabled]):
              (-[WebPreferences setPluginsEnabled:]):
              (-[WebPreferences allowAnimatedImages]):
              (-[WebPreferences allowAnimatedImageLooping]):
              (-[WebPreferences setAllowAnimatedImageLooping:]):
              (-[WebPreferences setWillLoadImagesAutomatically:]):
              (-[WebPreferences willLoadImagesAutomatically]):
              (-[WebPreferences _initialTimedLayoutDelay]):
              (-[WebPreferences _initialTimedLayoutSize]):
              (-[WebPreferences _pageCacheSize]):
              (-[WebPreferences _objectCacheSize]):
              (-[WebPreferences _initialTimedLayoutEnabled]):
              (-[WebPreferences _resourceTimedLayoutDelay]):
              (-[WebPreferences _resourceTimedLayoutEnabled]):
              * WebView.subproj/WebPreferencesPrivate.h:
      WebCore:
              Changes to support per WebController preferences.
              KHTMLPart now always accesses preferences from it's m_setting.
              Changes made to WebPreferences pass to WebCoreSetting to KTMLSettings.
              Added JavaScriptCanOpenWindowsAutomatically to KHTMLSettings.
      
              Reviewed by Maciej and Ken.
      
              * khtml/ecma/kjs_window.cpp:
              (WindowFunc::tryCall):
              * khtml/khtml_part.cpp:
              (KHTMLPart::init):
              (KHTMLPart::restoreURL):
              (KHTMLPart::openURL):
              (KHTMLPart::begin):
              (KHTMLPart::reparseConfiguration):
              * khtml/khtmlpart_p.h:
              * kwq/KWQKConfigBase.h:
              * kwq/KWQKConfigBase.mm:
              (KConfig::readUnsignedNumEntry):
              * kwq/KWQKHTMLPart.h:
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::setSettings):
              * kwq/KWQKHTMLSettings.h:
              * kwq/KWQKHTMLSettings.mm:
              (KHTMLSettings::stdFontName):
              (KHTMLSettings::fixedFontName):
              (KHTMLSettings::serifFontName):
              (KHTMLSettings::sansSerifFontName):
              (KHTMLSettings::cursiveFontName):
              (KHTMLSettings::fantasyFontName):
              (KHTMLSettings::minFontSize):
              (KHTMLSettings::mediumFontSize):
              (KHTMLSettings::mediumFixedFontSize):
              (KHTMLSettings::isJavaEnabled):
              (KHTMLSettings::autoLoadImages):
              (KHTMLSettings::isPluginsEnabled):
              (KHTMLSettings::isJavaScriptEnabled):
              (KHTMLSettings::JavaScriptCanOpenWindowsAutomatically):
              (KHTMLSettings::userStyleSheet):
              (KHTMLSettings::setStdFontName):
              (KHTMLSettings::setFixedFontName):
              (KHTMLSettings::setSerifFontName):
              (KHTMLSettings::setSansSerifFontName):
              (KHTMLSettings::setCursiveFontName):
              (KHTMLSettings::setFantasyFontName):
              (KHTMLSettings::setMinFontSize):
              (KHTMLSettings::setMediumFontSize):
              (KHTMLSettings::setMediumFixedFontSize):
              (KHTMLSettings::setAutoLoadImages):
              (KHTMLSettings::setIsJavaScriptEnabled):
              (KHTMLSettings::setIsJavaEnabled):
              (KHTMLSettings::setArePluginsEnabled):
              (KHTMLSettings::setJavaScriptCanOpenWindowsAutomatically):
              (KHTMLSettings::setUserStyleSheet):
              * kwq/WebCoreBridge.h:
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge init]):
              (-[WebCoreBridge initializeSettings:]):
              * kwq/WebCoreSettings.h:
              * kwq/WebCoreSettings.mm:
              (-[WebCoreSettings dealloc]):
              (-[WebCoreSettings init]):
              (-[WebCoreSettings setStandardFontFamily:]):
              (-[WebCoreSettings setFixedFontFamily:]):
              (-[WebCoreSettings setSerifFontFamily:]):
              (-[WebCoreSettings setSansSerifFontFamily:]):
              (-[WebCoreSettings setCursiveFontFamily:]):
              (-[WebCoreSettings setFantasyFontFamily:]):
              (-[WebCoreSettings setMinimumFontSize:]):
              (-[WebCoreSettings setDefaultFontSize:]):
              (-[WebCoreSettings setDefaultFixedFontSize:]):
              (-[WebCoreSettings setJavaEnabled:]):
              (-[WebCoreSettings setPluginsEnabled:]):
              (-[WebCoreSettings setJavaScriptEnabled:]):
              (-[WebCoreSettings setJavaScriptCanOpenWindowsAutomatically:]):
              (-[WebCoreSettings setWillLoadImagesAutomatically:]):
              (-[WebCoreSettings setUserStyleSheetLocation:]):
              (-[WebCoreSettings userStyleSheetLocation]):
              (-[WebCoreSettings settings]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5fd5a7f5
    • hyatt's avatar
      *** empty log message *** · def5007b
      hyatt authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      def5007b
    • darin's avatar
      * khtml/rendering/render_table.h: Added copyright date. · b687e04f
      darin authored
              * khtml/rendering/render_table.cpp: Added copyright date.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b687e04f
    • darin's avatar
      Reviewed by Dave. · 579936d7
      darin authored
              - fixed 3165171 -- REGRESSION: images overlap text
      
              * khtml/rendering/table_layout.cpp: (AutoTableLayout::calcEffectiveWidth):
              Change to distribute space to the fixed columns first so the code to distribute to non-fixed columns does not
              assume it can distribute more to the fixed columns than it really can.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      579936d7
    • darin's avatar
      Reviewed by Ken. · d44ec82f
      darin authored
              - fixed 3167025 -- REGRESSION: http://www.buypcdirect.com doesn't wrap correctly b/c of huge cell width value
      
              * khtml/rendering/table_layout.h: Make the fields in the Layout structure used in table
              width computations use int instead of short.
              * khtml/rendering/table_layout.cpp:
              (FixedTableLayout::calcMinMaxWidth): Make sure we don't overflow m_minWidth or m_maxWidth in case the
              specified fixed width value is huge.
              (FixedTableLayout::layout): Use ints for the calcWidth array instead of shorts.
              (AutoTableLayout::calcMinMaxWidth): Clamp both maxWidth and minWidth to 0x7fff to match the other code in
              this file, rather than using 10000.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d44ec82f
  2. 06 Feb, 2003 12 commits
    • darin's avatar
      Reviewed by Maciej. · c8f4ebe0
      darin authored
              - fixed 3140738 -- textarea contents are LF delimited instead of CRLF
      
              * khtml/html/html_formimpl.cpp:
              (encodeCString): Turn CR followed by something other than LF into CRLF.
              (fixLineBreaks): Added. Turns stray CRs and LFs into CRLF.
              (HTMLFormElementImpl::formData): Call fixLineBreaks on form data.
      
              - fixed 3167235 -- REGRESSION: assert after clicking on a link on radioslack.com
      
              * kwq/KWQTextCodec.mm: (KWQTextDecoder::toUnicode): Return the null string
              if the passed in string pointer is NULL, rather than asserting.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c8f4ebe0
    • hyatt's avatar
      Fix rollingstone regression. · 7ed1f1e8
      hyatt authored
              Reviewed by mjs
      
              * khtml/rendering/render_object.cpp:
              (RenderObject::setLayouted):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ed1f1e8
    • cblu's avatar
      - Made WebDownload.h a public header. · 40677c73
      cblu authored
      	- Added stubs for the new methods.
      	- Moved all private methods to the WebPrivate category.
      	- Added FIXMEs for things that needed to be removed or implemented.
      
              Reviewed by rjw.
      
              * Downloads.subproj/WebDownload.h:
              * Downloads.subproj/WebDownload.m:
              (-[WebDownload initWithRequest:delegate:]):
              (-[WebDownload dealloc]):
              (-[WebDownload cancel]):
              (-[WebDownload _initWithLoadingHandle:request:response:delegate:]):
              (-[WebDownload initWithDataSource:]):
              (-[WebDownload receivedData:]):
              (-[WebDownload finishedLoading]):
              (-[WebDownload decodeHeaderData:dataForkData:resourceForkData:]):
              (-[WebDownload decodeData:dataForkData:resourceForkData:]):
              (-[WebDownload createFileIfNecessary]):
              (-[WebDownload writeDataForkData:resourceForkData:]):
              (-[WebDownload dataIfDoneBufferingData:]):
              (-[WebDownload decodeData:]):
              (-[WebDownload finishDecoding]):
              * Downloads.subproj/WebDownloadPrivate.h:
              * WebKit.pbproj/project.pbxproj:
              * WebView.subproj/WebMainResourceClient.m:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      40677c73
    • darin's avatar
      Reviewed by Ken. · db9104f8
      darin authored
              - fixed 3166693 -- REGRESSION: infinite recursion in makeFirstResponder while tabbing as page loaded
      
              Because we now deliver blur events, we are triggering a handler on this page that changes focus.
              It triggered an infinite loop because setFocus kept setting the focus back to a text field, which
              then changed the focus to its editor. The fix was to make QWidget::setFocus smarter about editors.
      
              * kwq/KWQTextField.mm: (-[KWQTextField becomeFirstResponder]): Don't do any changes in responder until
              after calling KWQKHTMLPart::setDocumentFocus, since that can change focus away. If it does, return NO.
      
              * kwq/KWQWidget.h: Add hasFocus, remove virtual from setFocus and clearFocus.
              * kwq/KWQWidget.mm:
              (QWidget::hasFocus): Added. Moved code to check if a particular view is first responder here.
              Here's the bug fix too, check if the first responder is this widget's view's editor, and if so return true.
              (QWidget::setFocus): Do nothing if this widget already has focus.
              (QWidget::clearFocus): Do nothing if this widget does not have focus.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      db9104f8
    • darin's avatar
      Reviewed by Dave. · 46de6900
      darin authored
              - fixed 3161953 -- crash in KWQListImpl, DOM::CSSStyleSheetImpl::isLoading on XML page
      
              The problem is that this page has some non-HTML elements, but the code was checking
              only the element ID, not whether it is HTML or not. Also fixed the page's layout.
      
              * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyleSelector):
              Check that the node is an HTML element before checking the ID in two places.
              Without this, we cast the pointer to the wrong type and trash memory.
      
              * khtml/rendering/render_root.cpp:
              (RenderRoot::layout): Set all the children false here, not just firstChild.
              (RenderRoot::docHeight): Take all the children's heights into account, not just firstChild.
              (RenderRoot::docWidth): Take all the children's widths into account, not just firstChild.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      46de6900
    • cblu's avatar
      Renamed WebDownloadHandler to WebDownload. · 987f4d30
      cblu authored
      	Made ivars of WebDownload private.
      
              Reviewed by kocienda.
      
              * Downloads.subproj/WebDownload.h: Added.
              * Downloads.subproj/WebDownload.m: Added.
              (-[WebDownloadPrivate init]):
              (-[WebDownloadPrivate dealloc]):
              (-[WebDownload initWithDataSource:]):
              (-[WebDownload dealloc]):
              (-[WebDownload decodeHeaderData:dataForkData:resourceForkData:]):
              (-[WebDownload decodeData:dataForkData:resourceForkData:]):
              (-[WebDownload closeFork:deleteFile:]):
              (-[WebDownload closeFileAndDelete:]):
              (-[WebDownload closeFile]):
              (-[WebDownload cleanUpAfterFailure]):
              (-[WebDownload createFileIfNecessary]):
              (-[WebDownload writeDataForkData:resourceForkData:]):
              (-[WebDownload dataIfDoneBufferingData:]):
              (-[WebDownload decodeData:]):
              (-[WebDownload receivedData:]):
              (-[WebDownload finishDecoding]):
              (-[WebDownload finishedLoading]):
              (-[WebDownload cancel]):
              (-[WebDownload path]):
              (-[WebDownload writeForkData:isDataFork:]):
              (-[WebDownload errorWithCode:]):
              (-[WebDownload cancelWithError:]):
              (-[WebDownload dataForkReferenceNumber]):
              (-[WebDownload setDataForkReferenceNumber:]):
              (-[WebDownload resourceForkReferenceNumber]):
              (-[WebDownload setResourceForkReferenceNumber:]):
              (-[WebDownload areWritesCancelled]):
              (-[WebDownload setWritesCancelled:]):
              (WriteCompletionCallback):
              (CloseCompletionCallback):
              (DeleteCompletionCallback):
              * Downloads.subproj/WebDownloadHandler.h: Removed.
              * Downloads.subproj/WebDownloadHandler.m: Removed.
              * WebKit.pbproj/project.pbxproj:
              * WebView.subproj/WebController.h:
              * WebView.subproj/WebDataSource.m:
              * WebView.subproj/WebDataSourcePrivate.m:
              * WebView.subproj/WebMainResourceClient.h:
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient dealloc]):
              (-[WebMainResourceClient download]):
              (-[WebMainResourceClient isDownload]):
              (-[WebMainResourceClient receivedError:complete:]):
              (-[WebMainResourceClient continueAfterContentPolicy:response:]):
              (-[WebMainResourceClient handle:didReceiveData:]):
              (-[WebMainResourceClient handleDidFinishLoading:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      987f4d30
    • cblu's avatar
      Fixed: 3125067 - Investigate performance implications of writing download file data · 2368ce6d
      cblu authored
              Reviewed by trey, rjw, darin.
      
              * Downloads.subproj/WebDownloadHandler.h:
              * Downloads.subproj/WebDownloadHandler.m:
              (-[WebDownloadHandler closeFileAndDelete:]): close the file asynchronously
              (-[WebDownloadHandler closeFile]): call closeFileAndDelete:NO
              (-[WebDownloadHandler cleanUpAfterFailure]): call closeFileAndDelete:YES
              (-[WebDownloadHandler writeDataForkData:resourceForkData:]): call writeForkData:isDataFork:
              (-[WebDownloadHandler path]): new
              (-[WebDownloadHandler writeForkData:isDataFork:]): writes file asynchronously
              (-[WebDownloadHandler errorWithCode:]): moved
              (-[WebDownloadHandler cancelWithError:]): new, stops load with error
              (-[WebDownloadHandler dataForkReferenceNumber]): new
              (-[WebDownloadHandler setDataForkReferenceNumber:]): new
              (-[WebDownloadHandler resourceForkReferenceNumber]): new
              (-[WebDownloadHandler setResourceForkReferenceNumber:]): new
              (WriteCompletionCallback): new
              (CloseCompletionCallback): new, removes file if necessary
              (DeleteCompletionCallback): new,
              * WebView.subproj/WebDataSourcePrivate.h:
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _stopLoadingWithError:]): new
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2368ce6d
    • darin's avatar
      Reviewed by Dave. · e5f926c7
      darin authored
              - fixed 3165295 -- Hang while triple clicking on page
      
              Flaws in the continuation logic we added to checkSelectionPoint made it take
              exponential time on pages with a lot of continuations.
      
              * khtml/rendering/render_object.h: Make checkSelectionPoint non-virtual, and
              added virtual checkSelectionPointIgnoringContinuations.
              * khtml/rendering/render_object.cpp:
              (RenderObject::checkSelectionPoint): Added. Does the inline continuation part of
              the render object walking process, which we only want to do at the top level,
              since otherwise we will see the same nodes multiple times. Also optimizes by only
              looking at the inline continuations of inlines, not any continuations of a block.
              (RenderObject::checkSelectionPointIgnoringContinuations): This is now the virtual
              function that is overriden by RenderText. It is identical to the old version of
              checkSelectionPoint, minus the continuation logic.
      
              * khtml/rendering/render_text.h: Changed the name of checkSelectionPoint to
              checkSelectionPointIgnoringContinuations.
              * khtml/rendering/render_text.cpp: (RenderText::checkSelectionPointIgnoringContinuations):
              Changed the name, and nothing else.
      
              - fixed my build which was crashing on load
      
              * WebCore.pbproj/project.pbxproj: Change seg1addr from 2200000 to 9000000.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5f926c7
    • darin's avatar
      Reviewed by NOBODY (OOPS!). · 7bfa5fcc
      darin authored
              - fixed 3165295 -- Hang while triple clicking on page
      
              Flaws in the continuation logic we added to checkSelectionPoint made it take
              exponential time on pages with a lot of continuations.
      
              * khtml/rendering/render_object.h: Make checkSelectionPoint non-virtual, and
              added virtual checkSelectionPointIgnoringContinuations.
              * khtml/rendering/render_object.cpp:
              (RenderObject::checkSelectionPoint): Added. Does the inline continuation part of
              the render object walking process, which we only want to do at the top level,
              since otherwise we will see the same nodes multiple times. Also optimizes by only
              looking at the inline continuations of inlines, not any continuations of a block.
              (RenderObject::checkSelectionPointIgnoringContinuations): This is now the virtual
              function that is overriden by RenderText. It is identical to the old version of
              checkSelectionPoint, minus the continuation logic.
      
              * khtml/rendering/render_text.h: Changed the name of checkSelectionPoint to
              checkSelectionPointIgnoringContinuations.
              * khtml/rendering/render_text.cpp: (RenderText::checkSelectionPointIgnoringContinuations):
              Changed the name, and nothing else.
      
              - fixed my build which was crashing on load
      
              * WebCore.pbproj/project.pbxproj: Change seg1addr from 2200000 to 9000000.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7bfa5fcc
    • trey's avatar
      WebCore: · be0a2036
      trey authored
      	3137647 - ad frames get their own history entries at channels.netscape.com
      	3133844 - 2 items in back list at http://www.kiup-bank.com/personal/main01.html
      
      	The logic for deciding whether new entries are added to history is moved here
      	from WebKit.  The advantage is that we can take specific action in each of the
      	relevant cases instead of WK the half-informed guessing WK was doing.
      
      	Here is what we now use for the lockHistory param to scheduleRedirect():
      
      	document.location = XXX  	-    !userGesture
      	window.location = XXX		-    !userGesture
      	window.open			-    false
      	window.replace			-    true
      	window.reload			-    true
      	meta equiv http-refresh		-    delay <= 1
      	http-refresh			-    delay <= 1
      
              Reviewed by Maciej, Darin.
      
              * khtml/ecma/kjs_binding.cpp:
              (ScriptInterpreter::wasRunByUserGesture):  Rename of previous isWindowOpenAllowed(),
      	since we know use it for multiple purposes.
              * khtml/ecma/kjs_binding.h:
              * khtml/ecma/kjs_html.cpp:
              (KJS::HTMLDocument::putValue):  Assignment to document.location locks history
      	if not a result of a user gesture.
              * khtml/ecma/kjs_window.cpp:
              (Window::put):  Assignment to window.location locks history
      	if not a result of a user gesture.
              (WindowFunc::tryCall):  Adopt rename to wasRunByUserGesture().
              (Location::put):  Assignment to window.location locks history
      	if not a result of a user gesture.
              * khtml/khtml_part.cpp:
              (KHTMLPart::receivedFirstData):  http-refreshes lock history if the timeout<1
              * khtml/xml/dom_docimpl.cpp:
              (DocumentImpl::processHttpEquiv):  http-refreshes lock history if the timeout<1
      
      WebKit:
      
      	3137647 - ad frames get their own history entries at channels.netscape.com
      	3133844 - 2 items in back list at http://www.kiup-bank.com/personal/main01.html
      
      	Move logic for deciding on "quick redirect" down to WebCore, where we really know
      	what case we're in instead of having to guess from the params we were receiving.
      
              Reviewed by Maciej, Darin.
      
              * Plugins.subproj/WebNetscapePluginDocumentView.m:
              (-[WebNetscapePluginDocumentView setDataSource:]):  Fix build error (URL vs String)
              * WebView.subproj/WebFramePrivate.h:  Nuke Completing state.
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _transitionToLayoutAcceptable]):  Nuke Completing state.
              (-[WebFrame _transitionToCommitted:]):  Nuke Completing state.
              (-[WebFrame _isLoadComplete]):  Nuke Completing state.
              (-[WebFrame _clientRedirectedTo:delay:fireDate:lockHistory:]):
      	Just obey lockHistory param when deciding whether we are doing a "client redirect"
      	instead of previous guesswork.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be0a2036
    • rjw's avatar
      WebKit: · 085e6357
      rjw authored
              Rename WebError to WebKitError.
      
              Reviewed by maciej.
      
              * API-Issues.rtf:
              * Bookmarks.subproj/WebBookmarkImporter.m:
              (-[WebBookmarkImporter initWithPath:]):
              * Downloads.subproj/WebDownloadHandler.m:
              (-[WebDownloadHandler createFileIfNecessary]):
              (-[WebDownloadHandler writeDataForkData:resourceForkData:]):
              (-[WebDownloadHandler decodeData:]):
              (-[WebDownloadHandler finishedLoading]):
              * Misc.subproj/WebKitErrors.h:
              * Plugins.subproj/WebNetscapePluginDocumentView.m:
              (-[WebNetscapePluginDocumentView setDataSource:]):
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]):
              (-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]):
              * WebView.subproj/WebBaseResourceHandleDelegate.m:
              (-[WebBaseResourceHandleDelegate notifyDelegatesOfInterruptionByPolicyChange]):
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _continueAfterNavigationPolicy:]):
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient interruptForPolicyChangeAndKeepLoading:]):
              (-[WebMainResourceClient continueAfterContentPolicy:response:]):
              * WebView.subproj/WebView.m:
              (+[WebView initialize]):
      WebBrowser:
              Rename WebError to WebKitError.
      
              Reviewed by maciej.
      
              * BrowserWebController.m:
              (-[BrowserWebController unableToImplementPolicy:error:forURL:inFrame:]):
              * LoadProgressMonitor.m:
              (-[LoadProgressMonitor pluginFailedWithError:dataSource:]):
              * LocationChangeHandler.m:
              (-[LocationChangeHandler locationChangeDone:forDataSource:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      085e6357
    • cblu's avatar
      WebKit: · ef093f01
      cblu authored
              Comment should have been "Made WebPluginError constructors private."
      
              * ChangeLog:
      
      WebBrowser:
      
      	Comment should have been "Made WebPluginError constructors private."
      
              * ChangeLog:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ef093f01
  3. 05 Feb, 2003 7 commits
    • cblu's avatar
      WebKit: · d53e8883
      cblu authored
      	WebKit API clean-up:
      	- Added enum to WebContextMenuDelegate that is the menu item tag of the menu items passed in the default menu item array.
      	- WebPluginError should return URL strings.
      	- Made WebContextMenuDelegate constructors private.
      
              Reviewed by rjw.
      
              * Plugins.subproj/WebNetscapePluginDocumentView.m:
              (-[WebNetscapePluginDocumentView setDataSource:]):
              * Plugins.subproj/WebPluginError.h:
              * Plugins.subproj/WebPluginError.m:
              (-[WebPluginError pluginPageURL]):
              * Plugins.subproj/WebPluginErrorPrivate.h: Added.
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]):
              * WebKit.pbproj/project.pbxproj:
              * WebView.subproj/WebContextMenuDelegate.h:
              * WebView.subproj/WebDefaultContextMenuDelegate.h:
              * WebView.subproj/WebDefaultContextMenuDelegate.m:
              (-[WebDefaultContextMenuDelegate menuItemWithTag:]):
              (-[WebDefaultContextMenuDelegate contextMenuItemsForElement:defaultMenuItems:]):
      
      WebBrowser:
      
      	WebKit API clean-up:
      	- Added enum to WebContextMenuDelegate that is the menu item tag of the menu items passed in the default menu item array.
      	- WebPluginError should return URL strings.
      	- Made WebContextMenuDelegate constructors private.
      
      
              Reviewed by rjw.
      
              * ContextMenuHandler.m:
              (-[ContextMenuHandler addMenuItemWithTag:fromArray:toArray:]):
              (-[ContextMenuHandler addMenuItemWithTitle:action:toArray:]):
              (-[ContextMenuHandler contextMenuItemsForElement:defaultMenuItems:]):
              * LoadProgressMonitor.m:
              (-[LoadProgressMonitor launchApplicationSheetEnded:returnCode:contextInfo:]):
              (-[LoadProgressMonitor pluginErrorSheetEnded:returnCode:contextInfo:]):
              (-[LoadProgressMonitor pluginFailedWithError:dataSource:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d53e8883
    • trey's avatar
      WebCore: · c1893a87
      trey authored
      	Pass formValues up through the bridge at submit time.
      
              Reviewed by Maciej
      
              * khtml/html/html_formimpl.cpp:
              (HTMLFormElementImpl::submit):  Tell KWQPart about the form values, instead of
      	talking to the khtmlview.
              * kwq/KWQKHTMLPart.h:  New ivar to store formValues.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::KWQKHTMLPart):  Init ivar
              (KWQKHTMLPart::~KWQKHTMLPart):  Free ivar
              (KWQKHTMLPart::openURL):  Pass nil formValues
              (KWQKHTMLPart::openURLRequest):    Pass nil formValues
              (KWQKHTMLPart::clearRecordedFormValues):  Clear saved formValues
              (KWQKHTMLPart::recordFormValue):  Record a name/value
              (KWQKHTMLPart::submitForm):  Pass along recorded formValues
              (KWQKHTMLPart::urlSelected):    Pass nil formValues
              * kwq/KWQKHTMLPartBrowserExtension.mm:
              (KHTMLPartBrowserExtension::createNewWindow):    Pass nil formValues
              * kwq/WebCoreBridge.h:  New params for formValues
      
      WebKit:
      
      	WC now tells us the form values being submitted with a get/post.
      	We forward this info to a new WebFormDelegate method.  Most of this
      	change is just glue passing the formValues through all our layers.
      
              Reviewed by Maciej
      
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge loadURL:reload:triggeringEvent:formValues:])
      	Pass along formValues.
              (-[WebBridge postWithURL:data:contentType:triggeringEvent:formValues:]):
      	Pass along formValues.
              * WebKit.pbproj/project.pbxproj:  Reorder previously added files.
              * WebView.subproj/WebControllerPolicyDelegate.m:  Fix latent copy/paste error
      	where two keys had the same underlying string value!
              * WebView.subproj/WebFormDelegate.h:  Declare new delegate method.
              * WebView.subproj/WebFormDelegate.m:
              (-[WebFormDelegate frame:willSubmitFormWithValues:]):   NOP impl of new method.
              * WebView.subproj/WebFrame.m:
              (-[WebFrame loadRequest:]):  Pass nil formValues.
              (-[WebFrame reload]):  Pass nil formValues.
              * WebView.subproj/WebFramePrivate.h:  New ivar to hold form values
      	while waiting for the policy delegate response.
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFramePrivate dealloc]):  ASSERT new ivar is nil.
              (-[WebFrame _loadItem:fromItem:withLoadType:]):   Pass nil formValues.
              (-[WebFrame _loadRequest:triggeringAction:loadType:formValues:]):
      	Pass along formValues.
      	(-[WebFrame _invalidatePendingPolicyDecisionCallingDefaultAction:]):
      	Pass nil formValues to continuation method.
              (-[WebFrame _checkNavigationPolicyForRequest:dataSource:formValues:andCall:withSelector:]):
      	Stash formValues before calling policy delegate.
              (-[WebFrame _continueAfterNavigationPolicy:]):
      	Resurrect formValues after calling policy delegate, pass to continuation method.
              (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:formValues:]):
      	Bail on nil request instead of shouldContinue=NO
              (-[WebFrame _loadURL:loadType:triggeringEvent:formValues:]):
      	Pass formValues along.
              (-[WebFrame _loadURL:intoChild:]): Pass nil formValues.
              (-[WebFrame _postWithURL:data:contentType:triggeringEvent:formValues:]):
      	Pass formValues along.
              (-[WebFrame _reloadAllowingStaleDataWithOverrideEncoding:]):
      	Pass nil formValues.
              (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formValues:]):
      	Bail on nil request instead of shouldContinue=NO.  Call new FormDelegate method.
              (-[WebFrame _loadDataSource:withLoadType:formValues:]):
      	Pass formValues along.
              (-[WebFrame _downloadRequest:toDirectory:]):
      	Pass nil formValues.
              * WebView.subproj/WebMainResourceClient.m:
              (-[WebMainResourceClient continueAfterNavigationPolicy:formValues:]):
      	Bail on nil request instead of shouldContinue=NO
              (-[WebMainResourceClient handle:willSendRequest:]):
      	Pass nil formValues.
      
      WebBrowser:
      
      	Add new FormCompletionController class, mostly unimplemented.
      	Add implementation of new WebFormDelegate method, which tells us
      	when a form is submitted.
      
              Reviewed by Maciej
      
              * BrowserWindowController.m:
              (-[FormDelegate dealloc]):  Free completion controller.
              (-[FormDelegate controlTextDidBeginEditing:inFrame:]): Alloc completion controller.
              (-[FormDelegate frame:willSubmitFormWithValues:]):  New FormDelegate method,
      	pass on to completion controller.
              * FormCompletionController.h: Added.
              * FormCompletionController.m: Added.  New class, NOP impls.
              (-[FormCompletionController initWithSourceField:frame:]):
              (+[FormCompletionController _loadCompletionDB]):
              (+[FormCompletionController frame:willSubmitFormWithValues:]):
              (-[FormCompletionController executeQuery]):
              (-[FormCompletionController reflectSelectedRow]):
              (-[FormCompletionController reflectFinalSelectedRow]):
              * LocationChangeHandler.m:
              (-[LocationChangeHandler locationChangeStartedForDataSource:]):
      	Made some code a little clearer.
              * WebBrowser.pbproj/project.pbxproj:  New classes.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c1893a87
    • rjw's avatar
      WebKit: · e3722a0d
      rjw authored
              WebHistory* API clenaup.
      
              Reviewed by Chris.
      
              * Bookmarks.subproj/WebBookmarkLeaf.m:
              * History.subproj/WebHistory.h:
              * History.subproj/WebHistory.m:
              * History.subproj/WebHistoryItem.h:
              * History.subproj/WebHistoryItem.m:
              (-[WebHistoryItem title]):
              (-[WebHistoryItem setDisplayTitle:]):
              (-[WebHistoryItem hash]):
              (-[WebHistoryItem anchor]):
              (-[WebHistoryItem isEqual:]):
              (-[WebHistoryItem description]):
              (-[WebHistoryItem _retainIconInDatabase:]):
              (+[WebHistoryItem entryWithURL:]):
              (-[WebHistoryItem initWithURL:title:]):
              (-[WebHistoryItem initWithURL:target:parent:title:]):
              (-[WebHistoryItem URL]):
              (-[WebHistoryItem target]):
              (-[WebHistoryItem parent]):
              (-[WebHistoryItem dictionaryRepresentation]):
              (-[WebHistoryItem initFromDictionaryRepresentation:]):
              * History.subproj/WebHistoryItemPrivate.h:
              * History.subproj/WebHistoryPrivate.h:
              * History.subproj/WebHistoryPrivate.m:
              * WebKit.pbproj/project.pbxproj:
              * WebView.subproj/WebController.h:
              * WebView.subproj/WebController.m:
              (-[WebController setPreferences:]):
              (-[WebController preferences]):
              * WebView.subproj/WebControllerPrivate.h:
              * WebView.subproj/WebControllerPrivate.m:
              (-[WebControllerPrivate dealloc]):
              * WebView.subproj/WebDataSourcePrivate.m:
              * WebView.subproj/WebFramePrivate.m:
      WebBrowser:
              WebHistory* API clenaup.
      
              Reviewed by Chris.
      
              * BrowserDocument.m:
              * Debug/DebugUtilities.m:
              * GlobalHistory.m:
              (-[GlobalHistory updateDisplayTitleForHistoryItem:]):
              * URLCompletionController.m:
              (-[URLCompletionController tableView:objectValueForTableColumn:row:]):
      Tests:
              Added (-[DataResourceRequest initWithString:]).
      
              Reviewed by me.
      
              * SnippetEditor/DataResourceRequest.h:
              * SnippetEditor/DataResourceRequest.m:
              (-[DataResourceRequest initWithString:]):
              * SnippetEditor/SnippetController.m:
              (-[SnippetController updateFromText:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3722a0d
    • darin's avatar
      Reviewed by Dave. · fdb1677f
      darin authored
              - fixed 3165682 -- REGRESSION: assertion failure in appendChildNode loading cnn.com
      
              * khtml/rendering/render_table.cpp: (RenderTable::addChild):
              Get rid of double-addChild introduced when I carelessly rolled in a change
              from the KHTML guys.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fdb1677f
    • hyatt's avatar
      Fix for 3164949. My fix to make form controls actually obey · 75249a89
      hyatt authored
      	display settings in CSS exposed a bug in the html4.css
      	stylesheet.  SELECT had been set to be display: block, which
      	is of course just plain wrong.
      
              Reviewed by darin
      
              * khtml/css/html4.css:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      75249a89
    • rjw's avatar
      WebKit: · 8e0d2b7b
      rjw authored
              Cleanup public WebHistory API, stage 1.
      
              Reviewed by trey.
      
              * History.subproj/WebHistory.h:
              * History.subproj/WebHistory.m:
              (-[_WebCoreHistoryProvider initWithHistory:]):
              (-[_WebCoreHistoryProvider containsEntryForURLString:]):
              (-[_WebCoreHistoryProvider dealloc]):
              (+[WebHistory sharedHistory]):
              (+[WebHistory createSharedHistoryWithFile:]):
              * History.subproj/WebHistoryPrivate.h:
              * History.subproj/WebHistoryPrivate.m:
      
      WebBrowser:
              Cleanup public WebHistory API, stage 1.
      
              Reviewed by trey.
      
              * GlobalHistory.m:
              (-[GlobalHistory init]):
      
      WebCore:
              Cleanup public WebHistory API, stage 1.
      
              Reviewed by trey.
      
              * kwq/KWQKHistoryProvider.mm:
              * kwq/WebCoreHistory.h:
              * kwq/WebCoreHistory.m:
              (+[WebCoreHistory setHistoryProvider:]):
              (+[WebCoreHistory historyProvider]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e0d2b7b
    • darin's avatar
      Reviewed by Maciej. · 59a7b98d
      darin authored
              - fixed 3164850 -- REGRESSION: query URLs are broken
      
              Mea culpa. The KURL test in the Tests directory failed last time, but for
              some reason I didn't notice that when I ran it, perhaps due to the other
              failing tests.
      
              * kwq/KWQKURL.mm: (appendEscapingBadChars): Don't escape '?' even though
              it is in the "bad character" set, since this is a more-lenient definition
              of bad character. Also fixed a buffer overrun bug in the '%'-sequence-preserving
              code, which is a second way this function is lenient. We still get the speed
              because most characters this routine processes are not bad characters.
              (KURL::encode_string): Instead of calling appendEscapingBadChars, put in
              a strict version of the escaping loop that does not tolerate pre-existing
              '%' sequences or '?' characters.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      59a7b98d
  4. 04 Feb, 2003 11 commits
    • rjw's avatar
      WebKit API Notes. · 05394eac
      rjw authored
      Reviewed by me.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      05394eac
    • darin's avatar
      Reviewed by Dave. · 14c61f08
      darin authored
              - rolled in table code fix from Dirk on the khtml-dev list
      
              * khtml/rendering/render_table.cpp: (RenderTable::addChild):
              Change return back to break.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      14c61f08
    • darin's avatar
      Reviewed by Maciej. · dd417a20
      darin authored
              - we say goodbye to "MIB numbers"
      
              * khtml/misc/decoder.cpp:
              (Decoder::Decoder): Get the Latin-1 codec using a name.
              (Decoder::setEncoding): Detect the Hebrew encoding using isISOLatin1Hebrew()
              instead of MIB number.
              (Decoder::decode): Get the UCS-2 codec using a name. Redo APPLE_CHANGES so
              we don't get the MIB-number-based workaround for a bug in QTextCodec that
              KWQ doesn't have. Get the Latin-1 codec using a name.
              * khtml/misc/loader.cpp:
              (CachedCSSStyleSheet::CachedCSSStyleSheet): Get the Latin-1 codec using a name.
              (CachedScript::CachedScript): Get the Latin-1 codec using a name.
      
              * kwq/KWQCharsets.h: Remove the two MIB-related functions.
              * kwq/KWQCharsets.mm: Remove the MIB number from the character set table struct.
              Remove the MIB-related dictionary globals and functions.
              (buildDictionaries): Remove code to set up the MIB-related dictionaries.
      
              * kwq/KWQTextCodec.h: Remove codecForMib, mibEnum, and encoding member functions.
              Add isISOLatin1Hebrew member function.
              * kwq/KWQTextCodec.mm:
              (QTextCodec::makeDecoder): Pass in the encoding when making KWQTextDecoder rather
              than passing in the QTextCodec object.
              (QTextCodec::toUnicode): Ditto.
              (QTextCodec::isISOLatin1Hebrew): Return true for kCFStringEncodingISOLatinHebrew only.
              (KWQTextDecoder::convertUsingTEC): Get encoding directly instead of from a QTextCodec.
              (KWQTextDecoder::toUnicode): Ditto.
      
              * kwq/make-charset-table.pl: Don't write out MIB numbers.
              * kwq/KWQCharsetData.c: Regenerated.
      
              * khtml/khtml_part.cpp: (KHTMLPart::completeURL):
              Don't bother passing the MIB number to KURL. Soon, we'll have to
              do something smart here, but we won't use MIB numbers.
      
              * kwq/mac-encodings.txt: Added more 16-bit Unicode character set names.
              Updated some comments.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dd417a20
    • hyatt's avatar
      Patch calcInlineMaxWidth to add in left/right margins/borders/padding · 19cf3edd
      hyatt authored
      	separately (since the inline could break across multiple lines).
      
              Reviewed by darin
      
              * khtml/rendering/render_block.cpp:
              (RenderBlock::calcInlineMinMaxWidth):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19cf3edd
    • mjs's avatar
      JavaScriptCore: · 595bc5f3
      mjs authored
              Reviewed by Darin.
      
              * JavaScriptCore.pbproj/project.pbxproj: Updated to build the framework
      	standalone instead of embedded when doing a B&I build for Panther.
      
      WebFoundation:
      
              Reviewed by Darin.
      
              * WebFoundation.pbproj/project.pbxproj: Updated to build the framework
      	standalone instead of embedded when doing a B&I build for Panther.
      
      WebCore:
      
              Reviewed by Darin.
      
              * WebCore.pbproj/project.pbxproj: Updated to build the framework
      	standalone instead of embedded when doing a B&I build for Panther.
      
      WebKit:
      
              Reviewed by Darin.
      
              * WebKit.pbproj/project.pbxproj: Updated to build the framework
      	standalone instead of embedded when doing a B&I build for Panther.
      
      WebBrowser:
      
              Reviewed by Darin.
      
              * WebBrowser.pbproj/project.pbxproj: Updated to link against
      	standalone frameworks instead of embeddeding them when doing a B&I
      	build for Panther.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      595bc5f3
    • hyatt's avatar
      Patch #1: Compacts are supposed to use their maximum intrinsic width · f0afc11d
      hyatt authored
      	when determining if they will fit.  I was wrongly using the
      	minwidth (i.e., being too aggressive about trying to squeeze
      	the compact in there).
      
      	Also yanking the setMaxWidth/MinWidth setters, since I'm not
      	using them any more.
      
              Reviewed by kocienda
      
      	Patch #2: Implement an iterator for min/max width calculations
      	of blocks with inline children.  This iterator will include
      	inline flows twice (with a bool flag indicating whether you're at the
      	start or end of the flow).
      
      	Reviewed by darin
      
              * khtml/rendering/render_block.cpp:
              (RenderBlock::layoutBlockChildren):
              * khtml/rendering/render_box.h:
              * khtml/rendering/render_object.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f0afc11d
    • darin's avatar
      Reviewed by Maciej. · e43bb6f2
      darin authored
              - fixed 3142813 -- Safari displays a blank page when trying to open html file encoded in little-endian UTF-16
      
              * kwq/KWQString.h: Remove fromStringWithEncoding and convertToQCString,
              add append that takes a QChar * and length.
              * kwq/KWQString.mm:
              (QString::fromUtf8): Use QTextCodec instead of fromStringWithEncoding.
              (QString::append): Implement by calling insert.
      
              * kwq/KWQTextCodec.h: Added an encoding() member function to QTextCodec
              and made QTextDecoder an abstract base class to pave the way for putting
              more state in it to handle multibyte encodings.
              * kwq/KWQTextCodec.mm: Add KWQTextDecoder, a concrete subclass of QTextDecoder.
              (codecForCFStringEncoding): Moved the static inside this function for clarity.
              (QTextCodec::makeDecoder): Make a KWQTextDecoder.
              (QTextCodec::toUnicode): Make a KWQTextDecoder and use it do the decoding instead
              of calling fromStringWithEncoding.
              (KWQTextDecoder::convertUTF16): Added. Decodes Unicode, using the BOM to decide
              whether it's little-endian or big-endian.
              (KWQTextDecoder::convertUsingTEC): Added. Here's where the code from
              QString::fromStringWithEncoding was moved. This needs to be changed to handle
              state between multiple buffers passed in eventually, but not to fix this bug.
              (KWQTextDecoder::toUnicode): Added. Calls convertUTF16 or convertUsingTEC.
      
              * kwq/WebCoreBridge.mm: (+[WebCoreBridge stringWithData:textEncoding:]):
              Use QTextCodec instead of fromStringWithEncoding.
      
              * khtml/misc/decoder.cpp: (Decoder::decode): Rearranged the #if to make
              things easier to read.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e43bb6f2
    • cblu's avatar
      Fixed: 3163879 - receivedPageIcon:forDataSource: always sends nil image · b858329f
      cblu authored
              Reviewed by rjw.
      
              * WebView.subproj/WebDataSourcePrivate.m:
              (-[WebDataSource _updateIconDatabaseWithURL:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b858329f
    • darin's avatar
      Reviewed by Trey. · 5b8ff36f
      darin authored
              - fixed 3150252 -- files with question marks in their names fail to upload as attachments
      
              * khtml/html/html_formimpl.cpp:
              (HTMLFormElementImpl::formData): Don't include a Content-Type header at all if we don't
              have a MIME type to send. Matches other web browsers' behavior.
              (HTMLInputElementImpl::encoding): Construct the URL using setPath rather than just passing
              a filename to the KURL constructor.
              (HTMLSelectElementImpl::state): Tweak #if formatting a bit.
              (HTMLSelectElementImpl::restoreState): Improve comment a bit.
              * kwq/KWQKURL.mm: Make ? be a "bad character". I checked carefully to be sure this does
              not adversely affect any calls, including running our KURL tests.
              (KURL::setPath): Encode the passed-in path. I determined this was correct both by looking
              at all the call sites in KHTML code to see that they would want this behavior, and by noticing
              that the path() getter decodes the path.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b8ff36f
    • kocienda's avatar
      WebFoundation: · 484ea763
      kocienda authored
              Reviewed by Darin
      
              Fix for this bug:
      
              Radar 3142922 (file URLs should never be sent as referrers)
      
      	Note that this code is added to this framework to close this security
      	hole for WebFoundation-only clients. Safari does not depend on this change
      	to fix the bug.
      
              * ProtocolHandlers.subproj/WebHTTPResourceRequest.m:
              (-[WebResourceRequest setReferrer:]): Return if argument passed in returns
              YES when sent _web_isFileURL message.
      
      WebCore:
      
              Reviewed by Darin
      
              Radar 3142922 (file URLs should never be sent as referrers)
      
              * kwq/WebCoreBridge.mm:
              (-[WebCoreBridge referrer]): Check that the referrer does not start with
      	the prefix "file:". If it does, return nil.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      484ea763
    • darin's avatar
      Reviewed by Ken. · 388fb75e
      darin authored
              - fixed 3135388 -- encoding changes do not affect text in form elements
      
              The problem was that form data was being saved and restored, and in the case of buttons,
              the form data was the incorrectly decoded button label.
      
              * WebView.subproj/WebFramePrivate.m:
              (-[WebFrame _transitionToLayoutAcceptable]): Remove the default: case so we get a warning if
              we omit one of the enum values from this switch statement.
              (-[WebFrame _transitionToCommitted:]): Move the WebFrameLoadTypeReloadAllowingStaleData
              case up so it's right next to the case it should be merged with.
              (-[WebFrame _isLoadComplete]): Remove the default: case so we get a warning if
              we omit one of enum values from this switch statement.
              (-[WebFrame _itemForRestoringDocState]): Replace the if statement with a switch statement.
              Include WebFrameLoadTypeReloadAllowingStaleData, which fixes the bug.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      388fb75e
  5. 03 Feb, 2003 5 commits
    • hyatt's avatar
      Fix for 3163603, livepage.apple.com repaints entire page. · 7bf8dd6d
      hyatt authored
              Reviewed by darin.
      
              * khtml/rendering/render_object.cpp:
              (RenderObject::setStyle):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7bf8dd6d
    • darin's avatar
      Reviewed by Dave. · 59f661f8
      darin authored
      	- fixed 3133902 -- leaked render objects from makeChildrenNonInline (4 after running cvs-base)
      
              * khtml/rendering/render_block.cpp: (RenderBlock::removeChild):
              Deatch the anonymous block after emptying it out.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      59f661f8
    • hyatt's avatar
      Fix for livepage.apple.com crash. The bug # is · 1dea6a5b
      hyatt authored
      	3163508.
      
              Reviewed by darin
      
              * khtml/rendering/render_box.cpp:
              (RenderBox::setPos):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1dea6a5b
    • hyatt's avatar
      Rename TextSlave to TextRun. · 9f5c96b7
      hyatt authored
              Reviewed by darin
      
              * khtml/khtml_part.cpp:
              (firstRunAt):
              (lastRunAt):
              (startAndEndLineNodesIncludingNode):
              * khtml/rendering/bidi.cpp:
              (RenderBlock::layoutInlineChildren):
              * khtml/rendering/render_text.cpp:
              (TextRun::detach):
              (throw):
              (TextRun::operator delete):
              (TextRun::paintSelection):
              (TextRun::paintDecoration):
              (TextRun::paintBoxDecorations):
              (TextRun::checkSelectionPoint):
              (TextRunArray::TextRunArray):
              (TextRunArray::compareItems):
              (TextRunArray::findFirstMatching):
              (RenderText::detach):
              (RenderText::deleteRuns):
              (RenderText::findTextRun):
              (RenderText::nodeAtPoint):
              (RenderText::checkSelectionPoint):
              (RenderText::cursorPos):
              (RenderText::posOfChar):
              (RenderText::paintObject):
              (RenderText::position):
              (RenderText::width):
              * khtml/rendering/render_text.h:
              * kwq/KWQRenderTreeDebug.cpp:
              (writeTextRun):
              (write):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9f5c96b7
    • hyatt's avatar
      Fix for assertion on nasdaq.com. Patch containingBlock · 900ac929
      hyatt authored
      	to return 0 when it can't find a containingBlock at all (e.g.,
      	when the object is orphaned).
      
      	Patch setOverhangingContents to deal with a null containingBlock
      	caused by it being called from RenderImage::setStyle().
      
      	The bug # is 3162989.
      
              Reviewed by NOBODY (OOPS!).
      
              * khtml/rendering/render_object.cpp:
              (RenderObject::containingBlock):
              (RenderObject::setOverhangingContents):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      900ac929