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

Side by Side Diff: third_party/WebKit/Source/core/paint/BoxPainter.cpp

Issue 1574933002: Changed type of border-width longhands from unsigned to float. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed test rebaselines, will add them to TestExpectations instead Created 4 years, 10 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 unified diff | Download patch
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/BoxPainter.h" 5 #include "core/paint/BoxPainter.h"
6 6
7 #include "core/HTMLNames.h" 7 #include "core/HTMLNames.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/html/HTMLFrameOwnerElement.h" 9 #include "core/html/HTMLFrameOwnerElement.h"
10 #include "core/layout/ImageQualityController.h" 10 #include "core/layout/ImageQualityController.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 -(obj.paddingBottom() + obj.borderBottom()), 353 -(obj.paddingBottom() + obj.borderBottom()),
354 -(obj.paddingLeft() + obj.borderLeft())), 354 -(obj.paddingLeft() + obj.borderLeft())),
355 includeLeftEdge, includeRightEdge); 355 includeLeftEdge, includeRightEdge);
356 } else if (bgLayer.clip() == PaddingFillBox) { 356 } else if (bgLayer.clip() == PaddingFillBox) {
357 border = obj.style()->getRoundedInnerBorderFor(LayoutRect(border.rec t()), includeLeftEdge, includeRightEdge); 357 border = obj.style()->getRoundedInnerBorderFor(LayoutRect(border.rec t()), includeLeftEdge, includeRightEdge);
358 } 358 }
359 359
360 clipToBorder.emplace(obj, paintInfo, rect, border, ApplyToContext); 360 clipToBorder.emplace(obj, paintInfo, rect, border, ApplyToContext);
361 } 361 }
362 362
363 int bLeft = includeLeftEdge ? obj.borderLeft() : 0; 363 int bLeft = includeLeftEdge ? obj.borderLeft().toInt() : 0;
leviw_travelin_and_unemployed 2016/02/02 02:20:18 Floor?
364 int bRight = includeRightEdge ? obj.borderRight() : 0; 364 int bRight = includeRightEdge ? obj.borderRight().toInt() : 0;
365 LayoutUnit pLeft = includeLeftEdge ? obj.paddingLeft() : LayoutUnit(); 365 LayoutUnit pLeft = includeLeftEdge ? obj.paddingLeft() : LayoutUnit();
366 LayoutUnit pRight = includeRightEdge ? obj.paddingRight() : LayoutUnit(); 366 LayoutUnit pRight = includeRightEdge ? obj.paddingRight() : LayoutUnit();
367 367
368 GraphicsContextStateSaver clipWithScrollingStateSaver(context, clippedWithLo calScrolling); 368 GraphicsContextStateSaver clipWithScrollingStateSaver(context, clippedWithLo calScrolling);
369 LayoutRect scrolledPaintRect = rect; 369 LayoutRect scrolledPaintRect = rect;
370 if (clippedWithLocalScrolling) { 370 if (clippedWithLocalScrolling) {
371 // Clip to the overflow area. 371 // Clip to the overflow area.
372 const LayoutBox& thisBox = toLayoutBox(obj); 372 const LayoutBox& thisBox = toLayoutBox(obj);
373 // TODO(chrishtr): this should be pixel-snapped. 373 // TODO(chrishtr): this should be pixel-snapped.
374 context.clip(FloatRect(thisBox.overflowClipRect(rect.location()))); 374 context.clip(FloatRect(thisBox.overflowClipRect(rect.location())));
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 } 691 }
692 } 692 }
693 693
694 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle& style, const Document& document) 694 bool BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle& style, const Document& document)
695 { 695 {
696 return document.printing() && style.printColorAdjust() == PrintColorAdjustEc onomy 696 return document.printing() && style.printColorAdjust() == PrintColorAdjustEc onomy
697 && (!document.settings() || !document.settings()->shouldPrintBackgrounds ()); 697 && (!document.settings() || !document.settings()->shouldPrintBackgrounds ());
698 } 698 }
699 699
700 } // namespace blink 700 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698