Changeset 205806 in webkit
- Timestamp:
- Sep 12, 2016 2:28:52 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r205805 r205806 1 2016-09-12 Chris Dumez <cdumez@apple.com> 2 3 ol.start may return incorrect value for reversed lists when not explicitly set 4 https://bugs.webkit.org/show_bug.cgi?id=161713 5 6 Reviewed by Ryosuke Niwa. 7 8 Fix style nit after r205689. 9 10 * html/HTMLOListElement.cpp: 11 (WebCore::HTMLOListElement::itemCount): 12 (WebCore::HTMLOListElement::itemCountAfterLayout): 13 * html/HTMLOListElement.h: 14 1 15 2016-09-12 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/html/HTMLOListElement.cpp
r205689 r205806 105 105 } 106 106 107 unsigned HTMLOListElement::itemCount( ShouldLayout shouldLayout) const107 unsigned HTMLOListElement::itemCount() const 108 108 { 109 if (shouldLayout == ShouldLayout::Yes)110 document().updateLayoutIgnorePendingStylesheets();111 112 109 if (m_shouldRecalculateItemCount) 113 110 const_cast<HTMLOListElement*>(this)->recalculateItemCount(); 114 111 return m_itemCount; 112 } 113 114 unsigned HTMLOListElement::itemCountAfterLayout() const 115 { 116 document().updateLayoutIgnorePendingStylesheets(); 117 118 return itemCount(); 115 119 } 116 120 -
trunk/Source/WebCore/html/HTMLOListElement.h
r205689 r205806 36 36 // from rendering code and this is unfortunately one of the few cases where the render tree is mutated 37 37 // while in layout. 38 int start() const { return m_start ? m_start.value() : (m_isReversed ? itemCount( ShouldLayout::No) : 1); }39 int startForBindings() const { return m_start ? m_start.value() : (m_isReversed ? itemCount (ShouldLayout::Yes) : 1); }38 int start() const { return m_start ? m_start.value() : (m_isReversed ? itemCount() : 1); } 39 int startForBindings() const { return m_start ? m_start.value() : (m_isReversed ? itemCountAfterLayout() : 1); } 40 40 41 41 WEBCORE_EXPORT void setStartForBindings(int); … … 50 50 void updateItemValues(); 51 51 52 enum class ShouldLayout { No, Yes };53 WEBCORE_EXPORT unsigned itemCount( ShouldLayout) const;52 WEBCORE_EXPORT unsigned itemCountAfterLayout() const; 53 WEBCORE_EXPORT unsigned itemCount() const; 54 54 55 55 WEBCORE_EXPORT void recalculateItemCount();
Note: See TracChangeset
for help on using the changeset viewer.