WebKit Bugzilla
Attachment 343345 Details for
Bug 186866
: Recalc styles every time defaultAppearance changes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186866-20180622105349.patch (text/plain), 7.23 KB, created by
Timothy Hatcher
on 2018-06-22 10:53:49 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Timothy Hatcher
Created:
2018-06-22 10:53:49 PDT
Size:
7.23 KB
patch
obsolete
>Subversion Revision: 233084 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c2a64044d161bf4173d5acd1217a40f8f3eb7de6..b72ba726dc73c5d835c375f85ab76129b096fe23 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-06-20 Timothy Hatcher <timothy@apple.com> >+ >+ Recalc styles every time defaultAppearance changes. >+ https://bugs.webkit.org/show_bug.cgi?id=186866 >+ rdar://problem/41309805 >+ >+ Reviewed by Tim Horton. >+ >+ * page/Page.cpp: >+ (WebCore::Page::setUseSystemAppearance): Added. Recalc styles and update system colors. >+ (WebCore::Page::setDefaultAppearance): Added. Ditto. >+ * page/Page.h: >+ (WebCore::Page::setUseSystemAppearance): Deleted impl. >+ (WebCore::Page::setDefaultAppearance): Deleted impl. >+ > 2018-06-22 Thibault Saunier <tsaunier@igalia.com> > > [GStreamer] Avoid sending SELECT_STREAM events when nothing changed >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index a49761f38a3ed481745952cd0c28a3825ea6b80a..c7c3bfa72600d5cf734d4445415207c1034952ee 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,16 @@ >+2018-06-20 Timothy Hatcher <timothy@apple.com> >+ >+ Recalc styles every time defaultAppearance changes. >+ https://bugs.webkit.org/show_bug.cgi?id=186866 >+ rdar://problem/41309805 >+ >+ Reviewed by Tim Horton. >+ >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::setDefaultAppearance): >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::setDefaultAppearance): >+ > 2018-06-22 Sihui Liu <sihui_liu@apple.com> > > REGRESSION (r231850): Cookie file cannot be read or written by network process >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 7582a60915366038dfbea341eb8e52ffac05091c..27d337f6c094ee33d56d90bb6778c8aeb4c867cf 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,16 @@ >+2018-06-20 Timothy Hatcher <timothy@apple.com> >+ >+ Recalc styles every time defaultAppearance changes. >+ https://bugs.webkit.org/show_bug.cgi?id=186866 >+ rdar://problem/41309805 >+ >+ Reviewed by Tim Horton. >+ >+ * WebView/WebView.mm: >+ (-[WebView _updateDefaultAppearance]): >+ (-[WebView _setUseSystemAppearance:]): >+ (-[WebView _useSystemAppearance]): >+ > 2018-06-20 Darin Adler <darin@apple.com> > > [Cocoa] Use the isDirectory: variants of NSURL methods more to eliminate unnecessary file system activity >diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp >index 20a610a5b52f7f5b4fa39413c9a74f04495f11d6..4862a326cc541ce0e65cb7a912e9f0a9201efe8d 100644 >--- a/Source/WebCore/page/Page.cpp >+++ b/Source/WebCore/page/Page.cpp >@@ -2369,6 +2369,17 @@ void Page::setUnobscuredSafeAreaInsets(const FloatBoxExtent& insets) > } > } > >+void Page::setUseSystemAppearance(bool useSystemAppearance) >+{ >+ if (m_useSystemAppearance == useSystemAppearance) >+ return; >+ >+ m_useSystemAppearance = useSystemAppearance; >+ >+ RenderTheme::singleton().platformColorsDidChange(); >+ setNeedsRecalcStyleInAllFrames(); >+} >+ > bool Page::defaultAppearance() const > { > FrameView* view = mainFrame().view(); >@@ -2377,6 +2388,17 @@ bool Page::defaultAppearance() const > return m_defaultAppearance; > } > >+void Page::setDefaultAppearance(bool defaultAppearance) >+{ >+ // Don't return early, even if m_defaultAppearance == defaultAppearance. >+ // The system appearance might have changed under us, like for accessibility. >+ >+ m_defaultAppearance = defaultAppearance; >+ >+ RenderTheme::singleton().platformColorsDidChange(); >+ setNeedsRecalcStyleInAllFrames(); >+} >+ > void Page::setFullscreenInsets(const FloatBoxExtent& insets) > { > if (insets == m_fullscreenInsets) >diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h >index ec498c5a0a1c09182a4cff93206070852ac77bd8..e88350a34df959d950488d291d408022ccf32b51 100644 >--- a/Source/WebCore/page/Page.h >+++ b/Source/WebCore/page/Page.h >@@ -338,12 +338,12 @@ public: > bool enclosedInScrollableAncestorView() const { return m_enclosedInScrollableAncestorView; } > void setEnclosedInScrollableAncestorView(bool f) { m_enclosedInScrollableAncestorView = f; } > #endif >- >+ > bool useSystemAppearance() const { return m_useSystemAppearance; } >- void setUseSystemAppearance(bool a) { m_useSystemAppearance = a; } >+ WEBCORE_EXPORT void setUseSystemAppearance(bool); > > bool defaultAppearance() const; >- void setDefaultAppearance(bool a) { m_defaultAppearance = a; } >+ WEBCORE_EXPORT void setDefaultAppearance(bool); > > #if ENABLE(TEXT_AUTOSIZING) > float textAutosizingWidth() const { return m_textAutosizingWidth; } >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index b9af1d6bff9884bdda6040ce7980761628fc1899..5f1521f3332c1a5959ede7dca36b143e0e7618ef 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -7303,10 +7303,10 @@ void WebPageProxy::setDefaultAppearance(bool defaultAppearance) > { > if (!isValid()) > return; >- >- if (defaultAppearance == m_defaultAppearance) >- return; >- >+ >+ // Don't return early, even if m_defaultAppearance == defaultAppearance. >+ // The system appearance might have changed under us, like for accessibility. >+ > m_defaultAppearance = defaultAppearance; > m_process->send(Messages::WebPage::SetDefaultAppearance(defaultAppearance), m_pageID); > } >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 43bd0c08708042f4505165744b85446d886e6ee7..2a8c3215240a925b01fde7780344dd048cb434fb 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -4193,12 +4193,10 @@ void WebPage::setUseSystemAppearance(bool useSystemAppearance) > { > corePage()->setUseSystemAppearance(useSystemAppearance); > } >- >+ > void WebPage::setDefaultAppearance(bool defaultAppearance) > { > corePage()->setDefaultAppearance(defaultAppearance); >- RenderTheme::singleton().platformColorsDidChange(); >- corePage()->setNeedsRecalcStyleInAllFrames(); > } > #endif > >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index 57310f7e966cd6afb009b06411f614a794c3ad8d..b5c8450c255547b7f5d9ecfafcf4bf96a69c1d5a 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -5288,23 +5288,19 @@ - (bool)_defaultAppearance > - (void)_updateDefaultAppearance > { > _private->page->setDefaultAppearance([self _defaultAppearance]); >- RenderTheme::singleton().platformColorsDidChange(); >- _private->page->setNeedsRecalcStyleInAllFrames(); > } > > - (void)_setUseSystemAppearance:(BOOL)useSystemAppearance > { >- if (auto page = _private->page) { >- page->setUseSystemAppearance(useSystemAppearance); >- [self _updateDefaultAppearance]; >- } >+ if (_private && _private->page) >+ _private->page->setUseSystemAppearance(useSystemAppearance); > } > > - (BOOL)_useSystemAppearance > { > if (!_private->page) > return NO; >- >+ > return _private->page->useSystemAppearance(); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186866
:
343188
|
343196
|
343253
|
343342
| 343345