Title: [153451] trunk/Source/WebCore
- Revision
- 153451
- Author
- [email protected]
- Date
- 2013-07-29 18:06:27 -0700 (Mon, 29 Jul 2013)
Log Message
Page count can be incorrect if there is a pending style recalc
https://bugs.webkit.org/show_bug.cgi?id=119232
Reviewed by Beth Dakin.
If style is changed in a way that schedules a style recalc on the Document,
and then Page::pageCount() is called, we may give the wrong answer because
the existing code only checked FrameView::needsLayout(), not whether a style
recale was pending.
Fix by having Page::pageCount() call updateLayoutIgnorePendingStylesheets()
as we do for other properties that require layer, and are exposed to JS
or via API.
* page/Page.cpp:
(WebCore::Page::pageCount):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (153450 => 153451)
--- trunk/Source/WebCore/ChangeLog 2013-07-30 00:25:33 UTC (rev 153450)
+++ trunk/Source/WebCore/ChangeLog 2013-07-30 01:06:27 UTC (rev 153451)
@@ -1,3 +1,22 @@
+2013-07-29 Simon Fraser <[email protected]>
+
+ Page count can be incorrect if there is a pending style recalc
+ https://bugs.webkit.org/show_bug.cgi?id=119232
+
+ Reviewed by Beth Dakin.
+
+ If style is changed in a way that schedules a style recalc on the Document,
+ and then Page::pageCount() is called, we may give the wrong answer because
+ the existing code only checked FrameView::needsLayout(), not whether a style
+ recale was pending.
+
+ Fix by having Page::pageCount() call updateLayoutIgnorePendingStylesheets()
+ as we do for other properties that require layer, and are exposed to JS
+ or via API.
+
+ * page/Page.cpp:
+ (WebCore::Page::pageCount):
+
2013-07-29 Alex Christensen <[email protected]>
Moved GLContext.cpp and .h out of cairo directory to be used by non-cairo ports.
Modified: trunk/Source/WebCore/page/Page.cpp (153450 => 153451)
--- trunk/Source/WebCore/page/Page.cpp 2013-07-30 00:25:33 UTC (rev 153450)
+++ trunk/Source/WebCore/page/Page.cpp 2013-07-30 01:06:27 UTC (rev 153451)
@@ -904,9 +904,8 @@
if (m_pagination.mode == Pagination::Unpaginated)
return 0;
- FrameView* frameView = mainFrame()->view();
- if (frameView->needsLayout())
- frameView->layout();
+ if (Document* document = mainFrame()->document())
+ document->updateLayoutIgnorePendingStylesheets();
RenderView* contentRenderer = mainFrame()->contentRenderer();
return contentRenderer ? contentRenderer->columnCount(contentRenderer->columnInfo()) : 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes