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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutInline.h

Issue 2883083004: Only adjust composited pagination position to account for lines offset of inlines. (Closed)
Patch Set: none Created 3 years, 7 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) 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 bool HitTestCulledInline(HitTestResult&, 214 bool HitTestCulledInline(HitTestResult&,
215 const HitTestLocation& location_in_container, 215 const HitTestLocation& location_in_container,
216 const LayoutPoint& accumulated_offset); 216 const LayoutPoint& accumulated_offset);
217 217
218 LayoutPoint FirstLineBoxTopLeft() const; 218 LayoutPoint FirstLineBoxTopLeft() const;
219 219
220 const char* GetName() const override { return "LayoutInline"; } 220 const char* GetName() const override { return "LayoutInline"; }
221 221
222 LayoutRect DebugRect() const override; 222 LayoutRect DebugRect() const override;
223 223
224 // For visualOverflowRect() only, to get bounding box of visual overflow of
225 // line boxes. This is public only for a hack in CompositedLayerMapping.
226 LayoutRect LinesVisualOverflowBoundingBox() const;
227
224 protected: 228 protected:
225 void WillBeDestroyed() override; 229 void WillBeDestroyed() override;
226 230
227 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; 231 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override;
228 232
229 void ComputeSelfHitTestRects(Vector<LayoutRect>& rects, 233 void ComputeSelfHitTestRects(Vector<LayoutRect>& rects,
230 const LayoutPoint& layer_offset) const override; 234 const LayoutPoint& layer_offset) const override;
231 235
232 void InvalidateDisplayItemClients(PaintInvalidationReason) const override; 236 void InvalidateDisplayItemClients(PaintInvalidationReason) const override;
233 237
234 void AbsoluteQuadsForSelf(Vector<FloatQuad>& quads, 238 void AbsoluteQuadsForSelf(Vector<FloatQuad>& quads,
235 MapCoordinatesFlags mode = 0) const override; 239 MapCoordinatesFlags mode = 0) const override;
236 240
237 private: 241 private:
238 LayoutObjectChildList* VirtualChildren() final { return Children(); } 242 LayoutObjectChildList* VirtualChildren() final { return Children(); }
239 const LayoutObjectChildList* VirtualChildren() const final { 243 const LayoutObjectChildList* VirtualChildren() const final {
240 return Children(); 244 return Children();
241 } 245 }
242 const LayoutObjectChildList* Children() const { return &children_; } 246 const LayoutObjectChildList* Children() const { return &children_; }
243 LayoutObjectChildList* Children() { return &children_; } 247 LayoutObjectChildList* Children() { return &children_; }
244 248
245 bool IsLayoutInline() const final { return true; } 249 bool IsLayoutInline() const final { return true; }
246 250
247 LayoutRect CulledInlineVisualOverflowBoundingBox() const; 251 LayoutRect CulledInlineVisualOverflowBoundingBox() const;
248 InlineBox* CulledInlineFirstLineBox() const; 252 InlineBox* CulledInlineFirstLineBox() const;
249 InlineBox* CulledInlineLastLineBox() const; 253 InlineBox* CulledInlineLastLineBox() const;
250 254
251 // For visualOverflowRect() only, to get bounding box of visual overflow of
252 // line boxes.
253 LayoutRect LinesVisualOverflowBoundingBox() const;
254
255 template <typename GeneratorContext> 255 template <typename GeneratorContext>
256 void GenerateLineBoxRects(GeneratorContext& yield) const; 256 void GenerateLineBoxRects(GeneratorContext& yield) const;
257 template <typename GeneratorContext> 257 template <typename GeneratorContext>
258 void GenerateCulledLineBoxRects(GeneratorContext& yield, 258 void GenerateCulledLineBoxRects(GeneratorContext& yield,
259 const LayoutInline* container) const; 259 const LayoutInline* container) const;
260 260
261 void AddChildToContinuation(LayoutObject* new_child, 261 void AddChildToContinuation(LayoutObject* new_child,
262 LayoutObject* before_child); 262 LayoutObject* before_child);
263 void AddChildIgnoringContinuation(LayoutObject* new_child, 263 void AddChildIgnoringContinuation(LayoutObject* new_child,
264 LayoutObject* before_child = nullptr) final; 264 LayoutObject* before_child = nullptr) final;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // All of the line boxes created for this inline flow. For example, 351 // All of the line boxes created for this inline flow. For example,
352 // <i>Hello<br>world.</i> will have two <i> line boxes. 352 // <i>Hello<br>world.</i> will have two <i> line boxes.
353 LineBoxList line_boxes_; 353 LineBoxList line_boxes_;
354 }; 354 };
355 355
356 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutInline, IsLayoutInline()); 356 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutInline, IsLayoutInline());
357 357
358 } // namespace blink 358 } // namespace blink
359 359
360 #endif // LayoutInline_h 360 #endif // LayoutInline_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698