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

Side by Side Diff: third_party/WebKit/Source/core/paint/InlinePainter.cpp

Issue 1592493002: Fix links in inline continuations in printed PDF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 // 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 "core/paint/InlinePainter.h" 5 #include "core/paint/InlinePainter.h"
6 6
7 #include "core/layout/LayoutBlock.h" 7 #include "core/layout/LayoutBlock.h"
8 #include "core/layout/LayoutInline.h" 8 #include "core/layout/LayoutInline.h"
9 #include "core/layout/LayoutTheme.h" 9 #include "core/layout/LayoutTheme.h"
10 #include "core/layout/line/RootInlineBox.h" 10 #include "core/layout/line/RootInlineBox.h"
(...skipping 13 matching lines...) Expand all
24 if (m_layoutInline.paintOffsetChanged(paintOffset)) { 24 if (m_layoutInline.paintOffsetChanged(paintOffset)) {
25 paintInfo.context.paintController().invalidatePaintOffset(m_layoutIn line); 25 paintInfo.context.paintController().invalidatePaintOffset(m_layoutIn line);
26 LineBoxListPainter(*m_layoutInline.lineBoxes()).invalidateLineBoxPai ntOffsets(paintInfo); 26 LineBoxListPainter(*m_layoutInline.lineBoxes()).invalidateLineBoxPai ntOffsets(paintInfo);
27 } 27 }
28 // Set previousPaintOffset here in case that m_layoutInline paints nothi ng and no 28 // Set previousPaintOffset here in case that m_layoutInline paints nothi ng and no
29 // LayoutObjectDrawingRecorder updates its previousPaintOffset. 29 // LayoutObjectDrawingRecorder updates its previousPaintOffset.
30 // TODO(wangxianzhu): Integrate paint offset checking into new paint inv alidation. 30 // TODO(wangxianzhu): Integrate paint offset checking into new paint inv alidation.
31 m_layoutInline.mutableForPainting().setPreviousPaintOffset(paintOffset); 31 m_layoutInline.mutableForPainting().setPreviousPaintOffset(paintOffset);
32 } 32 }
33 33
34 // FIXME: When Skia supports annotation rect covering (https://code.google.c om/p/skia/issues/detail?id=3872),
chrishtr 2016/01/15 02:20:02 Why are these comments now obsolete?
Xianzhu 2016/01/15 05:06:44 The bug has been marked WontFix because unfeasibli
35 // this rect may be covered by foreground and descendant drawings. Then we m ay need a dedicated paint phase.
36 if (paintInfo.phase == PaintPhaseForeground && paintInfo.isPrinting()) 34 if (paintInfo.phase == PaintPhaseForeground && paintInfo.isPrinting())
37 ObjectPainter(m_layoutInline).addPDFURLRectIfNeeded(paintInfo, paintOffs et); 35 ObjectPainter(m_layoutInline).addPDFURLRectIfNeeded(paintInfo, paintOffs et);
38 36
39 if (paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSel fOutline || paintInfo.phase == PaintPhaseDescendantOutlines) { 37 if (paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSel fOutline || paintInfo.phase == PaintPhaseDescendantOutlines) {
40 ObjectPainter painter(m_layoutInline); 38 ObjectPainter painter(m_layoutInline);
41 if (paintInfo.phase != PaintPhaseSelfOutline) 39 if (paintInfo.phase != PaintPhaseSelfOutline)
42 painter.paintInlineChildrenOutlines(paintInfo, paintOffset); 40 painter.paintInlineChildrenOutlines(paintInfo, paintOffset);
43 if (paintInfo.phase != PaintPhaseDescendantOutlines && !m_layoutInline.i sElementContinuation()) 41 if (paintInfo.phase != PaintPhaseDescendantOutlines && !m_layoutInline.i sElementContinuation())
44 painter.paintOutline(paintInfo, paintOffset); 42 painter.paintOutline(paintInfo, paintOffset);
45 return; 43 return;
46 } 44 }
47 45
48 LineBoxListPainter(*m_layoutInline.lineBoxes()).paint(m_layoutInline, paintI nfo, paintOffset); 46 LineBoxListPainter(*m_layoutInline.lineBoxes()).paint(m_layoutInline, paintI nfo, paintOffset);
49 } 47 }
50 48
51 } // namespace blink 49 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698