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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayerPainter.cpp

Issue 1224933002: Combine outline and focus ring code paths (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix empty focus ring on Mac Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/BlockPainter.cpp ('k') | Source/core/paint/ImagePainter.cpp » ('j') | 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 "config.h" 5 #include "config.h"
6 #include "core/paint/DeprecatedPaintLayerPainter.h" 6 #include "core/paint/DeprecatedPaintLayerPainter.h"
7 7
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/layout/ClipPathOperation.h" 9 #include "core/layout/ClipPathOperation.h"
10 #include "core/layout/LayoutBlock.h" 10 #include "core/layout/LayoutBlock.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 clippingRule = LayerClipRecorder::DoNotIncludeSelfForBorderRadius; 493 clippingRule = LayerClipRecorder::DoNotIncludeSelfForBorderRadius;
494 break; 494 break;
495 default: 495 default:
496 clippingRule = LayerClipRecorder::IncludeSelfForBorderRadius; 496 clippingRule = LayerClipRecorder::IncludeSelfForBorderRadius;
497 break; 497 break;
498 } 498 }
499 499
500 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), clipType, c lipRect, &paintingInfo, fragment.paginationOffset, paintFlags, clippingRule); 500 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), clipType, c lipRect, &paintingInfo, fragment.paginationOffset, paintFlags, clippingRule);
501 } 501 }
502 502
503 PaintInfo paintInfo(context, pixelSnappedIntRect(clipRect.rect()), phase, pa intingInfo.globalPaintFlags(), paintFlags, paintingRootForLayoutObject, 0, paint ingInfo.rootLayer->layoutObject()); 503 PaintInfo paintInfo(context, pixelSnappedIntRect(clipRect.rect()), phase, pa intingInfo.globalPaintFlags(), paintFlags, paintingRootForLayoutObject, painting Info.rootLayer->layoutObject());
504 Optional<ScrollRecorder> scrollRecorder; 504 Optional<ScrollRecorder> scrollRecorder;
505 LayoutPoint paintOffset = toPoint(fragment.layerBounds.location() - m_paintL ayer.layoutBoxLocation()); 505 LayoutPoint paintOffset = toPoint(fragment.layerBounds.location() - m_paintL ayer.layoutBoxLocation());
506 if (!paintingInfo.scrollOffsetAccumulation.isZero()) { 506 if (!paintingInfo.scrollOffsetAccumulation.isZero()) {
507 // As a descendant of the root layer, m_paintLayer's painting is not con trolled by the ScrollRecorders 507 // As a descendant of the root layer, m_paintLayer's painting is not con trolled by the ScrollRecorders
508 // created by BlockPainter of the ancestor layers up to the root layer, so we need to issue ScrollRecorder 508 // created by BlockPainter of the ancestor layers up to the root layer, so we need to issue ScrollRecorder
509 // for this layer seperately, with the scroll offset accumulated from th e root layer to the parent of this 509 // for this layer seperately, with the scroll offset accumulated from th e root layer to the parent of this
510 // layer, to get the same result as ScrollRecorder in BlockPainter. 510 // layer, to get the same result as ScrollRecorder in BlockPainter.
511 paintOffset += paintingInfo.scrollOffsetAccumulation; 511 paintOffset += paintingInfo.scrollOffsetAccumulation;
512 paintInfo.rect.move(paintingInfo.scrollOffsetAccumulation); 512 paintInfo.rect.move(paintingInfo.scrollOffsetAccumulation);
513 scrollRecorder.emplace(*paintInfo.context, *m_paintLayer.layoutObject(), paintInfo.phase, paintingInfo.scrollOffsetAccumulation); 513 scrollRecorder.emplace(*paintInfo.context, *m_paintLayer.layoutObject(), paintInfo.phase, paintingInfo.scrollOffsetAccumulation);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 if (!m_paintLayer.containsDirtyOverlayScrollbars()) 610 if (!m_paintLayer.containsDirtyOverlayScrollbars())
611 return; 611 return;
612 612
613 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot); 613 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(encl osingIntRect(damageRect)), paintFlags, LayoutSize(), paintingRoot);
614 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 614 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
615 615
616 m_paintLayer.setContainsDirtyOverlayScrollbars(false); 616 m_paintLayer.setContainsDirtyOverlayScrollbars(false);
617 } 617 }
618 618
619 } // namespace blink 619 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/BlockPainter.cpp ('k') | Source/core/paint/ImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698