2dbe55d804a5694c142fef2602c4b4b605def094
[WebKit.git] / WebCore / ChangeLog
1 2010-06-26  Tony Gentilcore  <tonyg@chromium.org>
2
3         Reviewed by Adam Barth.
4
5         Exclude line numbers for sources which are not from the network.
6         https://bugs.webkit.org/show_bug.cgi?id=41060
7
8         * html/HTMLDocumentParser.cpp:
9         (WebCore::HTMLDocumentParser::write):
10
11 2010-06-25  Antonio Gomes  <tonikitoo@webkit.org>
12
13         Unreviewed complementary fix for r61818. It added StaticHashSetListNode.cpp|h to the system,
14         but did not added it to chromium build system.
15
16         * WebCore.gypi:
17
18 2010-06-26  Pavel Feldman  <pfeldman@chromium.org>
19
20         Reviewed by Yury Semikhatsky.
21
22         Web Inspector: ScripsPanel.prototype.editScriptSource uses old addBreakpoint signature.
23
24         https://bugs.webkit.org/show_bug.cgi?id=41247
25
26         * inspector/front-end/BreakpointManager.js:
27         (WebInspector.BreakpointManager.prototype.removeBreakpoint):
28         (WebInspector.Breakpoint.prototype.set enabled):
29         (WebInspector.Breakpoint.prototype.set condition):
30         * inspector/front-end/Object.js:
31         (WebInspector.Object.prototype.addEventListener):
32         (WebInspector.Object.prototype.removeEventListener):
33         (WebInspector.Object.prototype.removeAllListeners):
34         * inspector/front-end/ScriptsPanel.js:
35         (WebInspector.ScriptsPanel.prototype.editScriptSource.mycallback):
36         (WebInspector.ScriptsPanel.prototype.editScriptSource):
37
38 2010-06-26  Tony Gentilcore  <tonyg@chromium.org>
39
40         Reviewed by Dimitri Glazkov.
41
42         Add a guarded window.performance.timing binding which is disabled by default.
43         https://bugs.webkit.org/show_bug.cgi?id=38924
44
45         This is where Web Timing support will be implemented. Web Timing is a
46         draft spec for exposing load times to web pages. It will be enabled
47         once the spec and implementaiton are solidified. See:
48         http://dev.w3.org/2006/webapi/WebTiming/
49
50         No new tests because guarded behind a #DEFINE. Will add tests as
51         functionality is landed.
52
53         * Android.mk:
54         * CMakeLists.txt:
55         * Configurations/FeatureDefines.xcconfig:
56         * DerivedSources.cpp:
57         * DerivedSources.make:
58         * GNUmakefile.am:
59         * WebCore.gypi:
60         * WebCore.pri:
61         * WebCore.pro:
62         * WebCore.vcproj/WebCore.vcproj:
63         * WebCore.xcodeproj/project.pbxproj:
64         * page/DOMWindow.cpp:
65         (WebCore::DOMWindow::clear):
66         (WebCore::DOMWindow::performance):
67         * page/DOMWindow.h:
68         (WebCore::DOMWindow::optionalPerformance):
69         * page/DOMWindow.idl:
70         * page/NavigationTiming.cpp: Added.
71         (WebCore::NavigationTiming::NavigationTiming):
72         (WebCore::NavigationTiming::frame):
73         (WebCore::NavigationTiming::disconnectFrame):
74         (WebCore::NavigationTiming::navigationStart):
75         * page/NavigationTiming.h: Added.
76         (WebCore::NavigationTiming::create):
77         * page/NavigationTiming.idl: Added.
78         * page/Performance.cpp: Added.
79         (WebCore::Performance::Performance):
80         (WebCore::Performance::frame):
81         (WebCore::Performance::disconnectFrame):
82         (WebCore::Performance::timing):
83         * page/Performance.h: Added.
84         (WebCore::Performance::create):
85         * page/Performance.idl: Added.
86
87 2010-06-25  Zhenyao Mo  <zmo@google.com>
88
89         Reviewed by Dimitri Glazkov.
90
91         activeTexture wrongly generates error with legal input.
92         https://bugs.webkit.org/show_bug.cgi?id=41227
93
94         Test: fast/canvas/webgl/texture-active-bind.html
95
96         * html/canvas/WebGLRenderingContext.cpp:
97         (WebCore::WebGLRenderingContext::activeTexture): Fix the upper limit test for test units.
98
99 2010-06-25  Johnny Ding  <jnd@chromium.org>
100
101         Reviewed by Adam Barth.
102
103         https://bugs.webkit.org/show_bug.cgi?id=41061
104         Make sure Chromium's ScriptController::processingUserGesture follows the JSC's behavior.
105         Set right value in UserGestureIndicator when handling events in PopupMenuList in chromium.
106
107         Test: fast/events/popup-when-select-change.html
108
109         * bindings/v8/ScriptController.cpp:
110         (WebCore::ScriptController::processingUserGesture):
111         * platform/chromium/PopupMenuChromium.cpp:
112         (WebCore::PopupContainer::handleMouseDownEvent):
113         (WebCore::PopupContainer::handleMouseMoveEvent):
114         (WebCore::PopupContainer::handleMouseReleaseEvent):
115         (WebCore::PopupContainer::handleWheelEvent):
116         (WebCore::PopupContainer::handleKeyEvent):
117
118 2010-06-25  Tony Gentilcore  <tonyg@chromium.org>
119
120         Reviewed by Eric Seidel.
121
122         Make PendingScript hold a CachedResourceClient open for its lifetime
123         https://bugs.webkit.org/show_bug.cgi?id=40968
124
125         This replaces the mechanism introduced in r61374 with a simpler
126         appraoch for preventing unexpected purges: always keep a client open.
127         This approach will allow deferred scripts to add a client after
128         the resource may have already been loaded without having to worry about
129         the buffer being purged in the meantime.
130
131         No new tests because making a CachedResource purse itself is not
132         testable from a LayoutTest.
133
134         * html/HTMLDocumentParser.cpp:
135         (WebCore::HTMLDocumentParser::watchForLoad):
136         (WebCore::HTMLDocumentParser::notifyFinished):
137         * html/HTMLScriptRunner.cpp:
138         (WebCore::HTMLScriptRunner::~HTMLScriptRunner):
139         (WebCore::HTMLScriptRunner::sourceFromPendingScript):
140         (WebCore::HTMLScriptRunner::isPendingScriptReady):
141         (WebCore::HTMLScriptRunner::executePendingScript):
142         (WebCore::HTMLScriptRunner::watchForLoad):
143         (WebCore::HTMLScriptRunner::stopWatchingForLoad):
144         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
145         (WebCore::HTMLScriptRunner::requestScript):
146         (WebCore::HTMLScriptRunner::PendingScript::~PendingScript):
147         (WebCore::HTMLScriptRunner::PendingScript::releaseElementAndClear):
148         (WebCore::HTMLScriptRunner::PendingScript::setCachedScript):
149         (WebCore::HTMLScriptRunner::PendingScript::cachedScript):
150         * html/HTMLScriptRunner.h:
151         (WebCore::HTMLScriptRunner::PendingScript::PendingScript):
152         (WebCore::HTMLScriptRunner::PendingScript::watchingForLoad):
153         (WebCore::HTMLScriptRunner::PendingScript::setWatchingForLoad):
154         (WebCore::HTMLScriptRunner::PendingScript::notifyFinished):
155         * html/HTMLScriptRunnerHost.h:
156
157 2010-06-25  Zhenyao Mo  <zmo@google.com>
158
159         Reviewed by Dimitri Glazkov.
160
161         getUniform will not work for fetching uniform array elements
162         https://bugs.webkit.org/show_bug.cgi?id=34508
163
164         Test: fast/canvas/webgl/gl-uniform-arrays.html
165
166         * html/canvas/WebGLRenderingContext.cpp:
167         (WebCore::WebGLRenderingContext::attachShader): Generate correct errors.
168         (WebCore::WebGLRenderingContext::getUniform): Dealing with array elements.
169         (WebCore::WebGLRenderingContext::useProgram): Deal with program==null.
170         (WebCore::WebGLRenderingContext::validateProgram): Generate correct errors.
171         * platform/graphics/mac/GraphicsContext3DMac.mm:
172         (WebCore::GraphicsContext3D::useProgram): Deal with program==null.
173
174 2010-06-25  Zhenyao Mo  <zmo@google.com>
175
176         Reviewed by Dimitri Glazkov.
177
178         Bring set/get state functions to GLES2 conformance
179         https://bugs.webkit.org/show_bug.cgi?id=41095
180
181         Tests: fast/canvas/webgl/gl-enable-enum-test.html
182                fast/canvas/webgl/gl-enum-tests.html
183
184         * html/canvas/WebGLRenderingContext.cpp: Check input parameters according to GLES2 spec.
185         (WebCore::WebGLRenderingContext::blendEquation):
186         (WebCore::WebGLRenderingContext::blendEquationSeparate):
187         (WebCore::WebGLRenderingContext::disable):
188         (WebCore::WebGLRenderingContext::enable):
189         (WebCore::WebGLRenderingContext::hint):
190         (WebCore::WebGLRenderingContext::isEnabled):
191         (WebCore::WebGLRenderingContext::pixelStorei):
192         (WebCore::WebGLRenderingContext::validateBlendEquation):
193         (WebCore::WebGLRenderingContext::validateCapability):
194         * html/canvas/WebGLRenderingContext.h: Add helper function declaration.
195
196 2010-06-25  Sterling Swigart  <sswigart@google.com>
197
198         Reviewed by David Levin.
199
200         Callback code generation fixed so that now string parameters are converted to JSString
201         using the jsString method instead of the toJS method which would not compile.
202         https://bugs.webkit.org/show_bug.cgi?id=41119
203         
204         * bindings/scripts/CodeGeneratorJS.pm: Now generates jsString for String parameters in callbacks.
205         * bindings/scripts/test/JS/JSTestCallback.cpp: Fixed test for above.
206         (WebCore::JSTestCallback::callbackWithClass2Param): Ditto.
207
208 2010-06-25  Zhenyao Mo  <zmo@google.com>
209
210         Reviewed by Dimitri Glazkov.
211
212         A buffer should be bound to one target in its lifetime
213         https://bugs.webkit.org/show_bug.cgi?id=41108
214
215         Test: fast/canvas/webgl/buffer-bind-test.html
216
217         * html/canvas/WebGLBuffer.cpp:
218         (WebCore::WebGLBuffer::WebGLBuffer): Init target to 0. 
219         (WebCore::WebGLBuffer::associateBufferData): Remove target parameter, use one byteLength member.
220         (WebCore::WebGLBuffer::associateBufferSubData): Ditto.
221         (WebCore::WebGLBuffer::byteLength): Ditto.
222         (WebCore::WebGLBuffer::setTarget): Set target.
223         * html/canvas/WebGLBuffer.h: Cache target in the WebGLBuffer object, use one byteLength member.
224         (WebCore::WebGLBuffer::getTarget):
225         * html/canvas/WebGLRenderingContext.cpp:
226         (WebCore::WebGLRenderingContext::bindBuffer): Check if a buffer is bound to another target; set buffer object internal target.
227         (WebCore::WebGLRenderingContext::bufferData): Remove target parameter and use the WebGLBuffer cached target instead.
228         (WebCore::WebGLRenderingContext::bufferSubData): Ditto.
229         (WebCore::WebGLRenderingContext::validateElementArraySize): Ditto.
230         (WebCore::WebGLRenderingContext::validateIndexArrayConservative): Ditto.
231         (WebCore::WebGLRenderingContext::vertexAttribPointer): Ditto.
232
233 2010-06-25  Dean Jackson  <dino@apple.com>
234
235         Reviewed by Simon Fraser.
236
237         https://bugs.webkit.org/show_bug.cgi?id=41188
238         Animations should not require 0% and 100% keyframes
239
240         When we are generating the animation lists in CSSStyleSelector,
241         rather than bail if we notice that "from" or "to" are missing, we
242         now generate synthetic keyframes for those cases.
243
244         Tests: animations/missing-from-to-transforms.html
245                animations/missing-from-to.html
246                WebCore/manual-tests/animation-with-transition.html
247
248         * css/CSSStyleSelector.cpp:
249         (WebCore::CSSStyleSelector::styleForKeyframe):
250                 Moved individual keyframe generation into a new function.
251         (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
252                 Call the new function above for regular keyframes, and
253                 also check for missing keyframes and generate them if
254                 necessary.
255         * css/CSSStyleSelector.h:
256
257 2010-06-25  Adam Barth  <abarth@webkit.org>
258
259         Reviewed by Eric Seidel.
260
261         We should parse <html>
262         https://bugs.webkit.org/show_bug.cgi?id=41239
263
264         This patch is hard to test, but I think this patch lets us parse a
265         document consisting of only an <html> start tag.
266
267         * html/HTMLTreeBuilder.cpp:
268         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
269         (WebCore::HTMLTreeBuilder::insertHTMLStartTagBeforeHTML):
270         (WebCore::HTMLTreeBuilder::insertHTMLStartTagInBody):
271         (WebCore::HTMLTreeBuilder::processStartTag):
272         (WebCore::HTMLTreeBuilder::processDefaultForBeforeHTMLMode):
273         * html/HTMLTreeBuilder.h:
274         (WebCore::HTMLTreeBuilder::ElementStack::push):
275
276 2010-06-25  Dan Bernstein  <mitz@apple.com>
277
278         Reviewed by Sam Weinig.
279
280         <rdar://problem/8000667> Certain text is repeated before and after a line break
281
282         Test: fast/text/bidi-explicit-embedding-past-end.html
283
284         * platform/text/BidiResolver.h:
285         (WebCore::::createBidiRunsForLine): Committing explicit embedding past the end of the range
286         creates BidiRuns up to the end of the range, so at that point, we can stop iterating.
287
288 2010-06-25  Eric Seidel  <eric@webkit.org>
289
290         Reviewed by Adam Barth.
291
292         Move decoding into DocumentParser to further simplify RawDataDocumentParser and DocumentWriter
293         https://bugs.webkit.org/show_bug.cgi?id=41202
294
295         Hit the Windoze with the compile bat.
296
297         * WebCore.vcproj/WebCore.vcproj:
298
299 2010-06-25  Adam Barth  <abarth@webkit.org>
300
301         Reviewed by Eric Seidel.
302
303         HTMLTreeBuilder should branch first on token type and then on insertion mode
304         https://bugs.webkit.org/show_bug.cgi?id=41232
305
306         This is different than how the spec is written, but it lets us remove a
307         lot of redudancy in the algorithm.  We might even want to pull some of
308         the branches on token name outside the insertion mode branch, but I'll
309         leave that for a future patch.
310
311         Although this looks like a big patch, it's mostly just a mechanical
312         switch permutation.
313
314         * html/HTMLTreeBuilder.cpp:
315         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
316         (WebCore::HTMLTreeBuilder::processToken):
317         (WebCore::HTMLTreeBuilder::processDoctypeToken):
318         (WebCore::HTMLTreeBuilder::processStartTag):
319         (WebCore::HTMLTreeBuilder::processEndTag):
320         (WebCore::HTMLTreeBuilder::processComment):
321         (WebCore::HTMLTreeBuilder::processCharacter):
322         (WebCore::HTMLTreeBuilder::processEndOfFile):
323         (WebCore::HTMLTreeBuilder::processDefaultForInitialMode):
324         (WebCore::HTMLTreeBuilder::processDefaultForBeforeHTMLMode):
325         (WebCore::HTMLTreeBuilder::processDefaultForBeforeHeadMode):
326         (WebCore::HTMLTreeBuilder::processDefaultForInHeadMode):
327         (WebCore::HTMLTreeBuilder::processDefaultForInHeadNoscriptMode):
328         (WebCore::HTMLTreeBuilder::processDefaultForAfterHeadMode):
329         * html/HTMLTreeBuilder.h:
330
331 2010-06-25  Adam Barth  <abarth@webkit.org>
332
333         Reviewed by Darin Adler.
334
335         Tree builder doesn't need to return a Node
336         https://bugs.webkit.org/show_bug.cgi?id=41225
337
338         The old tree builder returned the newly inserted Node, but the new tree
339         builder doesn't need to do that as far as I can tell.  Removing the
340         return value cuts down on a bunch of accounting.
341
342         * html/HTMLTreeBuilder.cpp:
343         (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
344         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
345         (WebCore::HTMLTreeBuilder::processToken):
346         (WebCore::HTMLTreeBuilder::insertDoctype):
347         (WebCore::HTMLTreeBuilder::insertComment):
348         (WebCore::HTMLTreeBuilder::insertGenericRCDATAElement):
349         (WebCore::HTMLTreeBuilder::insertGenericRawTextElement):
350         (WebCore::HTMLTreeBuilder::insertScriptElement):
351         * html/HTMLTreeBuilder.h:
352
353 2010-06-25  Zhenyao Mo  <zmo@google.com>
354
355         Reviewed by Dimitri Glazkov.
356
357         getParameter(COLOR_WRITEMASK) needs to return Array
358         https://bugs.webkit.org/show_bug.cgi?id=40437
359
360         * bindings/js/JSWebGLRenderingContextCustom.cpp: Handling bool array.
361         (WebCore::toJS):
362         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: Handling bool array.
363         (WebCore::toV8Object):
364         * html/canvas/WebGLGetInfo.cpp: Handling bool array.
365         (WebCore::WebGLGetInfo::WebGLGetInfo):
366         (WebCore::WebGLGetInfo::getBoolArray):
367         * html/canvas/WebGLGetInfo.h: Handling bool array.
368         (WebCore::WebGLGetInfo::):
369         * html/canvas/WebGLRenderingContext.cpp: Handling bool array.
370         (WebCore::WebGLRenderingContext::getParameter):
371         (WebCore::WebGLRenderingContext::getBooleanArrayParameter):
372         * html/canvas/WebGLRenderingContext.h: Handling bool array.
373
374 2010-06-25  Evan Stade  <estade@chromium.org>
375
376         Reviewed by Darin Fisher.
377
378         [chromium linux] Improve look of scrollbars
379         https://bugs.webkit.org/show_bug.cgi?id=35775
380
381         This will affect layout pixel tests, which will need to be rebaselined.
382
383         * platform/Scrollbar.cpp: need the buttons to be invalidated when the
384         thumb moves as they paint differently if the thumb is at the top or
385         bottom
386         (WebCore::Scrollbar::updateThumbPosition):
387         (WebCore::Scrollbar::updateThumbProportion):
388         * platform/chromium/ScrollbarThemeChromium.cpp:
389         (WebCore::ScrollbarThemeChromium::trackRect): share code between
390         linux/windows
391         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
392         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
393         (WebCore::outlineColor): up the contrast
394         (WebCore::ScrollbarThemeChromiumLinux::paintButton): add custom button
395         drawing implementation
396         (WebCore::ScrollbarThemeChromiumLinux::buttonSize): add buttons
397         * platform/chromium/ScrollbarThemeChromiumWin.cpp: share code between
398         linux/windows
399         * rendering/RenderThemeChromiumLinux.cpp: improve stock colors to get
400         better contrast and integration with stock chrome theme
401
402 2010-06-25  Eric Seidel  <eric@webkit.org>
403
404         Reviewed by Adam Barth.
405
406         Move decoding into DocumentParser to further simplify RawDataDocumentParser and DocumentWriter
407         https://bugs.webkit.org/show_bug.cgi?id=41202
408
409         The silly thing about this patch is that none of the
410         RawDataDocumentParser subclasses actually use any of the
411         data passed to them via appendBytes.
412
413         This makes the relationship between DocumentWriter and
414         DocumentParser slightly more confusing, however I think this
415         DocumentParser API is slightly nicer.
416
417         Next step is to split DecodedDataDocumentParser out from
418         DocumentParser, and then the base DocumentParser won't know
419         anything about decoding or SegmentedString.
420
421         No functional change, thus no tests.
422
423         * WebCore.xcodeproj/project.pbxproj:
424         * dom/DocumentParser.h:
425         * dom/RawDataDocumentParser.h:
426         * loader/DocumentWriter.cpp:
427         (WebCore::DocumentWriter::replaceDocument):
428         (WebCore::DocumentWriter::createDecoderIfNeeded):
429         (WebCore::DocumentWriter::reportDataRecieved):
430         (WebCore::DocumentWriter::addData):
431         * loader/DocumentWriter.h:
432         * loader/ImageDocument.cpp:
433         (WebCore::ImageDocumentParser::appendBytes):
434         * loader/MediaDocument.cpp:
435         (WebCore::MediaDocumentParser::appendBytes):
436         * loader/PluginDocument.cpp:
437         (WebCore::PluginDocumentParser::appendBytes):
438         * loader/SinkDocument.cpp:
439         (WebCore::SinkDocumentParser::SinkDocumentParser):
440         (WebCore::SinkDocumentParser::appendBytes):
441         (WebCore::SinkDocument::createParser):
442
443 2010-06-25  Eric Seidel  <eric@webkit.org>
444
445         Reviewed by Adam Barth.
446
447         Split DocumentParser::write into separate append and insert calls
448         https://bugs.webkit.org/show_bug.cgi?id=41197
449
450         Unfortunately this is still somewhat confusing as
451         "insert" means "insert this data at the current
452         insertion point and run the parser synchronously
453         unless we're in a nested write call" and "append"
454         means "append this data to the end and run the
455         parser if not in a nested call or until possibly yielding".
456
457         This at least makes clearer which document parsers implement
458         which behavior, and paves the way for moving the decoding
459         logic into DocumentParser from DocumentWriter.
460
461         No functional changes, thus no tests.
462
463         * dom/Document.cpp:
464         (WebCore::Document::write):
465         * dom/DocumentParser.h:
466         * dom/RawDataDocumentParser.h:
467         (WebCore::RawDataDocumentParser::insert):
468         (WebCore::RawDataDocumentParser::append):
469         * dom/XMLDocumentParser.cpp:
470         (WebCore::XMLDocumentParser::insert):
471         (WebCore::XMLDocumentParser::append):
472         * dom/XMLDocumentParser.h:
473         * dom/XMLDocumentParserLibxml2.cpp:
474         (WebCore::XMLDocumentParser::resumeParsing):
475         * html/HTMLDocumentParser.cpp:
476         (WebCore::HTMLDocumentParser::insert):
477         (WebCore::HTMLDocumentParser::append):
478         (WebCore::HTMLDocumentParser::parseDocumentFragment):
479         * html/HTMLDocumentParser.h:
480         * html/LegacyHTMLDocumentParser.cpp:
481         (WebCore::LegacyHTMLDocumentParser::insert):
482         (WebCore::LegacyHTMLDocumentParser::append):
483         * html/LegacyHTMLDocumentParser.h:
484         * loader/DocumentWriter.cpp:
485         (WebCore::DocumentWriter::replaceDocument):
486         (WebCore::DocumentWriter::addData):
487         * loader/FTPDirectoryDocument.cpp:
488         (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
489         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
490         (WebCore::FTPDirectoryDocumentParser::append):
491         * loader/TextDocument.cpp:
492         (WebCore::TextDocumentParser::insert):
493         (WebCore::TextDocumentParser::append):
494         (WebCore::TextDocumentParser::finish):
495
496 2010-06-25  Daniel Cheng  <dcheng@chromium.org>
497
498         Reviewed by Darin Fisher.
499
500         [chromium] Add new stubs for querying platform drag-and-drop and copy-and-paste data.
501
502         This change adds new stubs for querying for data in a clipboard or drag operation. This is
503         so adding support for more data types in clipboard/drag operations doesn't become
504         increasingly expensive, since we currently copy all the drag data we need every time a new
505         web drop target is entered. It also adds a new mechanism to write back to the system
506         clipboard that isn't tied to one data type.
507
508         https://bugs.webkit.org/show_bug.cgi?id=40540
509
510         No new tests since we're just adding new ChromiumBridge APIs. When we switch to it, it will
511         be covered by the existing tests.
512
513         * platform/chromium/ChromiumBridge.h:
514         * platform/chromium/PasteboardPrivate.h:
515         (WebCore::PasteboardPrivate::):
516
517 2010-06-25  Mario Sanchez Prada  <msanchez@igalia.com>
518
519         Reviewed by Xan Lopez.
520
521         [Gtk] Implement atk_table_get_column_header
522         https://bugs.webkit.org/show_bug.cgi?id=30896
523
524         Implemented get_column_header and modified get_row_header
525         accordingly to keep them both coherent among themselves.
526         Based on a previous patch by Joanmarie Diggs.
527
528         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
529         (webkit_accessible_table_get_column_header):
530         (webkit_accessible_table_get_row_header):
531
532 2010-06-25  Martin Robinson  <mrobinson@igalia.com>
533
534         Reviewed by Xan Lopez.
535
536         [GTK] Pasteboard code does not take into account the nil character when getting and setting markup/netscape-url data
537         https://bugs.webkit.org/show_bug.cgi?id=41221
538
539         Take into account null-terminator when getting and setting markup and
540         Netscape URL pasteboard types. This means that if the selection data
541         contains the null terminator, it won't be included in the final String.
542         When setting the pasteboard data the null terminator is now included to
543         match the behavior of other applications.
544
545         * platform/gtk/PasteboardHelper.cpp:
546         (WebCore::PasteboardHelper::getClipboardContents):
547         Create the markup string after using g_strndup to protect against non-null-terminated
548         strings. Use String::fromUTF8 here to ensure that the string is not longer than the
549         first null-terminator. Also fix a small indentation issue.
550         (WebCore::PasteboardHelper::fillSelectionData):
551         Always include the null-terminator when setting pasteboard data manually. This matches
552         the behavior of other browser applications.
553
554 2010-06-25  Sam Magnuson  <smagnuson@netflix.com>
555
556         Reviewed by Kenneth Rohde Christiansen.
557
558         [Qt] When any geometry change happens to a node it will resize the
559         backing cache
560         https://bugs.webkit.org/show_bug.cgi?id=40378
561
562         Continue to grow the cache, but never toss it. When the pixmap
563         cache gets too big it will be lost and created at the right size
564         next time.
565
566         No new tests: this is an optimization.
567
568         * platform/graphics/qt/GraphicsLayerQt.cpp:
569         (WebCore::GraphicsLayerQtImpl::recache):
570         (WebCore::GraphicsLayerQtImpl::paint):
571         (WebCore::GraphicsLayerQtImpl::flushChanges):
572
573 2010-06-25  Andreas Kling  <andreas.kling@nokia.com>
574
575         Reviewed by Darin Adler.
576
577         https://bugs.webkit.org/show_bug.cgi?id=41019
578         Canvas: Remember verified clean origins for drawImage()
579
580         Made CanvasRenderingContext2D cache the KURLs of clean origins
581         for fast repeated lookup.
582
583         * html/canvas/CanvasRenderingContext2D.cpp:
584         (WebCore::CanvasRenderingContext2D::checkOrigin):
585         * html/canvas/CanvasRenderingContext2D.h:
586
587 2010-06-25  Robert Hogan  <robert@webkit.org>
588
589         Reviewed by Kenneth Rohde Christiansen.
590
591         [Qt] HTTP 307 after a 303 after a POST re-sends POST data from the original request
592
593         https://bugs.webkit.org/show_bug.cgi?id=35301
594
595         Qt needs to use ResourceRequest::request()->httpMethod()) in order to determine
596         the appropriate method for a 307 redirect request.
597
598         When deciding if it needs to override a POST method with a GET method during a
599         redirect chain, QNetworkReplyHandler needs to check the HTTP method stored
600         in ResourceRequest::request()->httpMethod(). This will always contain the
601         original request method in a redirect chain and, more importantly, is the
602         method that will be used for the request created from the redirect
603         if it is not overridden.
604
605         * platform/network/qt/QNetworkReplyHandler.cpp:
606         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
607
608 2010-06-25  Dan Bernstein  <mitz@apple.com>
609
610         Reviewed by Anders Carlsson.
611
612         Removed a one-line method that only had one internal caller.
613
614         * rendering/RenderBlock.h: Removed bidiReorderLine()
615         * rendering/RenderBlockLineLayout.cpp:
616         (WebCore::RenderBlock::layoutInlineChildren): Moved the implementation of
617         bidiReorderLine() inline here.
618
619 2010-06-25  Nate Chapin  <japhet@chromium.org>
620
621         Reviewed by Adam Barth.
622
623         Take a KURL parameter in Document's constructor.
624         This will remove the one case where Document::url() 
625         and FrameLoader::url() are not equal, allowing us to
626         remove FrameLoader::url().
627
628         https://bugs.webkit.org/show_bug.cgi?id=41166
629
630         Refactor only, no new tests.
631
632         * dom/DOMImplementation.cpp:
633         (WebCore::DOMImplementation::createDocument): Take a KURL and pass it through to Document.
634         (WebCore::DOMImplementation::createHTMLDocument):
635         * dom/DOMImplementation.h:
636         * dom/Document.cpp:
637         (WebCore::Document::Document): Call setURL() if a frame or a non-empty KURL is specified.
638         (WebCore::Document::initSecurityContext): m_url is now initialized, so use it instead
639             of m_frame->loader()->url() for initializing the SecurityOrigin.
640         * dom/Document.h:
641         (WebCore::Document::create):
642         (WebCore::Document::createXHTML):
643         * html/HTMLDocument.cpp:
644         * html/HTMLDocument.h: Add KURL parameter to create() and constructor.
645         * html/HTMLViewSourceDocument.cpp:
646         * html/HTMLViewSourceDocument.h: Add KURL parameter to create() and constructor.
647         * loader/CachedFont.cpp:
648         (WebCore::CachedFont::ensureSVGFontData):
649         * loader/DocumentWriter.cpp:
650         (WebCore::DocumentWriter::createDocument): Take a KURL and pass it through to Document.
651         (WebCore::DocumentWriter::begin): Pass existing url parameter to constructors, and remove
652             redundant Document::setURL() call.
653         * loader/DocumentWriter.h:
654         * loader/FTPDirectoryDocument.cpp:
655         * loader/FTPDirectoryDocument.h: Add KURL parameter to create() and constructor.
656         * loader/ImageDocument.cpp:
657         * loader/ImageDocument.h: Add KURL parameter to create() and constructor.
658         * loader/MediaDocument.cpp:
659         * loader/MediaDocument.h: Add KURL parameter to create() and constructor.
660         * loader/PlaceholderDocument.h: Add KURL parameter to create() and constructor.
661         * loader/PluginDocument.cpp:
662         * loader/PluginDocument.h: Add KURL parameter to create() and constructor.
663         * loader/SinkDocument.cpp:
664         * loader/SinkDocument.h: Add KURL parameter to create() and constructor.
665         * loader/TextDocument.cpp:
666         * loader/TextDocument.h: Add KURL parameter to create() and constructor.
667         * svg/SVGDocument.cpp:
668         * svg/SVGDocument.h: Add KURL parameter to create() and constructor.
669         * xml/DOMParser.cpp:
670         (WebCore::DOMParser::parseFromString):
671         * xml/XMLHttpRequest.cpp:
672         (WebCore::XMLHttpRequest::responseXML):
673         * xml/XSLTProcessor.cpp:
674         (WebCore::XSLTProcessor::createDocumentFromSource):
675
676 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
677
678         Unreviewed, rolling out r61812.
679         http://trac.webkit.org/changeset/61812
680         https://bugs.webkit.org/show_bug.cgi?id=41216
681
682         breaks Chromium workers tests (Requested by mnaganov on
683         #webkit).
684
685         * storage/AbstractDatabase.cpp:
686         * storage/AbstractDatabase.h:
687         * storage/Database.cpp:
688         (WebCore::Database::databaseInfoTableName):
689         (WebCore::guidMutex):
690         (WebCore::guidToVersionMap):
691         (WebCore::updateGuidVersionMap):
692         (WebCore::guidToDatabaseMap):
693         (WebCore::databaseVersionKey):
694         (WebCore::DatabaseCreationCallbackTask::create):
695         (WebCore::DatabaseCreationCallbackTask::performTask):
696         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
697         (WebCore::Database::openDatabase):
698         (WebCore::Database::Database):
699         (WebCore::Database::openAndVerifyVersion):
700         (WebCore::retrieveTextResultFromDatabase):
701         (WebCore::Database::getVersionFromDatabase):
702         (WebCore::setTextValueInDatabase):
703         (WebCore::Database::setVersionInDatabase):
704         (WebCore::Database::versionMatchesExpected):
705         (WebCore::Database::close):
706         (WebCore::Database::disableAuthorizer):
707         (WebCore::Database::enableAuthorizer):
708         (WebCore::Database::setAuthorizerReadOnly):
709         (WebCore::Database::lastActionChangedDatabase):
710         (WebCore::Database::lastActionWasInsert):
711         (WebCore::Database::resetDeletes):
712         (WebCore::Database::hadDeletes):
713         (WebCore::guidForOriginAndName):
714         (WebCore::Database::resetAuthorizer):
715         (WebCore::Database::performOpenAndVerify):
716         (WebCore::Database::performCreationCallback):
717         (WebCore::Database::version):
718         (WebCore::Database::setExpectedVersion):
719         (WebCore::Database::stringIdentifier):
720         (WebCore::Database::displayName):
721         (WebCore::Database::estimatedSize):
722         (WebCore::Database::fileName):
723         * storage/Database.h:
724         (WebCore::Database::scriptExecutionContext):
725         (WebCore::Database::opened):
726         (WebCore::Database::isNew):
727         (WebCore::Database::databaseDebugName):
728         * storage/DatabaseAuthorizer.cpp:
729         (WebCore::DatabaseAuthorizer::DatabaseAuthorizer):
730         (WebCore::DatabaseAuthorizer::denyBasedOnTableName):
731         * storage/DatabaseAuthorizer.h:
732         (WebCore::DatabaseAuthorizer::create):
733         * storage/DatabaseSync.cpp:
734         (WebCore::DatabaseSync::databaseInfoTableName):
735         (WebCore::DatabaseSync::openDatabaseSync):
736         (WebCore::DatabaseSync::DatabaseSync):
737         (WebCore::DatabaseSync::~DatabaseSync):
738         (WebCore::DatabaseSync::version):
739         (WebCore::DatabaseSync::changeVersion):
740         (WebCore::DatabaseSync::transaction):
741         (WebCore::DatabaseSync::scriptExecutionContext):
742         * storage/DatabaseSync.h:
743         (WebCore::DatabaseSync::databaseDebugName):
744         * storage/DatabaseTask.cpp:
745         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
746         (WebCore::DatabaseOpenTask::doPerformTask):
747         * storage/DatabaseTask.h:
748         (WebCore::DatabaseOpenTask::create):
749
750 2010-06-25  Lei Zheng  <lzheng@chromium.org>
751
752         Reviewed by Dimitri Glazkov.
753
754         Add a flag to the ResourceResponse for tracking if a request was fetched when
755         Alternate-protocol is available.
756         https://bugs.webkit.org/show_bug.cgi?id=41001
757
758         No new tests. (This is just a setter and getter.)
759
760         * platform/network/chromium/ResourceResponse.h:
761         (WebCore::ResourceResponse::ResourceResponse):
762         (WebCore::ResourceResponse::wasAlternateProtocolAvailable):
763         (WebCore::ResourceResponse::setWasAlternateProtocolAvailable):
764
765 2010-06-25  Lyon Chen  <liachen@rim.com>
766
767         Reviewed by Darin Adler.
768
769         InspectorCSSStore.cpp is not surrounded with ENABLE(INSPECTOR)
770         https://bugs.webkit.org/show_bug.cgi?id=41004
771
772         Surround InspectorCSSStore.cpp code with ENABLE(INSPECTOR) so it will not
773         break the build when INSPECTOR is disabled.
774
775         * inspector/InspectorCSSStore.cpp:
776
777 2010-06-25  No'am Rosenthal  <noam.rosenthal@nokia.com>
778
779         Reviewed by Simon Hausmann.
780
781         [Qt] WebGL: missing file
782         https://bugs.webkit.org/show_bug.cgi?id=40998
783
784         Added a missing file to WebCore.pro
785
786         No new tests; build fix
787
788         * WebCore.pro:
789
790 2010-06-25  Adam Roben  <aroben@apple.com>
791
792         Windows build fix
793
794         * WebCore.vcproj/WebCore.vcproj: Added a missing </File> tag.
795
796 2010-06-25  Alex Milowski  <alex@milowski.com>
797
798         Reviewed by Kenneth Rohde Christiansen.
799
800         This patch changes the vertical alignment to rely upon baseline
801         alignment for all MathML rendering.  This fixes a number of layout
802         issues and the implementation is much more clean.
803
804         Also, this patch adds a horizontal green line in the debug layout
805         so you can see the top padding of any RenderMathMLBlock instance.
806
807         Test: mathml/presentation/row-alignment.xhtml
808
809         * css/mathml.css:
810         * mathml/RenderMathMLBlock.cpp:
811         * mathml/RenderMathMLFraction.cpp:
812         * mathml/RenderMathMLFraction.h:
813         * mathml/RenderMathMLOperator.cpp:
814         * mathml/RenderMathMLOperator.h:
815         * mathml/RenderMathMLRoot.cpp:
816         * mathml/RenderMathMLRow.cpp:
817         * mathml/RenderMathMLRow.h:
818         * mathml/RenderMathMLSquareRoot.cpp:
819         * mathml/RenderMathMLSubSup.cpp:
820         * mathml/RenderMathMLUnderOver.cpp:
821
822 2010-06-25  Yury Semikhatsky  <yurys@chromium.org>
823
824         Reviewed by Pavel Feldman.
825
826         Can't see source when hitting debugger statement in evaled source
827         https://bugs.webkit.org/show_bug.cgi?id=41058
828
829         Test: inspector/debugger-pause-in-eval-script.html
830
831         * bindings/js/ScriptDebugServer.cpp:
832         (WebCore::ScriptDebugServer::sourceParsed): use lexical global object to figure out
833         where the script is compiled. Otherwise scripts typed in Web Inspector console will
834         be treated as ones evaluated in the context of Web Inspector and won't appear in the
835         scripts list.
836         * inspector/InspectorController.cpp:
837         (WebCore::InspectorController::didParseSource): cache script sources for eval's too.
838
839 2010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
840
841         Reviewed by Kenneth Rohde Christiansen.
842
843         [EFL] Use a descriptive string in FileChooser when multiple files can
844         be selected.
845         https://bugs.webkit.org/show_bug.cgi?id=40943
846
847         EFL port has no tests yet, so no new tests.
848
849         * platform/efl/FileChooserEfl.cpp:
850         (WebCore::FileChooser::basenameForWidth):
851
852 2010-06-25  Nikolas Zimmermann  <nzimmermann@rim.com>
853
854         Reviewed by Dirk Schulze.
855
856         SVG Text Highlighting not yet supported (in Safari)
857         https://bugs.webkit.org/show_bug.cgi?id=41200
858
859         Add text match marker highlighting support for SVG text - searching for SVG text in Safari now paints the nice yellow highlighting rect, and the
860         white rectangles for all text matches. Behaves exactly like HTML text, but respecting SVGs per-character/per-chunk transformations,
861         allowing to highlight textPaths, tspans with absolute per-character positions etc..
862
863         Only manually testable, thus no new tests.
864
865         * rendering/InlineBox.h: Expose calculateBoundaries() in non-SVG builds as well, now used by InlineTextBox too.
866         * rendering/InlineTextBox.h: Add calculateBoundaries(), which will be used to refactor some code in RenderText, see below.
867         (WebCore::InlineTextBox::calculateBoundaries): Just return a IntRect(x(), y(), width(), height()) here.
868         (WebCore::RenderObject::isSVGInlineText):
869         * rendering/RenderSVGInlineText.h:
870         (WebCore::RenderSVGInlineText::isSVGInlineText): Return true for isSVGInlineText(), return false for isSVGText() (default in RenderObject.h)
871         * rendering/RenderSVGRoot.cpp:
872         (WebCore::RenderSVGRoot::paint): Only paint box decorations in PaintPhase(Child)BlockBackground, exit afterwards just like RenderBlock does.
873                                          Otherwise the white text match marker rectangle gets drawn over the yellow highlight that Safari draws. 
874         * rendering/RenderSVGText.cpp:
875         (WebCore::RenderSVGText::paint): Accept a new painting phase: PaintPhaseSelection, used by Safari when drawing the yellow highlight rect.
876         * rendering/RenderText.cpp:
877         (WebCore::RenderText::absoluteQuads): Use calculateBoundaries() instead of IntRect(x(), y(), width(), height()). SVG provides different boundaries here.
878         (WebCore::RenderText::absoluteQuadsForRange): Ditto. This is the main change, leading to correct text highlight placement.
879         * rendering/SVGInlineFlowBox.cpp: Add assertion that painting is not disabled, for consistency. Change paint phase assertion to include PaintPhaseSelection.
880         (WebCore::SVGInlineFlowBox::paint):
881         * rendering/SVGInlineTextBox.cpp:
882         (WebCore::SVGInlineTextBox::selectionRectForTextChunkPart): Refactored from selectionRect(), to share code between selectionRect/computeTextMatchMarkerRect.
883         (WebCore::SVGInlineTextBox::selectionRect): Use new helper function selectionRectForTextChunkPart().
884         (WebCore::SVGInlineTextBox::paint): Ditto. Call new computeTextMatchMarkerRect() function.
885         (WebCore::SVGInlineTextBox::computeTextMatchMarkerRect): Implemented similar to HTML, but respecting SVGs concept of text chunk parts.
886         (WebCore::SVGInlineTextBox::paintText): In PaintPhaseSelection, only paint selected text, not anything before/after the selection start/end.
887         (WebCore::SVGInlineTextBox::calculateBoundaries): Early exit, if m_chunkTransformation is identity.
888         * rendering/SVGInlineTextBox.h: Added "bool paintSelectedTextOnly" to paintText() and add new computeTextMatchMarkerRect(RenderStyle*) function.
889         * rendering/SVGRootInlineBox.cpp:
890         (WebCore::SVGRootInlineBox::paint): Change paint phase assertion to include PaintPhaseSelection.
891
892 2010-06-25  John Gregg  <johnnyg@google.com>
893
894         Reviewed by Darin Fisher.
895
896         Notification should expose ltr/rtl as TextDirection, not String
897         https://bugs.webkit.org/show_bug.cgi?id=40871
898
899         No new tests; existing test covers this, just renaming a method.
900
901         * notifications/Notification.h:
902         (WebCore::Notification::direction):
903
904 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
905
906         Unreviewed, rolling out r61842.
907         http://trac.webkit.org/changeset/61842
908         https://bugs.webkit.org/show_bug.cgi?id=41208
909
910         It broke Windows build (Requested by Ossy_ on #webkit).
911
912         * ForwardingHeaders/wtf/win/OwnPtrWin.h: Removed.
913
914 2010-06-25  Patrick Gansterer  <paroga@paroga.com>
915
916         Reviewed by Darin Adler.
917
918         Remove unneeded whitespace from svgtags.in.
919         https://bugs.webkit.org/show_bug.cgi?id=40912
920
921         make_names.pl throws an error at non-empty lines
922         when using cl.exe as preprocessor.
923
924         * svg/svgtags.in:
925
926 2010-06-25  Nikolas Zimmermann  <nzimmermann@rim.com>
927
928         Reviewed by Rob Buis.
929
930         Split up isSVGText() in isSVGText() / isSVGInlineText()
931         https://bugs.webkit.org/show_bug.cgi?id=41204
932
933         Introduce isSVGInlineText(), to provide a safe mechanism to differentiate between RenderSVGText / RenderSVGInlineText.
934         No change in functionality, thus no new tests.
935
936         * rendering/RenderBlockLineLayout.cpp:
937         (WebCore::shouldPreserveNewline): s/isSVGText/isSVGInlineText/
938         (WebCore::RenderBlock::findNextLineBreak): Ditto.
939         * rendering/RenderObject.h:
940         (WebCore::RenderObject::isSVGInlineText): Return false, by default.
941         * rendering/RenderSVGInlineText.h:
942         (WebCore::RenderSVGInlineText::isSVGInlineText): Return true here, don't return true anymore for isSVGText().
943         * rendering/RenderText.cpp:
944         (WebCore::RenderText::setTextInternal): s/isSVGText/isSVGInlineText/
945         * rendering/RenderTreeAsText.cpp: Remove hack, now that we can properly differentiate between RenderSVGText / RenderSVGInlineText.
946         (WebCore::write):
947
948 2010-06-25  Kwang Yul Seo  <skyul@company100.net>
949
950         Reviewed by Adam Barth.
951
952         Change OwnPtrCommon to include platform-specific headers
953         https://bugs.webkit.org/show_bug.cgi?id=40279
954
955         Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
956         Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
957
958         * ForwardingHeaders/wtf/win: Added.
959         * ForwardingHeaders/wtf/win/OwnPtrWin.h: Added.
960
961 2010-06-25  Patrick Gansterer  <paroga@paroga.com>
962
963         Reviewed by Adam Barth.
964
965         Implement TextCodecs for WinCE port.
966         https://bugs.webkit.org/show_bug.cgi?id=32169
967         Originally written by Yong Li <yong.li@torchmobile.com>
968
969         * platform/graphics/FontCache.h:
970         * platform/graphics/wince/FontCacheWince.cpp:
971         (WebCore::FontCache::getMultiLanguageInterface):
972         * platform/text/wince/TextCodecWinCE.cpp: Added.
973         (WebCore::codePageCharsets):
974         (WebCore::knownCharsets):
975         (WebCore::supportedCharsets):
976         (WebCore::languageManager):
977         (WebCore::addCharset):
978         (WebCore::LanguageManager::LanguageManager):
979         (WebCore::getCodePage):
980         (WebCore::newTextCodecWinCE):
981         (WebCore::TextCodecWinCE::TextCodecWinCE):
982         (WebCore::TextCodecWinCE::~TextCodecWinCE):
983         (WebCore::TextCodecWinCE::registerBaseEncodingNames):
984         (WebCore::TextCodecWinCE::registerBaseCodecs):
985         (WebCore::TextCodecWinCE::registerExtendedEncodingNames):
986         (WebCore::TextCodecWinCE::registerExtendedCodecs):
987         (WebCore::getCodePageFlags):
988         (WebCore::findFirstNonAsciiCharacter):
989         (WebCore::decode):
990         (WebCore::TextCodecWinCE::decode):
991         (WebCore::TextCodecWinCE::encode):
992         (WebCore::TextCodecWinCE::enumerateSupportedEncodings):
993         * platform/text/wince/TextCodecWinCE.h: Added.
994
995 2010-06-24  Rob Buis  <rwlbuis@gmail.com>
996
997         Reviewed by Dirk Schulze.
998
999         Bug 40880 - SVG properties fill and stroke do not accept system colors
1000         https://bugs.webkit.org/show_bug.cgi?id=40880
1001
1002         Handle css system colors in fill and stroke properties.
1003
1004         Test: svg/css/rect-system-color.xhtml
1005
1006         * css/CSSParser.cpp: Remove comment and unneeded if condition
1007         (WebCore::CSSParser::parseValue):
1008         * css/SVGCSSParser.cpp: Allow css system colors
1009         (WebCore::CSSParser::parseSVGValue):
1010
1011 2010-06-24  Eric Seidel  <eric@webkit.org>
1012
1013         Reviewed by Adam Barth.
1014
1015         Make DocumentParser API private on subclasses to catch misuse bugs
1016         https://bugs.webkit.org/show_bug.cgi?id=41186
1017
1018         This already found one bug:
1019         https://bugs.webkit.org/show_bug.cgi?id=41187
1020
1021         Added a new HTMLDocumentParaser::parseDocumentFragment so that
1022         DocumentFragment.cpp does not need to use private methods.
1023
1024         * dom/DocumentFragment.cpp:
1025         (WebCore::DocumentFragment::parseHTML):
1026         * dom/XMLDocumentParser.h:
1027         (WebCore::XMLDocumentParser::setIsXHTMLDocument):
1028         (WebCore::XMLDocumentParser::isXHTMLDocument):
1029         (WebCore::XMLDocumentParser::setIsXHTMLMPDocument):
1030         (WebCore::XMLDocumentParser::isXHTMLMPDocument):
1031         * html/HTMLDocumentParser.cpp:
1032         (WebCore::HTMLDocumentParser::parseDocumentFragment):
1033         * html/HTMLDocumentParser.h:
1034         * html/LegacyHTMLDocumentParser.cpp:
1035         (WebCore::LegacyHTMLDocumentParser::parseDocumentFragment):
1036         * html/LegacyHTMLDocumentParser.h:
1037         (WebCore::LegacyHTMLDocumentParser::forceSynchronous):
1038         (WebCore::LegacyHTMLDocumentParser::processingContentWrittenByScript):
1039         * html/LegacyHTMLTreeBuilder.cpp:
1040         (WebCore::LegacyHTMLTreeBuilder::reportErrorToConsole):
1041         * loader/DocumentWriter.cpp:
1042         (WebCore::DocumentWriter::replaceDocument):
1043         * loader/TextDocument.cpp:
1044
1045 2010-05-28  Philippe Normand  <pnormand@igalia.com>
1046
1047         Reviewed by Gustavo Noronha.
1048
1049         [GStreamer] multiple video sink support
1050         https://bugs.webkit.org/show_bug.cgi?id=39472
1051
1052         Playbin2 video-sink is now a bin containing a tee element capable
1053         of dispatching the buffers to multiple video sinks. By default
1054         only our webkit video sink is used. This will allow
1055         GStreamerGWorld to add support for autovideosink in the future.
1056
1057         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1058         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1059         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1060         (WebCore::MediaPlayerPrivateGStreamer::naturalSize):
1061         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
1062         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1063
1064 2010-06-24  Adam Barth  <abarth@webkit.org>
1065
1066         Reviewed by Eric Seidel.
1067
1068         Sketch out AfterHeadMode for tree builder
1069         https://bugs.webkit.org/show_bug.cgi?id=41191
1070
1071         This mode is fairly similar to the others.  I needed to change some of
1072         the types around w.r.t. Nodes/Elements.
1073
1074         * html/HTMLTreeBuilder.cpp:
1075         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
1076         (WebCore::HTMLTreeBuilder::processToken):
1077         (WebCore::HTMLTreeBuilder::insertElement):
1078         * html/HTMLTreeBuilder.h:
1079         (WebCore::HTMLTreeBuilder::ElementStack::push):
1080         (WebCore::HTMLTreeBuilder::ElementStack::remove):
1081
1082 2010-06-24  Adam Barth  <abarth@webkit.org>
1083
1084         Reviewed by Eric Seidel.
1085
1086         Sketch out InHeadNoscriptMode for tree builder
1087         https://bugs.webkit.org/show_bug.cgi?id=41189
1088
1089         Lots of notImplemented() calls in this state.  I need to figure how to
1090         delegate handling of a token from one state to another.
1091
1092         * html/HTMLTreeBuilder.cpp:
1093         (WebCore::HTMLTreeBuilder::processToken):
1094
1095 2010-06-24  Adam Barth  <abarth@webkit.org>
1096
1097         Reviewed by Eric Seidel.
1098
1099         Sketch out InHeadMode for tree builder
1100         https://bugs.webkit.org/show_bug.cgi?id=41184
1101
1102         This state is relatively straightforward.  We introduce the stack of
1103         open elements to track that notion in the spec.  The old tree builder
1104         has a nice data structure for that, which we'll probably steal, but I'd
1105         like to see what the full API is first.
1106
1107         * html/HTMLTreeBuilder.cpp:
1108         (WebCore::HTMLTreeBuilder::processToken):
1109         (WebCore::HTMLTreeBuilder::insertCharacter):
1110         (WebCore::HTMLTreeBuilder::insertGenericRCDATAElement):
1111         (WebCore::HTMLTreeBuilder::insertGenericRawTextElement):
1112         (WebCore::HTMLTreeBuilder::insertScriptElement):
1113         * html/HTMLTreeBuilder.h:
1114         (WebCore::HTMLTreeBuilder::ElementStack::pop):
1115         (WebCore::HTMLTreeBuilder::ElementStack::top):
1116
1117 2010-06-24  Adam Barth  <abarth@webkit.org>
1118
1119         Reviewed by Eric Seidel.
1120
1121         Sketch out BeforeHeadMode tree builder state
1122         https://bugs.webkit.org/show_bug.cgi?id=41183
1123
1124         This makes procesToken recursive, which might not be the best idea.
1125         Also, we can now make fake AtomicHTMLTokens for use by the algorithm.
1126
1127         * html/HTMLToken.h:
1128         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1129         * html/HTMLTreeBuilder.cpp:
1130         (WebCore::HTMLTreeBuilder::processToken):
1131         (WebCore::HTMLTreeBuilder::insertElement):
1132         * html/HTMLTreeBuilder.h:
1133
1134 2010-06-22 Antonio Gomes <tonikitoo@webkit.org>
1135
1136         Reviewed by David Hyatt.
1137
1138         Add a NodeList-derivated wrapper class for a ListHashSet.
1139         https://bugs.webkit.org/show_bug.cgi?id=41081
1140
1141         StaticHashSetList will work as a wrapper to ListHashSet objects that are
1142         aimed to be exposed to the DOM.
1143
1144         As a use case, the rect based HitTest (bug 40197) will store the retrieved nodes
1145         in a ListHashSet. It is going to be exposed to the DOM through are nodesFromRect
1146         of Document returning a NodeList (i.e. StatisHashSetList) wrapping a ListHashSet.
1147
1148         No new tests.
1149
1150 2010-06-24  Cris Neckar  <cdn@chromium.org>
1151
1152         Reviewed by Darin Fisher.
1153
1154         [Chromium] Out of bounds write in WebCore::PNGImageDecoder::rowAvailable
1155         https://bugs.webkit.org/show_bug.cgi?id=40798
1156
1157         Catches error in row callback for libPNG when extra rows are returned.
1158
1159         Test: fast/images/png-extra-row-crash.html
1160
1161         * platform/image-decoders/png/PNGImageDecoder.cpp:
1162         (WebCore::PNGImageDecoder::rowAvailable):
1163
1164 2010-06-24  Eric Seidel  <eric@webkit.org>
1165
1166         Reviewed by Adam Barth.
1167
1168         Clean up and document DocumentWriter::replaceDocument code path
1169         https://bugs.webkit.org/show_bug.cgi?id=41182
1170
1171         No functional changes, thus no tests.
1172
1173         * loader/DocumentWriter.cpp:
1174         (WebCore::DocumentWriter::replaceDocument):
1175          - Remove comment which could be misleading.
1176
1177 2010-06-23  Dumitru Daniliuc  <dumi@chromium.org>
1178
1179         Reviewed by Adam Barth.
1180
1181         Implementing DatabaseSync::openDatabaseSync().
1182         https://bugs.webkit.org/show_bug.cgi?id=40607
1183
1184         Moved some common code from Database to AbstractDatabase. Made
1185         performOpenAndVerify() virtual, since DatabaseSync doesn't need to
1186         interact with DatabaseThread. Removed the m_creationCallback
1187         field, since it's only needed in the openDatabase{Sync} methods.
1188
1189         * storage/AbstractDatabase.cpp:
1190         (WebCore::retrieveTextResultFromDatabase):
1191         (WebCore::setTextValueInDatabase):
1192         (WebCore::guidMutex):
1193         (WebCore::guidToVersionMap):
1194         (WebCore::updateGuidVersionMap):
1195         (WebCore::guidToDatabaseMap):
1196         (WebCore::guidForOriginAndName):
1197         (WebCore::AbstractDatabase::databaseInfoTableName):
1198         (WebCore::AbstractDatabase::AbstractDatabase):
1199         (WebCore::AbstractDatabase::closeDatabase):
1200         (WebCore::AbstractDatabase::version):
1201         (WebCore::AbstractDatabase::performOpenAndVerify):
1202         (WebCore::AbstractDatabase::scriptExecutionContext):
1203         (WebCore::AbstractDatabase::securityOrigin):
1204         (WebCore::AbstractDatabase::stringIdentifier):
1205         (WebCore::AbstractDatabase::displayName):
1206         (WebCore::AbstractDatabase::estimatedSize):
1207         (WebCore::AbstractDatabase::fileName):
1208         (WebCore::AbstractDatabase::databaseVersionKey):
1209         (WebCore::AbstractDatabase::getVersionFromDatabase):
1210         (WebCore::AbstractDatabase::setVersionInDatabase):
1211         (WebCore::AbstractDatabase::versionMatchesExpected):
1212         (WebCore::AbstractDatabase::setExpectedVersion):
1213         (WebCore::AbstractDatabase::disableAuthorizer):
1214         (WebCore::AbstractDatabase::enableAuthorizer):
1215         (WebCore::AbstractDatabase::setAuthorizerReadOnly):
1216         (WebCore::AbstractDatabase::lastActionChangedDatabase):
1217         (WebCore::AbstractDatabase::lastActionWasInsert):
1218         (WebCore::AbstractDatabase::resetDeletes):
1219         (WebCore::AbstractDatabase::hadDeletes):
1220         (WebCore::AbstractDatabase::resetAuthorizer):
1221         * storage/AbstractDatabase.h:
1222         (WebCore::AbstractDatabase::opened):
1223         (WebCore::AbstractDatabase::isNew):
1224         (WebCore::AbstractDatabase::databaseDebugName):
1225         * storage/Database.cpp:
1226         (WebCore::DatabaseCreationCallbackTask::create):
1227         (WebCore::DatabaseCreationCallbackTask::performTask):
1228         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
1229         (WebCore::Database::openDatabase):
1230         (WebCore::Database::Database):
1231         (WebCore::Database::version):
1232         (WebCore::Database::openAndVerifyVersion):
1233         (WebCore::Database::close):
1234         (WebCore::Database::stop):
1235         (WebCore::Database::performOpenAndVerify):
1236         * storage/Database.h:
1237         (WebCore::Database::sqliteDatabase):
1238         * storage/DatabaseAuthorizer.cpp:
1239         (WebCore::DatabaseAuthorizer::create):
1240         (WebCore::DatabaseAuthorizer::DatabaseAuthorizer):
1241         (WebCore::DatabaseAuthorizer::denyBasedOnTableName):
1242         * storage/DatabaseAuthorizer.h:
1243         * storage/DatabaseSync.cpp:
1244         (WebCore::DatabaseSync::openDatabaseSync):
1245         (WebCore::DatabaseSync::DatabaseSync):
1246         (WebCore::DatabaseSync::changeVersion):
1247         (WebCore::DatabaseSync::transaction):
1248         (WebCore::DatabaseSync::markAsDeletedAndClose):
1249         (WebCore::CloseSyncDatabaseOnContextThreadTask::create):
1250         (WebCore::CloseSyncDatabaseOnContextThreadTask::performTask):
1251         (WebCore::CloseSyncDatabaseOnContextThreadTask::CloseSyncDatabaseOnContextThreadTask):
1252         (WebCore::DatabaseSync::closeImmediately):
1253         * storage/DatabaseSync.h:
1254         * storage/DatabaseTask.cpp:
1255         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
1256         (WebCore::DatabaseOpenTask::doPerformTask):
1257         * storage/DatabaseTask.h:
1258         (WebCore::DatabaseOpenTask::create):
1259
1260 2010-06-24  Steve Falkenburg  <sfalken@apple.com>
1261
1262         Windows build fix.
1263
1264         * platform/network/cf/AuthenticationCF.h:
1265
1266 2010-06-24  Martin Robinson  <mrobinson@igalia.com>
1267
1268         Unreviewed. Build fix.
1269
1270         Fix the build after r61798.
1271
1272         * platform/gtk/PasteboardHelper.cpp:
1273         (WebCore::PasteboardHelper::getClipboardContents):
1274
1275 2010-06-24  Alexey Proskuryakov  <ap@apple.com>
1276
1277         Reviewed by Brady Eidson.
1278
1279         https://bugs.webkit.org/show_bug.cgi?id=41178
1280         Timed refresh in subframes isn't stopped when going into b/f cache
1281
1282         Test: fast/history/timed-refresh-in-cached-frame.html
1283
1284         * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): Top frame's stopLoading()
1285         won't help cached subframes; stop loading from here.
1286
1287         * loader/FrameLoader.cpp:
1288         (WebCore::FrameLoader::stopLoading): Don't stop loading in child frames. This didn't work
1289         for cached frames due to frame tree having been already desonstructed, and it's not necessary
1290         in non-cached case because stopLoading() will be called for subframes via
1291         FrameLoader::detachFromParent() and closeURL().
1292         (WebCore::FrameLoader::pageHidden): This was a second code path that dispatched pagehide
1293         event - it's no longer needed, because everything goes through FrameLoader::stopLoading().
1294         (WebCore::FrameLoader::commitProvisionalLoad): Don't call pageHidden(), the code for adding
1295         frame to b/f cache will do everything.
1296
1297         * loader/FrameLoader.h: Removed pageHidden().
1298
1299 2010-06-24  Eric Seidel  <eric@webkit.org>
1300
1301         Unreviewed. Fix the build.  I am a bad man.
1302
1303         * loader/DocumentWriter.cpp:
1304         (WebCore::DocumentWriter::replaceDocument):
1305
1306 2010-06-24  Martin Robinson  <mrobinson@igalia.com>
1307
1308         Reviewed by Xan Lopez.
1309
1310         Build fix for building against GTK+ 3.x.
1311
1312         No new tests as functionality has not changed.
1313
1314         * platform/gtk/GtkVersioning.h:
1315         * platform/gtk/PasteboardHelper.cpp:
1316         (WebCore::PasteboardHelper::getClipboardContents):
1317         (WebCore::PasteboardHelper::fillSelectionData):
1318
1319 2010-06-24  Eric Seidel  <eric@webkit.org>
1320
1321         Reviewed by Adam Barth.
1322
1323         Clean up and document DocumentWriter::replaceDocument code path
1324         https://bugs.webkit.org/show_bug.cgi?id=41182
1325
1326         No functional change, thus no test.
1327
1328         * loader/DocumentWriter.cpp:
1329         (WebCore::DocumentWriter::replaceDocument):
1330         * loader/DocumentWriter.h:
1331
1332 2010-06-24  Jer Noble  <jer.noble@apple.com>
1333
1334         Reviewed by Eric Carlson.
1335
1336         Full-screened content doesn't keep the display on: Safari not grabbing a power assertion?
1337         https://bugs.webkit.org/show_bug.cgi?id=40939
1338         rdar://problem/7996172
1339         
1340         Export -[MediaElement playbackRate];
1341         
1342         * WebCore.Video.exp:
1343
1344 2010-06-21  Evan Martin  <evan@chromium.org>
1345
1346         Reviewed by Adam Barth.
1347
1348         [chromium] overlapping characters in complex text
1349         https://bugs.webkit.org/show_bug.cgi?id=40966
1350
1351         We need to clear all the buffers we hand to Harfbuzz before we use them.
1352         While I'm here, refactor the code slightly to make its behavior more
1353         clear and correct (previously, we would repeatedly double our buffer
1354         size when we could have just sized it correctly on the second try).
1355
1356         * platform/graphics/chromium/FontLinux.cpp:
1357         (WebCore::TextRunWalker::TextRunWalker):
1358         (WebCore::TextRunWalker::nextScriptRun):
1359         (WebCore::TextRunWalker::createGlyphArrays):
1360         (WebCore::TextRunWalker::shapeGlyphs):
1361
1362 2010-06-24  Adele Peterson  <adele@apple.com>
1363
1364         Reviewed by Sam Weinig.
1365
1366         Updated fix for <rdar://problem/8093680> "Paste and Match Style" should fire paste events
1367         https://bugs.webkit.org/show_bug.cgi?id=41085
1368
1369         Covered by existing tests.
1370
1371         * editing/EditorCommand.cpp:
1372         (WebCore::executePasteAsPlainText): Added.
1373         (WebCore::createCommandMap): Added pasteAsPlainText command.
1374
1375 2010-06-24  Adam Barth  <abarth@webkit.org>
1376
1377         Reviewed by Eric Seidel.
1378
1379         Sketch out BeforeHTMLMode state
1380         https://bugs.webkit.org/show_bug.cgi?id=41133
1381
1382         In this patch, we switch the TreeBuidler over to using AtomicHTMLTokens
1383         and sketch out another state.  These states don't actually do anything
1384         yet, I'm still just getting the structure of the spec into the code so
1385         we can implement the details incrementally.
1386
1387         * html/HTMLTreeBuilder.cpp:
1388         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
1389         (WebCore::HTMLTreeBuilder::processToken):
1390         (WebCore::HTMLTreeBuilder::insertDoctype):
1391         (WebCore::HTMLTreeBuilder::insertComment):
1392         * html/HTMLTreeBuilder.h:
1393         (WebCore::HTMLTreeBuilder::parseError):
1394
1395 2010-06-24  Adam Barth  <abarth@webkit.org>
1396
1397         Reviewed by Eric Seidel.
1398
1399         Add AtomicHTMLToken
1400         https://bugs.webkit.org/show_bug.cgi?id=41131
1401
1402         We need an atomized version of the token for use in the tree builder.
1403         Eventually, we should make the existing HTMLToken an internal detail of
1404         the HTMLTokenizer.  This new AtomicHTMLToken should be also be more
1405         easily cached between the preload scanner and the tree builder.
1406
1407         * html/HTMLToken.h:
1408         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1409         (WebCore::AtomicHTMLToken::type):
1410         (WebCore::AtomicHTMLToken::name):
1411         (WebCore::AtomicHTMLToken::selfClosing):
1412         (WebCore::AtomicHTMLToken::attributes):
1413         (WebCore::AtomicHTMLToken::characters):
1414         (WebCore::AtomicHTMLToken::comment):
1415         (WebCore::AtomicHTMLToken::publicIdentifier):
1416         (WebCore::AtomicHTMLToken::systemIdentifier):
1417         (WebCore::AtomicHTMLToken::forceQuirks):
1418         * html/HTMLTreeBuilder.cpp:
1419         (WebCore::convertToOldStyle):
1420         (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
1421
1422 2010-06-24  Eric Seidel  <eric@webkit.org>
1423
1424         Reviewed by Adam Barth.
1425
1426         Add RawDataDocumentParser to get rid of a bunch of copy/paste code in DocumentParser subclasses
1427         https://bugs.webkit.org/show_bug.cgi?id=41136
1428
1429         I think this is likely far from the final design,
1430         however this is almost entirely minus lines which is a
1431         good thing.
1432
1433         The original authors of these DocumentParser subclasses
1434         seem to have just copied the files whole, as they all
1435         had the same includes, many of which were unnecessary for
1436         some of the files.
1437
1438         I think eventually the FrameLoader will call a virtual
1439         DocumentParser::appendData which will in turn decode
1440         and call another write/appendData call.  In the case
1441         of these RawDataDocumentParsers, they will just override
1442         the low-level appendData call instead of needing
1443         DocumentWriter to have a special if based on
1444         DocumentParser::wantsRawData.
1445
1446         No functional change, thus no tests.
1447
1448         * GNUmakefile.am:
1449         * WebCore.gypi:
1450         * WebCore.pro:
1451         * WebCore.xcodeproj/project.pbxproj:
1452         * dom/DocumentParser.h:
1453         (WebCore::DocumentParser::writeRawData):
1454         * loader/ImageDocument.cpp:
1455         (WebCore::ImageDocumentParser::ImageDocumentParser):
1456         (WebCore::ImageDocumentParser::finish):
1457         * loader/MediaDocument.cpp:
1458         (WebCore::MediaDocumentParser::MediaDocumentParser):
1459         (WebCore::MediaDocumentParser::writeRawData):
1460         * loader/PluginDocument.cpp:
1461         (WebCore::PluginDocumentParser::PluginDocumentParser):
1462         * loader/SinkDocument.cpp:
1463         (WebCore::SinkDocument::createParser):
1464
1465 2010-06-23  Peter Kasting  <pkasting@google.com>
1466
1467         Reviewed by Adam Barth.
1468
1469         REGRESSION (r61619): Memory corruption in open-source ICO decoder
1470         https://bugs.webkit.org/show_bug.cgi?id=41107
1471
1472         * platform/image-decoders/bmp/BMPImageReader.cpp:
1473         (WebCore::BMPImageReader::processInfoHeader): Fix memory corruption.
1474         * platform/image-decoders/ico/ICOImageDecoder.cpp:
1475         (WebCore::ICOImageDecoder::processDirectoryEntries): Handle sizing failure correctly (though failure should be impossible).
1476
1477 2010-06-24  Sheriff Bot  <webkit.review.bot@gmail.com>
1478
1479         Unreviewed, rolling out r61783.
1480         http://trac.webkit.org/changeset/61783
1481         https://bugs.webkit.org/show_bug.cgi?id=41179
1482
1483         Caused a couple of test failures (Requested by japhet on
1484         #webkit).
1485
1486         * dom/DOMImplementation.cpp:
1487         (WebCore::DOMImplementation::createDocument):
1488         (WebCore::DOMImplementation::createHTMLDocument):
1489         * dom/DOMImplementation.h:
1490         * dom/Document.cpp:
1491         (WebCore::Document::Document):
1492         (WebCore::Document::initSecurityContext):
1493         * dom/Document.h:
1494         (WebCore::Document::create):
1495         (WebCore::Document::createXHTML):
1496         * html/HTMLDocument.cpp:
1497         (WebCore::HTMLDocument::HTMLDocument):
1498         * html/HTMLDocument.h:
1499         (WebCore::HTMLDocument::create):
1500         * html/HTMLViewSourceDocument.cpp:
1501         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1502         * html/HTMLViewSourceDocument.h:
1503         (WebCore::HTMLViewSourceDocument::create):
1504         * loader/CachedFont.cpp:
1505         (WebCore::CachedFont::ensureSVGFontData):
1506         * loader/DocumentWriter.cpp:
1507         (WebCore::DocumentWriter::createDocument):
1508         (WebCore::DocumentWriter::begin):
1509         * loader/DocumentWriter.h:
1510         * loader/FTPDirectoryDocument.cpp:
1511         (WebCore::FTPDirectoryDocument::FTPDirectoryDocument):
1512         * loader/FTPDirectoryDocument.h:
1513         (WebCore::FTPDirectoryDocument::create):
1514         * loader/ImageDocument.cpp:
1515         (WebCore::ImageDocument::ImageDocument):
1516         * loader/ImageDocument.h:
1517         (WebCore::ImageDocument::create):
1518         * loader/MediaDocument.cpp:
1519         (WebCore::MediaDocument::MediaDocument):
1520         * loader/MediaDocument.h:
1521         (WebCore::MediaDocument::create):
1522         * loader/PlaceholderDocument.h:
1523         (WebCore::PlaceholderDocument::create):
1524         (WebCore::PlaceholderDocument::PlaceholderDocument):
1525         * loader/PluginDocument.cpp:
1526         (WebCore::PluginDocument::PluginDocument):
1527         * loader/PluginDocument.h:
1528         (WebCore::PluginDocument::create):
1529         * loader/SinkDocument.cpp:
1530         (WebCore::SinkDocument::SinkDocument):
1531         * loader/SinkDocument.h:
1532         (WebCore::SinkDocument::create):
1533         * loader/TextDocument.cpp:
1534         (WebCore::TextDocument::TextDocument):
1535         * loader/TextDocument.h:
1536         (WebCore::TextDocument::create):
1537         * svg/SVGDocument.cpp:
1538         (WebCore::SVGDocument::SVGDocument):
1539         * svg/SVGDocument.h:
1540         (WebCore::SVGDocument::create):
1541         * xml/DOMParser.cpp:
1542         (WebCore::DOMParser::parseFromString):
1543         * xml/XMLHttpRequest.cpp:
1544         (WebCore::XMLHttpRequest::responseXML):
1545         * xml/XSLTProcessor.cpp:
1546         (WebCore::XSLTProcessor::createDocumentFromSource):
1547
1548 2010-06-24  Martin Robinson  <mrobinson@igalia.com>
1549
1550         Reviewed by Xan Lopez.
1551
1552         [GTK] Small code cleanup in RenderThemeGtk
1553         https://bugs.webkit.org/show_bug.cgi?id=40989
1554
1555         Reduce the amount of duplicated code slightly and prepare this section for
1556         future improvements, such as sharing the clipping rectangle calculation with
1557         the slow path.
1558
1559         No new tests as functionality has not changed.
1560
1561         * platform/gtk/RenderThemeGtk.cpp:
1562         (WebCore::paintMozillaGtkWidget): Small code cleanup.
1563
1564 2010-06-24  Nate Chapin  <japhet@chromium.org>
1565
1566         Reviewed by Adam Barth.
1567
1568         Take a KURL parameter in Document's constructor.
1569         This will remove the one case where Document::url() 
1570         and FrameLoader::url() are not equal, allowing us to
1571         remove FrameLoader::url().
1572
1573         https://bugs.webkit.org/show_bug.cgi?id=41166
1574
1575         Refactor only, no new tests.
1576
1577         * dom/DOMImplementation.cpp:
1578         (WebCore::DOMImplementation::createDocument): Take a KURL and pass it through to Document.
1579         (WebCore::DOMImplementation::createHTMLDocument):
1580         * dom/DOMImplementation.h:
1581         * dom/Document.cpp:
1582         (WebCore::Document::Document): Call setURL() for non-empty KURL input parameters.
1583         (WebCore::Document::initSecurityContext): m_url is now initialized, so use it instead
1584             of m_frame->loader()->url() for initializing the SecurityOrigin.
1585         * dom/Document.h:
1586         (WebCore::Document::create):
1587         (WebCore::Document::createXHTML):
1588         * html/HTMLDocument.cpp:
1589         * html/HTMLDocument.h: Add KURL parameter to create() and constructor.
1590         * html/HTMLViewSourceDocument.cpp:
1591         * html/HTMLViewSourceDocument.h: Add KURL parameter to create() and constructor.
1592         * loader/CachedFont.cpp:
1593         (WebCore::CachedFont::ensureSVGFontData):
1594         * loader/DocumentWriter.cpp:
1595         (WebCore::DocumentWriter::createDocument): Take a KURL and pass it through to Document.
1596         (WebCore::DocumentWriter::begin): Pass existing url parameter to constructors, and remove
1597             redundant Document::setURL() call.
1598         * loader/DocumentWriter.h:
1599         * loader/FTPDirectoryDocument.cpp:
1600         * loader/FTPDirectoryDocument.h: Add KURL parameter to create() and constructor.
1601         * loader/ImageDocument.cpp:
1602         * loader/ImageDocument.h: Add KURL parameter to create() and constructor.
1603         * loader/MediaDocument.cpp:
1604         * loader/MediaDocument.h: Add KURL parameter to create() and constructor.
1605         * loader/PlaceholderDocument.h: Add KURL parameter to create() and constructor.
1606         * loader/PluginDocument.cpp:
1607         * loader/PluginDocument.h: Add KURL parameter to create() and constructor.
1608         * loader/SinkDocument.cpp:
1609         * loader/SinkDocument.h: Add KURL parameter to create() and constructor.
1610         * loader/TextDocument.cpp:
1611         * loader/TextDocument.h: Add KURL parameter to create() and constructor.
1612         * svg/SVGDocument.cpp:
1613         * svg/SVGDocument.h: Add KURL parameter to create() and constructor.
1614         * xml/DOMParser.cpp:
1615         (WebCore::DOMParser::parseFromString):
1616         * xml/XMLHttpRequest.cpp:
1617         (WebCore::XMLHttpRequest::responseXML):
1618         * xml/XSLTProcessor.cpp:
1619         (WebCore::XSLTProcessor::createDocumentFromSource):
1620
1621 2010-06-24  Brady Eidson  <beidson@apple.com>
1622
1623         Reviewed by Sam Weinig.
1624
1625         <rdar://problem/8044645> and https://bugs.webkit.org/show_bug.cgi?id=41082
1626
1627         Webarchives will null main resource cause a repro crash.
1628
1629         Test: webarchive/loading/mainresource-null-mimetype-crash.html
1630
1631         * loader/archive/cf/LegacyWebArchive.cpp:
1632         (WebCore::LegacyWebArchive::createResource): Fail to create the archive resource if the main resource's
1633           mime type is null.
1634
1635 2010-06-24  Damian Kaleta  <dkaleta@apple.com>
1636
1637         Reviewed by Sam Weinig.
1638
1639         Provide a way to obtain the rendered rectangle for box elements.
1640
1641         * WebCore.base.exp: Export the symbol so we can see it in WebKit.
1642         * dom/Node.cpp:
1643         (WebCore::Node::renderRect): Added new ethod that will return a rendered rectangle for box elements.
1644         * dom/Node.h: Ditto.
1645
1646 2010-06-24  Vangelis Kokkevis  <vangelis@chromium.org>
1647
1648         Reviewed by Darin Fisher.
1649
1650         [Chromium] Create specialized classes for Transform,
1651         Image and WebGL layers to replace the rather monolithic LayerChromium class.
1652         Layers can now own the GL texture they use for backing store and a different
1653         shading program can be used by the compositor for each layer type. WebGL layers
1654         are not yet hooked up to GraphicsContext3D.
1655         https://bugs.webkit.org/show_bug.cgi?id=41106
1656
1657         * WebCore.gypi:
1658         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1659         (WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
1660         (WebCore::GraphicsLayerChromium::setContentsToImage):
1661         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
1662         * platform/graphics/chromium/GraphicsLayerChromium.h:
1663         (WebCore::GraphicsLayerChromium::):
1664         * platform/graphics/chromium/ImageLayerChromium.cpp: Added.
1665         (WebCore::ImageLayerChromium::create):
1666         (WebCore::ImageLayerChromium::ImageLayerChromium):
1667         (WebCore::ImageLayerChromium::setContents):
1668         (WebCore::ImageLayerChromium::updateTextureContents):
1669         * platform/graphics/chromium/ImageLayerChromium.h: Added.
1670         (WebCore::ImageLayerChromium::drawsContent):
1671         * platform/graphics/chromium/LayerChromium.cpp:
1672         (WebCore::LayerChromium::create):
1673         (WebCore::LayerChromium::LayerChromium):
1674         (WebCore::LayerChromium::updateTextureContents):
1675         (WebCore::LayerChromium::updateTextureRect):
1676         * platform/graphics/chromium/LayerChromium.h:
1677         (WebCore::LayerChromium::drawsContent):
1678         (WebCore::LayerChromium::ownsTexture):
1679         (WebCore::LayerChromium::textureId):
1680         (WebCore::LayerChromium::setShaderProgramId):
1681         (WebCore::LayerChromium::shaderProgramId):
1682         * platform/graphics/chromium/LayerRendererChromium.cpp:
1683         (WebCore::LayerRendererChromium::createLayerShader):
1684         (WebCore::ShaderProgram::ShaderProgram):
1685         (WebCore::LayerRendererChromium::LayerRendererChromium):
1686         (WebCore::LayerRendererChromium::~LayerRendererChromium):
1687         (WebCore::LayerRendererChromium::useShaderProgram):
1688         (WebCore::LayerRendererChromium::drawTexturedQuad):
1689         (WebCore::LayerRendererChromium::drawLayers):
1690         (WebCore::LayerRendererChromium::drawDebugBorder):
1691         (WebCore::LayerRendererChromium::updateLayersRecursive):
1692         (WebCore::LayerRendererChromium::drawLayer):
1693         (WebCore::LayerRendererChromium::bindCommonAttribLocations):
1694         (WebCore::LayerRendererChromium::initializeSharedGLObjects):
1695         * platform/graphics/chromium/LayerRendererChromium.h:
1696         (WebCore::LayerRendererChromium::):
1697         * platform/graphics/chromium/TransformLayerChromium.cpp: Added.
1698         (WebCore::TransformLayerChromium::create):
1699         (WebCore::TransformLayerChromium::TransformLayerChromium):
1700         * platform/graphics/chromium/TransformLayerChromium.h: Added.
1701         (WebCore::TransformLayerChromium::drawsContent):
1702         * platform/graphics/chromium/WebGLLayerChromium.cpp: Added.
1703         (WebCore::WebGLLayerChromium::WebGLLayerChromium):
1704         (WebCore::WebGLLayerChromium::textureId):
1705         (WebCore::WebGLLayerChromium::updateTextureContents):
1706         (WebCore::WebGLLayerChromium::setContext):
1707         * platform/graphics/chromium/WebGLLayerChromium.h: Added.
1708         (WebCore::WebGLLayerChromium::drawsContent):
1709         (WebCore::WebGLLayerChromium::ownsTexture):
1710         (WebCore::WebGLLayerChromium::shaderProgramId):
1711         (WebCore::WebGLLayerChromium::setShaderProgramId):
1712
1713 2010-06-24  Pavel Feldman  <pfeldman@chromium.org>
1714
1715         Reviewed by Yury Semikhatsky.
1716  
1717         Web Inspector: Inspector cleanup + better DevTools alignment with Inspector.
1718
1719         https://bugs.webkit.org/show_bug.cgi?id=41094
1720
1721         - Removed a bunch of unused methods from all over the place
1722         - Added client callbacks for states surviving navigation
1723         - Implemented more user-friendly stub for InspectorFrontendHost.platform
1724
1725         * inspector/InspectorClient.h:
1726         (WebCore::InspectorClient::resourceTrackingWasEnabled):
1727         (WebCore::InspectorClient::resourceTrackingWasDisabled):
1728         (WebCore::InspectorClient::timelineProfilerWasStarted):
1729         (WebCore::InspectorClient::timelineProfilerWasStopped):
1730         * inspector/InspectorController.cpp:
1731         (WebCore::InspectorController::enableResourceTracking):
1732         (WebCore::InspectorController::disableResourceTracking):
1733         (WebCore::InspectorController::ensureSettingsLoaded):
1734         (WebCore::InspectorController::startTimelineProfiler):
1735         (WebCore::InspectorController::stopTimelineProfiler):
1736         * inspector/InspectorFrontend.cpp:
1737         * inspector/InspectorFrontend.h:
1738         * inspector/front-end/InspectorBackendStub.js:
1739         * inspector/front-end/InspectorFrontendHostStub.js:
1740         (.WebInspector.InspectorFrontendHostStub.prototype.platform):
1741
1742 2010-06-23  Alexey Proskuryakov  <ap@apple.com>
1743
1744         Reviewed by Darin Adler.
1745
1746         https://bugs.webkit.org/show_bug.cgi?id=41099
1747         Assertion failure: !m_suspended when XMLHttpRequest fails
1748
1749         This was a general problem with load failure timer not being deferred.
1750
1751         Test: manual-tests/xhr-failure-behind-alert.html
1752
1753         * manual-tests/xhr-failure-behind-alert.html: Added.
1754
1755         * platform/network/ResourceHandle.cpp:
1756         (WebCore::ResourceHandle::fireFailure): Added an empty case for NoFailure. Reset
1757         m_scheduledFailureType to NoFailure when firing.
1758         (WebCore::ResourceHandle::setDefersLoading): Stop failure timer when deferring, restart when
1759         un-deferring loads.
1760
1761         * platform/network/ResourceHandle.h: Renamed m_failureType to m_scheduledFailureType to
1762         make it clear that it is only set when a timer is scheduled.
1763
1764         * platform/network/ResourceHandleInternal.h:
1765         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Initialize m_scheduledFailureType
1766         to NoFailure, so that we can look at it when un-deferring loads.
1767
1768         * platform/network/android/ResourceHandleAndroid.cpp:
1769         (WebCore::ResourceHandle::platformSetDefersLoading):
1770         * platform/network/cf/ResourceHandleCFNet.cpp:
1771         (WebCore::ResourceHandle::platformSetDefersLoading):
1772         * platform/network/curl/ResourceHandleCurl.cpp:
1773         (WebCore::ResourceHandle::platformSetDefersLoading):
1774         * platform/network/mac/ResourceHandleMac.mm:
1775         (WebCore::ResourceHandle::platformSetDefersLoading):
1776         * platform/network/qt/ResourceHandleQt.cpp:
1777         (WebCore::ResourceHandle::platformSetDefersLoading):
1778         * platform/network/soup/ResourceHandleSoup.cpp:
1779         Platform specific parts of setDefersLoading() are now in a separate function.
1780
1781 2010-06-24  Pavel Feldman  <pfeldman@chromium.org>
1782
1783         Not reviewed: revert 61766.
1784
1785         * inspector/InspectorClient.h:
1786         * inspector/InspectorController.cpp:
1787         (WebCore::InspectorController::enableResourceTracking):
1788         (WebCore::InspectorController::disableResourceTracking):
1789         (WebCore::InspectorController::ensureSettingsLoaded):
1790         (WebCore::InspectorController::startTimelineProfiler):
1791         (WebCore::InspectorController::stopTimelineProfiler):
1792         * inspector/InspectorFrontend.cpp:
1793         (WebCore::InspectorFrontend::setAttachedWindow):
1794         * inspector/InspectorFrontend.h:
1795         * inspector/front-end/InspectorBackendStub.js:
1796         (.WebInspector.InspectorBackendStub.prototype.setAttachedWindowHeight):
1797         * inspector/front-end/InspectorFrontendHostStub.js:
1798         (.WebInspector.InspectorFrontendHostStub.prototype.platform):
1799
1800 2010-06-23  Pavel Feldman  <pfeldman@chromium.org>
1801
1802         Reviewed by Yury Semikhatsky.
1803
1804         Web Inspector: Inspector cleanup + better DevTools alignment with Inspector.
1805         
1806         https://bugs.webkit.org/show_bug.cgi?id=41094
1807
1808         - Removed a bunch of unused methods from all over the place
1809         - Added client callbacks for states surviving navigation
1810         - Implemented more user-friendly stub for InspectorFrontendHost.platform
1811
1812         * inspector/InspectorClient.h:
1813         (WebCore::InspectorClient::resourceTrackingWasEnabled):
1814         (WebCore::InspectorClient::resourceTrackingWasDisabled):
1815         (WebCore::InspectorClient::timelineProfilerWasStarted):
1816         (WebCore::InspectorClient::timelineProfilerWasStopped):
1817         * inspector/InspectorController.cpp:
1818         (WebCore::InspectorController::enableResourceTracking):
1819         (WebCore::InspectorController::disableResourceTracking):
1820         (WebCore::InspectorController::ensureSettingsLoaded):
1821         (WebCore::InspectorController::startTimelineProfiler):
1822         (WebCore::InspectorController::stopTimelineProfiler):
1823         * inspector/InspectorFrontend.cpp:
1824         * inspector/InspectorFrontend.h:
1825         * inspector/front-end/InspectorBackendStub.js:
1826         * inspector/front-end/InspectorFrontendHostStub.js:
1827         (.WebInspector.InspectorFrontendHostStub.prototype.platform):
1828
1829 2010-06-24  Nikolas Zimmermann  <nzimmermann@rim.com>
1830
1831         Reviewed by Dirk Schulze.
1832
1833         Inspector & SVG Text have problems, kids of RenderSVGText are not properly placed.
1834         https://bugs.webkit.org/show_bug.cgi?id=41143
1835
1836         Simplify code path taken for SVG text in InspectorController, take the code path currently only used for RenderInline,
1837         that just calls absoluteQuads(), and displays the result. Refactored code that all SVG renderers (except RenderSVGRoot)
1838         take this code path -> highlighting now works as expected.
1839
1840         Don't use absoluteClippedOverlowRect() in the various RenderSVG*::absoluteQuads() methods, as we're loosing floating-point precision.
1841         Instead use localToAbsoluteQuad(strokeBoundingBox()) in order to highlight the unclipped, unfiltered, etc.. region that this renderer would paint.
1842
1843         No new tests, as this is only manual testable - at least I didn't find any Inspector-Highlighting tests, if someone knows please mail me.
1844
1845         * inspector/InspectorController.cpp:
1846         (WebCore::drawHighlightForLineBoxesOrSVGRenderer):
1847         (WebCore::InspectorController::drawNodeHighlight):
1848         * rendering/RenderSVGBlock.cpp:
1849         (WebCore::RenderSVGBlock::absoluteRects): ASSERT_NOT_REACHED() here. SVG should only be inspected through absoluteQuads().
1850         * rendering/RenderSVGBlock.h: Add absoluteRects() in this base class for RenderForeignObject/RenderSVGText.
1851         * rendering/RenderSVGHiddenContainer.cpp: Remove absoluteRects() - RenderSVGModelObject already has it.
1852         * rendering/RenderSVGHiddenContainer.h: Ditto.
1853         * rendering/RenderSVGImage.cpp: 
1854         (WebCore::RenderSVGImage::absoluteRects): ASSERT_NOT_REACHED() here.
1855         (WebCore::RenderSVGImage::absoluteQuads): Don't use absoluteClippedOverlowRect() but localToAbsoluteQuad(repaintRectInLocalCoordinates()).
1856         * rendering/RenderSVGImage.h:
1857         (WebCore::RenderSVGImage::objectBoundingBox): Inlined
1858         * rendering/RenderSVGInline.cpp: 
1859         (WebCore::RenderSVGInline::absoluteQuads): Take RenderSVGText translation into account, allows inspecting <tspan>/<tref> etc.
1860         * rendering/RenderSVGInline.h:
1861         * rendering/RenderSVGModelObject.cpp: 
1862         (WebCore::RenderSVGModelObject::absoluteRects): ASSERT_NOT_REACHED() here.
1863         (WebCore::RenderSVGModelObject::absoluteQuads): Don't use absoluteClippedOverlowRect() but localToAbsoluteQuad(repaintRectInLocalCoordinates()).
1864         * rendering/RenderSVGModelObject.h:
1865         * rendering/RenderSVGRoot.cpp: Fix typo in license s/aint/along. Need to touch this file in order to let Mac build.
1866         * rendering/RenderSVGText.cpp:
1867         (WebCore::RenderSVGText::mapLocalToContainer): Remove hack, which moved the transformState by x()/y(). Not needed anymore.
1868         (WebCore::RenderSVGText::absoluteQuads): Proper implementation, respecting x/y translation.
1869         * rendering/RenderSVGText.h: Reorder some functions. 
1870         * rendering/SVGRenderSupport.h: Removed last virtual function strokeBoundingBox().
1871
1872 2010-06-24  Kent Tamura  <tkent@chromium.org>
1873
1874         Unreviewed. Build fix for Tiger.
1875
1876         * platform/mac/ThemeMac.mm:
1877         (WebCore::setControlSize):
1878
1879 2010-06-24  Kent Tamura  <tkent@chromium.org>
1880
1881         Unreviewed. Build fix for Tiger.
1882
1883         * platform/mac/ThemeMac.mm:
1884         (WebCore::setControlSize):
1885         (WebCore::ThemeMac::inflateControlPaintRect):
1886
1887 2010-06-24  Kent Tamura  <tkent@chromium.org>
1888
1889         Unreviewed.  Build fix for Chromium Mac.
1890
1891         * html/HTMLInputElement.cpp:
1892         (WebCore::HTMLInputElement::isSpeechEnabled):
1893
1894 2010-06-24  Simon Hausmann  <simon.hausmann@nokia.com>
1895
1896         Unreviewed Symbian build fix.
1897
1898         The QML WebKit integration needs to be part of QtWebKit.sis
1899
1900         * WebCore.pro: Deploy qmlwebkitplugin.dll.
1901
1902 2010-06-24  Satish Sampath  <satish@chromium.org>
1903
1904         Reviewed by Kent Tamura.
1905
1906         Add a speech button to input elements, no rendering or actions yet.
1907
1908         Speech Input: Add a speech button to text input element (no rendering or actions yet)
1909         https://bugs.webkit.org/show_bug.cgi?id=40925
1910
1911         No new tests. Will create a layout test in a subsequent patch.
1912
1913         * css/CSSPrimitiveValueMappings.h:
1914         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1915         * css/CSSSelector.cpp:
1916         (WebCore::CSSSelector::pseudoId):
1917         (WebCore::nameToPseudoTypeMap):
1918         (WebCore::CSSSelector::extractPseudoType):
1919         * css/CSSSelector.h:
1920         (WebCore::CSSSelector::):
1921         * css/CSSValueKeywords.in:
1922         * css/html.css:
1923         (input::-webkit-input-speech-button):
1924         * dom/InputElement.h:
1925         * html/HTMLAttributeNames.in:
1926         * html/HTMLInputElement.cpp:
1927         (WebCore::HTMLInputElement::isSpeechEnabled):
1928         * html/HTMLInputElement.h:
1929         * platform/ThemeTypes.h:
1930         (WebCore::):
1931         * rendering/RenderTextControlSingleLine.cpp:
1932         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
1933         (WebCore::RenderTextControlSingleLine::forwardEvent):
1934         (WebCore::RenderTextControlSingleLine::styleDidChange):
1935         (WebCore::RenderTextControlSingleLine::hasControlClip):
1936         (WebCore::RenderTextControlSingleLine::controlClipRect):
1937         (WebCore::RenderTextControlSingleLine::textBlockWidth):
1938         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
1939         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
1940         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
1941         (WebCore::RenderTextControlSingleLine::createSpeechButtonStyle):
1942         (WebCore::RenderTextControlSingleLine::clientPaddingRight):
1943         * rendering/RenderTextControlSingleLine.h:
1944         * rendering/RenderTheme.cpp:
1945         (WebCore::RenderTheme::adjustStyle):
1946         (WebCore::RenderTheme::paint):
1947         (WebCore::RenderTheme::paintBorderOnly):
1948         (WebCore::RenderTheme::paintDecorations):
1949         * rendering/TextControlInnerElements.cpp:
1950         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
1951         (WebCore::InputFieldSpeechButtonElement::create):
1952         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
1953         * rendering/TextControlInnerElements.h:
1954         * rendering/style/RenderStyleConstants.h:
1955         (WebCore::):
1956
1957 2010-06-24  Kent Tamura  <tkent@chromium.org>
1958
1959         Reviewed by Adam Barth.
1960
1961         [Mac] The upper button of <input type=number> has no visual effect on click
1962         https://bugs.webkit.org/show_bug.cgi?id=38380
1963
1964         Because we have no ways to draw an NSStepperCell with its up button
1965         highlighted, use HIThemeDrawButton() instead.
1966
1967         Test: platform/mac/fast/forms/input-appearance-spinbutton-up.html
1968
1969         * platform/mac/ThemeMac.mm:
1970         (WebCore::controlSizeFromPixelSize):
1971           New function. Made from a part of setControlSize().
1972         (WebCore::setControlSize):
1973         (WebCore::convertControlStatesToThemeDrawState):
1974         (WebCore::paintStepper): Use HITheme API instead of NSStepperCell.
1975         (WebCore::ThemeMac::inflateControlPaintRect):
1976           Use controlSizeFromPixelSize().
1977
1978 2010-06-24  Yury Semikhatsky  <yurys@chromium.org>
1979
1980         Reviewed by Pavel Feldman.
1981
1982         Web Inspector: implement layout tests for debugger
1983         https://bugs.webkit.org/show_bug.cgi?id=40774
1984
1985         Test: inspector/debugger-pause-on-debugger-statement.html
1986
1987         * bindings/js/ScriptDebugServer.cpp: remove unused obsolete code that deals with global listeners.
1988         (WebCore::ScriptDebugServer::ScriptDebugServer):
1989         (WebCore::ScriptDebugServer::removeListener):
1990         (WebCore::ScriptDebugServer::dispatchFunctionToListeners):
1991         (WebCore::ScriptDebugServer::pauseIfNeeded):
1992         (WebCore::ScriptDebugServer::didAddListener):
1993         (WebCore::ScriptDebugServer::didRemoveListener):
1994         * bindings/js/ScriptDebugServer.h:
1995         * platform/mac/EventLoopMac.mm:
1996         (WebCore::EventLoop::cycle): wait at most 10ms for new event, otherwise layout tests would
1997         hang because in their case there may be no events ever.
1998
1999 2010-06-24  Andrey Kosyakov  <caseq@chromium.org>
2000
2001         Reviewed by Yury Semikhatsky.
2002
2003         Fixed evaluation & logging of null values in console.
2004         Changed handling of null and undefined in ScriptValue::toString()
2005         to match JSC bindings (i.e. "null" and "undefined" instead of "").
2006         https://bugs.webkit.org/show_bug.cgi?id=40980
2007
2008         * bindings/v8/ScriptValue.cpp:
2009         (WebCore::ScriptValue::toString):
2010         * inspector/front-end/InjectedScript.js:
2011         (injectedScriptConstructor):
2012
2013 2010-06-24  Yury Semikhatsky  <yurys@chromium.org>
2014
2015         Reviewed by Pavel Feldman.
2016
2017         Web Inspector: live edit doesn't work when resource tracking is off
2018         https://bugs.webkit.org/show_bug.cgi?id=41076
2019
2020         * inspector/front-end/ScriptView.js:
2021         (WebInspector.ScriptView.prototype._sourceIDForLine): implement this method for ScriptView,
2022         it's needed for editLine to work.
2023
2024 2010-06-23  Adam Barth  <abarth@webkit.org>
2025
2026         Reviewed by Eric Seidel.
2027
2028         Sketch out InitialMode of HTML5 tree builder
2029         https://bugs.webkit.org/show_bug.cgi?id=41126
2030
2031         Transliterated from the spec.  Currently doesn't do anything.  Mostly
2032         an experiment to see where this goes.
2033
2034         * html/HTMLTreeBuilder.cpp:
2035         (WebCore::HTMLTreeBuilder::processToken):
2036         (WebCore::HTMLTreeBuilder::insertDoctype):
2037         (WebCore::HTMLTreeBuilder::insertComment):
2038         * html/HTMLTreeBuilder.h:
2039
2040 2010-06-23  Adam Barth  <abarth@webkit.org>
2041
2042         Reviewed by Eric Seidel.
2043
2044         Add all the HTML5 tree builder insertion modes
2045         https://bugs.webkit.org/show_bug.cgi?id=41124
2046
2047         These are just copied verbatim from the spec.  No tests because these
2048         don't do anything yet.
2049
2050         * html/HTMLTreeBuilder.cpp:
2051         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2052         (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
2053         * html/HTMLTreeBuilder.h:
2054         (WebCore::HTMLTreeBuilder::):
2055
2056 2010-06-23  Eric Seidel  <eric@webkit.org>
2057
2058         Unreviewed.  Fix namespace indent.  Just whitespace changes.
2059
2060         * dom/DocumentParser.h:
2061         (WebCore::DocumentParser::~DocumentParser):
2062         (WebCore::DocumentParser::isExecutingScript):
2063         (WebCore::DocumentParser::stopParsing):
2064         (WebCore::DocumentParser::processingData):
2065         (WebCore::DocumentParser::wantsRawData):
2066         (WebCore::DocumentParser::writeRawData):
2067         (WebCore::DocumentParser::wellFormed):
2068         (WebCore::DocumentParser::lineNumber):
2069         (WebCore::DocumentParser::columnNumber):
2070         (WebCore::DocumentParser::executeScriptsWaitingForStylesheets):
2071         (WebCore::DocumentParser::htmlTreeBuilder):
2072         (WebCore::DocumentParser::asHTMLDocumentParser):
2073         (WebCore::DocumentParser::inViewSourceMode):
2074         (WebCore::DocumentParser::setInViewSourceMode):
2075         (WebCore::DocumentParser::document):
2076         (WebCore::DocumentParser::xssAuditor):
2077         (WebCore::DocumentParser::setXSSAuditor):
2078         (WebCore::DocumentParser::DocumentParser):
2079
2080 2010-06-23  Eric Seidel  <eric@webkit.org>
2081
2082         Unreviewed.  Speculative build fix for Qt.
2083
2084         Move Document* down onto DocumentParser, since every DocumentParser needs one.
2085         https://bugs.webkit.org/show_bug.cgi?id=41117
2086
2087         XMLDocumentParserQt is a huge pile of donkey barf.
2088         I can't believe I ever r+'d the creation of this pile of
2089         copy/paste code.
2090
2091         I clearly missed removing m_doc from this code as well and thus
2092         broke Qt.
2093
2094         We really need to fix both XMLDocumentParserLibxml2 and
2095         XMLDocumentParserQt not to be so poorly abstracted so
2096         that if we're going to have two of them they can at least
2097         share some code.
2098
2099         * dom/XMLDocumentParserQt.cpp:
2100         (WebCore::XMLDocumentParser::XMLDocumentParser):
2101         (WebCore::XMLDocumentParser::~XMLDocumentParser):
2102         (WebCore::XMLDocumentParser::doWrite):
2103         (WebCore::XMLDocumentParser::doEnd):
2104         (WebCore::XMLDocumentParser::parse):
2105         (WebCore::XMLDocumentParser::startDocument):
2106         (WebCore::XMLDocumentParser::parseStartElement):
2107         (WebCore::XMLDocumentParser::parseEndElement):
2108         (WebCore::XMLDocumentParser::parseProcessingInstruction):
2109         (WebCore::XMLDocumentParser::parseCdata):
2110         (WebCore::XMLDocumentParser::parseComment):
2111         (WebCore::XMLDocumentParser::parseDtd):
2112
2113 2010-06-23  Eric Seidel  <eric@webkit.org>
2114
2115         Reviewed by Adam Barth.
2116
2117         Move Document* down onto DocumentParser, since every DocumentParser needs one.
2118         https://bugs.webkit.org/show_bug.cgi?id=41117
2119
2120         This eliminated the need for document() on HTMLDocumentParser.
2121         This paves the way for more code sharing between various
2122         DocumentParser subclasses.
2123
2124         * dom/DocumentParser.h:
2125         (WebCore::DocumentParser::inViewSourceMode):
2126         (WebCore::DocumentParser::setInViewSourceMode):
2127         (WebCore::DocumentParser::document):
2128         (WebCore::DocumentParser::DocumentParser):
2129         * dom/XMLDocumentParser.cpp:
2130         (WebCore::XMLDocumentParser::isWMLDocument):
2131         (WebCore::XMLDocumentParser::pushCurrentNode):
2132         (WebCore::XMLDocumentParser::popCurrentNode):
2133         (WebCore::XMLDocumentParser::clearCurrentNodeStack):
2134         (WebCore::XMLDocumentParser::enterText):
2135         (WebCore::XMLDocumentParser::end):
2136         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
2137         * dom/XMLDocumentParser.h:
2138         * dom/XMLDocumentParserLibxml2.cpp:
2139         (WebCore::XMLDocumentParser::XMLDocumentParser):
2140         (WebCore::XMLDocumentParser::~XMLDocumentParser):
2141         (WebCore::XMLDocumentParser::doWrite):
2142         (WebCore::XMLDocumentParser::startElementNs):
2143         (WebCore::XMLDocumentParser::endElementNs):
2144         (WebCore::XMLDocumentParser::processingInstruction):
2145         (WebCore::XMLDocumentParser::cdataBlock):
2146         (WebCore::XMLDocumentParser::comment):
2147         (WebCore::XMLDocumentParser::startDocument):
2148         (WebCore::XMLDocumentParser::internalSubset):
2149         (WebCore::XMLDocumentParser::initializeParserContext):
2150         (WebCore::XMLDocumentParser::doEnd):
2151         * html/HTMLDocumentParser.cpp:
2152         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2153         * html/HTMLDocumentParser.h:
2154         * html/LegacyHTMLDocumentParser.cpp:
2155         (WebCore::LegacyHTMLDocumentParser::LegacyHTMLDocumentParser):
2156         (WebCore::LegacyHTMLDocumentParser::begin):
2157         (WebCore::LegacyHTMLDocumentParser::scriptHandler):
2158         (WebCore::LegacyHTMLDocumentParser::scriptExecution):
2159         (WebCore::LegacyHTMLDocumentParser::parseTag):
2160         (WebCore::LegacyHTMLDocumentParser::continueProcessing):
2161         (WebCore::LegacyHTMLDocumentParser::willWriteHTML):
2162         (WebCore::LegacyHTMLDocumentParser::didWriteHTML):
2163         (WebCore::LegacyHTMLDocumentParser::write):
2164         (WebCore::LegacyHTMLDocumentParser::stopParsing):
2165         (WebCore::LegacyHTMLDocumentParser::timerFired):
2166         (WebCore::LegacyHTMLDocumentParser::end):
2167         (WebCore::LegacyHTMLDocumentParser::processToken):
2168         (WebCore::LegacyHTMLDocumentParser::processDoctypeToken):
2169         (WebCore::LegacyHTMLDocumentParser::executeScriptsWaitingForStylesheets):
2170         (WebCore::LegacyHTMLDocumentParser::executeExternalScriptsIfReady):
2171         (WebCore::LegacyHTMLDocumentParser::executeExternalScriptsTimerFired):
2172         * html/LegacyHTMLDocumentParser.h:
2173         * loader/ImageDocument.cpp:
2174         (WebCore::ImageDocumentParser::ImageDocumentParser):
2175         (WebCore::ImageDocumentParser::imageDocument):
2176         (WebCore::ImageDocumentParser::write):
2177         (WebCore::ImageDocumentParser::writeRawData):
2178         (WebCore::ImageDocumentParser::finish):
2179         (WebCore::ImageDocumentParser::finishWasCalled):
2180         (WebCore::ImageDocumentParser::isWaitingForScripts):
2181         (WebCore::ImageDocument::createParser):
2182         * loader/MediaDocument.cpp:
2183         (WebCore::MediaDocumentParser::MediaDocumentParser):
2184         (WebCore::MediaDocumentParser::createDocumentStructure):
2185         (WebCore::MediaDocumentParser::finish):
2186         (WebCore::MediaDocumentParser::finishWasCalled):
2187         * loader/PluginDocument.cpp:
2188         (WebCore::PluginDocumentParser::PluginDocumentParser):
2189         (WebCore::PluginDocumentParser::createDocumentStructure):
2190         (WebCore::PluginDocumentParser::writeRawData):
2191         (WebCore::PluginDocumentParser::finish):
2192         (WebCore::PluginDocumentParser::finishWasCalled):
2193         * loader/SinkDocument.cpp:
2194         (WebCore::SinkDocumentParser::SinkDocumentParser):
2195         * loader/TextDocument.cpp:
2196         (WebCore::TextDocumentParser::TextDocumentParser):
2197         (WebCore::TextDocumentParser::write):
2198         (WebCore::TextDocumentParser::finish):
2199         (WebCore::TextDocumentParser::finishWasCalled):
2200
2201 2010-06-23  Eric Seidel  <eric@webkit.org>
2202
2203         Reviewed by Adam Barth.
2204
2205         Start to clean up DocumentParser interface
2206         https://bugs.webkit.org/show_bug.cgi?id=41114
2207
2208         The first of many cleanups needed to the DocumentParser
2209         interface.  Rename executingScript() to isExecutingScript()
2210         and make it return a bool instead of an int.  Also added a
2211         FIXME to XMLDocumentParser about implementing it and did
2212         some minor other cleanup to the XMLDocumentParser header.
2213
2214         No functional change, thus no tests.
2215
2216         * dom/Document.cpp:
2217         (WebCore::Document::open):
2218         * dom/DocumentParser.h:
2219         (WebCore::DocumentParser::isExecutingScript):
2220         * dom/XMLDocumentParser.h:
2221         (WebCore::XMLDocumentParser::wellFormed):
2222         * html/HTMLDocumentParser.cpp:
2223         (WebCore::HTMLDocumentParser::attemptToEnd):
2224         (WebCore::HTMLDocumentParser::endIfDelayed):
2225         (WebCore::HTMLDocumentParser::isExecutingScript):
2226         * html/HTMLDocumentParser.h:
2227         * html/LegacyHTMLDocumentParser.h:
2228         (WebCore::LegacyHTMLDocumentParser::isExecutingScript):
2229
2230 2010-06-22  Maciej Stachowiak  <mjs@apple.com>
2231
2232         Reviewed by Simon Fraser.
2233
2234         Implement IDL attribute for HTML5 hidden
2235         https://bugs.webkit.org/show_bug.cgi?id=41039
2236
2237         Test: fast/html/hidden-attr-dom.html
2238
2239         * html/HTMLElement.idl: Just add to the IDL file. [Reflect] takes
2240         care of the rest.
2241
2242 2010-06-23  Joanmarie Diggs  <joanmarie.diggs@gmail.com>
2243
2244         Reviewed by Chris Fleizach.
2245
2246         [Gtk] nameFromChildren is obsolete
2247         https://bugs.webkit.org/show_bug.cgi?id=36128
2248
2249         Look to the AtkText interface implemented by the objects in
2250         question.
2251
2252         Test: platform/gtk/accessibility/name-from-label.html
2253
2254         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2255         (webkit_accessible_get_name):
2256         (webkit_accessible_table_get_column_description):
2257         (webkit_accessible_table_get_row_description):
2258
2259 2010-06-23  Kwang Yul Seo  <skyul@company100.net>
2260
2261         Reviewed by Kent Tamura.
2262
2263         [BREWMP] Port FileSystem
2264         https://bugs.webkit.org/show_bug.cgi?id=34323
2265
2266         Port FileSystem with IFileMgr interface.
2267
2268         * platform/FileSystem.h:
2269         * platform/brew/FileSystemBrew.cpp: Added.
2270         (WebCore::getFileSize):
2271         (WebCore::getFileModificationTime):
2272         (WebCore::fileExists):
2273         (WebCore::deleteFile):
2274         (WebCore::deleteEmptyDirectory):
2275         (WebCore::pathByAppendingComponent):
2276         (WebCore::fileSystemRepresentation):
2277         (WebCore::canonicalPath):
2278         (WebCore::makeAllDirectories):
2279         (WebCore::homeDirectoryPath):
2280         (WebCore::pathGetFileName):
2281         (WebCore::directoryName):
2282         (WebCore::openTemporaryFile):
2283         (WebCore::closeFile):
2284         (WebCore::writeToFile):
2285         (WebCore::unloadModule):
2286         (WebCore::listDirectory):
2287
2288 2010-06-23  Alexendar Pavlov  <apavlov@chromium.org>
2289
2290         Reviewed by David Hyatt.
2291
2292         Swap checks in Position::isCandidate so that the less expensive
2293         nodeIsUserSelectNode  (node && node->renderer() &&
2294         node->renderer()->style()->userSelect() == SELECT_NONE) came first.
2295
2296         (Was Web Inspector: Hangup when expanding elements with enormous
2297         text node content in Elements panel).
2298
2299         https://bugs.webkit.org/show_bug.cgi?id=35926
2300
2301         * dom/Position.cpp:
2302         (WebCore::Position::isCandidate):
2303         * dom/PositionIterator.cpp:
2304         (WebCore::PositionIterator::isCandidate):
2305
2306 2010-06-23  Kwang Yul Seo  <skyul@company100.net>
2307
2308         Reviewed by Kent Tamura.
2309
2310         [BREWMP] Add PopupMenu implementation
2311         https://bugs.webkit.org/show_bug.cgi?id=40226
2312
2313         Delegate PopupMenu handling to ChromeClientBrew.
2314
2315         * page/brew/ChromeClientBrew.h: Added.
2316         * platform/PopupMenu.h:
2317         * platform/brew/PopupMenuBrew.cpp: Added.
2318         (WebCore::PopupMenu::PopupMenu):
2319         (WebCore::PopupMenu::~PopupMenu):
2320         (WebCore::PopupMenu::show):
2321         (WebCore::PopupMenu::hide):
2322         (WebCore::PopupMenu::updateFromElement):
2323         (WebCore::PopupMenu::itemWritingDirectionIsNatural):
2324
2325 2010-06-23  Kenneth Russell  <kbr@google.com>
2326
2327         Reviewed by Dimitri Glazkov.
2328
2329         Implement format conversions in texImage2D and texSubImage2D taking HTML data
2330         https://bugs.webkit.org/show_bug.cgi?id=40319
2331
2332         Generalized code supporting premultiplication of alpha and
2333         vertical flip to pack texture data into requested format and type.
2334         Handled incoming image data of various formats, RGBA and BGRA in
2335         particular, both to reduce the number of temporary copies during
2336         texture upload and to support premultiplying alpha for the
2337         texImage2D and texSubImage2D entry points taking ArrayBufferView
2338         in a subsequent bug. Added test case exercising all combinations
2339         of format/type combinations, premultiplication of alpha, and
2340         Image/ImageData upload. (Incorporated pnglib.js under
2341         fast/canvas/webgl/resources/ to be able to generate Image elements
2342         programmatically.) Tested in Safari on Mac OS X and in Chromium on
2343         Mac OS X, Windows and Linux.
2344
2345         Test: fast/canvas/webgl/tex-image-with-format-and-type.html
2346
2347         * html/canvas/WebGLRenderingContext.cpp:
2348         (WebCore::WebGLRenderingContext::readPixels):
2349         (WebCore::WebGLRenderingContext::texImage2DImpl):
2350         (WebCore::WebGLRenderingContext::texImage2D):
2351         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
2352         (WebCore::WebGLRenderingContext::texSubImage2D):
2353         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
2354         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
2355         * platform/graphics/GraphicsContext3D.cpp:
2356         (WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
2357         (WebCore::GraphicsContext3D::extractImageData):
2358         (WebCore::GraphicsContext3D::flipVertically):
2359         (WebCore::doUnpackingAndPacking):
2360         (WebCore::doPacking):
2361         (WebCore::GraphicsContext3D::packPixels):
2362         * platform/graphics/GraphicsContext3D.h:
2363         (WebCore::GraphicsContext3D::):
2364         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2365         (WebCore::GraphicsContext3D::getImageData):
2366         * platform/graphics/mac/GraphicsContext3DMac.mm:
2367         (WebCore::narrowInternalFormat):
2368         (WebCore::GraphicsContext3D::texImage2D):
2369         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2370         (WebCore::GraphicsContext3D::getImageData):
2371         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
2372         (WebCore::GraphicsContext3D::getImageData):
2373
2374 2010-06-23  Stephen White  <senorblanco@chromium.org>
2375
2376         Unreviewed; correcting bad patch.
2377
2378         In my haste to land r61710, I mistakenly landed the wrong version, in
2379         which a chunk of code was moved.  This patch moves that chunk of code
2380         to where it was in the patch that was reviewed.  Mea culpa.
2381
2382         * rendering/RenderBoxModelObject.cpp:
2383         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
2384
2385 2010-06-23  Stephen White  <senorblanco@chromium.org>
2386
2387         Reviewed by David Hyatt.
2388
2389         This is a tweak to the resize algorithm introduced in r61341, and
2390         is a fix for the regression described in
2391         https://bugs.webkit.org/show_bug.cgi?id=41036
2392
2393         The goal is to bring back the some of old behaviour, without regressing
2394         too much of the performance gains in r61341.
2395
2396         The old algorithm was:
2397         - on first resize, draw in high quality and record the paint time
2398         - if we've already drawn at this size, use the same quality as last time
2399         - on subsequent resizes, if the resize occurs within X ms of the
2400           previous one, draw at low quality and set a timer (one timer per
2401           image).
2402         - when each timer expires, draw that image at high quality
2403
2404         The r61341 algorithm was:  
2405         - on first resize, draw the image in low quality, add it to a list of
2406           resized images, and set a timer (one timer for all images)
2407         - when the timer expires, redraw all resized images in high quality
2408
2409         The new algorithm is:
2410         - on first resize, if no other animated resizes are outstanding, draw in
2411           high quality and set the timer (one timer for all images)
2412         - if any images have been resized to two different sizes in the last
2413           X ms, draw all resized images in low quality and kick the timer
2414           forward
2415         - when the timer expires, if any animated resizes occured, redraw all
2416           resized images in high quality, and reset the flag
2417
2418         This should cause GUIMark and the IE9 demos to have good performance 
2419         after the first frame, while other pages with only static resizes
2420         should be unaffected.
2421
2422         * rendering/RenderBoxModelObject.cpp:
2423         Change the LastPaintTimeMap to a LastPaintSizeMap:  we now record the
2424         last size an image was resized to, rather than the time it was painted
2425         (the time actually became redundant in r61341 when I added the
2426         check for m_timer.isActive():  we only care if anything is resizing
2427         while the timer is active).
2428         (WebCore::ImageQualityController::ImageQualityController):
2429         Add an initializer for the m_animatedResizeIsActive flag.
2430         (WebCore::ImageQualityController::objectDestroyed):
2431         Reset the m_animatedResizeIsActive flag if this was the last object
2432         in the list.
2433         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
2434         Only repaint all the images if there was an animated resize (otherwise,
2435         everything is already high quality).
2436         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
2437         Implement the above algorithm.
2438
2439 2010-06-23  Abhishek Arya  <inferno@chromium.org>
2440
2441         Reviewed by Kenneth Rohde Christiansen.
2442
2443         Bad cast after DOM mutation in RenderMenuList
2444         https://bugs.webkit.org/show_bug.cgi?id=40828
2445  
2446         Firing the onchange event on select which changes its size > 1 causes the select
2447         object to change from a menulist to a listbox. However, when propogating the events,
2448         we do a bad cast assuming the object will remain a menulist. Added proper checks to
2449         make sure we check the renderer after the onchange is fired and propogate the event
2450         based on correct object type.
2451
2452         Test: fast/events/select-onchange-crash.html
2453
2454         * dom/SelectElement.cpp:
2455         (WebCore::SelectElement::setSelectedIndex):
2456
2457 2010-06-23  Andy Estes  <aestes@apple.com>
2458
2459         Reviewed by Alexey Proskuryakov.
2460         
2461         <rdar://problem/8107855> Prevent a crash in WebCore when removing an
2462         object element with an invalid data URL in in a listener to its
2463         beforeload event.
2464         https://bugs.webkit.org/show_bug.cgi?id=41054
2465
2466         Tests: fast/dom/beforeload/remove-bad-object-in-beforeload-listener.html
2467
2468         * html/HTMLObjectElement.cpp:
2469         (WebCore::HTMLObjectElement::renderFallbackContent): Exit early if the
2470         object element is not in the document.
2471         * rendering/RenderEmbeddedObject.cpp:
2472         (WebCore::RenderEmbeddedObject::updateWidget): If RenderWidget::destroy()
2473         was called during processing of onbeforeload, do not proceed with loading
2474         the object.
2475
2476 2010-06-23  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2477
2478         Reviewed by Xan Lopez.
2479
2480         [gtk] web fonts not loaded properly in scribd html5 reader
2481         https://bugs.webkit.org/show_bug.cgi?id=38758
2482
2483         Drop filling the pattern with default values, because this
2484         restricts the matching more than we want.
2485
2486         * platform/graphics/cairo/FontCacheCairo.cpp:
2487         (WebCore::FontCache::createFontPlatformData):
2488
2489 2010-06-23  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2490
2491         Reviewed by Xan Lopez.
2492
2493         [gtk] web fonts not loaded properly in scribd html5 reader
2494         https://bugs.webkit.org/show_bug.cgi?id=38758
2495
2496         Also special-case `sans' amd `mono', which are aliases commonly
2497         used in GTK+ applications.
2498
2499         * platform/graphics/cairo/FontCacheCairo.cpp:
2500         (WebCore::isWellKnownFontName):
2501
2502 2010-06-23  Justin Schuh  <jschuh@chromium.org>
2503
2504         Unreviewed, rolling out r61695.
2505         http://trac.webkit.org/changeset/61695
2506         https://bugs.webkit.org/show_bug.cgi?id=40798
2507
2508         61695 broke all the Linux builds.
2509
2510         * platform/image-decoders/png/PNGImageDecoder.cpp:
2511         (WebCore::PNGImageDecoder::rowAvailable):
2512
2513 2010-06-23  Kevin Ollivier  <kevino@theolliviers.com>
2514
2515         Reviewed by Darin Adler.
2516
2517         Fix PluginViewNone.cpp compilation for ports that also compile PluginView.cpp
2518         https://bugs.webkit.org/show_bug.cgi?id=37939
2519
2520         * plugins/PluginViewNone.cpp:
2521         (WebCore::PluginView::handleFocusInEvent):
2522         (WebCore::PluginView::handleFocusOutEvent):
2523         (WebCore::PluginView::keepAlive):
2524         (WebCore::PluginView::privateBrowsingStateChanged):
2525         (WebCore::PluginView::setJavaScriptPaused):
2526
2527 2010-06-23  Cris Neckar  <cdn@chromium.org>
2528
2529         Reviewed by Darin Fisher.
2530
2531         [Chromium] Out of bounds write in WebCore::PNGImageDecoder::rowAvailable
2532         https://bugs.webkit.org/show_bug.cgi?id=40798
2533
2534         Catches error in row callback for libPNG when extra rows are returned.
2535
2536         Test: fast/images/png-extra-row-crash.html
2537
2538         * platform/image-decoders/png/PNGImageDecoder.cpp:
2539         (WebCore::PNGImageDecoder::rowAvailable):
2540
2541 2010-06-23  James Robinson  <jamesr@chromium.org>
2542
2543         Reviewed by Dan Bernstein.
2544
2545         Do not set needsLayout when the style attribute changes on an SVG element
2546         https://bugs.webkit.org/show_bug.cgi?id=40366
2547
2548         SVGSVGElement::svgAttributeChanged was incorrectly calling renderer()->setNeedsLayout(true)
2549         whenever the styleAttr changed on its element.  This could happen during layout in some
2550         circumstances due to lazy style attribute synchronization.  When it did, it could cause the
2551         layout flags to become inconsistent.  See the test case for details.
2552
2553         Changes to an element's style attribute always mark an element as needing layout anyway so
2554         this call was redundant.
2555
2556         Test: fast/repaint/svg-layout-root-style-attr-update.html
2557
2558         * svg/SVGStyledElement.cpp:
2559         (WebCore::SVGStyledElement::isKnownAttribute):
2560
2561 2010-06-23  Simon Fraser  <simon.fraser@apple.com>
2562
2563         Reviewed by Dan Bernstein.
2564
2565         r61215 broke Acid3
2566         https://bugs.webkit.org/show_bug.cgi?id=41034
2567         
2568         The code added in r61215, which tests whether the root renderer will fill
2569         the entire viewport, should not run for subframes. So bail from
2570         RenderView::paintBoxDecorations() if document()->ownerElement() is not null.
2571         The old code was trying to do this by checking 'elt', but that ends up as 
2572         null after the for loop above.
2573         
2574         We can also bail early if the is no FrameView().
2575
2576         Test: fast/frames/paint-iframe-background.html
2577
2578         * rendering/RenderView.cpp:
2579         (WebCore::RenderView::paintBoxDecorations):
2580
2581 2010-06-23  Pavel Feldman  <pfeldman@chromium.org>
2582
2583         Reviewed by Yury Semikhatsky.
2584
2585         Web Inspector: do not reset profiles panel on navigation.
2586
2587         https://bugs.webkit.org/show_bug.cgi?id=41068
2588
2589         * inspector/InspectorController.cpp:
2590         (WebCore::InspectorController::didCommitLoad):
2591         * inspector/InspectorFrontend.cpp:
2592         (WebCore::InspectorFrontend::resetProfilesPanel):
2593         * inspector/InspectorFrontend.h:
2594         * inspector/front-end/ProfilesPanel.js:
2595         (WebInspector.ProfilesPanel):
2596         (WebInspector.ProfilesPanel.prototype.populateInterface):
2597         (WebInspector.ProfilesPanel.prototype.profilerWasDisabled):
2598         (WebInspector.ProfilesPanel.prototype._reset):
2599         (WebInspector.ProfilesPanel.prototype._clearProfiles):
2600         * inspector/front-end/inspector.js:
2601         (WebInspector.resetProfilesPanel):
2602
2603 2010-06-23  Yury Semikhatsky  <yurys@chromium.org>
2604
2605         Reviewed by Pavel Feldman.
2606
2607         Web Inspector: InspectorController should be added only once as ScriptDebugListener to
2608         ScriptDebugServer.
2609         https://bugs.webkit.org/show_bug.cgi?id=41070
2610
2611         * inspector/InspectorController.cpp:
2612         (WebCore::InspectorController::connectFrontend):
2613         (WebCore::InspectorController::disconnectFrontend):
2614         (WebCore::InspectorController::enableDebuggerFromFrontend):
2615         * inspector/front-end/ScriptsPanel.js:
2616         (WebInspector.ScriptsPanel): don't call InspectorBackend.enableDebugger if debugger is always enabled,
2617         InspectorController will do this on its side when the front end is connected.
2618
2619 2010-06-23  Pavel Podivilov  <podivilov@chromium.org>
2620
2621         Reviewed by Yury Semikhatsky.
2622
2623         Clear breakpoints before restoring them, not after.
2624         https://bugs.webkit.org/show_bug.cgi?id=41071
2625
2626         * inspector/InspectorController.cpp:
2627         (WebCore::InspectorController::enableDebuggerFromFrontend):
2628
2629 2010-06-23  Benjamin Poulain  <benjamin.poulain@nokia.com>
2630
2631         Reviewed by Kenneth Rohde Christiansen.
2632
2633         Do not render the full frame when there is some elements with fixed positioning
2634         https://bugs.webkit.org/show_bug.cgi?id=33150
2635
2636         Do not render the full frame when there is some elements with fixed positioning
2637         https://bugs.webkit.org/show_bug.cgi?id=33150
2638
2639         The frame view take into acount the list of fixed object when scrolling
2640         the view. If the number of object is lower than a certain threshold, the pixel
2641         are blitted, and the invalidated area updated.
2642
2643         * page/FrameView.cpp:
2644         (WebCore::FrameView::addFixedObject):
2645         (WebCore::FrameView::removeFixedObject):
2646         (WebCore::FrameView::scrollContentsFastPath):
2647         * page/FrameView.h:
2648         * platform/ScrollView.cpp:
2649         (WebCore::ScrollView::scrollContents):
2650         (WebCore::ScrollView::scrollContentsFastPath):
2651         * platform/ScrollView.h:
2652         * rendering/RenderLayer.cpp:
2653         (WebCore::RenderLayer::repaintRectIncludingDescendants):
2654         * rendering/RenderLayer.h:
2655         * rendering/RenderObject.cpp:
2656         (WebCore::RenderObject::styleWillChange):
2657
2658 2010-06-23  Mikhail Naganov  <mnaganov@chromium.org>
2659
2660         Reviewed by Pavel Feldman.
2661
2662         Web Inspector: Fix displaying of several CPU profiles with the same name.
2663
2664         https://bugs.webkit.org/show_bug.cgi?id=40992
2665
2666         * inspector/front-end/ProfilesPanel.js:
2667         (WebInspector.ProfileGroupSidebarTreeElement.prototype.onselect):
2668
2669 2010-06-23  Adam Barth  <abarth@webkit.org>
2670
2671         Unreviewed.  clean-header-guards that were made dirty by recent
2672         renames.
2673
2674         * html/HTMLDocumentParser.h:
2675         * html/HTMLPreloadScanner.h:
2676         * html/HTMLTokenizer.h:
2677         * html/HTMLTreeBuilder.h:
2678         * html/LegacyHTMLDocumentParser.h:
2679         * html/LegacyHTMLTreeBuilder.h:
2680         * html/LegacyPreloadScanner.h:
2681
2682 2010-06-23  Adam Barth  <abarth@webkit.org>
2683
2684         Reviewed by Eric Seidel.
2685
2686         Rename LegacyHTMLTreeConstructor to LegacyHTMLTreeBuilder
2687         https://bugs.webkit.org/show_bug.cgi?id=41053
2688
2689         There was some debate about whether to call this class (and the
2690         non-legacy version) "tree builder" or "tree constructor".  Maciej
2691         pointed out that other implementations (including Mozilla and HTML5Lib)
2692         call it a tree builder.  The path of least resistance seems to be call
2693         it that for now.
2694
2695         * Android.mk:
2696         * CMakeLists.txt:
2697         * GNUmakefile.am:
2698         * WebCore.gypi:
2699         * WebCore.pro:
2700         * WebCore.vcproj/WebCore.vcproj:
2701         * WebCore.xcodeproj/project.pbxproj:
2702         * dom/Document.cpp:
2703         * dom/DocumentParser.h:
2704         (WebCore::DocumentParser::htmlTreeConstructor):
2705         * html/HTMLDocumentParser.cpp:
2706         (WebCore::HTMLDocumentParser::htmlTreeConstructor):
2707         * html/HTMLDocumentParser.h:
2708         * html/HTMLFormControlElement.cpp:
2709         (WebCore::HTMLFormControlElement::removedFromTree):
2710         * html/HTMLInputElement.cpp:
2711         * html/HTMLMeterElement.cpp:
2712         * html/HTMLProgressElement.cpp:
2713         * html/HTMLTreeBuilder.cpp:
2714         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2715         * html/HTMLTreeBuilder.h:
2716         (WebCore::HTMLTreeBuilder::legacyTreeConstructor):
2717         * html/LegacyHTMLDocumentParser.cpp:
2718         (WebCore::LegacyHTMLDocumentParser::LegacyHTMLDocumentParser):
2719         * html/LegacyHTMLDocumentParser.h:
2720         (WebCore::LegacyHTMLDocumentParser::htmlTreeConstructor):
2721         * html/LegacyHTMLTreeBuilder.cpp: Copied from WebCore/html/LegacyHTMLTreeConstructor.cpp.
2722         (WebCore::LegacyHTMLTreeBuilder::LegacyHTMLTreeBuilder):
2723         (WebCore::LegacyHTMLTreeBuilder::~LegacyHTMLTreeBuilder):
2724         (WebCore::LegacyHTMLTreeBuilder::reset):
2725         (WebCore::LegacyHTMLTreeBuilder::setCurrent):
2726         (WebCore::LegacyHTMLTreeBuilder::limitDepth):
2727         (WebCore::LegacyHTMLTreeBuilder::insertNodeAfterLimitDepth):
2728         (WebCore::LegacyHTMLTreeBuilder::parseToken):
2729         (WebCore::LegacyHTMLTreeBuilder::parseDoctypeToken):
2730         (WebCore::LegacyHTMLTreeBuilder::insertNode):
2731         (WebCore::LegacyHTMLTreeBuilder::handleError):
2732         (WebCore::LegacyHTMLTreeBuilder::textCreateErrorCheck):
2733         (WebCore::LegacyHTMLTreeBuilder::commentCreateErrorCheck):
2734         (WebCore::LegacyHTMLTreeBuilder::headCreateErrorCheck):
2735         (WebCore::LegacyHTMLTreeBuilder::bodyCreateErrorCheck):
2736         (WebCore::LegacyHTMLTreeBuilder::framesetCreateErrorCheck):
2737         (WebCore::LegacyHTMLTreeBuilder::formCreateErrorCheck):
2738         (WebCore::LegacyHTMLTreeBuilder::isindexCreateErrorCheck):
2739         (WebCore::LegacyHTMLTreeBuilder::selectCreateErrorCheck):
2740         (WebCore::LegacyHTMLTreeBuilder::ddCreateErrorCheck):
2741         (WebCore::LegacyHTMLTreeBuilder::dtCreateErrorCheck):
2742         (WebCore::LegacyHTMLTreeBuilder::rpCreateErrorCheck):
2743         (WebCore::LegacyHTMLTreeBuilder::rtCreateErrorCheck):
2744         (WebCore::LegacyHTMLTreeBuilder::nestedCreateErrorCheck):
2745         (WebCore::LegacyHTMLTreeBuilder::nestedPCloserCreateErrorCheck):
2746         (WebCore::LegacyHTMLTreeBuilder::nestedStyleCreateErrorCheck):
2747         (WebCore::LegacyHTMLTreeBuilder::tableCellCreateErrorCheck):
2748         (WebCore::LegacyHTMLTreeBuilder::tableSectionCreateErrorCheck):
2749         (WebCore::LegacyHTMLTreeBuilder::noembedCreateErrorCheck):
2750         (WebCore::LegacyHTMLTreeBuilder::noframesCreateErrorCheck):
2751         (WebCore::LegacyHTMLTreeBuilder::noscriptCreateErrorCheck):
2752         (WebCore::LegacyHTMLTreeBuilder::pCloserCreateErrorCheck):
2753         (WebCore::LegacyHTMLTreeBuilder::pCloserStrictCreateErrorCheck):
2754         (WebCore::LegacyHTMLTreeBuilder::mapCreateErrorCheck):
2755         (WebCore::LegacyHTMLTreeBuilder::getNode):
2756         (WebCore::LegacyHTMLTreeBuilder::allowNestedRedundantTag):
2757         (WebCore::LegacyHTMLTreeBuilder::processCloseTag):
2758         (WebCore::LegacyHTMLTreeBuilder::isHeadingTag):
2759         (WebCore::LegacyHTMLTreeBuilder::isInline):
2760         (WebCore::LegacyHTMLTreeBuilder::isResidualStyleTag):
2761         (WebCore::LegacyHTMLTreeBuilder::isAffectedByResidualStyle):
2762         (WebCore::LegacyHTMLTreeBuilder::handleResidualStyleCloseTagAcrossBlocks):
2763         (WebCore::LegacyHTMLTreeBuilder::reopenResidualStyleTags):
2764         (WebCore::LegacyHTMLTreeBuilder::pushBlock):
2765         (WebCore::LegacyHTMLTreeBuilder::popBlock):
2766         (WebCore::LegacyHTMLTreeBuilder::popOneBlockCommon):
2767         (WebCore::LegacyHTMLTreeBuilder::popOneBlock):
2768         (WebCore::LegacyHTMLTreeBuilder::moveOneBlockToStack):
2769         (WebCore::LegacyHTMLTreeBuilder::checkIfHasPElementInScope):
2770         (WebCore::LegacyHTMLTreeBuilder::popInlineBlocks):
2771         (WebCore::LegacyHTMLTreeBuilder::freeBlock):
2772         (WebCore::LegacyHTMLTreeBuilder::createHead):
2773         (WebCore::LegacyHTMLTreeBuilder::handleIsindex):
2774         (WebCore::LegacyHTMLTreeBuilder::startBody):
2775         (WebCore::LegacyHTMLTreeBuilder::finished):
2776         (WebCore::LegacyHTMLTreeBuilder::reportErrorToConsole):
2777         * html/LegacyHTMLTreeBuilder.h: Copied from WebCore/html/LegacyHTMLTreeConstructor.h.
2778         * html/LegacyHTMLTreeConstructor.cpp: Removed.
2779         * html/LegacyHTMLTreeConstructor.h: Removed.
2780         * html/StepRange.cpp:
2781         * html/ValidityState.cpp:
2782         * rendering/RenderSlider.cpp:
2783
2784 2010-06-23  Adam Barth  <abarth@webkit.org>
2785
2786         Reviewed by Eric Seidel.
2787
2788         Rename the preload scanners
2789         https://bugs.webkit.org/show_bug.cgi?id=41052
2790
2791         Renames PreloadScanner to LegacyPreloadScanner because this code is now
2792         off by default.  Also, rename HTML5PreloadScanner to
2793         HTMLPreloadScanner.  We're not calling it PreloadScanner because we've
2794         factored out the CSSPreloadScanner and the HTMLPreloadScanner from the
2795         original PreloadScanner.
2796
2797         * Android.mk:
2798         * CMakeLists.txt:
2799         * GNUmakefile.am:
2800         * WebCore.gypi:
2801         * WebCore.pro:
2802         * WebCore.vcproj/WebCore.vcproj:
2803         * WebCore.xcodeproj/project.pbxproj:
2804         * html/HTML5PreloadScanner.cpp: Removed.
2805         * html/HTML5PreloadScanner.h: Removed.
2806         * html/HTMLDocumentParser.cpp:
2807         (WebCore::HTMLDocumentParser::pumpTokenizer):
2808         * html/HTMLDocumentParser.h:
2809         * html/HTMLPreloadScanner.cpp: Copied from WebCore/html/HTML5PreloadScanner.cpp.
2810         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
2811         (WebCore::HTMLPreloadScanner::appendToEnd):
2812         (WebCore::HTMLPreloadScanner::scan):
2813         (WebCore::HTMLPreloadScanner::processToken):
2814         (WebCore::HTMLPreloadScanner::scanningBody):
2815         * html/HTMLPreloadScanner.h: Copied from WebCore/html/HTML5PreloadScanner.h.
2816         * html/LegacyHTMLDocumentParser.cpp:
2817         (WebCore::LegacyHTMLDocumentParser::scriptHandler):
2818         (WebCore::LegacyHTMLDocumentParser::scriptExecution):
2819         * html/LegacyHTMLDocumentParser.h:
2820         * html/LegacyPreloadScanner.cpp: Copied from WebCore/html/PreloadScanner.cpp.
2821         (WebCore::LegacyPreloadScanner::LegacyPreloadScanner):
2822         (WebCore::LegacyPreloadScanner::~LegacyPreloadScanner):
2823         (WebCore::LegacyPreloadScanner::begin):
2824         (WebCore::LegacyPreloadScanner::end):
2825         (WebCore::LegacyPreloadScanner::reset):
2826         (WebCore::LegacyPreloadScanner::scanningBody):
2827         (WebCore::LegacyPreloadScanner::write):
2828         (WebCore::LegacyPreloadScanner::clearLastCharacters):
2829         (WebCore::LegacyPreloadScanner::rememberCharacter):
2830         (WebCore::LegacyPreloadScanner::lastCharactersMatch):
2831         (WebCore::LegacyPreloadScanner::consumeEntity):
2832         (WebCore::LegacyPreloadScanner::tokenize):
2833         (WebCore::LegacyPreloadScanner::processAttribute):
2834         (WebCore::LegacyPreloadScanner::emitCharacter):
2835         (WebCore::LegacyPreloadScanner::tokenizeCSS):
2836         (WebCore::LegacyPreloadScanner::emitTag):
2837         (WebCore::LegacyPreloadScanner::emitCSSRule):
2838         * html/LegacyPreloadScanner.h: Copied from WebCore/html/PreloadScanner.h.
2839         * html/PreloadScanner.cpp: Removed.
2840         * html/PreloadScanner.h: Removed.
2841         * page/XSSAuditor.cpp:
2842         (WebCore::XSSAuditor::decodeHTMLEntities):
2843
2844 2010-06-23  Adam Barth  <abarth@webkit.org>
2845
2846         Reviewed by Eric Seidel.
2847
2848         Yet more HTML5 => HTML renames
2849         https://bugs.webkit.org/show_bug.cgi?id=41051
2850
2851         This patch renames HTML5DocumentParser to HTMLDocumentParser and
2852         HTML5TreeBuilder to HTMLTreeBuilder.  There was some discussion about
2853         whether to use the name HTMLTreeBuilder or HTMLTreeConstructor, but
2854         tree builder seems to be the dominate name in other implementations.
2855
2856         * Android.mk:
2857         * CMakeLists.txt:
2858         * GNUmakefile.am:
2859         * WebCore.gypi:
2860         * WebCore.pro:
2861         * WebCore.vcproj/WebCore.vcproj:
2862         * WebCore.xcodeproj/project.pbxproj:
2863         * dom/DocumentFragment.cpp:
2864         (WebCore::DocumentFragment::parseHTML):
2865         * html/HTML5DocumentParser.cpp: Removed.
2866         * html/HTML5DocumentParser.h: Removed.
2867         * html/HTML5PreloadScanner.cpp:
2868         (WebCore::HTML5PreloadScanner::scan):
2869         (WebCore::HTML5PreloadScanner::processToken):
2870         * html/HTML5TreeBuilder.cpp: Removed.
2871         * html/HTML5TreeBuilder.h: Removed.
2872         * html/HTMLDocument.cpp:
2873         (WebCore::HTMLDocument::createParser):
2874         * html/HTMLDocumentParser.cpp: Copied from WebCore/html/HTML5DocumentParser.cpp.
2875         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2876         (WebCore::HTMLDocumentParser::~HTMLDocumentParser):
2877         (WebCore::HTMLDocumentParser::begin):
2878         (WebCore::HTMLDocumentParser::stopParsing):
2879         (WebCore::HTMLDocumentParser::processingData):
2880         (WebCore::HTMLDocumentParser::pumpTokenizerIfPossible):
2881         (WebCore::HTMLDocumentParser::isScheduledForResume):
2882         (WebCore::HTMLDocumentParser::resumeParsingAfterYield):
2883         (WebCore::HTMLDocumentParser::runScriptsForPausedTreeConstructor):
2884         (WebCore::HTMLDocumentParser::pumpTokenizer):
2885         (WebCore::HTMLDocumentParser::willPumpLexer):
2886         (WebCore::HTMLDocumentParser::didPumpLexer):
2887         (WebCore::HTMLDocumentParser::write):
2888         (WebCore::HTMLDocumentParser::end):
2889         (WebCore::HTMLDocumentParser::attemptToEnd):
2890         (WebCore::HTMLDocumentParser::endIfDelayed):
2891         (WebCore::HTMLDocumentParser::finish):
2892         (WebCore::HTMLDocumentParser::finishWasCalled):
2893         (WebCore::HTMLDocumentParser::executingScript):
2894         (WebCore::HTMLDocumentParser::inScriptExecution):
2895         (WebCore::HTMLDocumentParser::lineNumber):
2896         (WebCore::HTMLDocumentParser::columnNumber):
2897         (WebCore::HTMLDocumentParser::htmlTreeConstructor):
2898         (WebCore::HTMLDocumentParser::isWaitingForScripts):
2899         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
2900         (WebCore::HTMLDocumentParser::watchForLoad):
2901         (WebCore::HTMLDocumentParser::stopWatchingForLoad):
2902         (WebCore::HTMLDocumentParser::shouldLoadExternalScriptFromSrc):
2903         (WebCore::HTMLDocumentParser::notifyFinished):
2904         (WebCore::HTMLDocumentParser::executeScriptsWaitingForStylesheets):
2905         (WebCore::HTMLDocumentParser::script):
2906         * html/HTMLDocumentParser.h: Copied from WebCore/html/HTML5DocumentParser.h.
2907         * html/HTMLParserScheduler.cpp:
2908         (WebCore::HTMLParserScheduler::HTMLParserScheduler):
2909         * html/HTMLParserScheduler.h:
2910         * html/HTMLTreeBuilder.cpp: Copied from WebCore/html/HTML5TreeBuilder.cpp.
2911         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2912         (WebCore::HTMLTreeBuilder::~HTMLTreeBuilder):
2913         (WebCore::HTMLTreeBuilder::handleScriptStartTag):
2914         (WebCore::HTMLTreeBuilder::handleScriptEndTag):
2915         (WebCore::HTMLTreeBuilder::takeScriptToProcess):
2916         (WebCore::HTMLTreeBuilder::adjustedLexerState):
2917         (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
2918         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
2919         (WebCore::HTMLTreeBuilder::processToken):
2920         (WebCore::HTMLTreeBuilder::finished):
2921         (WebCore::HTMLTreeBuilder::isScriptingFlagEnabled):
2922         * html/HTMLTreeBuilder.h: Copied from WebCore/html/HTML5TreeBuilder.h.
2923
2924 2010-06-23  Adam Barth  <abarth@webkit.org>
2925
2926         Reviewed by Eric Seidel.
2927
2928         More HTML5 => HTML renames
2929         https://bugs.webkit.org/show_bug.cgi?id=41049
2930
2931         This patch renames HTML5ScriptRunner, HTML5ScriptRunnerHost, and
2932         HTML5Token to remove the "5" from their names.  These clases aren't
2933         specific to HTML5 and will be used going forward.
2934
2935         * Android.mk:
2936         * CMakeLists.txt:
2937         * GNUmakefile.am:
2938         * WebCore.gypi:
2939         * WebCore.pro:
2940         * WebCore.vcproj/WebCore.vcproj:
2941         * WebCore.xcodeproj/project.pbxproj:
2942         * html/CSSPreloadScanner.cpp:
2943         (WebCore::CSSPreloadScanner::scan):
2944         * html/CSSPreloadScanner.h:
2945         * html/HTML5DocumentParser.cpp:
2946         (WebCore::HTML5DocumentParser::HTML5DocumentParser):
2947         (WebCore::HTML5DocumentParser::notifyFinished):
2948         * html/HTML5DocumentParser.h:
2949         * html/HTML5PreloadScanner.cpp:
2950         (WebCore::HTMLNames::PreloadTask::PreloadTask):
2951         (WebCore::HTMLNames::PreloadTask::processAttributes):
2952         (WebCore::HTML5PreloadScanner::processToken):
2953         * html/HTML5PreloadScanner.h:
2954         * html/HTML5ScriptRunner.cpp: Removed.
2955         * html/HTML5ScriptRunner.h: Removed.
2956         * html/HTML5ScriptRunnerHost.h: Removed.
2957         * html/HTML5Token.h: Removed.
2958         * html/HTML5TreeBuilder.cpp:
2959         (WebCore::convertToOldStyle):
2960         (WebCore::HTML5TreeBuilder::handleScriptEndTag):
2961         (WebCore::HTML5TreeBuilder::passTokenToLegacyParser):
2962         (WebCore::HTML5TreeBuilder::constructTreeFromToken):
2963         (WebCore::HTML5TreeBuilder::processToken):
2964         * html/HTML5TreeBuilder.h:
2965         * html/HTMLScriptRunner.cpp: Copied from WebCore/html/HTML5ScriptRunner.cpp.
2966         (WebCore::HTMLScriptRunner::HTMLScriptRunner):
2967         (WebCore::HTMLScriptRunner::~HTMLScriptRunner):
2968         (WebCore::HTMLScriptRunner::sourceFromPendingScript):
2969         (WebCore::HTMLScriptRunner::isPendingScriptReady):
2970         (WebCore::HTMLScriptRunner::executePendingScript):
2971         (WebCore::HTMLScriptRunner::executeScript):
2972         (WebCore::HTMLScriptRunner::hasScriptsWaitingForLoad):
2973         (WebCore::HTMLScriptRunner::watchForLoad):
2974         (WebCore::HTMLScriptRunner::stopWatchingForLoad):
2975         (WebCore::HTMLScriptRunner::execute):
2976         (WebCore::HTMLScriptRunner::haveParsingBlockingScript):
2977         (WebCore::HTMLScriptRunner::executeParsingBlockingScripts):
2978         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
2979         (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
2980         (WebCore::HTMLScriptRunner::requestScript):
2981         (WebCore::HTMLScriptRunner::runScript):
2982         * html/HTMLScriptRunner.h: Copied from WebCore/html/HTML5ScriptRunner.h.
2983         * html/HTMLScriptRunnerHost.h: Copied from WebCore/html/HTML5ScriptRunnerHost.h.
2984         (WebCore::HTMLScriptRunnerHost::~HTMLScriptRunnerHost):
2985         * html/HTMLToken.h: Copied from WebCore/html/HTML5Token.h.
2986         (WebCore::HTMLToken::HTMLToken):
2987         * html/HTMLTokenizer.cpp:
2988         (WebCore::HTMLTokenizer::nextToken):
2989         (WebCore::HTMLTokenizer::emitCharacter):
2990         (WebCore::HTMLTokenizer::emitCurrentToken):
2991         (WebCore::HTMLTokenizer::shouldEmitBufferedCharacterToken):
2992         * html/HTMLTokenizer.h:
2993
2994 2010-06-23  Adam Barth  <abarth@webkit.org>
2995
2996         Reviewed by Eric Seidel.
2997
2998         Rename HTML5EntityParser to HTMLEntityParser
2999         https://bugs.webkit.org/show_bug.cgi?id=41048
3000
3001         Mostly the result of do-webcore-rename, but I tweaked the header guard
3002         and the name of the free function.
3003
3004         * Android.mk:
3005         * CMakeLists.txt:
3006         * GNUmakefile.am:
3007         * WebCore.gypi:
3008         * WebCore.pro:
3009         * WebCore.vcproj/WebCore.vcproj:
3010         * WebCore.xcodeproj/project.pbxproj:
3011         * html/HTML5EntityParser.cpp: Removed.
3012         * html/HTML5EntityParser.h: Removed.
3013         * html/HTMLEntityParser.cpp: Copied from WebCore/html/HTML5EntityParser.cpp.
3014         (WebCore::consumeHTMLEntity):
3015         * html/HTMLEntityParser.h: Copied from WebCore/html/HTML5EntityParser.h.
3016         * html/HTMLTokenizer.cpp:
3017         (WebCore::HTMLTokenizer::processEntity):
3018         (WebCore::HTMLTokenizer::nextToken):
3019
3020 2010-06-22  Yuta Kitamura  <yutak@chromium.org>
3021
3022         Reviewed by Alexey Proskuryakov.
3023
3024         Add a new class that stores information about WebSocket handshake response.
3025
3026         In the future, instances of the new class will be passed to the Web Inspector
3027         so that it will be able to display information about WebSocket handshake
3028         response.
3029
3030         WebSocket: Add WebSocketHandshakeResponse
3031         https://bugs.webkit.org/show_bug.cgi?id=38728
3032
3033         Test: websocket/tests/handshake-fail-by-no-cr.html
3034
3035         * GNUmakefile.am:
3036         * WebCore.gypi:
3037         * WebCore.pro:
3038         * WebCore.vcproj/WebCore.vcproj:
3039         * WebCore.xcodeproj/project.pbxproj:
3040         * websockets/WebSocketHandshake.cpp:
3041         (WebCore::trimConsoleMessage):
3042         (WebCore::WebSocketHandshake::readServerHandshake):
3043         (WebCore::WebSocketHandshake::serverHandshakeResponse):
3044         (WebCore::WebSocketHandshake::readStatusLine): Moved from extractResponseCode.
3045         Add more error checks and make error messages more descriptive.
3046         (WebCore::WebSocketHandshake::readHTTPHeaders):
3047         (WebCore::WebSocketHandshake::processHeaders):
3048         * websockets/WebSocketHandshake.h:
3049         * websockets/WebSocketHandshakeResponse.cpp: Added.
3050         (WebCore::WebSocketHandshakeResponse::ChallengeResponse::ChallengeResponse):
3051         (WebCore::WebSocketHandshakeResponse::ChallengeResponse::set):
3052         (WebCore::WebSocketHandshakeResponse::WebSocketHandshakeResponse):
3053         (WebCore::WebSocketHandshakeResponse::~WebSocketHandshakeResponse):
3054         (WebCore::WebSocketHandshakeResponse::statusCode):
3055         (WebCore::WebSocketHandshakeResponse::setStatusCode):
3056         (WebCore::WebSocketHandshakeResponse::statusText):
3057         (WebCore::WebSocketHandshakeResponse::setStatusText):
3058         (WebCore::WebSocketHandshakeResponse::headerFields):
3059         (WebCore::WebSocketHandshakeResponse::addHeaderField):
3060         (WebCore::WebSocketHandshakeResponse::clearHeaderFields):
3061         (WebCore::WebSocketHandshakeResponse::challengeResponse):
3062         (WebCore::WebSocketHandshakeResponse::setChallengeResponse):
3063         * websockets/WebSocketHandshakeResponse.h: Added.
3064
3065 2010-06-23  Yuzo Fujishima  <yuzo@google.com>
3066
3067         Reviewed by Shinichiro Hamaji.
3068
3069         Implement page format data programming interface.
3070         The final goal is to implement CSS Paged Media Module Level 3 (http://dev.w3.org/csswg/css3-page/).
3071         To begin with, this change adds methods to know:
3072         - if page box is visible,
3073         - the page area rectangle, and
3074         - preferred page size.
3075
3076         https://bugs.webkit.org/show_bug.cgi?id=37538
3077
3078         Test: printing/page-format-data.html
3079
3080         * WebCore.base.exp:
3081         * css/CSSParser.cpp:
3082         (WebCore::CSSParser::parseSizeParameter):
3083         * css/CSSStyleSelector.cpp:
3084         (WebCore::CSSStyleSelector::applyProperty):
3085         (WebCore::CSSStyleSelector::applyPageSizeProperty):
3086         (WebCore::CSSStyleSelector::pageSizeFromName):
3087         (WebCore::CSSStyleSelector::mmLength):
3088         (WebCore::CSSStyleSelector::inchLength):
3089         * css/CSSStyleSelector.h:
3090         * css/html.css:
3091         (@page):
3092         * dom/Document.cpp:
3093         (WebCore::Document::isPageBoxVisible):
3094         (WebCore::Document::pageAreaRectInPixels):
3095         (WebCore::Document::preferredPageSizeInPixels):
3096         * dom/Document.h:
3097         * page/PrintContext.cpp:
3098         (WebCore::PrintContext::isPageBoxVisible):
3099         (WebCore::PrintContext::pageAreaRectInPixels):
3100         (WebCore::PrintContext::preferredPageSizeInPixels):
3101         * page/PrintContext.h:
3102         * rendering/style/RenderStyle.h:
3103         (WebCore::InheritedFlags::pageSize):
3104         (WebCore::InheritedFlags::setPageSize):
3105         * rendering/style/StyleRareNonInheritedData.h:
3106
3107 2010-06-23  Adam Barth  <abarth@webkit.org>
3108
3109         Reviewed by Eric Seidel.
3110
3111         Rename lexer and m_lexer to tokenizer and m_tokenizer, respectively
3112         https://bugs.webkit.org/show_bug.cgi?id=41046
3113
3114         This is a follow up to the recent HTML5Lexer => HTMLTokenizer rename.
3115
3116         * html/HTML5DocumentParser.cpp:
3117         (WebCore::HTML5DocumentParser::HTML5DocumentParser):
3118         (WebCore::HTML5DocumentParser::begin):
3119         (WebCore::HTML5DocumentParser::pumpLexer):
3120         (WebCore::HTML5DocumentParser::willPumpLexer):
3121         (WebCore::HTML5DocumentParser::didPumpLexer):
3122         (WebCore::HTML5DocumentParser::lineNumber):
3123         (WebCore::HTML5DocumentParser::columnNumber):
3124         * html/HTML5DocumentParser.h:
3125         * html/HTML5PreloadScanner.cpp:
3126         (WebCore::HTML5PreloadScanner::scan):
3127         (WebCore::HTML5PreloadScanner::processToken):
3128         * html/HTML5PreloadScanner.h:
3129         * html/HTML5TreeBuilder.cpp:
3130         (WebCore::HTML5TreeBuilder::HTML5TreeBuilder):
3131         (WebCore::HTML5TreeBuilder::handleScriptStartTag):
3132         (WebCore::HTML5TreeBuilder::passTokenToLegacyParser):
3133         * html/HTML5TreeBuilder.h:
3134         * html/HTMLTokenizer.h:
3135         * html/LegacyHTMLDocumentParser.h:
3136
3137 2010-06-23  Nikolas Zimmermann  <nzimmermann@rim.com>
3138
3139         Reviewed by Eric Seidel.
3140
3141         Reproducible crash in com.apple.WebCore 0x01ed3784 WebCore::RenderLineBoxList::appendLineBox(WebCore::InlineFlowBox*) + 36
3142         https://bugs.webkit.org/show_bug.cgi?id=40953
3143
3144         REGRESSION (r58209-58231): Memory corruption with invalid SVG
3145         https://bugs.webkit.org/show_bug.cgi?id=40173
3146
3147         Fix several crashes, all related to <foreignObject> and/or invalid SVG documents.
3148         - Only allow <svg> nodes, as direct children of a <foreignObject>, not any other "partial" SVG content.
3149         - Assure to create RenderSVGRoot objects for <svg> nodes in <foreignObject>, treat them as "outermost SVG elements".
3150         - Never allow any partial SVG content to appear in any document. Only <svg> elements are allowed.
3151
3152         Tests: svg/custom/bug45331.svg
3153                svg/foreignObject/disallowed-svg-nodes-as-direct-children.svg
3154                svg/foreignObject/no-crash-with-svg-content-in-html-document.svg
3155                svg/foreignObject/svg-document-as-direct-child.svg
3156                svg/foreignObject/svg-document-in-html-document.svg
3157                svg/foreignObject/text-tref-02-b.svg
3158
3159         * dom/Element.cpp: Added childShouldCreateRenderer, with ENABLE(SVG) guards.
3160         (WebCore::Element::childShouldCreateRenderer): Only create a renderer for a SVG child, if we're a SVG element, or if the child is a <svg> element.
3161         * dom/Element.h: Added childShouldCreateRenderer, with ENABLE(SVG) guards.
3162         * svg/SVGForeignObjectElement.cpp:
3163         (WebCore::SVGForeignObjectElement::childShouldCreateRenderer): Disallow arbitary SVG content, only <svg> elements are allowed as direct children of a <foreignObject>
3164         * svg/SVGSVGElement.cpp:
3165         (WebCore::SVGSVGElement::isOutermostSVG): Be sure to create RenderSVGRoot objects for <svg> elements inside <foreignObject>
3166
3167 2010-06-22  Adam Barth  <abarth@webkit.org>
3168
3169         Reviewed by Eric Seidel.
3170
3171         Rename HTML5Lexer to HTMLTokenizer
3172         https://bugs.webkit.org/show_bug.cgi?id=41045
3173
3174         This might be slightly confusing given that the old class was called
3175         HTMLTokenizer, but it matches the terminology in the HTML5 spec.
3176
3177         * Android.mk:
3178         * CMakeLists.txt:
3179         * GNUmakefile.am:
3180         * WebCore.gypi:
3181         * WebCore.pro:
3182         * WebCore.vcproj/WebCore.vcproj:
3183         * WebCore.xcodeproj/project.pbxproj:
3184         * html/HTML5DocumentParser.cpp:
3185         (WebCore::HTML5DocumentParser::HTML5DocumentParser):
3186         (WebCore::HTML5DocumentParser::pumpLexer):
3187         * html/HTML5DocumentParser.h:
3188         * html/HTML5Lexer.cpp: Removed.
3189         * html/HTML5Lexer.h: Removed.
3190         * html/HTML5PreloadScanner.cpp:
3191         (WebCore::HTML5PreloadScanner::processToken):
3192         * html/HTML5PreloadScanner.h:
3193         * html/HTML5TreeBuilder.cpp:
3194         (WebCore::HTML5TreeBuilder::HTML5TreeBuilder):
3195         (WebCore::HTML5TreeBuilder::handleScriptStartTag):
3196         (WebCore::HTML5TreeBuilder::adjustedLexerState):
3197         * html/HTML5TreeBuilder.h:
3198         * html/HTMLTokenizer.cpp: Copied from WebCore/html/HTML5Lexer.cpp.
3199         (WebCore::HTMLNames::isEndTagBufferingState):
3200         (WebCore::HTMLTokenizer::HTMLTokenizer):
3201         (WebCore::HTMLTokenizer::~HTMLTokenizer):
3202         (WebCore::HTMLTokenizer::reset):
3203         (WebCore::HTMLTokenizer::processEntity):
3204         (WebCore::HTMLTokenizer::nextToken):
3205         (WebCore::HTMLTokenizer::temporaryBufferIs):
3206         (WebCore::HTMLTokenizer::addToPossibleEndTag):
3207         (WebCore::HTMLTokenizer::isAppropriateEndTag):
3208         (WebCore::HTMLTokenizer::emitCharacter):
3209         (WebCore::HTMLTokenizer::emitCodePoint):
3210         (WebCore::HTMLTokenizer::emitParseError):
3211         (WebCore::HTMLTokenizer::emitCurrentToken):
3212         (WebCore::HTMLTokenizer::shouldEmitBufferedCharacterToken):
3213         * html/HTMLTokenizer.h: Copied from WebCore/html/HTML5Lexer.h.
3214
3215 2010-06-22  Simon Hausmann  <simon.hausmann@nokia.com>
3216
3217         Unreviewed Qt/Symbian build fix.
3218
3219         Fix "make clean" to not try to execute clean commands for
3220         the extra targets we use to simulate "make install".
3221
3222         * WebCore.pro: Use no_clean in CONFIG of extra compilers.
3223
3224 2010-06-22  Eric Seidel  <eric@webkit.org>
3225
3226         Reviewed by Adam Barth.
3227
3228         Run clean-header-guards to fix some header guards
3229         https://bugs.webkit.org/show_bug.cgi?id=41044
3230
3231         No functional changes, thus no tests.
3232
3233         This entire change was generated by running
3234         clean-header-guards, and then reverting changes
3235         to files which shouldn't be changed.  Those which
3236         are left all should be updated.
3237
3238         Some of these changes are just fixing 755 permissions
3239         to be 644, since it seems various files have the wrong
3240         execute bit which don't need it.  clean-header-guards
3241         made those (welcome) permission fixes unintentionally.
3242
3243         * bindings/v8/custom/V8HTMLAudioElementConstructor.h:
3244         * bindings/v8/custom/V8HTMLImageElementConstructor.h:
3245         * bindings/v8/custom/V8HTMLOptionElementConstructor.h:
3246         * dom/Touch.h:
3247         * dom/TouchList.h:
3248         * dom/XMLDocumentParser.h:
3249         * dom/XMLDocumentParserScope.h:
3250         * html/HTML5DocumentParser.h:
3251         * html/LegacyHTMLTreeConstructor.h:
3252         * loader/CrossOriginPreflightResultCache.h:
3253         * page/OriginAccessEntry.h:
3254         * page/win/FrameWin.h:
3255         * platform/ThreadTimers.h:
3256         * platform/chromium/KeyboardCodes.h:
3257         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
3258         * platform/graphics/chromium/FontUtilsChromiumWin.h:
3259         * platform/graphics/filters/FEBlend.h:
3260         * platform/graphics/filters/FEColorMatrix.h:
3261         * platform/graphics/filters/FEComponentTransfer.h:
3262         * platform/graphics/filters/FEComposite.h:
3263         * platform/graphics/gstreamer/DataSourceGStreamer.h:
3264         * platform/graphics/gstreamer/VideoSinkGStreamer.h:
3265          - I checked, this crazy define was not referenced
3266            anywhere else.  It's safe to change the name. :)
3267         * platform/graphics/haiku/FontPlatformData.h:
3268         * platform/graphics/qt/FontCustomPlatformData.h:
3269         * platform/graphics/skia/SkiaFontWin.h:
3270         * platform/graphics/win/GraphicsLayerCACF.h:
3271         * platform/graphics/win/QTMovieWinTimer.h:
3272         * platform/graphics/win/RefCountedGDIHandle.h:
3273         * platform/graphics/win/WebLayer.h:
3274         * platform/graphics/win/WebTiledLayer.h:
3275         * platform/graphics/wince/FontPlatformData.h:
3276         * platform/graphics/wx/FontPlatformData.h:
3277         * platform/network/CredentialStorage.h:
3278         * platform/network/cf/FormDataStreamCFNet.h:
3279         * platform/network/curl/FormDataStreamCurl.h:
3280         * platform/network/qt/DnsPrefetchHelper.h:
3281         * platform/network/qt/QNetworkReplyHandler.h:
3282         * platform/win/PlatformScrollBar.h:
3283         * plugins/PluginDatabase.h:
3284         * plugins/PluginPackage.h:
3285         * plugins/PluginStream.h:
3286         * plugins/qt/PluginContainerQt.h:
3287         * plugins/symbian/npinterface.h:
3288         * rendering/RenderSelectionInfo.h:
3289         * rendering/SVGRenderSupport.h:
3290         * storage/IDBObjectStoreImpl.h:
3291         * svg/animation/SMILTimeContainer.h:
3292         * wml/WMLErrorHandling.h:
3293
3294 2010-06-22  Adam Barth  <abarth@webkit.org>
3295
3296         Reviewed by Eric Seidel.
3297
3298         Rename HTMLDocumentParser to LegacyHTMLDocumentParser
3299         https://bugs.webkit.org/show_bug.cgi?id=41043
3300
3301         As requested by Darin Adler.
3302
3303         * Android.mk:
3304         * CMakeLists.txt:
3305         * GNUmakefile.am:
3306         * WebCore.gypi:
3307         * WebCore.pro:
3308         * WebCore.vcproj/WebCore.vcproj:
3309         * WebCore.xcodeproj/project.pbxproj:
3310         * css/CSSStyleSheet.cpp:
3311         (WebCore::CSSStyleSheet::checkLoaded):
3312         * dom/Document.cpp:
3313         (WebCore::Document::write):
3314         * dom/DocumentFragment.cpp:
3315         * dom/DocumentParser.h:
3316         (WebCore::DocumentParser::asHTMLDocumentParser):
3317         * dom/XMLDocumentParserLibxml2.cpp:
3318         * dom/XMLDocumentParserQt.cpp:
3319         * html/HTML5Lexer.h:
3320         (WebCore::HTML5Lexer::columnNumber):
3321         * html/HTML5TreeBuilder.cpp:
3322         * html/HTMLDocument.cpp:
3323         (WebCore::HTMLDocument::createParser):
3324         * html/HTMLDocumentParser.cpp: Removed.
3325         * html/HTMLDocumentParser.h: Removed.
3326         * html/HTMLFormControlElement.cpp:
3327         * html/HTMLParserScheduler.cpp:
3328         (WebCore::parserChunkSize):
3329         * html/HTMLViewSourceDocument.cpp:
3330         (WebCore::HTMLViewSourceDocument::createParser):
3331         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
3332         * html/HTMLViewSourceDocument.h:
3333         * html/LegacyHTMLDocumentParser.cpp: Copied from WebCore/html/HTMLDocumentParser.cpp.
3334         (WebCore::LegacyHTMLDocumentParser::LegacyHTMLDocumentParser):
3335         (WebCore::LegacyHTMLDocumentParser::reset):
3336         (WebCore::LegacyHTMLDocumentParser::begin):
3337         (WebCore::LegacyHTMLDocumentParser::setForceSynchronous):
3338         (WebCore::LegacyHTMLDocumentParser::processListing):
3339         (WebCore::LegacyHTMLDocumentParser::parseNonHTMLText):
3340         (WebCore::LegacyHTMLDocumentParser::scriptHandler):
3341         (WebCore::LegacyHTMLDocumentParser::scriptExecution):
3342         (WebCore::LegacyHTMLDocumentParser::parseComment):
3343         (WebCore::LegacyHTMLDocumentParser::parseServer):
3344         (WebCore::LegacyHTMLDocumentParser::parseProcessingInstruction):
3345         (WebCore::LegacyHTMLDocumentParser::parseText):
3346         (WebCore::LegacyHTMLDocumentParser::parseEntity):
3347         (WebCore::LegacyHTMLDocumentParser::parseDoctype):
3348         (WebCore::LegacyHTMLDocumentParser::parseTag):
3349         (WebCore::LegacyHTMLDocumentParser::continueProcessing):
3350         (WebCore::LegacyHTMLDocumentParser::advance):
3351         (WebCore::LegacyHTMLDocumentParser::willWriteHTML):
3352         (WebCore::LegacyHTMLDocumentParser::didWriteHTML):
3353         (WebCore::LegacyHTMLDocumentParser::write):
3354         (WebCore::LegacyHTMLDocumentParser::stopParsing):
3355         (WebCore::LegacyHTMLDocumentParser::processingData):
3356         (WebCore::LegacyHTMLDocumentParser::timerFired):
3357         (WebCore::LegacyHTMLDocumentParser::end):
3358         (WebCore::LegacyHTMLDocumentParser::finish):
3359         (WebCore::LegacyHTMLDocumentParser::finishWasCalled):
3360         (WebCore::LegacyHTMLDocumentParser::processToken):
3361         (WebCore::LegacyHTMLDocumentParser::processDoctypeToken):
3362         (WebCore::LegacyHTMLDocumentParser::~LegacyHTMLDocumentParser):
3363         (WebCore::LegacyHTMLDocumentParser::enlargeBuffer):
3364         (WebCore::LegacyHTMLDocumentParser::enlargeScriptBuffer):
3365         (WebCore::LegacyHTMLDocumentParser::executeScriptsWaitingForStylesheets):
3366         (WebCore::LegacyHTMLDocumentParser::notifyFinished):
3367         (WebCore::LegacyHTMLDocumentParser::executeExternalScriptsIfReady):
3368         (WebCore::LegacyHTMLDocumentParser::executeExternalScriptsTimerFired):
3369         (WebCore::LegacyHTMLDocumentParser::continueExecutingExternalScripts):
3370         (WebCore::LegacyHTMLDocumentParser::isWaitingForScripts):
3371         (WebCore::LegacyHTMLDocumentParser::setSrc):
3372         (WebCore::parseLegacyHTMLDocumentFragment):
3373         * html/LegacyHTMLDocumentParser.h: Copied from WebCore/html/HTMLDocumentParser.h.
3374         (WebCore::LegacyHTMLDocumentParser::asHTMLDocumentParser):
3375         * html/LegacyHTMLTreeConstructor.cpp:
3376         (WebCore::LegacyHTMLTreeConstructor::reportErrorToConsole):
3377         * html/LegacyHTMLTreeConstructor.h:
3378         * loader/FTPDirectoryDocument.cpp:
3379         (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
3380         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
3381         (WebCore::FTPDirectoryDocumentParser::finish):
3382         * page/XSSAuditor.h:
3383
3384 2010-06-22  Shinichiro Hamaji  <hamaji@chromium.org>
3385
3386         Unreviewed attempt to fix the windows build.
3387
3388         Split out HTML5DocumentParser yield/resume logic into a separate class
3389         https://bugs.webkit.org/show_bug.cgi?id=41018
3390
3391         * WebCore.vcproj/WebCore.vcproj:
3392
3393 2010-06-22  Eric Seidel  <eric@webkit.org>
3394
3395         Reviewed by Adam Barth.
3396
3397         Split out HTML5DocumentParser yield/resume logic into a separate class
3398         https://bugs.webkit.org/show_bug.cgi?id=41018
3399
3400         The HTML5DocumentParser is just the coordinator, and shouldn't have
3401         any real parsing logic of his own.  Continuing along that path, I'm
3402         moving the when-to-yield/resume logic out into a separate class.
3403
3404         I could have create a new HTMLParserSchedulerHost virtual interface
3405         to allow the HTMLParserScheduler to talk back to the
3406         HTML5DocumentParser, but instead I just exposed the one method it
3407         needs (resumeParsing()) as a public method.  Since no code besides
3408         HTMLDocument (and DocumentFrament) ever should know about the
3409         HTML5DocumentParser DocumentParser subclass, no class should ever
3410         see the resumeParsing() method anyway.
3411
3412         Most of this change is just moving code from HTML5DocumentParser
3413         to the new HTMLParserScheduler.
3414
3415         Some of this change is wrapping previous direct access to
3416         m_continueNextChunkTimer.isActive() with isScheduledForResume().
3417
3418         * Android.mk:
3419         * CMakeLists.txt:
3420         * GNUmakefile.am:
3421         * WebCore.gypi:
3422         * WebCore.pro:
3423         * WebCore.xcodeproj/project.pbxproj:
3424         * html/HTML5DocumentParser.cpp:
3425         (WebCore::HTML5DocumentParser::HTML5DocumentParser):
3426         (WebCore::HTML5DocumentParser::stopParsing):
3427         (WebCore::HTML5DocumentParser::processingData):
3428         (WebCore::HTML5DocumentParser::pumpLexerIfPossible):
3429         (WebCore::HTML5DocumentParser::isScheduledForResume):
3430         (WebCore::HTML5DocumentParser::resumeParsing):
3431         (WebCore::HTML5DocumentParser::pumpLexer):
3432         (WebCore::HTML5DocumentParser::end):
3433         (WebCore::HTML5DocumentParser::attemptToEnd):
3434         (WebCore::HTML5DocumentParser::endIfDelayed):
3435         * html/HTML5DocumentParser.h:
3436         (WebCore::HTML5DocumentParser::document):
3437          - Exposed for HTMLParserScheduler.
3438         * html/HTMLParserScheduler.cpp: Added.
3439         (WebCore::parserTimeLimit): Moved from HTML5DocumentParser.
3440         (WebCore::parserChunkSize): ditto.
3441         (WebCore::HTMLParserScheduler::HTMLParserScheduler):
3442         (WebCore::HTMLParserScheduler::~HTMLParserScheduler):
3443         (WebCore::isLayoutTimerActive):
3444         (WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
3445          - Moved from HTML5DocumentParser.
3446         * html/HTMLParserScheduler.h: Added.
3447         (WebCore::HTMLParserScheduler::PumpSession::PumpSession):
3448          - Moved from HTML5DocumentParser.
3449         (WebCore::HTMLParserScheduler::shouldContinueParsing):
3450         (WebCore::HTMLParserScheduler::isScheduledForResume):
3451
3452 2010-06-22  Pavel Feldman  <pfeldman@chromium.org>
3453
3454         Reviewed by Yury Semikhatsky.
3455
3456         Web Inspector: move nodeByPath from InjectedScript to InspectorBackend.
3457
3458         https://bugs.webkit.org/show_bug.cgi?id=40988
3459
3460         * inspector/InjectedScriptHost.cpp:
3461         * inspector/InjectedScriptHost.h:
3462         * inspector/InjectedScriptHost.idl:
3463         * inspector/InspectorBackend.cpp:
3464         (WebCore::InspectorBackend::pushNodeByPathToFrontend):
3465         * inspector/InspectorBackend.h:
3466         * inspector/InspectorBackend.idl:
3467         * inspector/InspectorDOMAgent.cpp:
3468         (WebCore::InspectorDOMAgent::pushNodeByPathToFrontend):
3469         (WebCore::InspectorDOMAgent::nodeForPath):
3470         * inspector/InspectorDOMAgent.h:
3471         * inspector/InspectorFrontend.cpp:
3472         (WebCore::InspectorFrontend::didPushNodeByPathToFrontend):
3473         * inspector/InspectorFrontend.h:
3474         * inspector/front-end/DOMAgent.js:
3475         * inspector/front-end/ElementsPanel.js:
3476         (WebInspector.ElementsPanel.prototype.setDocument):
3477         * inspector/front-end/InjectedScript.js:
3478         * inspector/front-end/InjectedScriptAccess.js:
3479
3480 2010-06-22  David Levin  <levin@chromium.org>
3481
3482         Reviewed by Alexey Proskuryakov.
3483
3484         REGRESSION: (r47291): Upload progress events are not fired for simple cross-site XHR.
3485         https://bugs.webkit.org/show_bug.cgi?id=39029
3486
3487         Specifically, WebKit should fire upload events if one or more event listeners are
3488         registered on the XMLHttpRequestUpload object when send is called in an async manner.
3489
3490         * xml/XMLHttpRequest.cpp:
3491         (WebCore::XMLHttpRequest::createRequest): Allow upload events to be fired when there are
3492         handlers for them in the cross-origin simple request case.
3493
3494 2010-06-22  Kent Tamura  <tkent@chromium.org>
3495
3496         Reviewed by Adam Barth.
3497
3498         Fix uninitialized SubframeLoader::m_containsPlugins
3499         https://bugs.webkit.org/show_bug.cgi?id=41035
3500
3501         * loader/SubframeLoader.cpp:
3502         (WebCore::SubframeLoader::SubframeLoader):
3503          Initialize m_containsPlugins with false.
3504
3505 2010-06-22  Kinuko Yasuda  <kinuko@chromium.org>
3506
3507         Reviewed by Adam Barth.
3508
3509         Add BlobBuilder.idl to expose BlobBuilder interface
3510         https://bugs.webkit.org/show_bug.cgi?id=40593
3511
3512         (Resubmitting with the correct file set.)
3513
3514         BlobBuilder is defined in FileAPI's FileWriter spec.
3515         (http://dev.w3.org/2009/dap/file-system/file-writer.html)
3516
3517         Also removes the ENABLE_FILE_WRITER ifdef guard for BlobBuilder.
3518
3519         Tests: http/tests/local/blob/send-data-blob.html
3520                http/tests/local/blob/send-hybrid-blob.html
3521                http/tests/local/blob/send-sliced-data-blob.html
3522
3523         * Android.derived.jscbindings.mk:
3524         * Android.derived.v8bindings.mk:
3525         * CMakeLists.txt:
3526         * DerivedSources.cpp:
3527         * DerivedSources.make:
3528         * GNUmakefile.am:
3529         * WebCore.gypi:
3530         * WebCore.pri:
3531         * WebCore.pro:
3532         * WebCore.vcproj/WebCore.vcproj:
3533         * WebCore.xcodeproj/project.pbxproj:
3534         * html/BlobBuilder.cpp:
3535         (WebCore::BlobBuilder::append):
3536         * html/BlobBuilder.h:
3537         * html/BlobBuilder.idl: Added.
3538         * page/DOMWindow.idl:
3539
3540 2010-06-22  Kent Tamura  <tkent@chromium.org>
3541
3542         Unreviewed, build fix for r61648.
3543
3544         * platform/graphics/GraphicsContext3D.h:
3545
3546 2010-06-22  Vangelis Kokkevis  <vangelis@chromium.org>
3547
3548         Reviewed by Kent Tamura.
3549
3550         Define GraphicsContext3D::platformLayer() for all remaining (non PLATFORM(MAC))
3551         ports to get RenderLayerBacking.cpp compiling again.
3552         https://bugs.webkit.org/show_bug.cgi?id=41026
3553
3554         * platform/graphics/GraphicsContext3D.h:
3555         (WebCore::GraphicsContext3D::platformLayer):
3556
3557 2010-06-22  Eric Seidel  <eric@webkit.org>
3558
3559         Unreviewed.  Rolling out http://trac.webkit.org/changeset/61638
3560         made a few tests crash.
3561
3562         Make PendingScript hold a CachedResourceClient open for its lifetime
3563         https://bugs.webkit.org/show_bug.cgi?id=40968
3564
3565         * html/HTML5DocumentParser.cpp:
3566         (WebCore::HTML5DocumentParser::watchForLoad):
3567         (WebCore::HTML5DocumentParser::notifyFinished):
3568         * html/HTML5ScriptRunner.cpp:
3569         (WebCore::HTML5ScriptRunner::~HTML5ScriptRunner):
3570         (WebCore::HTML5ScriptRunner::sourceFromPendingScript):
3571         (WebCore::HTML5ScriptRunner::isPendingScriptReady):
3572         (WebCore::HTML5ScriptRunner::executePendingScript):
3573         (WebCore::HTML5ScriptRunner::hasScriptsWaitingForLoad):
3574         (WebCore::HTML5ScriptRunner::watchForLoad):
3575         (WebCore::HTML5ScriptRunner::stopWatchingForLoad):
3576         (WebCore::HTML5ScriptRunner::executeScriptsWaitingForLoad):
3577         (WebCore::HTML5ScriptRunner::executeScriptsWaitingForStylesheets):
3578         (WebCore::HTML5ScriptRunner::requestScript):
3579         * html/HTML5ScriptRunner.h:
3580         (WebCore::HTML5ScriptRunner::PendingScript::):
3581         (WebCore::HTML5ScriptRunner::PendingScript::PendingScript):
3582         (WebCore::HTML5ScriptRunner::PendingScript::watchingForLoad):
3583         * html/HTML5ScriptRunnerHost.h:
3584
3585 2010-06-22  Adele Peterson  <adele@apple.com>
3586
3587         Reviewed by Darin Adler.
3588
3589         Fix for Crash when the renderer for the button in <input type="number"> goes away during event handling
3590         https://bugs.webkit.org/show_bug.cgi?id=41013
3591
3592         Test: fast/forms/input-number-crash.html
3593
3594         * rendering/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::defaultEventHandler):
3595         Nil check the RenderBox since its possible the renderer has gone away during event handling.
3596
3597 2010-06-22  Tony Gentilcore  <tonyg@chromium.org>
3598
3599         Reviewed by Eric Seidel.
3600
3601         Pull script line number from DocumentParser instead of pushing it to ScriptController
3602         https://bugs.webkit.org/show_bug.cgi?id=40649
3603
3604         This approach is cleaner and improves WebCore/benchmarks/parser/html-parser.html by ~2%.
3605
3606         Tests: fast/js/script-line-number.html
3607
3608         * bindings/js/ScriptController.cpp:
3609         (WebCore::ScriptController::ScriptController):
3610         (WebCore::ScriptController::eventHandlerLineNumber):
3611         * bindings/js/ScriptController.h:
3612         * bindings/v8/ScriptController.cpp:
3613         (WebCore::ScriptController::eventHandlerLineNumber):
3614         (WebCore::ScriptController::eventHandlerColumnNumber):
3615         * bindings/v8/ScriptController.h:
3616         * bindings/v8/ScriptEventListener.cpp:
3617         (WebCore::createAttributeEventListener):
3618         * bindings/v8/V8Proxy.h:
3619         * dom/XMLDocumentParserLibxml2.cpp:
3620         (WebCore::XMLDocumentParser::startElementNs):
3621         * html/HTML5DocumentParser.cpp:
3622         (WebCore::HTML5DocumentParser::pumpLexer):
3623         * html/HTMLDocumentParser.cpp:
3624         (WebCore::HTMLDocumentParser::processToken):
3625
3626 2010-06-22  Tony Gentilcore  <tonyg@chromium.org>
3627
3628         Reviewed by Eric Seidel.
3629
3630         Make PendingScript hold a CachedResourceClient open for its lifetime
3631         https://bugs.webkit.org/show_bug.cgi?id=40968
3632
3633         This replaces the mechanism introduced in r61374 with a simpler
3634         approach from preventing unexpected purges; always keep a client open.
3635         This will approach will allow deferred scripts to add a client after
3636         the resource may have already been loaded without having to worry about