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

Side by Side Diff: Source/core/layout/LayoutObject.h

Issue 950623002: Store resolved color in AppliedTextDecoration (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated patch with underline optimization handling Created 5 years, 9 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 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 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) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 23 matching lines...) Expand all
34 #include "core/html/HTMLElement.h" 34 #include "core/html/HTMLElement.h"
35 #include "core/inspector/InspectorTraceEvents.h" 35 #include "core/inspector/InspectorTraceEvents.h"
36 #include "core/layout/HitTestRequest.h" 36 #include "core/layout/HitTestRequest.h"
37 #include "core/layout/LayoutObjectChildList.h" 37 #include "core/layout/LayoutObjectChildList.h"
38 #include "core/layout/PaintInvalidationState.h" 38 #include "core/layout/PaintInvalidationState.h"
39 #include "core/layout/PaintPhase.h" 39 #include "core/layout/PaintPhase.h"
40 #include "core/layout/ScrollAlignment.h" 40 #include "core/layout/ScrollAlignment.h"
41 #include "core/layout/SubtreeLayoutScope.h" 41 #include "core/layout/SubtreeLayoutScope.h"
42 #include "core/layout/compositing/CompositingState.h" 42 #include "core/layout/compositing/CompositingState.h"
43 #include "core/layout/compositing/CompositingTriggers.h" 43 #include "core/layout/compositing/CompositingTriggers.h"
44 #include "core/layout/style/AppliedTextDecoration.h"
44 #include "core/layout/style/LayoutStyle.h" 45 #include "core/layout/style/LayoutStyle.h"
45 #include "core/layout/style/StyleInheritedData.h" 46 #include "core/layout/style/StyleInheritedData.h"
46 #include "platform/geometry/FloatQuad.h" 47 #include "platform/geometry/FloatQuad.h"
47 #include "platform/geometry/LayoutRect.h" 48 #include "platform/geometry/LayoutRect.h"
48 #include "platform/graphics/CompositingReasons.h" 49 #include "platform/graphics/CompositingReasons.h"
49 #include "platform/graphics/PaintInvalidationReason.h" 50 #include "platform/graphics/PaintInvalidationReason.h"
50 #include "platform/graphics/paint/DisplayItemClient.h" 51 #include "platform/graphics/paint/DisplayItemClient.h"
51 #include "platform/transforms/TransformationMatrix.h" 52 #include "platform/transforms/TransformationMatrix.h"
52 53
53 namespace blink { 54 namespace blink {
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 { 828 {
828 return style()->visitedDependentColor(colorProperty); 829 return style()->visitedDependentColor(colorProperty);
829 } 830 }
830 831
831 // Used only by Element::pseudoStyleCacheIsInvalid to get a first line style based off of a 832 // Used only by Element::pseudoStyleCacheIsInvalid to get a first line style based off of a
832 // given new style, without accessing the cache. 833 // given new style, without accessing the cache.
833 PassRefPtr<LayoutStyle> uncachedFirstLineStyle(LayoutStyle*) const; 834 PassRefPtr<LayoutStyle> uncachedFirstLineStyle(LayoutStyle*) const;
834 835
835 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const; 836 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const;
836 837
837 struct AppliedTextDecoration {
838 Color color;
839 TextDecorationStyle style;
840 AppliedTextDecoration() : color(Color::transparent), style(TextDecoratio nStyleSolid) { }
841 };
842
843 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false); 838 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false);
844 839
845 // Return the LayoutBoxModelObject in the container chain which is responsib le for painting this object, or 0 840 // Return the LayoutBoxModelObject in the container chain which is responsib le for painting this object, or 0
846 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation' 841 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation'
847 // methods. 842 // methods.
848 const LayoutBoxModelObject* containerForPaintInvalidation() const; 843 const LayoutBoxModelObject* containerForPaintInvalidation() const;
849 const LayoutBoxModelObject* adjustCompositedContainerForSpecialAncestors(con st LayoutBoxModelObject* paintInvalidationContainer) const; 844 const LayoutBoxModelObject* adjustCompositedContainerForSpecialAncestors(con st LayoutBoxModelObject* paintInvalidationContainer) const;
850 bool isPaintInvalidationContainer() const; 845 bool isPaintInvalidationContainer() const;
851 846
852 LayoutRect computePaintInvalidationRect() 847 LayoutRect computePaintInvalidationRect()
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 void showTree(const blink::LayoutObject*); 1648 void showTree(const blink::LayoutObject*);
1654 void showLineTree(const blink::LayoutObject*); 1649 void showLineTree(const blink::LayoutObject*);
1655 void showLayoutTree(const blink::LayoutObject* object1); 1650 void showLayoutTree(const blink::LayoutObject* object1);
1656 // We don't make object2 an optional parameter so that showLayoutTree 1651 // We don't make object2 an optional parameter so that showLayoutTree
1657 // can be called from gdb easily. 1652 // can be called from gdb easily.
1658 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 1653 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
1659 1654
1660 #endif 1655 #endif
1661 1656
1662 #endif // LayoutObject_h 1657 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698