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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp

Issue 2171493003: [Editing][DOM][CodeHealth] Make Node::hasEditableStyle global functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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) 2003, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 return !block().style()->isFlippedBlocksWritingMode() ? std::max(lineTop(), selectionTop()) : std::min(lineBottom(), selectionBottom()); 400 return !block().style()->isFlippedBlocksWritingMode() ? std::max(lineTop(), selectionTop()) : std::min(lineBottom(), selectionBottom());
401 } 401 }
402 402
403 LineLayoutBlockFlow RootInlineBox::block() const 403 LineLayoutBlockFlow RootInlineBox::block() const
404 { 404 {
405 return LineLayoutBlockFlow(getLineLayoutItem()); 405 return LineLayoutBlockFlow(getLineLayoutItem());
406 } 406 }
407 407
408 static bool isEditableLeaf(InlineBox* leaf) 408 static bool isEditableLeaf(InlineBox* leaf)
409 { 409 {
410 return leaf && leaf->getLineLayoutItem().node() && leaf->getLineLayoutItem() .node()->hasEditableStyle(); 410 return leaf && leaf->getLineLayoutItem().node() && hasEditableStyle(*leaf->g etLineLayoutItem().node());
411 } 411 }
412 412
413 InlineBox* RootInlineBox::closestLeafChildForPoint(const LayoutPoint& pointInCon tents, bool onlyEditableLeaves) 413 InlineBox* RootInlineBox::closestLeafChildForPoint(const LayoutPoint& pointInCon tents, bool onlyEditableLeaves)
414 { 414 {
415 return closestLeafChildForLogicalLeftPosition(block().isHorizontalWritingMod e() ? pointInContents.x() : pointInContents.y(), onlyEditableLeaves); 415 return closestLeafChildForLogicalLeftPosition(block().isHorizontalWritingMod e() ? pointInContents.x() : pointInContents.y(), onlyEditableLeaves);
416 } 416 }
417 417
418 InlineBox* RootInlineBox::closestLeafChildForLogicalLeftPosition(LayoutUnit left Position, bool onlyEditableLeaves) 418 InlineBox* RootInlineBox::closestLeafChildForLogicalLeftPosition(LayoutUnit left Position, bool onlyEditableLeaves)
419 { 419 {
420 InlineBox* firstLeaf = firstLeafChild(); 420 InlineBox* firstLeaf = firstLeafChild();
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 endBox = nullptr; 702 endBox = nullptr;
703 return nullptr; 703 return nullptr;
704 } 704 }
705 705
706 const char* RootInlineBox::boxName() const 706 const char* RootInlineBox::boxName() const
707 { 707 {
708 return "RootInlineBox"; 708 return "RootInlineBox";
709 } 709 }
710 710
711 } // namespace blink 711 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698