Title: [199784] trunk/Source/WebCore
- Revision
- 199784
- Author
- [email protected]
- Date
- 2016-04-20 14:07:02 -0700 (Wed, 20 Apr 2016)
Log Message
Crash under needsAppleMailPaginationQuirk()
https://bugs.webkit.org/show_bug.cgi?id=156806
<rdar://problem/23323479>
Reviewed by Simon Fraser.
Add check for element()->hasID() before calling element()->idForStyleResolution()
so that we don't dereference a potentially null element()->elementData().
Also stop repeatedly atomizing "messageContentContainer" and leverage
the operator==(const AtomicString&, const char*) instead for performance.
* rendering/RenderBlockFlow.cpp:
(WebCore::needsAppleMailPaginationQuirk):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (199783 => 199784)
--- trunk/Source/WebCore/ChangeLog 2016-04-20 20:31:21 UTC (rev 199783)
+++ trunk/Source/WebCore/ChangeLog 2016-04-20 21:07:02 UTC (rev 199784)
@@ -1,3 +1,19 @@
+2016-04-20 Chris Dumez <[email protected]>
+
+ Crash under needsAppleMailPaginationQuirk()
+ https://bugs.webkit.org/show_bug.cgi?id=156806
+ <rdar://problem/23323479>
+
+ Reviewed by Simon Fraser.
+
+ Add check for element()->hasID() before calling element()->idForStyleResolution()
+ so that we don't dereference a potentially null element()->elementData().
+ Also stop repeatedly atomizing "messageContentContainer" and leverage
+ the operator==(const AtomicString&, const char*) instead for performance.
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::needsAppleMailPaginationQuirk):
+
2016-04-20 Brady Eidson <[email protected]>
Attempt to fix non-INDEXED_DATABASE_IN_WORKERS builds after r199779
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (199783 => 199784)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2016-04-20 20:31:21 UTC (rev 199783)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2016-04-20 21:07:02 UTC (rev 199784)
@@ -1643,7 +1643,7 @@
if (!renderer.document().settings()->appleMailPaginationQuirkEnabled())
return false;
- if (renderer.element() && renderer.element()->idForStyleResolution() == AtomicString("messageContentContainer", AtomicString::ConstructFromLiteral))
+ if (renderer.element() && renderer.element()->hasID() && renderer.element()->idForStyleResolution() == "messageContentContainer")
return true;
return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes