[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:29:22 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b4245db00a831b23a41d5cb5c0c9a82ccededfd4
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 6 04:21:56 2002 +0000
WebCore:
- fixed 3016374 -- Change font default from small back to medium
* khtml/css/cssstyleselector.cpp:
(CSSStyleSelector::computeFontSizes): Change back to basing everything on
mediumFontSize() as opposed to a defaultFontSize that was the same as "small".
(CSSStyleSelector::applyRule): Default is m_fontSizes[3] again.
* khtml/html/html_inlineimpl.cpp: (HTMLFontElementImpl::parseAttribute):
Shift all the sizes up one, so 3 is now medium. It's important that 3 be the same as the default.
* khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::attach): Change the default back to medium.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyle): Change the default back to [3].
* kwq/KWQKHTMLSettings.mm: (KHTMLSettings::mediumFontSize): Change name back.
* kwq/khtml/khtml_settings.h: Change name back to medium.
Do a little bit of wiring for the "text size multiplier" feature.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm: (-[WebCoreBridge setTextSizeMultiplier:]): Added.
WebKit:
Do the wiring for the "text size multiplier" feature. The rest of the work will probably be done
at the WebCore level.
* WebCoreSupport.subproj/WebBridge.m: (-[WebBridge setFrame:]): Set the text size multiplier.
* WebView.subproj/WebController.h:
* WebView.subproj/WebController.m:
(-[WebController setTextSizeMultiplier:]): Added. Calls _textSizeMultiplierChanged on the main frame.
(-[WebController textSizeMultiplier]): Added.
* WebView.subproj/WebControllerPrivate.h: Added textSizeMultiplier instance variable.
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _textSizeMultiplierChanged]): Added. Calls setTextSizeMultiplier: on the bridge,
and _textSizeMultiplierChanged on all the child frames.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 4f27e8a..eeb9928 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,25 @@
2002-08-05 Darin Adler <darin at apple.com>
+ - fixed 3016374 -- Change font default from small back to medium
+
+ * khtml/css/cssstyleselector.cpp:
+ (CSSStyleSelector::computeFontSizes): Change back to basing everything on
+ mediumFontSize() as opposed to a defaultFontSize that was the same as "small".
+ (CSSStyleSelector::applyRule): Default is m_fontSizes[3] again.
+ * khtml/html/html_inlineimpl.cpp: (HTMLFontElementImpl::parseAttribute):
+ Shift all the sizes up one, so 3 is now medium. It's important that 3 be the same as the default.
+ * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::attach): Change the default back to medium.
+ * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyle): Change the default back to [3].
+ * kwq/KWQKHTMLSettings.mm: (KHTMLSettings::mediumFontSize): Change name back.
+ * kwq/khtml/khtml_settings.h: Change name back to medium.
+
+ Do a little bit of wiring for the "text size multiplier" feature.
+
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm: (-[WebCoreBridge setTextSizeMultiplier:]): Added.
+
+2002-08-05 Darin Adler <darin at apple.com>
+
- fixed 3009321 -- bookmark and history menus show black square for (tm)
* khtml/html/htmltokenizer.cpp:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 4f27e8a..eeb9928 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,25 @@
2002-08-05 Darin Adler <darin at apple.com>
+ - fixed 3016374 -- Change font default from small back to medium
+
+ * khtml/css/cssstyleselector.cpp:
+ (CSSStyleSelector::computeFontSizes): Change back to basing everything on
+ mediumFontSize() as opposed to a defaultFontSize that was the same as "small".
+ (CSSStyleSelector::applyRule): Default is m_fontSizes[3] again.
+ * khtml/html/html_inlineimpl.cpp: (HTMLFontElementImpl::parseAttribute):
+ Shift all the sizes up one, so 3 is now medium. It's important that 3 be the same as the default.
+ * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::attach): Change the default back to medium.
+ * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyle): Change the default back to [3].
+ * kwq/KWQKHTMLSettings.mm: (KHTMLSettings::mediumFontSize): Change name back.
+ * kwq/khtml/khtml_settings.h: Change name back to medium.
+
+ Do a little bit of wiring for the "text size multiplier" feature.
+
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm: (-[WebCoreBridge setTextSizeMultiplier:]): Added.
+
+2002-08-05 Darin Adler <darin at apple.com>
+
- fixed 3009321 -- bookmark and history menus show black square for (tm)
* khtml/html/htmltokenizer.cpp:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 4f27e8a..eeb9928 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,25 @@
2002-08-05 Darin Adler <darin at apple.com>
+ - fixed 3016374 -- Change font default from small back to medium
+
+ * khtml/css/cssstyleselector.cpp:
+ (CSSStyleSelector::computeFontSizes): Change back to basing everything on
+ mediumFontSize() as opposed to a defaultFontSize that was the same as "small".
+ (CSSStyleSelector::applyRule): Default is m_fontSizes[3] again.
+ * khtml/html/html_inlineimpl.cpp: (HTMLFontElementImpl::parseAttribute):
+ Shift all the sizes up one, so 3 is now medium. It's important that 3 be the same as the default.
+ * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::attach): Change the default back to medium.
+ * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyle): Change the default back to [3].
+ * kwq/KWQKHTMLSettings.mm: (KHTMLSettings::mediumFontSize): Change name back.
+ * kwq/khtml/khtml_settings.h: Change name back to medium.
+
+ Do a little bit of wiring for the "text size multiplier" feature.
+
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm: (-[WebCoreBridge setTextSizeMultiplier:]): Added.
+
+2002-08-05 Darin Adler <darin at apple.com>
+
- fixed 3009321 -- bookmark and history menus show black square for (tm)
* khtml/html/htmltokenizer.cpp:
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index acb440e..448dec3 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -231,7 +231,10 @@ void CSSStyleSelector::clear()
void CSSStyleSelector::computeFontSizes(QPaintDeviceMetrics* paintDeviceMetrics, int zoomFactor)
{
-#ifndef APPLE_CHANGES
+#ifdef APPLE_CHANGES
+ // We don't want to scale the settings by the dpi.
+ const float toPix = 1;
+#else
// ### get rid of float / double
float toPix = paintDeviceMetrics->logicalDpiY()/72.;
if (toPix < 96./72.) toPix = 96./72.;
@@ -239,27 +242,22 @@ void CSSStyleSelector::computeFontSizes(QPaintDeviceMetrics* paintDeviceMetrics,
m_fontSizes.clear();
const float factor = 1.2;
- float scale = 1.0 / (factor*factor);
- float defaultFontSize;
+ float scale = 1.0 / (factor*factor*factor);
+ float mediumFontSize;
float minFontSize;
if (!khtml::printpainter) {
scale *= zoomFactor / 100.0;
-#ifdef APPLE_CHANGES
- defaultFontSize = settings->defaultFontSize();
- minFontSize = settings->minFontSize();
-#else
- defaultFontSize = settings->defaultFontSize() * toPix;
+ mediumFontSize = settings->mediumFontSize() * toPix;
minFontSize = settings->minFontSize() * toPix;
-#endif
}
else {
// ## depending on something / configurable ?
- defaultFontSize = 12;
+ mediumFontSize = 12;
minFontSize = 6;
}
for ( int i = 0; i < MAXFONTSIZES; i++ ) {
- m_fontSizes << int(KMAX( defaultFontSize * scale + 0.5f, minFontSize));
+ m_fontSizes << int(KMAX( mediumFontSize * scale + 0.5f, minFontSize));
scale *= factor;
}
}
@@ -2241,7 +2239,7 @@ void CSSStyleSelector::applyRule( DOM::CSSProperty *prop )
if(parentNode) {
oldSize = parentStyle->font().pixelSize();
} else
- oldSize = m_fontSizes[2]; // default size is same as CSS_VAL_SMALL
+ oldSize = m_fontSizes[3];
if(value->cssValueType() == CSSValue::CSS_INHERIT) {
size = oldSize;
diff --git a/WebCore/khtml/html/html_inlineimpl.cpp b/WebCore/khtml/html/html_inlineimpl.cpp
index 9b13282..fd7f984 100644
--- a/WebCore/khtml/html/html_inlineimpl.cpp
+++ b/WebCore/khtml/html/html_inlineimpl.cpp
@@ -292,17 +292,17 @@ void HTMLFontElementImpl::parseAttribute(AttributeImpl *attr)
int size;
switch (num)
{
- case 2: size = CSS_VAL_X_SMALL; break;
+ case 2: size = CSS_VAL_SMALL; break;
case 0: // treat 0 the same as 3, because people expect it to be between -1 and +1
- case 3: size = CSS_VAL_SMALL; break;
- case 4: size = CSS_VAL_MEDIUM; break;
- case 5: size = CSS_VAL_LARGE; break;
- case 6: size = CSS_VAL_X_LARGE; break;
+ case 3: size = CSS_VAL_MEDIUM; break;
+ case 4: size = CSS_VAL_LARGE; break;
+ case 5: size = CSS_VAL_X_LARGE; break;
+ case 6: size = CSS_VAL_XX_LARGE; break;
default:
if (num > 6)
- size = CSS_VAL_XX_LARGE;
+ size = CSS_VAL__KONQ_XXX_LARGE;
else
- size = CSS_VAL_XX_SMALL;
+ size = CSS_VAL_X_SMALL;
}
addCSSProperty(CSS_PROP_FONT_SIZE, size);
}
diff --git a/WebCore/khtml/html/html_tableimpl.cpp b/WebCore/khtml/html/html_tableimpl.cpp
index a2ea685..af38237 100644
--- a/WebCore/khtml/html/html_tableimpl.cpp
+++ b/WebCore/khtml/html/html_tableimpl.cpp
@@ -78,7 +78,7 @@ void HTMLTableElementImpl::attach()
// this is 90% compatible to ie and mozilla, and the by way easiest solution...
// only difference to 100% correct is that in strict mode <font> elements are propagated into tables.
if ( getDocument()->parseMode() != DocumentImpl::Strict ) {
- addCSSProperty( CSS_PROP_FONT_SIZE, CSS_VAL_SMALL ); // browser defaults use small, not medium
+ addCSSProperty( CSS_PROP_FONT_SIZE, CSS_VAL_MEDIUM );
addCSSProperty( CSS_PROP_COLOR, getDocument()->textColor() );
addCSSProperty( CSS_PROP_FONT_FAMILY, "konq_default" );
}
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index c1f1f5f..2454d56 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -888,7 +888,7 @@ void DocumentImpl::recalcStyle( StyleChange change )
if ( !stdfont.isEmpty() )
fontDef.family = stdfont;
- fontDef.size = m_styleSelector->fontSizes()[2]; // default to small [2], not medium [3] (confusingly, this is the same as size=3)
+ fontDef.size = m_styleSelector->fontSizes()[3];
}
//kdDebug() << "DocumentImpl::attach: setting to charset " << settings->charset() << endl;
diff --git a/WebCore/kwq/KWQKHTMLSettings.h b/WebCore/kwq/KWQKHTMLSettings.h
index 0ad0fef..b3e712b 100644
--- a/WebCore/kwq/KWQKHTMLSettings.h
+++ b/WebCore/kwq/KWQKHTMLSettings.h
@@ -58,7 +58,7 @@ public:
const QString &encoding() const;
int minFontSize() const;
- int defaultFontSize() const;
+ int mediumFontSize() const;
bool changeCursor() const;
diff --git a/WebCore/kwq/KWQKHTMLSettings.mm b/WebCore/kwq/KWQKHTMLSettings.mm
index b55d385..e467558 100644
--- a/WebCore/kwq/KWQKHTMLSettings.mm
+++ b/WebCore/kwq/KWQKHTMLSettings.mm
@@ -75,7 +75,7 @@ int KHTMLSettings::minFontSize() const
return [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitMinimumFontSize"];
}
-int KHTMLSettings::defaultFontSize() const
+int KHTMLSettings::mediumFontSize() const
{
return [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitDefaultFontSize"];
}
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 6b629f6..c6f997c 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -116,6 +116,8 @@ typedef khtml::RenderPart KHTMLRenderPart;
- (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag;
- (void)jumpToSelection;
+- (void)setTextSizeMultiplier:(float)multiplier;
+
@end
// The WebCoreBridge protocol contains methods for use by the WebCore side of the bridge.
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 447b07c..8abfc10 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -434,4 +434,9 @@ using namespace khtml;
part->impl->jumpToSelection();
}
+- (void)setTextSizeMultiplier:(float)multiplier
+{
+ part->setZoomFactor((int)rint(multiplier * 100));
+}
+
@end
diff --git a/WebCore/kwq/khtml/khtml_settings.h b/WebCore/kwq/khtml/khtml_settings.h
index 0ad0fef..b3e712b 100644
--- a/WebCore/kwq/khtml/khtml_settings.h
+++ b/WebCore/kwq/khtml/khtml_settings.h
@@ -58,7 +58,7 @@ public:
const QString &encoding() const;
int minFontSize() const;
- int defaultFontSize() const;
+ int mediumFontSize() const;
bool changeCursor() const;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0a04e1d..838aa0c 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2002-08-05 Darin Adler <darin at apple.com>
+
+ Do the wiring for the "text size multiplier" feature. The rest of the work will probably be done
+ at the WebCore level.
+
+ * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge setFrame:]): Set the text size multiplier.
+ * WebView.subproj/WebController.h:
+ * WebView.subproj/WebController.m:
+ (-[WebController setTextSizeMultiplier:]): Added. Calls _textSizeMultiplierChanged on the main frame.
+ (-[WebController textSizeMultiplier]): Added.
+ * WebView.subproj/WebControllerPrivate.h: Added textSizeMultiplier instance variable.
+ * WebView.subproj/WebFramePrivate.h:
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _textSizeMultiplierChanged]): Added. Calls setTextSizeMultiplier: on the bridge,
+ and _textSizeMultiplierChanged on all the child frames.
+
2002-08-05 Chris Blumenberg <cblu at apple.com>
Renamed icon loader delegate method to include the icon loader.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 0a04e1d..838aa0c 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,19 @@
+2002-08-05 Darin Adler <darin at apple.com>
+
+ Do the wiring for the "text size multiplier" feature. The rest of the work will probably be done
+ at the WebCore level.
+
+ * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge setFrame:]): Set the text size multiplier.
+ * WebView.subproj/WebController.h:
+ * WebView.subproj/WebController.m:
+ (-[WebController setTextSizeMultiplier:]): Added. Calls _textSizeMultiplierChanged on the main frame.
+ (-[WebController textSizeMultiplier]): Added.
+ * WebView.subproj/WebControllerPrivate.h: Added textSizeMultiplier instance variable.
+ * WebView.subproj/WebFramePrivate.h:
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _textSizeMultiplierChanged]): Added. Calls setTextSizeMultiplier: on the bridge,
+ and _textSizeMultiplierChanged on all the child frames.
+
2002-08-05 Chris Blumenberg <cblu at apple.com>
Renamed icon loader delegate method to include the icon loader.
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 0d97d61..7a817d2 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -30,7 +30,7 @@
- init
{
++WebBridgeCount;
-
+
return [super init];
}
@@ -85,7 +85,7 @@
// Set the load type so this load doesn't end up in the back
// forward list.
- [newFrame _setLoadType: WebFrameLoadTypeInternal];
+ [newFrame _setLoadType:WebFrameLoadTypeInternal];
return YES;
}
@@ -207,13 +207,14 @@
clientRedirectCancelledForDataSource:[self dataSource]];
}
-- (void)setFrame: (WebFrame *)webFrame
+- (void)setFrame:(WebFrame *)webFrame
{
WEBKIT_ASSERT(webFrame != nil);
if (frame == nil) {
// FIXME: non-retained because data source owns representation owns bridge
frame = webFrame;
+ [self setTextSizeMultiplier:[[frame controller] textSizeMultiplier]];
} else {
WEBKIT_ASSERT(frame == webFrame);
}
@@ -221,9 +222,8 @@
- (void)dataSourceChanged
{
- [self openURL:[[self dataSource] redirectedURL] == nil ?
- [[self dataSource] inputURL] :
- [[self dataSource] redirectedURL]];
+ [self openURL:[[self dataSource] redirectedURL] == nil
+ ? [[self dataSource] inputURL] : [[self dataSource] redirectedURL]];
}
- (WebDataSource *)dataSource
@@ -308,14 +308,14 @@
fromDataSource:[self dataSource]];
}
-- (void)addBackForwardItemWithURL: (NSURL *)url anchor: (NSString *)anchor;
+- (void)addBackForwardItemWithURL:(NSURL *)url anchor:(NSString *)anchor;
{
WebHistoryItem *backForwardItem;
- WebFrame *parentFrame = [[frame controller] frameForDataSource: [[frame dataSource] parent]];
+ WebFrame *parentFrame = [[frame controller] frameForDataSource:[[frame dataSource] parent]];
- backForwardItem = [[WebHistoryItem alloc] initWithURL:url target: [frame name] parent: [parentFrame name] title:[[frame dataSource] pageTitle] image: nil];
- [backForwardItem setAnchor: anchor];
- [[[frame controller] backForwardList] addEntry: backForwardItem];
+ backForwardItem = [[WebHistoryItem alloc] initWithURL:url target:[frame name] parent:[parentFrame name] title:[[frame dataSource] pageTitle] image:nil];
+ [backForwardItem setAnchor:anchor];
+ [[[frame controller] backForwardList] addEntry:backForwardItem];
[backForwardItem release];
}
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index a2dfc7f..c7bc4db 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -197,5 +197,7 @@
- (BOOL)goBack;
- (BOOL)goForward;
-
+- (void)setTextSizeMultiplier:(float)multiplier; // 1.0 is normal size
+- (float)textSizeMultiplier;
+
@end
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index f4e1337..ed67eb3 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -355,6 +355,19 @@
return NO;
}
+- (void)setTextSizeMultiplier:(float)m
+{
+ if (_private->textSizeMultiplier == m) {
+ return;
+ }
+ _private->textSizeMultiplier = m;
+ [[self mainFrame] _textSizeMultiplierChanged];
+}
+
+- (float)textSizeMultiplier
+{
+ return _private->textSizeMultiplier;
+}
@end
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index 3e10185..8fd8ac9 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -21,7 +21,7 @@
id<WebControllerPolicyHandler> policyHandler;
id<WebLocationChangeHandler> locationChangeHandler;
WebBackForwardList *backForwardList;
- // FIX ME use a bit field;
+ float textSizeMultiplier;
BOOL openedByScript;
BOOL useBackForwardList;
}
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index f84299c..9d7b6eb 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -95,4 +95,5 @@ typedef enum {
- (void)_goToItem: (WebHistoryItem *)item withFrameLoadType: (WebFrameLoadType)type;
- (void)_restoreScrollPosition;
- (void)_scrollToTop;
+- (void)_textSizeMultiplierChanged;
@end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index c22318a..cb8d9d0 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -701,5 +701,10 @@ static const char * const stateNames[] = {
[[[self webView] documentView] scrollPoint: origin];
}
+- (void)_textSizeMultiplierChanged
+{
+ [[self _bridge] setTextSizeMultiplier:[[self controller] textSizeMultiplier]];
+ [[[self dataSource] children] makeObjectsPerformSelector:@selector(_textSizeMultiplierChanged)];
+}
@end
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index a2dfc7f..c7bc4db 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -197,5 +197,7 @@
- (BOOL)goBack;
- (BOOL)goForward;
-
+- (void)setTextSizeMultiplier:(float)multiplier; // 1.0 is normal size
+- (float)textSizeMultiplier;
+
@end
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index f4e1337..ed67eb3 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -355,6 +355,19 @@
return NO;
}
+- (void)setTextSizeMultiplier:(float)m
+{
+ if (_private->textSizeMultiplier == m) {
+ return;
+ }
+ _private->textSizeMultiplier = m;
+ [[self mainFrame] _textSizeMultiplierChanged];
+}
+
+- (float)textSizeMultiplier
+{
+ return _private->textSizeMultiplier;
+}
@end
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 3e10185..8fd8ac9 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -21,7 +21,7 @@
id<WebControllerPolicyHandler> policyHandler;
id<WebLocationChangeHandler> locationChangeHandler;
WebBackForwardList *backForwardList;
- // FIX ME use a bit field;
+ float textSizeMultiplier;
BOOL openedByScript;
BOOL useBackForwardList;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list