Changeset 270611 in webkit
- Timestamp:
- Dec 9, 2020, 5:12:19 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 12 edited
-
ChangeLog (modified) (1 diff)
-
rendering/RenderTheme.cpp (modified) (1 diff)
-
rendering/RenderTheme.h (modified) (2 diffs)
-
rendering/RenderThemeAdwaita.h (modified) (1 diff)
-
rendering/RenderThemeCocoa.h (modified) (1 diff)
-
rendering/RenderThemeCocoa.mm (modified) (1 diff)
-
rendering/RenderThemeIOS.h (modified) (1 diff)
-
rendering/RenderThemeIOS.mm (modified) (1 diff)
-
rendering/RenderThemeMac.h (modified) (1 diff)
-
rendering/RenderThemeMac.mm (modified) (1 diff)
-
rendering/RenderThemePlayStation.h (modified) (1 diff)
-
rendering/RenderThemeWin.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r270609 r270611 1 2020-12-09 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [GPU Process] Allow form controls to be painted when iOS form control refresh is enabled 4 https://bugs.webkit.org/show_bug.cgi?id=219718 5 6 Reviewed by Tim Horton. 7 8 Ensures that form controls show up when using the GPU process, when the iOS form control refresh setting is 9 enabled. All form controls post-refresh are implemented in such a way that they're compatible with graphics 10 contexts in the web process that are not backed by platform graphics context objects. See below for more 11 details. 12 13 This was added as a temporary workaround to avoid crashing when enabling GPU process in r199037. 14 15 * rendering/RenderTheme.cpp: 16 (WebCore::RenderTheme::paint): 17 * rendering/RenderTheme.h: 18 19 Makes `RenderTheme::canPaint` true by default on the base `RenderTheme` class, so that all platforms don't need 20 to individually override it and return true. Additionally plumbs a `WebCore::Settings` object through this 21 method, so that we can consult it on iOS. 22 23 (WebCore::RenderTheme::canPaint const): 24 * rendering/RenderThemeAdwaita.h: 25 * rendering/RenderThemeCocoa.h: 26 * rendering/RenderThemeCocoa.mm: 27 (WebCore::RenderThemeCocoa::canPaint const): Deleted. 28 * rendering/RenderThemeIOS.h: 29 * rendering/RenderThemeIOS.mm: 30 (WebCore::RenderThemeIOS::canPaint const): 31 32 When iOS form control refresh is enabled, return true; otherwise, return true only if there is a platform 33 `CGContextRef`. 34 35 * rendering/RenderThemeMac.h: 36 * rendering/RenderThemeMac.mm: 37 (WebCore::RenderThemeMac::canPaint const): 38 39 Preserve existing behavior by returning true here if (and only if) there is a platform `CGContextRef`. 40 41 * rendering/RenderThemePlayStation.h: 42 * rendering/RenderThemeWin.h: 43 1 44 2020-12-09 Andres Gonzalez <andresg_22@apple.com> 2 45 -
trunk/Source/WebCore/rendering/RenderTheme.cpp
r270362 r270611 292 292 return false; 293 293 294 if (UNLIKELY(!canPaint(paintInfo )))294 if (UNLIKELY(!canPaint(paintInfo, box.settings()))) 295 295 return false; 296 296 -
trunk/Source/WebCore/rendering/RenderTheme.h
r270362 r270611 47 47 class RenderProgress; 48 48 class RenderStyle; 49 class Settings; 49 50 50 51 class RenderTheme { … … 264 265 265 266 protected: 266 virtual bool canPaint(const PaintInfo& ) const = 0;267 virtual bool canPaint(const PaintInfo&, const Settings&) const { return true; } 267 268 virtual FontCascadeDescription& cachedSystemFontDescription(CSSValueID systemFontID) const; 268 269 virtual void updateCachedSystemFontDescription(CSSValueID systemFontID, FontCascadeDescription&) const = 0; -
trunk/Source/WebCore/rendering/RenderThemeAdwaita.h
r270250 r270611 35 35 36 36 private: 37 bool canPaint(const PaintInfo&) const final { return true; }38 39 37 String extraDefaultStyleSheet() final; 40 38 #if ENABLE(VIDEO) -
trunk/Source/WebCore/rendering/RenderThemeCocoa.h
r264298 r270611 40 40 41 41 private: 42 bool canPaint(const PaintInfo&) const final;43 42 bool shouldHaveCapsLockIndicator(const HTMLInputElement&) const final; 44 43 -
trunk/Source/WebCore/rendering/RenderThemeCocoa.mm
r266904 r270611 54 54 { 55 55 return static_cast<RenderThemeCocoa&>(RenderTheme::singleton()); 56 }57 58 bool RenderThemeCocoa::canPaint(const PaintInfo& paintInfo) const59 {60 return paintInfo.context().hasPlatformContext();61 56 } 62 57 -
trunk/Source/WebCore/rendering/RenderThemeIOS.h
r270362 r270611 69 69 70 70 private: 71 bool canPaint(const PaintInfo&, const Settings&) const final; 72 71 73 LengthBox popupInternalPaddingBox(const RenderStyle&) const override; 72 74 -
trunk/Source/WebCore/rendering/RenderThemeIOS.mm
r270403 r270611 376 376 } 377 377 378 bool RenderThemeIOS::canPaint(const PaintInfo& paintInfo, const Settings& settings) const 379 { 380 #if ENABLE(IOS_FORM_CONTROL_REFRESH) 381 if (settings.iOSFormControlRefreshEnabled()) 382 return true; 383 #else 384 UNUSED_PARAM(settings); 385 #endif 386 return paintInfo.context().hasPlatformContext(); 387 } 388 378 389 void RenderThemeIOS::paintCheckboxDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect) 379 390 { -
trunk/Source/WebCore/rendering/RenderThemeMac.h
r270362 r270611 103 103 RenderThemeMac(); 104 104 105 bool canPaint(const PaintInfo&, const Settings&) const final; 106 105 107 #if ENABLE(VIDEO) 106 108 // Media controls -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r270362 r270611 279 279 static NeverDestroyed<RenderThemeMac> theme; 280 280 return theme; 281 } 282 283 bool RenderThemeMac::canPaint(const PaintInfo& paintInfo, const Settings&) const 284 { 285 return paintInfo.context().hasPlatformContext(); 281 286 } 282 287 -
trunk/Source/WebCore/rendering/RenderThemePlayStation.h
r264298 r270611 35 35 36 36 private: 37 bool canPaint(const PaintInfo&) const final { return true; }38 39 37 void updateCachedSystemFontDescription(CSSValueID systemFontID, FontCascadeDescription&) const final; 40 38 }; -
trunk/Source/WebCore/rendering/RenderThemeWin.h
r270250 r270611 140 140 virtual ~RenderThemeWin(); 141 141 142 bool canPaint(const PaintInfo&) const final { return true; }143 144 142 // System fonts. 145 143 void updateCachedSystemFontDescription(CSSValueID, FontCascadeDescription&) const override;
Note:
See TracChangeset
for help on using the changeset viewer.