| 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 21 matching lines...) Expand all Loading... |
| 32 #include "sky/engine/core/dom/ElementTraversal.h" | 32 #include "sky/engine/core/dom/ElementTraversal.h" |
| 33 #include "sky/engine/core/dom/StyleEngine.h" | 33 #include "sky/engine/core/dom/StyleEngine.h" |
| 34 #include "sky/engine/core/dom/shadow/ShadowRoot.h" | 34 #include "sky/engine/core/dom/shadow/ShadowRoot.h" |
| 35 #include "sky/engine/core/editing/EditingBoundary.h" | 35 #include "sky/engine/core/editing/EditingBoundary.h" |
| 36 #include "sky/engine/core/editing/FrameSelection.h" | 36 #include "sky/engine/core/editing/FrameSelection.h" |
| 37 #include "sky/engine/core/editing/htmlediting.h" | 37 #include "sky/engine/core/editing/htmlediting.h" |
| 38 #include "sky/engine/core/fetch/ResourceLoader.h" | 38 #include "sky/engine/core/fetch/ResourceLoader.h" |
| 39 #include "sky/engine/core/frame/FrameView.h" | 39 #include "sky/engine/core/frame/FrameView.h" |
| 40 #include "sky/engine/core/frame/LocalFrame.h" | 40 #include "sky/engine/core/frame/LocalFrame.h" |
| 41 #include "sky/engine/core/frame/Settings.h" | 41 #include "sky/engine/core/frame/Settings.h" |
| 42 #include "sky/engine/core/html/HTMLAnchorElement.h" | |
| 43 #include "sky/engine/core/html/HTMLElement.h" | 42 #include "sky/engine/core/html/HTMLElement.h" |
| 44 #include "sky/engine/core/page/EventHandler.h" | 43 #include "sky/engine/core/page/EventHandler.h" |
| 45 #include "sky/engine/core/page/Page.h" | 44 #include "sky/engine/core/page/Page.h" |
| 46 #include "sky/engine/core/rendering/HitTestResult.h" | 45 #include "sky/engine/core/rendering/HitTestResult.h" |
| 47 #include "sky/engine/core/rendering/RenderFlexibleBox.h" | 46 #include "sky/engine/core/rendering/RenderFlexibleBox.h" |
| 48 #include "sky/engine/core/rendering/RenderGeometryMap.h" | 47 #include "sky/engine/core/rendering/RenderGeometryMap.h" |
| 49 #include "sky/engine/core/rendering/RenderImage.h" | 48 #include "sky/engine/core/rendering/RenderImage.h" |
| 50 #include "sky/engine/core/rendering/RenderImageResourceStyleImage.h" | 49 #include "sky/engine/core/rendering/RenderImageResourceStyleImage.h" |
| 51 #include "sky/engine/core/rendering/RenderInline.h" | 50 #include "sky/engine/core/rendering/RenderInline.h" |
| 52 #include "sky/engine/core/rendering/RenderLayer.h" | 51 #include "sky/engine/core/rendering/RenderLayer.h" |
| (...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1466 const RenderObject* object = this; | 1465 const RenderObject* object = this; |
| 1467 while (object->parent() && !object->hasLayer()) | 1466 while (object->parent() && !object->hasLayer()) |
| 1468 object = object->parent(); | 1467 object = object->parent(); |
| 1469 if (object->hasLayer()) | 1468 if (object->hasLayer()) |
| 1470 return toRenderBox(object)->layer()->root()->isRootLayer(); | 1469 return toRenderBox(object)->layer()->root()->isRootLayer(); |
| 1471 return false; | 1470 return false; |
| 1472 } | 1471 } |
| 1473 | 1472 |
| 1474 RespectImageOrientationEnum RenderObject::shouldRespectImageOrientation() const | 1473 RespectImageOrientationEnum RenderObject::shouldRespectImageOrientation() const |
| 1475 { | 1474 { |
| 1476 // Respect the image's orientation if it's being used as a full-page image o
r it's | 1475 return DoNotRespectImageOrientation; |
| 1477 // an <img> and the setting to respect it everywhere is set. | |
| 1478 return (document().settings() && document().settings()->shouldRespectImageOr
ientation() && isHTMLImageElement(node())) ? RespectImageOrientation : DoNotResp
ectImageOrientation; | |
| 1479 } | 1476 } |
| 1480 | 1477 |
| 1481 bool RenderObject::hasEntirelyFixedBackground() const | 1478 bool RenderObject::hasEntirelyFixedBackground() const |
| 1482 { | 1479 { |
| 1483 return m_style->hasEntirelyFixedBackground(); | 1480 return m_style->hasEntirelyFixedBackground(); |
| 1484 } | 1481 } |
| 1485 | 1482 |
| 1486 RenderObject* RenderObject::container(const RenderBox* paintInvalidationContaine
r, bool* paintInvalidationContainerSkipped) const | 1483 RenderObject* RenderObject::container(const RenderBox* paintInvalidationContaine
r, bool* paintInvalidationContainerSkipped) const |
| 1487 { | 1484 { |
| 1488 if (paintInvalidationContainerSkipped) | 1485 if (paintInvalidationContainerSkipped) |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1698 overline.color = resultColor; | 1695 overline.color = resultColor; |
| 1699 overline.style = resultStyle; | 1696 overline.style = resultStyle; |
| 1700 } | 1697 } |
| 1701 if (currDecs & TextDecorationLineThrough) { | 1698 if (currDecs & TextDecorationLineThrough) { |
| 1702 decorations &= ~TextDecorationLineThrough; | 1699 decorations &= ~TextDecorationLineThrough; |
| 1703 linethrough.color = resultColor; | 1700 linethrough.color = resultColor; |
| 1704 linethrough.style = resultStyle; | 1701 linethrough.style = resultStyle; |
| 1705 } | 1702 } |
| 1706 } | 1703 } |
| 1707 curr = curr->parent(); | 1704 curr = curr->parent(); |
| 1708 } while (curr && decorations && (!quirksMode || !curr->node() || (!isHTMLAnc
horElement(*curr->node())))); | 1705 } while (curr && decorations); |
| 1709 | 1706 |
| 1710 // If we bailed out, use the element we bailed out at (typically a <font> or
<a> element). | 1707 // If we bailed out, use the element we bailed out at (typically a <font> or
<a> element). |
| 1711 if (decorations && curr) { | 1708 if (decorations && curr) { |
| 1712 styleToUse = curr->style(firstlineStyle); | 1709 styleToUse = curr->style(firstlineStyle); |
| 1713 resultColor = styleToUse->decorationColor(); | 1710 resultColor = styleToUse->decorationColor(); |
| 1714 if (decorations & TextDecorationUnderline) { | 1711 if (decorations & TextDecorationUnderline) { |
| 1715 underline.color = resultColor; | 1712 underline.color = resultColor; |
| 1716 underline.style = resultStyle; | 1713 underline.style = resultStyle; |
| 1717 } | 1714 } |
| 1718 if (decorations & TextDecorationOverline) { | 1715 if (decorations & TextDecorationOverline) { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1904 { | 1901 { |
| 1905 if (object1) { | 1902 if (object1) { |
| 1906 const blink::RenderObject* root = object1; | 1903 const blink::RenderObject* root = object1; |
| 1907 while (root->parent()) | 1904 while (root->parent()) |
| 1908 root = root->parent(); | 1905 root = root->parent(); |
| 1909 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 1906 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 1910 } | 1907 } |
| 1911 } | 1908 } |
| 1912 | 1909 |
| 1913 #endif | 1910 #endif |
| OLD | NEW |