Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Issue 2306813004: Inline LayoutBlock::invalidateCaret and remove redundant needs-repaint on layer. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index 64c9798093cc4d4f29486ab75d447b43cad23b99..228d8e17df28db368a2d17ba1d19f6320177cf85 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -226,15 +226,6 @@ void LayoutBlock::styleDidChange(StyleDifference diff, const ComputedStyle* oldS
m_heightAvailableToChildrenChanged |= oldStyle && diff.needsFullLayout() && needsLayout() && borderOrPaddingLogicalDimensionChanged(*oldStyle, newStyle, LogicalHeight);
}
-void LayoutBlock::invalidateCaret() const
-{
- if (hasCaret()) {
- ObjectPaintInvalidator(*this).slowSetPaintingLayerNeedsRepaint();
- frame()->selection().setCaretRectNeedsUpdate();
- frame()->selection().invalidateCaretRect(true);
- }
-}
-
void LayoutBlock::updateFromStyle()
{
LayoutBox::updateFromStyle();
@@ -937,8 +928,11 @@ void LayoutBlock::removePositionedObject(LayoutBox* o)
PaintInvalidationReason LayoutBlock::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState)
{
PaintInvalidationReason reason = LayoutBox::invalidatePaintIfNeeded(paintInvalidationState);
- if (reason != PaintInvalidationNone)
- invalidateCaret();
+ if (reason != PaintInvalidationNone && hasCaret()) {
+ ObjectPaintInvalidator(*this).slowSetPaintingLayerNeedsRepaint();
chrishtr 2016/09/02 21:26:53 On reflection I don't think we need line 932. If p
wkorman 2016/09/02 23:17:36 Done.
+ frame()->selection().setCaretRectNeedsUpdate();
+ frame()->selection().invalidateCaretRect(true);
+ }
return reason;
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698