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

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

Issue 2464053003: Always paint background and shadow separately (Closed)
Patch Set: Rebaseline-cl (invisible pixel changes along shadow edges) (The original Patch Set 2 was removed to get the try result in Patch Set 1) Created 4 years, 1 month 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
Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index 9c12977b8ce22b218518f4af9b8857e9a743db76..cd3700b6bde282bb4d2fa5806ad969ea32e6947d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -1081,63 +1081,6 @@ LayoutUnit LayoutBoxModelObject::computedCSSPadding(
return minimumValueForLength(padding, w);
}
-bool LayoutBoxModelObject::boxShadowShouldBeAppliedToBackground(
- BackgroundBleedAvoidance bleedAvoidance,
- const InlineFlowBox* inlineFlowBox) const {
- if (bleedAvoidance != BackgroundBleedNone)
- return false;
-
- if (style()->hasAppearance())
- return false;
-
- const ShadowList* shadowList = style()->boxShadow();
- if (!shadowList)
- return false;
-
- bool hasOneNormalBoxShadow = false;
- size_t shadowCount = shadowList->shadows().size();
- for (size_t i = 0; i < shadowCount; ++i) {
- const ShadowData& currentShadow = shadowList->shadows()[i];
- if (currentShadow.style() != Normal)
- continue;
-
- if (hasOneNormalBoxShadow)
- return false;
- hasOneNormalBoxShadow = true;
-
- if (currentShadow.spread())
- return false;
- }
-
- if (!hasOneNormalBoxShadow)
- return false;
-
- Color backgroundColor = resolveColor(CSSPropertyBackgroundColor);
- if (backgroundColor.hasAlpha())
- return false;
-
- const FillLayer* lastBackgroundLayer = &style()->backgroundLayers();
- for (const FillLayer* next = lastBackgroundLayer->next(); next;
- next = lastBackgroundLayer->next())
- lastBackgroundLayer = next;
-
- if (lastBackgroundLayer->clip() != BorderFillBox)
- return false;
-
- if (lastBackgroundLayer->image() && style()->hasBorderRadius())
- return false;
-
- if (inlineFlowBox &&
- !inlineFlowBox->boxShadowCanBeAppliedToBackground(*lastBackgroundLayer))
- return false;
-
- if (hasOverflowClip() &&
- lastBackgroundLayer->attachment() == LocalBackgroundAttachment)
- return false;
-
- return true;
-}
-
LayoutUnit LayoutBoxModelObject::containingBlockLogicalWidthForContent() const {
return containingBlock()->availableLogicalWidth();
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698