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

Side by Side Diff: third_party/WebKit/Source/core/paint/InlineFlowBoxPainter.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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxPainter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/InlineFlowBoxPainter.h" 5 #include "core/paint/InlineFlowBoxPainter.h"
6 6
7 #include "core/layout/api/LineLayoutAPIShim.h" 7 #include "core/layout/api/LineLayoutAPIShim.h"
8 #include "core/layout/line/RootInlineBox.h" 8 #include "core/layout/line/RootInlineBox.h"
9 #include "core/paint/BoxPainter.h" 9 #include "core/paint/BoxPainter.h"
10 #include "core/paint/PaintInfo.h" 10 #include "core/paint/PaintInfo.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 LayoutPoint adjustedPaintOffset = paintOffset + localRect.location(); 269 LayoutPoint adjustedPaintOffset = paintOffset + localRect.location();
270 270
271 LayoutRect adjustedFrameRect = 271 LayoutRect adjustedFrameRect =
272 LayoutRect(adjustedPaintOffset, frameRect.size()); 272 LayoutRect(adjustedPaintOffset, frameRect.size());
273 273
274 IntRect adjustedClipRect; 274 IntRect adjustedClipRect;
275 BorderPaintingType borderPaintingType = 275 BorderPaintingType borderPaintingType =
276 getBorderPaintType(adjustedFrameRect, adjustedClipRect); 276 getBorderPaintType(adjustedFrameRect, adjustedClipRect);
277 277
278 // Shadow comes first and is behind the background and border. 278 // Shadow comes first and is behind the background and border.
279 if (!m_inlineFlowBox.boxModelObject().boxShadowShouldBeAppliedToBackground( 279 paintBoxShadow(paintInfo, *styleToUse, Normal, adjustedFrameRect);
280 BackgroundBleedNone, &m_inlineFlowBox))
281 paintBoxShadow(paintInfo, *styleToUse, Normal, adjustedFrameRect);
282 280
283 Color backgroundColor = inlineFlowBoxLayoutObject->resolveColor( 281 Color backgroundColor = inlineFlowBoxLayoutObject->resolveColor(
284 *styleToUse, CSSPropertyBackgroundColor); 282 *styleToUse, CSSPropertyBackgroundColor);
285 paintFillLayers(paintInfo, backgroundColor, styleToUse->backgroundLayers(), 283 paintFillLayers(paintInfo, backgroundColor, styleToUse->backgroundLayers(),
286 adjustedFrameRect); 284 adjustedFrameRect);
287 paintBoxShadow(paintInfo, *styleToUse, Inset, adjustedFrameRect); 285 paintBoxShadow(paintInfo, *styleToUse, Inset, adjustedFrameRect);
288 286
289 switch (borderPaintingType) { 287 switch (borderPaintingType) {
290 case DontPaintBorders: 288 case DontPaintBorders:
291 break; 289 break;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 rect.setHeight(logicalHeight); 428 rect.setHeight(logicalHeight);
431 } else { 429 } else {
432 rect.setX(logicalTop); 430 rect.setX(logicalTop);
433 rect.setWidth(logicalHeight); 431 rect.setWidth(logicalHeight);
434 } 432 }
435 } 433 }
436 return rect; 434 return rect;
437 } 435 }
438 436
439 } // namespace blink 437 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698