Changeset 94578 in webkit
- Timestamp:
- Sep 6, 2011, 10:49:41 AM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r94577 r94578 1 2011-09-06 Raphael Kubo da Costa <kubo@profusion.mobi> 2 3 [EFL] Do not allocate memory for extremely large surfaces. 4 https://bugs.webkit.org/show_bug.cgi?id=65192 5 6 Reviewed by Martin Robinson. 7 8 So far, RenderThemeEfl tried to allocate a buffer and a cairo surface 9 the size of the whole form element passed to it. 10 11 In the case of 12 fast/overflow/overflow-height-float-not-removed-crash.html and others, 13 this meant extremely large widgets, which crashed the code. 14 15 We now only render the widgets if they are smaller than some hardcoded 16 and sufficiently large values which should work in most cases. 17 18 No new tests, as this was uncovered by existing ones. 19 20 * platform/efl/RenderThemeEfl.cpp: 21 (WebCore::RenderThemeEfl::isFormElementTooLargeToDisplay): 22 (WebCore::RenderThemeEfl::cacheThemePartNew): 23 (WebCore::RenderThemeEfl::paintThemePart): 24 * platform/efl/RenderThemeEfl.h: 25 1 26 2011-08-30 Pavel Podivilov <podivilov@chromium.org> 2 27 -
trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp
r94149 r94578 144 144 } 145 145 146 bool RenderThemeEfl::isFormElementTooLargeToDisplay(const IntSize& elementSize) 147 { 148 // This limit of 20000 pixels is hardcoded inside edje -- anything above this size 149 // will be clipped. This value seems to be reasonable enough so that hardcoding it 150 // here won't be a problem. 151 static const int maxEdjeDimension = 20000; 152 153 return elementSize.width() > maxEdjeDimension || elementSize.height() > maxEdjeDimension; 154 } 155 146 156 // allocate a new entry and fill it with edje group 147 157 struct RenderThemeEfl::ThemePartCacheEntry* RenderThemeEfl::cacheThemePartNew(FormType type, const IntSize& size) 148 158 { 149 struct ThemePartCacheEntry *entry = new struct ThemePartCacheEntry; 150 159 if (isFormElementTooLargeToDisplay(size)) { 160 EINA_LOG_ERR("cannot render an element of size %dx%d", size.width(), size.height()); 161 return 0; 162 } 163 164 ThemePartCacheEntry* entry = new ThemePartCacheEntry; 151 165 if (!entry) { 152 166 EINA_LOG_ERR("could not allocate ThemePartCacheEntry."); … … 298 312 299 313 entry = cacheThemePartGet(type, rect.size()); 300 ASSERT(entry);301 314 if (!entry) 302 315 return false; -
trunk/Source/WebCore/platform/efl/RenderThemeEfl.h
r92189 r94578 201 201 void applyEdjeStateFromForm(Evas_Object*, ControlStates); 202 202 bool paintThemePart(RenderObject*, FormType, const PaintInfo&, const IntRect&); 203 bool isFormElementTooLargeToDisplay(const IntSize&); 203 204 204 205 #if ENABLE(VIDEO)
Note:
See TracChangeset
for help on using the changeset viewer.