54745650f842e79bb7999dbce0c34e9d7ba5835e
[WebKit-https.git] / WebCore / ChangeLog
1 2010-06-17  Kenneth Russell  <kbr@google.com>
2
3         Reviewed by Oliver Hunt.
4
5         Differences in error reporting for overloaded methods causing fast/canvas/webgl/texImageTest.html to fail
6         https://bugs.webkit.org/show_bug.cgi?id=40750
7
8         Added V8Proxy::throwTypeError() and throwSyntaxError for parity
9         with JSC::throwTypeError() and throwSyntaxError. Changed
10         CodeGeneratorV8.pm to use throwTypeError for overload resolution
11         failures. Revised CodeGeneratorJS.pm to use throwVMTypeError
12         instead of manual call to JSValue::encode. Deleted now-unnecessary
13         Chromium expectations for fast/canvas/webgl/texImageTest.html.
14
15         * bindings/scripts/CodeGeneratorJS.pm:
16         * bindings/scripts/CodeGeneratorV8.pm:
17         * bindings/v8/V8Proxy.cpp:
18         (WebCore::V8Proxy::throwTypeError):
19         (WebCore::V8Proxy::throwSyntaxError):
20         * bindings/v8/V8Proxy.h:
21
22 2010-06-17  Darin Fisher  <darin@chromium.org>
23
24         Reviewed by Brady Eidson.
25
26         If Page::goToItem is passed a HistoryItem that is the current item,
27         then the page should be loaded again.
28
29         https://bugs.webkit.org/show_bug.cgi?id=40660
30
31         * loader/HistoryController.cpp:
32         (WebCore::HistoryController::recursiveGoToItem): Add a check to
33         recursiveGoToItem that matches the one in FrameLoader::loadItem.
34
35 2010-06-17  Kwang Yul Seo  <skyul@company100.net>
36
37         Reviewed by Kent Tamura.
38
39         [BREWMP] Build fix for DragDataBrew
40         https://bugs.webkit.org/show_bug.cgi?id=40610
41
42         http://trac.webkit.org/changeset/60957 was not applied to DragDataBrew.cpp.
43         Add FilenameConversionPolicy argument to DragData::containsURL and DragData::asURL.
44
45         * platform/brew/DragDataBrew.cpp:
46         (WebCore::DragData::containsURL):
47         (WebCore::DragData::asURL):
48
49 2010-06-17  Zhenyao Mo  <zmo@google.com>
50
51         Reviewed by David Levin.
52
53         Rename internalformat to internalFormat
54         https://bugs.webkit.org/show_bug.cgi?id=40149
55
56         * html/canvas/WebGLFramebuffer.cpp: Rename internalformat to internalFormat.
57         (WebCore::WebGLFramebuffer::getColorBufferFormat):
58         * html/canvas/WebGLRenderbuffer.cpp: Ditto.
59         (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
60         * html/canvas/WebGLRenderbuffer.h: Ditto.
61         (WebCore::WebGLRenderbuffer::setInternalFormat):
62         (WebCore::WebGLRenderbuffer::getInternalFormat):
63         * html/canvas/WebGLRenderingContext.cpp: Ditto.
64         (WebCore::WebGLRenderingContext::copyTexImage2D):
65         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
66         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
67         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
68         (WebCore::WebGLRenderingContext::renderbufferStorage):
69         (WebCore::WebGLRenderingContext::texImage2DBase):
70         (WebCore::WebGLRenderingContext::isTexInternalFormatColorBufferCombinationValid):
71         * html/canvas/WebGLRenderingContext.h: Ditto.
72         * html/canvas/WebGLTexture.cpp: Ditto.
73         (WebCore::WebGLTexture::WebGLTexture):
74         * html/canvas/WebGLTexture.h: Ditto.
75         (WebCore::WebGLTexture::setInternalFormat):
76         (WebCore::WebGLTexture::getInternalFormat):
77
78 2010-06-17  Zhenyao Mo  <zmo@google.com>
79
80         Reviewed by David Levin.
81
82         Remove input parameter validation for "level" upper limit in *tex* functions
83         https://bugs.webkit.org/show_bug.cgi?id=40603
84
85         * html/canvas/WebGLRenderingContext.cpp:
86         (WebCore::WebGLRenderingContext::validateTexFuncParameters): Don't check for "level" upper limit.
87
88 2010-06-17  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
89
90         Reviewed by Eric Seidel.
91
92         Clean EFL header files in order to diminish the compilation time with
93         EFL from subversion. We remove the EFL includes from header files and use
94         forward declarations, including the headers in correspondent source
95         files when needed. This causes only the needed source files to be
96         recompiled in case a new version of EFL is installed instead of
97         triggering a recompilation of almost all WebCore/WebKit.
98         https://bugs.webkit.org/show_bug.cgi?id=40575
99
100         No new functionalities, so no new tests.
101
102         * CMakeListsEfl.txt:
103         * platform/PlatformKeyboardEvent.h: forward declaration.
104         * platform/PlatformMouseEvent.h: forward declaration and change method
105         signature to not require enum.
106         * platform/PlatformWheelEvent.h: forward declaration.
107         * platform/Widget.h: forward declaration.
108         * platform/efl/PlatformKeyboardEventEfl.cpp: include needed header.
109         * platform/efl/PlatformMouseEventEfl.cpp:
110         (WebCore::PlatformMouseEvent::setClickCount): change method signature
111         as mentioned above.
112         * platform/efl/PlatformWheelEventEfl.cpp: include needed header.
113         * platform/efl/RenderThemeEfl.cpp: include needed header
114         * platform/efl/RenderThemeEfl.h: forward declaration.
115         * platform/efl/ScrollbarEfl.cpp: include needed header.
116         * platform/efl/ScrollbarEfl.h: forward declaration.
117         * platform/efl/WidgetEfl.cpp: include needed header.
118         * platform/graphics/FloatRect.h: remove unused method.
119         * platform/graphics/Icon.h: forward declaration.
120         * platform/graphics/IntRect.h: remove unused method.
121         * platform/graphics/efl/FloatRectEfl.cpp: Removed. This file was
122         implementing an unused method.
123         * platform/graphics/efl/IntRectEfl.cpp: Removed. This file was
124         implementing an unused method.
125
126 2010-06-17  Alex Milowski  <alex@milowski.com>
127
128         Reviewed by Darin Adler.
129
130         Fixed a compile error in the paint() methods by making them use the
131         new visitedDependentColor() method.
132         https://bugs.webkit.org/show_bug.cgi?id=40327
133
134         * mathml/RenderMathMLRoot.cpp:
135         (WebCore::RenderMathMLRoot::paint):
136         (WebCore::RenderMathMLRoot::layout): Fixed a crash where every child 
137         was assumed to be a RenderMathMLBlock instance when that isn't the 
138         case.  Also, layout() needed to mark the index for layout before 
139         calling layout() on the index.
140         * mathml/RenderMathMLSquareRoot.cpp:
141         (WebCore::RenderMathMLSquareRoot::paint):
142
143 2010-06-17  Darin Adler  <darin@apple.com>
144
145         Reviewed by Sam Weinig.
146
147         Use adoptRef and create functions in more code paths
148         https://bugs.webkit.org/show_bug.cgi?id=40760
149
150         This helps prepare for an assertion that fires if you ref or destroy an
151         object before calling adoptRef on it. That will help us catch mistakes
152         that can lead to storage leaks.
153
154         * WebCore.base.exp: Updated export now that Frame::create is not an
155         inline function.
156
157         * css/CSSInitialValue.h:
158         (WebCore::CSSInitialValue::createExplicit): Use create.
159         (WebCore::CSSInitialValue::createImplicit): Ditto.
160         (WebCore::CSSInitialValue::create): Added.
161
162         * css/CSSPrimitiveValue.cpp:
163         (WebCore::CSSPrimitiveValue::createUncachedIdentifier): Added.
164         (WebCore::CSSPrimitiveValue::createUncachedColor): Added.
165         (WebCore::CSSPrimitiveValue::createUncached): Added.
166         (WebCore::CSSPrimitiveValue::createIdentifier): Use createUncachedIdentifier
167         instead of using new directly.
168         (WebCore::CSSPrimitiveValue::createColor): Use createUncachedColor instead
169         of using new directly.
170         (WebCore::CSSPrimitiveValue::create): Use createdUncached instead of using
171         new directly.
172         * css/CSSPrimitiveValue.h: Declare the new functions above.
173
174         * css/CSSStyleSelector.cpp:
175         (WebCore::loadFullDefaultStyle): Deref simpleDefaultStyleSheet instead of
176         explicitly deleting it.
177
178         * loader/SubresourceLoader.cpp:
179         (WebCore::SubresourceLoader::SubresourceLoader): Move the call to
180         addSubresourceLoader out of here.
181         (WebCore::SubresourceLoader::create): Move it in here. This makes it so
182         we don't ref the loader before finishing its creation and calling adoptRef.
183
184         * page/Frame.cpp:
185         (WebCore::Frame::Frame): Move the call to setMainFrame out of here.
186         Also refactor the code so an assertion is easier to read.
187         (WebCore::Frame::create): Move the call to setMainFrame in here.
188         This makes it so we don't ref the frame before finishing its creation
189         and calling adoptRef.
190         * page/Frame.h: Made the create function non-inline.
191
192         * platform/text/BidiContext.cpp:
193         (WebCore::BidiContext::createUncached): Added.
194         (WebCore::BidiContext::create): Call createUncached instead of callling
195         new directly.
196         * platform/text/BidiContext.h: Declare createUncached.
197
198         * rendering/RenderSVGResourceFilter.cpp:
199         (WebCore::RenderSVGResourceFilter::buildPrimitives): Use PassRefPtr and
200         RefPtr instead of OwnPtr. And use the create function instead of new.
201         * rendering/RenderSVGResourceFilter.h: Ditto.
202         * rendering/SVGRenderTreeAsText.cpp:
203         (WebCore::writeSVGResourceContainer): Ditto.
204
205         * storage/StorageAreaImpl.cpp:
206         (WebCore::StorageAreaImpl::StorageAreaImpl): Move the code that calls
207         StorageAreaSync::create out of here.
208         (WebCore::StorageAreaImpl::create): Move it in here. This makes it so we
209         don't ref the storage area before finishing its creation and calling adoptRef.
210
211         * svg/SVGPaint.cpp:
212         (WebCore::SVGPaint::defaultFill): Use create instead of new.
213         (WebCore::SVGPaint::defaultStroke): Ditto.
214
215         * svg/graphics/filters/SVGFilterBuilder.h: Made the constructor private
216         and added a create function since this is a reference counted object and
217         should not be constructed directly.
218
219 2010-06-17  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
220
221         Reviewed by Gustavo Noronha.
222
223         Update CMake build system to use new script for generating source files
224         with gperf (r61091).
225         This updates also the build system to cope with recent changes to
226         source files list.
227         https://bugs.webkit.org/show_bug.cgi?id=40628
228
229         No new tests since it's just compilation fixes.
230
231         * CMakeLists.txt:
232
233 2010-06-17  Darin Adler  <darin@apple.com>
234
235         Reviewed by Sam Weinig.
236
237         Fix boolean reflected attributes to use empty string consistently for the content attribute value
238         https://bugs.webkit.org/show_bug.cgi?id=40758
239
240         Test: fast/dom/boolean-attribute-reflection.html
241
242         The HTML5 specification and other browsers are all consistent:
243         When setting a boolean IDL attribute to true, the attribute value
244         gets set to the empty string. The guidelines for authors allow either
245         the empty string or the name of the attribute, but for implementers
246         of the DOM, the reflected attribute gets empty string.
247
248         * dom/Element.cpp:
249         (WebCore::Element::setBooleanAttribute): Use emptyAtom to set the
250         attribute to the empty string.
251
252         * html/HTMLFormControlElement.cpp:
253         (WebCore::HTMLFormControlElement::setAutofocus): Use the empty string,
254         not "autofocus".
255         (WebCore::HTMLFormControlElement::setRequired): Use the empty string,
256         not "required".
257
258 2010-06-17  Pavel Feldman  <pfeldman@chromium.org>
259
260         Unreviewed: chromium tests fix. Added InspectorBackend delegates for new inspector methods.
261
262         * inspector/front-end/InspectorBackendStub.js:
263         (.WebInspector.InspectorBackendStub.prototype.clearConsoleMessages):
264         (.WebInspector.InspectorBackendStub.prototype.getOuterHTML):
265         (.WebInspector.InspectorBackendStub.prototype.setOuterHTML):
266         (.WebInspector.InspectorBackendStub.prototype.addInspectedNode):
267
268 2010-06-17  Mark Brand  <mabrand@mabrand.nl>
269
270         Reviewed by Simon Hausmann.
271
272         [Qt] use "win32-g++*" scope to match all MinGW makespecs
273
274         The scope "win32-g++" comes from the name of the makespec. However, it
275         is frequently used to check for MinGW. This works fine as long as
276         win32-g++ is the only makespec for MinGW. Now we need the wildcard
277         to cover "win32-g++-cross" as well.
278
279         * WebCore.pro:
280
281 2010-06-16  Pavel Feldman  <pfeldman@chromium.org>
282
283         Reviewed by Joe Pecoraro.
284
285         Web Inspector: move get/setOuterHTML, addInspectedNode and
286         clearConsole to native InspectorDOMAgent. This is done to allow
287         inspected nodes array to store nodes from different domains,
288         also moves outerhtml manipulation closer to the rest of the DOM
289         operations. In addition to that, we are slowly getting rid of
290         InjectedScriptAccess in favor of IDL-defined InspectorBackend
291         interface for clearer remote debugging API.
292
293         https://bugs.webkit.org/show_bug.cgi?id=40733
294
295         * inspector/InjectedScriptHost.cpp:
296         (WebCore::InjectedScriptHost::inspectedNode):
297         * inspector/InjectedScriptHost.h:
298         * inspector/InspectorBackend.cpp:
299         (WebCore::InspectorBackend::changeTagName):
300         (WebCore::InspectorBackend::getOuterHTML):
301         (WebCore::InspectorBackend::setOuterHTML):
302         (WebCore::InspectorBackend::addInspectedNode):
303         (WebCore::InspectorBackend::clearConsoleMessages):
304         * inspector/InspectorBackend.h:
305         * inspector/InspectorBackend.idl:
306         * inspector/InspectorDOMAgent.cpp:
307         (WebCore::InspectorDOMAgent::inspectedNode):
308         (WebCore::InspectorDOMAgent::changeTagName):
309         (WebCore::InspectorDOMAgent::getOuterHTML):
310         (WebCore::InspectorDOMAgent::setOuterHTML):
311         (WebCore::InspectorDOMAgent::addInspectedNode):
312         * inspector/InspectorDOMAgent.h:
313         * inspector/InspectorFrontend.cpp:
314         (WebCore::InspectorFrontend::didGetOuterHTML):
315         (WebCore::InspectorFrontend::didSetOuterHTML):
316         * inspector/InspectorFrontend.h:
317         * inspector/front-end/ConsoleView.js:
318         (WebInspector.ConsoleView.prototype.requestClearMessages):
319         * inspector/front-end/DOMAgent.js:
320         * inspector/front-end/ElementsPanel.js:
321         (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
322         (WebInspector.ElementsPanel):
323         * inspector/front-end/ElementsTreeOutline.js:
324         (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback):
325         (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted):
326         ():
327         * inspector/front-end/InjectedScript.js:
328         (injectedScriptConstructor):
329         * inspector/front-end/InjectedScriptAccess.js:
330
331 2010-06-17  John Gregg  <johnnyg@google.com>
332
333         Reviewed by David Levin.
334
335         Move the call to the notification presenter that a Notification is being
336         destroyed from the destructor (not safe) to the ActiveDOMObject::contextDestroyed
337         method.
338
339         Also fix up an incorrect reference loss in the V8 bindings code for Notifications.
340         https://bugs.webkit.org/show_bug.cgi?id=40097
341
342         No new tests; code paths are well-covered by existing tests.
343
344         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
345         (WebCore::V8NotificationCenter::createHTMLNotificationCallback):
346         (WebCore::V8NotificationCenter::createNotificationCallback):
347         * notifications/Notification.cpp:
348         (WebCore::Notification::~Notification):
349         (WebCore::Notification::contextDestroyed):
350         * notifications/Notification.h:
351
352 2010-06-17  Csaba Osztrogonác  <ossy@webkit.org>
353
354         Unreviewed rollout r61311, because it made 2 tests fail on Qt bot.
355
356         [Qt] NPP_SetWindow seems to not be called when TestNetscapePlugin is moved
357         https://bugs.webkit.org/show_bug.cgi?id=36702
358
359         * plugins/qt/PluginViewQt.cpp:
360         (WebCore::PluginView::updatePluginWidget):
361
362 2010-05-28  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
363
364         Reviewed by Simon Hausmann, Antti Koivisto
365
366         Make repaint throttling parameters runtime configurable.
367         https://bugs.webkit.org/show_bug.cgi?id=38401
368
369         REPAINT_THROTTLING now chooses default values for throttling parameters.
370         Should be removed when applications start using runtime configuration.
371
372         * page/FrameView.cpp:
373         (WebCore::FrameView::reset):
374         (WebCore::FrameView::updateDeferredRepaintDelay):
375         (WebCore::FrameView::setRepaintThrottlingDeferredRepaintDelay):
376         (WebCore::FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading):
377         (WebCore::FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading):
378         (WebCore::FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading):
379         * page/FrameView.h:
380
381 2010-06-17  Robert Hogan  <robert@webkit.org>
382
383         Reviewed by Kenneth Rohde Christiansen.
384
385         [Qt] NPP_SetWindow seems to not be called when TestNetscapePlugin is moved
386
387         https://bugs.webkit.org/show_bug.cgi?id=36702
388
389         setNPWindowIfNeeded() is called on paint() in PluginViewQt, which doesn't
390         work for DRT. So call it if we are in DRT mode and the window geometry
391         has changed.
392
393         Unskips plugins/reentrant-update-widget-positions.html
394
395         * plugins/qt/PluginViewQt.cpp:
396         (WebCore::PluginView::updatePluginWidget):
397
398 2010-06-17  Simon Hausmann  <simon.hausmann@nokia.com>
399
400         Reviewed by Kenneth Christiansen.
401
402         [Qt] Avoid unnecessary calls to save() and restore() when drawing images
403
404         Avoid calling the expensive save() and restore() on the GraphicsContext just
405         for changing the composition mode. Instead save and restore it manually
406         on QPainter.
407
408         Change fac227f609e544f8f55aca8447b4328d6534407a in Qt makes sure that the
409         call to QPainter::setCompositionMode doesn't do anything if the mode hasn't
410         changed.
411
412         * platform/graphics/GraphicsContext.h:
413         * platform/graphics/qt/GraphicsContextQt.cpp:
414         (WebCore::GraphicsContext::toQtCompositionMode):
415         * platform/graphics/qt/ImageQt.cpp:
416         (WebCore::BitmapImage::draw):
417
418 2010-06-16  Dawit Alemayehu  <adawit@kde.org>
419
420         Reviewed by Simon Hausmann.
421
422         [Qt] QtWebKit crashes while initializing flash plugin 10.1.53.64.
423         https://bugs.webkit.org/show_bug.cgi?id=40567
424
425         Avoid preventable crashes by ensuring gtk_init() is called in the
426         flash viewer plugins before calling NP_Initialize.
427
428         * plugins/qt/PluginPackageQt.cpp:
429         (WebCore::PluginPackage::load):
430
431 2010-06-16  Tony Gentilcore  <tonyg@chromium.org>
432
433         Reviewed by David Levin.
434
435         Guarantee that references are held for CachedScripts in HTMLDocumentParser.
436         https://bugs.webkit.org/show_bug.cgi?id=40177
437
438         No new tests because no new functionality.
439
440         * html/HTMLDocumentParser.cpp:
441         (WebCore::HTMLDocumentParser::reset):
442         (WebCore::HTMLDocumentParser::executeExternalScriptsIfReady):
443
444 2010-06-16  Qi Zhang  <qi.2.zhang@nokia.com>
445
446         Reviewed by Laszlo Gombos.
447
448          [Qt] Repeat pattern should start from origin
449          https://bugs.webkit.org/show_bug.cgi?id=39225
450
451          Patterns must be painted so that the top left of the first image 
452          is anchored at the origin of the coordinate space.
453
454         * platform/graphics/qt/GraphicsContextQt.cpp:
455         (WebCore::drawRepeatPattern):
456         (WebCore::GraphicsContext::fillRect):
457
458 2010-06-16  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
459
460         Reviewed by Simon Hausmann.
461
462         [Qt] WebGL viewport does not show up on N900  
463         https://bugs.webkit.org/show_bug.cgi?id=38528
464
465         With OGLES2 add default precision to the shader code.
466         Use GLsizeiptr and GLintptr with OGLES2.
467         Call paint() in beginPaint() so that drawTexture() is used 
468         whenever possible.
469
470         * platform/graphics/qt/GraphicsContext3DQt.cpp:
471         (WebCore::GraphicsContext3D::beginPaint):
472         (WebCore::GraphicsContext3D::paint):
473         (WebCore::GraphicsContext3D::shaderSource):
474
475 2010-06-16  Antonio Gomes  <tonikitoo@webkit.org>
476
477         Reviewed by Simon Fraser.
478
479         Spatial Navigation: refactor scrollInDirection to work with scrollable content
480         https://bugs.webkit.org/show_bug.cgi?id=39195
481
482         scrollInDirection now receives as parameter the node that the Spatial Navigation
483         found as the more appropriated to move focus to. If it is in a scrollable container
484         (e.g. <div> with clipped overflow content), it scrolls recursively starting from
485         the container, not the current focused node.
486
487         Test: fast/events/spatial-navigation/snav-only-clipped-overflow-content.html
488
489         * page/FocusController.cpp:
490         (WebCore::FocusController::advanceFocusDirectionally):
491         * page/SpatialNavigation.cpp:
492         (WebCore::scrollInDirection):
493         * page/SpatialNavigation.h:
494
495 2010-06-16  Brady Eidson  <beidson@apple.com>
496
497         Reviewed by Eric Carlson
498
499         <rdar://problem/7249553> and https://bugs.webkit.org/show_bug.cgi?id=40749
500         ResourceLoader::willCacheResponse() needs to null-check Frame::Settings()
501
502         No new tests. (Discovered via crash reports, no reproducible cases noted)
503
504         * loader/ResourceLoader.cpp:
505         (WebCore::ResourceLoader::willCacheResponse):  Null check m_frame->settings(), 
506           but also add an ASSERT so debug-build developers can learn more about why
507           this might be happening.
508
509 2010-06-16  Darin Adler  <darin@apple.com>
510
511         Try to fix the MathML build.
512
513         * mathml/MathMLMathElement.h: Added missing return type.
514
515 2010-06-16  Darin Adler  <darin@apple.com>
516
517         Reviewed by David Levin.
518
519         Deploy adoptRef in more places, including all HTML and MathML elements
520         https://bugs.webkit.org/show_bug.cgi?id=39941
521
522         * dom/Element.cpp:
523         (WebCore::Element::dispatchAttrRemovalEvent): Use create instead of new
524         in commented-out code.
525         (WebCore::Element::dispatchAttrAdditionEvent): Ditto.
526
527         * dom/Node.h: Removed now-unused CreateElementZeroRefCount and
528         CreateHTMLElementZeroRefCount.
529
530         * editing/InsertListCommand.cpp:
531         (WebCore::InsertListCommand::insertList): Use create instead of new, fixing
532         a storage leak.
533
534         * editing/ModifySelectionListLevel.cpp:
535         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel):
536         Removed "WithType" from function name. Use create instead of new, fixing a
537         storage leak.
538         (WebCore::DecreaseSelectionListLevelCommand::decreaseSelectionListLevel): Use
539         create instead of new, fixing a storage leak.
540
541         * storage/IndexedDatabaseImpl.cpp:
542         (WebCore::IndexedDatabaseImpl::create): Use adoptRef, fixing a storage leak.
543
544         * editing/ModifySelectionListLevel.h: Added create functions.
545
546         * html/HTMLAnchorElement.cpp:
547         (WebCore::HTMLAnchorElement::HTMLAnchorElement):
548         * html/HTMLFrameOwnerElement.cpp:
549         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
550         * html/HTMLMeterElement.cpp:
551         (WebCore::HTMLMeterElement::HTMLMeterElement):
552         * html/HTMLProgressElement.cpp:
553         (WebCore::HTMLProgressElement::HTMLProgressElement):
554         Removed code to explicitly pass CreateHTMLElement construction type since that's
555         now the type used for all HTML elements.
556
557         * html/HTMLFormControlElement.cpp:
558         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
559         * html/HTMLFormControlElement.h:
560         Removed construction type argument, since CreateHTMLElement is now the type used
561         for all HTML elements.
562
563         * mathml/MathMLElement.cpp:
564         (WebCore::MathMLElement::MathMLElement): Removed construction type of
565         CreateStyledElementZeroRefCount so we'll use the default construction
566         type, CreateStyledElement.
567         (WebCore::MathMLElement::create): Use adoptRef.
568
569         * mathml/MathMLElement.h: Made isMathMLElement function private and
570         removed unneeded override of createRenderer, because it did the
571         same thing as the base class's createRenderer function.
572
573         * mathml/MathMLInlineContainerElement.cpp:
574         (WebCore::MathMLInlineContainerElement::create): Use adoptRef.
575         (WebCore::MathMLInlineContainerElement::createRenderer):
576         Removed unnecessarily initialization of local variable and removed the
577         case for mathTag, since that uses a different derived class.
578
579         * mathml/MathMLInlineContainerElement.h: Made createRenderrer override
580         private.
581
582         * mathml/MathMLMathElement.cpp:
583         (WebCore::MathMLMathElement::MathMLMathElement): Marked inline since
584         it is called in only one place.
585         (WebCore::MathMLMathElement::create): Use adoptRef.
586         (WebCore::MathMLMathElement::createRenderer): Added. Creates a
587         RenderMathMLMath object.
588
589         * mathml/MathMLMathElement.h: Made constructor private and added a
590         private override of createRenderer.
591
592         * mathml/MathMLTextElement.cpp:
593         (WebCore::MathMLTextElement::MathMLTextElement): Marked inline since
594         it is called in only one place.
595         (WebCore::MathMLTextElement::create): Use adoptRef.
596         (WebCore::MathMLTextElement::createRenderer): Changed to call through
597         to the base class instead of calling RenderObject::createObject directly.
598
599         * mathml/MathMLTextElement.h: Made the constructor and createRenderer
600         function private.
601
602         * rendering/RenderFileUploadControl.cpp:
603         (WebCore::RenderFileUploadControl::RenderFileUploadControl):
604         Removed an unneeded initializer.
605
606         * rendering/RenderProgress.cpp: Tweaked includes.
607
608         * rendering/ShadowElement.cpp: Added a "using namespace" directive.
609         * rendering/ShadowElement.h: Tweaked formatting. Made more functions
610         private.
611
612         * editing/DeleteButton.cpp:
613         (WebCore::DeleteButton::create):
614         * html/HTMLAudioElement.cpp:
615         (WebCore::HTMLAudioElement::create):
616         (WebCore::HTMLAudioElement::createForJSConstructor):
617         * html/HTMLBRElement.cpp:
618         (WebCore::HTMLBRElement::create):
619         * html/HTMLBaseElement.cpp:
620         (WebCore::HTMLBaseElement::create):
621         * html/HTMLBaseFontElement.cpp:
622         (WebCore::HTMLBaseFontElement::create):
623         * html/HTMLBlockquoteElement.cpp:
624         (WebCore::HTMLBlockquoteElement::create):
625         * html/HTMLBodyElement.cpp:
626         (WebCore::HTMLBodyElement::create):
627         * html/HTMLButtonElement.cpp:
628         (WebCore::HTMLButtonElement::create):
629         * html/HTMLCanvasElement.cpp:
630         (WebCore::HTMLCanvasElement::create):
631         * html/HTMLDListElement.cpp:
632         (WebCore::HTMLDListElement::create):
633         * html/HTMLDataGridCellElement.cpp:
634         (WebCore::HTMLDataGridCellElement::create):
635         * html/HTMLDataGridColElement.cpp:
636         (WebCore::HTMLDataGridColElement::create):
637         * html/HTMLDataGridElement.cpp:
638         (WebCore::HTMLDataGridElement::create):
639         * html/HTMLDataGridRowElement.cpp:
640         (WebCore::HTMLDataGridRowElement::create):
641         * html/HTMLDataListElement.cpp:
642         (WebCore::HTMLDataListElement::create):
643         * html/HTMLDivElement.cpp:
644         (WebCore::HTMLDivElement::create):
645         * html/HTMLElement.cpp:
646         (WebCore::HTMLElement::create):
647         * html/HTMLElement.h:
648         (WebCore::HTMLElement::HTMLElement):
649         * html/HTMLFieldSetElement.cpp:
650         (WebCore::HTMLFieldSetElement::create):
651         * html/HTMLFontElement.cpp:
652         (WebCore::HTMLFontElement::create):
653         * html/HTMLFormElement.cpp:
654         (WebCore::HTMLFormElement::create):
655         * html/HTMLFrameSetElement.cpp:
656         (WebCore::HTMLFrameSetElement::create):
657         * html/HTMLHRElement.cpp:
658         (WebCore::HTMLHRElement::create):
659         * html/HTMLHeadElement.cpp:
660         (WebCore::HTMLHeadElement::create):
661         * html/HTMLHeadingElement.cpp:
662         (WebCore::HTMLHeadingElement::create):
663         * html/HTMLHtmlElement.cpp:
664         (WebCore::HTMLHtmlElement::create):
665         * html/HTMLImageElement.cpp:
666         (WebCore::HTMLImageElement::create):
667         (WebCore::HTMLImageElement::createForJSConstructor):
668         * html/HTMLInputElement.cpp:
669         (WebCore::HTMLInputElement::create):
670         * html/HTMLIsIndexElement.cpp:
671         (WebCore::HTMLIsIndexElement::create):
672         * html/HTMLKeygenElement.cpp:
673         (WebCore::HTMLKeygenElement::create):
674         * html/HTMLLIElement.cpp:
675         (WebCore::HTMLLIElement::create):
676         * html/HTMLLabelElement.cpp:
677         (WebCore::HTMLLabelElement::create):
678         * html/HTMLLegendElement.cpp:
679         (WebCore::HTMLLegendElement::create):
680         * html/HTMLLinkElement.cpp:
681         (WebCore::HTMLLinkElement::create):
682         * html/HTMLMapElement.cpp:
683         (WebCore::HTMLMapElement::create):
684         * html/HTMLMarqueeElement.cpp:
685         (WebCore::HTMLMarqueeElement::create):
686         * html/HTMLMenuElement.cpp:
687         (WebCore::HTMLMenuElement::create):
688         * html/HTMLMetaElement.cpp:
689         (WebCore::HTMLMetaElement::create):
690         * html/HTMLModElement.cpp:
691         (WebCore::HTMLModElement::create):
692         * html/HTMLNoScriptElement.cpp:
693         (WebCore::HTMLNoScriptElement::create):
694         * html/HTMLOListElement.cpp:
695         (WebCore::HTMLOListElement::create):
696         * html/HTMLOptGroupElement.cpp:
697         (WebCore::HTMLOptGroupElement::create):
698         * html/HTMLOptionElement.cpp:
699         (WebCore::HTMLOptionElement::create):
700         (WebCore::HTMLOptionElement::createForJSConstructor):
701         * html/HTMLParagraphElement.cpp:
702         (WebCore::HTMLParagraphElement::create):
703         * html/HTMLParamElement.cpp:
704         (WebCore::HTMLParamElement::create):
705         * html/HTMLPreElement.cpp:
706         (WebCore::HTMLPreElement::create):
707         * html/HTMLQuoteElement.cpp:
708         (WebCore::HTMLQuoteElement::create):
709         * html/HTMLScriptElement.cpp:
710         (WebCore::HTMLScriptElement::create):
711         * html/HTMLSelectElement.cpp:
712         (WebCore::HTMLSelectElement::create):
713         * html/HTMLSourceElement.cpp:
714         (WebCore::HTMLSourceElement::create):
715         * html/HTMLStyleElement.cpp:
716         (WebCore::HTMLStyleElement::create):
717         * html/HTMLTableCaptionElement.cpp:
718         (WebCore::HTMLTableCaptionElement::create):
719         * html/HTMLTableCellElement.cpp:
720         (WebCore::HTMLTableCellElement::create):
721         * html/HTMLTableColElement.cpp:
722         (WebCore::HTMLTableColElement::create):
723         * html/HTMLTableElement.cpp:
724         (WebCore::HTMLTableElement::create):
725         * html/HTMLTableRowElement.cpp:
726         (WebCore::HTMLTableRowElement::create):
727         * html/HTMLTableSectionElement.cpp:
728         (WebCore::HTMLTableSectionElement::create):
729         * html/HTMLTextAreaElement.cpp:
730         (WebCore::HTMLTextAreaElement::create):
731         * html/HTMLTitleElement.cpp:
732         (WebCore::HTMLTitleElement::create):
733         * html/HTMLUListElement.cpp:
734         (WebCore::HTMLUListElement::create):
735         * html/HTMLVideoElement.cpp:
736         (WebCore::HTMLVideoElement::create):
737         * loader/ImageDocument.cpp:
738         (WebCore::ImageDocumentElement::create):
739         * rendering/MediaControlElements.cpp:
740         (WebCore::MediaControlShadowRootElement::create):
741         (WebCore::MediaControlElement::create):
742         (WebCore::MediaControlTimelineContainerElement::create):
743         (WebCore::MediaControlVolumeSliderContainerElement::create):
744         (WebCore::MediaControlStatusDisplayElement::create):
745         (WebCore::MediaControlMuteButtonElement::create):
746         (WebCore::MediaControlPlayButtonElement::create):
747         (WebCore::MediaControlSeekButtonElement::create):
748         (WebCore::MediaControlRewindButtonElement::create):
749         (WebCore::MediaControlReturnToRealtimeButtonElement::create):
750         (WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
751         (WebCore::MediaControlTimelineElement::create):
752         (WebCore::MediaControlVolumeSliderElement::create):
753         (WebCore::MediaControlFullscreenButtonElement::create):
754         (WebCore::MediaControlTimeDisplayElement::create):
755         * rendering/RenderSlider.cpp:
756         (WebCore::SliderThumbElement::create):
757         * rendering/TextControlInnerElements.cpp:
758         (WebCore::TextControlInnerElement::create):
759         (WebCore::TextControlInnerTextElement::create):
760         (WebCore::SearchFieldResultsButtonElement::create):
761         (WebCore::SearchFieldCancelButtonElement::create):
762         (WebCore::SpinButtonElement::create):
763         Use adoptRef.
764
765 2010-06-16  Adam Barth  <abarth@webkit.org>
766
767         Reviewed by Eric Seidel.
768
769         HTML5 parser crash when setTimeout document.write after slow script
770         https://bugs.webkit.org/show_bug.cgi?id=40726
771
772         According to the HTML5 spec, we're supposed to open() a new document if
773         we receive a document.write() after we've received EOF for the network.
774         The old parser just dumped those bytes onto the end of the network
775         stream.  After this patch, our behavior matches Minefield.
776
777         Test: http/tests/misc/write-while-waiting.html
778
779         * WebCore.xcodeproj/project.pbxproj:
780         * dom/Document.cpp:
781         (WebCore::Document::write):
782         * dom/DocumentParser.h:
783         * dom/XMLDocumentParser.cpp:
784         (WebCore::XMLDocumentParser::finishWasCalled):
785         * dom/XMLDocumentParser.h:
786         * html/HTML5DocumentParser.cpp:
787         (WebCore::HTML5DocumentParser::finishWasCalled):
788         * html/HTML5DocumentParser.h:
789         (WebCore::HTML5DocumentParser::InputStream::isClosed):
790         * html/HTMLDocumentParser.cpp:
791         (WebCore::HTMLDocumentParser::finishWasCalled):
792         * html/HTMLDocumentParser.h:
793         * loader/ImageDocument.cpp:
794         (WebCore::ImageTokenizer::finishWasCalled):
795         * loader/MediaDocument.cpp:
796         (WebCore::MediaDocumentParser::finishWasCalled):
797         * loader/PluginDocument.cpp:
798         (WebCore::PluginDocumentParser::finishWasCalled):
799         * loader/SinkDocument.cpp:
800         (WebCore::SinkDocumentParser::finishWasCalled):
801         * loader/TextDocument.cpp:
802         (WebCore::TextDocumentParser::finishWasCalled):
803
804 2010-06-16  Martin Robinson  <mrobinson@igalia.com>
805
806         Reviewed by Gustavo Noronha Silva.
807
808         [GTK] ClipboardGtk::setURL does not match the behavior of other platforms
809         https://bugs.webkit.org/show_bug.cgi?id=40640
810
811         Instead of writing URL labels to the text portion of the clipboard or
812         drag-and-drop data, write the URL itself. Also escape the label text
813         of URLs. Abstracts logic into DataObjectGtk, so ClipboardGtk and
814         PasteboardGtk can share it.
815
816         Tests for this issue will be activated when dropping support has been
817         added to the GTK+ EventSender.
818
819         * platform/gtk/ClipboardGtk.cpp:
820         (WebCore::ClipboardGtk::writeURL): Use DataObjectGtk::setURL.
821         * platform/gtk/DataObjectGtk.cpp:
822         (WebCore::DataObjectGtk::setURL):
823         Added. Write URL to the text portion and remember to escape the
824         label when creating the markup portion.
825         * platform/gtk/DataObjectGtk.h: Add declaration of new method.
826         * platform/gtk/PasteboardGtk.cpp: 
827         (WebCore::Pasteboard::writeURL): Use DataObjectGtk::setURL.
828
829 2010-06-16  Adam Barth  <abarth@webkit.org>
830
831         Reviewed by Eric Seidel.
832
833         Hit assertion in WebCore::HTML5Token::appendToSystemIdentifier
834         https://bugs.webkit.org/show_bug.cgi?id=40729
835
836         This was a copy/paste error.  Yay for ASSERTs.
837
838         * html/HTML5Lexer.cpp:
839         (WebCore::HTML5Lexer::nextToken):
840
841 2010-06-16  Stuart Morgan  <stuartmorgan@chromium.org>
842
843         Reviewed by Anders Carlsson.
844
845         Bring npapi.h more in line with upstream npapi-headers version:
846         - Remove obsolete XP_MAC sections.
847         - Remove Metrowerks defines.
848         - Add OS/2 defines.
849         - Add Maemo defines.
850         - Add new version of the custom Carbon event definitions.
851         - Sync platform define style/details
852
853         https://bugs.webkit.org/show_bug.cgi?id=38666
854
855         * bridge/npapi.h:
856
857 2010-06-16  Simon Fraser  <simon.fraser@apple.com>
858
859         Reviewed by Sam Weinig.
860
861         Allow transitions and animations of clip: rect
862         https://bugs.webkit.org/show_bug.cgi?id=38130
863         
864         Make the CSS clip property animatable.
865
866         Test: transitions/clip-transition.html
867
868         * page/animation/AnimationBase.cpp:
869         (WebCore::blendFunc): New blend function for LengthBox
870         (WebCore::AnimationBase::ensurePropertyMap): Create a PropertyWrapper for LengthBoxes.
871
872         * platform/LengthBox.h:
873         (WebCore::LengthBox::LengthBox): New ctor that takes 4 length values.
874         * rendering/style/RenderStyle.h:
875         (WebCore::InheritedFlags::setClip): New method that takes a LengthBox.
876
877 2010-06-16  Simon Fraser  <simon.fraser@apple.com>
878
879         Reviewed by Dan Bernstein.
880
881         Fix clipping via CSS clip: with composited descendants
882         https://bugs.webkit.org/show_bug.cgi?id=40579
883         
884         Consult the 'clip' style, as well as overflow, when creating clipping
885         compositing layers.
886
887         Tests: compositing/geometry/clip.html
888                compositing/overflow/clip-descendents.html
889
890         * rendering/RenderLayerBacking.cpp:
891         (WebCore::clipBox): Utility function that returns the union of the clip and overflow
892         boxes.
893         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Use clipBox() to
894         get the correct clipping rectangle.
895         * rendering/RenderLayerCompositor.cpp:
896         (WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer): Look for
897         clip as well as overflow.
898         (WebCore::RenderLayerCompositor::clipsCompositingDescendants): Ditto.
899
900 2010-06-16  Simon Fraser  <simon.fraser@apple.com>
901
902         Reviewed by Darin Adler.
903
904         REGRESSION: Undocked inspector toolbar is white
905         https://bugs.webkit.org/show_bug.cgi?id=40644
906
907         Make the html element 100% height so that we don't erase the background to white, after r61215.
908
909         * inspector/front-end/inspector.css:
910         (html):
911
912 2010-06-16  Brian Weinstein  <bweinstein@apple.com>
913
914         Reviewed by Darin Adler.
915
916         User scripts injected on start are not run on image documents.
917         https://bugs.webkit.org/show_bug.cgi?id=40722
918         <rdar://8087394>
919         
920         User scripts that are injected on start are run from FrameLoader::dispatchDocumentElementAvailable,
921         but this is never called from ImageDocument, so call it when we create a document element for
922         our image document.
923
924         * loader/ImageDocument.cpp:
925         (WebCore::ImageDocument::createDocumentStructure): Call FrameLoader::dispatchDocumentElementAvailable
926             after creating our document element.
927
928 2010-06-16  Brady Eidson  <beidson@apple.com>
929
930         Reviewed by NOBODY (Build fix for Mac)
931
932         * WebCore.xcodeproj/project.pbxproj: Make paths relative to the project root.
933
934 2010-06-16  Chris Marrin  <cmarrin@apple.com>
935
936         Reviewed by Eric Carlson.
937
938         https://bugs.webkit.org/show_bug.cgi?id=40643
939         
940         Second of three steps - rename Canvas3DLayer to WebGLLayer
941
942         * WebCore.xcodeproj/project.pbxproj:
943         * platform/graphics/mac/Canvas3DLayer.h: Removed.
944         * platform/graphics/mac/Canvas3DLayer.mm: Removed.
945         * platform/graphics/mac/GraphicsLayerCA.mm:
946         (WebCore::GraphicsLayerCA::setContentsToGraphicsContext3D):
947         * platform/graphics/mac/WebGLLayer.h: Copied from WebCore/platform/graphics/mac/Canvas3DLayer.h.
948         * platform/graphics/mac/WebGLLayer.mm: Copied from WebCore/platform/graphics/mac/Canvas3DLayer.mm.
949
950 2010-06-16  Chris Marrin  <cmarrin@apple.com>
951
952         Reviewed by Simon Fraser.
953
954         https://bugs.webkit.org/show_bug.cgi?id=40643
955         
956         Rename GraphicsContext3DMac.cpp so it can interact with CALayer
957
958         * platform/graphics/mac/GraphicsContext3DMac.cpp: Removed.
959         * platform/graphics/mac/GraphicsContext3DMac.mm: Copied from WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp.
960         * WebCore.xcodeproj/project.pbxproj
961
962 2010-06-16  Nikolas Zimmermann  <nzimmermann@rim.com>
963
964         Reviewed by Dirk Schulze.
965
966         Add new files, needed in SVG Text rewrite
967         https://bugs.webkit.org/show_bug.cgi?id=40676
968
969         Land SVGTextChunkLayoutInfo.cpp and SVGTextQuery.(cpp|h), both with an "#if 0" on top, as they will be needed
970         in a later patch, completing the SVG Text rewrite, that will enable them.
971
972         Doesn't affect any code for now, it should just reduce the review amount.
973
974         * Android.mk:
975         * CMakeLists.txt:
976         * GNUmakefile.am:
977         * WebCore.gypi:
978         * WebCore.pro:
979         * WebCore.vcproj/WebCore.vcproj:
980         * WebCore.xcodeproj/project.pbxproj:
981         * rendering/SVGTextChunkLayoutInfo.cpp: Added.
982         (WebCore::cummulatedWidthOrHeightOfTextChunk):
983         (WebCore::cummulatedWidthOfTextChunk):
984         (WebCore::cummulatedHeightOfTextChunk):
985         (WebCore::calculateTextAnchorShiftForTextChunk):
986         (WebCore::applyTextAnchorToTextChunk):
987         (WebCore::calculateTextLengthCorrectionForTextChunk):
988         (WebCore::applyTextLengthCorrectionToTextChunk):
989         (WebCore::SVGTextChunkLayoutInfo::startTextChunk):
990         (WebCore::SVGTextChunkLayoutInfo::closeTextChunk):
991         (WebCore::SVGTextChunkLayoutInfo::buildTextChunks):
992         (WebCore::SVGTextChunkLayoutInfo::recursiveBuildTextChunks):
993         (WebCore::SVGTextChunkLayoutInfo::layoutTextChunks):
994         * rendering/SVGTextChunkLayoutInfo.h: Add missing include, otherwhise compiling SVGTextChunkLayoutInfo.cpp will fail.
995         * rendering/SVGTextQuery.cpp: Added.
996         (WebCore::SVGTextQuery::Data::Data):
997         (WebCore::flowBoxForRenderer):
998         (WebCore::mapLengthThroughChunkTransformation):
999         (WebCore::SVGTextQuery::SVGTextQuery):
1000         (WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
1001         (WebCore::SVGTextQuery::executeQuery):
1002         (WebCore::SVGTextQuery::mapStartAndLengthIntoChunkPartCoordinates):
1003         (WebCore::SVGTextQuery::measureCharacterRange):
1004         (WebCore::NumberOfCharactersData::NumberOfCharactersData):
1005         (WebCore::SVGTextQuery::numberOfCharactersCallback):
1006         (WebCore::SVGTextQuery::numberOfCharacters):
1007         (WebCore::TextLengthData::TextLengthData):
1008         (WebCore::SVGTextQuery::textLengthCallback):
1009         (WebCore::SVGTextQuery::textLength):
1010         (WebCore::SubStringLengthData::SubStringLengthData):
1011         (WebCore::SVGTextQuery::subStringLengthCallback):
1012         (WebCore::SVGTextQuery::subStringLength):
1013         (WebCore::StartPositionOfCharacterData::StartPositionOfCharacterData):
1014         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
1015         (WebCore::SVGTextQuery::startPositionOfCharacter):
1016         (WebCore::EndPositionOfCharacterData::EndPositionOfCharacterData):
1017         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
1018         (WebCore::SVGTextQuery::endPositionOfCharacter):
1019         (WebCore::RotationOfCharacterData::RotationOfCharacterData):
1020         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
1021         (WebCore::SVGTextQuery::rotationOfCharacter):
1022         (WebCore::ExtentOfCharacterData::ExtentOfCharacterData):
1023         (WebCore::SVGTextQuery::extentOfCharacterCallback):
1024         (WebCore::SVGTextQuery::extentOfCharacter):
1025         (WebCore::CharacterNumberAtPositionData::CharacterNumberAtPositionData):
1026         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
1027         (WebCore::SVGTextQuery::characterNumberAtPosition):
1028         * rendering/SVGTextQuery.h: Added.
1029
1030 2010-06-16  Nikolas Zimmermann  <nzimmermann@rim.com>
1031
1032         Reviewed by Dirk Schulze.
1033
1034         Provide floating-point support for text selection framework
1035         https://bugs.webkit.org/show_bug.cgi?id=40665
1036
1037         This is the first chunk of the SVG Text rewrite patches.
1038         offsetForPosition() / selectionRectForText() should accept float/FloatPoint arguments instead
1039         of int/IntPoint. offsetForPosition() already worked with floats internally in Qt and Mac.
1040         selectionRectForText() was already returning a FloatRect, but the passed in origin was an integer.
1041         Fixing these problems in order to support sub-pixel positioning in the upcoming SVG Text rewrite patch.
1042
1043         Add a glyphScale parameter to TextRun, that will be used to support text selection
1044         in lengthAdjust/textLength scenarios in SVG text, soon.
1045
1046         Doesn't affect any testcases so far. HTML is not affected in any way,
1047         as it only ever passes integers to these functions.
1048
1049         * platform/graphics/Font.cpp:
1050         (WebCore::Font::selectionRectForText):
1051         (WebCore::Font::offsetForPosition):
1052         * platform/graphics/Font.h:
1053         * platform/graphics/FontFastPath.cpp:
1054         (WebCore::Font::selectionRectForSimpleText):
1055         (WebCore::Font::offsetForPositionForSimpleText):
1056         * platform/graphics/TextRun.h:
1057         (WebCore::TextRun::TextRun):
1058         (WebCore::TextRun::glyphScale):
1059         (WebCore::TextRun::setGlyphScale):
1060         (WebCore::TextRun::applyGlyphScaling):
1061         * platform/graphics/WidthIterator.cpp:
1062         (WebCore::WidthIterator::advance):
1063         * platform/graphics/chromium/FontChromiumWin.cpp:
1064         (WebCore::Font::selectionRectForComplexText):
1065         (WebCore::Font::offsetForPositionForComplexText):
1066         * platform/graphics/chromium/FontLinux.cpp:
1067         (WebCore::Font::offsetForPositionForComplexText):
1068         (WebCore::Font::selectionRectForComplexText):
1069         * platform/graphics/efl/FontEfl.cpp:
1070         (WebCore::Font::offsetForPositionForComplexText):
1071         (WebCore::Font::selectionRectForComplexText):
1072         * platform/graphics/gtk/FontGtk.cpp:
1073         (WebCore::Font::offsetForPositionForComplexText):
1074         (WebCore::Font::selectionRectForComplexText):
1075         * platform/graphics/haiku/FontHaiku.cpp:
1076         (WebCore::Font::selectionRectForComplexText):
1077         (WebCore::Font::offsetForPositionForComplexText):
1078         * platform/graphics/mac/ComplexTextController.cpp:
1079         (WebCore::ComplexTextController::offsetForPosition):
1080         * platform/graphics/mac/ComplexTextController.h:
1081         * platform/graphics/mac/FontComplexTextMac.cpp:
1082         (WebCore::Font::selectionRectForComplexText):
1083         (WebCore::Font::offsetForPositionForComplexText):
1084         * platform/graphics/qt/FontQt.cpp:
1085         (WebCore::Font::offsetForPositionForSimpleText):
1086         (WebCore::Font::offsetForPositionForComplexText):
1087         (WebCore::Font::selectionRectForSimpleText):
1088         (WebCore::Font::selectionRectForComplexText):
1089         * platform/graphics/win/FontWin.cpp:
1090         (WebCore::Font::selectionRectForComplexText):
1091         (WebCore::Font::offsetForPositionForComplexText):
1092         * platform/graphics/wince/FontWince.cpp:
1093         (WebCore::Font::offsetForPositionForComplexText):
1094         (WebCore::Font::selectionRectForComplexText):
1095         * platform/graphics/wx/FontWx.cpp:
1096         (WebCore::Font::selectionRectForComplexText):
1097         (WebCore::Font::offsetForPositionForComplexText):
1098         * svg/SVGFont.cpp:
1099         (WebCore::Font::selectionRectForTextUsingSVGFont):
1100         (WebCore::Font::offsetForPositionForTextUsingSVGFont):
1101
1102 2010-06-16  Anton Muhin  <antonm@chromium.org>
1103
1104         Reviewed by Nate Chapin.
1105
1106         [v8] Introduce single element caches for WebCore::String to v8::String conversions
1107         https://bugs.webkit.org/show_bug.cgi?id=40435
1108         Measurements show that for some web apps (GMail, Wave) and some scenarios
1109         (intensive reading and/or keeping a tab open for a long time),
1110         hit rate lies in 30--50% interval.
1111         Inlining fast case gives another minor performance win.
1112
1113         * bindings/v8/V8Binding.cpp:
1114         (WebCore::getStringCache):
1115         (WebCore::v8ExternalStringSlow):
1116         * bindings/v8/V8Binding.h:
1117         (WebCore::v8ExternalString):
1118
1119 2010-06-16  Antonio Gomes  <tonikitoo@webkit.org>
1120
1121         Reviewed by Kenneth Christiansen.
1122
1123         Spatial Navigation: using offset{Left,Top} is not enough to get the proper inner frames position
1124         https://bugs.webkit.org/show_bug.cgi?id=39439
1125
1126         As pointed out by Darin Adler in https://bugs.webkit.org/show_bug.cgi?id=18662#c20,
1127         "It's not correct to use the offsetLeft and offsetTop of the frame owner element's renderer because
1128         that's just the distance from the offsetParent, not the absolute position".
1129
1130         Patch fixes that behavior by now considering the offsetTop and offsetLeft the offsetParent recursively,
1131         starting from the HtmlFrameOwnerElement. Previously, only calling offsetTop and offsetLeft works
1132         because all tests were done in htmls where the {i}frame element was a directly a child of the body,
1133         e.g. <html>...<body><iframe src=xxx>....<body></html>.
1134
1135         Test: fast/events/spatial-navigation/snav-iframe-recursive-offset-parent.html
1136
1137         * page/SpatialNavigation.cpp:
1138         (WebCore::renderRectRelativeToRootDocument):
1139
1140 2010-06-16  Dan Bernstein  <mitz@apple.com>
1141
1142         Try to fix the Tiger build
1143
1144         * platform/graphics/mac/SimpleFontDataMac.mm:
1145         (WebCore::SimpleFontData::platformBoundsForGlyph):
1146
1147 2010-06-16  Dan Bernstein  <mitz@apple.com>
1148
1149         Try to fix the Tiger build
1150
1151         * platform/graphics/mac/SimpleFontDataMac.mm:
1152         (WebCore::SimpleFontData::platformBoundsForGlyph):
1153
1154 2010-06-16  Dan Bernstein  <mitz@apple.com>
1155
1156         Reviewed by Alexey Proskuryakov.
1157
1158         <rdar://problem/8077119> REGRESSION (r60247): Google Reader contains the tops of pieces of unidentifiable text under feed headlines.
1159         https://bugs.webkit.org/show_bug.cgi?id=40386
1160
1161         Test: platform/mac/fast/text/x-height.html
1162
1163         The result of platformBoundsForGlyph() is in flipped coordinates, whereas the result of
1164         -[NSFont boundingRectForGlyph:] was not. r60247 failed to account for this.
1165
1166         * platform/graphics/mac/SimpleFontDataMac.mm:
1167         (WebCore::SimpleFontData::platformInit): Measure the height of the x glyph above the baseline
1168         correctly.
1169         (WebCore::SimpleFontData::platformBoundsForGlyph): Return a rect in flipped coordinates on Tiger
1170         as well.
1171
1172 2010-06-16  Adam Barth  <abarth@webkit.org>
1173
1174         Reviewed by Eric Seidel.
1175
1176         Don't crash when a document ends with an entity
1177         https://bugs.webkit.org/show_bug.cgi?id=40658
1178
1179         When we SWITCH_TO a state, we're expecting our caller to have advanced
1180         the source.  Rather than have all the callers check for empty, we do
1181         that ourselves.
1182
1183         * html/HTML5Lexer.cpp:
1184
1185 2010-06-15  Adam Barth  <abarth@webkit.org>
1186
1187         Reviewed by Eric Seidel.
1188
1189         Enable HTML5 lexer
1190         https://bugs.webkit.org/show_bug.cgi?id=40650
1191
1192         * page/Settings.cpp:
1193         (WebCore::Settings::Settings):
1194
1195 2010-06-15  Mark Rowe  <mrowe@apple.com>
1196
1197         Rubber-stamped by David Harrison.
1198
1199         sqlite3_prepare16_v2 is not documented as always setting "tail" during error cases.
1200         Explicitly initialize it to null, just to be safe.
1201
1202         * platform/sql/SQLiteStatement.cpp:
1203         (WebCore::SQLiteStatement::prepare):
1204
1205 2010-06-15  Mark Rowe  <mrowe@apple.com>
1206
1207         Reviewed by Brady Eidson.
1208
1209         <rdar://problem/8091103> URLs not added to history when initial load happens via back/forward navigation
1210
1211         Back/forward navigation currently does not create or update items in the global history. This is usually
1212         desirable, except for in the event where the back/forward list was created programmatically and attached
1213         to the WebView and the initial load in that WebView is being performed as a result of a back/forward
1214         navigation. In that situation it is preferable to ensure that global history item is created or updated.
1215
1216         No test case is added because DumpRenderTree is not able to test the scenario where the initial
1217         load in a WebView occurs via a back/forward navigation.
1218
1219         * loader/FrameLoader.cpp:
1220         (WebCore::FrameLoader::transitionToCommitted): If we're committing the first load in this frame as a
1221         back/forward navigation then we should update the history as if it were a standard load, with the
1222         exception of updating the back/forward list.
1223         * loader/HistoryController.cpp:
1224         (WebCore::HistoryController::updateForStandardLoad): Add a parameter to allow callers to skip updating
1225         the back/forward list.
1226         * loader/HistoryController.h:
1227         (WebCore::HistoryController::):
1228
1229 2010-06-15  Kinuko Yasuda  <kinuko@chromium.org>
1230
1231         Reviewed by David Levin.
1232
1233         Fix compilation errors in BlobBuilder with FILE_WRITER enabled
1234         https://bugs.webkit.org/show_bug.cgi?id=40606
1235
1236         No functionality change so no new tests.
1237
1238         * html/BlobBuilder.cpp:
1239         * html/BlobBuilder.h:
1240
1241 2010-06-15  Jian Li  <jianli@chromium.org>
1242
1243         Reviewed by David Levin.
1244
1245         Move type attribute from File.idl to Blob.idl per latest File API spec.
1246         https://bugs.webkit.org/show_bug.cgi?id=40642
1247
1248         * html/Blob.idl:
1249         * html/File.idl:
1250
1251 2010-06-15  Darin Adler  <darin@apple.com>
1252
1253         Reviewed by Adam Barth.
1254
1255         Move functions out of Frame class that were marked "move to Chrome"
1256         https://bugs.webkit.org/show_bug.cgi?id=39636
1257
1258         Refactoring that does not require new tests.
1259
1260         * loader/FrameLoader.cpp:
1261         (WebCore::FrameLoader::didOpenURL): Call setStatus and setDefaultStatus
1262         on DOMWindow rather than going through Frame.
1263         (WebCore::FrameLoader::open): Ditto.
1264         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Call
1265         shouldClose on this object instead of going through Frame.
1266
1267         * page/DOMWindow.cpp:
1268         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): Call
1269         shouldClose on FrameLoader instead of going through Frame.
1270         (WebCore::DOMWindow::focus): Moved the code from Frame::focusWindow
1271         in here.
1272         (WebCore::DOMWindow::blur): Moved the code from Frame::unfocusWindow
1273         in here.
1274         (WebCore::DOMWindow::close): Moved the code from Frame::scheduleClose
1275         in here.
1276         (WebCore::DOMWindow::setStatus): Moved the code from
1277         Frame::setJSStatusBarText in here.
1278         (WebCore::DOMWindow::setDefaultStatus): Moved the code from
1279         Frame::setJSDefaultStatusBarText in here.
1280
1281         * page/DOMWindow.h: Added m_status and m_defaultStatus members to
1282         store the status messages being set by the DOM.
1283
1284         * page/Frame.cpp: Removed all the functions that were marked
1285         "to be moved into Chrome".
1286         * page/Frame.h: Ditto.
1287
1288 2010-06-15  Simon Fraser  <simon.fraser@apple.com>
1289
1290         Fix crashing tests; need to check for null documentElement().
1291
1292         * rendering/RenderView.cpp:
1293         (WebCore::RenderView::paintBoxDecorations):
1294
1295 2010-06-15  Simon Fraser  <simon.fraser@apple.com>
1296
1297         Reviewed by Dave Hyatt.
1298
1299         Garbage shown outside HTML if HTML is absolutely positioned
1300         https://bugs.webkit.org/show_bug.cgi?id=36163
1301         
1302         Add a check that the root renderer (the document element's renderer) covers
1303         the entire viewport before deciding that we don't need the RenderView
1304         to paint its background. Fixes lack of painting with positioned, floated, and
1305         display: table html elements.
1306
1307         Test: fast/repaint/positioned-document-element.html
1308
1309         * rendering/RenderView.cpp:
1310         (WebCore::RenderView::paintBoxDecorations):
1311
1312 2010-06-15  Simon Fraser  <simon.fraser@apple.com>
1313
1314         Reviewed by Dan Bernstein.
1315
1316         Safari 5 does not clear background with transformed html element
1317         https://bugs.webkit.org/show_bug.cgi?id=40498
1318         
1319         When the document element is composited, ensure that the FrameView
1320         paints the background, because the composited layer may be transparent,
1321         or might get moved via animation.
1322
1323         Test: compositing/repaint/composited-document-element.html
1324
1325         * rendering/RenderView.cpp:
1326         (WebCore::isComposited):
1327         (WebCore::rendererObscuresBackground):
1328
1329 2010-06-15  Xan Lopez  <xlopez@igalia.com>
1330
1331         Try to fix GTK+ build.
1332
1333         * platform/gtk/GtkVersioning.h:
1334
1335 2010-06-15  Darin Fisher  <darin@chromium.org>
1336
1337         Reviewed by Brady Eidson.
1338
1339         Introduce HistoryItem::itemSequenceNumber and use it to identify
1340         HistoryItems that are clones of one another.
1341
1342         Changes HistoryController::recursiveGoToItem to use itemSequenceNumber
1343         equality instead of isTargetItem as the pre-requisite for not calling
1344         FrameLoader::loadItem.
1345
1346         Changes FrameLoader::loadItem to require equivalent
1347         documentSequenceNumber before initiating a same document navigation.
1348         This alone would appear to fix the bug, but it does not go far enough
1349         since without the itemSequenceNumber equality check, we'd re-load more
1350         often than we should.
1351
1352         Moves documentSequenceNumber assignment into createItemTree as cleanup
1353         and to ensure that it gets called properly whenever we create a cloned
1354         HistoryItem.  (createItemTree's mission is to create clones up until
1355         or including the target frame depending on the value of the doClip
1356         parameter.)
1357
1358         Removes the now unused HistoryController::urlsMatchItem.
1359
1360         https://bugs.webkit.org/show_bug.cgi?id=40451
1361
1362         Test: fast/history/history-back-within-subframe.html
1363               http/tests/navigation/history-back-across-form-submission-to-fragment.html
1364
1365         * history/HistoryItem.cpp:
1366         (WebCore::generateSequenceNumber):
1367         (WebCore::HistoryItem::HistoryItem):
1368         * history/HistoryItem.h:
1369         (WebCore::HistoryItem::setItemSequenceNumber):
1370         (WebCore::HistoryItem::itemSequenceNumber):
1371         * loader/FrameLoader.cpp:
1372         (WebCore::FrameLoader::loadItem):
1373         * loader/HistoryController.cpp:
1374         (WebCore::HistoryController::updateBackForwardListForFragmentScroll):
1375         (WebCore::HistoryController::createItemTree):
1376         (WebCore::HistoryController::recursiveGoToItem):
1377         (WebCore::HistoryController::pushState):
1378         * loader/HistoryController.h:
1379
1380 2010-06-15  Xan Lopez  <xlopez@igalia.com>
1381
1382         Reviewed by Gustavo Noronha.
1383
1384         [GTK] Does not compile with -DGSEAL_ENABLE
1385         https://bugs.webkit.org/show_bug.cgi?id=37851
1386
1387         Fix compilation with GSEAL_ENABLE.
1388
1389         * platform/gtk/GtkVersioning.h:
1390         * platform/gtk/PlatformScreenGtk.cpp:
1391         (WebCore::screenDepth):
1392         (WebCore::screenDepthPerComponent):
1393         * platform/gtk/PopupMenuGtk.cpp:
1394         (WebCore::PopupMenu::show):
1395         * platform/gtk/ScrollbarGtk.cpp:
1396         (ScrollbarGtk::detachAdjustment):
1397         (ScrollbarGtk::updateThumbPosition):
1398         (ScrollbarGtk::updateThumbProportion):
1399         * plugins/gtk/PluginViewGtk.cpp:
1400         (WebCore::PluginView::paint):
1401         (WebCore::PluginView::initXEvent):
1402         (WebCore::PluginView::platformGetValue):
1403         (WebCore::PluginView::platformStart):
1404         * plugins/gtk/gtk2xtbin.c:
1405         (gtk_xtbin_realize):
1406         (gtk_xtbin_new):
1407         (gtk_xtbin_set_position):
1408         (gtk_xtbin_unrealize):
1409
1410 2010-06-15  Xan Lopez  <xlopez@igalia.com>
1411
1412         Unreviewed build fix.
1413
1414         Fix the build when WebSockets are disabled.
1415
1416         * bindings/js/JSWorkerContextCustom.cpp:
1417
1418 2010-06-15  Simon Fraser  <simon.fraser@apple.com>
1419
1420         Reviewed by Dan Bernstein.
1421
1422         YouTube thumbnail borders vanish during transition
1423         https://bugs.webkit.org/show_bug.cgi?id=40551
1424         
1425         Turn off the direct image optimization if the image has a clip style, so that is is
1426         correctly rendered with the clip.
1427
1428         Test: compositing/images/clip-on-directly-composited-image.html
1429
1430         * rendering/RenderLayerBacking.cpp:
1431         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
1432
1433 2010-06-15  Yury Semikhatsky  <yurys@chromium.org>
1434
1435         Reviewed by Pavel Feldman.
1436
1437         [v8] Web Inspector: make ui tests pass when ScriptDebugServer is used
1438         https://bugs.webkit.org/show_bug.cgi?id=40623
1439
1440         * bindings/v8/JavaScriptCallFrame.cpp:
1441         (WebCore::JavaScriptCallFrame::functionName): return empty string for anonymous functions instead of [anonymous].
1442         * bindings/v8/ScriptDebugServer.cpp:
1443         (WebCore::ScriptDebugServer::handleV8DebugEvent): autocontinue on syntax errors since there is no stack trace and
1444         not much to inspect.
1445
1446 2010-06-15  Adam Roben  <aroben@apple.com>
1447
1448         Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds
1449
1450         Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>.
1451
1452         Reviewed by Sam Weinig.
1453
1454         * WebCore.vcproj/WebCore.make: Copy the contents of WebCore's
1455         DerivedSources directory to AppleInternal/Sources/WebCore.
1456
1457 2010-06-15  Zhenyao Mo  <zmo@google.com>
1458
1459         Reviewed by Dimitri Glazkov.
1460
1461         Bring framebuffer functions to GLES2 conformance
1462         https://bugs.webkit.org/show_bug.cgi?id=40175
1463
1464         Test: fast/canvas/webgl/framebuffer-test.html
1465
1466         * html/canvas/WebGLRenderingContext.cpp:
1467         (WebCore::WebGLRenderingContext::checkFramebufferStatus): Check input parameters and deal with default framebuffer situation.
1468         (WebCore::WebGLRenderingContext::framebufferRenderbuffer): Check input parameters.
1469         (WebCore::WebGLRenderingContext::framebufferTexture2D): Ditto.
1470         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Ditto.
1471         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Check input parameters.
1472         * html/canvas/WebGLRenderingContext.h: Add validateFramebufferFuncParameters.
1473
1474 2010-06-15  Patrick Gansterer  <paroga@paroga.com>
1475
1476         Reviewed by David Levin.
1477
1478         Buildfix for ResourceHandleWin after r24202 and r55542.
1479         https://bugs.webkit.org/show_bug.cgi?id=32963
1480
1481         * platform/network/win/ResourceHandleWin.cpp:
1482         (WebCore::ResourceHandle::onHandleCreated):
1483         (WebCore::ResourceHandle::onRequestComplete):
1484         (WebCore::transferJobStatusCallback):
1485         (WebCore::ResourceHandle::start):
1486
1487 2010-06-12  Pavel Feldman  <pfeldman@chromium.org>
1488
1489         Reviewed by Joe Pecoraro.
1490
1491         Web Inspector: Should not expose window.console._inspectorCommandLineAPI to the web.
1492
1493         https://bugs.webkit.org/show_bug.cgi?id=40500
1494
1495         * inspector/front-end/InjectedScript.js:
1496         (injectedScriptConstructor):
1497         (injectedScriptConstructor.):
1498
1499 2010-06-15  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1500
1501         Reviewed by Simon Hausmann.
1502
1503         [Qt] The qt_webkit_version.pri file gets overwritten on install
1504         https://bugs.webkit.org/show_bug.cgi?id=40487
1505
1506         Don't install qt_webkit_version.pri when building WebKit inside of Qt.
1507         The import of WebKit into Qt will take care of providing the file
1508         in mkspecs/modules and it'll be installed through projects.pro.
1509
1510         * WebCore.pro:
1511
1512 2010-06-15  Tony Chang  <tony@chromium.org>
1513
1514         Reviewed by Ojan Vafai.
1515
1516         resolve urls in text/html clipboard data
1517         https://bugs.webkit.org/show_bug.cgi?id=40044
1518
1519         Allow text/html data copied from a page to contain full URLs when
1520         dragging or copy/pasting.
1521
1522         Tests: editing/pasteboard/copy-resolves-urls.html
1523                http/tests/misc/copy-resolves-urls.html
1524
1525         * WebCore.base.exp:
1526         * editing/markup.cpp:
1527         (WebCore::appendStartMarkup):
1528         (WebCore::getStartMarkup):
1529         (WebCore::MarkupAccumulator::appendMarkup):
1530         (WebCore::createMarkup):
1531         * editing/markup.h:
1532         (WebCore::):
1533         * platform/chromium/ClipboardChromium.cpp:
1534         (WebCore::ClipboardChromium::writeRange):
1535         * platform/chromium/PasteboardChromium.cpp:
1536         (WebCore::Pasteboard::writeSelection):
1537         * platform/gtk/ClipboardGtk.cpp:
1538         (WebCore::ClipboardGtk::writeRange):
1539         * platform/gtk/DataObjectGtk.cpp:
1540         (WebCore::DataObjectGtk::markup):
1541         * platform/gtk/PasteboardGtk.cpp:
1542         (WebCore::Pasteboard::writeSelection):
1543         * platform/haiku/PasteboardHaiku.cpp:
1544         (WebCore::Pasteboard::writeSelection):
1545         * platform/qt/ClipboardQt.cpp:
1546         (WebCore::ClipboardQt::writeRange):
1547         * platform/qt/PasteboardQt.cpp:
1548         (WebCore::Pasteboard::writeSelection):
1549
1550 2010-06-14  Chris Fleizach  <cfleizach@apple.com>
1551
1552         No review. GTK build fix.
1553
1554         AX: need ListItemRole and PresentationalRole
1555         https://bugs.webkit.org/show_bug.cgi?id=40133
1556
1557         Mostly speculative fix to make GTK unit tests work.
1558
1559         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1560         (atkRole):
1561         (webkit_accessible_get_role):
1562
1563 2010-06-14  Eric Carlson  <eric.carlson@apple.com>
1564
1565         Reviewed by Dan Bernstein.
1566
1567         <rdar://problem/8090895> Update http streaming MIME types
1568
1569         * platform/MIMETypeRegistry.cpp:
1570         (WebCore::TypeExtensionPair::): Add http streaming MIME synonyms.
1571
1572 2010-06-14  Eric Carlson  <eric.carlson@apple.com>
1573
1574         Reviewed by Oliver Hunt.
1575
1576         audio/x-mp3 MIME type not recognized
1577         <rdar://problem/7875393>
1578         https://bugs.webkit.org/show_bug.cgi?id=40594
1579         
1580         Allow MIMETypeRegistry to have more than one MIME type for a
1581         media file extension, and have the QTKit media engine register
1582         all MIME types it can find for each file type QTKit supports.
1583
1584         Test: media/media-can-play-mp3.html
1585
1586         * platform/MIMETypeRegistry.cpp:
1587         (WebCore::mediaMIMETypeMap): Update for new HashMap format.
1588         (WebCore::TypeExtensionPair::): Store String+Vector<String>
1589         (WebCore::MIMETypeRegistry::getMediaMIMETypeForExtension): Only consult
1590         mediaMIMETypeMap(), it has the canonical answer.
1591         (WebCore::MIMETypeRegistry::getMediaMIMETypesForExtension): New, return
1592         a Vector of all MIME types for an extension.
1593         * platform/MIMETypeRegistry.h:
1594         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1595         (WebCore::addFileTypesToCache): Add all MIME types returned in the 
1596         getMediaMIMETypesForExtension Vector.
1597
1598 2010-06-14  Mark Rowe  <mrowe@apple.com>
1599
1600         Reviewed by Brady Eidson.
1601
1602         <rdar://problem/8071866> REGRESSION: Crash on launch on Tiger and Leopard with network home folder
1603
1604         * platform/sql/SQLiteStatement.cpp:
1605         (WebCore::SQLiteStatement::prepare): Don't assume that tail is always non-null, since that may
1606         not be the case with some versions of SQLite. Instead we must null-check before dereferencing.
1607
1608 2010-06-14  Anders Carlsson  <andersca@apple.com>
1609
1610         Fix Tiger build.
1611
1612         * plugins/mac/PluginDataMac.mm:
1613
1614 2010-06-14  Anders Carlsson  <andersca@apple.com>
1615
1616         Reviewed by Darin Adler.
1617
1618         Use an array for extensions in MimeClassInfo
1619         https://bugs.webkit.org/show_bug.cgi?id=40602
1620
1621         Get rid of MimeClassInfo::suffixes and replace it with an array of extensions.
1622
1623         * plugins/MimeType.cpp:
1624         (WebCore::MimeType::suffixes):
1625         Create a string of joined extensions.
1626
1627         * plugins/MimeType.h:
1628         * plugins/PluginData.h:
1629         (WebCore::operator==):
1630         * plugins/chromium/PluginDataChromium.cpp:
1631         (WebCore::getPluginMimeTypeFromExtension):
1632         * plugins/gtk/PluginDataGtk.cpp:
1633         (WebCore::PluginData::initPlugins):
1634         * plugins/mac/PluginDataMac.mm:
1635         (WebCore::PluginData::initPlugins):
1636         * plugins/qt/PluginDataQt.cpp:
1637         (WebCore::PluginData::initPlugins):
1638         * plugins/win/PluginDataWin.cpp:
1639         (WebCore::PluginData::initPlugins):
1640         * plugins/wx/PluginDataWx.cpp:
1641         (WebCore::PluginData::initPlugins):
1642
1643 2010-06-14  Adam Barth  <abarth@webkit.org>
1644
1645         Unreviewed.
1646
1647         Add an include to try to fix Chromium build.
1648
1649         * html/HTML5DocumentParser.cpp:
1650
1651 2010-06-14  Eric Seidel  <eric@webkit.org>
1652
1653         Reviewed by Adam Barth.
1654
1655         Safari beach-balls loading large pages with HTML5 parser
1656         https://bugs.webkit.org/show_bug.cgi?id=40596
1657
1658         Implement parser yielding, similar to how the old
1659         HTMLDocumentParser yields.
1660
1661         This implementation re-uses the tokenizerTimeDelay and
1662         tokenizerChunkSize settings even though they don't map exactly
1663         to the token loop that the HTML5 parser uses.
1664
1665         * dom/DocumentParser.h:
1666          - Add a FIXME for processingData() and clarify how the
1667            appendData flag is used by renaming it to isFromNetwork.
1668         * html/HTML5DocumentParser.cpp:
1669         (WebCore::parserTimeLimit):
1670          - Defaults accessor, probably belongs on Page.
1671         (WebCore::parserChunkSize):
1672          - Defaults accessor, probably belongs on Page.
1673         (WebCore::HTML5DocumentParser::HTML5DocumentParser):
1674         (WebCore::HTML5DocumentParser::stopParsing):
1675          - Stop the continue-parsing timer if active.
1676         (WebCore::HTML5DocumentParser::processingData):
1677          - Implement this poorly understood accessor to match
1678            the old parser's behavior.  It's unclear what this does
1679            and it does not affect any layout tests to my knowledge
1680            but likely affects the WebKit API in some way.
1681         (WebCore::HTML5DocumentParser::pumpLexerIfPossible):
1682          - Pass SynchronousMode.
1683          - Do not ever pump if we've yielded to the timer.
1684         (WebCore::HTML5DocumentParser::PumpSession::PumpSession):
1685          - A struct for storing the yield counters.
1686         (WebCore::HTML5DocumentParser::shouldContinueParsing):
1687          - Mostly matches HTMLDocumentParser::shouldContinueParsing.
1688         (WebCore::HTML5DocumentParser::pumpLexer):
1689          - Respect SynchronousMode.
1690          - ASSERT that a timer is not scheduled if we're pumping.
1691         (WebCore::isLayoutTimerActive):
1692          - This belongs on Document.
1693         (WebCore::HTML5DocumentParser::continueNextChunkTimerFired):
1694         (WebCore::HTML5DocumentParser::write):
1695         (WebCore::HTML5DocumentParser::end):
1696          - We should never end() if a timer is still outstanding.
1697         (WebCore::HTML5DocumentParser::attemptToEnd):
1698         (WebCore::HTML5DocumentParser::endIfDelayed):
1699         (WebCore::HTML5DocumentParser::resumeParsingAfterScriptExecution):
1700         * html/HTML5DocumentParser.h:
1701         (WebCore::HTML5DocumentParser::):
1702         * html/HTMLDocumentParser.cpp:
1703          - Clarify the old TimeDelay and ChunkSize constants.
1704
1705 2010-06-14  Adam Barth  <abarth@webkit.org>
1706
1707         Reviewed by Eric Seidel.
1708
1709         Add a preload scanner for the HTML5 parser
1710         https://bugs.webkit.org/show_bug.cgi?id=40557
1711
1712         This patch adds a simple preload scanner for the HTML5 parser.  This
1713         preload scanner is not as awesome as the old one because it doesn't
1714         scan CSS, but it's much simpler.
1715
1716         * Android.mk:
1717         * CMakeLists.txt:
1718         * GNUmakefile.am:
1719         * WebCore.gypi:
1720         * WebCore.pro:
1721         * WebCore.vcproj/WebCore.vcproj:
1722         * WebCore.xcodeproj/project.pbxproj:
1723             - Build file torture.
1724         * html/HTML5DocumentParser.cpp:
1725         (WebCore::HTML5DocumentParser::write):
1726             - Call into the preload scanner when waiting for a script.
1727         * html/HTML5DocumentParser.h:
1728         * html/HTML5PreloadScanner.cpp: Copied from WebCore/html/PreloadScanner.cpp.
1729         (WebCore::HTML5PreloadScanner::HTML5PreloadScanner):
1730         (WebCore::HTML5PreloadScanner::scan):
1731             - A simple loop to pump the preload scanner's lexer.
1732         (WebCore::HTML5PreloadScanner::processToken):
1733             - Preload interesting resources.  Stolen from the old preload
1734               scanner.
1735         (WebCore::HTML5PreloadScanner::scanningBody):
1736         * html/HTML5PreloadScanner.h: Copied from WebCore/html/PreloadScanner.h.
1737
1738 2010-06-14  Adam Barth  <abarth@webkit.org>
1739
1740         Reviewed by Eric Seidel.
1741
1742         Constify some HTML5Token methods
1743         https://bugs.webkit.org/show_bug.cgi?id=40592
1744
1745         I keep wanting these methods to be const.  Eric wanted this in a
1746         separate patch.
1747
1748         * html/HTML5Lexer.h:
1749         (WebCore::HTML5Lexer::state):
1750         * html/HTML5Token.h:
1751         (WebCore::HTML5Token::attributes):
1752         (WebCore::HTML5Token::name):
1753         (WebCore::HTML5Token::characters):
1754         (WebCore::HTML5Token::comment):
1755         (WebCore::HTML5Token::publicIdentifier):
1756         (WebCore::HTML5Token::systemIdentifier):
1757         * html/HTML5TreeBuilder.cpp:
1758         (WebCore::convertToOldStyle):
1759         (WebCore::HTML5TreeBuilder::adjustedLexerState):
1760             - Technically, this might belong in the other patch, but I think
1761               it's fine here.
1762         (WebCore::HTML5TreeBuilder::passTokenToLegacyParser):
1763         * html/HTML5TreeBuilder.h:
1764
1765 2010-06-14  Dumitru Daniliuc  <dumi@chromium.org>
1766
1767         Unreviewed, build fix.
1768
1769         * WebCore.xcodeproj/project.pbxproj:
1770
1771 2010-06-14  Dimitri Glazkov  <dglazkov@chromium.org>
1772
1773         Unreviewed, build fix.
1774
1775         Remove accidental specifying of the class name twice.
1776
1777         * html/HTMLFormElement.cpp:
1778         (WebCore::HTMLFormElement::prepareFormData): Removed my ghastly typo.
1779
1780 2010-06-14  Dumitru Daniliuc  <dumi@chromium.org>
1781
1782         Reviewed by Adam Barth.
1783
1784         Get DatabaseTracker ready for sync DBs.
1785         https://bugs.webkit.org/show_bug.cgi?id=39041
1786
1787         * storage/AbstractDatabase.cpp:
1788         (WebCore::AbstractDatabase::~AbstractDatabase):
1789         * storage/AbstractDatabase.h:
1790         * storage/Database.cpp:
1791         (WebCore::Database::closeImmediately):
1792         * storage/Database.h:
1793         (WebCore::Database::scriptExecutionContext):
1794         * storage/DatabaseTracker.cpp:
1795         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
1796         (WebCore::DatabaseTracker::databaseChanged):
1797         (WebCore::DatabaseTracker::addOpenDatabase):
1798         (WebCore::DatabaseTracker::removeOpenDatabase):
1799         (WebCore::DatabaseTracker::getOpenDatabases):
1800         (WebCore::DatabaseTracker::deleteDatabaseFile):
1801         * storage/DatabaseTracker.h:
1802         * storage/OriginQuotaManager.cpp:
1803         (WebCore::OriginQuotaManager::markDatabase):
1804         * storage/OriginQuotaManager.h:
1805         * storage/chromium/DatabaseObserver.h:
1806         * storage/chromium/DatabaseTrackerChromium.cpp:
1807         (WebCore::DatabaseTracker::addOpenDatabase):
1808         (WebCore::TrackerRemoveOpenDatabaseTask::create):
1809         (WebCore::TrackerRemoveOpenDatabaseTask::TrackerRemoveOpenDatabaseTask):
1810         (WebCore::DatabaseTracker::removeOpenDatabase):
1811         (WebCore::DatabaseTracker::getOpenDatabases):
1812         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
1813
1814 2010-06-14  Alexey Proskuryakov  <ap@apple.com>
1815
1816         Reviewed by Darin Adler.
1817
1818         https://bugs.webkit.org/show_bug.cgi?id=40529
1819         eventSender.keyDown("delete") incorrectly sends a backspace on some platforms
1820
1821         * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1822         Use virtual key code to force correct character code for clarity. Also, reworded comment,
1823         since saying that "backspace needs to always be 8" misleadingly implied that it could
1824         "sometimes" be such without this code.
1825
1826 2010-06-14  Dimitri Glazkov  <dglazkov@chromium.org>
1827
1828         Reviewed by Darin Adler.
1829
1830         Refactor form submission code in HTMLFormElement to add clarity.
1831         https://bugs.webkit.org/show_bug.cgi?id=39430
1832
1833         Covered by existing tests in fast/forms/mailto.
1834
1835         * html/HTMLFormElement.cpp:
1836         (WebCore::appendMailtoPostFormDataToURL): Renamed from transferMailtoPostFormDataToUrl,
1837             removed clearing out of the FormData and moved it to a new place (next to the call site).
1838         (WebCore::HTMLFormElement::prepareFormData): Renamed from createFormData, moved the logic of
1839             prepareing FormData here, including the use of appendMailtoPostFormDataToURL.
1840         (WebCore::HTMLFormElement::submit): Consolidated multiple invocations of submitForm().
1841         * html/HTMLFormElement.h: Renamed createFormData to prepareFormData.
1842
1843 2010-06-14  Chris Fleizach  <cfleizach@apple.com>
1844
1845         Reviewed by Darin Adler.
1846
1847         AX: need ListItemRole and PresentationalRole
1848         https://bugs.webkit.org/show_bug.cgi?id=40133
1849
1850         * accessibility/AccessibilityObject.cpp:
1851         (WebCore::createARIARoleMap):
1852         * accessibility/AccessibilityObject.h:
1853         (WebCore::AccessibilityObject::isListItem):
1854         * accessibility/AccessibilityRenderObject.cpp:
1855         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1856         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1857         * accessibility/mac/AccessibilityObjectWrapper.mm:
1858         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1859
1860 2010-06-14  Anders Carlsson  <andersca@apple.com>
1861
1862         Reviewed by Sam Weinig.
1863
1864         Remove pluginIndex from MimeClassInfo
1865         https://bugs.webkit.org/show_bug.cgi?id=40588
1866
1867         * plugins/PluginData.h:
1868         * plugins/gtk/PluginDataGtk.cpp:
1869         (WebCore::PluginData::initPlugins):
1870         * plugins/mac/PluginDataMac.mm:
1871         (WebCore::PluginData::initPlugins):
1872         * plugins/qt/PluginDataQt.cpp:
1873         (WebCore::PluginData::initPlugins):
1874         * plugins/win/PluginDataWin.cpp:
1875         (WebCore::PluginData::initPlugins):
1876         * plugins/wx/PluginDataWx.cpp:
1877         (WebCore::PluginData::initPlugins):
1878
1879 2010-06-14  Kinuko Yasuda  <kinuko@chromium.org>
1880
1881         Reviewed by Jian Li.
1882
1883         Implement BlobBuilder internal class for BlobBuilder support as defined in FileWriter
1884         https://bugs.webkit.org/show_bug.cgi?id=36903
1885
1886         No new tests; they will be added when we add jsc bindings.
1887
1888         * CMakeLists.txt:
1889         * GNUmakefile.am:
1890         * WebCore.gypi:
1891         * WebCore.pro:
1892         * WebCore.vcproj/WebCore.vcproj:
1893         * WebCore.xcodeproj/project.pbxproj:
1894         * html/BlobBuilder.cpp: Added.
1895         * html/BlobBuilder.h: Added.
1896         (WebCore::BlobBuilder::create):
1897         * platform/BlobItem.cpp:
1898         (WebCore::StringBlobItem::convertToCString): Added EndingNative support.
1899         * platform/BlobItem.h: Added EndingNative line-ending type.
1900         (WebCore::):
1901
1902 2010-06-14  Anders Carlsson  <andersca@apple.com>
1903
1904         Reviewed by Darin Adler.
1905
1906         Stop using MimeClassInfo::pluginIndex
1907         https://bugs.webkit.org/show_bug.cgi?id=40582
1908
1909         Add a pluginIndicies vector to PluginData and use it instead of MimeClassInfo::pluginIndex.
1910
1911         * plugins/MimeType.cpp:
1912         (WebCore::MimeType::enabledPlugin):
1913         Get the plug-in index from the mimePluginIndices vector.
1914         
1915         * plugins/Plugin.cpp:
1916         (WebCore::Plugin::item):
1917         Compare the mime plugin index as well.
1918         
1919         * plugins/PluginData.cpp:
1920         (WebCore::PluginData::PluginData):
1921         Populate the m_mimePluginIndices vector.
1922
1923         (WebCore::PluginData::pluginNameForMimeType):
1924         Get the plug-in index from the m_mimePluginIndices vector.
1925
1926         * plugins/PluginData.h:
1927         (WebCore::operator==):
1928         Don't check for pluginIndex.
1929
1930         (WebCore::PluginData::mimePluginIndices):
1931         Add getter for m_mimePluginIndices.
1932
1933 2010-06-14  Sam Weinig  <sam@webkit.org>
1934
1935         Better build fix.
1936
1937         * bindings/js/JSBindingsAllInOne.cpp:
1938
1939 2010-06-14  Sam Weinig  <sam@webkit.org>
1940
1941         Another windows build fix.
1942
1943         * bindings/js/JSBindingsAllInOne.cpp:
1944
1945 2010-06-14  Sam Weinig  <sam@webkit.org>
1946
1947         Another build fix.
1948
1949         * bindings/js/JSDOMWindowCustom.cpp:
1950
1951 2010-06-14  Sam Weinig  <sam@webkit.org>
1952
1953         Add missing comma to fix GTK build.
1954
1955         * xml/XSLTProcessor.idl:
1956
1957 2010-06-14  Sam Weinig  <sam@webkit.org>
1958
1959         Reviewed by Alexey Proskuryakov.
1960
1961         Fix for https://bugs.webkit.org/show_bug.cgi?id=40581
1962         Auto-generate most of the JS constructors
1963
1964         - Auto-generates all the JS constructors that don't have custom
1965           names (eg, Not Image(), Audio() or Option())
1966         - Fixes two typos.
1967             (new XSLTConstructor()).toString() [object XSLTProcessorConsructor] -> [object XSLTProcessorConstructor])
1968             (new EventSource()).toString() [object EventSourceContructor] -> [object EventSourceConstructor])
1969
1970         * Android.jscbindings.mk:
1971         * CMakeLists.txt:
1972         * GNUmakefile.am:
1973         * WebCore.gypi:
1974         * WebCore.pro:
1975         * WebCore.vcproj/WebCore.vcproj:
1976         * WebCore.xcodeproj/project.pbxproj:
1977         * bindings/js/JSArrayBufferConstructor.cpp: Removed.
1978         * bindings/js/JSArrayBufferConstructor.h: Removed.
1979         * bindings/js/JSArrayBufferCustom.cpp: Copied from WebCore/bindings/js/JSArrayBufferConstructor.cpp.
1980         (WebCore::JSArrayBufferConstructor::constructJSArrayBuffer):
1981         * bindings/js/JSArrayBufferViewHelper.h:
1982         (WebCore::constructArrayBufferView):
1983         * bindings/js/JSBindingsAllInOne.cpp:
1984         * bindings/js/JSDOMWindowCustom.cpp:
1985         * bindings/js/JSEventSourceConstructor.cpp: Removed.
1986         * bindings/js/JSEventSourceConstructor.h: Removed.
1987         * bindings/js/JSEventSourceCustom.cpp: Copied from WebCore/bindings/js/JSEventSourceConstructor.cpp.
1988         (WebCore::JSEventSourceConstructor::constructJSEventSource):
1989         * bindings/js/JSFloat32ArrayConstructor.cpp: Removed.
1990         * bindings/js/JSFloat32ArrayConstructor.h: Removed.
1991         * bindings/js/JSFloat32ArrayCustom.cpp:
1992         (WebCore::JSFloat32ArrayConstructor::constructJSFloat32Array):
1993         * bindings/js/JSInt16ArrayConstructor.cpp: Removed.
1994         * bindings/js/JSInt16ArrayConstructor.h: Removed.
1995         * bindings/js/JSInt16ArrayCustom.cpp:
1996         (WebCore::JSInt16ArrayConstructor::constructJSInt16Array):
1997         * bindings/js/JSInt32ArrayConstructor.cpp: Removed.
1998         * bindings/js/JSInt32ArrayConstructor.h: Removed.
1999         * bindings/js/JSInt32ArrayCustom.cpp:
2000         (WebCore::JSInt32ArrayConstructor::constructJSInt32Array):
2001         * bindings/js/JSInt8ArrayConstructor.cpp: Removed.
2002         * bindings/js/JSInt8ArrayConstructor.h: Removed.
2003         * bindings/js/JSInt8ArrayCustom.cpp:
2004         (WebCore::JSInt8ArrayConstructor::constructJSInt8Array):
2005         * bindings/js/JSMessageChannelConstructor.cpp: Removed.
2006         * bindings/js/JSMessageChannelConstructor.h: Removed.
2007         * bindings/js/JSMessageChannelCustom.cpp:
2008         (WebCore::JSMessageChannelConstructor::constructJSMessageChannel):
2009         * bindings/js/JSSharedWorkerConstructor.cpp: Removed.
2010         * bindings/js/JSSharedWorkerConstructor.h: Removed.
2011         * bindings/js/JSSharedWorkerCustom.cpp:
2012         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
2013         * bindings/js/JSUint16ArrayConstructor.cpp: Removed.
2014         * bindings/js/JSUint16ArrayConstructor.h: Removed.
2015         * bindings/js/JSUint16ArrayCustom.cpp:
2016         (WebCore::JSUint16ArrayConstructor::constructJSUint16Array):
2017         * bindings/js/JSUint32ArrayConstructor.cpp: Removed.
2018         * bindings/js/JSUint32ArrayConstructor.h: Removed.
2019         * bindings/js/JSUint32ArrayCustom.cpp:
2020         (WebCore::JSUint32ArrayConstructor::constructJSUint32Array):
2021         * bindings/js/JSUint8ArrayConstructor.cpp: Removed.
2022         * bindings/js/JSUint8ArrayConstructor.h: Removed.
2023         * bindings/js/JSUint8ArrayCustom.cpp:
2024         (WebCore::JSUint8ArrayConstructor::constructJSUint8Array):
2025         * bindings/js/JSWebKitCSSMatrixConstructor.cpp: Removed.
2026         * bindings/js/JSWebKitCSSMatrixConstructor.h: Removed.
2027         * bindings/js/JSWebKitCSSMatrixCustom.cpp: Copied from WebCore/bindings/js/JSWebKitCSSMatrixConstructor.cpp.
2028         (WebCore::JSWebKitCSSMatrixConstructor::constructJSWebKitCSSMatrix):
2029         * bindings/js/JSWebKitPointConstructor.cpp: Removed.
2030         * bindings/js/JSWebKitPointConstructor.h: Removed.
2031         * bindings/js/JSWebKitPointCustom.cpp: Copied from WebCore/bindings/js/JSWebKitPointConstructor.cpp.
2032         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
2033         * bindings/js/JSWebSocketConstructor.cpp: Removed.
2034         * bindings/js/JSWebSocketConstructor.h: Removed.
2035         * bindings/js/JSWebSocketCustom.cpp:
2036         (WebCore::JSWebSocketConstructor::constructJSWebSocket):
2037         * bindings/js/JSWorkerConstructor.cpp: Removed.
2038         * bindings/js/JSWorkerConstructor.h: Removed.
2039         * bindings/js/JSWorkerContextCustom.cpp:
2040         * bindings/js/JSWorkerCustom.cpp:
2041         (WebCore::JSWorkerConstructor::constructJSWorker):
2042         * bindings/js/JSXSLTProcessorConstructor.cpp: Removed.
2043         * bindings/js/JSXSLTProcessorConstructor.h: Removed.
2044         * bindings/js/JSXSLTProcessorCustom.cpp:
2045         (WebCore::JSXSLTProcessorConstructor::constructJSXSLTProcessor):
2046         * bindings/scripts/CodeGeneratorJS.pm:
2047         * css/WebKitCSSMatrix.idl:
2048         * dom/MessageChannel.idl:
2049         * html/canvas/ArrayBuffer.idl:
2050         * html/canvas/Float32Array.idl:
2051         * html/canvas/Int16Array.idl:
2052         * html/canvas/Int32Array.idl:
2053         * html/canvas/Int8Array.idl:
2054         * html/canvas/Uint16Array.idl:
2055         * html/canvas/Uint32Array.idl:
2056         * html/canvas/Uint8Array.idl:
2057         * page/EventSource.idl:
2058         * page/WebKitPoint.idl:
2059         * websockets/WebSocket.idl:
2060         * workers/SharedWorker.idl:
2061         * workers/Worker.idl:
2062         * xml/XSLTProcessor.idl:
2063
2064 2010-05-16  Antonio Gomes  <tonikitoo@webkit.org>
2065
2066         Unreviewed naming fixes of local variables used in Spatial Navigation methods.
2067
2068         Summary:
2069             * "candidate" renamed to "node";
2070             * "currentFocusCandidate" renamed to "candidate"
2071             * "closestFocusCandidate" renamed to "closest"
2072
2073         That way naming is more consistent in the various Spatial Navigation methods.
2074
2075         * page/FocusController.cpp:
2076         (WebCore::FocusController::findFocusableNodeInDirection):
2077         (WebCore::FocusController::deepFindFocusableNodeInDirection):
2078
2079 2010-06-14  Antonio Gomes  <tonikitoo@webkit.org>
2080
2081         Reviewed by Simon Fraser and Kenneth Christiansen.
2082
2083         Spatial Navigation: make it work with focusable elements in overflow content
2084         https://bugs.webkit.org/show_bug.cgi?id=36463
2085
2086         This patch addresses the problem with Spatial Navigation. It currently does not
2087         properly traverse scrollable contents, including scrollable div's. For this to work,
2088         a new class member called scrollableEnclosingBox was introduced to FocusCandidate class which
2089         keeps track of the current scrollable box Node wrapping a FocusCandidate.
2090
2091         To make use of enclosingScrollableBox of FocusCandidate, the DOM traversal routine
2092         (FocusController::findNextFocusableInDirection) was changed as follows: when it
2093         encounters a scrollable Node, each focusable node which is 'inner' keeps track of
2094         the container reference. By the time a sibling of the scrollable Node is encountered,
2095         there is no need to track this reference any more and the traversal algorithm continues
2096         normally.
2097
2098         The common case is obviously that there is no scrollable container wrapping it.
2099
2100         updateFocusCandiditeIfCloser logic was also adapted to fit the need of the
2101         newly introduced enclosingScrollableBox class member, getting simpler and more
2102         easily maintainable.
2103
2104         Tests: fast/events/spatial-navigation/snav-div-scrollable-but-without-focusable-content.html
2105                fast/events/spatial-navigation/snav-clipped-overflow-content.html
2106
2107         * page/FocusController.cpp:
2108         (WebCore::updateFocusCandidateInSameContainer):
2109         (WebCore::updateFocusCandidateIfCloser):
2110         (WebCore::FocusController::findFocusableNodeInDirection):
2111         (WebCore::FocusController::deepFindFocusableNodeInDirection):
2112         * page/SpatialNavigation.cpp:
2113         (WebCore::isScrollableContainerNode):
2114         * page/SpatialNavigation.h:
2115         (WebCore::FocusCandidate::FocusCandidate):
2116         (WebCore::FocusCandidate::isInScrollableContainer):
2117
2118 2010-06-14  Jian Li  <jianli@chromium.org>
2119
2120         Unreviewed. Fix build break in GTK.
2121
2122         * bindings/scripts/CodeGeneratorGObject.pm:
2123         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
2124         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
2125         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
2126         * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h:
2127         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2128
2129 2010-06-14  Chris Fleizach  <cfleizach@apple.com>
2130
2131         Reviewed by Beth Dakin.
2132
2133         AX: AXUnknown objects are being returned
2134         https://bugs.webkit.org/show_bug.cgi?id=40574
2135
2136         Test: platform/mac/accessibility/no-unknown-objects-when-title-attribute-present.html
2137
2138         * accessibility/mac/AccessibilityObjectMac.mm:
2139         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2140
2141 2010-06-14  Jian Li  <jianli@chromium.org>
2142
2143         Reviewed by Darin Adler.
2144
2145         Fix code generators to better support Conditional attribute and add test
2146         coverage for it.
2147         https://bugs.webkit.org/show_bug.cgi?id=39512
2148
2149         * bindings/scripts/CodeGeneratorGObject.pm:
2150         * bindings/scripts/CodeGeneratorObjC.pm:
2151         * bindings/scripts/CodeGeneratorV8.pm:
2152         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2153         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
2154         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2155         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
2156         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2157         (webkit_dom_test_obj_get_conditional_attr1):
2158         (webkit_dom_test_obj_set_conditional_attr1):
2159         (webkit_dom_test_obj_get_conditional_attr2):
2160         (webkit_dom_test_obj_set_conditional_attr2):
2161         (webkit_dom_test_obj_get_conditional_attr3):
2162         (webkit_dom_test_obj_set_conditional_attr3):
2163         (webkit_dom_test_obj_set_property):
2164         (webkit_dom_test_obj_get_property):
2165         (webkit_dom_test_obj_class_init):
2166         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2167         * bindings/scripts/test/JS/JSTestInterface.cpp:
2168         * bindings/scripts/test/JS/JSTestInterface.h:
2169         * bindings/scripts/test/JS/JSTestObj.cpp:
2170         (WebCore::):
2171         (WebCore::jsTestObjConditionalAttr1):
2172         (WebCore::jsTestObjConditionalAttr2):
2173         (WebCore::jsTestObjConditionalAttr3):
2174         (WebCore::setJSTestObjConditionalAttr1):
2175         (WebCore::setJSTestObjConditionalAttr2):
2176         (WebCore::setJSTestObjConditionalAttr3):
2177         * bindings/scripts/test/JS/JSTestObj.h:
2178         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
2179         * bindings/scripts/test/ObjC/DOMTestObj.h:
2180         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2181         (-[DOMTestObj conditionalAttr1]):
2182         (-[DOMTestObj setConditionalAttr1:]):
2183         (-[DOMTestObj conditionalAttr2]):
2184         (-[DOMTestObj setConditionalAttr2:]):
2185         (-[DOMTestObj conditionalAttr3]):
2186         (-[DOMTestObj setConditionalAttr3:]):
2187         * bindings/scripts/test/TestInterface.idl:
2188         * bindings/scripts/test/TestObj.idl:
2189         * bindings/scripts/test/V8/V8TestInterface.cpp:
2190         * bindings/scripts/test/V8/V8TestInterface.h:
2191         * bindings/scripts/test/V8/V8TestObj.cpp:
2192         (WebCore::TestObjInternal::conditionalAttr1AttrGetter):
2193         (WebCore::TestObjInternal::conditionalAttr1AttrSetter):
2194         (WebCore::TestObjInternal::conditionalAttr2AttrGetter):
2195         (WebCore::TestObjInternal::conditionalAttr2AttrSetter):
2196         (WebCore::TestObjInternal::conditionalAttr3AttrGetter):
2197         (WebCore::TestObjInternal::conditionalAttr3AttrSetter):
2198         (WebCore::):
2199
2200 2010-06-14  Chang Shu  <chang.shu@nokia.com>
2201
2202         Reviewed by Kenneth Rohde Christiansen.
2203
2204         Change the type of ShadowSize from IntSize to FloatSize in GraphicsContext.
2205         Using IntSize loses precision and fails the test.
2206         Note: This code change fixes Qt port but Mac is still failing due to
2207         platform issue.
2208
2209         https://bugs.webkit.org/show_bug.cgi?id=40434
2210
2211         * html/canvas/CanvasRenderingContext2D.cpp:
2212         (WebCore::CanvasRenderingContext2D::applyShadow):
2213         * platform/graphics/GraphicsContext.cpp:
2214         (WebCore::GraphicsContext::setShadow):
2215         (WebCore::GraphicsContext::getShadow):
2216         * platform/graphics/GraphicsContext.h:
2217         * platform/graphics/GraphicsContextPrivate.h:
2218         * platform/graphics/cairo/FontCairo.cpp:
2219         (WebCore::Font::drawGlyphs):
2220         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2221         (WebCore::GraphicsContext::calculateShadowBufferDimensions):
2222         (WebCore::drawPathShadow):
2223         (WebCore::drawBorderlessRectShadow):
2224         (WebCore::GraphicsContext::setPlatformShadow):
2225         * platform/graphics/cairo/ImageCairo.cpp:
2226         (WebCore::BitmapImage::draw):
2227         * platform/graphics/cg/GraphicsContextCG.cpp:
2228         (WebCore::GraphicsContext::setPlatformShadow):
2229         * platform/graphics/chromium/FontChromiumWin.cpp:
2230         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
2231         (WebCore::Font::drawComplexText):
2232         * platform/graphics/gtk/FontGtk.cpp:
2233         (WebCore::Font::drawComplexText):
2234         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
2235         (WebCore::GraphicsContext::setPlatformShadow):
2236         * platform/graphics/mac/FontMac.mm:
2237         (WebCore::Font::drawGlyphs):
2238         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
2239         (WebCore::GraphicsContext::setPlatformShadow):
2240         * platform/graphics/qt/FontQt.cpp:
2241         (WebCore::drawTextCommon):
2242         * platform/graphics/qt/GraphicsContextQt.cpp:
2243         (WebCore::GraphicsContext::drawRect):
2244         (WebCore::GraphicsContext::drawLine):
2245         (WebCore::GraphicsContext::strokeArc):
2246         (WebCore::GraphicsContext::drawConvexPolygon):
2247         (WebCore::drawFilledShadowPath):
2248         (WebCore::GraphicsContext::strokePath):
2249         (WebCore::drawBorderlessRectShadow):
2250         (WebCore::GraphicsContext::setPlatformShadow):
2251         * platform/graphics/qt/ImageQt.cpp:
2252         (WebCore::BitmapImage::draw):
2253         * platform/graphics/skia/GraphicsContextSkia.cpp:
2254         (WebCore::GraphicsContext::setPlatformShadow):
2255         * platform/graphics/skia/SkiaFontWin.cpp:
2256         (WebCore::windowsCanHandleDrawTextShadow):
2257         * platform/graphics/win/FontCGWin.cpp:
2258         (WebCore::drawGDIGlyphs):
2259         (WebCore::Font::drawGlyphs):
2260         * platform/graphics/wince/GraphicsContextWince.cpp:
2261         (WebCore::GraphicsContext::fillRoundedRect):
2262         (WebCore::GraphicsContext::setPlatformShadow):
2263         (WebCore::GraphicsContext::drawText):
2264         * platform/graphics/wx/GraphicsContextWx.cpp:
2265         (WebCore::GraphicsContext::setPlatformShadow):
2266
2267 2010-06-14  Dan Bernstein  <mitz@apple.com>
2268
2269         Reviewed by Simon Fraser.
2270
2271         <rdar://problem/7752961> Unevenly distributed space in justified text
2272         https://bugs.webkit.org/show_bug.cgi?id=36105
2273
2274         Test: fast/text/justify-padding-distribution.html
2275
2276         * platform/graphics/WidthIterator.cpp:
2277         (WebCore::WidthIterator::WidthIterator): Initialize m_padPerSpace to the quotient of the total
2278         padding and the number of spaces rather than truncating it.
2279         (WebCore::WidthIterator::advance): Subtract m_padPerSpace from m_padding and add the difference
2280         between its old and new values, when rounded, to the advance.
2281         * platform/graphics/mac/ComplexTextController.cpp:
2282         (WebCore::ComplexTextController::ComplexTextController):
2283         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2284         * platform/graphics/win/UniscribeController.cpp:
2285         (WebCore::UniscribeController::UniscribeController):
2286         (WebCore::UniscribeController::shapeAndPlaceItem):
2287         * platform/graphics/win/UniscribeController.h:
2288
2289 2010-06-14  Andreas Kling  <andreas.kling@nokia.com>
2290
2291         Reviewed by Tor Arne Vestbø.
2292
2293         [Qt] Stack overflow when converting navigator object to QVariant
2294         https://bugs.webkit.org/show_bug.cgi?id=40572
2295
2296         Protect against infinite recursion in JSValue->QVariant conversion.
2297         This fixes a crash when trying to convert MimeType objects (they
2298         recurse infinitely and on-the-fly via the enabledPlugin property.)
2299
2300         * bridge/qt/qt_runtime.cpp:
2301         (JSC::Bindings::convertValueToQVariant):
2302
2303 2010-06-14  Yong Li  <yoli@rim.com>
2304
2305         Test cases created by: Robin Cao <robin.cao@torchmobile.com.cn>
2306
2307         Reviewed by Darin Adler.
2308
2309         https://bugs.webkit.org/show_bug.cgi?id=38910
2310
2311         Suspend Document::m_executeScriptSoonTimer objects when the page is deferred.
2312         There's no reason why we suspend all active DOM timers on the page but not suspend
2313         this one. Document::m_executeScriptSoonTimer can run JS and schedule more DOM Timers.
2314
2315         It can only be tested manually.
2316         * manual-tests/load-deferrer-script-element.html: Added.
2317         * manual-tests/resources/load-deferrer-script-element.js: Added.
2318
2319         * dom/Document.cpp:
2320         (WebCore::Document::executeScriptSoon):
2321         (WebCore::Document::suspendExecuteScriptSoonTimer): Added.
2322         (WebCore::Document::resumeExecuteScriptSoonTimer): Added.
2323         * dom/Document.h:
2324         * page/PageGroupLoadDeferrer.cpp:
2325         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
2326         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2327
2328 2010-06-13  Yael Aharon  <yael.aharon@nokia.com>
2329
2330         Reviewed by Kenneth Rohde Christiansen.
2331
2332         [Qt] Platform plugin support for Notifications UI
2333         https://bugs.webkit.org/show_bug.cgi?id=40005
2334
2335         To avoid race condition when GC is run during shutdown,
2336         disconnect the Notification from the NotificationPresenter
2337         when the presenter deletes itself.
2338         This cannot be tested by a layout test, the race condition happens only
2339         when GC is run during shutdown. It can be tested manually by loading
2340         manually any notification test and closing the browser.
2341
2342         * notifications/Notification.cpp:
2343         (WebCore::Notification::~Notification):
2344         * notifications/Notification.h:
2345         (WebCore::Notification::detachPresenter):
2346
2347 2010-06-08  Marcus Bulach  <bulach@chromium.org>
2348
2349         Reviewed by Jeremy Orlow.
2350
2351         Adds IndexedDB's KeyRange.
2352         https://bugs.webkit.org/show_bug.cgi?id=40250
2353
2354         Test: storage/indexeddb/idb-keyrange.html
2355
2356         * Android.derived.jscbindings.mk:
2357         * Android.derived.v8bindings.mk:
2358         * Android.mk:
2359         * CMakeLists.txt:
2360         * DerivedSources.cpp:
2361         * DerivedSources.make:
2362         * GNUmakefile.am:
2363         * WebCore.gypi:
2364         * WebCore.pri:
2365         * WebCore.pro:
2366         * WebCore.vcproj/WebCore.vcproj:
2367         * WebCore.xcodeproj/project.pbxproj:
2368         * storage/IDBKeyRange.cpp: Added.
2369         (WebCore::IDBKeyRange::IDBKeyRange):
2370         * storage/IDBKeyRange.h: Added.
2371         (WebCore::IDBKeyRange::):
2372         (WebCore::IDBKeyRange::create):
2373         (WebCore::IDBKeyRange::~IDBKeyRange):
2374         (WebCore::IDBKeyRange::left):
2375         (WebCore::IDBKeyRange::right):
2376         (WebCore::IDBKeyRange::flags):
2377         * storage/IDBKeyRange.idl: Added.
2378         * storage/IndexedDatabaseRequest.cpp:
2379         (WebCore::IndexedDatabaseRequest::makeSingleKeyRange):
2380         (WebCore::IndexedDatabaseRequest::makeLeftBoundKeyRange):
2381         (WebCore::IndexedDatabaseRequest::makeRightBoundKeyRange):
2382         (WebCore::IndexedDatabaseRequest::makeBoundKeyRange):
2383         * storage/IndexedDatabaseRequest.h:
2384         * storage/IndexedDatabaseRequest.idl:
2385
2386 2010-06-14  Jeremy Orlow  <jorlow@chromium.org>
2387
2388         And another.
2389
2390         * storage/IndexedDatabaseRequest.h:
2391
2392 2010-06-14  Jeremy Orlow  <jorlow@chromium.org>
2393
2394         More build fixes.
2395
2396         * storage/IndexedDatabaseRequest.h:
2397
2398 2010-06-14  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
2399
2400         Reviewed by Laszlo Gombos.
2401
2402         [Qt] navigator.geolocation support for Qt port
2403         https://bugs.webkit.org/show_bug.cgi?id=39724
2404
2405         Implemetion for Qt port of navigator.gelocation. Using qtmobility location service.
2406
2407         * WebCore.pri:
2408         * WebCore.pro:
2409         * platform/qt/GeolocationServiceQt.cpp: Added.
2410         (WebCore::GeolocationServiceQt::create):
2411         (WebCore::GeolocationServiceQt::GeolocationServiceQt):
2412         (WebCore::GeolocationServiceQt::~GeolocationServiceQt):
2413         (WebCore::GeolocationServiceQt::positionUpdated):
2414         (WebCore::GeolocationServiceQt::startUpdating):
2415         (WebCore::GeolocationServiceQt::stopUpdating):
2416         * platform/qt/GeolocationServiceQt.h: Added.
2417         (WebCore::GeolocationServiceQt::lastPosition):
2418         (WebCore::GeolocationServiceQt::lastError):
2419
2420 2010-06-14  Jeremy Orlow  <jorlow@chromium.org>
2421
2422         2 more build fixes.
2423
2424         * storage/IDBDatabaseImpl.h:
2425         * storage/IndexedDatabaseRequest.h:
2426
2427 2010-06-14  Jeremy Orlow  <jorlow@chromium.org>
2428
2429         Unreviewed build fix for my last.
2430
2431         * workers/WorkerScriptLoaderClient.h:
2432
2433 2010-06-14  Jeremy Orlow  <jorlow@chromium.org>
2434
2435         Reviewed by Darin Fisher.
2436
2437         [V8] Clean up SerializedScriptValue
2438         https://bugs.webkit.org/show_bug.cgi?id=40482
2439
2440         SerializedScriptValue doesn't follow WebKit's style guidelines very well
2441         and needlessly inlines quite a bit within the .h file. This change cleans
2442         things up. No funcitonal changes.
2443
2444         No change in behavior.
2445
2446         * bindings/v8/SerializedScriptValue.cpp:
2447         (WebCore::SerializedScriptValue::deserializeAndSetProperty):
2448         (WebCore::SerializedScriptValue::create):
2449         (WebCore::SerializedScriptValue::createFromWire):
2450         (WebCore::SerializedScriptValue::release):
2451         (WebCore::SerializedScriptValue::SerializedScriptValue):
2452         * bindings/v8/SerializedScriptValue.h:
2453
2454 2010-06-14  Ilya Tikhonovsky  <loislo@chromium.org>
2455
2456         Reviewed by Pavel Feldman.
2457
2458         WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
2459         data from inspected page to WebInspector as JSON string via http. The native
2460         serialization to JSON string is supported by InspectorValue's classes. This patch
2461         has the implementation of sendMessageToFrontend function. WebKit version of it still
2462         uses ScriptFunctionCall and will be switched to another transport a little bit later.
2463         https://bugs.webkit.org/show_bug.cgi?id=40134
2464
2465         * inspector/InspectorClient.h:
2466         * inspector/InspectorController.cpp:
2467         (WebCore::InspectorController::connectFrontend):
2468         (WebCore::InspectorController::disconnectFrontend):
2469         * inspector/InspectorController.h:
2470         * inspector/InspectorFrontend.cpp:
2471         (WebCore::InspectorFrontend::InspectorFrontend):
2472         * inspector/InspectorFrontend.h:
2473         * inspector/InspectorFrontendClientLocal.cpp:
2474         (WebCore::InspectorFrontendClientLocal::frontendLoaded):
2475         * inspector/InspectorValues.cpp:
2476         (WebCore::InspectorObject::writeJSON):
2477         * inspector/front-end/inspector.js:
2478         (WebInspector.dispatchMessageToFrontend):
2479         * loader/EmptyClients.h:
2480         (WebCore::EmptyInspectorClient::sendMessageToFrontend):
2481
2482 2010-06-14  Jeremy Orlow  <jorlow@chromium.org>
2483
2484         Reviewed by Darin Adler.
2485
2486         Reenable IDBDatabaseRequest's description attribute
2487         https://bugs.webkit.org/show_bug.cgi?id=39826
2488
2489         On the 26th, Beth commented out the description attribute in
2490         IDBDatabaseRequest because it was causing problems with the
2491         objective c bindings.  Turns out that this is the same bug as
2492         in http://trac.webkit.org/changeset/19486.  (Thanks for the
2493         pointer, Mark!)
2494  
2495         The solution is to change the objective C bindings generator
2496         to change the name in the generated code.  id and hash both
2497         just appended "Name" to them in the past.  I couldn't think
2498         of anything else particularly better to append, so I just
2499         went with name as well.
2500
2501         Test: building the world works on the first try.  Layout
2502               test verifies description works again.
2503
2504         * bindings/scripts/CodeGeneratorObjC.pm:
2505         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2506         (webkit_dom_test_obj_get_description):
2507         (webkit_dom_test_obj_get_id):
2508         (webkit_dom_test_obj_set_id):
2509         (webkit_dom_test_obj_get_hash):
2510         (webkit_dom_test_obj_set_property):
2511         (webkit_dom_test_obj_get_property):
2512         (webkit_dom_test_obj_class_init):
2513         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2514         * bindings/scripts/test/JS/JSTestObj.cpp:
2515         (WebCore::):
2516         (WebCore::jsTestObjDescription):
2517         (WebCore::jsTestObjId):
2518         (WebCore::jsTestObjHash):
2519         (WebCore::setJSTestObjId):
2520         * bindings/scripts/test/JS/JSTestObj.h:
2521         * bindings/scripts/test/ObjC/DOMTestObj.h:
2522         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2523         (-[DOMTestObj descriptionName]):
2524         (-[DOMTestObj idName]):
2525         (-[DOMTestObj setIdName:]):
2526         (-[DOMTestObj hashName]):
2527         * bindings/scripts/test/TestObj.idl:
2528         * bindings/scripts/test/V8/V8TestObj.cpp:
2529         (WebCore::TestObjInternal::descriptionAttrGetter):
2530         (WebCore::TestObjInternal::idAttrGetter):
2531         (WebCore::TestObjInternal::idAttrSetter):
2532         (WebCore::TestObjInternal::hashAttrGetter):
2533         (WebCore::):
2534         * storage/IDBDatabaseRequest.idl:
2535
2536 2010-06-13  Anders Bakken  <agbakken@gmail.com>
2537
2538         Reviewed by Eric Seidel.
2539
2540         [Qt] ScreenQt.cpp has coding-style errors
2541         https://bugs.webkit.org/show_bug.cgi?id=39766
2542
2543         * platform/qt/ScreenQt.cpp:
2544
2545 2010-06-13  Eric Seidel  <eric@webkit.org>
2546
2547         Reviewed by Adam Barth.
2548
2549         Rename HTMLParser to LegacyHTMLTreeConstructor
2550         https://bugs.webkit.org/show_bug.cgi?id=40554
2551
2552         This makes our old HTML parsing system closer match the
2553         HTML5 spec, and thus easier to compare to the new HTML5
2554         parsing system.
2555
2556         This rename was entirely automatic.  Done by do-webcore-rename.
2557
2558         * Android.mk:
2559         * CMakeLists.txt:
2560         * GNUmakefile.am:
2561         * WebCore.gypi:
2562         * WebCore.pro:
2563         * WebCore.vcproj/WebCore.vcproj:
2564         * WebCore.xcodeproj/project.pbxproj:
2565         * dom/Document.cpp:
2566         * dom/DocumentParser.h:
2567         (WebCore::DocumentParser::htmlTreeConstructor):
2568         * html/HTML5DocumentParser.cpp:
2569         (WebCore::HTML5DocumentParser::htmlTreeConstructor):
2570         * html/HTML5DocumentParser.h:
2571         * html/HTML5TreeBuilder.cpp:
2572         (WebCore::HTML5TreeBuilder::HTML5TreeBuilder):
2573         * html/HTML5TreeBuilder.h:
2574         (WebCore::HTML5TreeBuilder::legacyTreeConstructor):
2575         * html/HTMLDocumentParser.cpp:
2576         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2577         * html/HTMLDocumentParser.h:
2578         (WebCore::HTMLDocumentParser::htmlTreeConstructor):
2579         * html/HTMLFormControlElement.cpp:
2580         (WebCore::HTMLFormControlElement::removedFromTree):
2581         * html/HTMLInputElement.cpp:
2582         * html/HTMLMeterElement.cpp:
2583         * html/HTMLProgressElement.cpp:
2584         * html/LegacyHTMLTreeConstructor.cpp: Renamed from WebCore/html/HTMLParser.cpp.
2585         (WebCore::addTags):
2586         (WebCore::HTMLStackElem::HTMLStackElem):
2587         (WebCore::HTMLStackElem::derefNode):
2588         (WebCore::LegacyHTMLTreeConstructor::LegacyHTMLTreeConstructor):
2589         (WebCore::LegacyHTMLTreeConstructor::~LegacyHTMLTreeConstructor):
2590         (WebCore::LegacyHTMLTreeConstructor::reset):
2591         (WebCore::LegacyHTMLTreeConstructor::setCurrent):
2592         (WebCore::tagPriorityOfNode):
2593         (WebCore::LegacyHTMLTreeConstructor::limitDepth):
2594         (WebCore::LegacyHTMLTreeConstructor::insertNodeAfterLimitDepth):
2595         (WebCore::LegacyHTMLTreeConstructor::parseToken):
2596         (WebCore::LegacyHTMLTreeConstructor::parseDoctypeToken):
2597         (WebCore::isTableSection):
2598         (WebCore::isTablePart):
2599         (WebCore::isTableRelated):
2600         (WebCore::isScopingTag):
2601         (WebCore::LegacyHTMLTreeConstructor::insertNode):
2602         (WebCore::LegacyHTMLTreeConstructor::handleError):
2603         (WebCore::LegacyHTMLTreeConstructor::textCreateErrorCheck):
2604         (WebCore::LegacyHTMLTreeConstructor::commentCreateErrorCheck):
2605         (WebCore::LegacyHTMLTreeConstructor::headCreateErrorCheck):
2606         (WebCore::LegacyHTMLTreeConstructor::bodyCreateErrorCheck):
2607         (WebCore::LegacyHTMLTreeConstructor::framesetCreateErrorCheck):
2608         (WebCore::LegacyHTMLTreeConstructor::formCreateErrorCheck):
2609         (WebCore::LegacyHTMLTreeConstructor::isindexCreateErrorCheck):
2610         (WebCore::LegacyHTMLTreeConstructor::selectCreateErrorCheck):
2611         (WebCore::LegacyHTMLTreeConstructor::ddCreateErrorCheck):
2612         (WebCore::LegacyHTMLTreeConstructor::dtCreateErrorCheck):
2613         (WebCore::LegacyHTMLTreeConstructor::rpCreateErrorCheck):
2614         (WebCore::LegacyHTMLTreeConstructor::rtCreateErrorCheck):
2615         (WebCore::LegacyHTMLTreeConstructor::nestedCreateErrorCheck):
2616         (WebCore::LegacyHTMLTreeConstructor::nestedPCloserCreateErrorCheck):
2617         (WebCore::LegacyHTMLTreeConstructor::nestedStyleCreateErrorCheck):
2618         (WebCore::LegacyHTMLTreeConstructor::tableCellCreateErrorCheck):
2619         (WebCore::LegacyHTMLTreeConstructor::tableSectionCreateErrorCheck):
2620         (WebCore::LegacyHTMLTreeConstructor::noembedCreateErrorCheck):
2621         (WebCore::LegacyHTMLTreeConstructor::noframesCreateErrorCheck):
2622         (WebCore::LegacyHTMLTreeConstructor::noscriptCreateErrorCheck):
2623         (WebCore::LegacyHTMLTreeConstructor::pCloserCreateErrorCheck):
2624         (WebCore::LegacyHTMLTreeConstructor::pCloserStrictCreateErrorCheck):
2625         (WebCore::LegacyHTMLTreeConstructor::mapCreateErrorCheck):
2626         (WebCore::mapTagToFunc):
2627         (WebCore::mapTagsToFunc):
2628         (WebCore::LegacyHTMLTreeConstructor::getNode):
2629         (WebCore::LegacyHTMLTreeConstructor::allowNestedRedundantTag):
2630         (WebCore::LegacyHTMLTreeConstructor::processCloseTag):
2631         (WebCore::LegacyHTMLTreeConstructor::isHeadingTag):
2632         (WebCore::LegacyHTMLTreeConstructor::isInline):
2633         (WebCore::LegacyHTMLTreeConstructor::isResidualStyleTag):
2634         (WebCore::LegacyHTMLTreeConstructor::isAffectedByResidualStyle):
2635         (WebCore::LegacyHTMLTreeConstructor::handleResidualStyleCloseTagAcrossBlocks):
2636         (WebCore::LegacyHTMLTreeConstructor::reopenResidualStyleTags):
2637         (WebCore::LegacyHTMLTreeConstructor::pushBlock):
2638         (WebCore::LegacyHTMLTreeConstructor::popBlock):
2639         (WebCore::LegacyHTMLTreeConstructor::popOneBlockCommon):
2640         (WebCore::LegacyHTMLTreeConstructor::popOneBlock):
2641         (WebCore::LegacyHTMLTreeConstructor::moveOneBlockToStack):
2642         (WebCore::LegacyHTMLTreeConstructor::checkIfHasPElementInScope):
2643         (WebCore::LegacyHTMLTreeConstructor::popInlineBlocks):
2644         (WebCore::LegacyHTMLTreeConstructor::freeBlock):
2645         (WebCore::LegacyHTMLTreeConstructor::createHead):
2646         (WebCore::LegacyHTMLTreeConstructor::handleIsindex):
2647         (WebCore::LegacyHTMLTreeConstructor::startBody):
2648         (WebCore::LegacyHTMLTreeConstructor::finished):
2649         (WebCore::LegacyHTMLTreeConstructor::reportErrorToConsole):
2650         (WebCore::shouldCreateImplicitHead):
2651         (WebCore::serializeForNumberType):
2652         (WebCore::parseToDoubleForNumberType):
2653         * html/LegacyHTMLTreeConstructor.h: Renamed from WebCore/html/HTMLParser.h.
2654         (WebCore::LegacyHTMLTreeConstructor::skipMode):
2655         (WebCore::LegacyHTMLTreeConstructor::isHandlingResidualStyleAcrossBlocks):
2656         (WebCore::LegacyHTMLTreeConstructor::setSkipMode):
2657         (WebCore::LegacyHTMLTreeConstructor::popBlock):
2658         (WebCore::LegacyHTMLTreeConstructor::hasPElementInScope):
2659         (WebCore::LegacyHTMLTreeConstructor::reportError):
2660         (WebCore::LegacyHTMLTreeConstructor::):
2661         (WebCore::shouldCreateImplicitHead):
2662         * html/StepRange.cpp:
2663         * html/ValidityState.cpp:
2664         * rendering/RenderSlider.cpp:
2665
2666 2010-06-13  Eric Seidel  <eric@webkit.org>
2667
2668         Reviewed by Darin Adler.
2669
2670         Rename m_parser, htmlParser() to m_treeConstructor, htmlTreeConstructor() in preparation for renaming HTMLParser
2671         https://bugs.webkit.org/show_bug.cgi?id=40514
2672
2673         This rename was done by hand.  I realize now I should have
2674         renamed HTMLParser to HTMLTreeConstructor before renaming HTMLTokenizer.
2675
2676         No functional changes, thus no tests.
2677
2678         * dom/DocumentParser.h:
2679         (WebCore::DocumentParser::htmlTreeConstructor):
2680         * html/HTML5DocumentParser.cpp:
2681         (WebCore::HTML5DocumentParser::HTML5DocumentParser):
2682         (WebCore::HTML5DocumentParser::pumpLexerIfPossible):
2683         (WebCore::HTML5DocumentParser::pumpLexer):
2684         (WebCore::HTML5DocumentParser::end):
2685         (WebCore::HTML5DocumentParser::htmlTreeConstructor):
2686         (WebCore::HTML5DocumentParser::isWaitingForScripts):
2687         (WebCore::HTML5DocumentParser::resumeParsingAfterScriptExecution):
2688         (WebCore::HTML5DocumentParser::notifyFinished):
2689         (WebCore::HTML5DocumentParser::executeScriptsWaitingForStylesheets):
2690         * html/HTML5DocumentParser.h:
2691         * html/HTML5TreeBuilder.cpp:
2692         (WebCore::HTML5TreeBuilder::HTML5TreeBuilder):
2693         (WebCore::HTML5TreeBuilder::passTokenToLegacyParser):
2694         (WebCore::HTML5TreeBuilder::finished):
2695         * html/HTML5TreeBuilder.h:
2696         (WebCore::HTML5TreeBuilder::legacyTreeConstructor):
2697         * html/HTMLDocumentParser.cpp:
2698         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2699         (WebCore::HTMLDocumentParser::scriptHandler):
2700         (WebCore::HTMLDocumentParser::parseTag):
2701         (WebCore::HTMLDocumentParser::end):
2702         (WebCore::HTMLDocumentParser::processToken):
2703         (WebCore::HTMLDocumentParser::processDoctypeToken):
2704         * html/HTMLDocumentParser.h:
2705         (WebCore::HTMLDocumentParser::htmlTreeConstructor):
2706         * html/HTMLFormControlElement.cpp:
2707         (WebCore::HTMLFormControlElement::removedFromTree):
2708
2709 2010-06-13  Eric Seidel  <eric@webkit.org>
2710
2711         Reviewed by Darin Adler.
2712
2713         Rename tok, asHTMLTokenizer to parser, asHTMLDocumentParser
2714         https://bugs.webkit.org/show_bug.cgi?id=40513
2715
2716         Last set of Tokenizer related renames, also done via do-webcore-rename:
2717         asHTMLTokenizer => asHTMLDocumentParser
2718         tok => parser
2719
2720         No functional changes, thus no tests.
2721
2722         * dom/Document.cpp:
2723         (WebCore::Document::write):
2724         * dom/DocumentParser.h:
2725         (WebCore::DocumentParser::asHTMLDocumentParser):
2726         * html/HTMLDocumentParser.cpp:
2727         (WebCore::parseHTMLDocumentFragment):
2728         * html/HTMLDocumentParser.h:
2729         (WebCore::HTMLDocumentParser::asHTMLDocumentParser):
2730         * loader/DocumentLoader.cpp:
2731         (WebCore::DocumentLoader::isLoadingInAPISense):
2732
2733 2010-06-13  Eric Seidel  <eric@webkit.org>
2734
2735         Reviewed by Darin Adler.
2736
2737         Fix the rest of the references to the old Tokenizer class (now DocumentParser)
2738         https://bugs.webkit.org/show_bug.cgi?id=40512
2739
2740         No functional changes, thus no new tests.
2741         This was mostly done by do-webcore-rename:
2742         tokenizer => parser
2743         m_tokenizer => m_parser
2744         createTextTokenizer => createTextDocumentParser
2745         createTokenizer => createParser
2746         getTokenizer => getParser
2747
2748         However had to be careful to avoid renaming things related to
2749         css/tokenizer.flex (which we should later rename to CSSTokenizer.flex)
2750
2751         Still a couple references with "tok" and "asHTMLTokenizer" which I'll
2752         get in the next patch.
2753
2754         * accessibility/AccessibilityRenderObject.cpp:
2755         (WebCore::AccessibilityRenderObject::isLoaded):
2756         * bindings/v8/ScriptEventListener.cpp:
2757         (WebCore::createAttributeEventListener):
2758         * dom/Document.cpp:
2759         (WebCore::Document::removedLastRef):
2760         (WebCore::Document::~Document):
2761         (WebCore::Document::createParser):
2762         (WebCore::Document::open):
2763         (WebCore::Document::cancelParsing):
2764         (WebCore::Document::implicitOpen):
2765         (WebCore::Document::implicitClose):
2766         (WebCore::Document::write):
2767         (WebCore::Document::finishParsing):
2768         (WebCore::Document::removePendingSheet):
2769         * dom/Document.h:
2770         (WebCore::Document::parser):
2771         * dom/DocumentParser.h:
2772         * dom/ViewportArguments.cpp:
2773         (WebCore::reportViewportWarning):
2774         * dom/XMLDocumentParserLibxml2.cpp:
2775         (WebCore::PendingCallbacks::callAndRemoveFirstCallback):
2776         (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
2777         (WebCore::PendingCallbacks::PendingEndElementNSCallback::call):
2778         (WebCore::PendingCallbacks::PendingCharactersCallback::call):
2779         (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::call):
2780         (WebCore::PendingCallbacks::PendingCDATABlockCallback::call):
2781         (WebCore::PendingCallbacks::PendingCommentCallback::call):
2782         (WebCore::PendingCallbacks::PendingInternalSubsetCallback::call):
2783         (WebCore::PendingCallbacks::):
2784         (WebCore::getParser):
2785         (WebCore::startElementNsHandler):
2786         (WebCore::endElementNsHandler):
2787         (WebCore::charactersHandler):
2788         (WebCore::processingInstructionHandler):
2789         (WebCore::cdataBlockHandler):
2790         (WebCore::commentHandler):
2791         (WebCore::warningHandler):
2792         (WebCore::fatalErrorHandler):
2793         (WebCore::normalErrorHandler):
2794         (WebCore::getEntityHandler):
2795         (WebCore::startDocumentHandler):
2796         (WebCore::endDocumentHandler):
2797         (WebCore::internalSubsetHandler):
2798         (WebCore::externalSubsetHandler):
2799         (WebCore::parseXMLDocumentFragment):
2800         * dom/XMLDocumentParserQt.cpp:
2801         (WebCore::parseXMLDocumentFragment):
2802         * html/HTML5EntityParser.cpp:
2803         * html/HTMLDocument.cpp:
2804         (WebCore::HTMLDocument::createParser):
2805         * html/HTMLDocument.h:
2806         * html/HTMLDocumentParser.cpp:
2807         (WebCore::HTMLDocumentParser::write):
2808         (WebCore::HTMLDocumentParser::stopParsing):
2809         * html/HTMLFormControlElement.cpp:
2810         (WebCore::HTMLFormControlElement::removedFromTree):
2811         * html/HTMLParser.cpp:
2812         (WebCore::HTMLParser::finished):
2813         (WebCore::HTMLParser::reportErrorToConsole):
2814         * html/HTMLViewSourceDocument.cpp:
2815         (WebCore::HTMLViewSourceDocument::createParser):
2816         (WebCore::HTMLViewSourceDocument::addLine):
2817         * html/HTMLViewSourceDocument.h:
2818         * loader/DocumentLoader.cpp:
2819         (WebCore::DocumentLoader::isLoadingInAPISense):
2820         * loader/DocumentWriter.cpp:
2821         (WebCore::DocumentWriter::begin):
2822         (WebCore::DocumentWriter::addData):
2823         * loader/FTPDirectoryDocument.cpp:
2824         (WebCore::FTPDirectoryDocument::createParser):
2825         * loader/FTPDirectoryDocument.h:
2826         * loader/FrameLoader.cpp:
2827         (WebCore::FrameLoader::stopLoading):
2828         (WebCore::FrameLoader::stop):
2829         * loader/ImageDocument.cpp:
2830         (WebCore::ImageDocument::createParser):
2831         * loader/ImageDocument.h:
2832         * loader/MediaDocument.cpp:
2833         (WebCore::MediaDocument::createParser):
2834         * loader/MediaDocument.h:
2835         * loader/PluginDocument.cpp:
2836         (WebCore::PluginDocument::createParser):
2837         * loader/PluginDocument.h:
2838         * loader/SinkDocument.cpp:
2839         (WebCore::SinkDocument::createParser):
2840         * loader/SinkDocument.h:
2841         * loader/TextDocument.cpp:
2842         (WebCore::TextDocument::createParser):
2843         (WebCore::createTextDocumentParser):
2844         * loader/TextDocument.h:
2845         * svg/SVGDocumentExtensions.cpp:
2846         (WebCore::SVGDocumentExtensions::reportWarning):
2847         (WebCore::SVGDocumentExtensions::reportError):
2848         * wml/WMLDocument.cpp:
2849         (WebCore::WMLDocument::finishedParsing):
2850         * wml/WMLErrorHandling.cpp:
2851         (WebCore::reportWMLError):
2852         * wml/WMLTemplateElement.cpp:
2853         (WebCore::WMLTemplateElement::registerTemplatesInDocument):
2854
2855 2010-06-13  Chris Fleizach  <cfleizach@apple.com>
2856
2857         Reviewed by Darin Adler.
2858
2859         AX: link won't return linked element if URL contains #
2860         https://bugs.webkit.org/show_bug.cgi?id=40192
2861
2862         Test: platform/mac/accessibility/internal-link-when-document-has-fragment.html
2863
2864         * accessibility/AccessibilityRenderObject.cpp:
2865         (WebCore::AccessibilityRenderObject::internalLinkElement):
2866
2867 2010-06-13  Sam Weinig  <sam@webkit.org>
2868
2869         Try and fix the chrome build.
2870
2871         * bindings/scripts/CodeGeneratorV8.pm:
2872         * xml/XMLHttpRequest.idl:
2873
2874 2010-06-13  Sam Weinig  <sam@webkit.org>
2875
2876         Reviewed by Anders Carlsson.
2877
2878         Fix for https://bugs.webkit.org/show_bug.cgi?id=40550
2879         XMLHttpRequest constructor object should expose the constants from the IDL.
2880
2881         Test: fast/dom/XMLHttpRequest-constants.html
2882
2883         * Android.jscbindings.mk:
2884         * CMakeLists.txt:
2885         * GNUmakefile.am:
2886         * WebCore.gypi:
2887         * WebCore.pro:
2888         * WebCore.vcproj/WebCore.vcproj:
2889         * WebCore.xcodeproj/project.pbxproj:
2890         * bindings/js/JSBindingsAllInOne.cpp:
2891         * bindings/js/JSDOMWindowCustom.cpp:
2892         * bindings/js/JSWorkerContextCustom.cpp:
2893         * bindings/js/JSXMLHttpRequestConstructor.cpp: Removed.
2894         * bindings/js/JSXMLHttpRequestConstructor.h: Removed.
2895         * bindings/js/JSXMLHttpRequestCustom.cpp:
2896         (WebCore::JSXMLHttpRequestConstructor::constructJSXMLHttpRequest):
2897         * bindings/scripts/CodeGeneratorJS.pm:
2898         * xml/XMLHttpRequest.idl:
2899
2900 2010-06-13  Simon Fraser  <simon.fraser@apple.com>
2901
2902         Reviewed by Dan Bernstein.
2903
2904         -webkit-transition font-size and font-family
2905         https://bugs.webkit.org/show_bug.cgi?id=33429
2906         
2907         When animating font-size, update the font with a saved
2908         version of the font selector to ensure that we don't clobber
2909         the font family.        
2910
2911         Test: transitions/font-family-during-transition.html
2912
2913         * rendering/style/RenderStyle.cpp:
2914         (WebCore::RenderStyle::setBlendedFontSize):
2915
2916 2010-06-13  Tony Chang  <tony@chromium.org>
2917
2918         Build fix, not reviewed.
2919
2920         fix chromium compile after r61094 (id attribute refactor)
2921         https://bugs.webkit.org/show_bug.cgi?id=40553
2922
2923         * bindings/v8/custom/V8NamedNodesCollection.cpp:
2924         (WebCore::V8NamedNodesCollection::itemWithName):
2925
2926 2010-06-13  Darin Adler  <darin@apple.com>
2927
2928         Reviewed by Alexey Proskuryakov.
2929
2930         Partly done support for alternate ID attributes should be removed
2931         https://bugs.webkit.org/show_bug.cgi?id=39692
2932
2933         Removed the include of "HTMLNames.h" from "Element.h". This prevents
2934         near-world-rebuilds every time you change HTMLTagNames.in.
2935
2936         Renamed the getIDAttribute function in the Element class to
2937         idForStyleResolution, since it returns a value of the id attribute
2938         that has been lowercased as appropriate for style matching, not the
2939         actual value of the attribute. With the old name it was easy to
2940         misuse it in non-style contexts.
2941
2942         Got rid of the idAttributeName function on Element, since it is
2943         easy to use it wrong. Replace it with isIdAttributeName, getIdAttribute,
2944         and setIdAttribute functions, which are a good fit for the needs of
2945         most call sites that were dealing with the id attribute.
2946
2947         Added an idAttributeName function to Document. This is for a future
2948         where a document can have a custom id attribute name specified in its
2949         doctype. It's possible this will be insufficient because the same
2950         document might have XHTML or SVG elements in it, and it's possible
2951         that on those elements we will want the attribute named "id" with
2952         no namespace to still work. We can deal with that when we implement
2953         the actual feature, though. For now, it seems OK to fetch the name
2954         of the id attribute from the document.
2955
2956         * dom/DynamicNodeList.cpp:
2957         (WebCore::DynamicNodeList::itemWithName):
2958         * dom/StaticNodeList.cpp:
2959         (WebCore::StaticNodeList::itemWithName):
2960         * rendering/RenderSVGResourceContainer.h:
2961         (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
2962         (WebCore::RenderSVGResourceContainer::idChanged):
2963         * svg/SVGUseElement.cpp:
2964         (WebCore::SVGUseElement::handleDeepUseReferencing):
2965         * svg/animation/SMILTimeContainer.cpp:
2966         (WebCore::SMILTimeContainer::updateAnimations):
2967         Use the new idForStyleResolution function, which is the new name of
2968         the getIDAttribute function. There's a good chance these call sites are
2969         incorrect, which is something we should investigate later, so there's
2970         a FIXME at each call site.
2971
2972         * dom/Document.cpp:
2973         (WebCore::Document::Document): Initialize m_idAttributeName to the
2974         standard id attribute from HTML.
2975         (WebCore::Document::getElementById): Use Element::getIdAttribute.
2976         * dom/Document.h: Added Document::idAttributeName.
2977
2978         * dom/Element.cpp:
2979         (WebCore::Element::setAttribute): Use Document::idAttributeName.
2980         (WebCore::Element::setAttributeMap): Use Element::isIdAttributeName.
2981         (WebCore::Element::insertedIntoDocument): Use Document::idAttributeName.
2982         (WebCore::Element::removedFromDocument): Ditto.
2983         (WebCore::Element::formatForDebugger): Use Element::getIdAttribute.
2984         * dom/Element.h: Added isIdAttributeName, getIdAttribute, setIdAttribute,
2985         idForStyleResolution. Removed rareIDAttributeName.
2986
2987         * dom/ElementRareData.h: Removed m_idAttributeName.
2988
2989         * dom/NamedNodeMap.cpp:
2990         (WebCore::NamedNodeMap::setAttributes): Use Document::idAttributeName.
2991         * dom/NamedNodeMap.h: Renamed id, setID, and m_id to idForStyleResolution,
2992         setIdForStyleResolution, and m_idForStyleResolution since this is not the
2993         value of the id attribute because it gets lowercased for compatibility-mode
2994         documents.
2995
2996         * rendering/RenderIFrame.cpp:
2997         * rendering/RenderLayerCompositor.cpp:
2998         * rendering/RenderProgress.cpp:
2999         Added include of HTMLNames.h now that Element.h no longer includes it.
3000
3001         * editing/SetNodeAttributeCommand.h:
3002         * editing/markup.cpp:
3003         * html/HTMLParser.cpp:
3004         Removed unneeded includes.
3005
3006         * html/HTMLParser.h: Sorted includes.
3007
3008         * css/CSSStyleSelector.cpp:
3009         (WebCore::CSSStyleSelector::matchRules): Use idForStyleResolution.
3010         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Use idForStyleResolution.
3011         * dom/Attr.cpp:
3012         (WebCore::Attr::isId): Use Document::idAttributeName.
3013         * dom/StyledElement.cpp:
3014         (WebCore::StyledElement::parseMappedAttribute): Use isIdAttributeName,
3015         and setIdForStyleResolution.
3016         * editing/DeleteButtonController.cpp:
3017         (WebCore::DeleteButtonController::createDeletionUI): Use setIdAttribute.
3018         * editing/EditorCommand.cpp:
3019         (WebCore::executeInsertHorizontalRule): Ditto.
3020         * html/HTMLAppletElement.cpp:
3021         (WebCore::HTMLAppletElement::parseMappedAttribute): Use isIdAttributeName.
3022         (WebCore::HTMLAppletElement::createRenderer): Use getIdAttribute.
3023         * html/HTMLCollection.cpp:
3024         (WebCore::HTMLCollection::checkForNameMatch): Use getIdAttribute.
3025         (WebCore::HTMLCollection::updateNameCache): Use getIdAttribute.
3026         * html/HTMLDataGridColElement.cpp:
3027         (WebCore::HTMLDataGridColElement::ensureColumn): Use getIdAttribute.
3028         (WebCore::HTMLDataGridColElement::parseMappedAttribute): Use isIdAttributeName.
3029         * html/HTMLElement.cpp:
3030         (WebCore::HTMLElement::parseMappedAttribute): Use isIdAttributeName.
3031         * html/HTMLFormCollection.cpp:
3032         (WebCore::HTMLFormCollection::nextNamedItem): Added missing braces.
3033         (WebCore::HTMLFormCollection::updateNameCache): Use getIdAttribute.
3034         * html/HTMLFrameElementBase.cpp:
3035         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Use isIdAttributeName.
3036         (WebCore::HTMLFrameElementBase::setName): Use getIdAttribute.
3037         * html/HTMLImageElement.cpp:
3038         (WebCore::HTMLImageElement::parseMappedAttribute): Use isIdAttributeName.
3039         * html/HTMLMapElement.cpp:
3040         (WebCore::HTMLMapElement::parseMappedAttribute): Use isIdAttributeName.
3041         Also restructured the function a bit to make its structure clearer and added
3042         a comment pointing out that it can't be quite right.
3043         * html/HTMLNameCollection.cpp:
3044         (WebCore::HTMLNameCollection::itemAfter): Use getIdAttribute.
3045         * html/HTMLObjectElement.cpp:
3046         (WebCore::HTMLObjectElement::parseMappedAttribute): Use isIdAttributeName.
3047         * html/HTMLParamElement.cpp:
3048         (WebCore::HTMLParamElement::parseMappedAttribute): Use isIdAttributeName.
3049         * loader/CachedFont.cpp:
3050         (WebCore::CachedFont::getSVGFontById): Use getIdAttribute.
3051         * rendering/RenderLayerBacking.cpp:
3052         (WebCore::RenderLayerBacking::nameForLayer): Use getIdAttribute.
3053         * rendering/SVGRenderTreeAsText.cpp:
3054         (WebCore::writeSVGPaintingResource): Use getIdAttribute.
3055         (WebCore::writeSVGResourceContainer): Ditto.
3056         * svg/SVGElement.cpp:
3057         (WebCore::SVGElement::insertedIntoDocument): Use getIdAttribute.
3058         * svg/SVGStyledElement.cpp:
3059         (WebCore::SVGStyledElement::isKnownAttribute): Use isIdAttributeName.
3060         (WebCore::SVGStyledElement::svgAttributeChanged): Use isIdAttributeName.
3061         * wml/WMLElement.cpp:
3062         (WebCore::WMLElement::parseMappedAttribute): Use isIdAttributeName.
3063
3064 2010-06-13  Dan Bernstein  <mitz@apple.com>
3065
3066         Reviewed by Darin Adler.
3067
3068         <rdar://problem/8087385> REGRESSION (r60974): Continuous wheel scrolling is too fast in list boxes and in Safari Reader
3069         https://bugs.webkit.org/show_bug.cgi?id=40537
3070
3071         * platform/mac/WheelEventMac.mm:
3072         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Only multiply by pixelsPerLineStep() if the
3073         event is not continuous, as was before r56012.
3074
3075 2010-06-13  Andras Becsi  <abecsi@webkit.org>
3076
3077         Reviewed by Darin Adler.
3078
3079         Centralize the gperf code generation commands into make-hash-tools.pl
3080         to avoid redundancy across multiple build systems.
3081         Do this in preparation of refactoring the usage of these generated
3082         sources to fix the debug linking error on Linux with gcc >= 4.4.0.
3083
3084         webkit.org/b/29244
3085
3086         No functionality change, so no new tests needed.
3087
3088         * DerivedSources.make:
3089         * GNUmakefile.am:
3090         * WebCore.gyp/WebCore.gyp:
3091         * WebCore.gyp/scripts/rule_gperf.py: Removed.
3092         * WebCore.pri:
3093         * WebCore.xcodeproj/project.pbxproj:
3094         * css/CSSParser.cpp:
3095         (WebCore::cssPropertyID):
3096         (WebCore::cssValueKeywordID):
3097         * css/makeprop.pl:
3098         * css/makevalues.pl:
3099         * html/DocTypeStrings.gperf:
3100         * html/HTML5EntityParser.cpp:
3101         * html/HTMLDocumentParser.cpp:
3102         * html/HTMLEntityNames.gperf:
3103         * html/PreloadScanner.cpp:
3104         * make-hash-tools.pl: Added.
3105         * platform/ColorData.gperf:
3106         * platform/graphics/Color.cpp:
3107
3108 2010-06-13  Noam Rosenthal  <noam.rosenthal@nokia.com>
3109
3110         Reviewed by Kenneth Rohde Christiansen.
3111
3112         [Qt] tests/hybridPixmap fails
3113         https://bugs.webkit.org/show_bug.cgi?id=37316
3114
3115         The problem was that JSC::Instance::createRuntimeObject was never called.
3116         This is fixed by overloading newRuntimeObject and calling Instance::createRuntimeObject
3117         in between, instead of creating the runtime object directly inside the static function
3118         QtPixmapInstance::createRuntimeObject, which had to be renamed as to not overshadow the virtual function.
3119
3120         This fixes an existing test, tests/hybridPixmap
3121
3122         * bridge/qt/qt_pixmapruntime.cpp:
3123         (JSC::Bindings::QtPixmapInstance::newRuntimeObject):
3124         (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject):
3125         * bridge/qt/qt_pixmapruntime.h:
3126         * bridge/qt/qt_runtime.cpp:
3127         (JSC::Bindings::convertQVariantToValue):
3128
3129 2010-06-13  Noam Rosenthal  <noam.rosenthal@nokia.com>
3130
3131         Reviewed by Darin Adler.
3132
3133         GraphicsContext3D.h in the Qt port includes too many unnecessary files
3134         https://bugs.webkit.org/show_bug.cgi?id=40536
3135
3136         Removed unncessary includes.
3137
3138         No new tests; Compilation improvement.
3139
3140         * platform/graphics/GraphicsContext3D.h:
3141         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3142
3143 2010-06-13  Noam Rosenthal  <noam.rosenthal@nokia.com>
3144
3145         Reviewed by Eric Seidel.
3146
3147         [Qt] GraphicsLayer: recaching images creates an unnecessary deep copy
3148         https://bugs.webkit.org/show_bug.cgi?id=40535
3149
3150         Made sure the painter ends its operation before copying the pixmap.
3151
3152         No new tests: this is an optimization.
3153
3154         * platform/graphics/qt/GraphicsLayerQt.cpp:
3155         (WebCore::GraphicsLayerQtImpl::recache):
3156
3157 2010-06-13  Clemmitt Sigler  <cmsigler@gmail.com>
3158
3159         Reviewed by Eric Seidel.
3160
3161         Patch to fix missing references to RenderMathMLRoot,
3162         RenderMathMLSquareRoot when building GtkLauncher.
3163         https://bugs.webkit.org/show_bug.cgi?id=40326
3164
3165         No change in functionality so no new tests.
3166
3167         * GNUmakefile.am:
3168
3169 2010-06-12  Brian Weinstein  <bweinstein@apple.com>
3170
3171         Reviewed by Dan Bernstein.
3172         
3173         https://bugs.webkit.org/show_bug.cgi?id=40538
3174         
3175         Some machines have started to see the return of the dreaded: WebCore.lib : fatal error LNK1106: invalid 
3176         file or disk full. Since we don't have the hotfix for VS2005, work around this in the meantime
3177         by creating an EditingAllInOne file, that includes all of the cpp files in the editing subdirectory.
3178         
3179         * WebCore.vcproj/WebCore.vcproj: Prevnt the editing cpp from building, so we only compile EditingAllInOne.
3180         * editing/EditingAllInOne.cpp: Added. Includes all of the editing cpp files.
3181
3182 2010-06-12  Sheriff Bot  <webkit.review.bot@gmail.com>
3183
3184         Unreviewed, rolling out r61031.
3185         http://trac.webkit.org/changeset/61031
3186         https://bugs.webkit.org/show_bug.cgi?id=40539
3187
3188         Crashes Dromaeo jslib test in Release Chromium (Requested by
3189         dimich_ on #webkit).
3190
3191         * bindings/v8/V8Binding.cpp:
3192         (WebCore::v8ExternalString):
3193         * bindings/v8/V8Binding.h:
3194
3195 2010-06-12  Eric Seidel  <eric@webkit.org>
3196
3197         Reviewed by Adam Barth.
3198
3199         Rename the last few *Tokenizer classes (which don't have their own files) to *DocumentParser
3200         https://bugs.webkit.org/show_bug.cgi?id=40508
3201
3202         This was a very simple do-webcore-rename-generated patch.
3203
3204         PluginTokenizer => PluginDocumentParser
3205         TextTokenizer => TextDocumentParser
3206         SinkTokenizer => SinkDocumentParser
3207         MediaTokenizer => MediaDocumentParser
3208         FTPDirectoryTokenizer => FTPDirectoryDocumentParser
3209
3210         No functional changes, thus no tests.
3211
3212         * html/HTMLViewSourceDocument.cpp:
3213         (WebCore::HTMLViewSourceDocument::createTokenizer):
3214         * html/HTMLViewSourceDocument.h:
3215         * loader/FTPDirectoryDocument.cpp:
3216         (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
3217         (WebCore::FTPDirectoryDocumentParser::appendEntry):
3218         (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
3219         (WebCore::FTPDirectoryDocumentParser::parseAndAppendOneLine):
3220         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
3221         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
3222         (WebCore::FTPDirectoryDocumentParser::write):
3223         (WebCore::FTPDirectoryDocumentParser::finish):
3224         (WebCore::FTPDirectoryDocument::createTokenizer):
3225         * loader/MediaDocument.cpp:
3226         (WebCore::MediaDocumentParser::MediaDocumentParser):
3227         (WebCore::MediaDocumentParser::write):
3228         (WebCore::MediaDocumentParser::createDocumentStructure):
3229         (WebCore::MediaDocumentParser::writeRawData):
3230         (WebCore::MediaDocumentParser::finish):
3231         (WebCore::MediaDocumentParser::isWaitingForScripts):
3232         (WebCore::MediaDocument::createTokenizer):
3233         * loader/PluginDocument.cpp:
3234         (WebCore::PluginDocumentParser::PluginDocumentParser):
3235         (WebCore::PluginDocumentParser::pluginWidgetFromDocument):
3236         (WebCore::PluginDocumentParser::write):
3237         (WebCore::PluginDocumentParser::createDocumentStructure):
3238         (WebCore::PluginDocumentParser::writeRawData):
3239         (WebCore::PluginDocumentParser::finish):
3240         (WebCore::PluginDocumentParser::isWaitingForScripts):
3241         (WebCore::PluginDocument::createTokenizer):
3242         (WebCore::PluginDocument::pluginWidget):
3243         * loader/SinkDocument.cpp:
3244         (WebCore::SinkDocumentParser::SinkDocumentParser):
3245         (WebCore::SinkDocumentParser::finish):
3246         (WebCore::SinkDocument::createTokenizer):
3247         * loader/TextDocument.cpp:
3248         (WebCore::TextDocumentParser::TextDocumentParser):
3249         (WebCore::TextDocumentParser::~TextDocumentParser):
3250         (WebCore::TextDocumentParser::write):
3251         (WebCore::TextDocumentParser::finish):
3252         (WebCore::TextDocumentParser::isWaitingForScripts):
3253         (WebCore::TextDocument::createTokenizer):
3254         (WebCore::createTextTokenizer):
3255
3256 2010-06-12  Anders Bakken  <agbakken@gmail.com>
3257
3258         Reviewed by Eric Seidel.
3259
3260         [Qt] EventHandlerQt.cpp has coding-style errors
3261         https://bugs.webkit.org/show_bug.cgi?id=40259
3262
3263         Coding style change only.
3264
3265         * page/qt/EventHandlerQt.cpp:
3266         (WebCore::EventHandler::eventActivatedView):
3267
3268 2010-06-12  Kwang Yul Seo  <skyul@company100.net>
3269
3270         Reviewed by Darin Adler.
3271
3272         Unify fileSystemRepresentation and filenameFromString
3273         https://bugs.webkit.org/show_bug.cgi?id=40201
3274
3275         Remove filenameFromString and use fileSystemRepresentation instead
3276         as they do the same job.
3277
3278         * platform/FileSystem.cpp: Removed.
3279         * platform/FileSystem.h:
3280         * platform/efl/FileSystemEfl.cpp:
3281         (WebCore::fileSystemRepresentation):
3282         * platform/gtk/FileChooserGtk.cpp:
3283         (WebCore::FileChooser::basenameForWidth):
3284         * platform/gtk/FileSystemGtk.cpp:
3285         (WebCore::fileSystemRepresentation):
3286         (WebCore::filenameForDisplay):
3287         (WebCore::fileExists):
3288         (WebCore::deleteFile):
3289         (WebCore::deleteEmptyDirectory):
3290         (WebCore::getFileSize):
3291         (WebCore::getFileModificationTime):
3292         (WebCore::makeAllDirectories):
3293         (WebCore::pathGetFileName):
3294         (WebCore::directoryName):
3295         (WebCore::listDirectory):
3296         * platform/gtk/SharedBufferGtk.cpp:
3297         (WebCore::SharedBuffer::createWithContentsOfFile):
3298         * platform/network/soup/ResourceHandleSoup.cpp:
3299         (WebCore::startHttp):
3300         * platform/posix/SharedBufferPOSIX.cpp:
3301         (WebCore::SharedBuffer::createWithContentsOfFile):
3302
3303 2010-06-12  Patrick Gansterer  <paroga@paroga.com>
3304
3305         Reviewed by Eric Seidel.
3306
3307         [Haiku] Cleanup SharedBuffer::createWithContentsOfFile
3308         https://bugs.webkit.org/show_bug.cgi?id=39003
3309
3310         * platform/haiku/SharedBufferHaiku.cpp:
3311         (WebCore::SharedBuffer::createWithContentsOfFile):
3312
3313 2010-06-12  Anders Bakken  <agbakken@gmail.com>
3314
3315         Reviewed by Eric Seidel.
3316
3317         [Qt] WheelEventQt.cpp has coding-style errors
3318         https://bugs.webkit.org/show_bug.cgi?id=39760
3319
3320         * platform/qt/WheelEventQt.cpp:
3321         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3322
3323 2010-06-12  Kwang Yul Seo  <skyul@company100.net>
3324
3325         Reviewed by Kent Tamura.
3326
3327         [BREWMP] Don't include POSIX headers in WebCorePrefix.h
3328         https://bugs.webkit.org/show_bug.cgi?id=39411
3329
3330         When building for BREW MP, don't include POSIX headers:
3331         <fcntl.h>, <pthread.h> and <sys/types.h>.
3332
3333         * WebCorePrefix.h:
3334
3335 2010-06-11  Eric Seidel  <eric@webkit.org>
3336
3337         Reviewed by Adam Barth.
3338
3339         Rename the rest of the *Tokenizer classes to *DocumentParser
3340         https://bugs.webkit.org/show_bug.cgi?id=40507
3341
3342         This search/replace was done by do-webcore-rename.
3343         Just looking for a rubber stamp.
3344         
3345         XMLTokenizer => XMLDocumentParser
3346         XMLTokenizerLibxml2 => XMLDocumentParserLibxml2
3347         XMLTokenizerQt => XMLDocumentParserQt
3348         XMLTokenizerScope => XMLDocumentParserScope
3349         HTML5Tokenizer => HTML5DocumentParser
3350         HTMLTokenizer => HTMLDocumentParser
3351
3352         No functional change, thus no tests.
3353
3354         * Android.mk:
3355         * CMakeLists.txt:
3356         * GNUmakefile.am:
3357         * WebCore.gypi:
3358         * WebCore.pro:
3359         * WebCore.vcproj/WebCore.vcproj:
3360         * WebCore.xcodeproj/project.pbxproj:
3361         * css/CSSStyleSheet.cpp:
3362         (WebCore::CSSStyleSheet::checkLoaded):
3363         * dom/Document.cpp:
3364         (WebCore::Document::createTokenizer):
3365         (WebCore::Document::write):
3366         * dom/Document.h:
3367         (WebCore::Document::setXMLEncoding):
3368         * dom/DocumentParser.h:
3369         (WebCore::DocumentParser::asHTMLTokenizer):
3370         * dom/Element.cpp:
3371         * dom/ProcessingInstruction.cpp:
3372         * dom/XMLDocumentParser.cpp: Added.
3373         (WebCore::XMLDocumentParser::isWMLDocument):
3374         (WebCore::XMLDocumentParser::pushCurrentNode):
3375         (WebCore::XMLDocumentParser::popCurrentNode):
3376         (WebCore::XMLDocumentParser::clearCurrentNodeStack):
3377         (WebCore::XMLDocumentParser::write):
3378         (WebCore::XMLDocumentParser::handleError):
3379         (WebCore::XMLDocumentParser::enterText):
3380         (WebCore::toString):
3381         (WebCore::XMLDocumentParser::exitText):
3382         (WebCore::XMLDocumentParser::end):
3383         (WebCore::XMLDocumentParser::finish):
3384         (WebCore::createXHTMLParserErrorHeader):
3385         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
3386         (WebCore::XMLDocumentParser::notifyFinished):
3387         (WebCore::XMLDocumentParser::isWaitingForScripts):
3388         (WebCore::XMLDocumentParser::pauseParsing):
3389         * dom/XMLDocumentParser.h: Added.
3390         (WebCore::XMLParserContext::context):
3391         (WebCore::XMLParserContext::XMLParserContext):
3392         (WebCore::XMLDocumentParser::):
3393         (WebCore::XMLDocumentParser::setIsXHTMLDocument):
3394         (WebCore::XMLDocumentParser::isXHTMLDocument):
3395         (WebCore::XMLDocumentParser::setIsXHTMLMPDocument):
3396         (WebCore::XMLDocumentParser::isXHTMLMPDocument):
3397         (WebCore::XMLDocumentParser::wellFormed):
3398         (WebCore::XMLDocumentParser::context):
3399         * dom/XMLDocumentParserLibxml2.cpp: Added.
3400         (WebCore::PendingCallbacks::~PendingCallbacks):
3401         (WebCore::PendingCallbacks::appendStartElementNSCallback):
3402         (WebCore::PendingCallbacks::appendEndElementNSCallback):
3403         (WebCore::PendingCallbacks::appendCharactersCallback):
3404         (WebCore::PendingCallbacks::appendProcessingInstructionCallback):
3405         (WebCore::PendingCallbacks::appendCDATABlockCallback):
3406         (WebCore::PendingCallbacks::appendCommentCallback):
3407         (WebCore::PendingCallbacks::appendInternalSubsetCallback):
3408         (WebCore::PendingCallbacks::appendErrorCallback):
3409         (WebCore::PendingCallbacks::callAndRemoveFirstCallback):
3410         (WebCore::PendingCallbacks::isEmpty):
3411         (WebCore::PendingCallbacks::PendingCallback::~PendingCallback):
3412         (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
3413         (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
3414         (WebCore::PendingCallbacks::PendingEndElementNSCallback::call):
3415         (WebCore::PendingCallbacks::PendingCharactersCallback::~PendingCharactersCallback):
3416         (WebCore::PendingCallbacks::PendingCharactersCallback::call):
3417         (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::~PendingProcessingInstructionCallback):
3418         (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::call):
3419         (WebCore::PendingCallbacks::PendingCDATABlockCallback::~PendingCDATABlockCallback):
3420         (WebCore::PendingCallbacks::PendingCDATABlockCallback::call):
3421         (WebCore::PendingCallbacks::PendingCommentCallback::~PendingCommentCallback):
3422         (WebCore::PendingCallbacks::PendingCommentCallback::call):
3423         (WebCore::PendingCallbacks::PendingInternalSubsetCallback::~PendingInternalSubsetCallback):
3424         (WebCore::PendingCallbacks::PendingInternalSubsetCallback::call):
3425         (WebCore::PendingCallbacks::):
3426         (WebCore::matchFunc):
3427         (WebCore::OffsetBuffer::OffsetBuffer):
3428         (WebCore::OffsetBuffer::readOutBytes):
3429         (WebCore::shouldAllowExternalLoad):
3430         (WebCore::openFunc):
3431         (WebCore::readFunc):
3432         (WebCore::writeFunc):
3433         (WebCore::closeFunc):
3434         (WebCore::errorFunc):
3435         (WebCore::XMLParserContext::createStringParser):
3436         (WebCore::XMLParserContext::createMemoryParser):
3437         (WebCore::XMLDocumentParser::XMLDocumentParser):
3438         (WebCore::XMLParserContext::~XMLParserContext):
3439         (WebCore::XMLDocumentParser::~XMLDocumentParser):
3440         (WebCore::XMLDocumentParser::doWrite):
3441         (WebCore::toString):
3442         (WebCore::handleElementNamespaces):
3443         (WebCore::handleElementAttributes):
3444         (WebCore::XMLDocumentParser::startElementNs):
3445         (WebCore::XMLDocumentParser::endElementNs):
3446         (WebCore::XMLDocumentParser::characters):
3447         (WebCore::XMLDocumentParser::error):
3448         (WebCore::XMLDocumentParser::processingInstruction):
3449         (WebCore::XMLDocumentParser::cdataBlock):
3450         (WebCore::XMLDocumentParser::comment):
3451         (WebCore::XMLDocumentParser::startDocument):
3452         (WebCore::XMLDocumentParser::endDocument):
3453         (WebCore::XMLDocumentParser::internalSubset):
3454         (WebCore::getTokenizer):
3455         (WebCore::hackAroundLibXMLEntityBug):
3456         (WebCore::startElementNsHandler):
3457         (WebCore::endElementNsHandler):
3458         (WebCore::charactersHandler):
3459         (WebCore::processingInstructionHandler):
3460         (WebCore::cdataBlockHandler):
3461         (WebCore::commentHandler):
3462         (WebCore::warningHandler):
3463         (WebCore::fatalErrorHandler):
3464         (WebCore::normalErrorHandler):
3465         (WebCore::):
3466         (WebCore::sharedXHTMLEntity):
3467         (WebCore::getXHTMLEntity):
3468         (WebCore::getEntityHandler):
3469         (WebCore::startDocumentHandler):
3470         (WebCore::endDocumentHandler):
3471         (WebCore::internalSubsetHandler):
3472         (WebCore::externalSubsetHandler):
3473         (WebCore::ignorableWhitespaceHandler):
3474         (WebCore::XMLDocumentParser::initializeParserContext):
3475         (WebCore::XMLDocumentParser::doEnd):
3476         (WebCore::xmlDocPtrForString):
3477         (WebCore::XMLDocumentParser::lineNumber):
3478         (WebCore::XMLDocumentParser::columnNumber):
3479         (WebCore::XMLDocumentParser::stopParsing):
3480         (WebCore::XMLDocumentParser::resumeParsing):
3481         (WebCore::parseXMLDocumentFragment):
3482         (WebCore::attributesStartElementNsHandler):
3483         (WebCore::parseAttributes):
3484         * dom/XMLDocumentParserQt.cpp: Added.
3485         (WebCore::EntityResolver::resolveUndeclaredEntity):
3486         (WebCore::XMLDocumentParser::XMLDocumentParser):
3487         (WebCore::XMLDocumentParser::~XMLDocumentParser):
3488         (WebCore::XMLDocumentParser::doWrite):
3489         (WebCore::XMLDocumentParser::initializeParserContext):
3490         (WebCore::XMLDocumentParser::doEnd):
3491         (WebCore::XMLDocumentParser::lineNumber):
3492         (WebCore::XMLDocumentParser::columnNumber):
3493         (WebCore::XMLDocumentParser::stopParsing):
3494         (WebCore::XMLDocumentParser::resumeParsing):
3495         (WebCore::parseXMLDocumentFragment):
3496         (WebCore::attributesStartElementNsHandler):
3497         (WebCore::parseAttributes):
3498         (WebCore::prefixFromQName):
3499         (WebCore::handleElementNamespaces):
3500         (WebCore::handleElementAttributes):
3501         (WebCore::XMLDocumentParser::parse):
3502         (WebCore::XMLDocumentParser::startDocument):
3503         (WebCore::XMLDocumentParser::parseStartElement):
3504         (WebCore::XMLDocumentParser::parseEndElement):
3505         (WebCore::XMLDocumentParser::parseCharacters):
3506         (WebCore::XMLDocumentParser::parseProcessingInstruction):
3507         (WebCore::XMLDocumentParser::parseCdata):
3508         (WebCore::XMLDocumentParser::parseComment):
3509         (WebCore::XMLDocumentParser::endDocument):
3510         (WebCore::XMLDocumentParser::hasError):
3511         (WebCore::XMLDocumentParser::parseDtd):
3512         * dom/XMLDocumentParserScope.cpp: Added.
3513         (WebCore::XMLDocumentParserScope::XMLDocumentParserScope):
3514         (WebCore::XMLDocumentParserScope::~XMLDocumentParserScope):
3515         * dom/XMLDocumentParserScope.h: Added.
3516         * dom/XMLTokenizer.cpp: Removed.
3517         * dom/XMLTokenizer.h: Removed.
3518         * dom/XMLTokenizerLibxml2.cpp: Removed.
3519         * dom/XMLTokenizerQt.cpp: Removed.
3520         * dom/XMLTokenizerScope.cpp: Removed.
3521         * dom/XMLTokenizerScope.h: Removed.
3522         * html/HTML5DocumentParser.cpp: Added.
3523         (WebCore::):
3524         (WebCore::HTML5DocumentParser::HTML5DocumentParser):
3525         (WebCore::HTML5DocumentParser::~HTML5DocumentParser):
3526         (WebCore::HTML5DocumentParser::begin):
3527         (WebCore::HTML5DocumentParser::pumpLexerIfPossible):
3528         (WebCore::HTML5DocumentParser::pumpLexer):
3529         (WebCore::HTML5DocumentParser::write):
3530         (WebCore::HTML5DocumentParser::end):
3531         (WebCore::HTML5DocumentParser::attemptToEnd):
3532         (WebCore::HTML5DocumentParser::endIfDelayed):
3533         (WebCore::HTML5DocumentParser::finish):
3534         (WebCore::HTML5DocumentParser::executingScript):
3535         (WebCore::HTML5DocumentParser::lineNumber):
3536         (WebCore::HTML5DocumentParser::columnNumber):
3537         (WebCore::HTML5DocumentParser::htmlParser):
3538         (WebCore::HTML5DocumentParser::isWaitingForScripts):
3539         (WebCore::HTML5DocumentParser::resumeParsingAfterScriptExecution):
3540         (WebCore::HTML5DocumentParser::watchForLoad):
3541         (WebCore::HTML5DocumentParser::stopWatchingForLoad):
3542         (WebCore::HTML5DocumentParser::shouldLoadExternalScriptFromSrc):
3543         (WebCore::HTML5DocumentParser::executeScript):
3544         (WebCore::HTML5DocumentParser::notifyFinished):
3545         (WebCore::HTML5DocumentParser::executeScriptsWaitingForStylesheets):
3546         (WebCore::HTML5DocumentParser::script):
3547         * html/HTML5DocumentParser.h: Added.
3548         (WebCore::HTML5DocumentParser::InputStream::InputStream):
3549         (WebCore::HTML5DocumentParser::InputStream::appendToEnd):
3550         (WebCore::HTML5DocumentParser::InputStream::insertAtCurrentInsertionPoint):
3551         (WebCore::HTML5DocumentParser::InputStream::close):
3552         (WebCore::HTML5DocumentParser::InputStream::current):
3553         (WebCore::HTML5DocumentParser::InputStream::splitInto):
3554         (WebCore::HTML5DocumentParser::InputStream::mergeFrom):
3555         (WebCore::HTML5DocumentParser::InsertionPointRecord::InsertionPointRecord):
3556         (WebCore::HTML5DocumentParser::InsertionPointRecord::~InsertionPointRecord):
3557         (WebCore::HTML5DocumentParser::inWrite):
3558         * html/HTML5Lexer.h:
3559         (WebCore::HTML5Lexer::columnNumber):
3560         * html/HTML5Tokenizer.cpp: Removed.
3561         * html/HTML5Tokenizer.h: Removed.
3562         * html/HTML5TreeBuilder.cpp:
3563         * html/HTMLDocument.cpp:
3564         (WebCore::HTMLDocument::createTokenizer):
3565         * html/HTMLDocumentParser.cpp: Added.
3566         (WebCore::):
3567         (WebCore::fixUpChar):
3568         (WebCore::tagMatch):
3569         (WebCore::Token::addAttribute):
3570         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3571         (WebCore::HTMLDocumentParser::reset):
3572         (WebCore::HTMLDocumentParser::begin):
3573         (WebCore::HTMLDocumentParser::setForceSynchronous):
3574         (WebCore::HTMLDocumentParser::processListing):
3575         (WebCore::HTMLDocumentParser::parseNonHTMLText):
3576         (WebCore::HTMLDocumentParser::scriptHandler):
3577         (WebCore::HTMLDocumentParser::scriptExecution):
3578         (WebCore::HTMLDocumentParser::parseComment):
3579         (WebCore::HTMLDocumentParser::parseServer):
3580         (WebCore::HTMLDocumentParser::parseProcessingInstruction):
3581         (WebCore::HTMLDocumentParser::parseText):
3582         (WebCore::HTMLDocumentParser::parseEntity):
3583         (WebCore::HTMLDocumentParser::parseDoctype):
3584         (WebCore::HTMLDocumentParser::parseTag):
3585         (WebCore::HTMLDocumentParser::continueProcessing):
3586         (WebCore::HTMLDocumentParser::advance):
3587         (WebCore::HTMLDocumentParser::willWriteHTML):
3588         (WebCore::HTMLDocumentParser::didWriteHTML):
3589         (WebCore::HTMLDocumentParser::write):
3590         (WebCore::HTMLDocumentParser::stopParsing):
3591         (WebCore::HTMLDocumentParser::processingData):
3592         (WebCore::HTMLDocumentParser::timerFired):
3593         (WebCore::HTMLDocumentParser::end):
3594         (WebCore::HTMLDocumentParser::finish):
3595         (WebCore::HTMLDocumentParser::processToken):
3596         (WebCore::HTMLDocumentParser::processDoctypeToken):
3597         (WebCore::HTMLDocumentParser::~HTMLDocumentParser):
3598         (WebCore::HTMLDocumentParser::enlargeBuffer):
3599         (WebCore::HTMLDocumentParser::enlargeScriptBuffer):
3600         (WebCore::HTMLDocumentParser::executeScriptsWaitingForStylesheets):
3601         (WebCore::HTMLDocumentParser::notifyFinished):
3602         (WebCore::HTMLDocumentParser::executeExternalScriptsIfReady):
3603         (WebCore::HTMLDocumentParser::executeExternalScriptsTimerFired):
3604         (WebCore::HTMLDocumentParser::continueExecutingExternalScripts):
3605         (WebCore::HTMLDocumentParser::isWaitingForScripts):
3606         (WebCore::HTMLDocumentParser::setSrc):
3607         (WebCore::parseHTMLDocumentFragment):
3608         (WebCore::decodeNamedEntity):
3609         * html/HTMLDocumentParser.h: Added.
3610         (WebCore::Token::Token):
3611         (WebCore::Token::~Token):
3612         (WebCore::Token::isOpenTag):
3613         (WebCore::Token::isCloseTag):
3614         (WebCore::Token::reset):
3615         (WebCore::Token::addViewSourceChar):
3616         (WebCore::):
3617         (WebCore::DoctypeToken::DoctypeToken):
3618         (WebCore::DoctypeToken::reset):
3619         (WebCore::DoctypeToken::state):
3620         (WebCore::DoctypeToken::setState):
3621         (WebCore::HTMLDocumentParser::forceSynchronous):
3622         (WebCore::HTMLDocumentParser::executingScript):
3623         (WebCore::HTMLDocumentParser::lineNumber):
3624         (WebCore::HTMLDocumentParser::columnNumber):
3625         (WebCore::HTMLDocumentParser::processingContentWrittenByScript):
3626         (WebCore::HTMLDocumentParser::htmlParser):
3627         (WebCore::HTMLDocumentParser::asHTMLTokenizer):
3628         (WebCore::HTMLDocumentParser::checkBuffer):
3629         (WebCore::HTMLDocumentParser::checkScriptBuffer):
3630         (WebCore::HTMLDocumentParser::):
3631         (WebCore::HTMLDocumentParser::State::State):
3632         (WebCore::HTMLDocumentParser::State::tagState):
3633         (WebCore::HTMLDocumentParser::State::setTagState):
3634         (WebCore::HTMLDocumentParser::State::entityState):
3635         (WebCore::HTMLDocumentParser::State::setEntityState):
3636         (WebCore::HTMLDocumentParser::State::inScript):
3637         (WebCore::HTMLDocumentParser::State::setInScript):
3638         (WebCore::HTMLDocumentParser::State::inStyle):
3639         (WebCore::HTMLDocumentParser::State::setInStyle):
3640         (WebCore::HTMLDocumentParser::State::inXmp):
3641         (WebCore::HTMLDocumentParser::State::setInXmp):
3642         (WebCore::HTMLDocumentParser::State::inTitle):
3643         (WebCore::HTMLDocumentParser::State::setInTitle):
3644         (WebCore::HTMLDocumentParser::State::inIFrame):
3645         (WebCore::HTMLDocumentParser::State::setInIFrame):
3646         (WebCore::HTMLDocumentParser::State::inPlainText):
3647         (WebCore::HTMLDocumentParser::State::setInPlainText):
3648         (WebCore::HTMLDocumentParser::State::inProcessingInstruction):
3649         (WebCore::HTMLDocumentParser::State::setInProcessingInstruction):
3650         (WebCore::HTMLDocumentParser::State::inComment):
3651         (WebCore::HTMLDocumentParser::State::setInComment):
3652         (WebCore::HTMLDocumentParser::State::inDoctype):
3653         (WebCore::HTMLDocumentParser::State::setInDoctype):
3654         (WebCore::HTMLDocumentParser::State::inTextArea):
3655         (WebCore::HTMLDocumentParser::State::setInTextArea):
3656         (WebCore::HTMLDocumentParser::State::escaped):
3657         (WebCore::HTMLDocumentParser::State::setEscaped):
3658         (WebCore::HTMLDocumentParser::State::inServer):
3659         (WebCore::HTMLDocumentParser::State::setInServer):
3660         (WebCore::HTMLDocumentParser::State::skipLF):
3661         (WebCore::HTMLDocumentParser::State::setSkipLF):
3662         (WebCore::HTMLDocumentParser::State::startTag):
3663         (WebCore::HTMLDocumentParser::State::setStartTag):
3664         (WebCore::HTMLDocumentParser::State::discardLF):
3665         (WebCore::HTMLDocumentParser::State::setDiscardLF):
3666         (WebCore::HTMLDocumentParser::State::allowYield):
3667         (WebCore::HTMLDocumentParser::State::setAllowYield):
3668         (WebCore::HTMLDocumentParser::State::loadingExtScript):
3669         (WebCore::HTMLDocumentParser::State::setLoadingExtScript):
3670         (WebCore::HTMLDocumentParser::State::forceSynchronous):
3671         (WebCore::HTMLDocumentParser::State::setForceSynchronous):
3672         (WebCore::HTMLDocumentParser::State::inAnyNonHTMLText):
3673         (WebCore::HTMLDocumentParser::State::hasTagState):
3674         (WebCore::HTMLDocumentParser::State::hasEntityState):
3675         (WebCore::HTMLDocumentParser::State::needsSpecialWriteHandling):
3676         (WebCore::HTMLDocumentParser::State::):
3677         (WebCore::HTMLDocumentParser::State::setBit):
3678         (WebCore::HTMLDocumentParser::State::testBit):
3679         * html/HTMLElement.cpp:
3680         * html/HTMLFormControlElement.cpp:
3681         * html/HTMLParser.cpp:
3682         (WebCore::HTMLParser::reportErrorToConsole):
3683         * html/HTMLParser.h:
3684         * html/HTMLTokenizer.cpp: Removed.
3685         * html/HTMLTokenizer.h: Removed.
3686         * html/HTMLViewSourceDocument.cpp:
3687         (WebCore::HTMLViewSourceDocument::createTokenizer):
3688         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
3689         * html/HTMLViewSourceDocument.h:
3690         * loader/DocumentLoader.cpp:
3691         * loader/FTPDirectoryDocument.cpp:
3692         (WebCore::FTPDirectoryTokenizer::FTPDirectoryTokenizer):
3693         (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate):
3694         (WebCore::FTPDirectoryTokenizer::finish):
3695         * loader/FrameLoader.cpp:
3696         * loader/ImageDocument.cpp:
3697         * loader/MediaDocument.cpp:
3698         * loader/PluginDocument.cpp:
3699         * loader/TextDocument.cpp:
3700         * page/XSSAuditor.h:
3701         * svg/SVGDocumentExtensions.cpp:
3702         * wml/WMLErrorHandling.cpp:
3703         (WebCore::reportWMLError):
3704         * xml/XSLStyleSheetLibxslt.cpp:
3705         (WebCore::XSLStyleSheet::parseString):
3706         * xml/XSLTProcessor.cpp:
3707         * xml/XSLTProcessorLibxslt.cpp:
3708
3709 2010-06-12  Andreas Kling  <andreas.kling@nokia.com>
3710
3711         Reviewed by Darin Adler.
3712
3713         Window object should have CanvasGradient and CanvasPattern
3714         https://bugs.webkit.org/show_bug.cgi?id=40394
3715
3716         This fixes the following tests:
3717         - canvas/philip/tests/2d.gradient.object.return.html
3718         - canvas/philip/tests/2d.pattern.basic.type.html
3719
3720         * html/canvas/CanvasGradient.idl:
3721         * html/canvas/CanvasPattern.idl:
3722         * page/DOMWindow.idl:
3723
3724 2010-06-12  Dan Bernstein  <mitz@apple.com>
3725
3726         Reviewed by Oliver Hunt.
3727
3728         <rdar://problem/8025267> REGRESSION (Safari 4-TOT): Crash when a frame’s resize handler removes the frame
3729         https://bugs.webkit.org/show_bug.cgi?id=40534
3730
3731         Test: fast/replaced/frame-removed-during-resize.html
3732
3733         * rendering/RenderWidget.cpp:
3734         (WebCore::RenderWidget::updateWidgetPosition): Null-check m_widget, since resizing the widget
3735         may trigger an iframe’s resize handler, which may destroy the widget.
3736
3737 2010-06-12  Dean Jackson  <dino@apple.com>
3738
3739         Reviewed by Darin Adler.
3740
3741         Animation keyframe timing functions are applying incorrectly
3742         https://bugs.webkit.org/show_bug.cgi?id=38963
3743         
3744         When copying RenderStyles, we have to clone the AnimationList so that each keyframe
3745         can have its own timing function.
3746
3747         Tests: animations/keyframe-timing-functions-transform.html
3748                animations/keyframe-timing-functions2.html
3749
3750         * platform/animation/Animation.h:
3751         (WebCore::Animation::create):
3752         * platform/animation/AnimationList.cpp:
3753         (WebCore::AnimationList::AnimationList):
3754         * platform/animation/AnimationList.h:
3755         (WebCore::AnimationList::AnimationList):
3756
3757 2010-06-12  Dan Bernstein  <mitz@apple.com>
3758
3759         Reviewed by Dave Hyatt.
3760
3761         <rdar://problem/7882140> -webkit-column-break-* properties don’t do anything
3762         https://bugs.webkit.org/show_bug.cgi?id=40531
3763
3764         Test: fast/multicol/break-properties.html
3765
3766         * rendering/RenderBlock.cpp:
3767         (WebCore::RenderBlock::paintChildren): Check for -webkit-column-break-{before,after}: always
3768         and -webkit-column-break-inside: avoid when doing column layout.
3769
3770 2010-06-13  Robert Hogan  <robert@webkit.org>
3771
3772         Reviewed by Alexey Proskuryakov.
3773
3774         FrameLoader::clear() clears JS objects that cached pages later rely on
3775
3776         https://bugs.webkit.org/show_bug.cgi?id=37725
3777         https://bugs.webkit.org/show_bug.cgi?id=31626
3778
3779         Fix the following tests for Qt:
3780
3781         fast/events/pageshow-pagehide-on-back-cached.html
3782         fast/events/pageshow-pagehide-on-back-cached-with-frames.html
3783         fast/loader/input-element-page-cache-crash.html
3784         fast/dom/Window/timer-resume-on-navigation-back.html
3785         loader/go-back-to-different-window-size.html
3786         fast/dom/javascript-url-crash-function.html
3787         fast/dom/location-new-window-no-crash.html
3788         http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-window-open.html
3789
3790         which currently fail because the page's Qt-bindings runtime objects are
3791         cleared when navigating away from the page containing them.
3792
3793         Track Qt-bindings objects in a separate ScriptController::cacheableRootBindingObject().
3794         RuntimeObjects tracked by this root object will not get invalidated on page navigations,
3795         so they will still be available when the pages containing them are retrieved from the
3796         b/f cache.
3797
3798         This means the Qt bindings objects will only get cleared on Frame::pageDestroyed().
3799
3800         * bindings/js/ScriptController.cpp:
3801         (WebCore::ScriptController::~ScriptController):
3802         (WebCore::ScriptController::cacheableBindingRootObject):
3803         * bindings/js/ScriptController.h:
3804
3805 2010-06-12  Kent Tamura  <tkent@chromium.org>
3806
3807         Reviewed by Darin Adler.
3808
3809         REGRESSION: Can't submit a form with <input type=radio required>
3810         https://bugs.webkit.org/show_bug.cgi?id=40429
3811
3812         Validity state was not updated correctly for radio buttons, and it
3813         prevents form submission even if a radio button group has a
3814         checked radio button.
3815
3816         Test: fast/forms/interactive-validation-required-radio.html
3817
3818         * html/HTMLInputElement.cpp:
3819         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
3820          Call setNeedsValidityCheck() for all of radio buttons in the same group
3821          to update validity state.
3822         (WebCore::HTMLInputElement::setChecked):
3823          Remove setNeedsValidityCheck() call because it is called in
3824          updateCheckedRadioButtons().
3825
3826 2010-06-12  Kent Tamura  <tkent@chromium.org>
3827
3828         Reviewed by Dimitri Glazkov.
3829
3830         Disable interactive form validation in non-strict modes
3831         https://bugs.webkit.org/show_bug.cgi?id=40218
3832
3833         The interactive validation feature of HTML5 is not compatible with
3834         HTML4, and users and page authors don't expect existing sites work
3835         differently in WebKit. For example, maxlength and required attributes
3836         in existing sites unexpectedly prevented form submission.
3837         So, we disable the interactive validation feature in non-strict
3838         modes to improve compatibility.
3839
3840         Test: fast/forms/interactive-validation-compat-mode.html
3841               fast/forms/interactive-validation-html4.html
3842
3843         * html/HTMLFormElement.cpp:
3844         (WebCore::HTMLFormElement::validateInteractively):
3845          Process interactive validation only in the strict mode.
3846
3847 2010-06-12  Eric Seidel  <eric@webkit.org>
3848
3849         Reviewed by David Levin.
3850
3851         Rename Tokenizer to DocumentParser to match what it actually does
3852         https://bugs.webkit.org/show_bug.cgi?id=40504
3853
3854         The rename was entirely done by do-webcore-rename.
3855         The only manual changes were removing out-dated comments
3856         and fixing Tokenizer_h to DocumentParser_h in the header guards.
3857
3858         I'll do all the rest of the renames (like the tokenizer subclasses
3859         and the tokenizer() createTokenizer() methods) in separate changes.
3860
3861         No functional change, thus no tests.
3862
3863         * GNUmakefile.am:
3864         * WebCore.gypi:
3865         * WebCore.vcproj/WebCore.vcproj:
3866         * WebCore.xcodeproj/project.pbxproj:
3867         * bindings/js/JSHTMLDocumentCustom.cpp:
3868         * bindings/v8/ScriptEventListener.cpp:
3869         * dom/Document.cpp:
3870         (WebCore::Document::createTokenizer):
3871         * dom/Document.h:
3872         (WebCore::Document::tokenizer):
3873         * dom/DocumentParser.h: Added.
3874         (WebCore::DocumentParser::~DocumentParser):
3875         (WebCore::DocumentParser::stopParsing):
3876         (WebCore::DocumentParser::processingData):
3877         (WebCore::DocumentParser::executingScript):
3878         (WebCore::DocumentParser::wantsRawData):
3879         (WebCore::DocumentParser::writeRawData):
3880         (WebCore::DocumentParser::inViewSourceMode):
3881         (WebCore::DocumentParser::setInViewSourceMode):
3882         (WebCore::DocumentParser::wellFormed):
3883         (WebCore::DocumentParser::lineNumber):
3884         (WebCore::DocumentParser::columnNumber):
3885         (WebCore::DocumentParser::executeScriptsWaitingForStylesheets):
3886         (WebCore::DocumentParser::htmlParser):
3887         (WebCore::DocumentParser::asHTMLTokenizer):
3888         (WebCore::DocumentParser::xssAuditor):
3889         (WebCore::DocumentParser::setXSSAuditor):
3890         (WebCore::DocumentParser::DocumentParser):
3891         * dom/Tokenizer.h: Removed.
3892         * dom/ViewportArguments.cpp:
3893         (WebCore::reportViewportWarning):
3894         * dom/XMLTokenizer.h:
3895         * dom/XMLTokenizerLibxml2.cpp:
3896         (WebCore::XMLTokenizer::stopParsing):
3897         * dom/XMLTokenizerQt.cpp:
3898         (WebCore::XMLTokenizer::stopParsing):
3899         * html/HTML5Tokenizer.cpp:
3900         (WebCore::HTML5Tokenizer::HTML5Tokenizer):
3901         * html/HTML5Tokenizer.h:
3902         * html/HTMLDocument.cpp:
3903         (WebCore::HTMLDocument::createTokenizer):
3904         * html/HTMLDocument.h:
3905         * html/HTMLFormControlElement.cpp:
3906         (WebCore::HTMLFormControlElement::removedFromTree):
3907         * html/HTMLTokenizer.cpp:
3908         (WebCore::HTMLTokenizer::HTMLTokenizer):
3909         (WebCore::HTMLTokenizer::stopParsing):
3910         * html/HTMLTokenizer.h:
3911         * html/HTMLViewSourceDocument.cpp:
3912         (WebCore::HTMLViewSourceDocument::createTokenizer):
3913         * html/HTMLViewSourceDocument.h:
3914         * loader/DocumentLoader.cpp:
3915         (WebCore::DocumentLoader::isLoadingInAPISense):
3916         * loader/DocumentWriter.cpp:
3917         (WebCore::DocumentWriter::addData):
3918         * loader/FTPDirectoryDocument.cpp:
3919         (WebCore::FTPDirectoryDocument::createTokenizer):
3920         * loader/FTPDirectoryDocument.h:
3921         * loader/ImageDocument.cpp:
3922         (WebCore::ImageDocument::createTokenizer):
3923         * loader/ImageDocument.h:
3924         * loader/MediaDocument.cpp:
3925         (WebCore::MediaDocument::createTokenizer):
3926         * loader/MediaDocument.h:
3927         * loader/PluginDocument.cpp:
3928         (WebCore::PluginDocument::createTokenizer):
3929         * loader/PluginDocument.h:
3930         * loader/SinkDocument.cpp:
3931         (WebCore::SinkDocument::createTokenizer):
3932         * loader/SinkDocument.h:
3933         * loader/TextDocument.cpp:
3934         (WebCore::TextTokenizer::TextTokenizer):
3935         (WebCore::TextDocument::createTokenizer):
3936         (WebCore::createTextTokenizer):
3937         * loader/TextDocument.h:
3938         * wml/WMLDocument.cpp:
3939         (WebCore::WMLDocument::finishedParsing):
3940
3941 2010-06-12  Eric Seidel  <eric@webkit.org>
3942
3943         Reviewed by Adam Barth.
3944
3945         HTML5Tokenizer needs to tell the InspectorTimelineAgent before and after it writes
3946         https://bugs.webkit.org/show_bug.cgi?id=40417
3947
3948         This "fixes" inspector/timeline-script-tag-1.html.  HTML5 results
3949         differ from the old parser for expected reasons.
3950
3951         HTML5Tokenizer calls InspectorTimelineAgent::will/didWriteHTML every
3952         time we pump the lexer instead of every write() call.
3953         We end up pumping the lexer slightly more often than the old code called
3954         write() in order to cleanly handle unclosed-entities, unclosed tags,
3955         buffered characters, etc. at the end of a document.
3956
3957         I discussed this extensively with James Robinson in #webkit and we decided
3958         that it was better for the HTML5Tokenizer to call for every pump and
3959         that the Inspector should later filter out empty pumps.
3960
3961         We can't filter out empty pumps yet, because the number of parsed
3962         characters is passed in willWrite instead of didWrite and thus is
3963         speculative (and wrong).  This is a problem independent of this change
3964         as willWrite's "length" argument is wrong in different ways for the old
3965         parser, including always being 0 when the old parser resumes.
3966
3967         Tested by inspector/timeline-script-tag-1.html
3968
3969         * html/HTML5Tokenizer.cpp:
3970         (WebCore::HTML5Tokenizer::willPumpLexer):
3971          - Notify the InspectorTimelineAgent we're about to process input.
3972         (WebCore::HTML5Tokenizer::didPumpLexer):
3973          - Notify the InspectorTimelineAgent we did process tokens.
3974         (WebCore::HTML5Tokenizer::pumpLexer):
3975          - Call willPump and didPump
3976         * html/HTML5Tokenizer.h:
3977         * inspector/InspectorTimelineAgent.h:
3978          - Add a FIXME about passing length to didWrite instead of willWrite.
3979
3980 2010-06-11  Sheriff Bot  <webkit.review.bot@gmail.com>
3981
3982         Unreviewed, rolling out r61052.
3983         http://trac.webkit.org/changeset/61052
3984         https://bugs.webkit.org/show_bug.cgi?id=40517
3985
3986         "Broke fast/forms/caret-rtl.html on Mac bots" (Requested by
3987         eseidel on #webkit).
3988
3989         * html/HTMLElement.cpp:
3990         (WebCore::HTMLElement::mapToEntry):
3991         (WebCore::HTMLElement::parseMappedAttribute):
3992
3993 2010-06-11  Maciej Stachowiak  <mjs@apple.com>
3994
3995         Reviewed by Ojan Vafai.
3996
3997         Implement HTML5 hidden attribute
3998         https://bugs.webkit.org/show_bug.cgi?id=40511
3999
4000         Test: fast/html/hidden-attr.html
4001         
4002         Note: I used the mapped attribute mechanism for this instead of a rule in the UA stylesheet
4003         to avoid a performance hit from adding a global attribute rule to the UA stylesheet.
4004
4005         * html/HTMLElement.cpp:
4006         (WebCore::HTMLElement::mapToEntry): Pick up hidden as a global mapped attribute.
4007         (WebCore::HTMLElement::parseMappedAttribute): Map hidden attribute to display: none.
4008
4009 2010-06-10  Abhishek Arya  <inferno@chromium.org>
4010
4011         Reviewed by Dave Hyatt.
4012
4013         Do not render CSS Styles :first-letter and :first-line in a SVG text element context. 
4014         https://bugs.webkit.org/show_bug.cgi?id=40031
4015
4016         Test: svg/text/text-style-invalid.svg
4017
4018         * rendering/RenderSVGText.cpp:
4019         (WebCore::RenderSVGText::firstLineBlock):
4020         (WebCore::RenderSVGText::updateFirstLetter):
4021         * rendering/RenderSVGText.h:
4022
4023 2010-06-11  Kenneth Russell  <kbr@google.com>
4024
4025         Reviewed by Dimitri Glazkov.
4026
4027         getParameter with UNPACK_FLIP_Y_WEBGL and UNPACK_PREMULTIPLY_ALPHA_WEBGL is buggy
4028         https://bugs.webkit.org/show_bug.cgi?id=40506
4029
4030         Return the data members of WebGLRenderingContext for these
4031         parameter queries rather than asking OpenGL, which knows nothing
4032         about them.
4033
4034         * html/canvas/WebGLRenderingContext.cpp:
4035         (WebCore::WebGLRenderingContext::getParameter):
4036
4037 2010-06-11  Simon Fraser  <simon.fraser@apple.com>
4038
4039         Reviewed by Dr Dan Bernstein.
4040
4041         REGRESSION: crash when unloading an iFrame with Flash from the DOM
4042         https://bugs.webkit.org/show_bug.cgi?id=40161
4043         <rdar://problem/7994710>
4044         
4045         Null-check the ownerElement of the RenderView's document when unhooking the compositing
4046         root of an iframe whose layers are parented via the enclosing document. Fixes a crash when
4047         dynamically removing such an iframe.
4048
4049         Test: compositing/iframes/remove-iframe-crash.html
4050
4051         * rendering/RenderLayerCompositor.cpp:
4052         (WebCore::RenderLayerCompositor::detachRootPlatformLayer):
4053
4054 2010-06-11  Abhishek Arya  <inferno@chromium.org>
4055
4056         Reviewed by David Hyatt.
4057
4058         Don't process floats if parent node is not a RenderBlock.
4059         https://bugs.webkit.org/show_bug.cgi?id=40033
4060
4061         Test: svg/text/clear-floats-crash.svg
4062
4063         * rendering/RenderBlock.cpp:
4064         (WebCore::RenderBlock::clearFloats):
4065
4066 2010-06-11  Sheriff Bot  <webkit.review.bot@gmail.com>
4067
4068         Unreviewed, rolling out r61036.
4069         http://trac.webkit.org/changeset/61036
4070         https://bugs.webkit.org/show_bug.cgi?id=40499
4071
4072         broke chromium compile (Requested by jamesr on #webkit).
4073
4074         * bindings/v8/SerializedScriptValue.cpp:
4075         * bindings/v8/SerializedScriptValue.h:
4076         (WebCore::SerializedScriptValue::deserializeAndSetProperty):
4077         (WebCore::SerializedScriptValue::create):
4078         (WebCore::SerializedScriptValue::createFromWire):
4079         (WebCore::SerializedScriptValue::release):
4080         (WebCore::SerializedScriptValue::SerializedScriptValue):
4081
4082 2010-06-11  Kenneth Russell  <kbr@google.com>
4083
4084         Reviewed by Dimitri Glazkov.
4085
4086         Add texImage2D and texSubImage2D signatures with internal format, etc.
4087         https://bugs.webkit.org/show_bug.cgi?id=40318
4088
4089         Added new texImage2D and texSubImage2D entry points following
4090         WebGL specification changes. Added UNPACK_FLIP_Y_WEBGL and
4091         UNPACK_PREMULTIPLY_ALPHA_WEBGL pixelStorei parameters, honored
4092         them for the new entry points taking HTML elements, and added
4093         support to getParameter. Added warnings to the console for calls
4094         to the obsolete entry points, which will be removed in a few
4095         weeks.  Updated all layout tests to use the new entry points and
4096         pixelStorei parameters, and associated expectations. No other new
4097         tests.
4098
4099         * html/canvas/WebGLRenderingContext.cpp:
4100         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
4101         (WebCore::WebGLRenderingContext::getParameter):
4102         (WebCore::WebGLRenderingContext::pixelStorei):
4103         (WebCore::WebGLRenderingContext::texImage2DImpl):
4104         (WebCore::WebGLRenderingContext::texImage2D):
4105         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
4106         (WebCore::WebGLRenderingContext::texSubImage2D):
4107         (WebCore::WebGLRenderingContext::printWarningToConsole):
4108         * html/canvas/WebGLRenderingContext.h:
4109         * html/canvas/WebGLRenderingContext.idl:
4110         * platform/graphics/GraphicsContext3D.h:
4111         (WebCore::GraphicsContext3D::):
4112
4113 2010-06-11  James Robinson  <jamesr@chromium.org>
4114
4115         Reviewed by Dimitri Glazkov.
4116
4117         [chromium] Skia mispaints pages with border-radius
4118         https://bugs.webkit.org/show_bug.cgi?id=40456
4119
4120         Skia mispaints pages that have border radius set in some cases. The bug is in the anti aliased
4121         clip path logic used to implement anti aliased curves in Skia.  Since Skia internally only supports
4122         1-bit clips, anti aliased clipping is emulated by creating a new alpha layer, storing a set of
4123         clip paths on the side, and then 'erasing' the regions outside the clip.  See r49641.
4124         PlatformContextSkia maintains a stack of PlatformContextSkia::State objects that preserve information
4125         like fill color, drawing mode, etc that is manipulated by GraphicsContext::save() / 
4126         GraphicsContext::restore() calls as well some internal functions.  Whenever a new State object is pushed
4127         a new copy of the current State object is pushed onto the top of this stack using the copy c'tor.  The
4128         set of anti alias clip paths is also stored on the State object, but not copied when new entries are
4129         added as the paths only apply to that entry on the stack.
4130
4131         The bug is that the state stack is stored in a WTF::Vector.  When this vector exceeds its capacity
4132         (by default at 16 elements) all of the existing State entries are copied into the new buffer using
4133         State's copy constructor.  This does not preserve the anti alias clip paths, so when the State entries
4134         are popped the anti aliasing info is lost.  This corrupts all further paint operations since it results
4135         in inbalanced save/restore calls to the underlying SkCanvas.
4136
4137         The fix is to make the PlatformContextSkia::State copy constructor copy all fields and to add a new
4138         function PlatformContextSkia::State::cloneInheritedProperties to use when pushing new State entries
4139         that copies everything except for the anti aliased clip paths.
4140
4141         Test: fast/css/nested-rounded-corners.html
4142
4143         * platform/graphics/skia/PlatformContextSkia.cpp:
4144         (PlatformContextSkia::State::State):
4145         (PlatformContextSkia::State::cloneInheritedProperties):
4146         (PlatformContextSkia::save):
4147
4148 2010-06-11  Jeremy Orlow  <jorlow@chromium.org>
4149
4150         Reviewed by Darin Fisher.
4151
4152         [V8] Clean up SerializedScriptValue
4153         https://bugs.webkit.org/show_bug.cgi?id=40482
4154
4155         SerializedScriptValue doesn't follow WebKit's style guidelines very well
4156         and needlessly inlines quite a bit within the .h file. This change cleans
4157         things up. No funcitonal changes.
4158
4159         No change in behavior.
4160
4161         * bindings/v8/SerializedScriptValue.cpp:
4162         (WebCore::SerializedScriptValue::deserializeAndSetProperty):
4163         (WebCore::SerializedScriptValue::create):
4164         (WebCore::SerializedScriptValue::createFromWire):
4165         (WebCore::SerializedScriptValue::release):
4166         (WebCore::SerializedScriptValue::SerializedScriptValue):
4167         * bindings/v8/SerializedScriptValue.h:
4168
4169 2010-06-11  Anton Muhin  <antonm@chromium.org>
4170
4171         Reviewed by Adam Barth.
4172
4173         [v8] Introduce single element caches for WebCore::String to v8::String conversions
4174         https://bugs.webkit.org/show_bug.cgi?id=40435
4175         Measurements show that for some web apps (GMail, Wave) and some scenarios
4176         (intensive reading and/or keeping a tab open for a long time),
4177         hit rate lies in 30--50% interval.
4178         Inlining fast case gives another minor performance win.
4179
4180         * bindings/v8/V8Binding.cpp:
4181         (WebCore::getStringCache):
4182         (WebCore::v8ExternalStringSlow):
4183         * bindings/v8/V8Binding.h:
4184         (WebCore::v8ExternalString):
4185
4186 2010-06-11  Leandro Pereira  <leandro@profusion.mobi>
4187
4188         Reviewed by Gustavo Noronha Silva.
4189
4190         [EFL] Build fix: remove unneeded file (npapi.cpp) and add
4191         other files that got added to the tree.
4192         http://webkit.org/b/40331
4193
4194         * CMakeLists.txt:
4195         * CMakeListsEfl.txt:
4196
4197 2010-06-11  Tony Gentilcore  <tonyg@chromium.org>
4198
4199         Reviewed by Eric Seidel.
4200
4201         Fix fast/forms/preserveFormDuringResidualStyle.html for HTML5 Parser.
4202         https://bugs.webkit.org/show_bug.cgi?id=40454
4203
4204         This required exposing the HTMLParser which we definitely don't want to
4205         do, but the good news is that it can go away when the HTMLParser goes
4206         away.
4207
4208         No new tests because covered by fast/forms/preserve/FormDuri