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

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

Issue 678193005: Remove more frame-level scrolling machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/public/web/WebWidget.h ('k') | sky/engine/web/WebLocalFrameImpl.h » ('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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 WebElement WebDocument::createElement(const WebString& tagName) 130 WebElement WebDocument::createElement(const WebString& tagName)
131 { 131 {
132 TrackExceptionState exceptionState; 132 TrackExceptionState exceptionState;
133 WebElement element(unwrap<Document>()->createElement(tagName, exceptionState )); 133 WebElement element(unwrap<Document>()->createElement(tagName, exceptionState ));
134 if (exceptionState.hadException()) 134 if (exceptionState.hadException())
135 return WebElement(); 135 return WebElement();
136 return element; 136 return element;
137 } 137 }
138 138
139 WebSize WebDocument::scrollOffset() const
140 {
141 if (FrameView* view = constUnwrap<Document>()->view())
142 return view->scrollOffset();
143 return WebSize();
144 }
145
146 WebSize WebDocument::minimumScrollOffset() const
147 {
148 if (FrameView* view = constUnwrap<Document>()->view())
149 return toIntSize(view->minimumScrollPosition());
150 return WebSize();
151 }
152
153 WebSize WebDocument::maximumScrollOffset() const
154 {
155 if (FrameView* view = constUnwrap<Document>()->view())
156 return toIntSize(view->maximumScrollPosition());
157 return WebSize();
158 }
159
160 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString & name, v8::Handle<v8::Value> options, WebExceptionCode& ec) 139 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString & name, v8::Handle<v8::Value> options, WebExceptionCode& ec)
161 { 140 {
162 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 141 v8::Isolate* isolate = v8::Isolate::GetCurrent();
163 Document* document = unwrap<Document>(); 142 Document* document = unwrap<Document>();
164 Dictionary dictionary(options, isolate); 143 Dictionary dictionary(options, isolate);
165 TrackExceptionState exceptionState; 144 TrackExceptionState exceptionState;
166 ScriptValue constructor = document->registerElement(ScriptState::current(iso late), name, dictionary, exceptionState, CustomElement::EmbedderNames); 145 ScriptValue constructor = document->registerElement(ScriptState::current(iso late), name, dictionary, exceptionState, CustomElement::EmbedderNames);
167 ec = exceptionState.code(); 146 ec = exceptionState.code();
168 if (exceptionState.hadException()) 147 if (exceptionState.hadException())
169 return v8::Handle<v8::Value>(); 148 return v8::Handle<v8::Value>();
(...skipping 10 matching lines...) Expand all
180 m_private = elem; 159 m_private = elem;
181 return *this; 160 return *this;
182 } 161 }
183 162
184 WebDocument::operator PassRefPtr<Document>() const 163 WebDocument::operator PassRefPtr<Document>() const
185 { 164 {
186 return toDocument(m_private.get()); 165 return toDocument(m_private.get());
187 } 166 }
188 167
189 } // namespace blink 168 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/public/web/WebWidget.h ('k') | sky/engine/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698