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

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

Issue 1458733002: Fix CSS outline property in flipped blocks Writing Mode (vertical-rl) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: !isBox() Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 2228
2229 FloatPoint LayoutObject::localToContainerPoint(const FloatPoint& localPoint, con st LayoutBoxModelObject* paintInvalidationContainer, MapCoordinatesFlags mode, b ool* wasFixed, const PaintInvalidationState* paintInvalidationState) const 2229 FloatPoint LayoutObject::localToContainerPoint(const FloatPoint& localPoint, con st LayoutBoxModelObject* paintInvalidationContainer, MapCoordinatesFlags mode, b ool* wasFixed, const PaintInvalidationState* paintInvalidationState) const
2230 { 2230 {
2231 TransformState transformState(TransformState::ApplyTransformDirection, local Point); 2231 TransformState transformState(TransformState::ApplyTransformDirection, local Point);
2232 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply ContainerFlip | UseTransforms, wasFixed, paintInvalidationState); 2232 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply ContainerFlip | UseTransforms, wasFixed, paintInvalidationState);
2233 transformState.flatten(); 2233 transformState.flatten();
2234 2234
2235 return transformState.lastPlanarPoint(); 2235 return transformState.lastPlanarPoint();
2236 } 2236 }
2237 2237
2238 void LayoutObject::localToContainerRects(Vector<LayoutRect>& rects, const Layout BoxModelObject* paintInvalidationContainer, const LayoutPoint& preOffset, const LayoutPoint& postOffset) const
2239 {
2240 for (size_t i = 0; i < rects.size(); ++i) {
2241 LayoutRect& rect = rects[i];
2242 rect.moveBy(preOffset);
2243 FloatQuad containerQuad = localToContainerQuad(FloatQuad(FloatRect(rect) ), paintInvalidationContainer);
2244 LayoutRect containerRect = LayoutRect(containerQuad.boundingBox());
2245 if (containerRect.isEmpty()) {
2246 rects.remove(i--);
2247 continue;
2248 }
2249 containerRect.moveBy(postOffset);
2250 rects[i] = containerRect;
2251 }
2252 }
2253
2238 FloatPoint LayoutObject::localToInvalidationBackingPoint(const LayoutPoint& loca lPoint, PaintLayer** backingLayer) 2254 FloatPoint LayoutObject::localToInvalidationBackingPoint(const LayoutPoint& loca lPoint, PaintLayer** backingLayer)
2239 { 2255 {
2240 const LayoutBoxModelObject& paintInvalidationContainer = containerForPaintIn validationOnRootedTree(); 2256 const LayoutBoxModelObject& paintInvalidationContainer = containerForPaintIn validationOnRootedTree();
2241 ASSERT(paintInvalidationContainer.layer()); 2257 ASSERT(paintInvalidationContainer.layer());
2242 2258
2243 if (backingLayer) 2259 if (backingLayer)
2244 *backingLayer = paintInvalidationContainer.layer(); 2260 *backingLayer = paintInvalidationContainer.layer();
2245 FloatPoint containerPoint = localToContainerPoint(FloatPoint(localPoint), &p aintInvalidationContainer, TraverseDocumentBoundaries); 2261 FloatPoint containerPoint = localToContainerPoint(FloatPoint(localPoint), &p aintInvalidationContainer, TraverseDocumentBoundaries);
2246 2262
2247 // A layoutObject can have no invalidation backing if it is from a detached frame, 2263 // A layoutObject can have no invalidation backing if it is from a detached frame,
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
3488 const blink::LayoutObject* root = object1; 3504 const blink::LayoutObject* root = object1;
3489 while (root->parent()) 3505 while (root->parent())
3490 root = root->parent(); 3506 root = root->parent();
3491 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3507 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3492 } else { 3508 } else {
3493 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3509 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3494 } 3510 }
3495 } 3511 }
3496 3512
3497 #endif 3513 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/paint/ObjectPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698