| OLD | NEW |
| 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 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2392 bool LayoutObject::isRooted() const | 2392 bool LayoutObject::isRooted() const |
| 2393 { | 2393 { |
| 2394 const LayoutObject* object = this; | 2394 const LayoutObject* object = this; |
| 2395 while (object->parent() && !object->hasLayer()) | 2395 while (object->parent() && !object->hasLayer()) |
| 2396 object = object->parent(); | 2396 object = object->parent(); |
| 2397 if (object->hasLayer()) | 2397 if (object->hasLayer()) |
| 2398 return toLayoutBoxModelObject(object)->layer()->root()->isRootLayer(); | 2398 return toLayoutBoxModelObject(object)->layer()->root()->isRootLayer(); |
| 2399 return false; | 2399 return false; |
| 2400 } | 2400 } |
| 2401 | 2401 |
| 2402 RespectImageOrientationEnum LayoutObject::shouldRespectImageOrientation() const | 2402 RespectImageOrientationEnum LayoutObject::shouldRespectImageOrientation(const La
youtObject* layoutObject) |
| 2403 { | 2403 { |
| 2404 if (!layoutObject) |
| 2405 return DoNotRespectImageOrientation; |
| 2406 |
| 2404 // Respect the image's orientation if it's being used as a full-page image o
r | 2407 // Respect the image's orientation if it's being used as a full-page image o
r |
| 2405 // it's an <img> and the setting to respect it everywhere is set or the <img
> | 2408 // it's an <img> and the setting to respect it everywhere is set or the <img
> |
| 2406 // has image-orientation: from-image style. FIXME: crbug.com/498233 | 2409 // has image-orientation: from-image style. FIXME: crbug.com/498233 |
| 2407 if (document().isImageDocument()) | 2410 if (layoutObject->document().isImageDocument()) |
| 2408 return RespectImageOrientation; | 2411 return RespectImageOrientation; |
| 2409 | 2412 |
| 2410 if (!isHTMLImageElement(node())) | 2413 if (!isHTMLImageElement(layoutObject->node())) |
| 2411 return DoNotRespectImageOrientation; | 2414 return DoNotRespectImageOrientation; |
| 2412 | 2415 |
| 2413 if (document().settings() && document().settings()->shouldRespectImageOrient
ation()) | 2416 if (layoutObject->document().settings() && layoutObject->document().settings
()->shouldRespectImageOrientation()) |
| 2414 return RespectImageOrientation; | 2417 return RespectImageOrientation; |
| 2415 | 2418 |
| 2416 if (style() && style()->respectImageOrientation() == RespectImageOrientation
) | 2419 if (layoutObject->style() && layoutObject->style()->respectImageOrientation(
) == RespectImageOrientation) |
| 2417 return RespectImageOrientation; | 2420 return RespectImageOrientation; |
| 2418 | 2421 |
| 2419 return DoNotRespectImageOrientation; | 2422 return DoNotRespectImageOrientation; |
| 2420 } | 2423 } |
| 2421 | 2424 |
| 2422 LayoutObject* LayoutObject::container(const LayoutBoxModelObject* paintInvalidat
ionContainer, bool* paintInvalidationContainerSkipped) const | 2425 LayoutObject* LayoutObject::container(const LayoutBoxModelObject* paintInvalidat
ionContainer, bool* paintInvalidationContainerSkipped) const |
| 2423 { | 2426 { |
| 2424 if (paintInvalidationContainerSkipped) | 2427 if (paintInvalidationContainerSkipped) |
| 2425 *paintInvalidationContainerSkipped = false; | 2428 *paintInvalidationContainerSkipped = false; |
| 2426 | 2429 |
| (...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3500 const blink::LayoutObject* root = object1; | 3503 const blink::LayoutObject* root = object1; |
| 3501 while (root->parent()) | 3504 while (root->parent()) |
| 3502 root = root->parent(); | 3505 root = root->parent(); |
| 3503 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3506 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3504 } else { | 3507 } else { |
| 3505 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3508 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3506 } | 3509 } |
| 3507 } | 3510 } |
| 3508 | 3511 |
| 3509 #endif | 3512 #endif |
| OLD | NEW |