Changeset 140512 in webkit
- Timestamp:
- Jan 22, 2013 11:31:30 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140509 r140512 1 2013-01-22 Matt Falkenhagen <falken@chromium.org> 2 3 20% regression on dom_perf/DomDivWalk 4 https://bugs.webkit.org/show_bug.cgi?id=106726 5 6 Reviewed by Hajime Morita. 7 8 This patch moves the checks in Element::removedFrom for Fullscreen and top layer flags 9 into a slow path. The idea is for the two checks for Fullscreen and top layer 10 to be replaced by one faster check in the fast path. 11 12 The plan is to migrate the Fullscreen implementation to use top layer, so this is just a 13 short-term fix for the perf regression. 14 15 No new tests: no functionality change 16 17 * dom/Element.cpp: 18 (WebCore::Element::removedFrom): Create a slow path to move the Fullscreen and top layer checks into. 19 * dom/Node.cpp: 20 (WebCore::Node::setIsInTopLayer): To allow for cleaner code in Element::removedFrom, define 21 setIsInTopLayer and isInTopLayer even when the feature flag is off. 22 * dom/Node.h: 23 (WebCore::Node::isInTopLayer): Ditto. 24 (Node): 25 1 26 2013-01-22 Mark Lam <mark.lam@apple.com> 2 27 -
trunk/Source/WebCore/dom/Element.cpp
r140452 r140512 1183 1183 after->removedFrom(insertionPoint); 1184 1184 1185 // FIXME: Fullscreen should be migrated to use the top layer (bug 107617). Then this can just be a single check. 1186 // The purpose of the outer if statement is to quickly determine whether we must do the additional 1187 // checks in a slow path. 1188 #if ENABLE(DIALOG_ELEMENT) || ENABLE(FULLSCREEN_API) 1189 if (hasRareData() || isInTopLayer()) { 1185 1190 #if ENABLE(DIALOG_ELEMENT) 1186 if (isInTopLayer())1187 document()->removeFromTopLayer(this);1191 if (isInTopLayer()) 1192 document()->removeFromTopLayer(this); 1188 1193 #endif 1189 1194 #if ENABLE(FULLSCREEN_API) 1190 if (containsFullScreenElement()) 1191 setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false); 1192 #endif 1195 if (containsFullScreenElement()) 1196 setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false); 1197 #endif 1198 } 1199 #endif 1200 1193 1201 #if ENABLE(POINTER_LOCK) 1194 1202 if (document()->page()) -
trunk/Source/WebCore/dom/Node.h
r140411 r140512 686 686 bool isInTopLayer() const { return getFlag(IsInTopLayer); } 687 687 void setIsInTopLayer(bool); 688 #else 689 bool isInTopLayer() const { return false; } 690 void setIsInTopLayer(bool) { } 688 691 #endif 689 692
Note: See TracChangeset
for help on using the changeset viewer.