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

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

Issue 1473363003: Invalidate first line display item clients when first line style changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some modifications were not saved to README.md in the previous patch 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
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 // An example explaining layout tree structure about first-line style:
280 // <style>
281 // #enclosingFirstLineStyleBlock::first-line { ... }
282 // </style>
283 // <div id="enclosingFirstLineStyleBlock">
284 // <div>
285 // <div id="nearestInnerBlockWithFirstLine">
286 // [<span>]first line text[</span>]
287 // </div>
288 // </div>
289 // </div>
290
291 // Returns the nearest enclosing block (including this block) that contribut es a first-line style to our first line.
292 LayoutBlock* enclosingFirstLineStyleBlock() const;
293 // Returns this block or the nearest inner block containing the actual first line.
294 LayoutBlockFlow* nearestInnerBlockWithFirstLine() const;
295
279 protected: 296 protected:
280 void willBeDestroyed() override; 297 void willBeDestroyed() override;
281 298
282 void dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutScope&); 299 void dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutScope&);
283 300
284 void layout() override; 301 void layout() override;
285 302
286 enum PositionedLayoutBehavior { 303 enum PositionedLayoutBehavior {
287 DefaultLayout, 304 DefaultLayout,
288 LayoutOnlyFixedPositionedObjects, 305 LayoutOnlyFixedPositionedObjects,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 bool avoidsFloats() const override { return true; } 406 bool avoidsFloats() const override { return true; }
390 407
391 bool hitTestContents(HitTestResult&, const HitTestLocation& locationInContai ner, const LayoutPoint& accumulatedOffset, HitTestAction); 408 bool hitTestContents(HitTestResult&, const HitTestLocation& locationInContai ner, const LayoutPoint& accumulatedOffset, HitTestAction);
392 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Layo utBlockFlow 409 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Layo utBlockFlow
393 virtual bool hitTestFloats(HitTestResult&, const HitTestLocation&, const Lay outPoint&) { return false; } 410 virtual bool hitTestFloats(HitTestResult&, const HitTestLocation&, const Lay outPoint&) { return false; }
394 411
395 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset) const; 412 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset) const;
396 413
397 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const; 414 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const;
398 415
399 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline
400 // children.
401 LayoutBlock* firstLineBlock() const override;
402
403 LayoutObject* hoverAncestor() const final; 416 LayoutObject* hoverAncestor() const final;
404 void updateDragState(bool dragOn) final; 417 void updateDragState(bool dragOn) final;
405 void childBecameNonInline(LayoutObject* child) final; 418 void childBecameNonInline(LayoutObject* child) final;
406 419
407 bool isSelectionRoot() const; 420 bool isSelectionRoot() const;
408 421
409 void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) c onst override; 422 void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) c onst override;
410 void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override; 423 void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;
411 424
412 public: 425 public:
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 // FIXME: This is temporary as we move code that accesses block flow 502 // FIXME: This is temporary as we move code that accesses block flow
490 // member variables out of LayoutBlock and into LayoutBlockFlow. 503 // member variables out of LayoutBlock and into LayoutBlockFlow.
491 friend class LayoutBlockFlow; 504 friend class LayoutBlockFlow;
492 }; 505 };
493 506
494 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); 507 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock());
495 508
496 } // namespace blink 509 } // namespace blink
497 510
498 #endif // LayoutBlock_h 511 #endif // LayoutBlock_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/FirstLetterPseudoElement.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698