Diff
Modified: trunk/Source/WebCore/ChangeLog (169222 => 169223)
--- trunk/Source/WebCore/ChangeLog 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebCore/ChangeLog 2014-05-22 21:46:23 UTC (rev 169223)
@@ -1,3 +1,19 @@
+2014-05-22 Martin Hock <[email protected]>
+
+ [iOS] Enable -apple-system- styled elements to respond to system font size changes.
+ https://bugs.webkit.org/show_bug.cgi?id=133186
+ <rdar://problem/16583782>
+
+ Reviewed by Enrica Casucci.
+
+ * WebCore.exp.in:
+ * WebCore.xcodeproj/project.pbxproj:
+ * rendering/RenderThemeIOS.h:
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::_contentSizeCategory):
+ (WebCore::RenderThemeIOS::contentSizeCategory):
+ (WebCore::RenderThemeIOS::setContentSizeCategory):
+
2014-05-22 Jer Noble <[email protected]>
[MSE] Stored samples are not freed when SourceBuffer is removed from MediaSource
Modified: trunk/Source/WebCore/WebCore.exp.in (169222 => 169223)
--- trunk/Source/WebCore/WebCore.exp.in 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebCore/WebCore.exp.in 2014-05-22 21:46:23 UTC (rev 169223)
@@ -2515,6 +2515,7 @@
__ZN7WebCore14FrameSelection6moveToERKNS_15VisiblePositionENS_14EUserTriggeredENS0_19CursorAlignOnScrollE
__ZN7WebCore14FrameSelection6moveToERKNS_15VisiblePositionES3_NS_14EUserTriggeredE
__ZN7WebCore14IconController3urlEv
+__ZN7WebCore14RenderThemeIOS22setContentSizeCategoryERKN3WTF6StringE
__ZN7WebCore14ResourceHandle6cancelEv
__ZN7WebCore14ResourceHandle9setClientEPNS_20ResourceHandleClientE
__ZN7WebCore14ResourceHandleD1Ev
@@ -2627,6 +2628,7 @@
__ZN7WebCore4Icon18createIconForImageEP7CGImage
__ZN7WebCore4Node17isContentEditableENS0_22UserSelectAllTreatmentE
__ZN7WebCore4Node23compareDocumentPositionEPS0_
+__ZN7WebCore4Page52updateStyleForAllPagesAfterGlobalChangeInEnvironmentEv
__ZN7WebCore5ColorC1EP7CGColor
__ZN7WebCore5EventC1ERKN3WTF12AtomicStringEbb
__ZN7WebCore5Frame15setTimersPausedEb
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (169222 => 169223)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-05-22 21:46:23 UTC (rev 169223)
@@ -2269,6 +2269,7 @@
75793ED30D0CE85B007FC0AC /* DOMMessageEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 75793ED00D0CE85B007FC0AC /* DOMMessageEvent.h */; };
75793ED40D0CE85B007FC0AC /* DOMMessageEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 75793ED10D0CE85B007FC0AC /* DOMMessageEvent.mm */; };
75793ED50D0CE85B007FC0AC /* DOMMessageEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 75793ED20D0CE85B007FC0AC /* DOMMessageEventInternal.h */; };
+ 759CB837192DA9190012BC64 /* ControlStates.h in Headers */ = {isa = PBXBuildFile; fileRef = 311C08BC18E35D6800B65615 /* ControlStates.h */; settings = {ATTRIBUTES = (Private, ); }; };
75DCC7B818B81C8800A57128 /* SessionIDHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 75DCC7B718B81C8800A57128 /* SessionIDHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
7633A72613D8B33A008501B6 /* LocaleToScriptMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 7633A72413D8B33A008501B6 /* LocaleToScriptMapping.h */; };
7633A72713D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7633A72513D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp */; };
@@ -5390,7 +5391,7 @@
BCEA4887097D93020094C9E4 /* RenderThemeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4848097D93020094C9E4 /* RenderThemeMac.h */; };
BCEA4888097D93020094C9E4 /* RenderThemeMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCEA4849097D93020094C9E4 /* RenderThemeMac.mm */; };
BCEA4889097D93020094C9E4 /* RenderTheme.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA484A097D93020094C9E4 /* RenderTheme.cpp */; };
- BCEA488A097D93020094C9E4 /* RenderTheme.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA484B097D93020094C9E4 /* RenderTheme.h */; };
+ BCEA488A097D93020094C9E4 /* RenderTheme.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA484B097D93020094C9E4 /* RenderTheme.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCEA488B097D93020094C9E4 /* RenderText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA484C097D93020094C9E4 /* RenderText.cpp */; };
BCEA488C097D93020094C9E4 /* RenderText.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA484D097D93020094C9E4 /* RenderText.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCEA488D097D93020094C9E4 /* RenderTextFragment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA484E097D93020094C9E4 /* RenderTextFragment.cpp */; };
@@ -6600,7 +6601,7 @@
FED13D3A0CEA934600D89466 /* EditorIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = FED13D390CEA934600D89466 /* EditorIOS.mm */; };
FED13D3D0CEA936A00D89466 /* FrameIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = FED13D3B0CEA936A00D89466 /* FrameIOS.mm */; };
FED13D400CEA939400D89466 /* IconIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = FED13D3F0CEA939400D89466 /* IconIOS.mm */; };
- FED13D520CEA949700D89466 /* RenderThemeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = FED13D500CEA949700D89466 /* RenderThemeIOS.h */; };
+ FED13D520CEA949700D89466 /* RenderThemeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = FED13D500CEA949700D89466 /* RenderThemeIOS.h */; settings = {ATTRIBUTES = (Private, ); }; };
FED48390CED66C3255F72C59 /* MathMLSelectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F75A059AF170D8FAA5B8CABE /* MathMLSelectElement.cpp */; };
FEDEF84116797108000E444A /* DatabaseStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEDEF83F16797108000E444A /* DatabaseStrategy.cpp */; };
FEDEF84216797108000E444A /* DatabaseStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = FEDEF84016797108000E444A /* DatabaseStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -25760,6 +25761,7 @@
97BC6A451505F081001B74AC /* SQLResultSetRowList.h in Headers */,
97BC6A481505F081001B74AC /* SQLStatement.h in Headers */,
FE8A674816CDD19E00930BF8 /* SQLStatementBackend.h in Headers */,
+ 759CB837192DA9190012BC64 /* ControlStates.h in Headers */,
97BC6A491505F081001B74AC /* SQLStatementCallback.h in Headers */,
97BC6A4B1505F081001B74AC /* SQLStatementErrorCallback.h in Headers */,
97BC6A4E1505F081001B74AC /* SQLStatementSync.h in Headers */,
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.h (169222 => 169223)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.h 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.h 2014-05-22 21:46:23 UTC (rev 169223)
@@ -47,6 +47,8 @@
static CFStringRef contentSizeCategory();
+ static void setContentSizeCategory(const String&);
+
protected:
virtual int baselinePosition(const RenderObject&) const override;
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (169222 => 169223)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2014-05-22 21:46:23 UTC (rev 169223)
@@ -306,11 +306,24 @@
return adoptRef(new RenderThemeIOS);
}
+static String& _contentSizeCategory()
+{
+ static NeverDestroyed<String> _contentSizeCategory;
+ return _contentSizeCategory.get();
+}
+
CFStringRef RenderThemeIOS::contentSizeCategory()
{
+ if (!_contentSizeCategory().isNull())
+ return (__bridge CFStringRef)static_cast<NSString*>(_contentSizeCategory());
return (CFStringRef)[[getUIApplicationClass() sharedApplication] preferredContentSizeCategory];
}
+void RenderThemeIOS::setContentSizeCategory(const String& contentSizeCategory)
+{
+ _contentSizeCategory() = contentSizeCategory;
+}
+
const Color& RenderThemeIOS::shadowColor() const
{
static Color color(0.0f, 0.0f, 0.0f, 0.7f);
Modified: trunk/Source/WebKit2/ChangeLog (169222 => 169223)
--- trunk/Source/WebKit2/ChangeLog 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebKit2/ChangeLog 2014-05-22 21:46:23 UTC (rev 169223)
@@ -1,3 +1,23 @@
+2014-05-22 Martin Hock <[email protected]>
+
+ [iOS] Enable -apple-system- styled elements to respond to system font size changes.
+ https://bugs.webkit.org/show_bug.cgi?id=133186
+ <rdar://problem/16583782>
+
+ Reviewed by Enrica Casucci.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView initWithFrame:configuration:]):
+ (-[WKWebView _contentSizeCategoryDidChange:]):
+ (-[WKWebView _contentSizeCategory]):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/ios/WebPageProxyIOS.mm:
+ (WebKit::WebPageProxy::contentSizeCategoryDidChange):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::contentSizeCategoryDidChange):
+
2014-05-22 Alexey Proskuryakov <[email protected]>
[iOS] Add CFBundleAllowMixedLocalizations to WebContentService
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (169222 => 169223)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-05-22 21:46:23 UTC (rev 169223)
@@ -78,6 +78,7 @@
#import "WebPageMessages.h"
#import <CoreGraphics/CGFloat.h>
#import <CoreGraphics/CGPDFDocumentPrivate.h>
+#import <UIKit/UIApplication.h>
#import <UIKit/UIPeripheralHost_Private.h>
#import <QuartzCore/CARenderServer.h>
#import <QuartzCore/QuartzCorePrivate.h>
@@ -232,6 +233,8 @@
[center addObserver:self selector:@selector(_keyboardDidChangeFrame:) name:UIKeyboardDidChangeFrameNotification object:nil];
[center addObserver:self selector:@selector(_keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
[center addObserver:self selector:@selector(_keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
+ [center addObserver:self selector:@selector(_contentSizeCategoryDidChange:) name:UIContentSizeCategoryDidChangeNotification object:nil];
+ _page->contentSizeCategoryDidChange([self _contentSizeCategory]);
[[_configuration _contentProviderRegistry] addPage:*_page];
#endif
@@ -1030,6 +1033,16 @@
[self _keyboardChangedWithInfo:notification.userInfo adjustScrollView:YES];
}
+- (void)_contentSizeCategoryDidChange:(NSNotification *)notification
+{
+ _page->contentSizeCategoryDidChange([self _contentSizeCategory]);
+}
+
+- (NSString *)_contentSizeCategory
+{
+ return [[UIApplication sharedApplication] preferredContentSizeCategory];
+}
+
- (void)setAllowsBackForwardNavigationGestures:(BOOL)allowsBackForwardNavigationGestures
{
if (_allowsBackForwardNavigationGestures == allowsBackForwardNavigationGestures)
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (169222 => 169223)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2014-05-22 21:46:23 UTC (rev 169223)
@@ -634,6 +634,7 @@
void didNotHandleTapAsClick(const WebCore::IntPoint&);
void viewportMetaTagWidthDidChange(float width);
void didFinishDrawingPagesToPDF(const IPC::DataReference&);
+ void contentSizeCategoryDidChange(const String& contentSizeCategory);
#endif
const EditorState& editorState() const { return m_editorState; }
Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (169222 => 169223)
--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2014-05-22 21:46:23 UTC (rev 169223)
@@ -654,6 +654,11 @@
m_pageClient.didFinishDrawingPagesToPDF(pdfData);
}
+void WebPageProxy::contentSizeCategoryDidChange(const String& contentSizeCategory)
+{
+ process().send(Messages::WebPage::ContentSizeCategoryDidChange(contentSizeCategory), m_pageID);
+}
+
#if USE(QUICK_LOOK)
void WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame(const String& fileName, const String& uti)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (169222 => 169223)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2014-05-22 21:46:23 UTC (rev 169223)
@@ -487,6 +487,7 @@
void updateSelectionAppearance();
void dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue);
+ void contentSizeCategoryDidChange(const String&);
#if ENABLE(INSPECTOR)
void showInspectorIndication();
void hideInspectorIndication();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (169222 => 169223)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2014-05-22 21:46:23 UTC (rev 169223)
@@ -78,6 +78,7 @@
ApplicationWillResignActive()
ApplicationWillEnterForeground()
ApplicationDidBecomeActive()
+ ContentSizeCategoryDidChange(String contentSizeCategory)
#endif
#if ENABLE(REMOTE_INSPECTOR)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (169222 => 169223)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2014-05-22 21:45:45 UTC (rev 169222)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2014-05-22 21:46:23 UTC (rev 169223)
@@ -76,6 +76,7 @@
#import <WebCore/PlatformMouseEvent.h>
#import <WebCore/RenderBlock.h>
#import <WebCore/RenderImage.h>
+#import <WebCore/RenderThemeIOS.h>
#import <WebCore/RenderView.h>
#import <WebCore/ResourceBuffer.h>
#import <WebCore/SharedBuffer.h>
@@ -2326,6 +2327,12 @@
send(Messages::WebPageProxy::DidFinishDrawingPagesToPDF(IPC::DataReference(CFDataGetBytePtr(pdfPageData.get()), CFDataGetLength(pdfPageData.get()))));
}
+void WebPage::contentSizeCategoryDidChange(const String& contentSizeCategory)
+{
+ RenderThemeIOS::setContentSizeCategory(contentSizeCategory);
+ Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment();
+}
+
} // namespace WebKit
#endif // PLATFORM(IOS)