Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: sky/engine/web/WebLocalFrameImpl.cpp

Issue 771093002: Use a JS markup serializer. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/web/WebLocalFrameImpl.h ('k') | sky/framework/dom-serializer.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 641
642 WebString WebLocalFrameImpl::contentAsText(size_t maxChars) const 642 WebString WebLocalFrameImpl::contentAsText(size_t maxChars) const
643 { 643 {
644 if (!frame()) 644 if (!frame())
645 return WebString(); 645 return WebString();
646 StringBuilder text; 646 StringBuilder text;
647 frameContentAsPlainText(maxChars, frame(), text); 647 frameContentAsPlainText(maxChars, frame(), text);
648 return text.toString(); 648 return text.toString();
649 } 649 }
650 650
651 WebString WebLocalFrameImpl::contentAsMarkup() const
652 {
653 if (!frame())
654 return WebString();
655 return createMarkup(frame()->document());
656 }
657
658 WebString WebLocalFrameImpl::renderTreeAsText(RenderAsTextControls toShow) const 651 WebString WebLocalFrameImpl::renderTreeAsText(RenderAsTextControls toShow) const
659 { 652 {
660 RenderAsTextBehavior behavior = RenderAsTextBehaviorNormal; 653 RenderAsTextBehavior behavior = RenderAsTextBehaviorNormal;
661 654
662 if (toShow & RenderAsTextDebug) 655 if (toShow & RenderAsTextDebug)
663 behavior |= RenderAsTextShowCompositedLayers | RenderAsTextShowAddresses | RenderAsTextShowIDAndClass | RenderAsTextShowLayerNesting; 656 behavior |= RenderAsTextShowCompositedLayers | RenderAsTextShowAddresses | RenderAsTextShowIDAndClass | RenderAsTextShowLayerNesting;
664 657
665 return externalRepresentation(frame(), behavior); 658 return externalRepresentation(frame(), behavior);
666 } 659 }
667 660
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 } 767 }
775 768
776 void WebLocalFrameImpl::invalidateAll() const 769 void WebLocalFrameImpl::invalidateAll() const
777 { 770 {
778 ASSERT(frame() && frame()->view()); 771 ASSERT(frame() && frame()->view());
779 FrameView* view = frame()->view(); 772 FrameView* view = frame()->view();
780 view->invalidateRect(view->frameRect()); 773 view->invalidateRect(view->frameRect());
781 } 774 }
782 775
783 } // namespace blink 776 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/web/WebLocalFrameImpl.h ('k') | sky/framework/dom-serializer.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698