Title: [155071] trunk/Source/WebCore
- Revision
- 155071
- Author
- psola...@apple.com
- Date
- 2013-09-04 15:16:01 -0700 (Wed, 04 Sep 2013)
Log Message
Document::updateHoverActiveState() should allow for deferred style recalcs
https://bugs.webkit.org/show_bug.cgi?id=120700
Reviewed by Simon Fraser.
Add an extra argument to Document::updateHoverActiveState() to specify if a style recalc
should be done. The default value keeps the current behavior of doing a style recalc. iOS
touch handling code will pass in DeferRecalcStyleIfNeeded to avoid the work.
No new tests because no functional changes.
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
* dom/Document.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (155070 => 155071)
--- trunk/Source/WebCore/ChangeLog 2013-09-04 22:14:50 UTC (rev 155070)
+++ trunk/Source/WebCore/ChangeLog 2013-09-04 22:16:01 UTC (rev 155071)
@@ -1,3 +1,20 @@
+2013-09-04 Pratik Solanki <psola...@apple.com>
+
+ Document::updateHoverActiveState() should allow for deferred style recalcs
+ https://bugs.webkit.org/show_bug.cgi?id=120700
+
+ Reviewed by Simon Fraser.
+
+ Add an extra argument to Document::updateHoverActiveState() to specify if a style recalc
+ should be done. The default value keeps the current behavior of doing a style recalc. iOS
+ touch handling code will pass in DeferRecalcStyleIfNeeded to avoid the work.
+
+ No new tests because no functional changes.
+
+ * dom/Document.cpp:
+ (WebCore::Document::updateHoverActiveState):
+ * dom/Document.h:
+
2013-09-04 Tim Horton <timothy_hor...@apple.com>
[mac] PDFDocumentImage should use PDFKit to draw
Modified: trunk/Source/WebCore/dom/Document.cpp (155070 => 155071)
--- trunk/Source/WebCore/dom/Document.cpp 2013-09-04 22:14:50 UTC (rev 155070)
+++ trunk/Source/WebCore/dom/Document.cpp 2013-09-04 22:16:01 UTC (rev 155071)
@@ -5765,7 +5765,7 @@
return 0;
}
-void Document::updateHoverActiveState(const HitTestRequest& request, Element* innerElement, const PlatformMouseEvent* event)
+void Document::updateHoverActiveState(const HitTestRequest& request, Element* innerElement, const PlatformMouseEvent* event, StyleResolverUpdateFlag updateFlag)
{
ASSERT(!request.readOnly());
@@ -5911,7 +5911,9 @@
}
}
- updateStyleIfNeeded();
+ ASSERT(updateFlag == RecalcStyleIfNeeded || updateFlag == DeferRecalcStyleIfNeeded);
+ if (updateFlag == RecalcStyleIfNeeded)
+ updateStyleIfNeeded();
}
bool Document::haveStylesheetsLoaded() const
Modified: trunk/Source/WebCore/dom/Document.h (155070 => 155071)
--- trunk/Source/WebCore/dom/Document.h 2013-09-04 22:14:50 UTC (rev 155070)
+++ trunk/Source/WebCore/dom/Document.h 2013-09-04 22:16:01 UTC (rev 155071)
@@ -675,7 +675,7 @@
void hoveredElementDidDetach(Element*);
void elementInActiveChainDidDetach(Element*);
- void updateHoverActiveState(const HitTestRequest&, Element*, const PlatformMouseEvent* = 0);
+ void updateHoverActiveState(const HitTestRequest&, Element*, const PlatformMouseEvent* = 0, StyleResolverUpdateFlag = RecalcStyleIfNeeded);
// Updates for :target (CSS3 selector).
void setCSSTarget(Element*);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes