diff options
Diffstat (limited to 'WebKit/mac')
-rw-r--r-- | WebKit/mac/ChangeLog | 97 | ||||
-rw-r--r-- | WebKit/mac/Plugins/Hosted/ProxyInstance.h | 6 | ||||
-rw-r--r-- | WebKit/mac/Plugins/Hosted/ProxyInstance.mm | 12 | ||||
-rw-r--r-- | WebKit/mac/Storage/WebDatabaseManager.mm | 2 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebChromeClient.h | 2 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebChromeClient.mm | 5 | ||||
-rw-r--r-- | WebKit/mac/WebView/WebHTMLRepresentation.mm | 6 | ||||
-rw-r--r-- | WebKit/mac/WebView/WebHTMLView.mm | 16 | ||||
-rw-r--r-- | WebKit/mac/WebView/WebTextCompletionController.mm | 4 | ||||
-rw-r--r-- | WebKit/mac/WebView/WebUIDelegatePrivate.h | 1 | ||||
-rw-r--r-- | WebKit/mac/WebView/WebView.mm | 20 |
11 files changed, 140 insertions, 31 deletions
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog index 510ccfd..7d88fed 100644 --- a/WebKit/mac/ChangeLog +++ b/WebKit/mac/ChangeLog @@ -1,3 +1,100 @@ +2010-05-30 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Make more HTML DOM members private, especially constructors, third and final batch + https://bugs.webkit.org/show_bug.cgi?id=39916 + + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation elementWithName:inForm:]): Use the new HTMLFormElement + function, associatedElements, rather than getting directly at a data member + named formElements. + (-[WebHTMLRepresentation controlsInForm:]): Ditto. + +2010-05-28 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt. + + Simplified the host calling convention. + + PART ONE: Functional code changes. + + [ None in WebKit ] + + PART TWO: Global search and replace. + + In the areas below, I used global search-and-replace to change + (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*) + args.size() => exec->argumentCount() + args.at(i) => exec->argument(i) + + * Plugins/Hosted/ProxyInstance.h: + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::invoke): + (WebKit::ProxyInstance::invokeMethod): + (WebKit::ProxyInstance::invokeDefaultMethod): + +2010-05-27 Beth Dakin <bdakin@apple.com> + + Reviewed by Simon Fraser. + + Change z-component to 1. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView viewDidMoveToWindow]): + (-[WebHTMLView attachRootLayer:]): + +2010-05-26 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Beth Dakin and Darin Adler. + + Fix for <rdar://problem/7464703> HiDPI: [Layers] Compositing layers + do not scale properly when running with a resolution independent + scale + + Apply the userSpaceScaleFactor as a scale on the layerHostingView. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView viewDidMoveToWindow]): + (-[WebHTMLView attachRootLayer:]): + +2010-05-25 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=39621 + <rdar://problem/8009738> Extreme memory growth on DOM Hanoi test + + Removed formStateDidChange support, which is not needed by any client. + + * WebCoreSupport/WebChromeClient.h: + (WebChromeClient::formStateDidChange): + * WebCoreSupport/WebChromeClient.mm: + * WebView/WebUIDelegatePrivate.h: + +2010-05-25 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler. + + Database origins aren't populated at launch (missing db in prefs sheet, possible other symptoms) + <rdar://problem/8013233> and https://bugs.webkit.org/show_bug.cgi?id=39486 + + * Storage/WebDatabaseManager.mm: + (WebKitInitializeDatabasesIfNecessary): Call initializeTracker() instead of trying to set the path on + an already created tracker that already has its origins populated. + +2010-05-24 Darin Adler <darin@apple.com> + + Reviewed by Eric Seidel. + + Move view-related functions from Frame to FrameView + https://bugs.webkit.org/show_bug.cgi?id=39366 + + * WebView/WebView.mm: + (-[WebView _setZoomMultiplier:isTextOnly:]): Call function on FrameView. + (-[WebView setEditable:]): Get rid of call to empty function, + removeEditingStyleFromBodyElement. + 2010-05-21 David Hyatt <hyatt@apple.com> Reviewed by Dan Bernstein. diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.h b/WebKit/mac/Plugins/Hosted/ProxyInstance.h index c8fb118..b72e49a 100644 --- a/WebKit/mac/Plugins/Hosted/ProxyInstance.h +++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.h @@ -64,10 +64,10 @@ private: virtual JSC::Bindings::Class* getClass() const; virtual JSC::JSValue getMethod(JSC::ExecState* exec, const JSC::Identifier& propertyName); - virtual JSC::JSValue invokeMethod(JSC::ExecState*, JSC::RuntimeMethod*, const JSC::ArgList& args); + virtual JSC::JSValue invokeMethod(JSC::ExecState*, JSC::RuntimeMethod*); virtual bool supportsInvokeDefaultMethod() const; - virtual JSC::JSValue invokeDefaultMethod(JSC::ExecState*, const JSC::ArgList&); + virtual JSC::JSValue invokeDefaultMethod(JSC::ExecState*); virtual bool supportsConstruct() const; virtual JSC::JSValue invokeConstruct(JSC::ExecState*, const JSC::ArgList&); @@ -81,7 +81,7 @@ private: JSC::JSValue numberValue(JSC::ExecState*) const; JSC::JSValue booleanValue() const; - JSC::JSValue invoke(JSC::ExecState*, InvokeType, uint64_t identifier, const JSC::ArgList& args); + JSC::JSValue invoke(JSC::ExecState*, InvokeType, uint64_t identifier, const JSC::ArgList&); template <typename T> std::auto_ptr<T> waitForReply(uint32_t requestID) const { diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm index b569a4f..b9a674d 100644 --- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm +++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm @@ -141,7 +141,7 @@ JSC::Bindings::Class* ProxyInstance::getClass() const return proxyClass(); } -JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t identifier, const JSC::ArgList& args) +JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t identifier, const ArgList& args) { if (!m_instanceProxy) return jsUndefined(); @@ -196,7 +196,7 @@ JSValue ProxyInstance::getMethod(JSC::ExecState* exec, const JSC::Identifier& pr return new (exec) ProxyRuntimeMethod(exec, exec->lexicalGlobalObject(), propertyName, methodList); } -JSValue ProxyInstance::invokeMethod(ExecState* exec, JSC::RuntimeMethod* runtimeMethod, const ArgList& args) +JSValue ProxyInstance::invokeMethod(ExecState* exec, JSC::RuntimeMethod* runtimeMethod) { if (!asObject(runtimeMethod)->inherits(&ProxyRuntimeMethod::s_info)) return throwError(exec, TypeError, "Attempt to invoke non-plug-in method on plug-in object."); @@ -207,7 +207,7 @@ JSValue ProxyInstance::invokeMethod(ExecState* exec, JSC::RuntimeMethod* runtime ProxyMethod* method = static_cast<ProxyMethod*>(methodList[0]); - return invoke(exec, Invoke, method->serverIdentifier(), args); + return invoke(exec, Invoke, method->serverIdentifier(), ArgList(exec)); } bool ProxyInstance::supportsInvokeDefaultMethod() const @@ -228,10 +228,10 @@ bool ProxyInstance::supportsInvokeDefaultMethod() const return false; } - -JSValue ProxyInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args) + +JSValue ProxyInstance::invokeDefaultMethod(ExecState* exec) { - return invoke(exec, InvokeDefault, 0, args); + return invoke(exec, InvokeDefault, 0, ArgList(exec)); } bool ProxyInstance::supportsConstruct() const diff --git a/WebKit/mac/Storage/WebDatabaseManager.mm b/WebKit/mac/Storage/WebDatabaseManager.mm index 782f422..8c5e8a2 100644 --- a/WebKit/mac/Storage/WebDatabaseManager.mm +++ b/WebKit/mac/Storage/WebDatabaseManager.mm @@ -138,7 +138,7 @@ void WebKitInitializeDatabasesIfNecessary() return; // Set the database root path in WebCore - DatabaseTracker::tracker().setDatabaseDirectoryPath(databasesDirectoryPath()); + DatabaseTracker::initializeTracker(databasesDirectoryPath()); // Set the DatabaseTrackerClient DatabaseTracker::tracker().setClient(WebDatabaseTrackerClient::sharedWebDatabaseTrackerClient()); diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h index f8f2b73..7deea79 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.h +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h @@ -143,7 +143,7 @@ public: virtual bool shouldReplaceWithGeneratedFileForUpload(const WebCore::String& path, WebCore::String &generatedFilename); virtual WebCore::String generateReplacementFile(const WebCore::String& path); - virtual void formStateDidChange(const WebCore::Node*); + virtual void formStateDidChange(const WebCore::Node*) { } virtual void formDidFocus(const WebCore::Node*); virtual void formDidBlur(const WebCore::Node*); diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm index 4e65751..0a52a9f 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm @@ -695,11 +695,6 @@ String WebChromeClient::generateReplacementFile(const String& path) return [[m_webView _UIDelegateForwarder] webView:m_webView generateReplacementFile:path]; } -void WebChromeClient::formStateDidChange(const WebCore::Node* node) -{ - CallUIDelegate(m_webView, @selector(webView:formStateDidChangeForNode:), kit(const_cast<WebCore::Node*>(node))); -} - void WebChromeClient::formDidFocus(const WebCore::Node* node) { CallUIDelegate(m_webView, @selector(webView:formDidFocusNode:), kit(const_cast<WebCore::Node*>(node))); diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.mm b/WebKit/mac/WebView/WebHTMLRepresentation.mm index 2684004..51fd5ba 100644 --- a/WebKit/mac/WebView/WebHTMLRepresentation.mm +++ b/WebKit/mac/WebView/WebHTMLRepresentation.mm @@ -282,11 +282,11 @@ static HTMLFormElement* formElementFromDOMElement(DOMElement *element) HTMLFormElement* formElement = formElementFromDOMElement(form); if (!formElement) return nil; - Vector<HTMLFormControlElement*>& elements = formElement->formElements; + const Vector<HTMLFormControlElement*>& elements = formElement->associatedElements(); AtomicString targetName = name; for (unsigned i = 0; i < elements.size(); i++) { HTMLFormControlElement* elt = elements[i]; - if (elt->formControlName() == targetName) + if (elt->name() == targetName) return kit(elt); } return nil; @@ -331,7 +331,7 @@ static HTMLInputElement* inputElementFromDOMElement(DOMElement* element) if (!formElement) return nil; NSMutableArray *results = nil; - Vector<HTMLFormControlElement*>& elements = formElement->formElements; + const Vector<HTMLFormControlElement*>& elements = formElement->associatedElements(); for (unsigned i = 0; i < elements.size(); i++) { if (elements[i]->isEnumeratable()) { // Skip option elements, other duds DOMElement* de = kit(elements[i]); diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm index 5f9134f..a60ae12 100644 --- a/WebKit/mac/WebView/WebHTMLView.mm +++ b/WebKit/mac/WebView/WebHTMLView.mm @@ -3056,6 +3056,15 @@ WEBCORE_COMMAND(yankAndSelect) [[self _pluginController] startAllPlugins]; _private->lastScrollPosition = NSZeroPoint; + +#if USE(ACCELERATED_COMPOSITING) && !defined(BUILDING_ON_LEOPARD) + // We may have created the layer hosting view while outside the window. Update the scale factor + // now that we have a window to get it from. + if (_private->layerHostingView) { + CGFloat scaleFactor = [[self window] userSpaceScaleFactor]; + [[_private->layerHostingView layer] setTransform:CATransform3DMakeScale(scaleFactor, scaleFactor, 1)]; + } +#endif } } @@ -5561,6 +5570,13 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point) [viewLayer setStyle:[NSDictionary dictionaryWithObject:actions forKey:@"actions"]]; #endif +#if !defined(BUILDING_ON_LEOPARD) + // If we aren't in the window yet, we'll use the screen's scale factor now, and reset the scale + // via -viewDidMoveToWindow. + CGFloat scaleFactor = [self window] ? [[self window] userSpaceScaleFactor] : [[NSScreen mainScreen] userSpaceScaleFactor]; + [viewLayer setTransform:CATransform3DMakeScale(scaleFactor, scaleFactor, 1)]; +#endif + [_private->layerHostingView setLayer:viewLayer]; [_private->layerHostingView setWantsLayer:YES]; diff --git a/WebKit/mac/WebView/WebTextCompletionController.mm b/WebKit/mac/WebView/WebTextCompletionController.mm index 2421fd7..ab0e621 100644 --- a/WebKit/mac/WebView/WebTextCompletionController.mm +++ b/WebKit/mac/WebView/WebTextCompletionController.mm @@ -172,8 +172,8 @@ using namespace std; // Get preceeding word stem WebFrame *frame = [_htmlView _frame]; DOMRange *selection = kit(core(frame)->selection()->toNormalizedRange().get()); - DOMRange *wholeWord = [frame _rangeByAlteringCurrentSelection:SelectionController::EXTEND - direction:SelectionController::BACKWARD granularity:WordGranularity]; + DOMRange *wholeWord = [frame _rangeByAlteringCurrentSelection:SelectionController::AlterationExtend + direction:SelectionController::DirectionBackward granularity:WordGranularity]; DOMRange *prefix = [wholeWord cloneRange]; [prefix setEnd:[selection startContainer] offset:[selection startOffset]]; diff --git a/WebKit/mac/WebView/WebUIDelegatePrivate.h b/WebKit/mac/WebView/WebUIDelegatePrivate.h index a130b18..327a745 100644 --- a/WebKit/mac/WebView/WebUIDelegatePrivate.h +++ b/WebKit/mac/WebView/WebUIDelegatePrivate.h @@ -141,7 +141,6 @@ enum { frame:(WebFrame *)frame listener:(id<WebGeolocationPolicyListener>)listener; -- (void)webView:(WebView *)sender formStateDidChangeForNode:(DOMNode *)node; - (void)webView:(WebView *)sender formDidFocusNode:(DOMNode *)node; - (void)webView:(WebView *)sender formDidBlurNode:(DOMNode *)node; diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm index 0df62ea..97c799b 100644 --- a/WebKit/mac/WebView/WebView.mm +++ b/WebKit/mac/WebView/WebView.mm @@ -3183,19 +3183,22 @@ static bool needsWebViewInitThreadWorkaround() return [self _realZoomMultiplierIsTextOnly] ? _private->zoomMultiplier : 1.0f; } -- (void)_setZoomMultiplier:(float)m isTextOnly:(BOOL)isTextOnly +- (void)_setZoomMultiplier:(float)multiplier isTextOnly:(BOOL)isTextOnly { // NOTE: This has no visible effect when viewing a PDF (see <rdar://problem/4737380>) - _private->zoomMultiplier = m; + _private->zoomMultiplier = multiplier; + ASSERT(_private->page); if (_private->page) _private->page->settings()->setZoomMode(isTextOnly ? ZoomTextOnly : ZoomPage); - - // FIXME: it would be nice to rework this code so that _private->zoomMultiplier doesn't exist and callers - // all access _private->page->settings(). + + // FIXME: It would be nice to rework this code so that _private->zoomMultiplier doesn't exist + // and instead FrameView::zoomFactor is used. Frame* coreFrame = [self _mainCoreFrame]; - if (coreFrame) - coreFrame->setZoomFactor(m, isTextOnly ? ZoomTextOnly : ZoomPage); + if (coreFrame) { + if (FrameView* view = coreFrame->view()) + view->setZoomFactor(multiplier, isTextOnly ? ZoomTextOnly : ZoomPage); + } } - (float)_zoomMultiplier:(BOOL)isTextOnly @@ -4664,8 +4667,7 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu // If the WebView is made editable and the selection is empty, set it to something. if (![self selectedDOMRange]) mainFrame->setSelectionFromNone(); - } else - mainFrame->removeEditingStyleFromBodyElement(); + } } } } |