2011-12-12 Lucas Forschler After installing Duches 53.8, Mail Hangs on Reply all Fixing a mis-merge of r99617 where an observer was incorrectly added. * WebView/WebView.mm: (-[WebView addWindowObserversForWindow:]): 2011-12-12 Lucas Forschler Merge 97407 2011-10-13 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=70050 DRT and WRT should have HiDPI testing capabilities Reviewed by Darin Adler. New method _backingScaleFactor matches SPI of a similar name that I added recently to WKPage in WebKit2. Equivalent functionality is needed for DumpRenderTree's HiDPI support. * WebView/WebView.mm: (-[WebView _backingScaleFactor]): * WebView/WebViewPrivate.h: 2011-12-07 Lucas Forschler Merge 99617 2011-11-08 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=71856 WebKit should use new NSWindowDidChangeBackingPropertiesNotification instead of old NSWindowDidChangeResolutionNotification -and corresponding- Reviewed by Tim Hatcher. * WebView/WebView.mm: (-[WebView addWindowObserversForWindow:]): (-[WebView removeWindowObservers]): We have to check that the backing scale factor actually changed since this notification can also be used to signify other changes. (-[WebView _windowDidChangeBackingProperties:]): 2011-12-06 Lucas Forschler Merge 97886 2011-10-19 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=70396 Focus rings are too thin in HiDPI in WebKit2 -and corresponding- Reviewed by Dan Bernstein. Rename wkSetPatternBaseCTM to wkSetBaseCTM * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): To create a HiDPI context in DRT, we have to set the base CTM, which currently requires CG SPI, so we have to do it through WebKitSystemInterface. * WebView/WebView.mm: (-[WebView _setBaseCTM:forContext:]): * WebView/WebViewPrivate.h: 2011-12-02 Lucas Forschler Merge 93377 2011-08-18 Beth Dakin Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=66495 Lion-specific scroller SPIs can use forward declaration instead of WebKitSystemInterface * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-11-16 Lucas Forschler Merge 94247 2011-08-31 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67322 Re-name overrideBackingScaleFactor Reviewed by John Sullivan. _setOverrideBackingScaleFactor is now _setCustomBackingScaleFactor * WebView/WebView.mm: (-[WebView _setCustomBackingScaleFactor:]): (-[WebView _deviceScaleFactor]): * WebView/WebViewData.h: * WebView/WebViewPrivate.h: 2011-11-16 Lucas Forschler Merge 94122 2011-08-30 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67150 Would like API to use a custom device scale factor for a particular WebView/WKView -and corresponding- Reviewed by Darin Adler. New API is _setOverrideBackingScaleFactor:(CGFloat) * WebView/WebView.mm: (-[WebView _setOverrideBackingScaleFactor:]): (-[WebView _deviceScaleFactor]): * WebView/WebViewData.h: * WebView/WebViewPrivate.h: 2011-11-16 Lucas Forschler Merge 99315 2011-08-18 Adam Roben Update the device scale factor when the WebView's window changes Fixes WebKit doesn't react when a WebView is moved between windows with different backing scale factors Reviewed by Anders Carlsson. * WebView/WebView.mm: (-[WebView viewDidMoveToWindow]): Call setDeviceScaleFactor because our new window (or no window at all) might have a different backing scale factor than the previous one. (-[WebView _deviceScaleFactor]): Moved to the WebFileInternal category. 2011-11-16 Lucas Forschler Merge 93303 2011-08-17 Adam Roben Make WebCore keep track of the current device scale factor Fixes WebCore requires every WebKit port to keep track of the device scale factor Reviewed by Darin Adler. * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: Moved code to calculate the device scale factor from here... * WebView/WebView.mm: (-[WebView _deviceScaleFactor]): ...to here. (-[WebView _windowDidChangeResolution:]): Now calls Page::setDeviceScaleFactor. 2011-11-15 Lucas Forschler Merge 93058 2011-08-15 Adam Roben Update pages' style and content scale when the window's backing scale factor changes Unfortunately, I couldn't think of a way to test this in an automated fashion. Fixes WebKit doesn't react to device scale factor changes Reviewed by Simon Fraser. * WebView/WebView.mm: (-[WebView addWindowObserversForWindow:]): (-[WebView removeWindowObservers]): Listen for the notification that tells us the window's backing scale has changed. (-[WebView _windowDidChangeResolution:]): Tell the page about the change to the device scale factor so that, e.g., scale-factor-dependent media queries will be reevaluated. 2011-11-15 Lucas Forschler Merge 93040 2011-08-10 Adam Roben Clear up scale factor terminology WebKit by and large deals with two scale factors: one intrinsic to the device on which the software is running, and one that is per-Page and can be controlled via API calls. This patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the code use those names. It should introduce no behavior changes. Fixes WebKit uses multiple conflicting names to refer to the device scale factor Reviewed by Simon Fraser. * Misc/WebNSControlExtras.m: (-[NSControl sizeToFitAndAdjustWindowHeight]): Updated this function to use more modern AppKit scale factor terminology. (This is unrelated to the rest of the patch.) * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: 2011-10-27 Lucas Forschler Merge 95534 2011-09-19 Timothy Hatcher Make WebViews in NSPopovers render as they would in active windows. The NSWindowDid{Become,Resign}KeyNotifications are not fired when NSPopovers are shown or hidden since they share key with the parent window. So WebView and WebHTMLView need to also observe the will order on/off screen notifications. https://webkit.org/b/68402 rdar://problem/9754099 Reviewed by John Sullivan. * WebView/WebHTMLView.mm: (-[WebHTMLView _removeWindowObservers]): Remove order on/off screen notification obversers. (-[WebHTMLView addWindowObservers]): Add order on/off screen notification obversers. (-[WebHTMLView windowWillOrderOnScreen:]): Check if the window is already a key window, which can be the case for NSPopovers. (-[WebHTMLView windowWillOrderOffScreen:]): Remove the mouse moved observer. * WebView/WebView.mm: (-[WebView addWindowObserversForWindow:]): Add order off screen notification obverser. (-[WebView removeWindowObservers]): Remove order off screen notification obverser. (-[WebView _windowWillOrderOnScreen:]): Call _updateActiveState. (-[WebView _windowWillOrderOffScreen:]): Ditto. 2011-10-21 Lucas Forschler Merge 98027 2011-10-20 Alexey Proskuryakov REGRESSION (r96823): Contextual menu closes immediately when control-clicking in Flash plug-in https://bugs.webkit.org/show_bug.cgi?id=70534 Reviewed by Darin Adler. * WebCoreSupport/WebFrameLoaderClient.mm: (NetscapePluginWidget::handleEvent): Return true for contextmenu event, so that plug-ins won't get a default WebKit context menu. We can't know if the plug-in is handling mousedown (or even mouseup) by displaying a menu. 2011-08-11 Lucas Forschler Merged 91097 2011-07-15 Dan Bernstein REGRESSION: Mouse cursor doesn’t hide when full screen video HUD hides https://bugs.webkit.org/show_bug.cgi?id=64615 Reviewed by Anders Carlsson. * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::setCursorHiddenUntilMouseMoves): Added. Calls +[NSCursor setHiddenUntilMouseMoves:]. 2011-08-09 Gavin Barraclough Reviewed by nobody. Merged JavaScriptCore & JavaScriptGlue from 86722 to 92405. EXCEPT, Did not merge patches: 86837, 89283, 90643, 92068, 92254. ALSO, Did merge full patch (including non-JSC/JSG changes) for: 87346, 88587, 89069, 90383, 91095, 91194, 91195, 91790, 91903, 92224. 2011-07-29 Lucas Forschler Merged 90855. 2011-07-12 Adam Roben Delete some redundant code in WebHTMLView This code had no user-visible effect, as we were just duplicating work that AppKit would do for us at a slightly different time. Fixes WebHTMLView sets its root layer's transform unnecessarily Reviewed by Simon Fraser. * WebView/WebHTMLView.mm: (-[WebHTMLView viewDidMoveToWindow]): (-[WebHTMLView attachRootLayer:]): Don't bother setting the root layer's transform to account for the scale factor. AppKit takes care of this for us nowadays. 2011-07-21 Lucas Forschler Merged 91146. 2011-07-15 Tim Horton Overlay scrollbars in overflow areas no longer pulse when revealed https://bugs.webkit.org/show_bug.cgi?id=64606 Reviewed by Simon Fraser. Ensure that the state of the scrollbar implementation is kept in sync with WebCore's internal representation. Previously, we synchronized them at paint time, causing pulsing to be skipped due to the scrollbars being disabled. * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-07-21 Lucas Forschler Merged 90087. 2011-06-29 Darin Adler Reviewed by Dan Bernstein. [Mac] Use system cursors instead of custom bitmaps where possible https://bugs.webkit.org/show_bug.cgi?id=63679 * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): Added WKCursor. 2011-06-14 Lucas Forschler Merged 88833. 2011-06-14 Stephanie Lewis Rubber stamped by Oliver Hunt. Update order files. * WebKit.order: 2011-06-07 Lucas Forschler Merged 88260. 2011-06-06 Michael Saboff Reviewed by Geoffrey Garen. Fonts returned by FontCache::getFontDataForCharacters() are never released https://bugs.webkit.org/show_bug.cgi?id=61875 This change allows fonts allocated as system fallback fonts to be released. Previously, the reference counts for these fonts grew without bound. This is implemented as an auto release class that wraps accesses to the cache for system fallback fonts. All such accesses are via the method FontCache::getFontDataForCharacters. The new class is called FontCachePurgePreventer. When such an object exists, it protects these fonts from deletion. See more comments for this defect in Source/WebCore/ChangeLog. * Misc/WebKitNSStringExtras.mm: (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]): (-[NSString _web_widthWithFont:]): Wrapped code accessing fallback fonts with local FontCachePurgePreventer in these methods. * Misc/WebStringTruncator.mm: (+[WebStringTruncator centerTruncateString:toWidth:]): (+[WebStringTruncator centerTruncateString:toWidth:withFont:]): (+[WebStringTruncator rightTruncateString:toWidth:withFont:]): (+[WebStringTruncator widthOfString:font:]): Wrapped code accessing fallback fonts with local FontCachePurgePreventer in these methods. 2011-06-07 Lucas Forschler Merged 87962. 2011-06-02 Anders Carlsson Reviewed by Sam Weinig. Need a way to install the memory pressure handler without initializing WebKit1 https://bugs.webkit.org/show_bug.cgi?id=61975 Add a WebInstallMemoryPressureHandler function which will install the memory pressure handler. -[WebView WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:] will do this, but we'd like to be able to install a memory pressure handler without creating a WebView or even calling any WebView method since that will call +[WebView initialize]. * WebKit.exp: * WebView/WebView.mm: (WebInstallMemoryPressureHandler): * WebView/WebViewPrivate.h: 2011-05-27 Mark Rowe Merge r87520. 2011-05-27 Stephanie Lewis Unreviewed. Fix a typo in the order_file flag. * Configurations/Base.xcconfig: 2011-05-27 Stephanie Lewis Rubber Stamped by Adam Roben. Update Order Files. Use -order_file flag since it can order more of the binary. * Configurations/Base.xcconfig: * WebKit.order: 2011-05-27 Mark Rowe Merge r87228. 2011-05-24 Michael Saboff Reviewed by Geoffrey Garen. Improve handling in WebCore of low memory situations https://bugs.webkit.org/show_bug.cgi?id=61222 Added call to enable memory pressure handling. * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): * WebView/WebViewInternal.h: 2011-05-27 Mark Rowe Merge r87329. 2011-05-25 Stephanie Lewis Reviewed by Brady Eidson. https://bugs.webkit.org/show_bug.cgi?id=61407 part of Remove Quicklook pref. Moving it enirely down into WebCore so it can be calculated only on reloads. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): 2011-05-27 Mark Rowe Merge r87328. 2011-05-24 Jer Noble Reviewed by Darin Adler. Video fails to play on Vimeo https://bugs.webkit.org/show_bug.cgi?id=61403 * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): Added support for wkAVAssetResolvedURL and wkQTMovieResolvedURL. 2011-05-24 Steve Falkenburg Reviewed by Adam Roben. Disable features on safari-534-branch. * Configurations/FeatureDefines.xcconfig: 2011-05-24 Lucas Forschler Merged r86995. 2011-05-20 Andy Estes Reviewed by Darin Adler. WebView loses firstResponder status when entering full-screen mode. https://bugs.webkit.org/show_bug.cgi?id=61153 * Misc/WebNSWindowExtras.h: * Misc/WebNSWindowExtras.m: (-[NSWindow makeResponder:firstResponderIfDescendantOfView:]): Add a convenience method to NSWindow that makes the given NSResponder first responder only if it is a descendant of the given view. * WebView/WebFullScreenController.mm: (-[WebFullScreenController windowDidEnterFullscreen:]): If the WebView was a descendant of the browser window's first responder when entering full-screen mode, set the full-screen window's first responder to that same NSResponder. (-[WebFullScreenController exitFullscreen]): Do the reverse of what is done in windowDidEnterFullscreen:. 2011-05-17 Timothy Hatcher Update the the context menu to reflect the system search provider on Mac. Reviewed by Sam Weinig. * DefaultDelegates/WebDefaultContextMenuDelegate.mm: (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]): Use wkCopyDefaultSearchProviderDisplayName to create the web search context menu title. * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): Added CopyDefaultSearchProviderDisplayName. 2011-05-16 Emil A Eklund Reviewed by Eric Seidel. Replace docTop/Right/Bottom/Left/Width/Height with documentRect https://bugs.webkit.org/show_bug.cgi?id=60743 Replace uses of docWidth/Height with documentRect. * WebView/WebFrame.mm: (-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]): 2011-05-16 Yuzo Fujishima Reviewed by Antti Koivisto. Fix for Bug 43704 - Web font is printed as blank if it is not cached https://bugs.webkit.org/show_bug.cgi?id=43704 * WebView/WebHTMLView.mm: (-[WebHTMLView _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:paginateScreenContent:]): Use ResourceCacheValidationSuppressor to allow stale resources in printing. 2011-05-16 David Kilzer C++ exceptions should not be enabled when building with llvm-gcc-4.2 Reviewed by Mark Rowe. * Configurations/Base.xcconfig: Fixed typo. 2011-05-13 Jon Lee Reviewed by Simon Fraser. Can't horizontally scroll iframes and overflow because wheel events are always accepted https://bugs.webkit.org/show_bug.cgi?id=60779 * WebCoreSupport/WebChromeClient.h: (WebChromeClient::numWheelEventHandlersChanged): Default impl of new ChromeClient method (WebChromeClient::shouldRubberBandInDirection): Default impl of new ChromeClient method 2011-05-13 Sam Weinig Reviewed by Anders Carlsson. Prune #includes from FrameView.h (Part 2) https://bugs.webkit.org/show_bug.cgi?id=60748 - Update files that were depending on FrameView.h #including Frame.h or Page.h. * WebView/WebClipView.mm: * WebView/WebHTMLView.mm: (-[WebHTMLView layoutToMinimumPageWidth:height:maximumPageWidth:adjustingViewSize:]): 2011-05-12 Pratik Solanki Reviewed by Antti Koivisto. Part of WebCore should use CFNetwork-based loader on Mac https://bugs.webkit.org/show_bug.cgi?id=51836 Use CFRunLoop when using CFNetwork. * WebView/WebView.mm: (-[WebView scheduleInRunLoop:forMode:]): (-[WebView unscheduleFromRunLoop:forMode:]): 2011-05-12 Pratik Solanki Reviewed by Antti Koivisto. Part of WebCore should use CFNetwork-based loader on Mac https://bugs.webkit.org/show_bug.cgi?id=51836 Include AuthenticationCF.h header file. * Misc/WebDownload.mm: * Plugins/WebBaseNetscapePluginView.mm: * WebCoreSupport/WebFrameLoaderClient.mm: 2011-05-12 Adele Peterson Reviewed by Darin Adler and Adam Barth. Fix for Solar Walk For Mac: Info window is blank (HTML5 parser) https://bugs.webkit.org/show_bug.cgi?id=60685 Solar Walk uses a self closing title tag, so to match the behavior of the old parser, we use a UserScript to write the contents of the title element to the end of the document so it can be re-parsed. * Misc/SolarWalkQuirksUserScript.js: Added. * WebView/WebView.mm: (needsSolarWalkQuirksScript): (leakSolarWalkQuirksUserScriptContents): (-[WebView _injectSolarWalkQuirksScript]): (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): 2011-05-12 Jia Pu Reviewed by Darin Adler. Regression caused by changeset 86281 https://bugs.webkit.org/show_bug.cgi?id=60712 Removed the condition variable. [NSSpellChecker dismissCorrectionIndicatorForView:] is blocking. So handleAcceptedReplacement() triggered by dismissInternal() will return before dismissInternal() returns. So we don't need to use the condition to coordinate between these two function. In fact, all callbacks are delivered on main thread. We don't really need any locking here. Since now we don't have distinction between dismiss() and dismissSoon(). dismissSoon() has been removed. * WebCoreSupport/CorrectionPanel.h: * WebCoreSupport/CorrectionPanel.mm: (CorrectionPanel::CorrectionPanel): (CorrectionPanel::show): (CorrectionPanel::dismiss): (CorrectionPanel::dismissInternal): (CorrectionPanel::handleAcceptedReplacement): * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::dismissCorrectionPanelSoon): 2011-05-12 Patrick Gansterer Reviewed by Adam Barth. Enable OwnPtr strict mode in PluginHalter https://bugs.webkit.org/show_bug.cgi?id=60681 * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): 2011-05-12 Nikolas Zimmermann Reviewed by Darin Adler. String operator+ reallocates unnecessarily when concatting > 2 strings https://bugs.webkit.org/show_bug.cgi?id=58420 Provide a faster String append operator. See Source/JavaScriptCore/ChangeLog for details. * WebView/WebFrame.mm: Explicitely cast to Strings first, so operator NSString*() can be invoked. (-[WebFrame _stringWithDocumentTypeStringAndMarkupString:]): 2011-05-10 Tony Gentilcore Reviewed by Darin Adler. Perform some forward declarations suggested by include-what-you-use https://bugs.webkit.org/show_bug.cgi?id=60545 * Plugins/Hosted/WebHostedNetscapePluginView.mm: * WebView/WebFrame.mm: 2011-05-11 Jia Pu Reviewed by Darin Adler. CorrectionPanel sometimes hangs in dismissSoon(). https://bugs.webkit.org/show_bug.cgi?id=60599 Make sure dismissSoon() won't wait indefinitely if handleAcceptedReplacement() sets m_resultForSynchronousDismissal to nil. Added a designated variable m_isDismissing, instead of piggy-backing m_resultForSynchronousDismissal, for condition checking. * WebCoreSupport/CorrectionPanel.h: * WebCoreSupport/CorrectionPanel.mm: (CorrectionPanel::CorrectionPanel): (CorrectionPanel::show): (CorrectionPanel::dismissSoon): (CorrectionPanel::dismissInternal): (CorrectionPanel::handleAcceptedReplacement): 2011-05-10 Anton D'Auria Reviewed by David Levin. Add ApplicationCache API to get disk usage per origin https://bugs.webkit.org/show_bug.cgi?id=57127 Added Mac port API. * WebCoreSupport/WebApplicationCache.h: * WebCoreSupport/WebApplicationCache.mm: (+[WebApplicationCache diskUsageForOrigin:]): 2011-05-10 Anton D'Auria Reviewed by Alexey Proskuryakov. Add ApplicationCache API to get disk usage per origin https://bugs.webkit.org/show_bug.cgi?id=57127 Added Mac port API. * WebCoreSupport/WebApplicationCache.h: * WebCoreSupport/WebApplicationCache.mm: (+[WebApplicationCache diskUsageForOrigin:]): 2011-05-10 Beth Dakin Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=60582 Crash switching overlay/non-overlay scrollbar preference still possible -and corresponding- * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-05-09 Jeremy Noble Reviewed by Darin Adler. Command-~/Exposé to another window while