Title: [114190] trunk/Source/WebCore
- Revision
- 114190
- Author
- [email protected]
- Date
- 2012-04-13 17:38:25 -0700 (Fri, 13 Apr 2012)
Log Message
Optimize tracking of intruding floats being removed from RenderBlock during layout
https://bugs.webkit.org/show_bug.cgi?id=82928
Patch by Ken Buchanan <[email protected]> on 2012-04-13
Reviewed by David Hyatt.
Performance tweaks in RenderBlock layout as a follow up to r112935.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::clearFloats):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114189 => 114190)
--- trunk/Source/WebCore/ChangeLog 2012-04-14 00:36:10 UTC (rev 114189)
+++ trunk/Source/WebCore/ChangeLog 2012-04-14 00:38:25 UTC (rev 114190)
@@ -1,3 +1,15 @@
+2012-04-13 Ken Buchanan <[email protected]>
+
+ Optimize tracking of intruding floats being removed from RenderBlock during layout
+ https://bugs.webkit.org/show_bug.cgi?id=82928
+
+ Reviewed by David Hyatt.
+
+ Performance tweaks in RenderBlock layout as a follow up to r112935.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::clearFloats):
+
2012-04-13 Mihnea Ovidenie <[email protected]>
[CSSRegions]Implement NamedFlow::contentNodes attribute
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (114189 => 114190)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2012-04-14 00:36:10 UTC (rev 114189)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2012-04-14 00:38:25 UTC (rev 114190)
@@ -4176,12 +4176,16 @@
} else if (!oldIntrudingFloatSet.isEmpty()) {
// If there are previously intruding floats that no longer intrude, then children with floats
// should also get layout because they might need their floating object lists cleared.
- const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
- FloatingObjectSetIterator end = floatingObjectSet.end();
- for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it)
- oldIntrudingFloatSet.remove((*it)->m_renderer);
- if (!oldIntrudingFloatSet.isEmpty())
+ if (m_floatingObjects->set().size() < oldIntrudingFloatSet.size())
markAllDescendantsWithFloatsForLayout();
+ else {
+ const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
+ FloatingObjectSetIterator end = floatingObjectSet.end();
+ for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end && !oldIntrudingFloatSet.isEmpty(); ++it)
+ oldIntrudingFloatSet.remove((*it)->m_renderer);
+ if (!oldIntrudingFloatSet.isEmpty())
+ markAllDescendantsWithFloatsForLayout();
+ }
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes