Title: [177730] trunk/Source/WebCore
- Revision
- 177730
- Author
- [email protected]
- Date
- 2014-12-24 18:48:11 -0800 (Wed, 24 Dec 2014)
Log Message
Small cleanup of RenderBlock::paint()
https://bugs.webkit.org/show_bug.cgi?id=139849
Patch by Benjamin Poulain <[email protected]> on 2014-12-24
Reviewed by Daniel Bates.
Remove a couple of instructions by putting variable in the right scope.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (177729 => 177730)
--- trunk/Source/WebCore/ChangeLog 2014-12-25 02:46:32 UTC (rev 177729)
+++ trunk/Source/WebCore/ChangeLog 2014-12-25 02:48:11 UTC (rev 177730)
@@ -1,3 +1,15 @@
+2014-12-24 Benjamin Poulain <[email protected]>
+
+ Small cleanup of RenderBlock::paint()
+ https://bugs.webkit.org/show_bug.cgi?id=139849
+
+ Reviewed by Daniel Bates.
+
+ Remove a couple of instructions by putting variable in the right scope.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::paint):
+
2014-12-24 Dan Bernstein <[email protected]>
[Cocoa] WebCoreSystemInterface.h declares two unused symbols
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (177729 => 177730)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2014-12-25 02:46:32 UTC (rev 177729)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2014-12-25 02:48:11 UTC (rev 177730)
@@ -1408,22 +1408,21 @@
void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- LayoutPoint adjustedPaintOffset = paintOffset + location();
-
- PaintPhase phase = paintInfo.phase;
-
RenderNamedFlowFragment* namedFlowFragment = currentRenderNamedFlowFragment();
// Check our region range to make sure we need to be painting in this region.
if (namedFlowFragment && !namedFlowFragment->flowThread()->objectShouldFragmentInFlowRegion(this, namedFlowFragment))
return;
+ LayoutPoint adjustedPaintOffset = paintOffset + location();
+ PaintPhase phase = paintInfo.phase;
+
// Check if we need to do anything at all.
// FIXME: Could eliminate the isRoot() check if we fix background painting so that the RenderView
// paints the root's background.
if (!isRoot()) {
LayoutRect overflowBox = overflowRectForPaintRejection(namedFlowFragment);
flipForWritingMode(overflowBox);
- overflowBox.inflate(maximalOutlineSize(paintInfo.phase));
+ overflowBox.inflate(maximalOutlineSize(phase));
overflowBox.moveBy(adjustedPaintOffset);
if (!overflowBox.intersects(paintInfo.rect)
#if PLATFORM(IOS)
@@ -1442,7 +1441,7 @@
// Our scrollbar widgets paint exactly when we tell them to, so that they work properly with
// z-index. We paint after we painted the background/border, so that the scrollbars will
// sit above the background/border.
- if (hasOverflowClip() && style().visibility() == VISIBLE && (phase == PaintPhaseBlockBackground || phase == PaintPhaseChildBlockBackground) && paintInfo.shouldPaintWithinRoot(*this) && !paintInfo.paintRootBackgroundOnly())
+ if ((phase == PaintPhaseBlockBackground || phase == PaintPhaseChildBlockBackground) && hasOverflowClip() && style().visibility() == VISIBLE && paintInfo.shouldPaintWithinRoot(*this) && !paintInfo.paintRootBackgroundOnly())
layer()->paintOverflowControls(paintInfo.context, roundedIntPoint(adjustedPaintOffset), snappedIntRect(paintInfo.rect));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes