Title: [183524] trunk/Source/WebCore
Revision
183524
Author
[email protected]
Date
2015-04-28 19:26:07 -0700 (Tue, 28 Apr 2015)

Log Message

REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
https://bugs.webkit.org/show_bug.cgi?id=144366
<rdar://problem/20533513>

Reviewed by Dean Jackson.

* rendering/RenderBlockFlow.cpp:
(WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
before attempting to dereference it.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (183523 => 183524)


--- trunk/Source/WebCore/ChangeLog	2015-04-29 02:12:31 UTC (rev 183523)
+++ trunk/Source/WebCore/ChangeLog	2015-04-29 02:26:07 UTC (rev 183524)
@@ -1,3 +1,15 @@
+2015-04-28  Brent Fulgham  <[email protected]>
+
+        REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
+        https://bugs.webkit.org/show_bug.cgi?id=144366
+        <rdar://problem/20533513>
+
+        Reviewed by Dean Jackson.
+
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
+        before attempting to dereference it. 
+
 2015-04-28  Andreas Kling  <[email protected]>
 
         Simplify DOM wrapper destruction, don't deref() in finalizers.

Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (183523 => 183524)


--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2015-04-29 02:12:31 UTC (rev 183523)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2015-04-29 02:26:07 UTC (rev 183524)
@@ -1612,8 +1612,15 @@
 
 static inline bool needsAppleMailPaginationQuirk(RootInlineBox& lineBox)
 {
-    bool appleMailPaginationQuirkEnabled = lineBox.renderer().document().settings()->appleMailPaginationQuirkEnabled();
-    if (appleMailPaginationQuirkEnabled && lineBox.renderer().element() && lineBox.renderer().element()->idForStyleResolution() == AtomicString("messageContentContainer", AtomicString::ConstructFromLiteral))
+    const auto& renderer = lineBox.renderer();
+
+    if (!renderer.document().settings())
+        return false;
+
+    if (!renderer.document().settings()->appleMailPaginationQuirkEnabled())
+        return false;
+
+    if (renderer.element() && renderer.element()->idForStyleResolution() == AtomicString("messageContentContainer", AtomicString::ConstructFromLiteral))
         return true;
 
     return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to