Changeset 155975 in webkit
- Timestamp:
- Sep 17, 2013, 11:10:02 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r155972 r155975 1 2013-09-17 Antti Koivisto <antti@apple.com> 2 3 Add isTextOrBR() and use it 4 https://bugs.webkit.org/show_bug.cgi?id=121506 5 6 Reviewed by Darin Adler. 7 8 It is a popular test. 9 10 * dom/Document.cpp: 11 (WebCore::Document::updateHoverActiveState): 12 * editing/Editor.cpp: 13 (WebCore::findFirstMarkable): 14 * editing/TextIterator.cpp: 15 (WebCore::ignoresContainerClip): 16 * rendering/InlineBox.cpp: 17 (WebCore::InlineBox::logicalHeight): 18 * rendering/InlineIterator.h: 19 (WebCore::isIteratorTarget): 20 * rendering/RenderBlock.cpp: 21 (WebCore::InlineMinMaxIterator::next): 22 * rendering/RenderBlockLineLayout.cpp: 23 (WebCore::RenderBlockFlow::layoutInlineChildren): 24 * rendering/RenderCounter.cpp: 25 (WebCore::planCounter): 26 * rendering/RenderObject.h: 27 (WebCore::RenderObject::isTextOrBR): 28 * rendering/RenderTreeAsText.cpp: 29 (WebCore::write): 30 * rendering/RootInlineBox.cpp: 31 (WebCore::RootInlineBox::ascentAndDescentForBox): 32 (WebCore::RootInlineBox::verticalPositionForBox): 33 1 34 2013-09-17 Antti Koivisto <antti@apple.com> 2 35 -
trunk/Source/WebCore/dom/Document.cpp
r155957 r155975 5825 5825 // will need to reference this chain. 5826 5826 for (RenderObject* curr = newActiveElement->renderer(); curr; curr = curr->parent()) { 5827 if (!curr->node() || !curr->node()->isElementNode() || curr->isText () || curr->isBR())5827 if (!curr->node() || !curr->node()->isElementNode() || curr->isTextOrBR()) 5828 5828 continue; 5829 5829 m_userActionElements.setInActiveChain(toElement(curr->node()), true); -
trunk/Source/WebCore/editing/Editor.cpp
r155957 r155975 3086 3086 if (!node->renderer()) 3087 3087 return 0; 3088 if (node->renderer()->isText () || node->renderer()->isBR())3088 if (node->renderer()->isTextOrBR()) 3089 3089 return node; 3090 3090 if (isHTMLTextFormControlElement(node)) -
trunk/Source/WebCore/editing/TextIterator.cpp
r155957 r155975 216 216 { 217 217 RenderObject* renderer = node->renderer(); 218 if (!renderer || renderer->isText () || renderer->isBR())218 if (!renderer || renderer->isTextOrBR()) 219 219 return false; 220 220 return renderer->style()->hasOutOfFlowPosition(); -
trunk/Source/WebCore/rendering/InlineBox.cpp
r155972 r155975 142 142 return virtualLogicalHeight(); 143 143 144 if (renderer().isText () || renderer().isBR())144 if (renderer().isTextOrBR()) 145 145 return m_bitfields.isText() ? renderer().style(isFirstLineStyle())->fontMetrics().height() : 0; 146 146 if (renderer().isBox() && parent()) -
trunk/Source/WebCore/rendering/InlineIterator.h
r155957 r155975 167 167 { 168 168 ASSERT(object); // The iterator will of course return 0, but its not an expected argument to this function. 169 return object->isText () || object->isBR() || object->isFloating() || object->isOutOfFlowPositioned() || object->isReplaced();169 return object->isTextOrBR() || object->isFloating() || object->isOutOfFlowPositioned() || object->isReplaced(); 170 170 } 171 171 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r155964 r155975 5101 5101 break; 5102 5102 5103 if (!result->isOutOfFlowPositioned() && (result->isText () || result->isBR() || result->isFloating() || result->isReplaced() || result->isRenderInline()))5103 if (!result->isOutOfFlowPositioned() && (result->isTextOrBR() || result->isFloating() || result->isReplaced() || result->isRenderInline())) 5104 5104 break; 5105 5105 -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r155964 r155975 1844 1844 o->layoutIfNeeded(); 1845 1845 } 1846 } else if (o->isText () || o->isBR() || (o->isRenderInline() && !walker.atEndOfInline())) {1846 } else if (o->isTextOrBR() || (o->isRenderInline() && !walker.atEndOfInline())) { 1847 1847 if (o->isRenderInline()) 1848 1848 toRenderInline(o)->updateAlwaysCreateLineBoxes(layoutState.isFullLayout()); -
trunk/Source/WebCore/rendering/RenderCounter.cpp
r154546 r155975 109 109 // Real text nodes don't have their own style so they can't have counters. 110 110 // We can't even look at their styles or we'll see extra resets and increments! 111 if (object->isText() && !object->isBR())111 if (object->isText()) 112 112 return false; 113 113 Node* generatingNode = object->generatingNode(); -
trunk/Source/WebCore/rendering/RenderObject.h
r155964 r155975 570 570 bool isText() const { return !m_bitfields.isBox() && m_bitfields.isTextOrRenderView(); } 571 571 bool isBR() const { return m_bitfields.isBR(); } 572 bool isTextOrBR() const { return isText() || isBR(); } 572 573 bool isBox() const { return m_bitfields.isBox(); } 573 574 bool isRenderView() const { return m_bitfields.isBox() && m_bitfields.isTextOrRenderView(); } -
trunk/Source/WebCore/rendering/RenderTreeAsText.cpp
r155957 r155975 590 590 ts << "\n"; 591 591 592 if (o.isText() && !o.isBR()) {592 if (o.isText()) { 593 593 const RenderText& text = toRenderText(o); 594 594 for (InlineTextBox* box = text.firstTextBox(); box; box = box->nextTextBox()) { -
trunk/Source/WebCore/rendering/RootInlineBox.cpp
r155957 r155975 916 916 LayoutUnit ascentWithMargin = box->renderer().style(isFirstLineStyle())->fontMetrics().ascent(baselineType()); 917 917 LayoutUnit descentWithMargin = box->renderer().style(isFirstLineStyle())->fontMetrics().descent(baselineType()); 918 if (box->parent() && !box->renderer().isText () && !box->renderer().isBR()) {918 if (box->parent() && !box->renderer().isTextOrBR()) { 919 919 ascentWithMargin += box->boxModelObject()->borderAndPaddingBefore() + box->boxModelObject()->marginBefore(); 920 920 descentWithMargin += box->boxModelObject()->borderAndPaddingAfter() + box->boxModelObject()->marginAfter(); … … 930 930 LayoutUnit RootInlineBox::verticalPositionForBox(InlineBox* box, VerticalPositionCache& verticalPositionCache) 931 931 { 932 if (box->renderer().isText () || box->renderer().isBR())932 if (box->renderer().isTextOrBR()) 933 933 return box->parent()->logicalTop(); 934 934
Note:
See TracChangeset
for help on using the changeset viewer.