ee2bf17cd1a7833f9496cd4ca704a57aba2d7c4e
[WebKit.git] / WebCore / ChangeLog
1 2010-09-10  Paul Sawaya  <psawaya@apple.com>
2
3         Reviewed by Chris Marrin.
4
5         Refactored non-Mac specific code into GraphicsContext3DOpenGL.
6         
7         Moving this file into platform/graphics/opengl and only building on Mac for now.
8         
9         https://bugs.webkit.org/show_bug.cgi?id=30625
10
11         * WebCore.xcodeproj/project.pbxproj:
12         * platform/graphics/mac/GraphicsContext3DMac.mm:
13         (WebCore::GraphicsContext3D::makeContextCurrent):
14         (WebCore::GraphicsContext3D::isErrorGeneratedOnOutOfBoundsAccesses):
15         * platform/graphics/opengl: Added.
16         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Copied from platform/graphics/mac/GraphicsContext3DMac.mm.
17         (WebCore::GraphicsContext3D::prepareTexture):
18         (WebCore::GraphicsContext3D::activeTexture):
19         (WebCore::GraphicsContext3D::attachShader):
20         (WebCore::GraphicsContext3D::bindAttribLocation):
21         (WebCore::GraphicsContext3D::bindBuffer):
22         (WebCore::GraphicsContext3D::bindFramebuffer):
23         (WebCore::GraphicsContext3D::bindRenderbuffer):
24         (WebCore::GraphicsContext3D::bindTexture):
25         (WebCore::GraphicsContext3D::blendColor):
26         (WebCore::GraphicsContext3D::blendEquation):
27         (WebCore::GraphicsContext3D::blendEquationSeparate):
28         (WebCore::GraphicsContext3D::blendFunc):
29         (WebCore::GraphicsContext3D::blendFuncSeparate):
30         (WebCore::GraphicsContext3D::bufferData):
31         (WebCore::GraphicsContext3D::bufferSubData):
32         (WebCore::GraphicsContext3D::checkFramebufferStatus):
33         (WebCore::GraphicsContext3D::clearColor):
34         (WebCore::GraphicsContext3D::clear):
35         (WebCore::GraphicsContext3D::clearDepth):
36         (WebCore::GraphicsContext3D::clearStencil):
37         (WebCore::GraphicsContext3D::colorMask):
38         (WebCore::GraphicsContext3D::compileShader):
39         (WebCore::GraphicsContext3D::copyTexImage2D):
40         (WebCore::GraphicsContext3D::copyTexSubImage2D):
41         (WebCore::GraphicsContext3D::cullFace):
42         (WebCore::GraphicsContext3D::depthFunc):
43         (WebCore::GraphicsContext3D::depthMask):
44         (WebCore::GraphicsContext3D::depthRange):
45         (WebCore::GraphicsContext3D::detachShader):
46         (WebCore::GraphicsContext3D::disable):
47         (WebCore::GraphicsContext3D::disableVertexAttribArray):
48         (WebCore::GraphicsContext3D::drawArrays):
49         (WebCore::GraphicsContext3D::drawElements):
50         (WebCore::GraphicsContext3D::enable):
51         (WebCore::GraphicsContext3D::enableVertexAttribArray):
52         (WebCore::GraphicsContext3D::finish):
53         (WebCore::GraphicsContext3D::flush):
54         (WebCore::GraphicsContext3D::framebufferRenderbuffer):
55         (WebCore::GraphicsContext3D::framebufferTexture2D):
56         (WebCore::GraphicsContext3D::frontFace):
57         (WebCore::GraphicsContext3D::generateMipmap):
58         (WebCore::GraphicsContext3D::getActiveAttrib):
59         (WebCore::GraphicsContext3D::getActiveUniform):
60         (WebCore::GraphicsContext3D::getAttachedShaders):
61         (WebCore::GraphicsContext3D::getAttribLocation):
62         (WebCore::GraphicsContext3D::getError):
63         (WebCore::GraphicsContext3D::getString):
64         (WebCore::GraphicsContext3D::hint):
65         (WebCore::GraphicsContext3D::isBuffer):
66         (WebCore::GraphicsContext3D::isEnabled):
67         (WebCore::GraphicsContext3D::isFramebuffer):
68         (WebCore::GraphicsContext3D::isProgram):
69         (WebCore::GraphicsContext3D::isRenderbuffer):
70         (WebCore::GraphicsContext3D::isShader):
71         (WebCore::GraphicsContext3D::isTexture):
72         (WebCore::GraphicsContext3D::lineWidth):
73         (WebCore::GraphicsContext3D::linkProgram):
74         (WebCore::GraphicsContext3D::pixelStorei):
75         (WebCore::GraphicsContext3D::polygonOffset):
76         (WebCore::GraphicsContext3D::readPixels):
77         (WebCore::GraphicsContext3D::releaseShaderCompiler):
78         (WebCore::GraphicsContext3D::renderbufferStorage):
79         (WebCore::GraphicsContext3D::sampleCoverage):
80         (WebCore::GraphicsContext3D::scissor):
81         (WebCore::GraphicsContext3D::shaderSource):
82         (WebCore::GraphicsContext3D::stencilFunc):
83         (WebCore::GraphicsContext3D::stencilFuncSeparate):
84         (WebCore::GraphicsContext3D::stencilMask):
85         (WebCore::GraphicsContext3D::stencilMaskSeparate):
86         (WebCore::GraphicsContext3D::stencilOp):
87         (WebCore::GraphicsContext3D::stencilOpSeparate):
88         (WebCore::GraphicsContext3D::texParameterf):
89         (WebCore::GraphicsContext3D::texParameteri):
90         (WebCore::GraphicsContext3D::uniform1f):
91         (WebCore::GraphicsContext3D::uniform1fv):
92         (WebCore::GraphicsContext3D::uniform2f):
93         (WebCore::GraphicsContext3D::uniform2fv):
94         (WebCore::GraphicsContext3D::uniform3f):
95         (WebCore::GraphicsContext3D::uniform3fv):
96         (WebCore::GraphicsContext3D::uniform4f):
97         (WebCore::GraphicsContext3D::uniform4fv):
98         (WebCore::GraphicsContext3D::uniform1i):
99         (WebCore::GraphicsContext3D::uniform1iv):
100         (WebCore::GraphicsContext3D::uniform2i):
101         (WebCore::GraphicsContext3D::uniform2iv):
102         (WebCore::GraphicsContext3D::uniform3i):
103         (WebCore::GraphicsContext3D::uniform3iv):
104         (WebCore::GraphicsContext3D::uniform4i):
105         (WebCore::GraphicsContext3D::uniform4iv):
106         (WebCore::GraphicsContext3D::uniformMatrix2fv):
107         (WebCore::GraphicsContext3D::uniformMatrix3fv):
108         (WebCore::GraphicsContext3D::uniformMatrix4fv):
109         (WebCore::GraphicsContext3D::useProgram):
110         (WebCore::GraphicsContext3D::validateProgram):
111         (WebCore::GraphicsContext3D::vertexAttrib1f):
112         (WebCore::GraphicsContext3D::vertexAttrib1fv):
113         (WebCore::GraphicsContext3D::vertexAttrib2f):
114         (WebCore::GraphicsContext3D::vertexAttrib2fv):
115         (WebCore::GraphicsContext3D::vertexAttrib3f):
116         (WebCore::GraphicsContext3D::vertexAttrib3fv):
117         (WebCore::GraphicsContext3D::vertexAttrib4f):
118         (WebCore::GraphicsContext3D::vertexAttrib4fv):
119         (WebCore::GraphicsContext3D::vertexAttribPointer):
120         (WebCore::GraphicsContext3D::viewport):
121         (WebCore::GraphicsContext3D::getBooleanv):
122         (WebCore::GraphicsContext3D::getBufferParameteriv):
123         (WebCore::GraphicsContext3D::getFloatv):
124         (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
125         (WebCore::GraphicsContext3D::getIntegerv):
126         (WebCore::GraphicsContext3D::getProgramiv):
127         (WebCore::GraphicsContext3D::getProgramInfoLog):
128         (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
129         (WebCore::GraphicsContext3D::getShaderiv):
130         (WebCore::GraphicsContext3D::getShaderInfoLog):
131         (WebCore::GraphicsContext3D::getShaderSource):
132         (WebCore::GraphicsContext3D::getTexParameterfv):
133         (WebCore::GraphicsContext3D::getTexParameteriv):
134         (WebCore::GraphicsContext3D::getUniformfv):
135         (WebCore::GraphicsContext3D::getUniformiv):
136         (WebCore::GraphicsContext3D::getUniformLocation):
137         (WebCore::GraphicsContext3D::getVertexAttribfv):
138         (WebCore::GraphicsContext3D::getVertexAttribiv):
139         (WebCore::GraphicsContext3D::getVertexAttribOffset):
140         (WebCore::GraphicsContext3D::texImage2D):
141         (WebCore::GraphicsContext3D::texSubImage2D):
142         (WebCore::GraphicsContext3D::createBuffer):
143         (WebCore::GraphicsContext3D::createFramebuffer):
144         (WebCore::GraphicsContext3D::createProgram):
145         (WebCore::GraphicsContext3D::createRenderbuffer):
146         (WebCore::GraphicsContext3D::createShader):
147         (WebCore::GraphicsContext3D::createTexture):
148         (WebCore::GraphicsContext3D::deleteBuffer):
149         (WebCore::GraphicsContext3D::deleteFramebuffer):
150         (WebCore::GraphicsContext3D::deleteProgram):
151         (WebCore::GraphicsContext3D::deleteRenderbuffer):
152         (WebCore::GraphicsContext3D::deleteShader):
153         (WebCore::GraphicsContext3D::deleteTexture):
154
155 2010-09-10  Oliver Hunt  <oliver@apple.com>
156
157         Qt build fix.
158
159         * bindings/js/SerializedScriptValue.cpp:
160         (WebCore::CloneDeserializer::deserialize):
161
162 2010-09-10  Adam Barth  <abarth@webkit.org>
163
164         Reviewed by Darin Adler.
165
166         Remove useless FrameLoader method
167         https://bugs.webkit.org/show_bug.cgi?id=45492
168
169         This method has one caller, and that caller already has a more direct
170         way of accessing the correct DocumentLoader.
171
172         * loader/FrameLoader.cpp:
173         * loader/FrameLoader.h:
174         * loader/MainResourceLoader.cpp:
175         (WebCore::MainResourceLoader::addData):
176
177 2010-09-10  Adam Barth  <abarth@webkit.org>
178
179         Reviewed by Eric Seidel.
180
181         Main resource bytes shouldn't bounce through FrameLoader
182         https://bugs.webkit.org/show_bug.cgi?id=45496
183
184         After the MainResourceLoader hands the bytes for the main resource to
185         the DocumentLoader, the DocumentLoader hands the bytes to the
186         FrameLoaderClient.  The FrameLoaderClient, in turn, returns the bytes
187         to WebCore.  Prior to this patch, the FrameLoaderClient returned the
188         bytes to the FrameLoader.  However, the FrameLoader was actually adding
189         any value.
190
191         In this patch, we change the FrameLoaderClient to return the bytes to
192         the DocumentLoader directly.  In a future patch, we'll cut out the
193         FrameLoaderClient middleman and handle the bytes internally in the
194         DocumentLoader.
195
196         * WebCore.exp.in:
197         * loader/DocumentLoader.cpp:
198         (WebCore::DocumentLoader::addData):
199         * loader/DocumentLoader.h:
200         * loader/FrameLoader.cpp:
201         (WebCore::FrameLoader::finishedLoadingDocument):
202         * loader/FrameLoader.h:
203
204 2010-09-10  Oliver Hunt  <oliver@apple.com>
205
206         Reviewed by Darin Adler.
207
208         Speed up deserialisation of strings
209         https://bugs.webkit.org/show_bug.cgi?id=45555
210
211         Rather than building a list of Identifiers for the string pool
212         we now build a list of a tuple of UString and JSString*.  This
213         doesn't hurt the property name case as ustring->identifier conversion
214         is essentially free if the ustring has already been converted to
215         an Identifier, but saves an unnecessary Identifier creation for
216         strings we only ever use to create JSStrings.  We also reduce
217         GC pressure for duplicate strings by caching the JSStrings.
218
219         * bindings/js/SerializedScriptValue.cpp:
220         (WebCore::CloneDeserializer::CachedString::CachedString):
221         (WebCore::CloneDeserializer::CachedString::jsString):
222         (WebCore::CloneDeserializer::CachedString::ustring):
223         (WebCore::CloneDeserializer::readStringData):
224         (WebCore::CloneDeserializer::putProperty):
225         (WebCore::CloneDeserializer::readFile):
226         (WebCore::CloneDeserializer::readTerminal):
227         (WebCore::CloneDeserializer::deserialize):
228
229 2010-09-10  Ryosuke Niwa  <rniwa@webkit.org>
230
231         Reviewed by Antonio Gomes.
232
233         REGRESSION(r67176): editing/selection/doubleclick-inline-first-last-contenteditable.html crashes
234         https://bugs.webkit.org/show_bug.cgi?id=45525
235
236         The crash was caused by ancestorToRetainStructureAndAppearance not taking into consideration
237         the case where there is no common block ancestor. Fixed this by adding a null check.
238
239         Test: editing/pasteboard/copy-without-common-block-crash.html
240
241         * editing/markup.cpp:
242         (WebCore::ancestorToRetainStructureAndAppearance): Added a null check.
243
244 2010-09-09  Kinuko Yasuda  <kinuko@chromium.org>
245
246         Reviewed by Dumitru Daniliuc.
247
248         [FileSystem] Do not call EntriesCallback more than once if there're no entries.
249         https://bugs.webkit.org/show_bug.cgi?id=45498
250
251         No new tests, layout-tests that confirm the behavior will be added in later patches.
252
253         * fileapi/FileSystemCallbacks.cpp:
254         (WebCore::EntriesCallbacks::EntriesCallbacks):
255         (WebCore::EntriesCallbacks::didReadDirectoryEntry):
256         (WebCore::EntriesCallbacks::didReadDirectoryEntries):
257
258 2010-09-10  Patrick Gansterer  <paroga@paroga.com>
259
260         Reviewed by Darin Adler.
261
262         Use String::fromUTF8 instead of UTF8Encoding().decode
263         in the libxml XMLDocumentParser
264         https://bugs.webkit.org/show_bug.cgi?id=45488
265
266         * dom/XMLDocumentParserLibxml2.cpp:
267         (WebCore::toString):
268
269 2010-09-10  Chris Fleizach  <cfleizach@apple.com>
270
271         Reviewed by David Kilzer.
272
273         AX: accessibility not returning strings when visibility is hidden
274         https://bugs.webkit.org/show_bug.cgi?id=45116
275
276         AX code uses plainText() in TextIterator to get the text for a node.
277         However, when that node is not visible, no text is returned because TextIterator ignores
278         clipped nodes and other hidden elements.
279
280         Solution is to add a new text iterator behavior for ignoring style visiblity. This allows
281         for text to allows be returned for accessibility purposes.
282
283         Test: platform/mac/accessibility/clipped-text-under-element.html
284
285         * WebCore.exp.in:
286         * accessibility/AccessibilityRenderObject.cpp:
287         (WebCore::AccessibilityRenderObject::textUnderElement):
288         (WebCore::AccessibilityRenderObject::stringValue):
289            Use the new flag for plainText
290         * editing/TextIterator.cpp:
291         (WebCore::TextIterator::TextIterator):
292         (WebCore::TextIterator::handleTextNode):
293         (WebCore::TextIterator::handleTextBox):
294         (WebCore::TextIterator::handleTextNodeFirstLetter):
295         (WebCore::TextIterator::handleReplacedElement):
296            Use the new flag to NOT skip hidden elements.
297         (WebCore::plainTextToMallocAllocatedBuffer):
298         (WebCore::plainText):
299         * editing/TextIterator.h:
300            Add the new text iterator behavior.
301
302 2010-09-10  Chris Fleizach  <cfleizach@apple.com>
303
304         Reviewed by David Kilzer.
305
306         Mail crashes with searching for next misspelled word with VoiceOver
307         https://bugs.webkit.org/show_bug.cgi?id=45501
308
309         Test: platform/mac/accessibility/crash-in-element-for-text-marker.html
310
311         * accessibility/mac/AccessibilityObjectWrapper.mm:
312         (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
313             Check that the AX object is not nil before asking for the wrapper().
314
315 2010-09-10  Michael Nordman  <michaeln@google.com>
316
317         Reviewed by Dumitru Daniliuc.
318
319         Decouple Blob from ScriptExecutionContext.
320         https://bugs.webkit.org/show_bug.cgi?id=45410
321
322         - Removed ScriptExecutionContext pointers from Blob and File constructors.
323         - Removed ScriptExecutionContext's collection of Blobs instance in that context.
324         - Refactored BlobURL to make a distinction between 'public' blob urls and 'internal'
325           urls that are used solely as identifiers. The former requires a SecurityOrigin to
326           to manufacture, the latter does not.
327         - Added a constant and accessor for the blob protocol scheme on the BlobURL class.
328
329         No new tests are added since this is a cleanup.
330
331         * bindings/js/SerializedScriptValue.cpp:
332         (WebCore::CloneDeserializer::readFile):
333         (WebCore::CloneDeserializer::readTerminal):
334         * bindings/v8/SerializedScriptValue.cpp:
335         (WebCore::ZigZag::Reader::readBlob):
336         (WebCore::ZigZag::Reader::readFile):
337         (WebCore::ZigZag::Reader::readFileList):
338         * dom/ScriptExecutionContext.cpp:
339         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
340         (WebCore::ScriptExecutionContext::createPublicBlobURL):
341         (WebCore::ScriptExecutionContext::revokePublicBlobURL):
342         * dom/ScriptExecutionContext.h:
343         * fileapi/Blob.cpp:
344         (WebCore::Blob::Blob):
345         (WebCore::Blob::~Blob):
346         (WebCore::Blob::slice):
347         * fileapi/Blob.h:
348         (WebCore::Blob::create):
349         (WebCore::Blob::url):
350         * fileapi/Blob.idl:
351         * fileapi/BlobBuilder.cpp:
352         (WebCore::BlobBuilder::getBlob):
353         * fileapi/BlobBuilder.h:
354         * fileapi/BlobBuilder.idl:
355         * fileapi/BlobURL.cpp:
356         (WebCore::BlobURL::createPublicURL):
357         (WebCore::BlobURL::createInternalURL):
358         (WebCore::BlobURL::getOrigin):
359         (WebCore::BlobURL::getIdentifier):
360         (WebCore::BlobURL::createBlobURL):
361         * fileapi/BlobURL.h:
362         (WebCore::BlobURL::blobProtocol):
363         (WebCore::BlobURL::BlobURL):
364         * fileapi/File.cpp:
365         (WebCore::File::File):
366         * fileapi/File.h:
367         (WebCore::File::create):
368         * fileapi/FileReader.cpp: Register a public url to perform the read.
369         (WebCore::FileReader::cleanup):
370         (WebCore::FileReader::start):
371         (WebCore::FileReader::didFinishLoading):
372         (WebCore::FileReader::failed):
373         * fileapi/FileReader.h: Added m_urlForReading data member.
374         * fileapi/FileReaderSync.cpp:
375         (WebCore::FileReaderSync::read): Register a public url to perform the read.
376         * fileapi/ThreadableBlobRegistry.cpp:
377         (WebCore::ThreadableBlobRegistry::registerBlobURL):
378         (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
379         * fileapi/ThreadableBlobRegistry.h:
380         * html/HTMLInputElement.cpp:
381         (WebCore::HTMLInputElement::appendFormData):
382         (WebCore::HTMLInputElement::setFileListFromRenderer):
383         * page/SecurityOrigin.cpp: Use BlobURL.blobProtocol().
384         (WebCore::SecurityOrigin::create):
385         (WebCore::SecurityOrigin::canRequest):
386         (WebCore::SecurityOrigin::canDisplay):
387         * platform/chromium/ClipboardChromium.cpp:
388         (WebCore::ClipboardChromium::files):
389         * platform/gtk/ClipboardGtk.cpp:
390         (WebCore::ClipboardGtk::files):
391         * platform/mac/ClipboardMac.mm:
392         (WebCore::ClipboardMac::files):
393         * platform/win/ClipboardWin.cpp:
394         (WebCore::ClipboardWin::files):
395
396 2010-09-10  Xan Lopez  <xlopez@igalia.com>
397
398         Reviewed by Martin Robinson.
399
400         GDK_DISPLAY was removed in GTK+ 3.x, re-declare it when built
401         against that.
402
403         * platform/gtk/GtkVersioning.h:
404
405 2010-09-10  Xan Lopez  <xlopez@igalia.com>
406
407         Reviewed by Martin Robinson.
408
409         Fix compilation with GTK+ 3.x.
410
411         GDK key macros were renamed from GDK_FOO to GDK_KEY_FOO, we need
412         to include the compat header provided if we want to keep using the
413         old names.
414
415         * platform/gtk/GtkVersioning.h: add the compatibility header.
416         * platform/gtk/KeyEventGtk.cpp: include GtkVersioning.h
417
418 2010-09-09  Tony Gentilcore  <tonyg@chromium.org>
419
420         Reviewed by Eric Seidel.
421
422         Factor out the NestingLevelIncrementer
423         https://bugs.webkit.org/show_bug.cgi?id=45471
424
425         No new tests because no new functionality.
426
427         * GNUmakefile.am:
428         * WebCore.gypi:
429         * WebCore.vcproj/WebCore.vcproj:
430         * WebCore.xcodeproj/project.pbxproj:
431         * html/parser/HTMLDocumentParser.cpp:
432         * html/parser/HTMLDocumentParser.h:
433         * html/parser/HTMLScriptRunner.cpp:
434         * html/parser/NestingLevelIncrementer.h: Added.
435         (WebCore::NestingLevelIncrementer::NestingLevelIncrementer):
436         (WebCore::NestingLevelIncrementer::~NestingLevelIncrementer):
437
438 2010-09-10  Nikolas Zimmermann  <nzimmermann@rim.com>
439
440         Reviewed by Dirk Schulze.
441
442         SVG text chunk concept needs to be integrated in the InlineBox structure
443         https://bugs.webkit.org/show_bug.cgi?id=45533
444
445         Begin rewriting the SVG text layout code. As first step move the text chunk concept right into the inline box structure.
446         This obsoletes the whole text chunk part concept (see SVGTextChunkLayoutInfo.h for details), and will soon simplify the
447         whole layout code a lot. Previously we hacked around the fact that a single InlineTextBox could contain multiple text chunks
448         For example: <text x="20 30 40">ABC</text> only led to the creation of one InlineTextBox containing three chunks. When
449         painting such an InlineTextBox, we had to do nasty hacks (same for text selection etc.)
450         
451         This is finally fixed by incorporating the knownledge about text chunks into the line layout algorithm.
452         Note, this has no impact on HTML at all, no worries.
453
454         It's even required to do it this way as BiDi reordering shouldn't happen across text chunks.
455         These are only the first bits, and currently slows down text layouting. Follow-up patches will remove the old layout
456         algorithm, and will rely on the stored SVGTextLayoutAttributes in the RenerSVGInlineText renderers (instead of computing again).
457
458         * Android.mk: Add rendering/svg/SVGTextLayoutAttributes.* & rendering/svg/SVGTextLayoutBuilder.* to build.
459         * CMakeLists.txt: Ditto.
460         * GNUmakefile.am: Ditto.
461         * WebCore.gyp/WebCore.gyp: Ditto.
462         * WebCore.gypi: Ditto.
463         * WebCore.pro: Ditto.
464         * WebCore.vcproj/WebCore.vcproj: Ditto.
465         * WebCore.vcproj/WebCoreCommon.vsprops: Ditto. (Recognize new rendering/svg directory.)
466         * WebCore.vcproj/copyForwardingHeaders.cmd: Ditto. (Copy forwarding headers from rendering/svg directory.)
467         * WebCore.xcodeproj/project.pbxproj: Ditto.
468         * rendering/RenderBlockLineLayout.cpp: This is the key of the new concept, take text chunks into account when building the InlineBox structure.
469         (WebCore::RenderBlock::findNextLineBreak): Split midpointState, if we encounter the beginning of a new text chunk.
470         * rendering/RenderObject.h:
471         (WebCore::RenderObject::isSVGInline): New method, which will be used to identify RenderSVGInline objects.
472         * rendering/RenderSVGInline.h:
473         (WebCore::RenderSVGInline::isSVGInline): Return true.
474         * rendering/RenderSVGInlineText.cpp:
475         (WebCore::RenderSVGInlineText::linesBoundingBox): Overriden, to simplify the calculations for SVG.
476         (WebCore::RenderSVGInlineText::characterStartsNewTextChunk): Determines wheter the given position starts a new text chunk.
477         * rendering/RenderSVGInlineText.h:
478         (WebCore::RenderSVGInlineText::storeLayoutAttributes): Stores the layout attributes calculated in the text layout process (will be used everywhere in follow-up patches).
479         * rendering/RenderSVGText.cpp:
480         (WebCore::RenderSVGText::layout): Invoke SVGTextLayoutBuilder before creating the inline box tree, so we can decide which characters start new text chunks.
481         * rendering/RenderText.h: Made linesBoundingBox() virtual so RenderSVGInlineText can override it.
482         * rendering/svg: Added.
483         * rendering/svg/SVGTextLayoutAttributes.cpp: Added. Holds x/y/dx/dy/rotate values and all kerning/ligature information used during layout.
484         * rendering/svg/SVGTextLayoutAttributes.h: Added.
485         * rendering/svg/SVGTextLayoutBuilder.cpp: Added.
486         * rendering/svg/SVGTextLayoutBuilder.h: Added.
487
488 2010-09-10  Csaba Osztrogonác  <ossy@webkit.org>
489
490         Unreviewed fix after r67085.
491
492         * WebCore.pro: Fix previously moved filenames.
493
494 2010-09-10  Adam Barth  <abarth@webkit.org>
495
496         Reviewed by Eric Seidel.
497
498         Inline FrameLoader::committedLoad into its one caller
499         https://bugs.webkit.org/show_bug.cgi?id=45481
500
501         This saves one round-trip through the FrameLoader when loading
502         documents.
503
504         * loader/DocumentLoader.cpp:
505         (WebCore::DocumentLoader::commitLoad):
506         * loader/FrameLoader.cpp:
507         * loader/FrameLoader.h:
508
509 2010-09-10  Patrick Gansterer  <paroga@paroga.com>
510
511         Reviewed by Adam Roben.
512
513         [WINCE] Remove ImageBuffer::toDataURL implementation
514         https://bugs.webkit.org/show_bug.cgi?id=45478
515
516         At the moment ImageBuffer::toDataURL uses JPEGEncoder.h and PNGEncoder.h.
517         Both files are not in the repository. So remove the implementation for now.
518
519         * platform/graphics/wince/ImageBufferWince.cpp:
520         (WebCore::ImageBuffer::toDataURL):
521
522 2010-09-10  Andreas Kling  <andreas.kling@nokia.com>
523
524         Reviewed by Antonio Gomes.
525
526         WebGL: Fix GCC warnings about suggested parentheses around && within ||
527         https://bugs.webkit.org/show_bug.cgi?id=45534
528
529         * html/canvas/WebGLRenderingContext.cpp:
530         (WebCore::WebGLRenderingContext::getVertexAttrib):
531         (WebCore::WebGLRenderingContext::readPixels):
532         (WebCore::WebGLRenderingContext::texParameter):
533         (WebCore::WebGLRenderingContext::handleNPOTTextures):
534
535 2010-09-09  Alexander Pavlov  <apavlov@chromium.org>
536
537         Reviewed by Yury Semikhatsky.
538
539         Web Inspector: Add navigation items into the Elements panel context menu.
540
541         For all anchors that have the class of "webkit-html-resource-link" or "webkit-html-external-link",
542         a custom context menu with the items "Open Link in New Window" (invokes InspectorBackend.openInInspectedWindow() with
543         the related URL) and "Open Link in Resources Panel" (opens the related resource in the Resources panel) is shown
544         (the latter item is displayed only if the corresponding resource is known to the Web Inspector).
545         https://bugs.webkit.org/show_bug.cgi?id=34250
546
547         * English.lproj/localizedStrings.js:
548         * inspector/front-end/ElementsPanel.js:
549         (WebInspector.ElementsPanel.prototype.populateHrefContextMenu):
550         * inspector/front-end/ElementsTreeOutline.js:
551         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
552         (WebInspector.ElementsTreeElement.prototype._attributeHTML):
553         * inspector/front-end/StylesSidebarPane.js:
554         (WebInspector.StylesSidebarPane.prototype._contextMenuEventFired):
555         * inspector/front-end/inspector.js:
556         (WebInspector.openResource):
557         (WebInspector.resourceURLForRelatedNode):
558
559 2010-09-10  Kwang Yul Seo  <skyul@company100.net>
560
561         Reviewed by James Robinson.
562
563         Make sure skia is not Chromium specific
564         https://bugs.webkit.org/show_bug.cgi?id=39672
565
566         Move Image::loadPlatformResource to platform/graphics/chromium/ImageChromium.cpp.
567         Other ports can use ImageSkia.cpp.
568
569         No new tests because this is pure refacotring.
570
571         * WebCore.gyp/WebCore.gyp:
572         * WebCore.gypi:
573         * platform/graphics/chromium/ImageChromium.cpp: Added.
574         (WebCore::Image::loadPlatformResource):
575         * platform/graphics/skia/ImageSkia.cpp:
576
577 2010-09-09  Ilya Tikhonovsky  <loislo@chromium.org>
578
579         Reviewed by Joseph Pecoraro.
580
581         WebInspector: Selecting 'inspect element' always shows body in inspector instead of clicked element.
582
583         1. Open any page
584         2. Right-click on any element, select "Inspect Element"
585         3. Web Inspector is opened but the <body> element (for HTML) is focused rather than the selected element
586         4. Inspect the Web Inspector. An error message is logged in the console.
587
588         The regression was introduced in http://trac.webkit.org/changeset/66012 - focusNode() is invoked in
589         InspectorController::populateScriptObjects() before the main document is set for the InspectorDOMAgent
590         instance (which makes focusNode() bail out prematurely).
591
592         https://bugs.webkit.org/show_bug.cgi?id=45374
593
594         * inspector/InspectorController.cpp:
595         (WebCore::InspectorController::populateScriptObjects):
596
597 2010-09-10  Cris Neckar  <cdn@chromium.org>
598
599         Reviewed by Chris Fleizach.
600
601         Null deref in RenderBlock::updateFirstLetter(). Check for null psuedo style.
602         https://bugs.webkit.org/show_bug.cgi?id=45404
603
604         Test: fast/dom/firstletter-tablecell-crash.html
605
606         * rendering/RenderBlock.cpp:
607         (WebCore::RenderBlock::updateFirstLetter):
608
609 2010-09-10  Cris Neckar  <cdn@chromium.org>
610
611         Reviewed by Chris Fleizach.
612
613         Null deref in RenderBlock::findNextLineBreak(). Check for null style with
614         first-line style and fixed position.
615         https://bugs.webkit.org/show_bug.cgi?id=45350
616
617         Test: fast/dom/firstline-fixed-crash.html
618
619         * rendering/RenderBlockLineLayout.cpp:
620         (WebCore::RenderBlock::findNextLineBreak):
621
622 2010-09-10  Eric Seidel  <eric@webkit.org>
623
624         Reviewed by Dimitri Glazkov.
625
626         Remove support for non-lazy attach and fix frames to load from insertedIntoDocument instead of attach
627         https://bugs.webkit.org/show_bug.cgi?id=45365
628
629         This change is the last piece of the puzzle which was preventing us from
630         removing all eager-attach logic and moving WebCore to using an entirely
631         recalcStyle-driven, on-demand renderer creation system, instead of every
632         element being synchronously attached during parsing, regardless of whether
633         it was ever going to be displayed or not.
634
635         This does not change the places we call lazyAttach vs. attach.  This only
636         changes the behavior of frame/plugin elements when lazyAttach is called.
637         Previously lazyAttach would eager-attach those elements (and their ancestors)
638         because they were marked as canLazyAttach() { return false; }.
639
640         This is a very tricky change, please review carefully.
641
642         Mostly I'm moving logic which used to be in attach() into
643         insertedIntoDocument.  Once it was there, there was no longer any reason
644         why frame elements couldn't lazyAttach, thus removing the need
645         for the non-lazy attach code path entirely.
646         We've not yet converted all callsites over to using lazyAttach() instead
647         of attach() however.
648
649         In order to move frame loading logic into insertedIntoDocument
650         instead of attach, I needed to make sure that any javascript calls
651         during the load would see an attached element.  Thus I needed to mark
652         the element as needing style resolve so that it would attach itself
653         if needed.
654
655         I was not able to just call lazyAttach() from insertedIntoDocument directly
656         due to two conflicting assumptions in the rendering tree:
657          1. ContainerNode::attach() assumes its "safe" to call attach on all children
658             without checking first if the child is already attached.  This seems sane
659             since its strange to think of a subtree as being attached w/o ancestors
660             already being attached.  Although it is a hard rule that subtrees may not
661             have renderers w/o ancestors also having renderers, I do not believe it's
662             a hard rule that subtrees may not be attached.  Remember, attached() does
663             not imply renderer()!  It's possible ContainerNode::attach()'s assumption is wrong here.
664          2. Node::attach() asserts !attached().  This makes sense and I would not
665             want to remove this assert, however it means that if insertedIntoDocument
666             were to call lazyAttach() (thus marking the element as attached()) then
667             all callers would need to check if the element was already attached after
668             insertedIntoDocument (called by appendChild, parserAppendChild, etc.)
669             before calling attach or lazyAttach().  The following example:
670             element.innerHTML = "<span><iframe></span>" is one case where this
671             ASSERT would be hit if insertedIntoDocument called lazyAttach, since
672             ContainerNode::attach() (called on the span by in appendChild(DocumentFragment) code)
673             does not check if iframe is already attached.
674
675         Note: One subtle change here is that synchronous javascript which results
676         from javascript: or beforeload is now run as part of insertedIntoDocument
677         (thus any insert/append call *even* parserAddChild) instead of being
678         run during attach (technically in the post-attach callbacks).
679
680         This is covered by numerous layout tests.
681
682         * dom/ContainerNode.cpp:
683         (WebCore::willRemoveChild):
684         (WebCore::willRemoveChildren):
685          - Since insertedIntoDocument starts a load and yet does not mark the
686            element as attached, we need to always call willRemove().
687            See note above as to why we don't just mark attached() in insertedIntoDocument.
688         * dom/Node.cpp:
689         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
690          - Share some code between lazyAttach and setNeedsStyleRecalc.
691         (WebCore::Node::setNeedsStyleRecalc):
692          - Use the new markAncestorsWithChildNeedsStyleRecalc
693         (WebCore::Node::lazyAttach):
694          - Remove the non-lazy code path, and use markAncestorsWithChildNeedsStyleRecalc.
695          - Add an option to lazyAttach without marking attached(), used by HTMLFrameElementBase::insertedIntoDocument.
696         * dom/Node.h:
697         * html/HTMLFrameElementBase.cpp:
698          - m_shouldOpenURLAfterAttach is no longer needed, yay!
699          - m_checkAttachedTimer no longer has anything to do with attached(), so renamed it.
700            I also documented that the newly named m_checkInDocumentTimer is all about the
701            "magic iframe" performance quirk.  (Which is actually speced in HTML5).
702            I was initially baffled by this code, so I documented it.
703         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase)
704         (WebCore::HTMLFrameElementBase::insertedIntoDocument):
705          - This is the meat of this change, see discussion above.
706         (WebCore::HTMLFrameElementBase::attach):
707          - Code deleted or moved to insertedIntoDocument.
708         (WebCore::HTMLFrameElementBase::width):
709          - Fixed a bug in height()/width() which was probably causing crashes
710            and was causing incorrect behavior after this change.
711            renderBox() is not necessarily valid unless layout is up to date.
712            Updating layout, can cause renderBox() to go invalid, thus this
713            could have been a null-pointer crash.
714         (WebCore::HTMLFrameElementBase::height): see width()
715         (WebCore::HTMLFrameElementBase::setRemainsAliveOnRemovalFromTree): Timer rename.
716         (WebCore::HTMLFrameElementBase::checkInDocumentTimerFired): Timer rename.
717         * html/HTMLFrameElementBase.h:
718         * html/HTMLFrameOwnerElement.cpp:
719         (WebCore::HTMLFrameOwnerElement::willRemove):
720          - Disconnecting the owner element removes the frame from the frame tree.
721            frameDetached() calls Page::frameCount which expects that the frame is
722            already gone at this point and asserts when it's not.  It's unclear how
723            this worked before, except that the frame removal was likely done in the
724            post-attach callback, so the frameCount was wrong (too high) during
725            frameDetached(), but was fixed up in the post-detach callback.
726         * html/parser/HTMLConstructionSite.cpp:
727         (WebCore::HTMLConstructionSite::attachAtSite):
728           - Simplified this code, and added a check for the case when the node was already removed.
729             Since the load logic is now run during insertedIntoDocument instead of attach(),
730             synchronous javascript is now running during insertedIntoDocument and we need to
731             make sure that the child is still in the tree.
732
733 2010-09-10  Dirk Pranke  <dpranke@chromium.org>
734
735         Unreviewed, rolling out r67178.
736         http://trac.webkit.org/changeset/67178
737         https://bugs.webkit.org/show_bug.cgi?id=45524
738
739         re-roll-out patch to put original changes back in
740
741         * html/HTMLObjectElement.cpp:
742         (WebCore::HTMLObjectElement::parametersForPlugin):
743         (WebCore::HTMLObjectElement::updateWidget):
744         * loader/SubframeLoader.cpp:
745         (WebCore::SubframeLoader::resourceWillUsePlugin):
746         * loader/SubframeLoader.h:
747
748 2010-09-10  Dirk Pranke  <dpranke@chromium.org>
749
750         Reviewed by Kent Tamura.
751
752         roll out r66992 and r66997 - possibly introduced a perf slowdown in chromium tests
753         https://bugs.webkit.org/show_bug.cgi?id=45524
754
755         * html/HTMLObjectElement.cpp:
756         (WebCore::HTMLObjectElement::parametersForPlugin):
757         (WebCore::HTMLObjectElement::updateWidget):
758         * loader/SubframeLoader.cpp:
759         (WebCore::SubframeLoader::requestFrame):
760         * loader/SubframeLoader.h:
761
762 2010-09-10  Ryosuke Niwa  <rniwa@webkit.org>
763
764         Reviewed by Tony Chang.
765
766         Extract the code to find special ancestors in createMarkup into a function
767         https://bugs.webkit.org/show_bug.cgi?id=45449
768
769         Extracted the code to find special common ancestors in createMarkup as highestAncestorToWrapMarkup.
770         Also isolated the code to find ancestors required to retain structure and appearance into
771         ancestorToRetainStructureAndAppearance.
772
773         No new tests are added since this is a cleanup.
774
775         * editing/markup.cpp:
776         (WebCore::ancestorToRetainStructureAndAppearance): Added.
777         (WebCore::propertyMissingOrEqualToNone): Moved.
778         (WebCore::isElementPresentational): Moved.
779         (WebCore::shouldIncludeWrapperForFullySelectedRoot): Added. isSpecialAncestorBlock is merged into this function.
780         (WebCore::highestAncestorToWrapMarkup): Extracted from createMarkup.
781         (WebCore::createMarkup): Calls highestAncestorToWrapMarkup.
782
783 2010-09-09  Adam Barth  <abarth@webkit.org>
784
785         Reviewed by Dimitri Glazkov.
786
787         Spurious null check in MediaDocumentParser
788         https://bugs.webkit.org/show_bug.cgi?id=45461
789
790         Trivial change.  FrameLoader can never be null.
791
792         * html/MediaDocument.cpp:
793         (WebCore::MediaDocumentParser::createDocumentStructure):
794
795 2010-09-09  Ryosuke Niwa  <rniwa@webkit.org>
796
797         Reviewed by Eric Seidel.
798
799         REGRESSION: applying new font size causes font-size outside selection to change
800         https://bugs.webkit.org/show_bug.cgi?id=45026
801
802         The regression was caused by removeImplicitlyStyledElement not converting font size to CSS value properly.
803         Namely, it was treating font size as a pixel value for font-size property.  Fixed this by adding fontSizeToCSSValue
804         which uses HTMLFontElement::cssValueFromFontSizeNumber and deployed it in removeImplicitlyStyledElement
805
806         Also fixed a bug in StyleChange::extractTextStyles that it ignores font-size property when the values were
807         relative terms such as x-small and -webkit-xxx-large. And replaced the logic to convert from pixel font size
808         to legacy font size by CSSStyleSelector::legacyFontSize.
809
810         Test: editing/style/push-down-font-styles.html
811
812         * editing/ApplyStyleCommand.cpp:
813         (WebCore::StyleChange::extractTextStyles): Fixed a bug. See above.
814         (WebCore::stringToCSSValue): Converts string to CSSValue.
815         (WebCore::fontSizeToCSSValue): Converts font size number (String) to CSSPrimitiveValue.
816         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Calls stringToCSSValue and fontSizeToCSSValue.
817         * css/CSSStyleSelector.h: Made fontSizeForKeyword public.
818
819 2010-09-09  Kent Tamura  <tkent@chromium.org>
820
821         Unreviewed, build fix for Qt.
822
823         * css/CSSStyleSelector.cpp:
824         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
825
826 2010-09-09  Dominic Cooney  <dominicc@google.com>
827
828         Reviewed by Kent Tamura.
829
830         Moves location.replace bindings logic into bindings/generic and
831         instantiates it for JSC and V8.
832
833         https://bugs.webkit.org/show_bug.cgi?id=44891
834
835         Covered by existing location.replace tests.
836
837         * GNUmakefile.am:
838         * WebCore.gypi:
839         * WebCore.pro:
840         * WebCore.vcproj/WebCore.vcproj:
841         * WebCore.vcproj/WebCoreCommon.vsprops:
842         * WebCore.xcodeproj/project.pbxproj:
843         * bindings/generic/BindingDOMWindow.h:
844         * bindings/generic/BindingFrame.h: Added.
845         (WebCore::::navigateIfAllowed):
846         * bindings/generic/BindingLocation.h: Added.
847         (WebCore::::replace):
848         * bindings/generic/GenericBinding.h:
849         (WebCore::completeURL):
850         * bindings/js/JSBinding.h: Added.
851         * bindings/js/JSBindingsAllInOne.cpp:
852         * bindings/js/JSDOMBinding.cpp:
853         (WebCore::shouldAllowNavigation):
854         (WebCore::toLexicalFrame):
855         (WebCore::toDynamicFrame):
856         (WebCore::processingUserGesture):
857         (WebCore::completeURL):
858         * bindings/js/JSLocationCustom.cpp:
859         (WebCore::navigateIfAllowed):
860         (WebCore::JSLocation::replace):
861         * bindings/js/specialization/JSBindingState.cpp: Added.
862         (WebCore::::getActiveFrame):
863         (WebCore::::getFirstFrame):
864         (WebCore::::processingUserGesture):
865         (WebCore::::allowsAccessFromFrame):
866         * bindings/js/specialization/JSBindingState.h: Added.
867         * bindings/v8/V8Binding.h:
868         * bindings/v8/V8Utilities.cpp:
869         (WebCore::completeURL):
870         (WebCore::navigateIfAllowed):
871         * bindings/v8/custom/V8LocationCustom.cpp:
872         (WebCore::V8Location::replaceCallback):
873         * bindings/v8/specialization/V8BindingState.cpp:
874         (WebCore::::allowsAccessFromFrame):
875         * bindings/v8/specialization/V8BindingState.h:
876
877 2010-09-09  Kent Tamura  <tkent@chromium.org>
878
879         Reviewed by Dimitri Glazkov.
880
881         Apply :invalid CSS class to <input type=number> with an unacceptable value
882         https://bugs.webkit.org/show_bug.cgi?id=45376
883
884         Apply :invalid CSS class to <input type=number> elements with an
885         unacceptable value in order to tell users that a value is not
886         valid.
887
888         Introducing Element::hasUnaccceptableValue(), and CSSStyleSelector
889         applies :invalid to not only elements with !isValidFormControlElement()
890         but also elements with hasUnaccceptableValue().
891
892         HTMLInputElement and RenderTextControlSingleLine need some changes
893         to update style and to avoid updating renderer value during style
894         update.
895
896         Test: fast/forms/input-number-unacceptable-style.html
897
898         * css/CSSStyleSelector.cpp:
899         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
900         * dom/Element.h:
901         (WebCore::Element::hasUnacceptableValue):
902         * html/HTMLInputElement.cpp:
903         (WebCore::HTMLInputElement::handleBlurEvent):
904         (WebCore::HTMLInputElement::hasUnacceptableValue):
905         * html/HTMLInputElement.h:
906         * rendering/RenderTextControlSingleLine.cpp:
907         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
908         (WebCore::RenderTextControlSingleLine::updateFromElement):
909
910 2010-09-09  Kent Tamura  <tkent@chromium.org>
911
912         Reviewed by Dimitri Glazkov.
913
914         <input type=number> should not have an invalid number as its value
915         https://bugs.webkit.org/show_bug.cgi?id=43973
916
917         This change implements the value sanitization algorithm for
918         type=number, and remove validity.typeMismatch support for
919         type=number in order to improve HTML5 conformance.
920
921         HTMLInputElement::value for type=number always has a valid number
922         string or an empty string. However, the input field for it, a
923         RenderTextControlSingleLine, can have a non-number string. For
924         example, '-' is a non-number string, but a user needs to type
925         '-'. So, the string in the input field has never been committed to
926         HTMLInputElement until the string becomes a valid number string.
927
928         This change is also a preparation of supporting localized
929         numbers. A localized string in the input field would not be
930         matched with HTMLInputElement::value.
931
932         Test: fast/forms/input-number-commit-valid-only.html
933
934         * dom/InputElement.h: Add isAcceptableValue()
935         * html/HTMLInputElement.cpp:
936         (WebCore::HTMLInputElement::handleBlurEvent):
937          Set formControlValueMatchesRenderer false to clean an invalid value in the renderer.
938         (WebCore::HTMLInputElement::isAcceptableValue):
939         (WebCore::HTMLInputElement::sanitizeValue):
940         * html/HTMLInputElement.h:
941         * html/ValidityState.cpp:
942         (WebCore::ValidityState::typeMismatch): Always returns false for type=number.
943         * rendering/RenderTextControlSingleLine.cpp:
944         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
945         * wml/WMLInputElement.h:
946         (WebCore::WMLInputElement::isAcceptableValue):
947
948 2010-09-09  Tony Gentilcore  <tonyg@chromium.org>
949
950         Reviewed by Adam Barth.
951
952         Support <script async> as specified by HTML5
953         https://bugs.webkit.org/show_bug.cgi?id=45310
954
955         Tests: fast/dom/HTMLScriptElement/async-inline-script.html
956                fast/dom/HTMLScriptElement/async-onbeforeload.html
957                fast/dom/HTMLScriptElement/async-write.html
958                http/tests/misc/async-and-defer-script.html
959                http/tests/misc/script-async.html
960
961         * dom/AsyncScriptRunner.cpp:
962         (WebCore::AsyncScriptRunner::AsyncScriptRunner):
963         (WebCore::AsyncScriptRunner::~AsyncScriptRunner):
964         (WebCore::AsyncScriptRunner::executeScriptSoon): Increment the delay count when a task to execute scripts is queued up.
965         (WebCore::AsyncScriptRunner::timerFired): decrementLoadEventDelayCount handles calling checkCompleted().
966         * dom/AsyncScriptRunner.h:
967         (WebCore::AsyncScriptRunner::create):
968         * dom/Document.cpp:
969         (WebCore::Document::Document):
970         * dom/ScriptElement.cpp:
971         (WebCore::ScriptElement::insertedIntoDocument): Treats async scripts just like a dynamically inserted script element rather than a parser inserted one.
972         * html/parser/HTMLScriptRunner.cpp:
973         (WebCore::HTMLScriptRunner::runScript):
974
975 2010-09-09  Alexey Marinichev  <amarinichev@chromium.org>
976
977         Reviewed by James Robinson.
978
979         [chromium] Disable subpixel rendering in Linux when GPU compositor is active
980         https://bugs.webkit.org/show_bug.cgi?id=45087
981
982         This extends windows-only logic to chromium linux as well.
983
984         * platform/graphics/chromium/ContentLayerChromium.cpp:
985         (WebCore::ContentLayerChromium::updateContents):
986         * platform/graphics/chromium/FontLinux.cpp:
987         (WebCore::adjustTextRenderMode): Added a check to see if the compositor is active.
988         (WebCore::Font::drawGlyphs):
989         (WebCore::Font::drawComplexText):
990         * platform/graphics/chromium/LayerRendererChromium.cpp:
991         (WebCore::LayerRendererChromium::setRootLayerCanvasSize):
992         * platform/graphics/chromium/VideoLayerChromium.cpp:
993         (WebCore::VideoLayerChromium::updateContents):
994         * platform/graphics/skia/ImageBufferSkia.cpp:
995         (WebCore::ImageBuffer::ImageBuffer):
996         (WebCore::ImageBuffer::clip):
997         * platform/graphics/skia/PlatformContextSkia.cpp:
998         Made setDrawingToImageBuffer and isDrawingToImageBuffer available to
999         Linux; removed all #if OS(WINDOWS) || OS(LINUX).
1000         (WebCore::PlatformContextSkia::State::State):
1001         (WebCore::PlatformContextSkia::PlatformContextSkia):
1002         (WebCore::PlatformContextSkia::isDrawingToImageBuffer):
1003         (WebCore::PlatformContextSkia::save):
1004         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
1005         (WebCore::PlatformContextSkia::restore):
1006         (WebCore::PlatformContextSkia::applyClipFromImage):
1007         * platform/graphics/skia/PlatformContextSkia.h:
1008
1009 2010-09-09  Kinuko Yasuda  <kinuko@chromium.org>
1010
1011         Unreviewed, Windows build fix.
1012
1013         * WebCore.vcproj/WebCore.vcproj:
1014
1015 2010-09-09  Kinuko Yasuda  <kinuko@chromium.org>
1016
1017         Reviewed by Jian Li.
1018
1019         [FileSystem] Add File and FileWriter accessor methods in FileEntry
1020         https://bugs.webkit.org/show_bug.cgi?id=45440
1021
1022         Adding file() and createWrite() methods in FileEntry.
1023         http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-fileentry-interface
1024
1025         No new tests; this patch doesn't have implementation yet.
1026
1027         * CMakeLists.txt:
1028         * DerivedSources.cpp:
1029         * DerivedSources.make:
1030         * GNUmakefile.am:
1031         * WebCore.gypi:
1032         * WebCore.pri:
1033         * WebCore.pro:
1034         * WebCore.vcproj/WebCore.vcproj:
1035         * WebCore.xcodeproj/project.pbxproj:
1036         * fileapi/FileEntry.cpp:
1037         (WebCore::FileEntry::createWriter): Added.
1038         (WebCore::FileEntry::file): Added.
1039         * fileapi/FileEntry.h:
1040         * fileapi/FileEntry.idl:
1041         * fileapi/FileCallback.h: Added.
1042         * fileapi/FileCallback.idl: Added.
1043         * fileapi/FileWriterCallback.h: Added.
1044         * fileapi/FileWriterCallback.idl: Added.
1045
1046 2010-09-09  Yuzo Fujishima  <yuzo@google.com>
1047
1048         Reviewed by Darin Adler.
1049
1050         Fix for Bug 24742 - CSS tokenizer allows color in 6 hex digit notation to be followed by the next token without separation
1051         Stop checking in the flex definition the number of hexadecimal digits for a hex color.
1052         Instead, rely on the checking in Color::parseHexColor().
1053         The resultant grammar is actually more close to the one in http://www.w3.org/TR/CSS21/grammar.html .
1054
1055         https://bugs.webkit.org/show_bug.cgi?id=24742
1056
1057         Test: fast/css/invalid-hex-color.html
1058
1059         * css/tokenizer.flex:
1060
1061 2010-09-09  Chris Rogers  <crogers@google.com>
1062
1063         Reviewed by Kenneth Russell.
1064
1065         Add AudioSourceNode files
1066         https://bugs.webkit.org/show_bug.cgi?id=45010
1067
1068         No new tests since audio API is not yet implemented.
1069
1070         * webaudio/AudioSourceNode.h: Added.
1071         (WebCore::AudioSourceNode::AudioSourceNode):
1072         * webaudio/AudioSourceNode.idl: Added.
1073
1074 2010-09-09  James Robinson  <jamesr@chromium.org>
1075
1076         Reviewed by Kenneth Russell.
1077
1078         [chromium] Don't call deleteTexture on a texture attached to an FBO that is not currently bound
1079         https://bugs.webkit.org/show_bug.cgi?id=45504
1080
1081         The OpenGL semantics for glDeleteTextures() are that if one of the specified texture is attached
1082         to the currently bound FBO, that FBO's color attachment is removed.  However, if the specified
1083         texture is attached to a non-current FBO then OpenGL states explicitly that that FBO's color
1084         attachment is not cleared and that the texture stays alive even though its ID is no longer
1085         valid to use.  This is not the behavior we want in DrawingBuffer - we actually want the
1086         texture to be immediately deleted.  This patch makes sure the DrawingBuffer's FBO is bound
1087         before deleting its color attachment texture.
1088
1089         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1090         (WebCore::DrawingBuffer::~DrawingBuffer):
1091         (WebCore::DrawingBuffer::reset):
1092
1093 2010-09-09  James Robinson  <jamesr@chromium.org>
1094
1095         Reviewed by Kenneth Russell.
1096
1097         [chromium] Chromium mac build should exclude all Skia files in platform/graphics/skia/, not just some
1098         https://bugs.webkit.org/show_bug.cgi?id=45516
1099
1100         This excludes platform/graphics/skia/*Skia.(h|cpp) by pattern instead of individual files.
1101         None of these files should be compiled into the Chromium mac build and the old file list had
1102         both omissions and stale entries.
1103
1104         * WebCore.gyp/WebCore.gyp:
1105
1106 2010-09-09  Dirk Pranke  <dpranke@chromium.org>
1107
1108         Unreviewed, rolling out r67145.
1109         http://trac.webkit.org/changeset/67145
1110         https://bugs.webkit.org/show_bug.cgi?id=45431
1111
1112         broke editing/inserting/5994480-2.html on Chromium Linux
1113
1114         * css/CSSStyleSelector.h:
1115         * editing/ApplyStyleCommand.cpp:
1116         (WebCore::StyleChange::init):
1117         (WebCore::StyleChange::extractTextStyles):
1118         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
1119
1120 2010-09-09  Dumitru Daniliuc  <dumi@chromium.org>
1121
1122         Reviewed by Alexey Proskuryakov.
1123
1124         Removing an obsolete comment.
1125         https://bugs.webkit.org/show_bug.cgi?id=40112
1126
1127         * bindings/generic/ActiveDOMCallback.cpp:
1128
1129 2010-09-09  James Robinson  <jamesr@chromium.org>
1130
1131         Reviewed by Kenneth Russell.
1132
1133         [chromium] Clear only the uploaded portion of the software backing store when in mixed mode
1134         https://bugs.webkit.org/show_bug.cgi?id=45503
1135
1136         This clears out only the dirty region of the software backing store when uploading results
1137         to hardware rather than clearing out the entire software backing store.  This is a significant
1138         performance improvement when the dirty rects are small relative to the whole canvas.
1139
1140         This also implements the non-swizzle path of copySubRect() using memcpy() to copy the rows, which
1141         is another respectable performance increase.
1142
1143         * html/canvas/CanvasRenderingContext2D.cpp:
1144         * platform/graphics/gpu/Texture.cpp:
1145         (WebCore::copySubRect):
1146         * platform/graphics/skia/PlatformContextSkia.cpp:
1147         (WebCore::PlatformContextSkia::prepareForSoftwareDraw):
1148         (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
1149         (WebCore::PlatformContextSkia::readbackHardwareToSoftware):
1150
1151 2010-09-09  Kenneth Russell  <kbr@google.com>
1152
1153         Reviewed by James Robinson.
1154
1155         Add math utilities for cubic curve processing
1156         https://bugs.webkit.org/show_bug.cgi?id=45251
1157
1158         Adding mathematic utilities needed for the GPU accelerated path
1159         rendering algorithm from GPU Gems 3. No tests yet; will be tested
1160         in conjunction with later code.
1161
1162         * platform/graphics/gpu/LoopBlinnMathUtils.cpp: Added.
1163         (WebCore::LoopBlinnMathUtils::roundToZero):
1164         (WebCore::LoopBlinnMathUtils::approxEqual):
1165         (WebCore::LoopBlinnMathUtils::linesIntersect):
1166         (WebCore::LoopBlinnMathUtils::pointInTriangle):
1167         (WebCore::LoopBlinnMathUtils::trianglesOverlap):
1168         (WebCore::LoopBlinnMathUtils::chopCubicAt):
1169         (WebCore::LoopBlinnMathUtils::xRayCrossesLine):
1170         (WebCore::LoopBlinnMathUtils::numXRayCrossingsForCubic):
1171         * platform/graphics/gpu/LoopBlinnMathUtils.h: Added.
1172
1173 2010-09-09  Kinuko Yasuda  <kinuko@chromium.org>
1174
1175         Reviewed by Dumitru Daniliuc.
1176
1177         Add Entry.getMetadata for FileSystem API
1178         https://bugs.webkit.org/show_bug.cgi?id=45403
1179
1180         Add getMetadata to Entry.idl (I had missed to include this
1181         in my previous Entry.idl patch.)
1182
1183         Also make some minor cleanups and nits fixes.
1184
1185         No new tests; layout test is going be added later.
1186
1187         * fileapi/DOMFileSystem.cpp: Bug fix.
1188         * fileapi/MetadataCallback.h: Nits fix.
1189         * fileapi/Entry.idl: Added getMetadata.
1190         * fileapi/ErrorCallback.h: Nits fix.
1191
1192 2010-09-09  Ryosuke Niwa  <rniwa@webkit.org>
1193
1194         Reviewed by Eric Seidel.
1195
1196         REGRESSION: applying new font size causes font-size outside selection to change
1197         https://bugs.webkit.org/show_bug.cgi?id=45026
1198
1199         The regression was caused by removeImplicitlyStyledElement not converting font size to CSS value properly.
1200         Namely, it was treating font size as a pixel value for font-size property.  Fixed this by adding fontSizeToCSSValue
1201         which uses HTMLFontElement::cssValueFromFontSizeNumber and deployed it in removeImplicitlyStyledElement
1202
1203         Also fixed a bug in StyleChange::extractTextStyles that it ignores font-size property when the values were
1204         relative terms such as x-small and -webkit-xxx-large. And replaced the logic to convert from pixel font size
1205         to legacy font size by CSSStyleSelector::legacyFontSize.
1206
1207         Test: editing/style/push-down-font-styles.html
1208
1209         * editing/ApplyStyleCommand.cpp:
1210         (WebCore::StyleChange::extractTextStyles): Fixed a bug. See above.
1211         (WebCore::stringToCSSValue): Converts string to CSSValue.
1212         (WebCore::fontSizeToCSSValue): Converts font size number (String) to CSSPrimitiveValue.
1213         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Calls stringToCSSValue and fontSizeToCSSValue.
1214         * css/CSSStyleSelector.h: Made fontSizeForKeyword public.
1215
1216 2010-09-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1217
1218         Unreviewed, rolling out r67126.
1219         http://trac.webkit.org/changeset/67126
1220         https://bugs.webkit.org/show_bug.cgi?id=45510
1221
1222         broke chromium mac compile, it also uses PlatformContextSkia
1223         (Requested by jamesr on #webkit).
1224
1225         * platform/graphics/chromium/ContentLayerChromium.cpp:
1226         (WebCore::ContentLayerChromium::updateContents):
1227         * platform/graphics/chromium/FontLinux.cpp:
1228         (WebCore::adjustTextRenderMode):
1229         (WebCore::Font::drawGlyphs):
1230         (WebCore::Font::drawComplexText):
1231         * platform/graphics/chromium/LayerRendererChromium.cpp:
1232         (WebCore::LayerRendererChromium::setRootLayerCanvasSize):
1233         * platform/graphics/chromium/VideoLayerChromium.cpp:
1234         (WebCore::VideoLayerChromium::updateContents):
1235         * platform/graphics/skia/ImageBufferSkia.cpp:
1236         (WebCore::ImageBuffer::ImageBuffer):
1237         (WebCore::ImageBuffer::clip):
1238         * platform/graphics/skia/PlatformContextSkia.cpp:
1239         (WebCore::PlatformContextSkia::State::State):
1240         (WebCore::PlatformContextSkia::PlatformContextSkia):
1241         (WebCore::PlatformContextSkia::save):
1242         (WebCore::PlatformContextSkia::restore):
1243         * platform/graphics/skia/PlatformContextSkia.h:
1244
1245 2010-09-09  Simon Fraser  <simon.fraser@apple.com>
1246
1247         Attempt to fix Qt build.
1248
1249         * WebCore.pro:
1250
1251 2010-09-09  Simon Fraser  <simon.fraser@apple.com>
1252
1253         Reviewed by Darin Adler.
1254
1255         https://bugs.webkit.org/show_bug.cgi?id=45509
1256         <rdar://problem/8142166> REGRESSION: WebView setDrawsBackground:NO no
1257         longer works without setBackgroundColor:clearColor
1258         
1259         r61215 caused RenderView to paint the viewport background when the
1260         document element's renderer is known to not fill opaquely paint
1261         the entire viewport, i.e. more often than it did before.
1262         
1263         This exposed a latent, long-standing bug which was introduced
1264         in r14638 (the RenderCanvas -> RenderView rename), where a call
1265         to view()->isTransparent() was not converted to frameView()->isTransparent(),
1266         yet happened to still compile because of RenderObject::isTransparent().
1267         
1268         This resulted in us painting the viewport background, even when
1269         WebView clients explicitly said that they wanted a transparent
1270         WebView.
1271         
1272         Fixed by calling frameView()->isTransparent(), as intended.
1273
1274         * rendering/RenderView.cpp:
1275         (WebCore::RenderView::paintBoxDecorations):
1276
1277 2010-09-09  Chris Rogers  <crogers@google.com>
1278
1279         Reviewed by Kenneth Russell.
1280
1281         audio engine: add Biquad files
1282         https://bugs.webkit.org/show_bug.cgi?id=44795
1283
1284         No new tests since audio API is not yet implemented.
1285
1286         * platform/audio/Biquad.cpp: Added.
1287         (WebCore::Biquad::Biquad):
1288         (WebCore::Biquad::process):
1289         (WebCore::Biquad::processFast):
1290         (WebCore::Biquad::processSliceFast):
1291         (WebCore::Biquad::reset):
1292         (WebCore::Biquad::setLowpassParams):
1293         (WebCore::Biquad::setHighpassParams):
1294         (WebCore::Biquad::setLowShelfParams):
1295         (WebCore::Biquad::setZeroPolePairs):
1296         (WebCore::Biquad::setAllpassPole):
1297         * platform/audio/Biquad.h: Added.
1298         (WebCore::Biquad::~Biquad):
1299
1300 2010-09-09  Chris Rogers  <crogers@google.com>
1301
1302         Reviewed by Kenneth Russell.
1303
1304         Add AudioBuffer files
1305         https://bugs.webkit.org/show_bug.cgi?id=45003
1306
1307         No new tests since audio API is not yet implemented.
1308
1309         * webaudio/AudioBuffer.cpp: Added.
1310         (WebCore::AudioBuffer::create):
1311         (WebCore::AudioBuffer::createFromAudioFileData):
1312         (WebCore::AudioBuffer::AudioBuffer):
1313         (WebCore::AudioBuffer::releaseMemory):
1314         (WebCore::AudioBuffer::getChannelData):
1315         (WebCore::AudioBuffer::zero):
1316         * webaudio/AudioBuffer.h: Added.
1317         (WebCore::AudioBuffer::length):
1318         (WebCore::AudioBuffer::duration):
1319         (WebCore::AudioBuffer::sampleRate):
1320         (WebCore::AudioBuffer::numberOfChannels):
1321         (WebCore::AudioBuffer::gain):
1322         (WebCore::AudioBuffer::setGain):
1323         * webaudio/AudioBuffer.idl: Added.
1324
1325 2010-09-09  Alexey Marinichev  <amarinichev@chromium.org>
1326
1327         Reviewed by James Robinson.
1328
1329         [chromium] Disable subpixel rendering in Linux when GPU compositor is active
1330         https://bugs.webkit.org/show_bug.cgi?id=45087
1331
1332         Covered by all tests that activate the compositor and contain text.
1333
1334         * platform/graphics/chromium/ContentLayerChromium.cpp:
1335         (WebCore::ContentLayerChromium::updateContents):
1336         * platform/graphics/chromium/FontLinux.cpp:
1337         (WebCore::adjustTextRenderMode): Added a check to see if the compositor is active.
1338         (WebCore::Font::drawGlyphs):
1339         (WebCore::Font::drawComplexText):
1340         * platform/graphics/chromium/LayerRendererChromium.cpp:
1341         (WebCore::LayerRendererChromium::setRootLayerCanvasSize):
1342         * platform/graphics/chromium/VideoLayerChromium.cpp:
1343         (WebCore::VideoLayerChromium::updateContents):
1344         * platform/graphics/skia/ImageBufferSkia.cpp:
1345         (WebCore::ImageBuffer::ImageBuffer):
1346         (WebCore::ImageBuffer::clip):
1347         * platform/graphics/skia/PlatformContextSkia.cpp:
1348         Made setDrawingToImageBuffer and isDrawingToImageBuffer available to
1349         Linux; removed all #if OS(WINDOWS) || OS(LINUX).
1350         (WebCore::PlatformContextSkia::State::State):
1351         (WebCore::PlatformContextSkia::PlatformContextSkia):
1352         (WebCore::PlatformContextSkia::isDrawingToImageBuffer):
1353         (WebCore::PlatformContextSkia::save):
1354         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
1355         (WebCore::PlatformContextSkia::restore):
1356         (WebCore::PlatformContextSkia::applyClipFromImage):
1357         * platform/graphics/skia/PlatformContextSkia.h:
1358
1359 2010-09-09  Simon Fraser  <simon.fraser@apple.com>
1360
1361         Fix windows build by adding missing file.
1362
1363         * platform/graphics/win/LocalWindowsContext.h: Added.
1364         (WebCore::LocalWindowsContext::LocalWindowsContext):
1365         (WebCore::LocalWindowsContext::~LocalWindowsContext):
1366         (WebCore::LocalWindowsContext::hdc):
1367
1368 2010-09-09  Simon Fraser  <simon.fraser@apple.com>
1369
1370         Reviewed by Adam Roben.
1371
1372         Scrollbars fail to render in composited iframes.
1373         https://bugs.webkit.org/show_bug.cgi?id=45335
1374
1375         Add a stack-based class, LocalWindowsContext, which does a getWindowsContext/
1376         releaseWindowsContext automatically.
1377
1378         Also fix getWindowsContext to create a bitmap context if mayCreateBitmap
1379         is true, and if the context's HDC is null. This fixes scrollbar rendering
1380         in compositing layers.
1381
1382         Use LocalWindowsContext in places where we had bare getWindowsContext() calls.
1383
1384         * platform/graphics/win/LocalWindowsContext.h
1385         (WebCore::LocalWindowsContext::LocalWindowsContext):
1386         (WebCore::LocalWindowsContext::~LocalWindowsContext):
1387         (WebCore::LocalWindowsContext::hdc):
1388         * platform/graphics/win/GraphicsContextCGWin.cpp:
1389         (WebCore::GraphicsContext::releaseWindowsContext):
1390         * platform/graphics/win/GraphicsContextWin.cpp:
1391         (WebCore::GraphicsContext::getWindowsContext):
1392         * platform/graphics/win/IconWin.cpp:
1393         (WebCore::Icon::paint):
1394         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1395         (WebCore::MediaPlayerPrivate::paint):
1396         * platform/win/ScrollbarThemeWin.cpp:
1397         (WebCore::ScrollbarThemeWin::paintTrackPiece):
1398         (WebCore::ScrollbarThemeWin::paintButton):
1399         * plugins/win/PluginViewWin.cpp:
1400         (WebCore::PluginView::paintWindowedPluginIntoContext):
1401         (WebCore::PluginView::paint):
1402         * rendering/RenderThemeWin.cpp:
1403         (WebCore::drawControl):
1404
1405 2010-09-09  Vincent Scheib  <scheib@chromium.org>
1406
1407         Reviewed by James Robinson.
1408
1409         [Chromium] Minimize uploads in canvas 2d mixed mode rendering
1410         https://bugs.webkit.org/show_bug.cgi?id=45476
1411
1412         No new tests - change is for performance, logic fixes only apparent when running hardware acceleration.
1413
1414         - Enumeration values fixed, "CavasWillDraw" -> "CanvasDidDraw".
1415         - markDirtyRect() plumbed through GraphicsContext to PlatformContextSkia.
1416         - Texture::updateSubRect() added to allow uploading only a dirty rect.
1417         - Logic fix in ImageBuffer::draw(), caused canvas to canvas copies to be incorrect.
1418
1419         * html/canvas/CanvasRenderingContext2D.cpp:
1420         (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault):
1421         (WebCore::CanvasRenderingContext2D::strokeRect):
1422         (WebCore::CanvasRenderingContext2D::drawImage):
1423         (WebCore::CanvasRenderingContext2D::didDraw):
1424           - Logic fix for drawingContext()->markDirtyRect() call.
1425         (WebCore::CanvasRenderingContext2D::putImageData):
1426         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1427           - Logic fix for calls to "didDraw()", use peer method first.
1428         * html/canvas/CanvasRenderingContext2D.h:
1429         * platform/graphics/GraphicsContext.cpp:
1430         (WebCore::GraphicsContext::drawImageBuffer):
1431         (WebCore::GraphicsContext::markDirtyRect):
1432         * platform/graphics/GraphicsContext.h:
1433         * platform/graphics/gpu/Texture.cpp:
1434         (WebCore::Texture::create):
1435         (WebCore::Texture::load):
1436         (WebCore::Texture::updateSubRect):
1437         * platform/graphics/gpu/Texture.h:
1438         * platform/graphics/gpu/TilingData.h:
1439         (WebCore::TilingData::borderTexels):
1440         * platform/graphics/skia/GraphicsContextSkia.cpp:
1441         (WebCore::GraphicsContext::clipConvexPolygon):
1442         (WebCore::GraphicsContext::markDirtyRect):
1443         * platform/graphics/skia/ImageBufferSkia.cpp:
1444         (WebCore::ImageBuffer::draw):
1445         * platform/graphics/skia/PlatformContextSkia.cpp:
1446         (WebCore::PlatformContextSkia::State::cloneInheritedProperties):
1447         (WebCore::PlatformContextSkia::drawRect):
1448         (WebCore::PlatformContextSkia::setFillColor):
1449         (WebCore::PlatformContextSkia::setStrokeColor):
1450         (WebCore::PlatformContextSkia::markDirtyRect):
1451         (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
1452         * platform/graphics/skia/PlatformContextSkia.h:
1453
1454 2010-09-08  Darin Adler  <darin@apple.com>
1455
1456         Reviewed by Adam Barth.
1457
1458         Move functions from Frame to Editor as planned
1459         https://bugs.webkit.org/show_bug.cgi?id=45218
1460
1461         Just executing the plan that has long been described in Frame.h
1462         to move a bunch of functions to Editor.
1463
1464         * WebCore.exp.in: Updated.
1465
1466         * editing/Editor.cpp:
1467         (WebCore::Editor::fontForSelection):
1468         (WebCore::Editor::textDirectionForSelection):
1469         (WebCore::Editor::applyStyle):
1470         (WebCore::Editor::selectionStartHasStyle):
1471         (WebCore::Editor::selectionHasStyle):
1472         (WebCore::Editor::selectionStartCSSPropertyValue):
1473         (WebCore::Editor::Editor):
1474         (WebCore::Editor::cut):
1475         (WebCore::Editor::copy):
1476         (WebCore::Editor::ignoreSpelling):
1477         (WebCore::Editor::learnSpelling):
1478         (WebCore::Editor::isSelectionMisspelled):
1479         (WebCore::Editor::guessesForMisspelledSelection):
1480         (WebCore::Editor::selectedText):
1481         (WebCore::Editor::firstRectForRange):
1482         (WebCore::Editor::shouldChangeSelection):
1483         (WebCore::Editor::computeAndSetTypingStyle):
1484         (WebCore::Editor::selectionComputedStyle):
1485         (WebCore::Editor::textFieldDidBeginEditing):
1486         (WebCore::Editor::textFieldDidEndEditing):
1487         (WebCore::Editor::textDidChangeInTextField):
1488         (WebCore::Editor::doTextFieldCommandFromEvent):
1489         (WebCore::Editor::textWillBeDeletedInTextField):
1490         (WebCore::Editor::textDidChangeInTextArea):
1491         (WebCore::Editor::applyEditingStyleToBodyElement):
1492         (WebCore::Editor::applyEditingStyleToElement):
1493         (WebCore::Editor::styleForSelectionStart):
1494         (WebCore::Editor::findString):
1495         (WebCore::Editor::countMatchesForText):
1496         (WebCore::Editor::setMarkedTextMatchesAreHighlighted):
1497         (WebCore::Editor::respondToChangedSelection):
1498         * editing/Editor.h:
1499         * editing/mac/EditorMac.mm:
1500         (WebCore::Editor::fontAttributesForSelectionStart):
1501         (WebCore::Editor::baseWritingDirectionForSelectionStart):
1502         Moved functions here.
1503
1504         * page/Frame.cpp:
1505         (WebCore::Frame::Frame):
1506         (WebCore::Frame::shouldChangeSelection):
1507         * page/Frame.h:
1508         * page/mac/FrameMac.mm:
1509         Moved functions out of here.
1510
1511         * dom/InputElement.cpp:
1512         (WebCore::InputElement::dispatchBlurEvent):
1513         (WebCore::InputElement::aboutToUnload):
1514         * editing/DeleteSelectionCommand.cpp:
1515         (WebCore::DeleteSelectionCommand::doApply):
1516         * editing/EditorCommand.cpp:
1517         (WebCore::executeToggleStyleInList):
1518         (WebCore::executeDeleteToMark):
1519         (WebCore::executeFindString):
1520         (WebCore::executeSelectToMark):
1521         (WebCore::executeSetMark):
1522         (WebCore::executeSwapWithMark):
1523         (WebCore::enabledVisibleSelectionAndMark):
1524         * editing/SelectionController.cpp:
1525         (WebCore::SelectionController::setSelection):
1526         * html/HTMLInputElement.cpp:
1527         (WebCore::HTMLInputElement::defaultEventHandler):
1528         * page/ContextMenuController.cpp:
1529         (WebCore::ContextMenuController::contextMenuItemSelected):
1530         * page/DOMWindow.cpp:
1531         (WebCore::DOMWindow::find):
1532         * page/DragController.cpp:
1533         (WebCore::DragController::startDrag):
1534         * page/EventHandler.cpp:
1535         (WebCore::EventHandler::sendContextMenuEventForKey):
1536         * page/Page.cpp:
1537         (WebCore::Page::findString):
1538         (WebCore::Page::markAllMatchesForText):
1539         * rendering/InlineTextBox.cpp:
1540         (WebCore::InlineTextBox::paintTextMatchMarker):
1541         * rendering/RenderTextControlMultiLine.cpp:
1542         (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
1543         * rendering/RenderTextControlSingleLine.cpp:
1544         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
1545         Changed call sites to use editor().
1546
1547 2010-09-09  Chris Rogers  <crogers@google.com>
1548
1549         Reviewed by Kenneth Russell.
1550
1551         Add AudioDSPKernelProcessor files
1552         https://bugs.webkit.org/show_bug.cgi?id=45211
1553
1554         No new tests since audio API is not yet implemented.
1555
1556         * platform/audio/AudioDSPKernelProcessor.cpp: Added.
1557         (WebCore::AudioDSPKernelProcessor::AudioDSPKernelProcessor):
1558         (WebCore::AudioDSPKernelProcessor::initialize):
1559         (WebCore::AudioDSPKernelProcessor::uninitialize):
1560         (WebCore::AudioDSPKernelProcessor::process):
1561         (WebCore::AudioDSPKernelProcessor::reset):
1562         (WebCore::AudioDSPKernelProcessor::setNumberOfChannels):
1563         * platform/audio/AudioDSPKernelProcessor.h: Added.
1564         (WebCore::AudioDSPKernelProcessor::numberOfChannels):
1565
1566 2010-09-09  Chris Rogers  <crogers@google.com>
1567
1568         Reviewed by Kenneth Russell.
1569
1570         Add setRange() and zeroRange() methods to TypedArrayBase
1571         https://bugs.webkit.org/show_bug.cgi?id=45419
1572
1573         No new tests since adding new methods which are not yet called anywhere.
1574
1575         * html/canvas/ArrayBufferView.cpp:
1576         (WebCore::ArrayBufferView::setRangeImpl):
1577         (WebCore::ArrayBufferView::zeroRangeImpl):
1578         * html/canvas/ArrayBufferView.h:
1579         * html/canvas/TypedArrayBase.h:
1580         (WebCore::TypedArrayBase::setRange):
1581         (WebCore::TypedArrayBase::zeroRange):
1582
1583 2010-09-09  Robert Hogan  <robert@webkit.org>
1584
1585         Reviewed by Andreas Kling.
1586
1587         [Qt] always send an Accept header
1588
1589         Ensure QtWebKit always sends an Accept header. This is required
1590         for compatibility with sites that expect the header in requests
1591         for subresources.
1592
1593         See https://bugs.webkit.org/show_bug.cgi?id=33242 for more.
1594
1595         https://bugs.webkit.org/show_bug.cgi?id=45458
1596
1597         * platform/network/qt/ResourceRequestQt.cpp:
1598         (WebCore::ResourceRequest::toNetworkRequest):
1599
1600 2010-09-09  Eric Carlson  <eric.carlson@apple.com>
1601
1602         Reviewed by Chris Marrin.
1603
1604         Add media element logging
1605         https://bugs.webkit.org/show_bug.cgi?id=45469
1606
1607         Add logging at interesting points in a media element's lifecycle.
1608
1609         * html/HTMLMediaElement.cpp:
1610         (WebCore::urlForLogging):
1611         (WebCore::boolString):
1612         (WebCore::HTMLMediaElement::scheduleEvent):
1613         (WebCore::HTMLMediaElement::asyncEventTimerFired):
1614         (WebCore::HTMLMediaElement::canPlayType):
1615         (WebCore::HTMLMediaElement::load):
1616         (WebCore::HTMLMediaElement::prepareForLoad):
1617         (WebCore::HTMLMediaElement::selectMediaResource):
1618         (WebCore::HTMLMediaElement::loadResource):
1619         (WebCore::HTMLMediaElement::isSafeToLoadURL):
1620         (WebCore::HTMLMediaElement::waitForSourceChange):
1621         (WebCore::HTMLMediaElement::noneSupported):
1622         (WebCore::HTMLMediaElement::mediaEngineError):
1623         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
1624         (WebCore::HTMLMediaElement::setNetworkState):
1625         (WebCore::HTMLMediaElement::setReadyState):
1626         (WebCore::HTMLMediaElement::rewind):
1627         (WebCore::HTMLMediaElement::returnToRealtime):
1628         (WebCore::HTMLMediaElement::addPlayedRange):
1629         (WebCore::HTMLMediaElement::seek):
1630         (WebCore::HTMLMediaElement::finishSeek):
1631         (WebCore::HTMLMediaElement::setPlaybackRate):
1632         (WebCore::HTMLMediaElement::setWebkitPreservesPitch):
1633         (WebCore::HTMLMediaElement::setAutoplay):
1634         (WebCore::HTMLMediaElement::setPreload):
1635         (WebCore::HTMLMediaElement::play):
1636         (WebCore::HTMLMediaElement::playInternal):
1637         (WebCore::HTMLMediaElement::pause):
1638         (WebCore::HTMLMediaElement::pauseInternal):
1639         (WebCore::HTMLMediaElement::setLoop):
1640         (WebCore::HTMLMediaElement::setControls):
1641         (WebCore::HTMLMediaElement::setVolume):
1642         (WebCore::HTMLMediaElement::setMuted):
1643         (WebCore::HTMLMediaElement::togglePlayState):
1644         (WebCore::HTMLMediaElement::beginScrubbing):
1645         (WebCore::HTMLMediaElement::endScrubbing):
1646         (WebCore::HTMLMediaElement::selectNextSourceChild):
1647         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
1648         (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
1649         (WebCore::HTMLMediaElement::mediaPlayerMuteChanged):
1650         (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
1651         (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
1652         (WebCore::HTMLMediaElement::mediaPlayerPlaybackStateChanged):
1653         (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks):
1654         (WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
1655         (WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged):
1656         (WebCore::HTMLMediaElement::updatePlayState):
1657         (WebCore::HTMLMediaElement::userCancelledLoad):
1658         (WebCore::HTMLMediaElement::stop):
1659         (WebCore::HTMLMediaElement::suspend):
1660         (WebCore::HTMLMediaElement::resume):
1661         (WebCore::HTMLMediaElement::hasPendingActivity):
1662         (WebCore::HTMLMediaElement::mediaVolumeDidChange):
1663         (WebCore::HTMLMediaElement::createMediaPlayerProxy):
1664         (WebCore::HTMLMediaElement::enterFullscreen):
1665         (WebCore::HTMLMediaElement::exitFullscreen):
1666         (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
1667         (WebCore::HTMLMediaElement::mediaCanStart):
1668         (WebCore::HTMLMediaElement::setShouldDelayLoadEvent):
1669
1670 2010-09-09  Anton Muhin  <antonm@chromium.org>
1671
1672         Reviewed by Adam Barth.
1673
1674         [v8] bypass caches when query memory usage from post GC and in crash handler.
1675         https://bugs.webkit.org/show_bug.cgi?id=45036
1676
1677         Second part of the whole change: now use API introduced in
1678         http://trac.webkit.org/changeset/66818 and now backed by Chromium.
1679
1680         * bindings/v8/V8DOMWindowShell.cpp:
1681         (WebCore::reportFatalErrorInV8):
1682         * bindings/v8/V8GCController.cpp:
1683         (WebCore::V8GCController::gcEpilogue):
1684
1685 2010-09-09  Kwang Yul Seo  <skyul@company100.net>
1686
1687         Reviewed by James Robinson.
1688
1689         Make sure skia is not Chromium specific
1690         https://bugs.webkit.org/show_bug.cgi?id=39672
1691
1692         FontCustomPlatformData is not Chromium-specific. Move it to platform/skia.
1693
1694         No new tests because this is pure refactoring.
1695
1696         * WebCore.gyp/WebCore.gyp:
1697         * WebCore.gypi:
1698         * platform/graphics/chromium/FontCustomPlatformData.cpp: Removed.
1699         * platform/graphics/chromium/FontCustomPlatformData.h: Removed.
1700         * platform/graphics/skia/FontCustomPlatformData.cpp: Copied from WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp.
1701         * platform/graphics/skia/FontCustomPlatformData.h: Copied from WebCore/platform/graphics/chromium/FontCustomPlatformData.h.
1702
1703 2010-09-09  Chris Rogers  <crogers@google.com>
1704
1705         Reviewed by Chris Fleizach.
1706
1707         Add AudioDSPKernel files
1708         https://bugs.webkit.org/show_bug.cgi?id=45319
1709
1710         No new tests since audio API is not yet implemented.
1711
1712         * platform/audio/AudioDSPKernel.h: Added.
1713         (WebCore::AudioDSPKernel::AudioDSPKernel):
1714         (WebCore::AudioDSPKernel::~AudioDSPKernel):
1715         (WebCore::AudioDSPKernel::sampleRate):
1716         (WebCore::AudioDSPKernel::nyquist):
1717         (WebCore::AudioDSPKernel::processor):
1718
1719 2010-09-09  Chris Rogers  <crogers@google.com>
1720
1721         Reviewed by Chris Fleizach.
1722
1723         Add AudioProcessor.h
1724         https://bugs.webkit.org/show_bug.cgi?id=45206
1725
1726         No new tests since audio API is not yet implemented.
1727
1728         * platform/audio/AudioProcessor.h: Added.
1729         (WebCore::AudioProcessor::AudioProcessor):
1730         (WebCore::AudioProcessor::~AudioProcessor):
1731         (WebCore::AudioProcessor::isInitialized):
1732         (WebCore::AudioProcessor::sampleRate):
1733
1734 2010-09-09  Kenneth Russell  <kbr@google.com>
1735
1736         Reviewed by James Robinson.
1737
1738         Add cubic texture coordinate computation
1739         https://bugs.webkit.org/show_bug.cgi?id=45250
1740
1741         Adding the texture coordinate computation for cubic curves per the
1742         GPU Gems 3 chapter. No tests yet; will be tested in conjunction
1743         with later code.
1744
1745         * platform/graphics/gpu/LoopBlinnConstants.h: Added.
1746         * platform/graphics/gpu/LoopBlinnTextureCoords.cpp: Added.
1747         (WebCore::LoopBlinnTextureCoords::compute):
1748         * platform/graphics/gpu/LoopBlinnTextureCoords.h: Added.
1749         (WebCore::LoopBlinnTextureCoords::Result::Result):
1750         (WebCore::LoopBlinnTextureCoords::LoopBlinnTextureCoords):
1751
1752 2010-09-09  Kenneth Russell  <kbr@google.com>
1753
1754         Reviewed by James Robinson.
1755
1756         Add cubic curve classifier
1757         https://bugs.webkit.org/show_bug.cgi?id=45249
1758
1759         Adding the cubic curve classification algorithm per the GPU Gems 3
1760         chapter. No tests yet; will be tested in conjunction with later code.
1761
1762         * platform/graphics/gpu/LoopBlinnClassifier.cpp: Added.
1763         (WebCore::LoopBlinnClassifier::classify):
1764         * platform/graphics/gpu/LoopBlinnClassifier.h: Added.
1765         (WebCore::LoopBlinnClassifier::Result::Result):
1766         (WebCore::LoopBlinnClassifier::LoopBlinnClassifier):
1767
1768 2010-09-09  Ryosuke Niwa  <rniwa@webkit.org>
1769
1770         Reviewed by Darin Adler.
1771
1772         QueryCommandValue('FontSize') returns pixel values instead of IE font numbers
1773         https://bugs.webkit.org/show_bug.cgi?id=21033
1774
1775         Modified selectionStartCSSPropertyValue to return legacy font size instead of pixel size.
1776         To implement the conversion between pixel font size and legacy font size,
1777         added legacyFontSize to CSSStyleSelector with a helper static function findNearestLegacyFontSize.
1778
1779         Fixed a bug in selectionComputedStyle where it obtains the style of the previous editing position
1780         even when the selection is a range. This change revealed a crash in executeToggleStyleInList,
1781         which was also fixed.
1782
1783         Test: editing/execCommand/query-font-size.html
1784
1785         * css/CSSComputedStyleDeclaration.cpp:
1786         (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword): Corrected style.
1787         (WebCore::CSSComputedStyleDeclaration::useFixedFontDefaultSize): Added.
1788         * css/CSSComputedStyleDeclaration.h:
1789         * css/CSSStyleSelector.cpp:
1790         (WebCore::CSSStyleSelector::fontSizeForKeyword): Renamed fixed/monospace to shouldUseFixedDefaultSize.
1791         (WebCore::findNearestLegacyFontSize): Added, a helper for legacyFontSize.
1792         (WebCore::CSSStyleSelector::legacyFontSize): Added.
1793         * css/CSSStyleSelector.h:
1794         * editing/Editor.cpp:
1795         (WebCore::Editor::selectionStartCSSPropertyValue): Added a conversion from pixel to legacy font size.
1796         * editing/EditorCommand.cpp:
1797         (WebCore::executeToggleStyleInList): Crash fix.
1798         * page/Frame.cpp:
1799         (WebCore::Frame::selectionComputedStyle): See above.
1800
1801 2010-09-09  Robert Hogan  <robert@webkit.org>
1802
1803         Reviewed by Adam Barth.
1804
1805         Give WebKit clients a way to replace window.screen 
1806         to foil attempts to track users with it.
1807
1808         This allows clients to overload the values returned by the
1809         Screen object through the JSC manipulation API (such as
1810         QWebFrame::addToJavaScriptWindowObject() in Qt). Clients will
1811         want to do this when they do not want to reveal too much
1812         explicit information about the user's desktop configuration.
1813
1814         https://bugs.webkit.org/show_bug.cgi?id=41802
1815
1816         * page/DOMWindow.idl:
1817
1818 2010-09-09  Kenneth Russell  <kbr@google.com>
1819
1820         Reviewed by James Robinson.
1821
1822         Memory leak in red/black tree
1823         https://bugs.webkit.org/show_bug.cgi?id=45472
1824
1825         Fixed memory leak in red/black tree where it was using operator
1826         new directly to allocate its internal nodes rather than the arena
1827         with which it was configured. Added allocateObject variant to
1828         arena supporting single-argument constructors. Added test to
1829         red/black tree unit tests to cover this functionality, and
1830         refactored TrackedAllocator into helper file to share between
1831         arena and red/black tree tests.
1832
1833         * platform/graphics/gpu/PODArena.h:
1834         (WebCore::PODArena::allocateObject):
1835         (WebCore::PODArena::allocateBase):
1836         * platform/graphics/gpu/PODIntervalTree.h:
1837         (WebCore::PODIntervalTree::PODIntervalTree):
1838         * platform/graphics/gpu/PODRedBlackTree.h:
1839         (WebCore::PODRedBlackTree::add):
1840
1841 2010-09-09  Dean Jackson  <dino@apple.com>
1842
1843         Reviewed by Simon Fraser.
1844
1845         Fill mode is broken with multiple keyframes
1846         https://bugs.webkit.org/show_bug.cgi?id=41209
1847
1848         With a forward fill mode the animation would tick after
1849         the end of the animation, causing the fractional
1850         duration of the animation to wrap. This meant the last
1851         style update would happen using the incorrect keyframes.
1852         The solution was to put clamps in for the elapsed time
1853         and current iteration count.
1854
1855         Tests: animations/fill-mode-missing-from-to-keyframes.html
1856                animations/fill-mode-multiple-keyframes.html
1857
1858         * page/animation/KeyframeAnimation.cpp:
1859         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
1860
1861 2010-09-09  Chris Fleizach  <cfleizach@apple.com>
1862
1863         Reviewed by David Kilzer.
1864
1865         AX: Support AccessibilityTextMarkers in DRT
1866         https://bugs.webkit.org/show_bug.cgi?id=44778
1867
1868         Provide support in DRT for accessing and manipulating the text marker system that AX exposes.
1869         This will allow future bug fixes in the text marker system to be adequately tested.
1870
1871         Tests: platform/mac/accessibility/element-for-text-marker.html
1872                platform/mac/accessibility/text-marker-length.html
1873
1874         * accessibility/mac/AccessibilityObjectWrapper.mm:
1875         (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1876
1877 2010-09-09  Simon Fraser  <simon.fraser@apple.com>
1878
1879         Reviewed by Dan Bernstein.
1880
1881         REGRESSION(r58875-r59046): Scrollable content drawn in wrong layer with Flash 10.1
1882         https://bugs.webkit.org/show_bug.cgi?id=40743
1883         
1884         We can't do partial compositing layer updates on scrolling if we have to look
1885         for overlap, because the overlap map needs to be populated by traversing the
1886         compositing layer hierarchy from the root.
1887
1888         Test: compositing/layer-creation/scroll-partial-update.html
1889
1890         * rendering/RenderLayerCompositor.cpp:
1891         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1892
1893 2010-09-09  Philippe Normand  <pnormand@igalia.com>
1894
1895         Reviewed by Martin Robinson.
1896
1897         [GTK] testmimehandling falsely succeeds testing Ogg mime type
1898         https://bugs.webkit.org/show_bug.cgi?id=45349
1899
1900         Advertize audio/x-vorbis+ogg so MediaDocuments loading local ogg
1901         files work as well.
1902
1903         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1904         (WebCore::mimeTypeCache):
1905
1906 2010-09-09  Adam Barth  <abarth@webkit.org>
1907
1908         Move FTPDirectoryDocument, ImageDocument, MediaDocument, and
1909         PluginDocument from WebCore/loader to WebCore/html.  These classes are
1910         subclasses of HTMLDocument.  They don't belong in the loader.  Further
1911         cleanup patches to follow.
1912
1913         * Android.mk:
1914         * CMakeLists.txt:
1915         * GNUmakefile.am:
1916         * WebCore.gypi:
1917         * WebCore.pro:
1918         * WebCore.vcproj/WebCore.vcproj:
1919         * WebCore.xcodeproj/project.pbxproj:
1920         * html/FTPDirectoryDocument.cpp: Copied from WebCore/loader/FTPDirectoryDocument.cpp.
1921         * html/FTPDirectoryDocument.h: Copied from WebCore/loader/FTPDirectoryDocument.h.
1922         * html/ImageDocument.cpp: Copied from WebCore/loader/ImageDocument.cpp.
1923         * html/ImageDocument.h: Copied from WebCore/loader/ImageDocument.h.
1924         * html/MediaDocument.cpp: Copied from WebCore/loader/MediaDocument.cpp.
1925         * html/MediaDocument.h: Copied from WebCore/loader/MediaDocument.h.
1926         * html/PluginDocument.cpp: Copied from WebCore/loader/PluginDocument.cpp.
1927         * html/PluginDocument.h: Copied from WebCore/loader/PluginDocument.h.
1928         * loader/FTPDirectoryDocument.cpp: Removed.
1929         * loader/FTPDirectoryDocument.h: Removed.
1930         * loader/ImageDocument.cpp: Removed.
1931         * loader/ImageDocument.h: Removed.
1932         * loader/MediaDocument.cpp: Removed.
1933         * loader/MediaDocument.h: Removed.
1934         * loader/PluginDocument.cpp: Removed.
1935         * loader/PluginDocument.h: Removed.
1936
1937 2010-09-09  Andrey Kosyakov  <caseq@chromium.org>
1938
1939         Reviewed by Yury Semikhatsky.
1940
1941         Web Inspector: use string representation of resource type in extension API
1942         Fixed Resoruce.Type.toString() to handle Resource.Type.Media.
1943         https://bugs.webkit.org/show_bug.cgi?id=45286
1944
1945         Test: inspector/extensions-resources.html
1946
1947         * English.lproj/localizedStrings.js: Added "media".
1948         * inspector/front-end/ExtensionServer.js: Added webInspector.resources.Types. Return resource types as strings.
1949         (WebInspector.ExtensionServer.prototype._convertResource):
1950         (WebInspector.ExtensionServer.prototype._buildExtensionAPIInjectedScript):
1951         * inspector/front-end/Resource.js: Added toUIString(), changed toString() to return locale-independent representation.
1952         (WebInspector.Resource.Type.toUIString):
1953         (WebInspector.Resource.Type.toString):
1954
1955 2010-09-09  Kristian Amlie  <kristian.amlie@nokia.com>
1956
1957         Reviewed by Andreas Kling.
1958
1959         [Qt] Fixed incorrect Symbian scoping.
1960
1961         The missing install functionality is only true for mmp based systems.
1962
1963         https://bugs.webkit.org/show_bug.cgi?id=45268
1964
1965         * WebCore.pro:
1966
1967 2010-09-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1968
1969         Reviewed by Dirk Schulze.
1970
1971         [WML] Add a parameter to fix build break.
1972         https://bugs.webkit.org/show_bug.cgi?id=45437
1973
1974         In WMLSelectElement.h, the setSelectedIndexByUser() needs to have one more parameter. 
1975         Because, parent class's setSelectedIndexByUser() has one more param.
1976
1977         * wml/WMLSelectElement.h:
1978
1979 2010-09-09  Ryuan Choi  <ryuan.choi@samsung.com>
1980
1981         Unreviewed attempt to fix EFL build after r67001.
1982
1983         [EFL] Regression (67001) Build break
1984         https://bugs.webkit.org/show_bug.cgi?id=45422
1985
1986         * platform/efl/ScrollbarEfl.cpp:
1987         (scrollbarEflEdjeMessage):
1988
1989 2010-09-08  Ryosuke Niwa  <rniwa@webkit.org>
1990
1991         Reviewed by Tony Chang.
1992
1993         MarkupAccumulator should be broken down into two classes
1994         https://bugs.webkit.org/show_bug.cgi?id=44854
1995
1996         Extracted wrapWithNode, wrapWithStyleNode, stringValueForRange, renderedText, removeExteriorStyles,
1997         shouldAnnotate, m_shouldAnnotate, and m_reversedPrecedingMarkup from MarkupAccumulator to create
1998         StyledMarkupAccumulator in order to isolate annotation related code and prepending of text.
1999
2000         Isolating MarkupAccumulator as a separate class has two advantages:
2001         1. Isolated serialization code is easier to understand and easier to security-review.
2002         2. Embedder can use MarkupAccumulator to implement "Save as" feature.
2003
2004         Also made takeResults, appendText, and appendElement in MarkupAccumulator virtual to override in
2005         StyledMarkupAccumulator because prepending text requires overriding takeResults, appendText needs
2006         to append only rendered text when shouldAnnotate() is true, and appendElement requires a different
2007         behavior when shouldAnnotate() is true or when called inside wrapWithNode with convertBlocksToInlines = true.
2008
2009         No new tests are added since this is a cleanup.
2010
2011         * editing/markup.cpp:
2012         (WebCore::MarkupAccumulator::MarkupAccumulator): Removed shouldAnnotate from argument.
2013         (WebCore::MarkupAccumulator::~MarkupAccumulator): Added.
2014         (WebCore::StyledMarkupAccumulator::): Added.
2015         (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator): Added.
2016         (WebCore::StyledMarkupAccumulator::appendElement): Added to support annotation.
2017         (WebCore::StyledMarkupAccumulator::shouldAnnotate): Moved from MarkupAccumulator.
2018         (WebCore::MarkupAccumulator::appendStartTag): No longer takes convertBlocksToInlines and RangeFullySelectsNode.
2019         (WebCore::StyledMarkupAccumulator::wrapWithStyleNode): Moved from MarkupAccumulator.
2020         (WebCore::MarkupAccumulator::takeResults): No longer accumulates prepended text, and made virtual.
2021         (WebCore::StyledMarkupAccumulator::takeResults): Added to support prepended text.
2022         (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute): Takes a reference to Attribute instead of a pointer.
2023         (WebCore::MarkupAccumulator::entityMaskForText): Extracted from appendText.
2024         (WebCore::MarkupAccumulator::appendText): No longer deals with annotation.
2025         (WebCore::StyledMarkupAccumulator::appendText): Added to support annotation.
2026         (WebCore::StyledMarkupAccumulator::stringValueForRange): Moved from MarkupAccumulator.
2027         (WebCore::StyledMarkupAccumulator::renderedText): Moved from MarkupAccumulator.
2028         (WebCore::MarkupAccumulator::appendElement): No longer deals with annotation.
2029         (WebCore::StyledMarkupAccumulator::wrapWithNode): Moved from MarkupAccumulator.
2030         (WebCore::StyledMarkupAccumulator::removeExteriorStyles): Moved from MarkupAccumulator.
2031         (WebCore::MarkupAccumulator::appendOpenTag): Added.
2032         (WebCore::MarkupAccumulator::appendCloseTag): Added.
2033         (WebCore::MarkupAccumulator::appendAttribute): Added.
2034         (WebCore::MarkupAccumulator::appendStartMarkup): No longer takes convertBlocksToInlines and RangeFullySelectsNode.
2035         (WebCore::serializeNodes): Takes StyledMarkupAccumulator.
2036         (WebCore::createMarkup): Range version uses StyledMarkupAccumulator and node version uses MarkupAccumulator.
2037
2038 2010-09-08  Peter Kasting  <pkasting@google.com>
2039
2040         Not reviewed, layout test fix.
2041         
2042         Fix flaky layout test results caused by not initializing members correctly.
2043         https://bugs.webkit.org/show_bug.cgi?id=45411
2044
2045         * platform/ScrollAnimator.cpp:
2046         (WebCore::ScrollAnimator::ScrollAnimator):
2047         (WebCore::ScrollAnimator::~ScrollAnimator):
2048         * platform/ScrollAnimator.h:
2049
2050 2010-09-08  MORITA Hajime  <morrita@google.com>
2051
2052         Reviewed by Tony Chang.
2053
2054         spelling underline gets lost on backspace
2055         https://bugs.webkit.org/show_bug.cgi?id=41423
2056
2057         moveParagraphs() did make a DOM range by serializing source range
2058         and deserializing it back, and markers are gone during the process.
2059         This change marks that DOM range again.
2060
2061         Test: editing/spelling/spelling-backspace-between-lines.html
2062
2063         * editing/CompositeEditCommand.cpp:
2064         (WebCore::CompositeEditCommand::moveParagraphs):
2065         * editing/Editor.cpp:
2066         (WebCore::Editor::clearMisspellingsAndBadGrammar): Added.
2067         (WebCore::Editor::markMisspellingsAndBadGrammar): Added.
2068         * editing/Editor.h:
2069
2070 2010-09-08  Adam Barth  <abarth@webkit.org>
2071
2072         Reviewed by Eric Seidel.
2073
2074         text/plain documents that start with \n trigger ASSERT
2075         https://bugs.webkit.org/show_bug.cgi?id=45409
2076
2077         Because the TextDocumentParser uses a <pre> element to show the text,
2078         it ran into a requirement from HTML5 to skip any initial \n character
2079         tokens inside a <pre> element.  We don't want the behavior for
2080         TextDocuments, so I've loosened our ASSERTs and added a comment and a
2081         test to document the correct behavior.
2082
2083         Test: fast/tokenizer/text-plain.html
2084
2085         * html/parser/HTMLTokenizer.cpp:
2086         (WebCore::HTMLTokenizer::nextToken):
2087
2088 2010-09-08  James Robinson  <jamesr@chromium.org>
2089
2090         Reviewed by Kenneth Russell.
2091
2092         [chromium] Always do 2d canvas clearRect() in hardware
2093         https://bugs.webkit.org/show_bug.cgi?id=45415
2094
2095         r67003 forced Canvas 2d's clearRect() to happen in software if a gradient/shadow/etc was
2096         active.  This is subtly wrong for mixed mode rendering since it results in only the
2097         software backing store being cleared and not the hardware.  This forces clearRect() to
2098         happen in hardware.  Since we upload mixed mode results before doing any hardware draw
2099         this means we always clear everything.
2100
2101         * platform/graphics/skia/GraphicsContextSkia.cpp:
2102         (WebCore::GraphicsContext::clearRect):
2103
2104 2010-09-08  Dean Jackson  <dino@apple.com>
2105
2106         Unreviewed attempt to fix the Mac builds.
2107
2108         * css/CSSParser.cpp:
2109         (WebCore::CSSParser::parseAnimationTimingFunction):
2110
2111 2010-09-08  Dean Jackson  <dino@apple.com>
2112
2113         Unreviewed attempt to fix QT build.
2114
2115         * platform/graphics/qt/GraphicsLayerQt.cpp:
2116         (WebCore::solveStepsFunction):
2117         (WebCore::applyTimingFunction):
2118
2119 2010-09-08  Dean Jackson  <dino@apple.com>
2120
2121         Reviewed by Simon Fraser.
2122
2123         Implement steps() timing function for animations
2124         https://bugs.webkit.org/show_bug.cgi?id=44541
2125
2126         Tests: animations/timing-functions.html
2127                transitions/steps-timing-function.html
2128
2129         * css/CSSComputedStyleDeclaration.cpp:
2130         (WebCore::getTimingFunctionValue):
2131             - when creating computed style we now test what
2132               type of timing function it being used
2133         * css/CSSParser.cpp:
2134         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
2135             - rename this method from parseTimingFunctionValue
2136         (WebCore::CSSParser::parseAnimationTimingFunction):
2137             - support parsing the steps() function
2138         * css/CSSParser.h:
2139             - method rename
2140         * css/CSSStyleSelector.cpp:
2141         (WebCore::CSSStyleSelector::mapAnimationTimingFunction):
2142             - handle 'step-start' and 'step-end' identifiers. Also
2143               now use ::create when constructing objects
2144         * css/CSSTimingFunctionValue.cpp:
2145         (WebCore::CSSLinearTimingFunctionValue::cssText):
2146         (WebCore::CSSCubicBezierTimingFunctionValue::cssText):
2147         (WebCore::CSSStepsTimingFunctionValue::cssText):
2148             - new text output for computed style. We now produce
2149               the text 'linear' when appropriate.
2150         * css/CSSTimingFunctionValue.h:
2151         (WebCore::CSSTimingFunctionValue::isLinearTimingFunctionValue):
2152         (WebCore::CSSTimingFunctionValue::isCubicBezierTimingFunctionValue):
2153         (WebCore::CSSTimingFunctionValue::isStepsTimingFunctionValue):
2154         (WebCore::CSSTimingFunctionValue::CSSTimingFunctionValue):
2155         (WebCore::CSSTimingFunctionValue::isTimingFunctionValue):
2156         (WebCore::CSSLinearTimingFunctionValue::create):
2157         (WebCore::CSSLinearTimingFunctionValue::isLinearTimingFunctionValue):
2158         (WebCore::CSSLinearTimingFunctionValue::CSSLinearTimingFunctionValue):
2159         (WebCore::CSSCubicBezierTimingFunctionValue::create):
2160         (WebCore::CSSCubicBezierTimingFunctionValue::isCubicBezierTimingFunctionValue):
2161         (WebCore::CSSCubicBezierTimingFunctionValue::CSSCubicBezierTimingFunctionValue):
2162         (WebCore::CSSStepsTimingFunctionValue::create):
2163         (WebCore::CSSStepsTimingFunctionValue::numberOfSteps):
2164         (WebCore::CSSStepsTimingFunctionValue::stepAtStart):
2165         (WebCore::CSSStepsTimingFunctionValue::isStepsTimingFunctionValue):
2166         (WebCore::CSSStepsTimingFunctionValue::CSSStepsTimingFunctionValue):
2167             - CSSTimingFunction is now a pure virtual ref-counted base class, with
2168               subclasses for each of the three supported timing functions.
2169         * css/CSSValueKeywords.in:
2170             - new keywords step-start and step-end
2171         * page/animation/AnimationBase.cpp:
2172         (WebCore::solveStepsFunction):
2173             - produces the output value from a stepping function
2174         (WebCore::AnimationBase::progress):
2175             - now has to switch based on timing function type
2176         * page/animation/KeyframeAnimation.cpp:
2177         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
2178             - use ref-counted access
2179         * platform/animation/Animation.cpp:
2180         (WebCore::Animation::animationsMatch):
2181             - change timing function comparison for operator==
2182         * platform/animation/Animation.h:
2183         (WebCore::Animation::timingFunction):
2184         (WebCore::Animation::setTimingFunction):
2185         (WebCore::Animation::initialAnimationTimingFunction):
2186             - move to ref-counted timing function class
2187         * platform/animation/TimingFunction.h:
2188         (WebCore::TimingFunction::~TimingFunction):
2189         (WebCore::TimingFunction::isLinearTimingFunction):
2190         (WebCore::TimingFunction::isCubicBezierTimingFunction):
2191         (WebCore::TimingFunction::isStepsTimingFunction):
2192         (WebCore::TimingFunction::TimingFunction):
2193         (WebCore::LinearTimingFunction::create):
2194         (WebCore::LinearTimingFunction::~LinearTimingFunction):
2195         (WebCore::LinearTimingFunction::operator==):
2196         (WebCore::LinearTimingFunction::LinearTimingFunction):
2197         (WebCore::CubicBezierTimingFunction::create):
2198         (WebCore::CubicBezierTimingFunction::~CubicBezierTimingFunction):
2199         (WebCore::CubicBezierTimingFunction::operator==):
2200         (WebCore::CubicBezierTimingFunction::CubicBezierTimingFunction):
2201         (WebCore::StepsTimingFunction::create):
2202         (WebCore::StepsTimingFunction::~StepsTimingFunction):
2203         (WebCore::StepsTimingFunction::operator==):
2204         (WebCore::StepsTimingFunction::numberOfSteps):
2205         (WebCore::StepsTimingFunction::stepAtStart):
2206         (WebCore::StepsTimingFunction::StepsTimingFunction):
2207             - TimingFunction is now a ref-counted pure virtual base class,
2208               with three subclasses representing the types of timing functions
2209               that are supported.
2210         * platform/graphics/GraphicsLayer.h:
2211         (WebCore::AnimationValue::AnimationValue):
2212         (WebCore::FloatAnimationValue::FloatAnimationValue):
2213         (WebCore::TransformAnimationValue::TransformAnimationValue):
2214             - use PassRefPtr in function parameters
2215         * platform/graphics/qt/GraphicsLayerQt.cpp:
2216         (WebCore::solveStepsFunction):
2217         (WebCore::applyTimingFunction):
2218         (WebCore::AnimationQt::AnimationQt):
2219         (WebCore::AnimationQt::updateCurrentTime):
2220             - implement the timing function switch for QT
2221         * platform/graphics/mac/GraphicsLayerCA.mm:
2222         (WebCore::getCAMediaTimingFunction):
2223             - update for new timing function interface
2224         (WebCore::animationHasStepsTimingFunction):
2225             - new method to make sure animations with steps() functions
2226               never try to execute in Core Animation
2227         (WebCore::GraphicsLayerCA::addAnimation):
2228             - test for steps() timing function
2229         (WebCore::GraphicsLayerCA::timingFunctionForAnimationValue):
2230         * rendering/style/RenderStyleConstants.h:
2231             - remove old RenderStyle enum for timing function types
2232
2233 2010-09-08  Csaba Osztrogonác  <ossy@webkit.org>
2234
2235         Unreviewed trivial fix after r66960.
2236
2237         * WebCore.pro: loader/TextDocument.h renamed to html/TextDocument.h
2238
2239 2010-09-08  Adam Barth  <abarth@webkit.org>
2240
2241         Reviewed by Eric Seidel.
2242
2243         move-during-parse-parent.html crashes
2244         https://bugs.webkit.org/show_bug.cgi?id=45210
2245
2246         When inserting elements into the tree, they need to be associated with
2247         their parent's document, not the document for which the parser is
2248         running.  These two are different when the parent has been moved to a
2249         different document during parsing.
2250
2251         Test: fast/parser/move-during-parsing.html
2252
2253         * html/parser/HTMLConstructionSite.cpp:
2254         (WebCore::HTMLConstructionSite::insertComment):
2255         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
2256         (WebCore::HTMLConstructionSite::insertScriptElement):
2257         (WebCore::HTMLConstructionSite::insertTextNode):
2258         (WebCore::HTMLConstructionSite::createElement):
2259         (WebCore::HTMLConstructionSite::createHTMLElement):
2260
2261 2010-09-08  Gabor Loki  <loki@webkit.org>
2262
2263         Reviewed by Andreas Kling.
2264
2265         Fix increases required alignment of target type warning on ARM
2266         https://bugs.webkit.org/show_bug.cgi?id=45301
2267
2268         No new tests needed.
2269
2270         * bindings/js/SerializedScriptValue.cpp:
2271         (WebCore::CloneDeserializer::readLittleEndian):
2272         (WebCore::CloneDeserializer::readString):
2273         * plugins/PluginDatabase.cpp:
2274         (WebCore::readTime):
2275
2276 2010-09-08  Antonio Gomes  <agomes@rim.com>
2277
2278         Reviewed by Daniel Bates.
2279
2280         Make FocusController::focusedOrMainFrame method const
2281         https://bugs.webkit.org/show_bug.cgi?id=45406
2282
2283         No new tests.
2284
2285         * page/FocusController.cpp:
2286         (WebCore::FocusController::focusedOrMainFrame):
2287         * page/FocusController.h:
2288
2289 2010-09-08  Jian Li  <jianli@chromium.org>
2290
2291         Reviewed by Darin Adler.
2292
2293         Fix a problem in createCanonicalUUIDString that causes the last digit
2294         missing on Linux.
2295         https://bugs.webkit.org/show_bug.cgi?id=45412
2296
2297         This is caused by not including the final null character into the count
2298         that is provided to fgets.
2299
2300         This is covered by the existing test: send-form-data-with-sliced-file.html.
2301
2302         * platform/UUID.cpp:
2303         (WebCore::createCanonicalUUIDString):
2304
2305 2010-09-08  Nico Weber  <thakis@chromium.org>
2306
2307         Reviewed by Dimitri Glazkov.
2308
2309         chromium/mac: Fix overrelease in ImageLayerChromium
2310         https://bugs.webkit.org/show_bug.cgi?id=45360
2311
2312         Only release colorSpace if we created it.
2313
2314         * platform/graphics/chromium/ImageLayerChromium.cpp:
2315         (WebCore::ImageLayerChromium::updateContents):
2316
2317 2010-09-08  Robert Hogan  <robert@webkit.org>
2318
2319         Reviewed by Antonio Gomes.
2320
2321         Remove some unnecessary duplicate calls to string functions
2322
2323         https://bugs.webkit.org/show_bug.cgi?id=45314
2324
2325         * platform/network/curl/ResourceHandleManager.cpp:
2326         (WebCore::parseDataUrl):
2327         * websockets/WebSocketChannel.cpp:
2328         (WebCore::WebSocketChannel::send):
2329
2330 2010-09-08  Peter Kasting  <pkasting@google.com>
2331
2332         Not reviewed, fallout from http://trac.webkit.org/changeset/67001
2333
2334         Fix compile failures and add svn:eol-style on two new files.
2335
2336         * platform/ScrollAnimator.h: Added property svn:eol-style.
2337         * platform/ScrollAnimatorWin.cpp: Added property svn:eol-style.
2338         * platform/win/PopupMenuWin.cpp: Fix compile errors.
2339         (WebCore::PopupMenuWin::scrollToRevealSelection):
2340         (WebCore::PopupMenuWin::scrollSize):
2341
2342 2010-09-08  James Robinson  <jamesr@chromium.org>
2343
2344         Reviewed by Kenneth Russell.
2345
2346         [chromium] Force canvas 2d draw calls to happen in software if a gradient, pattern, shadow, or clip are active
2347         https://bugs.webkit.org/show_bug.cgi?id=45405
2348
2349         This forces all draw calls to happen in software instead of hardware if there is a fill pattern, gradient,
2350         shadow, or clip applied; at least until we can handle these in hardware.  Otherwise the pattern/gradient/etc
2351         is completely ignored by the hardware drawing routine and we render incorrectly.
2352
2353         The test is slightly convervative - for example it will force drawImage() calls to happen in software if a
2354         fill gradient is set even though it's irrelevant.  This doesn't seem to be an issue in practice and we
2355         can tighten the checks later if needed.
2356
2357         Tested by fast/canvas/canvas-incremental-repaint.html.
2358
2359         * platform/graphics/skia/GraphicsContextSkia.cpp:
2360         (WebCore::GraphicsContext::canvasClip):
2361         (WebCore::GraphicsContext::fillRect):
2362         * platform/graphics/skia/ImageBufferSkia.cpp:
2363         (WebCore::ImageBuffer::draw):
2364         * platform/graphics/skia/ImageSkia.cpp:
2365         (WebCore::BitmapImage::draw):
2366         (WebCore::BitmapImageSingleFrameSkia::draw):
2367         * platform/graphics/skia/PlatformContextSkia.cpp:
2368         (WebCore::PlatformContextSkia::State::State):
2369         (WebCore::PlatformContextSkia::canvasClipPath):
2370         (WebCore::PlatformContextSkia::canAccelerate):
2371         * platform/graphics/skia/PlatformContextSkia.h:
2372
2373 2010-09-08  Peter Kasting  <pkasting@google.com>
2374
2375         Reviewed by David Hyatt.
2376
2377         Add smooth scrolling framework, and a Windows implementation.
2378         https://bugs.webkit.org/show_bug.cgi?id=32356
2379
2380         * CMakeLists.txt: Add ScrollAnimator.
2381         * GNUmakefile.am: Add ScrollAnimator.
2382         * WebCore.gyp/WebCore.gyp: Add Windows ScrollAnimator.
2383         * WebCore.gypi: Add ScrollAnimator.
2384         * WebCore.pro: Add ScrollAnimator.
2385         * WebCore.vcproj/WebCore.vcproj: Add ScrollAnimator.
2386         * WebCore.xcodeproj/project.pbxproj: Add ScrollAnimator.
2387         * platform/ScrollAnimator.cpp: Added base implementation that does no animation.
2388         (WebCore::ScrollAnimator::create):
2389         (WebCore::ScrollAnimator::scroll):
2390         (WebCore::ScrollAnimator::setScrollPositionAndStopAnimation):
2391         * platform/ScrollAnimator.h: Added base implementation that does no animation.
2392         (WebCore::ScrollAnimator::ScrollAnimator):
2393         (WebCore::ScrollAnimator::~ScrollAnimator):
2394         * platform/ScrollAnimatorWin.cpp: Added Windows subclass that animates scrolls.
2395         (WebCore::ScrollAnimator::create):
2396         (WebCore::ScrollAnimatorWin::PerAxisData::PerAxisData):
2397         (WebCore::ScrollAnimatorWin::ScrollAnimatorWin):
2398         (WebCore::ScrollAnimatorWin::~ScrollAnimatorWin):
2399         (WebCore::ScrollAnimatorWin::scroll):
2400         (WebCore::ScrollAnimatorWin::setScrollPositionAndStopAnimation):
2401         (WebCore::ScrollAnimatorWin::accelerationTime):
2402         (WebCore::ScrollAnimatorWin::animationTimerFired):
2403         (WebCore::ScrollAnimatorWin::stopAnimationTimerIfNeeded):
2404         (WebCore::ScrollAnimatorWin::animateScroll):
2405         * platform/ScrollAnimatorWin.h: Added Windows subclass that animates scrolls.
2406         * platform/ScrollView.cpp: Implement new ScrollbarClient functions.  Allow wheel scrolls to be animated.
2407         (WebCore::ScrollView::scrollSize):
2408         (WebCore::ScrollView::setScrollOffsetFromAnimation):
2409         (WebCore::ScrollView::updateScrollbars):
2410         (WebCore::ScrollView::wheelEvent):
2411         * platform/ScrollView.h: Implement new ScrollbarClient functions.
2412         * platform/Scrollbar.cpp: Allow ScrollAnimator to handle scrolls if present.
2413         (WebCore::Scrollbar::setValue):
2414         (WebCore::Scrollbar::scroll):
2415         (WebCore::Scrollbar::moveThumb):
2416         (WebCore::Scrollbar::setCurrentPos):
2417         (WebCore::Scrollbar::mouseMoved):
2418         * platform/Scrollbar.h:
2419         * platform/ScrollbarClient.cpp: Added to avoid having to make ScrollAnimator.h non-private.
2420         (WebCore::ScrollbarClient::ScrollbarClient):
2421         (WebCore::ScrollbarClient::~ScrollbarClient):
2422         (WebCore::ScrollbarClient::scroll):
2423         (WebCore::ScrollbarClient::setScrollPositionAndStopAnimation):
2424         * platform/ScrollbarClient.h: Add hooks for ScrollAnimator.
2425         (WebCore::ScrollbarClient::convertFromScrollbarToContainingView):
2426         (WebCore::ScrollbarClient::convertFromContainingViewToScrollbar):
2427         * platform/gtk/MainFrameScrollbarGtk.cpp:
2428         (MainFrameScrollbarGtk::gtkValueChanged):
2429         * platform/qt/ScrollbarQt.cpp: Use scroll() in preference to setValue().
2430         (WebCore::Scrollbar::contextMenu):
2431         * platform/win/PopupMenuWin.cpp: Implement new ScrollbarClient functions.
2432         (WebCore::PopupMenuWin::scrollSize):
2433         (WebCore::PopupMenuWin::setScrollOffsetFromAnimation):
2434         * platform/win/PopupMenuWin.h: Implement new ScrollbarClient functions.
2435         * rendering/RenderDataGrid.cpp: Implement new ScrollbarClient functions.
2436         (WebCore::RenderDataGrid::scrollSize):
2437         (WebCore::RenderDataGrid::setScrollOffsetFromAnimation):
2438         * rendering/RenderDataGrid.h: Implement new ScrollbarClient functions.
2439         * rendering/RenderLayer.cpp: Implement new ScrollbarClient functions.
2440         (WebCore::RenderLayer::scrollToOffset):
2441         (WebCore::RenderLayer::scrollSize):
2442         (WebCore::RenderLayer::setScrollOffsetFromAnimation):
2443         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2444         * rendering/RenderLayer.h: Implement new ScrollbarClient functions.
2445         * rendering/RenderListBox.cpp: Implement new ScrollbarClient functions.
2446         (WebCore::RenderListBox::scrollToRevealElementAtListIndex):
2447         (WebCore::RenderListBox::scrollSize):
2448         (WebCore::RenderListBox::setScrollOffsetFromAnimation):
2449         (WebCore::RenderListBox::setScrollTop):
2450         * rendering/RenderListBox.h: Implement new ScrollbarClient functions.
2451
2452 2010-09-08  Ryosuke Niwa  <rniwa@webkit.org>
2453
2454         Reviewed by Tony Chang.
2455
2456         applyInlineStyleToRange needs cleanup
2457         https://bugs.webkit.org/show_bug.cgi?id=45008
2458
2459         Removed rangeIsEmpty and extracted the entire loop into applyInlineStyleToNodeRange.
2460         applyInlineStyleToRange is now a wrapper that fixes range and passes it on to applyInlineStyleToNodeRange.
2461
2462         No new tests are added since this is a cleanup.
2463
2464         * editing/ApplyStyleCommand.cpp:
2465         (WebCore::ApplyStyleCommand::applyInlineStyleToRange): Cleaned up.
2466         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): Extracted from applyInlineStyleToRange.
2467         * editing/ApplyStyleCommand.h:
2468
2469 2010-09-08  Andy Estes  <aestes@apple.com>
2470
2471         Rubber-stamped by Darin Adler.
2472
2473         Incorporate additional feedback from
2474         https://bugs.webkit.org/show_bug.cgi?id=45364.
2475
2476         * html/HTMLObjectElement.cpp:
2477         (WebCore::HTMLObjectElement::parametersForPlugin): Rename urlParam to
2478         urlParameter.
2479         * loader/SubframeLoader.h: Add argument names to the definition of
2480         SubframeLoader::resourceWillUsePlugin().
2481
2482 2010-09-07  Oliver Hunt  <oliver@apple.com>
2483
2484         Reviewed by Anders Carlsson.
2485
2486         Support SerializedScriptValue in WebKit2
2487         https://bugs.webkit.org/show_bug.cgi?id=45340
2488
2489         Add a new constructor that allows WebKit2 to create a SerializedScriptValue
2490         directly from serialized data.
2491
2492         * WebCore.exp.in:
2493         * bindings/js/SerializedScriptValue.h:
2494         (WebCore::SerializedScriptValue::adopt):
2495         (WebCore::SerializedScriptValue::data):
2496
2497 2010-09-08  Andy Estes  <aestes@apple.com>
2498
2499         Reviewed by Eric Carlson.
2500
2501         Fallback content should be rendered when an <object> doesn't specify a
2502         data, type or classid attribute.
2503         https://bugs.webkit.org/show_bug.cgi?id=45364
2504         <rdar://problem/8375816>
2505
2506         HTML5 says that if no data or type attribute is specified on an <object>,
2507         fallback content should be rendered. However, WebKit has traditionally
2508         supported specifying a URL and MIME type in <param> elements. 
2509
2510         To more closely match the spec while maintaining compatibility with
2511         content that relied on our old behavior, we will continue to load
2512         a resource specified by <param> elements if we can determine a priori
2513         that it will be handled by a plug-in. 
2514
2515         If we can't make this determination, and the <object> element has no
2516         "data" or "type" attribute, the <param> elements will be ignored and
2517         fallback content will be rendered. Otherwise, there is no change in
2518         behavior.
2519
2520         * html/HTMLObjectElement.cpp:
2521         (WebCore::HTMLObjectElement::parametersForPlugin): If an empty url is
2522         passed to this function and a <param> exists that specifies a url that
2523         references a plug-in resource, set it to url, making it the url that
2524         will be loaded by the <object> element.
2525         (WebCore::HTMLObjectElement::updateWidget): If no type attribute was
2526         specified, but there is a classid attribute, try to map the classid to
2527         a MIME type. This needs to be done before calling
2528         HTMLObjectElement::parametersForPlugin().
2529         * loader/SubframeLoader.cpp:
2530         (WebCore::SubframeLoader::resourceWillUsePlugin): Make a public method
2531         that determines if a resource will load a plug-in based on its url and
2532         MIME type. This is equivalent to calling
2533         SubframeLoader::shouldUsePlugin(), but does not burden the caller with
2534         the details of fallback content.
2535         * loader/SubframeLoader.h:
2536
2537 2010-09-08  Pavel Podivilov  <podivilov@chromium.org>
2538
2539         Reviewed by Yury Semikhatsky.
2540
2541         Web Inspector: add breakpoints to source frame after content is loaded.
2542         https://bugs.webkit.org/show_bug.cgi?id=43056
2543
2544         * inspector/front-end/ScriptsPanel.js:
2545         (WebInspector.ScriptsPanel.prototype._resourceLoadingFinished):
2546         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
2547         * inspector/front-end/SourceView.js:
2548         (WebInspector.SourceView.prototype._contentLoaded):
2549
2550 2010-09-08  Andreas Kling  <andreas.kling@nokia.com>
2551
2552         Reviewed by Kenneth Rohde Christiansen.
2553
2554         Canvas: Remove unnecessary null-check of canvas() in getImageData()
2555         https://bugs.webkit.org/show_bug.cgi?id=45394
2556
2557         canvas() is already dereferenced earlier in the function so there is
2558         no use in checking it for null later.
2559
2560         * html/canvas/CanvasRenderingContext2D.cpp:
2561         (WebCore::CanvasRenderingContext2D::getImageData):
2562
2563 2010-09-08  Philippe Normand  <pnormand@igalia.com>
2564
2565         Reviewed by Eric Carlson.
2566
2567         [GStreamer] cache media duration in READY instead of PLAYING
2568         https://bugs.webkit.org/show_bug.cgi?id=39053
2569
2570         New cacheDuration private method used to in updateStates() and
2571         durationChanged().
2572
2573         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2574         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
2575         (WebCore::MediaPlayerPrivateGStreamer::cacheDuration):
2576         (WebCore::MediaPlayerPrivateGStreamer::durationChanged):
2577         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2578
2579 2010-09-08  Martin Robinson  <mrobinson@igalia.com>
2580
2581         Reviewed by Xan Lopez.
2582
2583         [GTK] Need a WebSocket implementation
2584         https://bugs.webkit.org/show_bug.cgi?id=45197
2585
2586         Add a GIO-based WebSocket implementation. This does not yet support
2587         SSL sockets or proxies, but these should be possible to add as support
2588         arrives in GLib/GIO for them.
2589
2590         * platform/network/soup/SocketStreamHandle.h:
2591         * platform/network/soup/SocketStreamHandleSoup.cpp: Add a GIO-based WebSocket implementation.
2592         (WebCore::isActiveHandle): Added.
2593         (WebCore::deactivateHandle): Added.
2594         (WebCore::SocketStreamHandle::SocketStreamHandle): Filled out stub.
2595         (WebCore::SocketStreamHandle::~SocketStreamHandle): Ditto.
2596         (WebCore::SocketStreamHandle::connected): Added.
2597         (WebCore::SocketStreamHandle::readBytes): Added.
2598         (WebCore::SocketStreamHandle::writeReady): Added.
2599         (WebCore::SocketStreamHandle::platformSend): Filled out stub.
2600         (WebCore::SocketStreamHandle::platformClose): Filled out stub.
2601         (WebCore::SocketStreamHandle::beginWaitingForSocketWritability): Added.
2602         (WebCore::SocketStreamHandle::stopWaitingForSocketWritability):
2603         (WebCore::connectedCallback): Added.
2604         (WebCore::readReadyCallback): Added.
2605         (WebCore::writeReadyCallback): Added.
2606
2607 2010-09-07  Martin Robinson  <mrobinson@igalia.com>
2608
2609         Reviewed by Dirk Schulze.
2610
2611         [Cairo] Actually use the antialias parameter of GraphicsContext::clipConvexPolygon
2612         https://bugs.webkit.org/show_bug.cgi?id=45355
2613
2614         r63864 added an additional boolean parameter to GraphicsContext::clipConvexPolygon,
2615         which determines whether or not to render the render the clip with anti-aliasing
2616         or not. The Cairo implementation now uses that parameter to determine the argument
2617         to pass to cairo_set_antialias(...) when clipping.
2618
2619         Test: This is tested by many tests in fast/borders.
2620
2621         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2622         (WebCore::GraphicsContext::clipConvexPolygon): Actually use the boolean antialias parameter.
2623
2624 2010-09-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2625
2626         Reviewed by Kenneth Rohde Christiansen.
2627
2628         [EFL] Support to enable HTML5's Video based on gstreamer in WebKit-EFL
2629         https://bugs.webkit.org/show_bug.cgi?id=44098
2630
2631         To support video of HTML5 based on gstreamer, add files regarding gstreamer to
2632         CMakeListsEfl.txt.
2633
2634         * CMakeListsEfl.txt:
2635
2636 2010-09-08  Jan E Hanssen  <jhanssen@sencha.com>
2637
2638         Reviewed by Dirk Schulze.
2639
2640         [Qt] PathQt should use the QPainterPath functionality for calculations
2641         https://bugs.webkit.org/show_bug.cgi?id=43837
2642
2643         Change PathQt to use the built-in functionality of QPainterPath for
2644         calculating length(), pointAtLength() and normalAngleAtLength().
2645
2646         * platform/graphics/Path.cpp:
2647         * platform/graphics/qt/PathQt.cpp:
2648         (WebCore::Path::length):
2649         (WebCore::Path::pointAtLength):
2650         (WebCore::Path::normalAngleAtLength):
2651
2652 2010-09-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2653
2654         Reviewed by Dirk Schulze.
2655
2656         [WML] Remove create() function in WMLTaskElement because of build break.
2657         https://bugs.webkit.org/show_bug.cgi?id=44954
2658
2659         Remove create() function in WMLTaskElement.cpp because of build breaks.
2660
2661         * wml/WMLTaskElement.cpp:
2662         * wml/WMLTaskElement.h:
2663
2664 2010-09-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2665
2666         Reviewed by Dirk Schulze.
2667
2668         [WML] Add create functions to WML.
2669         https://bugs.webkit.org/show_bug.cgi?id=44950
2670
2671         There are missing definitions of create function in WML area. 
2672         So, there are build breaks when enabling WML. The create functions and the construction 
2673         are added. In addition, a style error and duplicated adoptRef usage are fixed.
2674
2675         * wml/WMLDocument.h:
2676         (WebCore::WMLDocument::create):
2677         * wml/WMLFormControlElement.h:
2678         * wml/WMLIntrinsicEvent.cpp:
2679         (WebCore::WMLIntrinsicEvent::WMLIntrinsicEvent):
2680         * wml/WMLIntrinsicEvent.h:
2681
2682 2010-09-08  Nico Weber  <thakis@chromium.org>
2683
2684         Reviewed by Kenneth Russell.
2685
2686         chromium/mac: Fix crash with compositor due to missing current NSGraphicsContext
2687         https://bugs.webkit.org/show_bug.cgi?id=45354
2688
2689         * platform/graphics/chromium/ContentLayerChromium.cpp:
2690         (WebCore::ContentLayerChromium::updateContents): Set a current local context.
2691
2692 2010-09-08  Justin Schuh  <jschuh@chromium.org>
2693
2694         Reviewed by Nikolas Zimmermann.
2695
2696         NULL deref when use target is reset, then set to display:none
2697         https://bugs.webkit.org/show_bug.cgi?id=45345
2698
2699         Move the NULL check on shadowRoot earlier in SVGUseElement::recalcStyle
2700
2701         Test: svg/custom/use-display-none.svg
2702
2703         * svg/SVGUseElement.cpp:
2704         (WebCore::SVGUseElement::recalcStyle):
2705
2706 2010-08-30  Maciej Stachowiak  <mjs@apple.com>
2707
2708         Reviewed by Darin Adler.
2709
2710         Handle MediaQueryExp memory management exclusively with smart pointers
2711         https://bugs.webkit.org/show_bug.cgi?id=44874
2712
2713         Gace MediaQueryExp a create function, made the constructor private, and followed
2714         the implications. The one tricky bit was using a non-copying sort to sort
2715         the Vector<OwnPtr<MediaQueryExp> > in the MediaQuery constructor.
2716         
2717         * ForwardingHeaders/wtf/NonCopyingSort.h: Added.
2718         * css/CSSGrammar.y:
2719         * css/CSSParser.cpp:
2720         (WebCore::CSSParser::~CSSParser):
2721         (WebCore::CSSParser::createFloatingMediaQueryExp):
2722         (WebCore::CSSParser::createFloatingMediaQueryExpList):
2723         (WebCore::CSSParser::sinkFloatingMediaQueryExpList):
2724         (WebCore::CSSParser::createFloatingMediaQuery):
2725         * css/CSSParser.h:
2726         * css/MediaList.cpp:
2727         * css/MediaQuery.cpp:
2728         (WebCore::expressionCompare):
2729         (WebCore::MediaQuery::MediaQuery):
2730         (WebCore::MediaQuery::~MediaQuery):
2731         * css/MediaQuery.h:
2732         (WebCore::MediaQuery::expressions):
2733         * css/MediaQueryEvaluator.cpp:
2734         (WebCore::MediaQueryEvaluator::eval):
2735         * css/MediaQueryExp.h:
2736         (WebCore::MediaQueryExp::create):
2737
2738 2010-09-08  Adam Barth  <abarth@webkit.org>
2739
2740         Reviewed by Maciej Stachowiak.
2741
2742         Remove unused member variable from DecodedDocumentParser
2743         https://bugs.webkit.org/show_bug.cgi?id=45379
2744
2745         This member variable isn't used because of the recent split of
2746         TextDocumentParser and TextViewSourceParser.
2747
2748         * dom/DecodedDataDocumentParser.cpp:
2749         (WebCore::DecodedDataDocumentParser::DecodedDataDocumentParser):
2750         * dom/DecodedDataDocumentParser.h:
2751         * dom/ScriptableDocumentParser.cpp:
2752         (WebCore::ScriptableDocumentParser::ScriptableDocumentParser):
2753         * dom/ScriptableDocumentParser.h:
2754
2755 2010-09-08  Csaba Osztrogonác  <ossy@webkit.org>
2756
2757         Reviewed by Andreas Kling.
2758
2759         Fix warning in rendering/RenderBlock.cpp.
2760         https://bugs.webkit.org/show_bug.cgi?id=45373
2761
2762         * rendering/RenderBlock.cpp:
2763         (WebCore::RenderBlock::hitTestColumns): Suggested parentheses added around && within ||
2764
2765 2010-09-08  Mario Sanchez Prada  <msanchez@igalia.com>
2766
2767         Reviewed by Martin Robinson.
2768
2769         [Gtk] A list item's number/bullet should not be a child of that list item
2770         https://bugs.webkit.org/show_bug.cgi?id=45190
2771
2772         Ignore list markers and prefix them to the text for the item
2773
2774         * accessibility/gtk/AccessibilityObjectAtk.cpp:
2775         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2776         Make list markers ignore accessibility for the GTK port.
2777         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2778         (webkit_accessible_text_get_text): Prefix the text of a marker
2779         along with the accessible text for its list item's AtkObject
2780
2781 2010-09-08  Adam Barth  <abarth@webkit.org>
2782
2783         Rubber-stamped by Eric Seidel.
2784
2785         Rename DocLoader to CachedResourceLoader because that's what it does.
2786
2787         * Android.mk:
2788         * CMakeLists.txt:
2789         * GNUmakefile.am:
2790         * WebCore.gypi:
2791         * WebCore.pro:
2792         * WebCore.vcproj/WebCore.vcproj:
2793         * WebCore.xcodeproj/project.pbxproj:
2794         * css/CSSCursorImageValue.cpp:
2795         (WebCore::CSSCursorImageValue::cachedImage):
2796         * css/CSSCursorImageValue.h:
2797         * css/CSSFontFaceSource.cpp:
2798         (WebCore::CSSFontFaceSource::getFontData):
2799         * css/CSSFontSelector.cpp:
2800         (WebCore::CSSFontSelector::cachedResourceLoader):
2801         (WebCore::CSSFontSelector::addFontFaceRule):
2802         * css/CSSFontSelector.h:
2803         * css/CSSImageValue.cpp:
2804         (WebCore::CSSImageValue::cachedImage):
2805         * css/CSSImageValue.h:
2806         * css/CSSImportRule.cpp:
2807         (WebCore::CSSImportRule::insertedIntoParent):
2808         * css/CSSStyleSelector.cpp:
2809         (WebCore::CSSStyleSelector::loadPendingImages):
2810         * css/CSSStyleSheet.h:
2811         * dom/Document.cpp:
2812         (WebCore::Document::Document):
2813         (WebCore::Document::~Document):
2814         (WebCore::Document::implicitClose):
2815         * dom/Document.h:
2816         (WebCore::Document::cachedResourceLoader):
2817         * dom/ProcessingInstruction.cpp:
2818         (WebCore::ProcessingInstruction::checkStyleSheet):
2819         * dom/ScriptElement.cpp:
2820         (WebCore::ScriptElementData::requestScript):
2821         * dom/XMLDocumentParser.cpp:
2822         * dom/XMLDocumentParser.h:
2823         * dom/XMLDocumentParserLibxml2.cpp:
2824         (WebCore::matchFunc):
2825         (WebCore::shouldAllowExternalLoad):
2826         (WebCore::openFunc):
2827         (WebCore::XMLDocumentParser::doWrite):
2828         (WebCore::XMLDocumentParser::endElementNs):
2829         (WebCore::XMLDocumentParser::initializeParserContext):
2830         (WebCore::XMLDocumentParser::doEnd):
2831         (WebCore::xmlDocPtrForString):
2832         * dom/XMLDocumentParserQt.cpp:
2833         (WebCore::XMLDocumentParser::parseEndElement):
2834         * dom/XMLDocumentParserScope.cpp:
2835         (WebCore::XMLDocumentParserScope::XMLDocumentParserScope):
2836         (WebCore::XMLDocumentParserScope::~XMLDocumentParserScope):
2837         * dom/XMLDocumentParserScope.h:
2838         * editing/Editor.cpp:
2839         (WebCore::Editor::paste):
2840         * editing/mac/EditorMac.mm:
2841         (WebCore::Editor::paste):
2842         * html/HTMLLinkElement.cpp:
2843         (WebCore::HTMLLinkElement::process):
2844         * html/parser/CSSPreloadScanner.cpp:
2845         (WebCore::CSSPreloadScanner::emitRule):
2846         * html/parser/HTMLPreloadScanner.cpp:
2847         (WebCore::HTMLNames::PreloadTask::preload):
2848         * html/parser/HTMLScriptRunner.cpp:
2849         (WebCore::HTMLScriptRunner::requestPendingScript):
2850         * inspector/InspectorResource.cpp:
2851         (WebCore::InspectorResource::cachedResource):
2852         * loader/Cache.cpp:
2853         (WebCore::Cache::requestResource):
2854         (WebCore::Cache::requestUserCSSStyleSheet):
2855         (WebCore::Cache::revalidateResource):
2856         (WebCore::Cache::addCachedResourceLoader):
2857         (WebCore::Cache::removeCachedResourceLoader):
2858         * loader/Cache.h:
2859         * loader/CachedCSSStyleSheet.h:
2860         * loader/CachedFont.cpp:
2861         (WebCore::CachedFont::load):
2862         (WebCore::CachedFont::beginLoadIfNeeded):
2863         * loader/CachedFont.h:
2864         * loader/CachedImage.cpp:
2865         (WebCore::CachedImage::load):
2866         (WebCore::CachedImage::maximumDecodedImageSize):
2867         * loader/CachedImage.h:
2868         * loader/CachedResource.cpp:
2869         (WebCore::CachedResource::CachedResource):
2870         (WebCore::CachedResource::~CachedResource):
2871         (WebCore::CachedResource::load):
2872         * loader/CachedResource.h:
2873         (WebCore::CachedResource::load):
2874         (WebCore::CachedResource::setCachedResourceLoader):
2875         * loader/CachedResourceLoader.cpp: Copied from WebCore/loader/DocLoader.cpp.
2876         (WebCore::CachedResourceLoader::CachedResourceLoader):
2877         (WebCore::CachedResourceLoader::~CachedResourceLoader):
2878         (WebCore::CachedResourceLoader::frame):
2879         (WebCore::CachedResourceLoader::checkForReload):
2880         (WebCore::CachedResourceLoader::requestImage):
2881         (WebCore::CachedResourceLoader::requestFont):
2882         (WebCore::CachedResourceLoader::requestCSSStyleSheet):
2883         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
2884         (WebCore::CachedResourceLoader::requestScript):
2885         (WebCore::CachedResourceLoader::requestXSLStyleSheet):
2886         (WebCore::CachedResourceLoader::requestLinkPrefetch):
2887         (WebCore::CachedResourceLoader::canRequest):
2888         (WebCore::CachedResourceLoader::requestResource):
2889         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
2890         (WebCore::CachedResourceLoader::setAutoLoadImages):
2891         (WebCore::CachedResourceLoader::cachePolicy):
2892         (WebCore::CachedResourceLoader::removeCachedResource):
2893         (WebCore::CachedResourceLoader::setLoadInProgress):
2894         (WebCore::CachedResourceLoader::checkCacheObjectStatus):
2895         (WebCore::CachedResourceLoader::incrementRequestCount):
2896         (WebCore::CachedResourceLoader::decrementRequestCount):
2897         (WebCore::CachedResourceLoader::requestCount):
2898         (WebCore::CachedResourceLoader::preload):
2899         (WebCore::CachedResourceLoader::checkForPendingPreloads):
2900         (WebCore::CachedResourceLoader::requestPreload):
2901         (WebCore::CachedResourceLoader::clearPreloads):
2902         (WebCore::CachedResourceLoader::clearPendingPreloads):
2903         (WebCore::CachedResourceLoader::printPreloadStats):
2904         * loader/CachedResourceLoader.h: Copied from WebCore/loader/DocLoader.h.
2905         * loader/CachedScript.h:
2906         * loader/CachedXSLStyleSheet.h:
2907         * loader/DocLoader.cpp: Removed.
2908         * loader/DocLoader.h: Removed.
2909         * loader/DocumentLoader.cpp:
2910         (WebCore::DocumentLoader::isLoadingInAPISense):
2911         (WebCore::DocumentLoader::subresource):
2912         (WebCore::DocumentLoader::getSubresources):
2913         * loader/FrameLoader.cpp:
2914         (WebCore::numRequests):
2915         (WebCore::FrameLoader::stopLoading):
2916         (WebCore::FrameLoader::didBeginDocument):
2917         * loader/HistoryController.cpp:
2918         (WebCore::HistoryController::createItem):
2919         * loader/ImageLoader.cpp:
2920         (WebCore::ImageLoader::updateFromElement):
2921         * loader/Request.cpp:
2922         (WebCore::Request::Request):
2923         * loader/Request.h:
2924         (WebCore::Request::cachedResourceLoader):
2925         * loader/loader.cpp:
2926         (WebCore::Loader::load):
2927         (WebCore::Loader::cancelRequests):
2928         (WebCore::Loader::Host::servePendingRequests):
2929         (WebCore::Loader::Host::didFinishLoading):
2930         (WebCore::Loader::Host::didFail):
2931         (WebCore::Loader::Host::didReceiveResponse):
2932         (WebCore::Loader::Host::cancelPendingRequests):
2933         (WebCore::Loader::Host::cancelRequests):
2934         * loader/loader.h:
2935         * page/DragController.cpp:
2936         (WebCore::DragController::concludeEditDrag):
2937         * page/Frame.cpp:
2938         * page/FrameView.cpp:
2939         (WebCore::FrameView::checkStopDelayingDeferredRepaints):
2940         (WebCore::FrameView::updateDeferredRepaintDelay):
2941         * page/Settings.cpp:
2942         (WebCore::setLoadsImagesAutomaticallyInAllFrames):
2943         * platform/android/TemporaryLinkStubs.cpp:
2944         (WebCore::CheckCacheObjectStatus):
2945         * platform/network/android/ResourceHandleAndroid.cpp:
2946         (WebCore::ResourceHandle::start):
2947         * platform/network/cf/ResourceHandleCFNet.cpp:
2948         * platform/network/curl/ResourceHandleCurl.cpp:
2949         * platform/network/mac/ResourceHandleMac.mm:
2950         * platform/network/qt/ResourceHandleQt.cpp:
2951         * platform/network/soup/ResourceHandleSoup.cpp:
2952         * platform/network/win/ResourceHandleWin.cpp:
2953         * svg/SVGFEImageElement.cpp:
2954         (WebCore::SVGFEImageElement::requestImageResource):
2955         * svg/SVGFontFaceUriElement.cpp:
2956         (WebCore::SVGFontFaceUriElement::loadFont):
2957         * workers/Worker.cpp:
2958         * xml/XSLImportRule.cpp:
2959         (WebCore::XSLImportRule::loadSheet):
2960         * xml/XSLStyleSheet.h:
2961         * xml/XSLStyleSheetLibxslt.cpp:
2962         (WebCore::XSLStyleSheet::cachedResourceLoader):
2963         (WebCore::XSLStyleSheet::parseString):
2964         * xml/XSLStyleSheetQt.cpp:
2965         (WebCore::XSLStyleSheet::cachedResourceLoader):
2966         * xml/XSLTProcessor.cpp:
2967         * xml/XSLTProcessorLibxslt.cpp:
2968         (WebCore::docLoaderFunc):
2969         (WebCore::setXSLTLoadCallBack):
2970         (WebCore::xmlDocPtrFromNode):
2971         (WebCore::XSLTProcessor::transformToString):
2972
2973 2010-09-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2974
2975         Reviewed by Eric Carlson.
2976
2977         Add mediaPlayerPlaybackStateChanged to MediaPlayerClient
2978
2979         https://bugs.webkit.org/show_bug.cgi?id=45263
2980
2981         The platform backend may change state, for example as a result
2982         of an external plugin controlling the backend, so we need to
2983         react to this situation by syncing up the WebCore state with the
2984         platform backend.
2985
2986         We call playInternal()/pauseInternal() depending on the backend
2987         state, to trigger the corresponding DOM events to match the state.
2988
2989         updatePlayState() is then refactored to take into account the
2990         situation where the backend is already in the correct state but
2991         WebCore is not, so that we update the playback progress timer
2992         and set m_playing correctly.
2993
2994         updatePlayState() changes Should be covered by existing tests.
2995
2996         * html/HTMLMediaElement.cpp:
2997         (WebCore::HTMLMediaElement::mediaPlayerPlaybackStateChanged):
2998         (WebCore::HTMLMediaElement::updatePlayState):
2999         * html/HTMLMediaElement.h:
3000         * platform/graphics/MediaPlayer.cpp:
3001         (WebCore::MediaPlayer::playbackStateChanged):
3002         * platform/graphics/MediaPlayer.h:
3003         (WebCore::MediaPlayerClient::mediaPlayerPlaybackStateChanged):
3004
3005 2010-09-08  Adam Barth  <abarth@webkit.org>
3006
3007         Reviewed by Eric Seidel.
3008
3009         TextDocument doesn't belong in WebCore/loader
3010         https://bugs.webkit.org/show_bug.cgi?id=45346
3011
3012         TextDocument has nothing to do with loading.  It turns out that it
3013         should be in WebCore/html because TextDocument is actually a subclass
3014         of HTMLDocument (in quirks mode, no less).
3015
3016         * Android.mk:
3017         * CMakeLists.txt:
3018         * GNUmakefile.am:
3019         * WebCore.gypi:
3020         * WebCore.pro:
3021         * WebCore.vcproj/WebCore.vcproj:
3022         * WebCore.xcodeproj/project.pbxproj:
3023         * html/TextDocument.cpp: Renamed from WebCore/loader/TextDocument.cpp.
3024         (WebCore::TextDocument::TextDocument):
3025         (WebCore::TextDocument::createParser):
3026         * html/TextDocument.h: Renamed from WebCore/loader/TextDocument.h.
3027         (WebCore::TextDocument::create):
3028
3029 2010-09-08  Adam Barth  <abarth@webkit.org>
3030
3031         Reviewed by Eric Seidel.
3032
3033         Create TextViewSourceParser
3034         https://bugs.webkit.org/show_bug.cgi?id=45343
3035
3036         Rather than have the view source document set a flag on
3037         HTMLViewSourceParser to indicate whether we're parsing a text document,
3038         this patch creates a TextViewSourceParser for parsing text documents in
3039         view-source mode.  Like the TextDocumentParser, the
3040         TextViewSourceParser implements this functionality by subclassing its
3041         HTML counterpart.
3042
3043         * Android.mk:
3044         * CMakeLists.txt:
3045         * GNUmakefile.am:
3046         * WebCore.gypi:
3047         * WebCore.pro:
3048         * WebCore.vcproj/WebCore.vcproj:
3049         * WebCore.xcodeproj/project.pbxproj:
3050         * html/HTMLViewSourceDocument.cpp:
3051         (WebCore::HTMLViewSourceDocument::createParser):
3052         * html/parser/HTMLViewSourceParser.cpp:
3053         * html/parser/HTMLViewSourceParser.h:
3054         (WebCore::HTMLViewSourceParser::tokenizer):
3055         * html/parser/TextViewSourceParser.cpp: Added.
3056         (WebCore::TextViewSourceParser::TextViewSourceParser):
3057         (WebCore::TextViewSourceParser::~TextViewSourceParser):
3058         * html/parser/TextViewSourceParser.h: Added.
3059         (WebCore::TextViewSourceParser::create):
3060
3061 2010-09-08  Adam Barth  <abarth@webkit.org>
3062
3063         Reviewed by Darin Adler.
3064
3065         Move HTMLInputStream to WebCore/html/parser
3066         https://bugs.webkit.org/show_bug.cgi?id=45339
3067
3068         I forgot to move this file before.
3069
3070         * GNUmakefile.am:
3071         * WebCore.gypi:
3072         * WebCore.vcproj/WebCore.vcproj:
3073         * WebCore.xcodeproj/project.pbxproj:
3074         * html/parser/HTMLInputStream.h: Renamed from WebCore/html/HTMLInputStream.h.
3075         (WebCore::HTMLInputStream::HTMLInputStream):
3076         (WebCore::HTMLInputStream::appendToEnd):
3077         (WebCore::HTMLInputStream::insertAtCurrentInsertionPoint):
3078         (WebCore::HTMLInputStream::hasInsertionPoint):
3079         (WebCore::HTMLInputStream::markEndOfFile):
3080         (WebCore::HTMLInputStream::haveSeenEndOfFile):
3081         (WebCore::HTMLInputStream::current):
3082         (WebCore::HTMLInputStream::splitInto):
3083         (WebCore::HTMLInputStream::mergeFrom):
3084         (WebCore::InsertionPointRecord::InsertionPointRecord):
3085         (WebCore::InsertionPointRecord::~InsertionPointRecord):
3086
3087 2010-09-08  Adam Barth  <abarth@webkit.org>
3088
3089         Reviewed by Eric Seidel.
3090
3091         TextDocument should come in from the cold
3092         https://bugs.webkit.org/show_bug.cgi?id=45334
3093
3094         Previously, TextDocument reinvented the wheel to parse text.  This
3095         patch replaces TextDocument's hand-rolled parser with a parser built on
3096         the HTML parser infrustructure, which gives us that stuff for free.  I
3097         also disentangled TextDocument from HTMLViewSourceDocument.
3098
3099         In a future patch, I'll move TextDocument out of the "loader" directory.
3100
3101         * Android.mk:
3102         * CMakeLists.txt:
3103         * GNUmakefile.am:
3104         * WebCore.gypi:
3105         * WebCore.pro:
3106         * WebCore.vcproj/WebCore.vcproj:
3107         * WebCore.xcodeproj/project.pbxproj:
3108         * html/HTMLViewSourceDocument.cpp:
3109         (WebCore::HTMLViewSourceDocument::createParser):
3110         * html/HTMLViewSourceDocument.h:
3111         * html/parser/HTMLTreeBuilder.cpp:
3112         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
3113         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
3114         * html/parser/HTMLTreeBuilder.h:
3115         * html/parser/HTMLViewSourceParser.cpp:
3116         (WebCore::HTMLViewSourceParser::forcePlaintext):
3117         * html/parser/HTMLViewSourceParser.h:
3118         * html/parser/TextDocumentParser.cpp: Added.
3119         (WebCore::TextDocumentParser::TextDocumentParser):
3120         (WebCore::TextDocumentParser::~TextDocumentParser):
3121         (WebCore::TextDocumentParser::insertFakePreElement):
3122         * html/parser/TextDocumentParser.h: Added.
3123         (WebCore::TextDocumentParser::create):
3124         * loader/TextDocument.cpp:
3125         * loader/TextDocument.h:
3126
3127 2010-09-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3128
3129         Reviewed by Andreas Kling.
3130
3131         Implement MediaPlayerPrivate::platformMedia() for the Qt port
3132
3133         https://bugs.webkit.org/show_bug.cgi?id=45264
3134
3135         * platform/graphics/MediaPlayer.h:
3136         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
3137         (WebCore::MediaPlayerPrivate::platformMedia):
3138         * platform/graphics/qt/MediaPlayerPrivateQt.h:
3139
3140 2010-09-08  Zoltan Herczeg  <zherczeg@webkit.org>
3141
3142         Reviewed by Dirk Schulze.
3143
3144         An individual renderer should be assigned to each SVGFE*Element class
3145         https://bugs.webkit.org/show_bug.cgi?id=43954
3146
3147         RenderSVGResourceFilterPrimitive renderer is added to
3148         the project, and assigned to each object, which class is
3149         derived from SVGFilterPrimitiveStandardAttributes. The patch
3150         mainly contains build system changes, and it fixes one layout
3151         test in svg/dynamic-updates.
3152
3153         * Android.mk:
3154         * CMakeLists.txt:
3155         * GNUmakefile.am:
3156         * WebCore.gypi:
3157         * WebCore.pro:
3158         * WebCore.vcproj/WebCore.vcproj:
3159         * WebCore.xcodeproj/project.pbxproj:
3160         * rendering/RenderObject.h:
3161         (WebCore::RenderObject::isSVGResourceFilterPrimitive):
3162         * rendering/RenderSVGResourceFilterPrimitive.cpp: Added.
3163         (WebCore::RenderSVGResourceFilterPrimitive::RenderSVGResourceFilterPrimitive):
3164         * rendering/RenderSVGResourceFilterPrimitive.h: Added.
3165         (WebCore::RenderSVGResourceFilterPrimitive::isSVGResourceFilterPrimitive):
3166         * rendering/SVGRenderTreeAsText.cpp:
3167         (WebCore::writeSVGContainer):
3168         * svg/SVGFEDiffuseLightingElement.cpp:
3169         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
3170         * svg/SVGFELightElement.cpp:
3171         (WebCore::SVGFELightElement::svgAttributeChanged):
3172         (WebCore::SVGFELightElement::childrenChanged):
3173         * svg/SVGFEOffsetElement.cpp:
3174         (WebCore::SVGFEOffsetElement::svgAttributeChanged):
3175         * svg/SVGFilterElement.h:
3176         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3177         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
3178         (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
3179         (WebCore::SVGFilterPrimitiveStandardAttributes::createRenderer):
3180         * svg/SVGFilterPrimitiveStandardAttributes.h:
3181         (WebCore::SVGFilterPrimitiveStandardAttributes::invalidate):
3182
3183 2010-09-07  Sam Weinig  <sam@webkit.org>
3184
3185         Reviewed by Dan Bernstein.
3186
3187         DatasetDOMStringMap does not have the right memory model
3188         https://bugs.webkit.org/show_bug.cgi?id=45358
3189
3190         Test: fast/dom/dataset-gc.html
3191
3192         * bindings/js/JSElementCustom.cpp:
3193         (WebCore::JSElement::markChildren):
3194         Mark the dataset if it exists.
3195
3196         * dom/Element.cpp:
3197         (WebCore::Element::optionalDataset):
3198         * dom/Element.h:
3199         Expose a way to get the dataset or null (depending on if anyone thing
3200         has forced its creation yet).
3201
3202 2010-09-07  Jan E Hanssen  <jhanssen@sencha.com>
3203
3204         Reviewed by Andreas Kling.
3205
3206         [Qt] Add a separate Path::closeCanvasSubpath() function for canvas paths
3207         https://bugs.webkit.org/show_bug.cgi?id=45331
3208
3209         This is needed due to an adverse effect of the fix in 44061 that causes
3210         certain paths not to be closed. This is not important for canvas paths
3211         but it is for SVG paths, so splitting up the code in a generic (SVG)
3212         case and one specialized for canvas.
3213
3214         Test: svg/dom/path-totalLength.html
3215
3216         * html/canvas/CanvasRenderingContext2D.cpp:
3217         (WebCore::CanvasRenderingContext2D::closePath):
3218         * platform/graphics/Path.h:
3219         (WebCore::Path::closeCanvasSubpath):
3220         * platform/graphics/qt/PathQt.cpp:
3221         (WebCore::Path::closeSubpath):
3222         (WebCore::Path::closeCanvasSubpath):
3223
3224 2010-09-07  Simon Fraser  <simon.fraser@apple.com>
3225
3226         Reviewed by Chris Marrin.
3227
3228         Transform animations always run in software now
3229         https://bugs.webkit.org/show_bug.cgi?id=45341
3230         
3231         After r66339 we always fell into software animation, because we
3232         failed to detect transform or opacity properties in the keyframes,
3233         so would send an empty list of values to the GraphicsLayer.
3234         
3235         Fixed by using CSSProperty values, rather than GraphicsLayer
3236         values, when detecting the presence of properties in the keyframes.
3237         
3238         Test: manual-tests/transition-accelerated.html
3239
3240         * rendering/RenderLayerBacking.cpp:
3241         (WebCore::RenderLayerBacking::startAnimation):
3242
3243 2010-09-07  Chris Rogers  <crogers@google.com>
3244
3245         Reviewed by Kenneth Russell.
3246
3247         audio engine: add FFTFrame files
3248         https://bugs.webkit.org/show_bug.cgi?id=34827
3249
3250         No new tests since audio API is not yet implemented.
3251
3252         * platform/audio/FFTFrame.cpp: Added.
3253         (WebCore::FFTFrame::doPaddedFFT):
3254         (WebCore::FFTFrame::createInterpolatedFrame):
3255         (WebCore::FFTFrame::interpolateFrequencyComponents):
3256         (WebCore::FFTFrame::extractAverageGroupDelay):
3257         (WebCore::FFTFrame::addConstantGroupDelay):
3258         (WebCore::FFTFrame::print):
3259         * platform/audio/FFTFrame.h: Added.
3260         (WebCore::FFTFrame::fftSize):
3261         (WebCore::FFTFrame::log2FFTSize):
3262         (WebCore::FFTFrame::dspSplitComplex):
3263         * platform/audio/mac/FFTFrameMac.cpp: Added.
3264         (WebCore::FFTFrame::FFTFrame):
3265         (WebCore::FFTFrame::~FFTFrame):
3266         (WebCore::FFTFrame::multiply):
3267         (WebCore::FFTFrame::doFFT):
3268         (WebCore::FFTFrame::doInverseFFT):
3269         (WebCore::FFTFrame::fftSetupForSize):
3270         (WebCore::FFTFrame::cleanup):
3271         (WebCore::FFTFrame::realData):
3272         (WebCore::FFTFrame::imagData):
3273
3274 2010-09-07  Brent Fulgham  <bfulgham@webkit.org>
3275
3276         Build fix, no review.
3277
3278         Provide stubs to allow WebKit.dll to build
3279         for the WinCairo port.
3280
3281         * platform/network/curl/ResourceRequest.h:
3282         (WebCore::ResourceRequest::ResourceRequest):
3283         * platform/network/curl/ResourceResponse.h:
3284         (WebCore::ResourceResponse::cfURLResponse):
3285
3286 2010-09-07  Chris Rogers  <crogers@google.com>
3287
3288         Reviewed by Kenneth Russell.
3289
3290         Add AudioArray.h
3291         https://bugs.webkit.org/show_bug.cgi?id=45204
3292
3293         No new tests since audio API is not yet implemented.
3294
3295         * platform/audio/AudioArray.h: Added.
3296         (WebCore::AudioArray::AudioArray):
3297         (WebCore::AudioArray::zero):
3298         (WebCore::AudioArray::zeroRange):
3299         (WebCore::AudioArray::copyToRange):
3300
3301 2010-09-07  Mihai Parparita  <mihaip@chromium.org>
3302
3303         Reviewed by Oliver Hunt.
3304
3305         pushState and replaceState do not clone RegExp objects correctly
3306         https://bugs.webkit.org/show_bug.cgi?id=44718
3307         
3308         Add RegExp support to the JSC implementation of SerializedScriptValue
3309         (it stores the pattern and flags read from a RegExpObject, and creates
3310         a new one on deserialization).
3311         
3312         Tests: fast/loader/stateobjects/pushstate-object-types.html 
3313
3314         * ForwardingHeaders/runtime/RegExp.h: Added.
3315         * ForwardingHeaders/runtime/RegExpObject.h: Added.
3316         * bindings/js/SerializedScriptValue.cpp:
3317         (WebCore::CloneSerializer::dumpIfTerminal):
3318         (WebCore::CloneDeserializer::readTerminal):
3319
3320 2010-09-07  James Robinson  <jamesr@chromium.org>
3321
3322         Reviewed by Kenneth Russell.
3323
3324         Fix compile errors in DrawingBuffer if USE(ACCELERATED_COMPOSITING) is not set
3325         https://bugs.webkit.org/show_bug.cgi?id=45324
3326
3327         Adds appropriate #if guards around code that has to deal directly with the compositor.
3328         DrawingBuffer can still be used without the compositor as an off-screen rendering
3329         region.
3330
3331         To test, compile without USE(ACCELERATED_COMPOSITING).
3332
3333         * platform/graphics/chromium/DrawingBufferChromium.cpp:
3334         (WebCore::DrawingBuffer::~DrawingBuffer):
3335         (WebCore::DrawingBuffer::reset):
3336         * platform/graphics/gpu/DrawingBuffer.h:
3337
3338 2010-09-03  Joseph Pecoraro  <joepeck@webkit.org>
3339
3340         Reviewed by Darin Adler.
3341
3342         Provide a way to trigger a <select multiple> onchange event on changes
3343         https://bugs.webkit.org/show_bug.cgi?id=45192
3344
3345         Test: LayoutTests/platform/mac/fast/objc/dom-html-select-activate.html
3346
3347         This provides a way for a WebKit client using the Obj-C DOM bindings to
3348         trigger the "change" on a listbox select (<select multiple> or <select>
3349         with size > 1). This is because when a select is rendered as a listbox
3350         "change" events are triggered by mouse down events.
3351
3352         This adds -[DOMHTMLSelectElement _activateItemAtIndex:allowMultipleSelection:]
3353         to allow for handling multiple selections if the select element is a
3354         multi-select.
3355
3356         * bindings/objc/DOMHTML.mm:
3357         (-[DOMHTMLSelectElement _activateItemAtIndex:allowMultipleSelection:]):
3358         * bindings/objc/DOMPrivate.h: unified the Category name. Was "FormsAutocomplete" now all are "FormAutocomplete".
3359         * dom/SelectElement.h:
3360         * html/HTMLSelectElement.cpp:
3361         (WebCore::HTMLSelectElement::setSelectedIndexByUser): listboxs need to be treated specially to fire their "change" event.
3362         * html/HTMLSelectElement.h:
3363         * wml/WMLSelectElement.cpp:
3364         (WebCore::WMLSelectElement::setSelectedIndexByUser):
3365
3366 2010-09-07  Simon Fraser  <simon.fraser@apple.com>
3367
3368         Reviewed by Darin Adler.
3369
3370         Minor WKCACFLayerRenderer cleanup
3371         https://bugs.webkit.org/show_bug.cgi?id=45201
3372
3373         Call initD3DGeometry() from createRenderer, rather than duplicating the code.
3374
3375         No behavior changes.
3376
3377         * platform/graphics/win/WKCACFLayerRenderer.cpp:
3378         (WebCore::WKCACFLayerRenderer::createRenderer):
3379
3380 2010-09-07  Vangelis Kokkevis  <vangelis@chromium.org>
3381
3382         Reviewed by Darin Fisher.
3383
3384         [chromium] Reset the owner of PlatformLayer's once the GraphicsLayer they are associated with
3385         gets destroyed.
3386         https://bugs.webkit.org/show_bug.cgi?id=45329
3387
3388         Test: Fixes UI test failures downstream for all the Media tests when run on the buildbots (machines without GPUs).
3389
3390         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3391         (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium):
3392
3393 2010-09-07  Anders Carlsson  <andersca@apple.com>
3394
3395         Reviewed by Darin Adler.
3396
3397         <rdar://problem/8381749> -Wcast-align warning emitted when building with clang
3398
3399         Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
3400
3401         * Configurations/Base.xcconfig:
3402
3403 2010-09-07  Abhishek Arya  <inferno@chromium.org>
3404
3405         Reviewed by Darin Adler.
3406
3407         Remove redundant bounds check in originalText(). Add bounds check
3408         to previousCharacter(). No need of start() > 0 check since m_start
3409         is unsigned and we already do start() null check inside function.
3410         https://bugs.webkit.org/show_bug.cgi?id=45303
3411
3412         Test: fast/text/one-letter-transform-crash.html
3413
3414         * rendering/RenderTextFragment.cpp:
3415         (WebCore::RenderTextFragment::originalText):
3416         (WebCore::RenderTextFragment::previousCharacter):
3417
3418 2010-09-07  Kenneth Russell  <kbr@google.com>
3419
3420         Reviewed by Dimitri Glazkov.
3421
3422         Regression in JPEG texture uploads on Mac OS X
3423         https://bugs.webkit.org/show_bug.cgi?id=45316
3424
3425         Fixed regression introduced in
3426         https://bugs.webkit.org/show_bug.cgi?id=44566 . Added regression
3427         test covering this case to gl-teximage.html in Khronos repository
3428         and synced test with WebKit's version.
3429
3430         * platform/graphics/cg/GraphicsContext3DCG.cpp:
3431         (WebCore::GraphicsContext3D::getImageData):
3432
3433 2010-09-07  Martin Robinson  <mrobinson@igalia.com>
3434
3435         Add rendering/ColumnInfo.h to the sources list.
3436
3437         * GNUmakefile.am:
3438
3439 2010-09-07  David Hyatt  <hyatt@apple.com>
3440
3441         Reviewed by Beth Dakin.
3442
3443         https://bugs.webkit.org/show_bug.cgi?id=45317, encapsulate multi-column rectangle information.
3444
3445         * WebCore.xcodeproj/project.pbxproj:
3446         * rendering/ColumnInfo.h: Added.
3447         (WebCore::ColumnInfo::ColumnInfo):
3448         (WebCore::ColumnInfo::desiredColumnWidth):
3449         (WebCore::ColumnInfo::setDesiredColumnWidth):
3450         (WebCore::ColumnInfo::desiredColumnCount):
3451         (WebCore::ColumnInfo::setDesiredColumnCount):
3452         (WebCore::ColumnInfo::columnCount):
3453         (WebCore::ColumnInfo::columnRectAt):
3454         (WebCore::ColumnInfo::clearColumns):
3455         (WebCore::ColumnInfo::addColumnRect):
3456         * rendering/RenderBlock.cpp:
3457         (WebCore::RenderBlock::paintColumnRules):
3458         (WebCore::RenderBlock::paintColumnContents):
3459         (WebCore::RenderBlock::lowestPosition):
3460         (WebCore::RenderBlock::rightmostPosition):
3461         (WebCore::RenderBlock::leftmostPosition):
3462         (WebCore::RenderBlock::hitTestColumns):
3463         (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
3464         (WebCore::RenderBlock::desiredColumnWidth):
3465         (WebCore::RenderBlock::desiredColumnCount):
3466         (WebCore::RenderBlock::columnInfo):
3467         (WebCore::RenderBlock::layoutColumns):
3468         (WebCore::RenderBlock::adjustPointToColumnContents):
3469         (WebCore::RenderBlock::adjustRectForColumns):
3470         (WebCore::RenderBlock::adjustForColumns):
3471         * rendering/RenderBlock.h:
3472         * rendering/RenderLayer.cpp:
3473         (WebCore::RenderLayer::paintChildLayerIntoColumns):
3474         (WebCore::RenderLayer::hitTestChildLayerColumns):
3475
3476 2010-09-07  Dan Bernstein  <mitz@apple.com>
3477
3478         Reviewed by Dave Hyatt.
3479
3480         <rdar://problem/7794761> Floats inside of multicol fail to hit test
3481         https://bugs.webkit.org/show_bug.cgi?id=44730
3482
3483         Test: fast/multicol/hit-test-float.html
3484
3485         Factored float hit-testing out of nodeAtPoint so that hitTestColumns could
3486         call it with column-adjusted coordinates.
3487
3488         * rendering/RenderBlock.cpp:
3489         (WebCore::RenderBlock::nodeAtPoint):
3490         (WebCore::RenderBlock::hitTestFloats):
3491         (WebCore::RenderBlock::hitTestColumns):
3492         * rendering/RenderBlock.h:
3493
3494 2010-09-07  François Sausset  <sausset@gmail.com>
3495
3496         Reviewed by Beth Dakin.
3497
3498         <math> element should be centered when display attribute set to block.
3499         https://bugs.webkit.org/show_bug.cgi?id=44206
3500
3501         Test: mathml/presentation/attributes.xhtml
3502
3503         * css/mathml.css:
3504         (math[display="block"]):
3505
3506 2010-09-07  Eric Carlson  <eric.carlson@apple.com>
3507
3508         Reviewed by Darin Adler.
3509
3510         Media elements should derive from ActiveDOMObjects
3511         https://bugs.webkit.org/show_bug.cgi?id=45306
3512         <rdar://problem/7929062>
3513
3514         * html/HTMLMediaElement.cpp:
3515         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize ActiveDOMObject
3516         (WebCore::HTMLMediaElement::stop): Call suspend, we want to do the same thing in both cases.
3517         (WebCore::HTMLMediaElement::suspend): Rename from documentWillBecomeInactive.
3518         (WebCore::HTMLMediaElement::resume): Rename from documentDidBecomeActive.
3519         (WebCore::HTMLMediaElement::hasPendingActivity): Return true if the event queue is not empty
3520         so the element can't be collected before they are sent.
3521         * html/HTMLMediaElement.h:
3522         (WebCore::HTMLMediaElement::canSuspend):
3523
3524 2010-09-07  Dimitri Glazkov  <dglazkov@chromium.org>
3525
3526         Unreviewed, rolling out r66886.
3527         http://trac.webkit.org/changeset/66886
3528         https://bugs.webkit.org/show_bug.cgi?id=45112
3529
3530         Made
3531
3532         * platform/chromium/GeolocationServiceChromium.cpp:
3533         * platform/chromium/GeolocationServiceChromium.h:
3534
3535 2010-09-07  Martin Robinson  <mrobinson@igalia.com>
3536
3537         Small build fix. Remove libWebCoreJS from CLEAN_FILES, as it
3538         is no longer built.
3539
3540         * GNUmakefile.am: Remove reference to libWebCoreJS.
3541
3542 2010-09-07  Martin Robinson  <mrobinson@igalia.com>
3543
3544         Reviewed by Xan Lopez.
3545
3546         [GTK] [REGRESSION] r66848 caused a crash in testwebview
3547         https://bugs.webkit.org/show_bug.cgi?id=45298
3548
3549         No new tests as this fixes a test failure.
3550
3551         * platform/gtk/ScrollViewGtk.cpp:
3552         (WebCore::ScrollView::setGtkAdjustments): Don't actually attach the
3553         scrollbar adjustments unless this is a main frame ScrollView. If we do
3554         Scrollbars will be cast incorrectly to MainFrameScrollbarGtk, causing
3555         a segfault.
3556
3557 2010-09-07  Kristian Monsen  <kristianm@google.com>
3558
3559         Reviewed by Steve Block.
3560
3561         Compile fix for Android.
3562         https://bugs.webkit.org/show_bug.cgi?id=45292
3563         Explicitly add needed header for 
3564         STRING_TO_V8PARAMETER_EXCEPTION_BLOCK as they do not get 
3565         included through other headers on Android.
3566
3567         No new tests, just a compile fix.
3568
3569         * bindings/scripts/CodeGeneratorV8.pm:
3570
3571 2010-09-07  Martin Robinson  <mrobinson@igalia.com>
3572
3573         Reviewed by Xan Lopez.
3574
3575         [GTK] Fix some feature guards
3576         https://bugs.webkit.org/show_bug.cgi?id=45302
3577
3578         No new tests as this is just a build change.
3579
3580         * platform/graphics/gstreamer/DataSourceGStreamer.cpp: Guard with #if ENABLE(VIDEO)
3581         * platform/graphics/gstreamer/DataSourceGStreamer.h: Ditto.
3582         * platform/graphics/gstreamer/GOwnPtrGStreamer.cpp: Ditto.
3583         * platform/graphics/gstreamer/GOwnPtrGStreamer.h: Ditto.
3584         * platform/graphics/gstreamer/GStreamerGWorld.cpp: Ditto.
3585         * platform/graphics/gstreamer/GStreamerGWorld.h: Ditto.
3586         * platform/graphics/gstreamer/ImageGStreamer.h: Ditto.
3587         * platform/graphics/gstreamer/ImageGStreamerCG.mm: Ditto.
3588         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Ditto.
3589         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Ditto.
3590         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Ditto.
3591         * platform/graphics/gstreamer/PlatformVideoWindow.h: Ditto.
3592         * platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp: Ditto.
3593         * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp: Ditto.
3594         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: Ditto.
3595         * platform/graphics/gstreamer/VideoSinkGStreamer.h: Ditto.
3596         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: Ditto.
3597         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: Ditto.
3598         * platform/gtk/GeolocationServiceGtk.cpp: Guard with ENABLE(GEOLOCATION)
3599         * platform/gtk/GeolocationServiceGtk.h: Ditto.
3600
3601 2010-09-07  Jonathan Dixon  <joth@chromium.org>
3602
3603         Reviewed by Jeremy Orlow.
3604
3605         Access to out-of-scope WebGeolocationServiceBridgeImpl
3606         https://bugs.webkit.org/show_bug.cgi?id=45112
3607
3608         Add missing virtual destructor to the abstract base class.
3609
3610         * platform/chromium/GeolocationServiceChromium.cpp:
3611         (WebCore::GeolocationServiceBridge::~GeolocationServiceBridge):
3612         * platform/chromium/GeolocationServiceChromium.h:
3613
3614 2010-09-07  Martin Robinson  <mrobinson@igalia.com>
3615
3616         Reviewed by Xan Lopez.
3617
3618         [GTK] [REGRESSION] r66848 caused a crash in testwebview
3619         https://bugs.webkit.org/show_bug.cgi?id=45298
3620
3621         No new tests as this fixes a test failure.
3622
3623         * platform/gtk/ScrollViewGtk.cpp:
3624         (WebCore::ScrollView::setGtkAdjustments): Don't actually attach the
3625         scrollbar adjustments unless this is a main frame ScrollView. If we do
3626         Scrollbars will be cast incorrectly to MainFrameScrollbarGtk, causing
3627         a segfault.
3628
3629 2010-09-07  Adam Langley  <agl@chromium.org>
3630
3631         Reviewed by Tony Chang.
3632
3633         [chromium] Fix complex text word spacing on Linux.
3634
3635         I broke complex text word spacing with r66689. I misnamed a
3636         variable in the original code |glyphIndex| when it was
3637         actually indexing code points. That meant that I compared it
3638         against the wrong limit when working around Harfbuzz issues
3639         and neatly disabled word spacing.
3640
3641         https://bugs.webkit.org/show_bug.cgi?id=45191
3642
3643         Test: fast/text/atsui-spacing-features.html
3644
3645         * platform/graphics/chromium/FontLinux.cpp:
3646         (WebCore::TextRunWalker::setGlyphXPositions):
3647
3648 2010-09-07  Satish Sampath  <satish@chromium.org>
3649
3650         Reviewed by Steve Block.
3651
3652         Fix speech button's hit test logic for RTL rendering.
3653         https://bugs.webkit.org/show_bug.cgi?id=45288
3654
3655         * rendering/RenderTextControlSingleLine.cpp:
3656         (WebCore::RenderTextControlSingleLine::forwardEvent):
3657
3658 2010-09-07  Satish Sampath  <satish@chromium.org>
3659
3660         Reviewed by Jeremy Orlow.
3661
3662         Ignore programmatic clicks on speech input button for security reasons.
3663         https://bugs.webkit.org/show_bug.cgi?id=45181
3664
3665         Test: fast/speech/speech-button-ignore-generated-events.html
3666
3667         * rendering/TextControlInnerElements.cpp:
3668         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
3669
3670 2010-09-07  Kent Hansen  <kent.hansen@nokia.com>
3671
3672         Reviewed by Andreas Kling.
3673
3674         [Qt] tst_QWebFrame::connectAndDisconnect() fails on WebKit trunk because __qt_sender__ is never set
3675         https://bugs.webkit.org/show_bug.cgi?id=44697
3676
3677         When the signal handler is a JS function, __qt_sender__ is stuffed into a temporary
3678         object that's pushed onto the function's scope before the function is invoked, and
3679         popped again afterwards.
3680
3681         We were pushing this new scope object _after_ calling JSFunction::getCallData(),
3682         and relying on JSC::call() to use the fresh scope chain from the function object.
3683         However, this is no longer the case; JSC::call() uses the scope chain passed in
3684         the CallData argument. Hence, we need to set up the scope before the function's
3685         CallData is queried.
3686
3687         * bridge/qt/qt_runtime.cpp:
3688         (JSC::Bindings::QtConnectionObject::execute):
3689
3690 2010-09-07  Kwang Yul Seo  <skyul@company100.net>
3691
3692         Reviewed by Kent Tamura.
3693
3694         Add ENABLE(INSPECTOR) guard in InspectorController::inspectorControllerForNode
3695         https://bugs.webkit.org/show_bug.cgi?id=45272
3696
3697         Build fix.
3698
3699         * inspector/InspectorController.h:
3700         (WebCore::InspectorController::inspectorControllerForNode):
3701
3702 2010-09-07  Joerg Bornemann  <joerg.bornemann@nokia.com>
3703
3704         Reviewed by Ariya Hidayat.
3705
3706         Fix QtWebKit linker error on Windows CE 6.
3707         https://bugs.webkit.org/show_bug.cgi?id=43442
3708
3709         Doesn't affect any tests.
3710
3711         * WebCore.pro:
3712
3713 2010-09-07  James Kozianski  <koz@chromium.org>
3714
3715         Reviewed by Kent Tamura.
3716
3717         Crash rendering <meter/> with percent padding
3718         https://bugs.webkit.org/show_bug.cgi?id=45081
3719
3720         Avoids a crash caused by RenderMeter checking its own dimensions to
3721         determine whether it needs layout. The crash is avoided by removing
3722         the check and always calling setNeedsLayout(true).
3723
3724         Test: fast/dom/HTMLMeterElement/meter-percent-size.html
3725
3726         * rendering/RenderIndicator.cpp:
3727         (WebCore::RenderIndicator::updateFromElement):
3728         * rendering/RenderIndicator.h:
3729
3730 2010-09-06  Adam Barth  <abarth@webkit.org>
3731
3732         Reviewed by Sam Weinig.
3733
3734         OOB read with svg polyline
3735         https://bugs.webkit.org/show_bug.cgi?id=45279
3736
3737         In principle, attributeChanged can do anything.  If we supported more
3738         DOM mutation events, it could even run JavaScript.  That means we need
3739         to be prepared for the attribute map to change when running
3740         attributeChanged.  This patch makes this loop resilient to the
3741         attribute map changing by storing the list of changed attributes on the
3742         stack.
3743
3744         Test: fast/parser/changing-attrbutes-crash.html
3745
3746         * dom/Element.cpp:
3747         (WebCore::Element::setAttributeMap):
3748
3749 2010-09-06  Oliver Hunt  <oliver@apple.com>
3750
3751         Windows build fix
3752
3753         * bindings/js/SerializedScriptValue.cpp:
3754         (WebCore::CloneSerializer::write):
3755
3756 2010-09-06  Oliver Hunt  <oliver@apple.com>
3757
3758         Windows build fix
3759
3760         * bindings/js/SerializedScriptValue.cpp:
3761         (WebCore::CloneSerializer::write):
3762
3763 2010-09-05  Oliver Hunt  <oliver@apple.com>
3764
3765         Reviewed by Sam Weinig.
3766
3767         SerializedScriptValue needs to use a flat storage mechanism
3768         https://bugs.webkit.org/show_bug.cgi?id=45244
3769
3770         Rewrite the old tree to tree serialization logic to use
3771         flat storage.  Unfortunately this basically required a
3772         complete rewrite.
3773
3774         * bindings/js/SerializedScriptValue.cpp:
3775         (WebCore::CloneBase::CloneBase):
3776         (WebCore::CloneBase::shouldTerminate):
3777         (WebCore::CloneBase::ticksUntilNextCheck):
3778         (WebCore::CloneBase::didTimeOut):
3779         (WebCore::CloneBase::throwStackOverflow):
3780         (WebCore::CloneBase::throwInterruptedException):
3781         (WebCore::CloneBase::fail):
3782         (WebCore::CloneSerializer::serialize):
3783         (WebCore::CloneSerializer::CloneSerializer):
3784         (WebCore::CloneSerializer::isArray):
3785         (WebCore::CloneSerializer::startObject):
3786         (WebCore::CloneSerializer::startArray):
3787         (WebCore::CloneSerializer::endObject):
3788         (WebCore::CloneSerializer::getSparseIndex):
3789         (WebCore::CloneSerializer::getProperty):
3790         (WebCore::CloneSerializer::dumpImmediate):
3791         (WebCore::CloneSerializer::dumpString):
3792         (WebCore::CloneSerializer::dumpIfTerminal):
3793         (WebCore::CloneSerializer::write):
3794         (WebCore::CloneSerializer::writeLittleEndian):
3795         (WebCore::CloneSerializer::writeStringIndex):
3796         (WebCore::CloneDeserializer::deserializeString):
3797         (WebCore::CloneDeserializer::deserialize):
3798         (WebCore::CloneDeserializer::CloneDeserializer):
3799         (WebCore::CloneDeserializer::throwValidationError):
3800         (WebCore::CloneDeserializer::isValid):
3801         (WebCore::CloneDeserializer::readLittleEndian):
3802         (WebCore::CloneDeserializer::read):
3803         (WebCore::CloneDeserializer::readStringIndex):
3804         (WebCore::CloneDeserializer::readString):
3805         (WebCore::CloneDeserializer::readStringData):
3806         (WebCore::CloneDeserializer::readTag):
3807         (WebCore::CloneDeserializer::putProperty):
3808         (WebCore::CloneDeserializer::readFile):
3809         (WebCore::CloneDeserializer::readTerminal):
3810         (WebCore::SerializedScriptValue::~SerializedScriptValue):
3811         (WebCore::SerializedScriptValue::SerializedScriptValue):
3812         (WebCore::SerializedScriptValue::create):
3813         (WebCore::SerializedScriptValue::toString):
3814         (WebCore::SerializedScriptValue::deserialize):
3815         (WebCore::SerializedScriptValue::nullValue):
3816         * bindings/js/SerializedScriptValue.h:
3817         * dom/MessagePortChannel.cpp:
3818         (WebCore::MessagePortChannel::EventData::EventData):
3819         * workers/WorkerMessagingProxy.cpp:
3820         (WebCore::MessageWorkerContextTask::MessageWorkerContextTask):
3821         (WebCore::MessageWorkerTask::MessageWorkerTask):
3822
3823 2010-09-06  Martin Robinson  <mrobinson@igalia.com>
3824
3825         Reviewed by Gustavo Noronha Silva.
3826
3827         [GTK] ScrollbarThemeGtk should be enabled for interior frame scrollbars
3828         https://bugs.webkit.org/show_bug.cgi?id=45046
3829
3830         Make interior frame scrollbars "fully-fake," which means they do not rely
3831         at all on GTK+ for painting or behavior, but instead are typical WebCore
3832         scrollbars drawn according to the GTK+ theme. Move ScrollbarGtk to
3833         MainFrameScrollbarGtk and remove all logic in that file dealing with interior
3834         frame scrollbars.
3835
3836         No new tests, as this is already covered by pixel tests for scrollbars,
3837         which were added in r66605.
3838
3839         * GNUmakefile.am: Update sources list.
3840         * platform/ScrollView.h: Change the adjustment members to be smart pointers.
3841         * platform/Scrollbar.cpp: Enable THUMB_POSITION_AFFECTS_BUTTONS for GTK+ as well.
3842         * platform/gtk/MainFrameScrollbarGtk.cpp: Added.
3843         (MainFrameScrollbarGtk::create): Create a MainFrameScrollbarGtk instead of ScrollbarGtk.
3844         (MainFrameScrollbarGtk::MainFrameScrollbarGtk):
3845         (MainFrameScrollbarGtk::~MainFrameScrollbarGtk):
3846         (MainFrameScrollbarGtk::attachAdjustment):
3847         (MainFrameScrollbarGtk::detachAdjustment):
3848         (MainFrameScrollbarGtk::updateThumbPosition):
3849         (MainFrameScrollbarGtk::updateThumbProportion):
3850         (MainFrameScrollbarGtk::gtkValueChanged):
3851         (MainFrameScrollbarGtk::paint):
3852         * platform/gtk/MainFrameScrollbarGtk.h: Added.
3853         * platform/gtk/ScrollViewGtk.cpp:
3854         (WebCore::ScrollView::platformInit): Remove unnecessary initialization
3855         because of smart pointer change.
3856         (WebCore::ScrollView::createScrollbar): Instead of creating ScrollbarGtk for
3857         interior frame scrollbars, create a normal WebCore scrollbar.
3858         (WebCore::ScrollView::setGtkAdjustments): Added an extra assert which ensures
3859         that this method is never called with a non-null adjustment on an interior frame
3860         scrollbar.
3861         (WebCore::ScrollView::platformAddChild): Remove logic for interior frame scrollbars.
3862         (WebCore::ScrollView::platformRemoveChild): Remove logic for interior frame scrollbars.
3863         (WebCore::ScrollView::visibleContentRect): Use a more accurate guard for detecting
3864         transitionary states when accessing parent widgets. Explcitly guard against interior
3865         frame ScrollView's trying to determine size based on parent widgets.
3866         (WebCore::ScrollView::setScrollbarModes): This method was out of sync with the one
3867         it copy-and-pasted from. Update it and change the logic to do the right thing for
3868         interior frame scrollbars.
3869         * platform/gtk/ScrollbarGtk.cpp: Removed.
3870         * platform/gtk/ScrollbarGtk.h: Removed.
3871
3872 2010-09-06  Justin Schuh  <jschuh@chromium.org>
3873
3874         Reviewed by Nikolas Zimmermann.
3875
3876         Make SVG PendingResources use RefPtr
3877         https://bugs.webkit.org/show_bug.cgi?id=43587
3878
3879         Convert SVGDocumentExtensions::m_pendingResources to use a RefPtr for 
3880         pending elements instead of a raw pointer so that pending elements can't
3881         be freed prematurely.
3882
3883         Test: svg/custom/use-invalid-pattern.svg
3884
3885         * rendering/RenderSVGResourceContainer.cpp:
3886         (WebCore::RenderSVGResourceContainer::registerResource):
3887         * svg/SVGDocumentExtensions.cpp:
3888         (WebCore::SVGDocumentExtensions::addPendingResource):
3889         (WebCore::SVGDocumentExtensions::removePendingResource):
3890         * svg/SVGDocumentExtensions.h:
3891         * svg/SVGElement.cpp:
3892         (WebCore::SVGElement::insertedIntoDocument):
3893
3894 2010-09-06  Martin Robinson  <mrobinson@igalia.com>
3895
3896         Reviewed by Gustavo Noronha Silva.
3897
3898         [GTK] ScrollbarThemeGtk should support secondary steppers
3899         https://bugs.webkit.org/show_bug.cgi?id=44791
3900
3901         Add support to ScrollbarThemeGtk for drawing alternate steppers. Adjust
3902         the algorithms for calculating forward and back button rects, if they
3903         are active in the theme. Expose this information via GtkScrollbarMetrics.
3904
3905         * platform/gtk/ScrollbarThemeGtk.cpp:
3906         (WebCore::ScrollbarThemeGtk::updateThemeProperties): Access the secondary stepper properties
3907         of GtkScrollbarMetrics when updating the style cache.
3908         (WebCore::ScrollbarThemeGtk::backButtonRect): Account for alternate steppers.
3909         (WebCore::ScrollbarThemeGtk::forwardButtonRect): Ditto.
3910         (WebCore::ScrollbarThemeGtk::trackRect): Ditto.
3911         (WebCore::ScrollbarThemeGtk::paintButton): Ditto.
3912         * platform/gtk/ScrollbarThemeGtk.h:
3913         * platform/gtk/gtk2drawing.c: Expose whether or not the style uses alternate steppers
3914         via GtkScrollbarMetrics.
3915         * platform/gtk/gtkdrawing.h: Added fields to GtkScrollbarMetrics.
3916
3917 2010-09-06  Tony Gentilcore  <tonyg@chromium.org>
3918
3919         Reviewed by Adam Barth.
3920
3921         Implement HTML5 definition of document.readyState
3922         https://bugs.webkit.org/show_bug.cgi?id=45119
3923
3924         The legacy behavior was "loading" -> "loaded" -> "complete". The new
3925         HTML5 behavior is "loading" -> "interactive" -> "complete". There is
3926         some potential for this to cause compat problems if for instance a
3927         page expects readyState to be "loaded" during the DOMContentLoaded event.
3928
3929         Test: fast/dom/Document/readystate.html
3930
3931         * dom/Document.cpp:
3932         (WebCore::Document::Document): Initial value is Complete because according to http://www.whatwg.org/specs/web-apps/current-work/#dom-document-readystate,
3933         when a Document is created the initial value is "complete" unless it has a parser associated with it, in which case it is "loading".
3934         So the ctor starts it Complete, and when the parser is created it is flipped to Loading.
3935         (WebCore::Document::readyState):
3936         (WebCore::Document::setReadyState):
3937         (WebCore::Document::implicitOpen):
3938         (WebCore::Document::finishedParsing): Ensure that XML and HTML parser have transition to Stopping state.
3939         * dom/Document.h:
3940         * dom/DocumentParser.cpp:
3941         (WebCore::DocumentParser::prepareToStopParsing): Previously this was being called when parsing had stopped.
3942         It is better to ensure it is only called while parsing.
3943         * dom/XMLDocumentParser.cpp:
3944         (WebCore::XMLDocumentParser::end): Transition to stopping before calling document finishedParsiong().
3945         * html/parser/HTMLDocumentParser.cpp:
3946         (WebCore::HTMLDocumentParser::prepareToStopParsing): Set state to interactive before running deferred scripts.
3947         This method is also called when parsing fragments, so we need to ensure it isn't done in that case.
3948         (WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd): Added. Break out this part s that notifyFinished doesn't go through
3949         the additional steps of pumping tokenizer, setting the state, etc.
3950         (WebCore::HTMLDocumentParser::notifyFinished): Now that prepareToStopParsing is split up, we must protect. It also makes sense to add a couple of ASSERTs.
3951         * loader/FrameLoader.cpp:
3952         (WebCore::FrameLoader::stopLoading): It looks like an aborted load should never transition to "complete" according the HTML5. I've left the legacy behavior for now though.
3953         (WebCore::FrameLoader::checkCompleted): The FrameLoader now sets the state on the Document instead of the Document polling the FrameLoader.
3954
3955 2010-09-06  Anton Muhin  <antonm@chromium.org>
3956
3957         Reviewed by Adam Barth.
3958
3959         [v8] Inline hot methods for V8 to WebCore and back conversions
3960         https://bugs.webkit.org/show_bug.cgi?id=45270
3961
3962         Inline fast paths of hot functions performing conversions from V8 wrappers
3963         to WebCore native objects and back.
3964         That slightly increases the size of binary (within 0.1% for both Ubuntu
3965         and Windows, but those builds are slightly different from official ones),
3966         but gives performance boost (3--5% on Windows, up to 8% on Ubuntu).
3967
3968         * bindings/scripts/CodeGeneratorV8.pm:
3969         * bindings/v8/V8DOMWindowShell.cpp:
3970         (WebCore::V8DOMWindowShell::initContextIfNeeded):
3971         * bindings/v8/V8DOMWindowShell.h:
3972         * bindings/v8/V8DOMWrapper.cpp:
3973         (WebCore::V8DOMWrapper::getWrapperSlow):
3974         * bindings/v8/V8DOMWrapper.h:
3975         (WebCore::V8DOMWrapper::getWrapper):
3976         * bindings/v8/custom/V8NodeCustom.cpp:
3977         (WebCore::toV8Slow):
3978
3979 2010-09-06  Shane Stephens  <shanestephens@google.com>
3980
3981         Reviewed by Dimitri Glazkov.
3982
3983         [Crash] <animateMotion> element directly inside <symbol> element causes crash when referenced by <use>
3984         https://bugs.webkit.org/show_bug.cgi?id=44750
3985
3986         Fixes crash by checking for null transforms and skipping update step
3987         when appropriate.
3988
3989         Test: svg/dom/symbol-embeddedAnimation.svg
3990
3991         * svg/SVGAnimateMotionElement.cpp:
3992         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
3993
3994 2010-09-06  Xan Lopez  <xlopez@igalia.com>
3995
3996         Rubber-stamped by Tor Arne Vestbø.
3997
3998         WebCore already generates a focus-{out,in} events on its setFocus
3999         method, there's no need to duplicate it here. Previously this was
4000         needed because we were not catching all possible names of focus
4001         events in PluginView::handleEvent and were missing the ones
4002         WebCore does, but this has been fixed in r66827.
4003
4004         * plugins/qt/PluginViewQt.cpp:
4005         (WebCore::PluginView::setFocus):
4006
4007 2010-09-06  Sheriff Bot  <webkit.review.bot@gmail.com>
4008
4009         Unreviewed, rolling out r66823.
4010         http://trac.webkit.org/changeset/66823
4011         https://bugs.webkit.org/show_bug.cgi?id=45266
4012
4013         Windows build fails with unknown reason (Requested by zherczeg
4014         on #webkit).
4015
4016         * Android.mk:
4017         * CMakeLists.txt:
4018         * GNUmakefile.am:
4019         * WebCore.gypi:
4020         * WebCore.pro:
4021         * WebCore.vcproj/WebCore.vcproj:
4022         * WebCore.xcodeproj/project.pbxproj:
4023         * rendering/RenderObject.h:
4024         * rendering/RenderSVGResourceFilterPrimitive.cpp: Removed.
4025         * rendering/RenderSVGResourceFilterPrimitive.h: Removed.
4026         * rendering/SVGRenderTreeAsText.cpp:
4027         (WebCore::writeSVGContainer):
4028         * svg/SVGFEDiffuseLightingElement.cpp:
4029         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
4030         * svg/SVGFELightElement.cpp:
4031         (WebCore::SVGFELightElement::svgAttributeChanged):
4032         (WebCore::SVGFELightElement::childrenChanged):
4033         * svg/SVGFEOffsetElement.cpp:
4034         (WebCore::SVGFEOffsetElement::svgAttributeChanged):
4035         * svg/SVGFilterElement.h:
4036         (WebCore::SVGFilterElement::invalidateFilter):
4037         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
4038         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
4039         (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
4040         * svg/SVGFilterPrimitiveStandardAttributes.h:
4041         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
4042
4043 2010-09-06  Xan Lopez  <xlopez@igalia.com>
4044
4045         Reviewed by Martin Robinson.
4046
4047         [GTK] Provide Keyboard Events to Windowless plugins
4048         https://bugs.webkit.org/show_bug.cgi?id=44613
4049
4050         Fix keyboard event delivery for windowless plugins.
4051
4052         Based on a patch by Bharathwaaj.
4053
4054         * plugins/PluginView.cpp:
4055         (WebCore::PluginView::handleEvent): also take into account
4056         focused{in,out} events
4057         * plugins/gtk/PluginViewGtk.cpp:
4058         (WebCore::PluginView::handleKeyboardEvent): we want the keyval
4059         here, not the hardware keycode
4060         (WebCore::PluginView::handleMouseEvent): focus the pluginview on mouse events
4061
4062 2010-09-06  Ilya Tikhonovsky  <loislo@chromium.org>
4063
4064         Reviewed by Yury Semikhatsky.
4065
4066         WebInspector: it'd be nice to be able to pass undefined argument as a callback to InspectorBackend functions.
4067
4068         There are some places where callback is passing via some wrapper. In that case sendMessageToBackend
4069         will be called with additional argument for callback but with undefined value.
4070
4071         https://bugs.webkit.org/show_bug.cgi?id=45265
4072
4073         * inspector/CodeGeneratorInspector.pm:
4074
4075 2010-09-06  Zoltan Herczeg  <zherczeg@webkit.org>
4076
4077         Reviewed by Dirk Schulze.
4078
4079         An individual renderer should be assigned to each SVGFE*Element class
4080         https://bugs.webkit.org/show_bug.cgi?id=43954
4081
4082         RenderSVGResourceFilterPrimitive renderer is added to
4083         the project, and assigned to each object, which class is
4084         derived from SVGFilterPrimitiveStandardAttributes. The patch
4085         mainly contains build system changes, and it fixes one layout
4086         test in svg/dynamic-updates.
4087
4088         * Android.mk:
4089         * CMakeLists.txt:
4090         * GNUmakefile.am:
4091         * WebCore.gypi:
4092         * WebCore.pro:
4093         * WebCore.vcproj/WebCore.vcproj:
4094         * WebCore.xcodeproj/project.pbxproj:
4095         * rendering/RenderObject.h:
4096         (WebCore::RenderObject::isSVGResourceFilterPrimitive):
4097         * rendering/RenderSVGResourceFilterPrimitive.cpp: Added.
4098         (WebCore::RenderSVGResourceFilterPrimitive::RenderSVGResourceFilterPrimitive):
4099         * rendering/RenderSVGResourceFilterPrimitive.h: Added.
4100         (WebCore::RenderSVGResourceFilterPrimitive::isSVGResourceFilterPrimitive):
4101         * rendering/SVGRenderTreeAsText.cpp:
4102         (WebCore::writeSVGContainer):
4103         * svg/SVGFEDiffuseLightingElement.cpp:
4104         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
4105         * svg/SVGFELightElement.cpp:
4106         (WebCore::SVGFELightElement::svgAttributeChanged):
4107         (WebCore::SVGFELightElement::childrenChanged):
4108         * svg/SVGFEOffsetElement.cpp:
4109         (WebCore::SVGFEOffsetElement::svgAttributeChanged):
4110         * svg/SVGFilterElement.h:
4111         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
4112         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
4113         (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
4114         (WebCore::SVGFilterPrimitiveStandardAttributes::createRenderer):
4115         * svg/SVGFilterPrimitiveStandardAttributes.h:
4116         (WebCore::SVGFilterPrimitiveStandardAttributes::invalidate):
4117
4118 2010-09-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
4119
4120         Reviewed by Dirk Schulze.
4121
4122         [WML] Use RenderImageResource in WMLImageElement.cpp
4123         https://bugs.webkit.org/show_bug.cgi?id=44952
4124
4125         The hasImage() and setCachedImage() were moved to RenderImageResource class. 
4126         So, WML also should use the functions from RenderImageResource.
4127
4128         * wml/WMLImageElement.cpp:
4129         (WebCore::WMLImageElement::attach):
4130
4131 2010-08-26  Jeremy Orlow  <jorlow@chromium.org>
4132
4133         Reviewed by Steve Block.
4134
4135         Add index insertion support to IndexedDB.
4136         https://bugs.webkit.org/show_bug.cgi?id=44695
4137
4138         Whenever you insert an item into an ObjectStore, it should use all
4139         indexes' key paths to insert corresponding entries into each index.
4140         Also data should be deleted out of the index when it goes away.
4141
4142         Not much testing yet since there's no way to directly observe indexes.
4143         More will be in next patch.
4144
4145         * storage/IDBDatabaseBackendImpl.cpp:
4146         (WebCore::IDBDatabaseBackendImpl::removeObjectStore):
4147         * storage/IDBFactoryBackendImpl.cpp:
4148         (WebCore::createTables):
4149         * storage/IDBIndex.idl:
4150         * storage/IDBIndexBackendImpl.cpp:
4151         (WebCore::whereClause):
4152         (WebCore::bindWhereClause):
4153         (WebCore::IDBIndexBackendImpl::addingKeyAllowed):
4154         * storage/IDBIndexBackendImpl.h:
4155         (WebCore::IDBIndexBackendImpl::id):
4156         * storage/IDBKey.cpp:
4157         (WebCore::IDBKey::whereSyntax):
4158         (WebCore::IDBKey::bind):
4159         (WebCore::IDBKey::bindWithNulls):
4160         * storage/IDBKey.h:
4161         * storage/IDBObjectStore.idl:
4162         * storage/IDBObjectStoreBackendImpl.cpp:
4163         (WebCore::whereClause):
4164         (WebCore::bindWhereClause):
4165         (WebCore::IDBObjectStoreBackendImpl::get):
4166         (WebCore::fetchKeyFromKeyPath):
4167         (WebCore::putObjectStoreData):
4168         (WebCore::putIndexData):
4169         (WebCore::IDBObjectStoreBackendImpl::put):
4170         (WebCore::IDBObjectStoreBackendImpl::remove):
4171         (WebCore::IDBObjectStoreBackendImpl::createIndex):
4172         (WebCore::doDelete):
4173         (WebCore::IDBObjectStoreBackendImpl::removeIndex):
4174         (WebCore::IDBObjectStoreBackendImpl::openCursor):
4175         * storage/IDBObjectStoreBackendImpl.h:
4176
4177 2010-09-06  Anton Muhin  <antonm@chromium.org>
4178
4179         Reviewed by Adam Barth.
4180
4181         [v8] bypass caches when query memory usage from post GC and in crash handler.
4182         https://bugs.webkit.org/show_bug.cgi?id=45036
4183
4184         Add Chromium-specific API to query actual memory usage which bypasses any caches.
4185
4186         * platform/chromium/ChromiumBridge.h:
4187
4188 2010-09-06  Adam Barth  <abarth@webkit.org>
4189
4190         Reviewed by Darin Adler.
4191
4192         Rename SecurityOrigin::canLoad to canDisplay
4193         https://bugs.webkit.org/show_bug.cgi?id=45214
4194
4195         canLoad is a pretty opaque name.  This function is really about whether
4196         you can display the contents of the URL in an iframe, an image, or a
4197         plugin.
4198
4199         * WebCore.exp.in:
4200         * html/HTMLMediaElement.cpp:
4201         (WebCore::HTMLMediaElement::isSafeToLoadURL):
4202         * loader/Cache.cpp:
4203         (WebCore::Cache::requestResource):
4204         * loader/FrameLoader.cpp:
4205         (WebCore::FrameLoader::loadFrameRequest):
4206         * loader/PingLoader.cpp:
4207         (WebCore::PingLoader::loadImage):
4208         * loader/SubframeLoader.cpp:
4209         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
4210         (WebCore::SubframeLoader::createJavaAppletWidget):
4211         (WebCore::SubframeLoader::loadSubframe):
4212         (WebCore::SubframeLoader::loadPlugin):
4213         * loader/SubresourceLoader.cpp:
4214         (WebCore::SubresourceLoader::create):
4215         * page/SecurityOrigin.cpp:
4216         (WebCore::SecurityOrigin::canDisplay):
4217         * page/SecurityOrigin.h:
4218         * plugins/PluginView.cpp:
4219         (WebCore::PluginView::load):
4220
4221 2010-08-31  Yury Semikhatsky  <yurys@chromium.org>
4222
4223         Reviewed by Joseph Pecoraro.
4224
4225         Web Inspector: browser crashes on attempt to evaluate "alert(1)" while staying on a breakpoint
4226         https://bugs.webkit.org/show_bug.cgi?id=44943
4227
4228         Test: inspector/debugger-suspend-active-dom-objects.html
4229
4230         * page/PageGroupLoadDeferrer.cpp:
4231         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
4232
4233 2010-09-05  Kenneth Russell  <kbr@google.com>
4234
4235         Reviewed by Darin Fisher.
4236
4237         Add unit tests for red-black tree and (POD) arena
4238         https://bugs.webkit.org/show_bug.cgi?id=45060
4239
4240         * platform/graphics/gpu/PODArena.h: Made DefaultChunkSize public so unit tests can access it. Fixed copyright header.
4241         * platform/graphics/gpu/PODInterval.h: Fixed copyright header.
4242         * platform/graphics/gpu/PODIntervalTree.h: Fixed copyright header.
4243         * platform/graphics/gpu/PODRedBlackTree.h: Fixed copyright header.
4244
4245 2010-09-05  Jeremy Orlow  <jorlow@chromium.org>
4246
4247         Reviewed by Nate Chapin.
4248
4249         Add the concept of class methods to bindings (for IndexedDB's IDBKeyRange).
4250         https://bugs.webkit.org/show_bug.cgi?id=45044
4251
4252         IndexedDB's IDBKeyRange has what, in other languages, are called class
4253         methods. In javaScript terms, these are methods only accessible from their
4254         constructor and not instances. This change adds such support to V8. There
4255         are already other features required for IndexedDB that JSC doesn't yet
4256         support, so I'll add this to the list of todo items in the master bug
4257         for that.
4258
4259         The bindings tests cover this. My next patch will change WebCore to use
4260         this and it'll have associated layout tests.
4261
4262         * bindings/scripts/CodeGeneratorV8.pm:
4263         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
4264         (WebDOMTestObj::classMethod):
4265         (WebDOMTestObj::classMethodWithOptional):
4266         * bindings/scripts/test/CPP/WebDOMTestObj.h:
4267         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
4268         (webkit_dom_test_obj_class_method):
4269         (webkit_dom_test_obj_class_method_with_optional):
4270         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
4271         * bindings/scripts/test/JS/JSTestObj.cpp:
4272         (WebCore::jsTestObjPrototypeFunctionStaticMethod):
4273         (WebCore::jsTestObjPrototypeFunctionStaticMethodWithOptional):
4274         * bindings/scripts/test/JS/JSTestObj.h:
4275         * bindings/scripts/test/ObjC/DOMTestObj.h:
4276         * bindings/scripts/test/ObjC/DOMTestObj.mm:
4277         (-[DOMTestObj classMethod]):
4278         (-[DOMTestObj classMethodWithOptional:]):
4279         * bindings/scripts/test/TestObj.idl:
4280         * bindings/scripts/test/V8/V8TestObj.cpp:
4281         (WebCore::TestObjInternal::classMethodCallback):
4282         (WebCore::TestObjInternal::classMethodWithOptionalCallback):
4283         (WebCore::ConfigureV8TestObjTemplate):
4284         * storage/IDBKeyRange.idl:
4285