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

Side by Side Diff: third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp

Issue 1846753004: Fix wrong box-shadow visual overflow with flipped blocks writing mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/layout/PaintInvalidationState.h" 5 #include "core/layout/PaintInvalidationState.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/layout/LayoutInline.h" 9 #include "core/layout/LayoutInline.h"
10 #include "core/layout/LayoutPart.h" 10 #include "core/layout/LayoutPart.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 rect = SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(m_curre ntObject, m_paintInvalidationContainer); 279 rect = SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(m_curre ntObject, m_paintInvalidationContainer);
280 } 280 }
281 281
282 if (m_paintInvalidationContainer.layer()->groupedMapping()) 282 if (m_paintInvalidationContainer.layer()->groupedMapping())
283 PaintLayer::mapRectInPaintInvalidationContainerToBacking(m_paintInvalida tionContainer, rect); 283 PaintLayer::mapRectInPaintInvalidationContainerToBacking(m_paintInvalida tionContainer, rect);
284 return rect; 284 return rect;
285 } 285 }
286 286
287 static void slowMapToVisualRectInAncestorSpace(const LayoutObject& object, const LayoutBoxModelObject& ancestor, LayoutRect& rect) 287 static void slowMapToVisualRectInAncestorSpace(const LayoutObject& object, const LayoutBoxModelObject& ancestor, LayoutRect& rect)
288 { 288 {
289 // TODO(crbug.com/597965): LayoutBox::mapToVisualRectInAncestorSpace() incor rectly flips a rect
290 // in its own space for writing mode. Here flip to workaround the flip.
291 if (object.isBox() && (toLayoutBox(object).isWritingModeRoot() || (ancestor == object && object.styleRef().isFlippedBlocksWritingMode())))
292 toLayoutBox(object).flipForWritingMode(rect);
293
294 if (object.isLayoutView()) { 289 if (object.isLayoutView()) {
295 toLayoutView(object).mapToVisualRectInAncestorSpace(&ancestor, rect, Inp utIsInFrameCoordinates, DefaultVisualRectFlags); 290 toLayoutView(object).mapToVisualRectInAncestorSpace(&ancestor, rect, Inp utIsInFrameCoordinates, DefaultVisualRectFlags);
296 } else if (object.isSVGRoot()) { 291 } else if (object.isSVGRoot()) {
297 // TODO(crbug.com/597813): This is to avoid the extra clip applied in La youtSVGRoot::mapVisibleRectInAncestorSpace(). 292 // TODO(crbug.com/597813): This is to avoid the extra clip applied in La youtSVGRoot::mapVisibleRectInAncestorSpace().
298 toLayoutSVGRoot(object).LayoutReplaced::mapToVisualRectInAncestorSpace(& ancestor, rect); 293 toLayoutSVGRoot(object).LayoutReplaced::mapToVisualRectInAncestorSpace(& ancestor, rect);
299 } else { 294 } else {
300 object.mapToVisualRectInAncestorSpace(&ancestor, rect); 295 object.mapToVisualRectInAncestorSpace(&ancestor, rect);
301 } 296 }
302 } 297 }
303 298
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 341
347 PaintLayer& PaintInvalidationState::enclosingSelfPaintingLayer(const LayoutObjec t& layoutObject) const 342 PaintLayer& PaintInvalidationState::enclosingSelfPaintingLayer(const LayoutObjec t& layoutObject) const
348 { 343 {
349 if (layoutObject.hasLayer() && toLayoutBoxModelObject(layoutObject).hasSelfP aintingLayer()) 344 if (layoutObject.hasLayer() && toLayoutBoxModelObject(layoutObject).hasSelfP aintingLayer())
350 return *toLayoutBoxModelObject(layoutObject).layer(); 345 return *toLayoutBoxModelObject(layoutObject).layer();
351 346
352 return m_enclosingSelfPaintingLayer; 347 return m_enclosingSelfPaintingLayer;
353 } 348 }
354 349
355 } // namespace blink 350 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698