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

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

Issue 1334703002: NOT FOR LANDING Pass URL to Image::draw (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/core/paint/ImagePainter.cpp ('k') | Source/core/paint/MediaControlsPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ListMarkerPainter.h" 6 #include "core/paint/ListMarkerPainter.h"
7 7
8 #include "core/layout/LayoutListItem.h" 8 #include "core/layout/LayoutListItem.h"
9 #include "core/layout/LayoutListMarker.h" 9 #include "core/layout/LayoutListMarker.h"
10 #include "core/layout/TextRunConstructor.h" 10 #include "core/layout/TextRunConstructor.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutListMarker, paintInfo.phase, pixelSnappedOverflowRect, paintOffset); 42 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutListMarker, paintInfo.phase, pixelSnappedOverflowRect, paintOffset);
43 43
44 LayoutRect box(boxOrigin, m_layoutListMarker.size()); 44 LayoutRect box(boxOrigin, m_layoutListMarker.size());
45 45
46 IntRect marker = m_layoutListMarker.getRelativeMarkerRect(); 46 IntRect marker = m_layoutListMarker.getRelativeMarkerRect();
47 marker.moveBy(roundedIntPoint(boxOrigin)); 47 marker.moveBy(roundedIntPoint(boxOrigin));
48 48
49 GraphicsContext* context = paintInfo.context; 49 GraphicsContext* context = paintInfo.context;
50 50
51 if (m_layoutListMarker.isImage()) { 51 if (m_layoutListMarker.isImage()) {
52 context->drawImage(m_layoutListMarker.image()->image(&m_layoutListMarker , marker.size()).get(), marker); 52 context->drawImage(m_layoutListMarker.image()->image(&m_layoutListMarker , marker.size()).get(), marker, KURL()); // TODO(davve): empty url
53 if (m_layoutListMarker.selectionState() != SelectionNone) { 53 if (m_layoutListMarker.selectionState() != SelectionNone) {
54 LayoutRect selRect = m_layoutListMarker.localSelectionRect(); 54 LayoutRect selRect = m_layoutListMarker.localSelectionRect();
55 selRect.moveBy(boxOrigin); 55 selRect.moveBy(boxOrigin);
56 context->fillRect(pixelSnappedIntRect(selRect), m_layoutListMarker.l istItem()->selectionBackgroundColor()); 56 context->fillRect(pixelSnappedIntRect(selRect), m_layoutListMarker.l istItem()->selectionBackgroundColor());
57 } 57 }
58 return; 58 return;
59 } 59 }
60 60
61 if (m_layoutListMarker.selectionState() != SelectionNone) { 61 if (m_layoutListMarker.selectionState() != SelectionNone) {
62 LayoutRect selRect = m_layoutListMarker.localSelectionRect(); 62 LayoutRect selRect = m_layoutListMarker.localSelectionRect();
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if (m_layoutListMarker.style()->isLeftToRightDirection()) { 183 if (m_layoutListMarker.style()->isLeftToRightDirection()) {
184 context->drawText(font, textRunPaintInfo, textOrigin); 184 context->drawText(font, textRunPaintInfo, textOrigin);
185 context->drawText(font, suffixRunInfo, textOrigin + IntSize(font.width(t extRun), 0)); 185 context->drawText(font, suffixRunInfo, textOrigin + IntSize(font.width(t extRun), 0));
186 } else { 186 } else {
187 context->drawText(font, suffixRunInfo, textOrigin); 187 context->drawText(font, suffixRunInfo, textOrigin);
188 context->drawText(font, textRunPaintInfo, textOrigin + IntSize(font.widt h(suffixRun), 0)); 188 context->drawText(font, textRunPaintInfo, textOrigin + IntSize(font.widt h(suffixRun), 0));
189 } 189 }
190 } 190 }
191 191
192 } // namespace blink 192 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/ImagePainter.cpp ('k') | Source/core/paint/MediaControlsPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698