WebKit Bugzilla
Attachment 343486 Details for
Bug 186710
: AutoTableLayout wastes 52KB of Vector capacity on nytimes.com
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186710-20180624232328.patch (text/plain), 2.45 KB, created by
Simon Fraser (smfr)
on 2018-06-24 23:23:29 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2018-06-24 23:23:29 PDT
Size:
2.45 KB
patch
obsolete
>Subversion Revision: 233132 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8ffb021ad5f848e06fb7849c0c980d8f46447b21..496f745d1ac42f53bb03c04ae3dc49536c548a59 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2018-06-24 Simon Fraser <simon.fraser@apple.com> >+ >+ AutoTableLayout wastes 52KB of Vector capacity on nytimes.com >+ https://bugs.webkit.org/show_bug.cgi?id=186710 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Call resizeToFit() to only allocate enough capacity for the number of columns. >+ >+ * rendering/AutoTableLayout.cpp: >+ (WebCore::AutoTableLayout::fullRecalc): >+ (WebCore::AutoTableLayout::insertSpanCell): Whitespace fix. >+ * rendering/AutoTableLayout.h: >+ > 2018-06-23 Zalan Bujtas <zalan@apple.com> > > [Mail] Use the Mail Viewer width as the base for resolving horizontal viewport units >diff --git a/Source/WebCore/rendering/AutoTableLayout.cpp b/Source/WebCore/rendering/AutoTableLayout.cpp >index 37cc4099ee63193af897c91ec14b4836d6cf9f0c..e2fea82b29faa8786b56527e77f73aa907793c00 100644 >--- a/Source/WebCore/rendering/AutoTableLayout.cpp >+++ b/Source/WebCore/rendering/AutoTableLayout.cpp >@@ -146,7 +146,7 @@ void AutoTableLayout::fullRecalc() > m_effectiveLogicalWidthDirty = true; > > unsigned nEffCols = m_table->numEffCols(); >- m_layoutStruct.resize(nEffCols); >+ m_layoutStruct.resizeToFit(nEffCols); > m_layoutStruct.fill(Layout()); > m_spanCells.fill(0); > >@@ -483,7 +483,7 @@ void AutoTableLayout::insertSpanCell(RenderTableCell *cell) > if (!size || m_spanCells[size-1] != 0) { > m_spanCells.grow(size + 10); > for (unsigned i = 0; i < 10; i++) >- m_spanCells[size+i] = 0; >+ m_spanCells[size + i] = 0; > size += 10; > } > >diff --git a/Source/WebCore/rendering/AutoTableLayout.h b/Source/WebCore/rendering/AutoTableLayout.h >index 86729c39b82b34f418b023bfd6b33853d29153a7..f617bd8d64eb5aa7e58bcea34b3c5166b043201b 100644 >--- a/Source/WebCore/rendering/AutoTableLayout.h >+++ b/Source/WebCore/rendering/AutoTableLayout.h >@@ -59,8 +59,8 @@ private: > bool emptyCellsOnly { true }; > }; > >- Vector<Layout, 4> m_layoutStruct; >- Vector<RenderTableCell*, 4> m_spanCells; >+ Vector<Layout> m_layoutStruct; >+ Vector<RenderTableCell*> m_spanCells; > bool m_hasPercent : 1; > mutable bool m_effectiveLogicalWidthDirty : 1; > LayoutUnit m_scaledWidthFromPercentColumns;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186710
: 343486