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