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

Side by Side Diff: Source/core/paint/InlineTextBoxPainter.cpp

Issue 1156143002: *** NOT FOR LANDING *** Text nodes should only inherit inheritable properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Some tests need to be rebaselined. Text nodes can no longer have z-index. Created 5 years, 6 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 | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 #include "core/paint/InlineTextBoxPainter.h" 6 #include "core/paint/InlineTextBoxPainter.h"
7 7
8 #include "core/dom/DocumentMarkerController.h" 8 #include "core/dom/DocumentMarkerController.h"
9 #include "core/dom/RenderedDocumentMarker.h" 9 #include "core/dom/RenderedDocumentMarker.h"
10 #include "core/editing/CompositionUnderline.h" 10 #include "core/editing/CompositionUnderline.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 GraphicsContext* context = paintInfo.context; 114 GraphicsContext* context = paintInfo.context;
115 const ComputedStyle& styleToUse = m_inlineTextBox.layoutObject().styleRef(m_ inlineTextBox.isFirstLineStyle()); 115 const ComputedStyle& styleToUse = m_inlineTextBox.layoutObject().styleRef(m_ inlineTextBox.isFirstLineStyle());
116 116
117 FloatPoint boxOrigin = m_inlineTextBox.locationIncludingFlipping().toFloatPo int(); 117 FloatPoint boxOrigin = m_inlineTextBox.locationIncludingFlipping().toFloatPo int();
118 boxOrigin.move(adjustedPaintOffset.x().toFloat(), adjustedPaintOffset.y().to Float()); 118 boxOrigin.move(adjustedPaintOffset.x().toFloat(), adjustedPaintOffset.y().to Float());
119 FloatRect boxRect(boxOrigin, FloatSize(m_inlineTextBox.logicalWidth(), m_inl ineTextBox.logicalHeight())); 119 FloatRect boxRect(boxOrigin, FloatSize(m_inlineTextBox.logicalWidth(), m_inl ineTextBox.logicalHeight()));
120 120
121 bool shouldRotate = false; 121 bool shouldRotate = false;
122 LayoutTextCombine* combinedText = nullptr; 122 LayoutTextCombine* combinedText = nullptr;
123 if (!m_inlineTextBox.isHorizontal()) { 123 if (!m_inlineTextBox.isHorizontal()) {
124 if (styleToUse.hasTextCombine() && m_inlineTextBox.layoutObject().isComb ineText()) { 124 if (m_inlineTextBox.layoutObject().isCombineText()) {
125 combinedText = &toLayoutTextCombine(m_inlineTextBox.layoutObject()); 125 combinedText = &toLayoutTextCombine(m_inlineTextBox.layoutObject());
126 if (!combinedText->isCombined()) 126 if (!combinedText->isCombined())
127 combinedText = nullptr; 127 combinedText = nullptr;
128 } 128 }
129 if (combinedText) { 129 if (combinedText) {
130 combinedText->updateFont(); 130 combinedText->updateFont();
131 boxRect.setWidth(combinedText->inlineWidthForLayout()); 131 boxRect.setWidth(combinedText->inlineWidthForLayout());
132 } else { 132 } else {
133 shouldRotate = true; 133 shouldRotate = true;
134 context->concatCTM(TextPainter::rotation(boxRect, TextPainter::Clock wise)); 134 context->concatCTM(TextPainter::rotation(boxRect, TextPainter::Clock wise));
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 LayoutTheme::theme().platformActiveTextSearchHighlightColor() : 809 LayoutTheme::theme().platformActiveTextSearchHighlightColor() :
810 LayoutTheme::theme().platformInactiveTextSearchHighlightColor(); 810 LayoutTheme::theme().platformInactiveTextSearchHighlightColor();
811 GraphicsContextStateSaver stateSaver(*pt); 811 GraphicsContextStateSaver stateSaver(*pt);
812 pt->clip(FloatRect(boxOrigin.x(), boxOrigin.y() - deltaY, m_inlineTextBo x.logicalWidth(), selHeight)); 812 pt->clip(FloatRect(boxOrigin.x(), boxOrigin.y() - deltaY, m_inlineTextBo x.logicalWidth(), selHeight));
813 pt->drawHighlightForText(font, run, FloatPoint(boxOrigin.x(), boxOrigin. y() - deltaY), selHeight, color, sPos, ePos); 813 pt->drawHighlightForText(font, run, FloatPoint(boxOrigin.x(), boxOrigin. y() - deltaY), selHeight, color, sPos, ePos);
814 } 814 }
815 } 815 }
816 816
817 817
818 } // namespace blink 818 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698