WebKit Bugzilla
Attachment 341526 Details for
Bug 186066
: Printing does not apply the right styles
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186066-20180529152236.patch (text/plain), 3.92 KB, created by
Timothy Hatcher
on 2018-05-29 15:22:37 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Timothy Hatcher
Created:
2018-05-29 15:22:37 PDT
Size:
3.92 KB
patch
obsolete
>Subversion Revision: 232268 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4aa3a3da886e2ed35d40d8a9eae62e015a2f722f..63ea37eede3844f4bb6bbeddb40f069b0bfef017 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2018-05-29 Timothy Hatcher <timothy@apple.com> >+ >+ Printing does not apply the right colors in all cases. >+ >+ https://bugs.webkit.org/show_bug.cgi?id=186066 >+ rdar://problem/40274975 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/agents/InspectorPageAgent.cpp: >+ (WebCore::InspectorPageAgent::setEmulatedMedia): Call RenderTheme::platformColorsDidChange >+ to invalidate the color cache. >+ * page/FrameView.cpp: >+ (WebCore::FrameView::adjustMediaTypeForPrinting): Ditto. >+ * page/Page.cpp: >+ (WebCore::Page::defaultAppearance const): Added. Use default when not screen. >+ * page/Page.h: >+ (WebCore::Page::defaultAppearance const): Deleted. >+ > 2018-05-29 Chris Dumez <cdumez@apple.com> > > Avoid unnecessary String allocation in isPublicSuffix(const String&) >diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >index 58b7b6e441946ff840cbecb579061c3e30bd2db7..2e3b76d71dcd11111ba0155401ce991f169d87dc 100644 >--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >@@ -55,6 +55,7 @@ > #include "MemoryCache.h" > #include "Page.h" > #include "RenderObject.h" >+#include "RenderTheme.h" > #include "ScriptController.h" > #include "SecurityOrigin.h" > #include "Settings.h" >@@ -785,8 +786,10 @@ void InspectorPageAgent::setEmulatedMedia(ErrorString&, const String& media) > return; > > m_emulatedMedia = media; >- Document* document = m_page.mainFrame().document(); >- if (document) { >+ >+ RenderTheme::singleton().platformColorsDidChange(); >+ >+ if (auto document = m_page.mainFrame().document()) { > document->styleScope().didChangeStyleSheetEnvironment(); > document->updateLayout(); > } >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index 774be22a2af99ad350c48dc960f3554ff678b8cd..482747958e5b76fc90e10f88447f10f21cbd5c73 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -1379,6 +1379,8 @@ void FrameView::adjustMediaTypeForPrinting(bool printing) > setMediaType(m_mediaTypeWhenNotPrinting); > m_mediaTypeWhenNotPrinting = String(); > } >+ >+ RenderTheme::singleton().platformColorsDidChange(); > } > > bool FrameView::useSlowRepaints(bool considerOverlap) const >diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp >index f7cee2df4d859d6e6c35432dc05789351c04faad..780582b04073ea908ab7431779706c1cb89c76db 100644 >--- a/Source/WebCore/page/Page.cpp >+++ b/Source/WebCore/page/Page.cpp >@@ -2368,6 +2368,14 @@ void Page::setUnobscuredSafeAreaInsets(const FloatBoxExtent& insets) > } > } > >+bool Page::defaultAppearance() const >+{ >+ FrameView* view = mainFrame().view(); >+ if (!view || !equalLettersIgnoringASCIICase(view->mediaType(), "screen")) >+ return true; >+ return m_defaultAppearance; >+} >+ > void Page::setFullscreenInsetTop(double inset) > { > for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) { >diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h >index 5cc15e8beeeae886c992dedba856bf69d4c35442..2b6328aa13f8dc14eadc8a3b805b11f4a1b2b42f 100644 >--- a/Source/WebCore/page/Page.h >+++ b/Source/WebCore/page/Page.h >@@ -342,7 +342,7 @@ public: > bool useSystemAppearance() const { return m_useSystemAppearance; } > void setUseSystemAppearance(bool a) { m_useSystemAppearance = a; } > >- bool defaultAppearance() const { return m_defaultAppearance; } >+ bool defaultAppearance() const; > void setDefaultAppearance(bool a) { m_defaultAppearance = a; } > > #if ENABLE(TEXT_AUTOSIZING)
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 186066
: 341526