diff options
| author | Leon Clarke <leonclarke@google.com> | 2010-06-03 14:33:32 +0100 |
|---|---|---|
| committer | Leon Clarke <leonclarke@google.com> | 2010-06-08 12:24:51 +0100 |
| commit | 5af96e2c7b73ebc627c6894727826a7576d31758 (patch) | |
| tree | f9d5e6f6175ccd7e3d14de9b290f08937a0d17ba /WebKit/mac/WebView/WebView.mm | |
| parent | 8cc4fcf4f6adcbc0e0aebfc24fbad9a4cddf2cfb (diff) | |
| download | external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.zip external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.gz external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.bz2 | |
Merge webkit.org at r60469 : Initial merge by git.
Change-Id: I66a0047aa2af802f66bb0c7f2a8b02247a596234
Diffstat (limited to 'WebKit/mac/WebView/WebView.mm')
| -rw-r--r-- | WebKit/mac/WebView/WebView.mm | 20 |
1 files changed, 11 insertions, 9 deletions
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(); + } } } } |
