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

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

Issue 1490013002: Devirtualize LayoutBlock::firstLineBlock() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FirstLine
Patch Set: Created 5 years 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 | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 #if ENABLE(ASSERT) 269 #if ENABLE(ASSERT)
270 void checkPositionedObjectsNeedLayout(); 270 void checkPositionedObjectsNeedLayout();
271 #endif 271 #endif
272 #ifndef NDEBUG 272 #ifndef NDEBUG
273 void showLineTreeAndMark(const InlineBox* = nullptr, const char* = nullptr, const InlineBox* = nullptr, const char* = nullptr, const LayoutObject* = nullptr ) const; 273 void showLineTreeAndMark(const InlineBox* = nullptr, const char* = nullptr, const InlineBox* = nullptr, const char* = nullptr, const LayoutObject* = nullptr ) const;
274 #endif 274 #endif
275 275
276 bool recalcChildOverflowAfterStyleChange(); 276 bool recalcChildOverflowAfterStyleChange();
277 bool recalcOverflowAfterStyleChange(); 277 bool recalcOverflowAfterStyleChange();
278 278
279 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline children.
280 LayoutBlock* firstLineBlock() const;
281
279 void invalidateDisplayItemClientsOfFirstLine(); 282 void invalidateDisplayItemClientsOfFirstLine();
280 283
281 protected: 284 protected:
282 void willBeDestroyed() override; 285 void willBeDestroyed() override;
283 286
284 void dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutScope&); 287 void dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutScope&);
285 288
286 void layout() override; 289 void layout() override;
287 290
288 enum PositionedLayoutBehavior { 291 enum PositionedLayoutBehavior {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 bool avoidsFloats() const override { return true; } 394 bool avoidsFloats() const override { return true; }
392 395
393 bool hitTestContents(HitTestResult&, const HitTestLocation& locationInContai ner, const LayoutPoint& accumulatedOffset, HitTestAction); 396 bool hitTestContents(HitTestResult&, const HitTestLocation& locationInContai ner, const LayoutPoint& accumulatedOffset, HitTestAction);
394 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Layo utBlockFlow 397 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Layo utBlockFlow
395 virtual bool hitTestFloats(HitTestResult&, const HitTestLocation&, const Lay outPoint&) { return false; } 398 virtual bool hitTestFloats(HitTestResult&, const HitTestLocation&, const Lay outPoint&) { return false; }
396 399
397 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset) const; 400 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset) const;
398 401
399 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const; 402 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const;
400 403
401 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline
402 // children.
403 LayoutBlock* firstLineBlock() const override;
404
405 LayoutObject* hoverAncestor() const final; 404 LayoutObject* hoverAncestor() const final;
406 void updateDragState(bool dragOn) final; 405 void updateDragState(bool dragOn) final;
407 void childBecameNonInline(LayoutObject* child) final; 406 void childBecameNonInline(LayoutObject* child) final;
408 407
409 bool isSelectionRoot() const; 408 bool isSelectionRoot() const;
410 409
411 void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) c onst override; 410 void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) c onst override;
412 void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override; 411 void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;
413 412
414 public: 413 public:
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 // FIXME: This is temporary as we move code that accesses block flow 490 // FIXME: This is temporary as we move code that accesses block flow
492 // member variables out of LayoutBlock and into LayoutBlockFlow. 491 // member variables out of LayoutBlock and into LayoutBlockFlow.
493 friend class LayoutBlockFlow; 492 friend class LayoutBlockFlow;
494 }; 493 };
495 494
496 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); 495 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock());
497 496
498 } // namespace blink 497 } // namespace blink
499 498
500 #endif // LayoutBlock_h 499 #endif // LayoutBlock_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698