Source/WebCore: Refined the heuristic introduced to fix <rdar://problem/10002140...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-08-31  Dan Bernstein  <mitz@apple.com>
2
3         Refined the heuristic introduced to fix <rdar://problem/10002140> Text gets clipped in
4         multi-column layouts when overflow:auto is used.
5         https://bugs.webkit.org/show_bug.cgi?id=67212
6
7         Reviewed by Dave Hyatt.
8
9         Test: fast/multicol/overflow-across-columns-percent-height.html
10
11         * rendering/RenderBox.cpp:
12         (WebCore::percentageLogicalHeightIsResolvable): Added. This follows logic similar to the one
13         in computePercentageLogicalHeight() to determine whether percentage values for height properties
14         are resolved or treated as "auto".
15         (WebCore::RenderBox::hasUnsplittableScrollingOverflow): If min-height or max-height are specified
16         as a percentage but actually resolve to "auto", don’t let that prevent splitting.
17
18 2011-08-31  Ryosuke Niwa  <rniwa@webkit.org>
19
20         Move text() and textWithHardLineBreaks() from RenderTextControl to HTMLTextFormControlElement
21         https://bugs.webkit.org/show_bug.cgi?id=67320
22
23         Reviewed by Darin Adler.
24
25         Moved and renamed RenderText::text and RenderText::textWithHardLineBreaks to
26         HTMLTextFormControlElement::innerTextValue and HTMLTextFormControlElement::valueWithHardLineBreaks.
27
28         * accessibility/AccessibilityRenderObject.cpp:
29         (WebCore::AccessibilityRenderObject::text):
30         * html/HTMLInputElement.cpp:
31         (WebCore::HTMLInputElement::subtreeHasChanged):
32         * html/HTMLTextAreaElement.cpp:
33         (WebCore::HTMLTextAreaElement::appendFormData): Calls valueWithHardLineBreaks. It doesn't have to check
34         the existence of renderer anymore because valueWithHardLineBreaks returns value() when renderer do not
35         exist unlike RenderText::textWithHardLineBreaks returned emptyString() in such cases. This is the only place
36         valueWithHardLineBreaks is ever called; but we can't move valueWithHardLineBreaks because it calls
37         finishText.
38         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
39         (WebCore::HTMLTextAreaElement::updateValue):
40         * html/HTMLTextFormControlElement.cpp:
41         (WebCore::HTMLTextFormControlElement::selectedText):
42         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
43         (WebCore::finishText): Moved from RenderText.cpp
44         (WebCore::HTMLTextFormControlElement::innerTextValue): Ditto.
45         (WebCore::getNextSoftBreak): Ditto.
46         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks): Ditto; this function returns value()
47         when there are no renderers or root inline boxes instead of emptyString().
48         * html/HTMLTextFormControlElement.h:
49         * html/NumberInputType.cpp:
50         (WebCore::NumberInputType::hasUnacceptableValue):
51         * html/SearchInputType.cpp:
52         (WebCore::SearchInputType::startSearchEventTimer):
53         * html/TextFieldInputType.cpp:
54         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
55         * rendering/RenderTextControl.cpp:
56         * rendering/RenderTextControl.h:
57
58 2011-08-31  Jeff Miller  <jeffm@apple.com>
59
60         REGRESSION(92210): AVFoundation media engine is disabled on OS X
61         https://bugs.webkit.org/show_bug.cgi?id=67316
62         
63         Move the definition of WTF_USE_AVFOUNDATION on the Mac back to JavaScriptCore/wtf/Platform.h,
64         since WebKit2 doesn't have access to WebCore/config.h on this platform. This reverts the
65         changes that were made in r92210.
66
67         Reviewed by Darin Adler.
68
69         No new tests, covered by existing media tests.
70
71         * config.h: Removed definition of WTF_USE_AVFOUNDATION on the Mac, add a comment about fixing this on Windows in the future.
72
73 2011-08-31  Sailesh Agrawal  <sail@chromium.org>
74
75         [Chromium] Switching between overlay and opaque scrollbars causes glitches
76         https://bugs.webkit.org/show_bug.cgi?id=62686
77
78         Reviewed by Beth Dakin.
79
80         When switching from opaque scrollbars to overlay scrollbars the page content size wouldn't change leaving a empty region under the overlay scrollbar.
81
82         The problem was that we were relying on ScrollView::updateScrollbars() to kick off a layout. Unfortunately this doesn't happen because updateScrollbars doesn't distinguish between overlay and opaque scrollbars.
83
84         To fix this I'm explicitly invalidating the layout when ScrollView::scrollbarStyleChanged() is called.
85
86         No tests because there are no Mac 10.7 chromium bots yet. Bug 66504 will track the work to add these tests once the bots are in place.
87
88         * platform/ScrollView.cpp:
89         (WebCore::ScrollView::scrollbarStyleChanged):
90
91 2011-08-31  Alexey Proskuryakov  <ap@apple.com>
92
93         http/tests/eventsource/workers/eventsource-simple.html is a flaky crash because of
94         eventsource-status-error-iframe-crash.html
95         https://bugs.webkit.org/show_bug.cgi?id=61523
96
97         Reviewed by Nate Chapin.
98
99         The problem here was that canceling EventSource during frame removal erroneously resulted
100         in event dispatch, and event handler re-entered frame destruction code.
101
102         * page/EventSource.h: Renamed endRequest() to networkRequestEnded(), because this method
103         doesn't end request. It implements "reestablish the connection" or "fail the connection"
104         algotithms from the spec, depending on current state.
105         Removed m_failSilently, since we can make this decision with existing data, and want to
106         fail silently by default (e.g. when detaching a frame cancels all loads).
107
108         * page/EventSource.cpp:
109         (WebCore::EventSource::EventSource): Don't initialize m_failSilently.
110         (WebCore::EventSource::~EventSource): Assert taht we are in a correct state.
111         (WebCore::EventSource::connect): Ditto.
112         (WebCore::EventSource::networkRequestEnded): Moved errorevent dispatch elsewhere.
113         (WebCore::EventSource::scheduleReconnect): Error event should always be queued when
114         reconnecting; firing it synchronously after starting m_reconnectTimer implements that.
115         (WebCore::EventSource::reconnectTimerFired): Assert that state is correct (the timer is
116         stopped if EventSource is stopped while waiting on the timer).
117         (WebCore::EventSource::close): Don't set m_state before calling cancel() - it will indirectly
118         call didFail(), which asserts that EventSource is not stopped yet.
119         (WebCore::EventSource::didReceiveResponse): Explicitly dispatch an error event, since it
120         is no longer dispatched when canceling, and canceling is the only way to stop a ThreadableLoader.
121         Removed a special case for 2xx responses, since it's no longer in the spec.
122         (WebCore::EventSource::didReceiveData): Assert that state is correct.
123         (WebCore::EventSource::didFinishLoading): Don't set state to CONNECTING after parsing remaining
124         response bytes - that may well result in dispatching an event whose handler calls close().
125         (WebCore::EventSource::didFail): It's simple now - we always reconnect unless the request
126         got canceled.
127         (WebCore::EventSource::didFailRedirectCheck): Dispatch error event explicitly, as we are
128         not going to attempt reconnecting.
129
130 2011-08-31  Sheriff Bot  <webkit.review.bot@gmail.com>
131
132         Unreviewed, rolling out r94116.
133         http://trac.webkit.org/changeset/94116
134         https://bugs.webkit.org/show_bug.cgi?id=67323
135
136         caused a lot of tests failures (Requested by thorton on
137         #webkit).
138
139         * platform/graphics/cg/PathCG.cpp:
140         (WebCore::Path::boundingRect):
141
142 2011-08-31  Alexei Svitkine  <asvitkine@chromium.org>
143
144         Chromium Mac: Tweak rubber banding overhang shadows. Add a drop shadow from the browser's toolbar.
145         https://bugs.webkit.org/show_bug.cgi?id=67289
146
147         Chromium bug: http://crbug.com/93228
148
149         Reviewed by Dimitri Glazkov.
150
151         No new tests, since this merely tweaks Chromium overhang area appearance.
152
153         * platform/chromium/ScrollbarThemeChromiumMac.mm:
154         (WebCore::ScrollbarThemeChromiumMac::paintGivenTickmarks):
155         (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas):
156
157 2011-08-31  Tony Chang  <tony@chromium.org>
158
159         Remove webcore_bindings (including DerivedSources##.cpp) from the critical path
160         https://bugs.webkit.org/show_bug.cgi?id=67168
161
162         Reviewed by Adam Barth.
163
164         webcore_bindings_sources, debugger_script_source, injected_script_source, and
165         inspector_protocol_sources generates various files (e.g., CSSPropertyNames,
166         DerivedSources, HTMLNames, etc).  webcore_bindings depends on *_sources and compiles
167         these files.  Previously, the other webcore libs (webcore_svg, webcore_html,
168         webcore_remaining, etc) depended on webcore_bindings.  This moves the *_sources
169         dependencies from webcore_bindings to the other webcore libs so the build can
170         parallelize the compile of webcore_bindings and the other webcore_* libs.
171
172         Also copy over the include dirs that we used to get from webcore_bindings'
173         direct_dependent_settings.
174
175         No new tests, just changing the build dependencies.
176
177         * WebCore.gyp/WebCore.gyp:
178
179 2011-08-31  Tony Gentilcore  <tonyg@chromium.org>
180
181         Minor cleanup: remove inScriptExecution()
182         https://bugs.webkit.org/show_bug.cgi?id=67276
183
184         Reviewed by Adam Barth.
185
186         At one point inScriptExecution() existed as a non-virtual duplicate of isExecutingScript()
187         to avoid virtual method calls from a tight loop. Now we aren't calling it anywhere perf
188         sensitive, so remove the duplication.
189
190         No new tests because no change in functionality.
191
192         * html/parser/HTMLDocumentParser.cpp:
193         (WebCore::HTMLDocumentParser::isExecutingScript):
194         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
195         (WebCore::HTMLDocumentParser::notifyFinished):
196         * html/parser/HTMLDocumentParser.h:
197         (WebCore::HTMLDocumentParser::shouldDelayEnd):
198
199 2011-08-31  Tom Sepez  <tsepez@chromium.org>
200
201         Fix XSS filter bypass by multiply decoding both the URL and the body
202         snippet until they are in the most minimal form before comparison.
203         https://bugs.webkit.org/show_bug.cgi?id=66585
204
205         Reviewed by Adam Barth.
206
207         * html/parser/XSSAuditor.cpp:
208         (WebCore::fullyDecodeString):
209         (WebCore::XSSAuditor::init):
210         (WebCore::XSSAuditor::filterToken):
211         (WebCore::XSSAuditor::isContainedInRequest):
212
213 2011-08-31  Simon Fraser  <simon.fraser@apple.com>
214
215         Crash with -webkit-radial-gradient(top) gradient
216         https://bugs.webkit.org/show_bug.cgi?id=66686
217
218         Reviewed by Darin Adler.
219         
220         Null-check the current value after calling parseFillPosition(),
221         since it may be null for gradients with degenerate arguments.
222
223         Test: fast/gradients/css3-radial-gradient-crash.html
224
225         * css/CSSParser.cpp:
226         (WebCore::CSSParser::parseRadialGradient):
227
228 2011-08-31  Nico Weber  <thakis@chromium.org>
229
230         Make ScrollAnimator(Chromium)?Mac check scrollAnimatorEnabled()
231         https://bugs.webkit.org/show_bug.cgi?id=67297
232
233         Reviewed by Tony Chang.
234
235         I need this to disable smooth scrolling in chromium tests. I'm making
236         the change to ScrollAnimatorMac to make unforking the file easier. I
237         changed scrollAnimatorEnabled() to default to true so that this change
238         is a no-op for Safari; in chromium the flag is set explicitly to true
239         or false anyway.
240
241         * page/Settings.cpp:
242         (WebCore::Settings::Settings):
243         * platform/chromium/ScrollAnimatorChromiumMac.mm:
244         (WebCore::ScrollAnimatorChromiumMac::scroll):
245         * platform/mac/ScrollAnimatorMac.mm:
246         (WebCore::ScrollAnimatorMac::scroll):
247
248 2011-08-31  Nate Chapin  <japhet@chromium.org>
249
250         Don't load resources with empty urls, since this
251         will resolve to the current document.
252         https://bugs.webkit.org/show_bug.cgi?id=30303
253
254         Reviewed by Darin Adler.
255
256         Test: http/tests/loading/empty-urls.html
257
258         * dom/ScriptElement.cpp:
259         (WebCore::ScriptElement::requestScript): If src="", fail through
260             to the error event case.
261         * html/HTMLLinkElement.cpp:
262         (WebCore::HTMLLinkElement::parseMappedAttribute): Ensure the url
263             stays empty if we try to resolve an empty href.
264         * loader/ImageLoader.cpp:
265         (WebCore::ImageLoader::updateFromElement): Throw an error instead of
266             loading if the src is empty in all cases, not just local files.
267
268 2011-08-28  Robert Hogan  <robert@webkit.org>
269
270         CSS 2.1 failure: margin-applies-to-015 fails, WebKit does not respect top margin for table captions
271         https://bugs.webkit.org/show_bug.cgi?id=34763
272
273         Reviewed by Simon Fraser.
274
275         * rendering/RenderTable.cpp:
276         (WebCore::RenderTable::adjustLogicalHeightForCaption): Added the caption's margin to the position calculation.
277
278 2011-08-30  Oliver Hunt  <oliver@apple.com>
279
280         Add support for checked arithmetic
281         https://bugs.webkit.org/show_bug.cgi?id=67095
282
283         Reviewed by Sam Weinig.
284
285         Add a forwarding header for CheckedArithmetic.h
286
287         * ForwardingHeaders/wtf/CheckedArithmetic.h: Added.
288
289 2011-08-31  David Hyatt  <hyatt@apple.com>
290
291         https://bugs.webkit.org/show_bug.cgi?id=67300
292         
293         Add the new border-image-source property (and its corresponding analogue for masks, mask-box-image-source).
294         Change the border-image parsing code to no longer consider "none" to represent the entire border-image
295         expression, but instead to just mean "none" for the image component of the expression.
296         
297         Change the pending image code for border-image and mask-box-image to use the new *-source properties when
298         loading the image so that they're considered the same.
299         
300         This is the first step towards eliminating the border-image parsing code in favor of just parsing it as
301         a shorthand instead, but for now I'm implementing each property one by one, and once they're all there,
302         we can cut over to border-image as a true shorthand.
303
304         Reviewed by Beth Dakin.
305
306         Added fast/borders/border-image-source.html.
307
308         * css/CSSComputedStyleDeclaration.cpp:
309         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
310         * css/CSSParser.cpp:
311         (WebCore::CSSParser::parseValue):
312         (WebCore::CSSParser::parseBorderImage):
313         * css/CSSPropertyNames.in:
314         * css/CSSStyleSelector.cpp:
315         (WebCore::CSSStyleSelector::applyProperty):
316         (WebCore::CSSStyleSelector::mapNinePieceImage):
317         (WebCore::CSSStyleSelector::loadPendingImages):
318         * rendering/style/NinePieceImage.h:
319         (WebCore::NinePieceImage::setImage):
320         * rendering/style/RenderStyle.h:
321         (WebCore::InheritedFlags::borderImageSource):
322         (WebCore::InheritedFlags::maskBoxImageSource):
323         (WebCore::InheritedFlags::setBorderImageSource):
324         (WebCore::InheritedFlags::setMaskBoxImageSource):
325         (WebCore::InheritedFlags::initialBorderImageSource):
326         (WebCore::InheritedFlags::initialMaskBoxImageSource):
327
328 2011-08-31  Stephen White  <senorblanco@chromium.org>
329
330         [chromium] Set the GrContext before SkGpuDevice is destroyed.
331         https://bugs.webkit.org/show_bug.cgi?id=67296
332
333         When SkGpuDevice is destroyed, it frees the FBO used for accelerated
334         rendering.  If the wrong context is set (e.g., compositor context),
335         a crash may result.
336
337         Reviewed by Kenneth Russell.
338
339         No new tests.  (Unfortunately, wrong-context bugs are difficult to
340         express in a layout test).
341
342         * platform/graphics/skia/ImageBufferSkia.cpp:
343         (WebCore::ImageBuffer::~ImageBuffer):
344
345 2011-08-31  Eric Carlson  <eric.carlson@apple.com>
346
347         Clean up HTMLMediaElement behavior restrictions
348         https://bugs.webkit.org/show_bug.cgi?id=67231
349
350         Reviewed by Darin Adler.
351
352         No new tests, cleanup only.
353
354         * html/HTMLMediaElement.cpp:
355         (WebCore::HTMLMediaElement::HTMLMediaElement): Deal with enum and function renaming.
356         (WebCore::HTMLMediaElement::load): Call userGestureRequiredForLoad() instead of testing bits
357             directly.
358         (WebCore::HTMLMediaElement::loadInternal): Deal with enum and function renaming.
359         (WebCore::HTMLMediaElement::play): Call userGestureRequiredForRateChange() instead of testing bits
360             directly.
361         (WebCore::HTMLMediaElement::pause): Ditto.
362         * html/HTMLMediaElement.h:
363         (WebCore::HTMLMediaElement::userGestureRequiredForLoad): Renamed.
364         (WebCore::HTMLMediaElement::userGestureRequiredForRateChange):
365         (WebCore::HTMLMediaElement::userGestureRequiredForFullscreen):
366         (WebCore::HTMLMediaElement::pageConsentRequiredForLoad):
367         (WebCore::HTMLMediaElement::addBehaviorRestriction):
368         (WebCore::HTMLMediaElement::removeBehaviorRestriction):
369
370         * html/HTMLVideoElement.cpp:
371         (WebCore::HTMLVideoElement::webkitEnterFullscreen): requireUserGestureForFullScreen renamed to
372             userGestureRequiredForFullscreen.
373
374 2011-08-31  Andrei Popescu  <andreip@google.com>
375
376         Investigate current uses of OS(ANDROID)
377         https://bugs.webkit.org/show_bug.cgi?id=66761
378
379         Reviewed by Darin Adler.
380
381         Remove the last legacy Android code.
382
383         No new tests needed as the code wasn't tested in the first place.
384
385         * bridge/jni/JNIUtility.cpp:
386         (JSC::Bindings::getJNIEnv):
387
388 2011-08-31  Sheriff Bot  <webkit.review.bot@gmail.com>
389
390         Unreviewed, rolling out r94082.
391         http://trac.webkit.org/changeset/94082
392         https://bugs.webkit.org/show_bug.cgi?id=67291
393
394         Breaks trunk (not canary) Chromium Mac builders upon WebKit
395         roll (Requested by apavlov on #webkit).
396
397         * WebCore.gyp/WebCore.gyp:
398
399 2011-08-31  No'am Rosenthal  <noam.rosenthal@nokia.com>
400
401         [Qt] Add a convenience function to cast a QTransform to TransformationMatrix
402         https://bugs.webkit.org/show_bug.cgi?id=67246
403
404         Reviewed by Andreas Kling.
405
406         No new functionality so no new tests.
407
408         * platform/graphics/qt/TransformationMatrixQt.cpp:
409         (WebCore::TransformationMatrix::TransformationMatrix):
410         * platform/graphics/transforms/TransformationMatrix.h:
411
412 2011-08-31  Sheriff Bot  <webkit.review.bot@gmail.com>
413
414         Unreviewed, rolling out r94176.
415         http://trac.webkit.org/changeset/94176
416         https://bugs.webkit.org/show_bug.cgi?id=67290
417
418         This does not fix the build failure on Macs (Requested by
419         apavlov on #webkit).
420
421         * WebCore.gyp/WebCore.gyp:
422
423 2011-08-31  Mike Reed  <reed@google.com>
424
425         [skia] antialias images if we're rotated
426         https://bugs.webkit.org/show_bug.cgi?id=67207
427
428         Reviewed by Stephen White.
429
430         * platform/graphics/skia/ImageSkia.cpp:
431         (WebCore::hasNon90rotation):
432         (WebCore::paintSkBitmap):
433
434 2011-08-31  Alexander Pavlov  <apavlov@chromium.org>
435
436         Web Inspector: Having the "Metrics" pane open affects the node highlight display
437         https://bugs.webkit.org/show_bug.cgi?id=67278
438
439         Reviewed by Yury Semikhatsky.
440
441         * inspector/front-end/MetricsSidebarPane.js:
442         (WebInspector.MetricsSidebarPane.prototype._updateMetrics):
443
444 2011-08-31  Ilya Tikhonovsky  <loislo@chromium.org>
445
446         Web Inspector: console view does a style recalculation per each addMessage call.
447         https://bugs.webkit.org/show_bug.cgi?id=67198
448
449         It is bad from the performance point of view.
450
451         Reviewed by Yury Semikhatsky.
452
453         * inspector/front-end/ConsoleView.js:
454         (WebInspector.ConsoleView.prototype._isScrollIntoViewScheduled):
455         (WebInspector.ConsoleView.prototype._appendConsoleMessage):
456
457 2011-08-31  Alexander Pavlov  <apavlov@chromium.org>
458
459         [Chromium] Unreviewed build fix. Restore debugger_script_source target dependency
460         broken in http://trac.webkit.org/changeset/94082.
461
462         * WebCore.gyp/WebCore.gyp:
463
464 2011-08-30  Alexander Pavlov  <apavlov@chromium.org>
465
466         Early return in CSSPrimitiveValue::getDoubleValueInternal() omits additional invalid enums
467         https://bugs.webkit.org/show_bug.cgi?id=67139
468
469         Reviewed by Darin Adler.
470
471         * css/CSSPrimitiveValue.cpp:
472         (WebCore::isValidCSSUnitTypeForDoubleConversion): Check if a given unit type can be converted to a double.
473         (WebCore::CSSPrimitiveValue::getDoubleValueInternal): Make use of the new method that explicitly lists all unit types.
474
475 2011-08-30  Pavel Podivilov  <podivilov@chromium.org>
476
477         Web Inspector: rename sourceFile to uiSourceCode and get rid of sourceFileId where possible.
478         https://bugs.webkit.org/show_bug.cgi?id=67136
479
480         Reviewed by Yury Semikhatsky.
481
482         * inspector/front-end/BreakpointManager.js:
483         (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded):
484         (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
485         (WebInspector.BreakpointManager.prototype.setBreakpoint):
486         (WebInspector.BreakpointManager.prototype._materializeBreakpoint):
487         (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged):
488         (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
489         (WebInspector.BreakpointManager.prototype._deleteBreakpointFromUI):
490         (WebInspector.BreakpointManager.prototype.set reset):
491         (WebInspector.BreakpointManager.prototype.debuggerReset):
492         * inspector/front-end/BreakpointsSidebarPane.js:
493         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint):
494         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.removeBreakpoint):
495         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.highlightBreakpoint):
496         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._createBreakpointItemId):
497         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointClicked):
498         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked):
499         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenu):
500         * inspector/front-end/CallStackSidebarPane.js:
501         (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLine):
502         (WebInspector.CallStackSidebarPane.prototype.update):
503         * inspector/front-end/DebuggerPresentationModel.js:
504         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor.didGetLocation):
505         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor):
506         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
507         (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping):
508         (WebInspector.DebuggerPresentationModel.prototype._addScript):
509         (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced):
510         (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
511         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
512         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
513         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation):
514         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage):
515         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
516         (WebInspector.DebuggerPresentationModel.prototype.breakpointsForUISourceCode):
517         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
518         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
519         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
520         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
521         (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint):
522         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
523         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
524         (WebInspector.PresentationBreakpoint):
525         (WebInspector.PresentationBreakpoint.prototype.get url):
526         (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
527         (WebInspector.PresenationCallFrame):
528         (WebInspector.PresenationCallFrame.prototype.get url):
529         (WebInspector.PresenationCallFrame.prototype.select):
530         (WebInspector.PresenationCallFrame.prototype.sourceLine):
531         * inspector/front-end/ScriptsPanel.js:
532         (WebInspector.ScriptsPanel.prototype.get statusBarItems):
533         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if):
534         (WebInspector.ScriptsPanel.prototype._showScriptFoldersSettingChanged):
535         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
536         (WebInspector.ScriptsPanel.prototype.setScriptSourceIsBeingEdited):
537         (WebInspector.ScriptsPanel.prototype._consoleMessagesCleared):
538         (WebInspector.ScriptsPanel.prototype._consoleMessageAdded):
539         (WebInspector.ScriptsPanel.prototype._breakpointAdded):
540         (WebInspector.ScriptsPanel.prototype._breakpointRemoved):
541         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
542         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
543         (WebInspector.ScriptsPanel.prototype.reset):
544         (WebInspector.ScriptsPanel.prototype._resetFilesSelect):
545         (WebInspector.ScriptsPanel.prototype.showAnchorLocation):
546         (WebInspector.ScriptsPanel.prototype._showSourceLine):
547         (WebInspector.ScriptsPanel.prototype._showSourceFrameAndAddToHistory):
548         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
549         (WebInspector.ScriptsPanel.prototype._removeSourceFrame):
550         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
551         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
552         (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
553         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
554         (WebInspector.ScriptsPanel.prototype._filesSelectChanged):
555         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
556         (WebInspector.SourceFrameDelegateForScriptsPanel):
557         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent):
558         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint):
559         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint):
560         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint):
561         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint):
562         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine):
563         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource):
564         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource):
565         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSourceIsBeingEdited):
566         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName):
567
568 2011-08-31  Yuta Kitamura  <yutak@chromium.org>
569
570         WebSocket: Load Blob in WebSocketChannel
571         https://bugs.webkit.org/show_bug.cgi?id=67013
572
573         Reviewed by Kent Tamura.
574
575         Add WebSocketChannel::enqueueBlobFrame(). It makes WebSocketChannel start loading a Blob
576         and send a WebSocket frame after the Blob is loaded.
577
578         While a Blob is being loaded, subsequent send() requests cannot be processed and are blocked.
579         Pending requests are stored in m_outgoingFrameQueue. When we have finished loading a Blob,
580         requests in the queue are allowed to get processed.
581
582         No new tests are added, because nobody uses enqueueBlobFrame() yet. New tests will be added
583         when WebSocket.send(Blob) is implemented, and they will cover this code change.
584
585         * websockets/WebSocketChannel.cpp:
586         ref() is called when m_blobLoader is allocated, and deref() is called in didFinishLoading()
587         or didFail(). This is necessary because WebSocketChannel must be able to receive callbacks
588         from FileReaderLoader even if the channel is referred from no other objects.
589         (WebCore::WebSocketChannel::WebSocketChannel):
590         (WebCore::WebSocketChannel::didStartLoading):
591         (WebCore::WebSocketChannel::didReceiveData):
592         (WebCore::WebSocketChannel::didFinishLoading):
593         (WebCore::WebSocketChannel::didFail):
594         When we have failed to load a Blob, fail() is called, and eventually didCloseSocketStream()
595         will be called. It will clean up the pending requests in the queue.
596         (WebCore::WebSocketChannel::enqueueBlobFrame):
597         (WebCore::WebSocketChannel::processOutgoingFrameQueue):
598         (WebCore::WebSocketChannel::abortOutgoingFrameQueue):
599         Cancel the Blob loader when the outgoing request queue is about to be aborted. The loader
600         will not invoke didFail() callback once it is canceled, thus we need to call didFail()
601         manually so that we can free up the loader and decrement the reference count.
602
603 2011-08-31  Yuta Kitamura  <yutak@chromium.org>
604
605         WebSocket: Receive binary message as ArrayBuffer
606         https://bugs.webkit.org/show_bug.cgi?id=67180
607
608         Reviewed by Kent Tamura.
609
610         Tests: http/tests/websocket/tests/hybi/receive-arraybuffer.html
611                http/tests/websocket/tests/hybi/workers/receive-arraybuffer.html
612
613         * bindings/js/JSMessageEventCustom.cpp:
614         (WebCore::JSMessageEvent::data): Convert ArrayBuffer to JSValue.
615         * bindings/v8/custom/V8MessageEventCustom.cpp:
616         (WebCore::V8MessageEvent::dataAccessorGetter): Convert ArrayBuffer to v8::Value.
617         * dom/MessageEvent.cpp:
618         (WebCore::MessageEvent::MessageEvent):
619         * dom/MessageEvent.h:
620         Added DataTypeArrayBuffer and ArrayBuffer-related functions.
621         (WebCore::MessageEvent::create):
622         (WebCore::MessageEvent::dataAsArrayBuffer):
623         * websockets/WebSocket.cpp:
624         (WebCore::WebSocket::didReceiveBinaryData):
625         Construct an ArrayBuffer from binaryData and raise MessageEvent.
626
627 2011-08-31  Keishi Hattori  <keishi@webkit.org>
628
629         input color: onchange event is not fired when changing color from color chooser
630         https://bugs.webkit.org/show_bug.cgi?id=66848
631
632         Reviewed by Kent Tamura.
633
634         Test: fast/forms/color/input-color-onchange-event.html
635
636         * WebCore.exp.in: Added calls used in Internals.cpp.
637         * html/ColorInputType.cpp:
638         (WebCore::ColorInputType::colorSelected): Dispatch change event.
639         * html/HTMLInputElement.cpp:
640         (WebCore::HTMLInputElement::connectToColorChooser): Added. Called from Internals::connectColorChooserClient.
641         * html/HTMLInputElement.h:
642         * testing/Internals.cpp:
643         (WebCore::Internals::connectColorChooserClient): Added. Connects element as client to color chooser.
644         (WebCore::Internals::selectColorInColorChooser): Added. Simulate color selection in color chooser.
645         * testing/Internals.h:
646         * testing/Internals.idl:
647
648 2011-08-31  Kentaro Hara  <haraken@google.com>
649
650         Implement Web IDL Constructor extended attribute in IDLParser.pm and CodeGeneratorV8.pm.
651         https://bugs.webkit.org/show_bug.cgi?id=66536
652
653         Reviewed by Adam Barth.
654
655         The spec is here: http://www.w3.org/TR/WebIDL/#Constructor
656
657         [1] Introduced Web IDL 'Constructor' extended attribute.
658
659         [2] Added 'ConstructorWith=ScriptExecutionContext' extended attribute.
660         - The constructor passes ScriptExecutionContext to a XXX::create() method,
661         like XXX::create(..., context, ...).
662
663         [3] Added 'V8ConstructorSetsActiveDOMWrapper' extended attribute.
664         - The constructor calls V8DOMWrapper::setJSWrapperForActiveDOMObject()
665         instead of V8DOMWrapper::setJSWrapperForDOMObject().
666
667         [4] Added 'ConstructorRaisesException' extended attribute.
668         - A placeholder for ExceptionCode is passed to a XXX::create() method,
669         like XXX::create(..., ec).
670         - We can use 'ConstructorRaisesException' and 'ConstructorWith=ScriptExecutionContext' together.
671
672         Note:
673         - Constructor overloading is not yet implemented.
674         - We cannot yet specify [Optional] without CallWithDefaultValue.
675
676         Test: Source/WebCore/bindings/scripts/test/TestInterface.idl
677               Source/WebCore/bindings/scripts/test/TestObj.idl
678
679         * bindings/scripts/CodeGeneratorV8.pm:
680         (GenerateHeader): Generates constructorCallback() header, if 'Constructor' is specified.
681         (GenerateFunctionCallback): Uses GenerateArgumentsCountCheck() and GenerateParametersCheck().
682         (GenerateArgumentsCountCheck): Splits out of GenerateFunctionCallback() for reuse.
683         (GenerateParametersCheck): Ditto.
684         (GenerateConstructorCallback): Generates constructorCallback() definition.
685         (GenerateImplementation):
686         * bindings/scripts/IDLParser.pm:
687         (parseExtendedAttributes): Previously, only a string in the "A=B, C, D, E=F" format can be parsed. This patch enables to parse a string in the "A=B, C, D, E=F, G(in DOMString s, in [H, I, J] DOMString t)" format.
688         (parseParameters): Splits out of ParseInterface() for reuse.
689         (ParseInterface): Uses parseParameters().
690         * bindings/scripts/IDLStructure.pm: Added domClass{constructor}. Changed the regular expression to extract the list of extended attributes.
691         * bindings/scripts/test/TestInterface.idl: Added all the extended attributes that this patch is going to introduce.
692         * bindings/scripts/test/TestObj.idl: Added 'Constructor'.
693         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated the test result.
694         (WebCore::V8TestInterface::constructorCallback):
695         (WebCore::ConfigureV8TestInterfaceTemplate):
696         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto.
697         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
698         (WebCore::V8TestObj::constructorCallback):
699         * bindings/scripts/test/V8/V8TestObj.h: Ditto.
700
701 2011-08-30  Philippe Normand  <pnormand@igalia.com>
702
703         [GTK] gstreamer/ files directly related to the MediaPlayer need VIDEO guards
704         https://bugs.webkit.org/show_bug.cgi?id=67196
705
706         Reviewed by Martin Robinson.
707
708         Guard those files with ENABLE(VIDEO) so other features using
709         GStreamer can be built even with VIDEO disabled.
710
711         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
712         * platform/graphics/gstreamer/GStreamerGWorld.h:
713         * platform/graphics/gstreamer/ImageGStreamer.h:
714         * platform/graphics/gstreamer/ImageGStreamerCG.mm:
715         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
716         * platform/graphics/gstreamer/ImageGStreamerQt.cpp:
717         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
718         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
719         * platform/graphics/gstreamer/PlatformVideoWindow.h:
720         * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp:
721         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
722         * platform/graphics/gstreamer/VideoSinkGStreamer.h:
723         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
724         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:
725
726 2011-08-30  Sheriff Bot  <webkit.review.bot@gmail.com>
727
728         Unreviewed, rolling out r94142, r94144, r94145, and r94148.
729         http://trac.webkit.org/changeset/94142
730         http://trac.webkit.org/changeset/94144
731         http://trac.webkit.org/changeset/94145
732         http://trac.webkit.org/changeset/94148
733         https://bugs.webkit.org/show_bug.cgi?id=67262
734
735         Broke isindex element (Requested by rniwa on #webkit).
736
737         * WebCore.order:
738         * accessibility/AXObjectCache.cpp:
739         (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
740         * accessibility/AccessibilityRenderObject.cpp:
741         (WebCore::AccessibilityRenderObject::isPasswordField):
742         (WebCore::AccessibilityRenderObject::isIndeterminate):
743         (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio):
744         (WebCore::AccessibilityRenderObject::isChecked):
745         * css/CSSStyleSelector.cpp:
746         (WebCore::CSSStyleSelector::canShareStyleWithControl):
747         (WebCore::CSSStyleSelector::adjustRenderStyle):
748         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
749         (WebCore::CSSStyleSelector::applyProperty):
750         * dom/CheckedRadioButtons.cpp:
751         (WebCore::CheckedRadioButtons::addButton):
752         (WebCore::CheckedRadioButtons::removeButton):
753         * dom/Node.cpp:
754         (WebCore::Node::toInputElement):
755         * dom/Node.h:
756         * editing/FrameSelection.cpp:
757         (WebCore::FrameSelection::isInPasswordField):
758         * html/HTMLInputElement.h:
759         (WebCore::HTMLInputElement::toInputElement):
760         * html/shadow/SliderThumbElement.cpp:
761         (WebCore::sliderThumbElementOf):
762         (WebCore::RenderSliderThumb::layout):
763         (WebCore::RenderSliderContainer::layout):
764         (WebCore::SliderThumbElement::hostInput):
765         (WebCore::trackLimiterElementOf):
766         * html/shadow/TextControlInnerElements.cpp:
767         (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
768         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
769         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
770         (WebCore::SpinButtonElement::defaultEventHandler):
771         (WebCore::SpinButtonElement::repeatingTimerFired):
772         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
773         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
774         * page/DragController.cpp:
775         (WebCore::asFileInput):
776         * platform/efl/RenderThemeEfl.cpp:
777         (WebCore::RenderThemeEfl::paintThemePart):
778         * rendering/RenderTextControlSingleLine.cpp:
779         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
780         (WebCore::RenderTextControlSingleLine::inputElement):
781         * rendering/RenderTheme.cpp:
782         (WebCore::RenderTheme::isChecked):
783         (WebCore::RenderTheme::isIndeterminate):
784
785 2011-08-30  David Levin  <levin@chromium.org>
786
787         Quick fix for crashing tests caused by r94142.
788
789         Tests:
790           editing/execCommand/remove-format-elements.html
791           fast/block/child-not-removed-from-parent-lineboxes-crash.html
792           fast/forms/implicit-submission.html
793
794         * rendering/RenderTextControlSingleLine.cpp:
795         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): Allow
796         for isIndex element which is derived from HTMLInputElement.
797
798 2011-08-30  Sam Weinig  <sam@webkit.org>
799
800         Add constructor for CustomEvent
801         https://bugs.webkit.org/show_bug.cgi?id=67248
802
803         Reviewed by Dan Bernstein.
804
805         Test: fast/events/constructors/custom-event-constructor.html
806
807         * bindings/generic/EventConstructors.h:
808         Add definition for CustomEvent constructor.
809
810         * bindings/js/JSEventConstructors.cpp:
811         Add CustomEvent #includes.
812
813         * dom/CustomEvent.cpp:
814         (WebCore::CustomEventInit::CustomEventInit):
815         (WebCore::CustomEvent::CustomEvent):
816         * dom/CustomEvent.h:
817         (WebCore::CustomEvent::create):
818         Add Initializer./
819
820         * dom/CustomEvent.idl:
821         Make constructible.
822
823         * page/DOMWindow.idl:
824         Add CustomEvent attribute.
825
826 2011-08-30  Ryosuke Niwa  <rniwa@webkit.org>
827
828         Get rid of toInputElement()
829         https://bugs.webkit.org/show_bug.cgi?id=67175
830
831         Reviewed by Darin Adler.
832
833         Got rid of Node::toInputElement and HTMLInputElement::toInputElement and replaced them by
834         a global toHTMLInputElement.
835
836         * WebCore.order:
837         * accessibility/AXObjectCache.cpp:
838         (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
839         * accessibility/AccessibilityRenderObject.cpp:
840         (WebCore::AccessibilityRenderObject::isPasswordField):
841         (WebCore::AccessibilityRenderObject::isIndeterminate):
842         (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio):
843         (WebCore::AccessibilityRenderObject::isChecked):
844         * css/CSSStyleSelector.cpp:
845         (WebCore::CSSStyleSelector::canShareStyleWithControl):
846         (WebCore::CSSStyleSelector::adjustRenderStyle):
847         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
848         (WebCore::CSSStyleSelector::applyProperty):
849         * dom/CheckedRadioButtons.cpp:
850         (WebCore::CheckedRadioButtons::addButton):
851         (WebCore::CheckedRadioButtons::removeButton):
852         * dom/Node.cpp:
853         * dom/Node.h:
854         * editing/FrameSelection.cpp:
855         (WebCore::FrameSelection::isInPasswordField):
856         * html/HTMLInputElement.h:
857         (WebCore::toHTMLInputElement):
858         * html/shadow/SliderThumbElement.cpp:
859         (WebCore::sliderThumbElementOf):
860         (WebCore::RenderSliderThumb::layout):
861         (WebCore::RenderSliderContainer::layout):
862         (WebCore::SliderThumbElement::hostInput):
863         (WebCore::trackLimiterElementOf):
864         * html/shadow/TextControlInnerElements.cpp:
865         (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
866         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
867         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
868         (WebCore::SpinButtonElement::defaultEventHandler):
869         (WebCore::SpinButtonElement::repeatingTimerFired):
870         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
871         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
872         * page/DragController.cpp:
873         (WebCore::asFileInput):
874         * platform/efl/RenderThemeEfl.cpp:
875         (WebCore::RenderThemeEfl::paintThemePart):
876         * rendering/RenderTextControlSingleLine.cpp:
877         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
878         (WebCore::RenderTextControlSingleLine::inputElement):
879         * rendering/RenderTheme.cpp:
880         (WebCore::RenderTheme::isChecked):
881         (WebCore::RenderTheme::isIndeterminate):
882
883 2011-08-30  Ryosuke Niwa  <rniwa@webkit.org>
884
885         Speculative WinCairo build fix after r94093.
886
887         * platform/network/ResourceHandle.h:
888
889 2011-08-30  Ryosuke Niwa  <rniwa@webkit.org>
890
891         Mac build fix after r94128.
892
893         * WebCore.xcodeproj/project.pbxproj:
894
895 2011-08-30  Alice Boxhall  <aboxhall@chromium.org>
896
897         Correctly report selected text range for accessibility APIs for role=textbox
898         https://bugs.webkit.org/show_bug.cgi?id=65900
899
900         Reviewed by Chris Fleizach.
901
902         Test: accessibility/textbox-role-reports-selection.html
903
904         * accessibility/AccessibilityRenderObject.cpp:
905         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
906         (WebCore::AccessibilityRenderObject::rootEditableElementForPosition):
907         (WebCore::AccessibilityRenderObject::nodeIsTextControl):
908         (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
909         * accessibility/AccessibilityRenderObject.h:
910
911 2011-08-30  Rachel Blum  <groby@chromium.org>
912
913         The "port" property of an <a> whose href does not specify a port returns the wrong value
914         https://bugs.webkit.org/show_bug.cgi?id=66081
915
916         HTMLAnchorElement now returns "" instead of "0" for unset port
917         Fixed KURLGoogle.cpp to have same behavior as KURL.cpp when setting port 0
918         Fixed Location.cpp to have same behavior as KURL.cpp when setting port 0
919         
920         Reviewed by Adam Barth.
921
922         Tests: fast/dom/HTMLAnchorElement/get-href-attribute-port.html
923                fast/dom/HTMLAnchorElement/set-href-attribute-port.html
924                fast/loader/location-port.html
925                fast/url/segments-from-data-url.html
926                fast/url/segments.html
927                fast/url/trivial-segments.html
928                platform/chromium/fast/dom/HTMLAnchorElement/set-href-attribute-port.html
929                
930         * html/HTMLAnchorElement.cpp:
931         (WebCore::HTMLAnchorElement::port):
932         * page/Location.cpp:
933         (WebCore::Location::host):
934         (WebCore::Location::port):
935         (WebCore::Location::setPort):
936         * platform/KURLGoogle.cpp:
937         (WebCore::KURL::setPort):
938
939 2011-08-30  Scott Byer  <scottbyer@chromium.org>
940
941         Fix pan scrolling on Windows to be clamped
942         https://bugs.webkit.org/show_bug.cgi?id=66910
943
944         With the recent change to support rubberband scrolling on the Mac, pan
945         scrolling of overflow divs became unclamped and would scroll infinitely
946         and along an axis without a scrollbar.
947
948         Reviewed by Simon Fraser
949
950         Test: platform/win/fast/events/panScroll-correct-direction.html
951
952         * rendering/RenderLayer.cpp:
953         (WebCore::RenderLayer::panScrollFromPoint):
954         (WebCore::RenderLayer::scrollByRecursively):
955         * rendering/RenderLayer.h:
956
957 2011-08-30  Bill Budge  <bbudge@chromium.org>
958
959         This patch makes the XMLHttpRequest method/header validation logic available as
960         static methods so URL loaders can perform the same checks for untrusted HTTP requests
961         coming from plugins. 
962         https://bugs.webkit.org/show_bug.cgi?id=66909
963
964         Reviewed by David Levin.
965
966         No new tests. Exposes no new functionality.
967
968         * CMakeLists.txt:
969         * GNUmakefile.list.am:
970         * WebCore.gypi:
971         * WebCore.pro:
972         * WebCore.vcproj/WebCore.vcproj:
973         * platform/network/HTTPValidation.cpp: Added.
974         (WebCore::isValidHTTPToken):
975         (WebCore::isValidHTTPHeaderValue):
976         * platform/network/HTTPValidation.h: Added.
977         * xml/XMLHttpRequest.cpp:
978         (WebCore::XMLHttpRequest::isAllowedHTTPMethod):
979         (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):
980         (WebCore::XMLHttpRequest::isAllowedHTTPHeader):
981         (WebCore::XMLHttpRequest::open):
982         (WebCore::XMLHttpRequest::setRequestHeader):
983         * xml/XMLHttpRequest.h:
984
985 2011-08-30  Chris Rogers  <crogers@google.com>
986
987         Don't allow nodes of one context to be connected to nodes of another context
988         https://bugs.webkit.org/show_bug.cgi?id=67245
989
990         Reviewed by Dimitri Glazkov.
991         
992         Tests: updated webaudio/audionode.html
993
994         * webaudio/AudioNode.cpp:
995         (WebCore::AudioNode::connect):
996         
997 2011-08-30  Dan Bernstein  <mitz@apple.com>
998
999         WebCore part of <rdar://problem/9281695> Add text search API for getting the DOM range of a text match
1000         https://bugs.webkit.org/show_bug.cgi?id=67230
1001
1002         Reviewed by Darin Adler.
1003
1004         Test: TestWebKitAPI/Tests/mac/DOMRangeOfString.
1005
1006         * WebCore.exp.in: Export Page::rangeOfString().
1007         * dom/Range.h: Added a default ASSERT_NO_EXCEPTION to a few more member functions.
1008         * editing/Editor.cpp:
1009         (WebCore::Editor::findString): Moved most of the logic into rangeOfString(), which this function
1010         now calls, passing in the current selection as the reference range and setting the selection to
1011         the returned range.
1012         (WebCore::Editor::rangeOfString): Added. Contains the find logic from findString().
1013         * editing/Editor.h:
1014         * page/Page.cpp:
1015         (WebCore::Page::rangeOfString): Added. This function is similar to findString(), but it takes an optional
1016         reference range and returns a Range, rather than using the current selection as the reference range and setting the
1017         selection to the next match.
1018         * page/Page.h:
1019
1020 2011-08-30  Sam Weinig  <sam@webkit.org>
1021
1022         Add additional convertValue overloads to JSDictionary
1023         https://bugs.webkit.org/show_bug.cgi?id=67244
1024
1025         Reviewed by Darin Adler.
1026
1027         Add overloads for convertValue that will be needed for Event
1028         constructors.
1029
1030         * bindings/js/JSDictionary.cpp:
1031         (WebCore::JSDictionary::convertValue):
1032         * bindings/js/JSDictionary.h:
1033         Add overloads.  Remove #include of <runtime/Error.h> and just include
1034         <interpreter/CallFrame.h>
1035
1036         * bindings/js/JSEventConstructors.cpp:
1037         Add now necessary #include of <runtime/Error.h>.
1038
1039 2011-08-30  Aaron Colwell  <acolwell@chromium.org>
1040
1041         Add MediaSource API to HTMLMediaElement
1042         https://bugs.webkit.org/show_bug.cgi?id=64731
1043
1044         Reviewed by Eric Carlson.
1045
1046         Tests: http/tests/media/media-source/webm/video-media-source-errors.html
1047                http/tests/media/media-source/webm/video-media-source-play.html
1048                http/tests/media/media-source/webm/video-media-source-seek.html
1049                http/tests/media/media-source/webm/video-media-source-state-changes.html
1050
1051         * Configurations/FeatureDefines.xcconfig:
1052         * GNUmakefile.am:
1053         * dom/EventNames.h:
1054         * features.pri:
1055         * html/HTMLMediaElement.cpp:
1056         (WebCore::HTMLMediaElement::HTMLMediaElement): Added initializers for new member variables.
1057         (WebCore::HTMLMediaElement::prepareForLoad): Close the media source before starting a new load.
1058         (WebCore::HTMLMediaElement::loadResource):
1059             Fail loading if the media source url from another media element is used.
1060         (WebCore::HTMLMediaElement::mediaEngineError):
1061             Make sure the source is in the closed state before firing an emptied event.
1062         (WebCore::HTMLMediaElement::mediaPlayerSourceOpened):
1063             New method called by WebCore::MediaPlayer to signal when the source is open.
1064         (WebCore::HTMLMediaElement::mediaPlayerSourceURL):
1065             New method called by the WebCore::MediaPlayer to determine what the media source URL is for this
1066             HTMLMediaElement instance.
1067         (WebCore::HTMLMediaElement::seek):
1068             Disabled noSeekRequired optimization if a media source is open and resets the source state to SOURCE_OPEN if
1069             it was in the SOURCE_ENDED state when seek() was called.
1070         (WebCore::HTMLMediaElement::webkitSourceAppend):
1071             New method for passing media data from JavaScript to the WebCore::MediaPlayer.
1072         (WebCore::HTMLMediaElement::webkitSourceEndOfStream):
1073             New method that allows JavaScript to signal the end of the stream.
1074         (WebCore::HTMLMediaElement::webkitSourceState): New method allowing JavaScript to read the current source state.
1075         (WebCore::HTMLMediaElement::setSourceState): New method for updating the current source state.
1076         (WebCore::HTMLMediaElement::userCancelledLoad):
1077             Transitions an open source to the closed state before firing an emptied event.
1078         * html/HTMLMediaElement.h:
1079         (WebCore::HTMLMediaElement::webkitMediaSourceURL):
1080             New method providing the media source URL to JavaScript for this HTMLMediaElement instance.
1081         * html/HTMLMediaElement.idl: Added new methods, attributes, and constants for the media source api.
1082         * platform/graphics/MediaPlayer.cpp:
1083         (WebCore::NullMediaPlayerPrivate::sourceAppend):
1084             Stub implementation of new WebCore::MediaPlayerPrivateInterface::sourceAppend.
1085         (WebCore::NullMediaPlayerPrivate::sourceEndOfStream):
1086             Stub implementation of new WebCore::MediaPlayerPrivateInterface::sourceEndOfStream.
1087         (WebCore::MediaPlayer::sourceAppend): New method for receiving media data from WebCore::HTMLMediaElement.
1088         (WebCore::MediaPlayer::sourceEndOfStream): New method for receiving end of stream from WebCore::HTMLMediaElement.
1089         (WebCore::MediaPlayer::sourceOpened):
1090             New method called by the MediaPlayerPrivate object to notify the MediaPlayer when the source has opened.
1091         (WebCore::MediaPlayer::sourceURL):
1092             New method called by the MediaPlayerPrivate implementation to get the media source URL from the MediaPlayer.
1093         * platform/graphics/MediaPlayer.h:
1094         (WebCore::MediaPlayerClient::mediaPlayerSourceOpened):
1095             Interface method used by the MediaPlayer to tell the HTMLMediaElement when the media source has been opened.
1096         (WebCore::MediaPlayerClient::mediaPlayerSourceURL):
1097             Interface method used by the MediaPlayer to get the media source URL from the HTMLMediaElement.
1098         * platform/graphics/MediaPlayerPrivate.h:
1099         (WebCore::MediaPlayerPrivateInterface::sourceAppend):
1100             Interface method used by the MediaPlayer to pass media data to the MediaPlayerPrivate object.
1101         (WebCore::MediaPlayerPrivateInterface::sourceEndOfStream):
1102             Interface method used by the MediaPlayer to pass end of stream information to the MediaPlayerPrivate object.
1103
1104 2011-08-30  Sam Weinig  <sam@webkit.org>
1105
1106         Refactor JS dictionary code into helper class and covert geolocation code to use it
1107         https://bugs.webkit.org/show_bug.cgi?id=67213
1108
1109         Reviewed by Darin Adler.
1110
1111         * GNUmakefile.list.am:
1112         * UseJSC.cmake:
1113         * WebCore.gypi:
1114         * WebCore.pro:
1115         * WebCore.vcproj/WebCore.vcproj:
1116         * WebCore.xcodeproj/project.pbxproj:
1117         * bindings/js/JSBindingsAllInOne.cpp:
1118         Add new files.
1119
1120         * bindings/js/JSDictionary.cpp: Added.
1121         (WebCore::JSDictionary::convertValue):
1122         * bindings/js/JSDictionary.h: Added.
1123         (WebCore::JSDictionary::JSDictionary):
1124         (WebCore::JSDictionary::tryGetProperty):
1125         Encapsulate dictionary initialization code into JSDictionary class.
1126
1127         * bindings/js/JSEventConstructors.cpp:
1128         (WebCore::constructJSEventWithInitializer):
1129         Use JSDictionary.
1130
1131         * bindings/js/JSGeolocationCustom.cpp:
1132         (WebCore::setEnableHighAccuracy):
1133         (WebCore::setTimeout):
1134         (WebCore::setMaximumAge):
1135         (WebCore::createPositionOptions):
1136         Use JSDictionary.
1137
1138 2011-08-30  Scott Byer  <scottbyer@chromium.org>
1139
1140         Switch chromium to use ScrollAnimatorNone on Windows.
1141         https://bugs.webkit.org/show_bug.cgi?id=67000
1142
1143         Reviewed by Adam Barth.
1144
1145         Testing covered by Chromium webkit_unit_tests ScrollAnimatorNoneTest.*
1146
1147         * WebCore.gyp/WebCore.gyp:
1148         * WebCore.gypi:
1149
1150 2011-08-30  Tony Chang  <tony@chromium.org>
1151
1152         refactor and cleanup RenderFlexibleBox
1153         https://bugs.webkit.org/show_bug.cgi?id=67165
1154
1155         Reviewed by Ojan Vafai.
1156
1157         No new tests, just refactoring code.
1158
1159         * rendering/RenderFlexibleBox.cpp:
1160         (WebCore::RenderFlexibleBox::layoutHorizontalBlock):
1161         (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmHorizontal): Make childSizes a param so we can pass the results to layoutAndPlaceChildrenHorizontal.
1162         (WebCore::hasPackingSpace): Move closer to where it's used.
1163         (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenHorizontal):
1164             Pull this code out into its own function because it's not part of running the free space allocation algorithm.
1165         * rendering/RenderFlexibleBox.h:
1166
1167 2011-08-30  Tim Horton  <timothy_horton@apple.com>
1168
1169         getBBox() on a SVGPathElement with curves incorrectly includes control points
1170         https://bugs.webkit.org/show_bug.cgi?id=53512
1171         <rdar://problem/9861154>
1172
1173         Reviewed by Dirk Schulze.
1174
1175         The CoreGraphics implementation of Path::boundingRect() called
1176         CGPathGetBoundingBox, which includes the path's control points in its
1177         calculations. Snow Leopard added CGPathGetPathBoundingBox, which
1178         finds the bounding box of only points within the path, and does not
1179         include control points. On Snow Leopard and above, we now use the latter.
1180
1181         Test: svg/custom/getBBox-path.svg
1182
1183         * platform/graphics/cg/PathCG.cpp:
1184         (WebCore::Path::boundingRect):
1185
1186 2011-08-30  Tim Horton  <timothy_horton@apple.com>
1187
1188         SVG panning y-axis is flipped in WebKit2
1189         https://bugs.webkit.org/show_bug.cgi?id=65800
1190         <rdar://problem/9908012>
1191
1192         Reviewed by Darin Adler.
1193
1194         We previously were not transforming the pointer coordinates passed
1195         to SVGDocument's panning implementation into the coordinate space of
1196         the contents, so on different platforms, the drag direction was different.
1197
1198         Test: svg/custom/pan-direction.svg
1199
1200         * page/EventHandler.cpp:
1201         (WebCore::EventHandler::handleMousePressEvent):
1202         (WebCore::EventHandler::handleMouseMoveEvent):
1203         (WebCore::EventHandler::handleMouseReleaseEvent):
1204         * svg/SVGDocument.cpp:
1205         (WebCore::SVGDocument::startPan):
1206         (WebCore::SVGDocument::updatePan):
1207
1208 2011-08-30  Adam Barth  <abarth@webkit.org>
1209
1210         Flaky crash with JavaScript URLs
1211         https://bugs.webkit.org/show_bug.cgi?id=66360
1212
1213         Reviewed by Nate Chapin.
1214
1215         This patch teaches DocumentWriter::begin to make a copy of the URL
1216         before beginning a new document to avoid a crash.
1217
1218         Test: fast/loader/javascript-url-iframe-crash.html
1219
1220         * loader/DocumentWriter.cpp:
1221         (WebCore::DocumentWriter::begin):
1222
1223 2011-08-30  Tony Gentilcore  <tonyg@chromium.org>
1224
1225         PreloadScanner shouldn't load images inside noscript via doc.write
1226         https://bugs.webkit.org/show_bug.cgi?id=67214
1227
1228         Reviewed by Adam Barth.
1229
1230         The problem was that the tokenizer state was lost between each call to document.write.
1231         This works around that bug by making all document.write()s in the same script block share
1232         the same tokenizer state.
1233
1234         Test: fast/preloader/document-write-noscript.html
1235
1236         * html/parser/HTMLDocumentParser.cpp:
1237         (WebCore::HTMLDocumentParser::~HTMLDocumentParser):
1238         (WebCore::HTMLDocumentParser::detach):
1239         (WebCore::HTMLDocumentParser::insert):
1240         * html/parser/HTMLDocumentParser.h:
1241
1242 2011-08-30  Dmitry Titov  <dimich@chromium.org>
1243
1244         https://bugs.webkit.org/show_bug.cgi?id=67210
1245         [Chromium] Use after free in ScheduledAction::execute(WebCore::V8Proxy*)
1246
1247         Reviewed by David Levin.
1248
1249         * bindings/v8/ScheduledAction.cpp:
1250         (WebCore::ScheduledAction::execute):
1251         Removed usage of V8Proxy instance after it could have been deleted.
1252
1253         * bindings/v8/V8Proxy.cpp:
1254         (WebCore::V8Proxy::V8Proxy):
1255         * bindings/v8/V8Proxy.h:
1256         Removed unused timerCallback() and setTimerCallback().
1257
1258 2011-08-30  Abhishek Arya  <inferno@chromium.org>
1259
1260         Style not updated for table parts in :before, :after content.
1261         https://bugs.webkit.org/show_bug.cgi?id=66141        
1262
1263         Reviewed by Dave Hyatt.
1264
1265         Tests: fast/table/table-before-child-style-update.html
1266                fast/table/table-row-before-child-style-update.html
1267
1268         * rendering/RenderObjectChildList.cpp:
1269         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
1270
1271 2011-08-30  Tony Chang  <tony@chromium.org>
1272
1273         refactor box-ordinal-group handling so we don't timeout on large values
1274         https://bugs.webkit.org/show_bug.cgi?id=65783
1275
1276         Reviewed by David Hyatt.
1277
1278         The old code walked from 1 to the last box-ordinal-group while
1279         iterating over each flex item.  The new code collects ordinals as
1280         we do the first walk and sorts them.  Each additional iteration
1281         through the flex items gets the next oridnal from the sorted list.
1282
1283         This maintains the single pass for the common case of no
1284         box-ordinal-groups specified.  If there are ordinal groups,
1285         the runtime is O(n*m + m lg m) where n is the # of flex items and
1286         m is the number of unique box-ordinal-group values.  The memory
1287         usage is O(2m).
1288
1289         Test: fast/flexbox/box-ordinal-group.html
1290
1291         * rendering/RenderDeprecatedFlexibleBox.cpp:
1292         (WebCore::FlexBoxIterator::FlexBoxIterator):
1293         (WebCore::FlexBoxIterator::reset):
1294         (WebCore::FlexBoxIterator::next):
1295         (WebCore::FlexBoxIterator::compareFlexOrder):
1296
1297 2011-08-30  Abhishek Arya  <inferno@chromium.org>
1298
1299         Removed m_owner accessed in custom scrollbars.
1300         https://bugs.webkit.org/show_bug.cgi?id=64737
1301
1302         Reviewed by David Hyatt.
1303
1304         Problem does not reproduce in DRT, even with Eventhandler tricks
1305         and gc(). So, adding a manual test.
1306
1307         * manual-tests/custom-scrollbar-renderer-removed-crash.html: Added.
1308         * page/FrameView.cpp:
1309         (WebCore::FrameView::clearOwningRendererForCustomScrollbars):
1310         * page/FrameView.h:
1311         * rendering/RenderBox.cpp:
1312         (WebCore::RenderBox::willBeDestroyed): when this renderbox is getting
1313         destroyed, clear the custom scrollbar in this frameview having this renderbox
1314         as its owning renderer.
1315         * rendering/RenderScrollbar.cpp:
1316         (WebCore::RenderScrollbar::getScrollbarPseudoStyle): fix the null check.
1317
1318 2011-08-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1319
1320         Emit last progress notification before calling dispatchDidFinishLoad
1321         https://bugs.webkit.org/show_bug.cgi?id=28851
1322
1323         Reviewed by Adam Barth.
1324
1325         Original patch by Xan Lopez. Change FrameLoader to dispatch the notifications in
1326         a more natural sequence.
1327
1328         Test: http/tests/loading/progress-finished-callback.html
1329
1330         * loader/FrameLoader.cpp:
1331         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1332
1333 2011-08-30  Ojan Vafai  <ojan@chromium.org>
1334
1335         CSS parsing for -webkit-flex-flow
1336         https://bugs.webkit.org/show_bug.cgi?id=67224
1337
1338         Reviewed by Tony Chang.
1339         
1340         Adds support for the first value of -webkit-flex-flow.
1341         Later we'll need to add support for the second "wrap" value,
1342         but that can wait until we are ready to implement multiline
1343         flex and the spec has stabilized a bit.
1344
1345         * css/CSSComputedStyleDeclaration.cpp:
1346         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1347         * css/CSSParser.cpp:
1348         (WebCore::CSSParser::parseValue):
1349         * css/CSSPrimitiveValueMappings.h:
1350         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1351         (WebCore::CSSPrimitiveValue::operator EFlexFlow):
1352         * css/CSSPropertyNames.in:
1353         * css/CSSStyleApplyProperty.cpp:
1354         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
1355         * css/CSSStyleSelector.cpp:
1356         (WebCore::CSSStyleSelector::applyProperty):
1357         * css/CSSValueKeywords.in:
1358         * rendering/style/RenderStyle.h:
1359         (WebCore::InheritedFlags::flexFlow):
1360         (WebCore::InheritedFlags::setFlexFlow):
1361         (WebCore::InheritedFlags::initialFlexFlow):
1362         * rendering/style/RenderStyleConstants.h:
1363         * rendering/style/StyleFlexibleBoxData.cpp:
1364         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
1365         (WebCore::StyleFlexibleBoxData::operator==):
1366         * rendering/style/StyleFlexibleBoxData.h:
1367
1368 2011-08-30  Dawit Alemayehu  <adawit@kde.org>
1369
1370         [Qt] Replace QLibrary("libgtk-x11-2.0.so.0") with QLibrary("libgtk-x11-2.0", 0)
1371         https://bugs.webkit.org/show_bug.cgi?id=66627
1372
1373         Reviewed by Simon Hausmann.
1374
1375         * plugins/qt/PluginPackageQt.cpp:
1376         (WebCore::initializeGtk):
1377
1378 2011-08-29  Oliver Hunt  <oliver@apple.com>
1379
1380         TypedArrays don't ensure that denormalised values are normalised
1381         https://bugs.webkit.org/show_bug.cgi?id=67178
1382
1383         Reviewed by Gavin Barraclough.
1384
1385         Ensure that we convert singaling nans to silent nans when loading
1386         from a typed array. 
1387
1388         * bindings/scripts/CodeGeneratorJS.pm:
1389         (GenerateImplementation):
1390
1391 2011-08-29  Alexey Proskuryakov  <ap@apple.com>
1392
1393         DumpRenderTree should begin each test with an empty cookie store
1394         https://bugs.webkit.org/show_bug.cgi?id=63545
1395         <rdar://problem/5666907>
1396
1397         Reviewed by Darin Adler.
1398
1399         Use a clean CFURLStorageSession when this functionality is available.
1400
1401         * WebCore.exp.in: Added exports.
1402
1403         * WebCore.xcodeproj/project.pbxproj: Made CookieStorageCFNet.h private, as currentCFHTTPCookieStorage
1404         is used in WebKit.
1405
1406         * platform/mac/CookieJar.mm:
1407         (WebCore::cookies):
1408         (WebCore::cookieRequestHeaderFieldValue):
1409         (WebCore::setCookies):
1410         (WebCore::cookiesEnabled):
1411         (WebCore::getRawCookies):
1412         (WebCore::deleteCookie):
1413         Updated to use currentCFHTTPCookieStorage().
1414
1415         * platform/network/CookieStorage.h: Moved CFNetwork specific declarations to CookieStorageCFNet.h.
1416
1417         * platform/network/ResourceHandle.cpp: Moved CFNetwork specific code to ResourceHandleCFNet.cpp.
1418
1419         * platform/network/ResourceHandle.h: Exposed default session support on Mac, too. Made
1420         privateBrowsingStorageSession() private, as callers shouldn't be concerned about where the
1421         current sssion came from.
1422
1423         * platform/network/cf/CookieJarCFNet.cpp:
1424         (WebCore::setCookies):
1425         (WebCore::cookies):
1426         (WebCore::cookieRequestHeaderFieldValue):
1427         (WebCore::cookiesEnabled):
1428         (WebCore::getRawCookies):
1429         (WebCore::deleteCookie):
1430         (WebCore::getHostnamesWithCookies):
1431         (WebCore::deleteCookiesForHostname):
1432         (WebCore::deleteAllCookies):
1433         Updated to use currentCFHTTPCookieStorage().
1434
1435         * platform/network/cf/CookieStorageCFNet.cpp:
1436         (WebCore::cookieStorageOverride): Make it clear that this override is only for a Windows API.
1437         (WebCore::overrideCookieStorage): Ditto.
1438         (WebCore::currentCFHTTPCookieStorage): We no longer store a cookie storage in a static variable,
1439         unless it has been overridden on Windows. We can always get it from a session.
1440         (WebCore::setCookieStoragePrivateBrowsingEnabled): There is nothing to do here - we'll just
1441         use private session's storage. Note that Mac has a separate code path for OS versions that
1442         don't support sessions.
1443         (WebCore::startObservingCookieChanges): Updated to use currentCFHTTPCookieStorage().
1444         (WebCore::stopObservingCookieChanges): Ditto.
1445
1446         * platform/network/cf/CookieStorageCFNet.h: Changed exposed methods for more clarity.
1447
1448         * platform/network/cf/ResourceHandleCFNet.cpp:
1449         (WebCore::makeFinalRequest): Updated for currentCookieStorage->currentCFHTTPCookieStorage change.
1450         (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): Moved out of USE(CFNETWORK),
1451         as this function is also used with NSURLConnection when sessions are enabled.
1452         (WebCore::ResourceHandle::currentStorageSession): Ditto. Removed an #if since default session
1453         is now supported on Mac, too.
1454         (WebCore::defaultCFURLStorageSession): Moved out of USE(CFNETWORK).
1455         (WebCore::ResourceHandle::setDefaultStorageSession): Moved out of USE(CFNETWORK). No longer
1456         adopt the session, because nothing in method name says that it will steal a reference from
1457         the caller.
1458         (WebCore::ResourceHandle::defaultStorageSession): Moved out of USE(CFNETWORK).
1459         (WebCore::privateStorageSession): Moved from ResourceHandle.cpp.
1460         (WebCore::privateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp.
1461         (WebCore::ResourceHandle::setPrivateBrowsingEnabled): Moved from ResourceHandle.cpp.
1462         (WebCore::ResourceHandle::privateBrowsingStorageSession): Moved from ResourceHandle.cpp.
1463         (WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp.
1464         (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase): Moved from ResourceHandle.cpp.
1465
1466         * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled):
1467         We no longer store a reference to cookie storage in a static variable, so nothing to do here.
1468         On older OS versiosn, we still need to enable legacy private browsing mode.
1469
1470         * platform/network/mac/ResourceHandleMac.mm:
1471         (WebCore::shouldRelaxThirdPartyCookiePolicy): Updated to use the new currentCFHTTPCookieStorage function.
1472         (WebCore::ResourceHandle::createNSURLConnection): Updated to use currentStorageSession()
1473         instead of privateBrowsingStorageSession().
1474         (WebCore::ResourceHandle::willSendRequest): Ditto.
1475
1476 2011-08-30  David Hyatt  <hyatt@apple.com>
1477
1478         <rdar://problem/10002140> 9A309: Text gets clipped in book because of overflow:auto
1479         
1480         https://bugs.webkit.org/show_bug.cgi?id=67212 - Text gets clipped in multi-column layouts when overflow:auto
1481         is used.
1482         
1483         Revise our overflow:auto pagination behavior. If the overflow block doesn't specify any logical height
1484         information, then we'll just assume the plan is for it to enclose its contents, and we will be willing
1485         to paginate in those circumstances.
1486
1487         Reviewed by Dan Bernstein.
1488
1489         Added overflow-across-columns.html and overflow-unsplittable.html
1490
1491         * rendering/LayoutState.cpp:
1492         (WebCore::LayoutState::LayoutState):
1493         * rendering/RenderBlock.cpp:
1494         (WebCore::RenderBlock::adjustForUnsplittableChild):
1495         * rendering/RenderBox.cpp:
1496         (WebCore::RenderBox::hasUnsplittableScrollingOverflow):
1497         * rendering/RenderBox.h:
1498
1499 2011-08-30  Antti Koivisto  <antti@apple.com>
1500
1501         querySelector/querySelectorAll should use selector checker fast path 
1502         https://bugs.webkit.org/show_bug.cgi?id=67161
1503
1504         Reviewed by Sam Weinig.
1505
1506         Descendant and child selectors can be matches substantially faster using
1507         SelectorChecker::fastCheckSelector() path. Currently it is used for style matching only.  
1508         
1509         Add SelectorQuery class that can do both querySelector and querySelectorAll efficiently using
1510         fast path. Use inlined loop for DOM traversal.
1511         
1512         The patch is ~25% speedup in the overall native score of http://www.webkit.org/perf/slickspeed/.
1513         Some individual subtests (using child or descendant selectors) execute twice as fast.
1514
1515         * CMakeLists.txt:
1516         * GNUmakefile.list.am:
1517         * WebCore.gypi:
1518         * WebCore.pro:
1519         * WebCore.vcproj/WebCore.vcproj:
1520         * WebCore.xcodeproj/project.pbxproj:
1521         * css/CSSStyleSelector.cpp:
1522         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
1523         (WebCore::CSSStyleSelector::SelectorChecker::isFastCheckableSelector):
1524         (WebCore::RuleData::RuleData):
1525         * css/CSSStyleSelector.h:
1526         
1527             Make fast path checking available outside CSSStyleSelector.
1528             
1529         * dom/DOMAllInOne.cpp:
1530         * dom/Node.cpp:
1531         (WebCore::Node::querySelector):
1532         (WebCore::Node::querySelectorAll):
1533         
1534             Switch to SelectorQuery.
1535         
1536         * dom/SelectorNodeList.cpp: Removed.
1537         * dom/SelectorNodeList.h: Removed.
1538         
1539             SelectorQuery makes these obsolete.
1540
1541         * dom/SelectorQuery.cpp: Added.
1542         (WebCore::SelectorQuery::SelectorQuery):
1543         (WebCore::SelectorQuery::queryAll):
1544         (WebCore::SelectorQuery::queryFirst):
1545         (WebCore::SelectorQuery::canUseIdLookup):
1546         (WebCore::SelectorQuery::execute):
1547         * dom/SelectorQuery.h: Added.
1548         
1549             Class for selector matching in tree.
1550     
1551 2011-08-30  Dmitry Titov  <dimich@chromium.org>
1552
1553         REGRESSION (r93913): Failures in fast/replaced/frame-removed-during-resize.html and scrollbars/scrollable-iframe-remove-crash.html
1554         https://bugs.webkit.org/show_bug.cgi?id=67074
1555
1556         Reviewed by Darin Adler.
1557
1558         Added flag m_isClosed to prevent events that cause Frame to be destroyed
1559         from posting more events into EventQueue of a dying Document.
1560
1561         The tests mentioned above should now pass.
1562
1563         * dom/Document.cpp:
1564         (WebCore::Document::detach):
1565         * dom/EventQueue.cpp:
1566         (WebCore::EventQueue::EventQueue):
1567         (WebCore::EventQueue::enqueueEvent):
1568         (WebCore::EventQueue::close): Renamed method to reflect better what it does.
1569         * dom/EventQueue.h:
1570
1571 2011-08-30  Tony Chang  <tony@chromium.org>
1572
1573         Fix compile warning on clang:
1574         error: 'WebKit::ChromeClientImpl::scrollRectIntoView' hides overloaded virtual function [-Werror,-Woverloaded-virtual]
1575             virtual void scrollRectIntoView(
1576                              ^
1577         ../../WebCore/page/ChromeClient.h:171:22: note: hidden overloaded virtual function 'WebCore::ChromeClient::scrollRectIntoView' declared here
1578             virtual void scrollRectIntoView(const IntRect&) { }; // Currently only Mac has a non empty implementation.
1579
1580         * page/ChromeClient.h:
1581         (WebCore::ChromeClient::scrollRectIntoView):
1582
1583 2011-08-30  David Hyatt  <hyatt@apple.com>
1584
1585         <rdar://problem/8832814> With large line-height, column break can happen anywhere in the
1586         inter-line gap, causing staggered lines.
1587         
1588         https://bugs.webkit.org/show_bug.cgi?id=67202 Handle positive leading when paginating lines.
1589         
1590         Technically we should paginate lines based solely off their line top and line bottom with
1591         leading included. However there are two issues with always doing so. The first is that overflow
1592         can cause lines to overlap, and the second is that negative leading can cause lines to overlap.
1593
1594         Since we're incapable of dealing with overlap until we stop clipping column boxes and allow them
1595         to have a form of specialized overflow, we still have to at least factor in overflow and ignore
1596         negative leading for now. However we can at least honor positive leading when the lines don't
1597         overlap. This patch provides basic support for paginating when positive leading is involved.
1598
1599         Reviewed by Dan Bernstein.
1600
1601         Added fast/multicol/positive-leading.html.
1602
1603         * rendering/RenderBlock.cpp:
1604         (WebCore::RenderBlock::markLinesDirtyInBlockRange):
1605         Renamed blockLogicalHeight() to lineBottomWithLeading(). The value is the same.
1606
1607         (WebCore::RenderBlock::adjustLinePositionForPagination):
1608         Grow the top and extent of the line to include our leading when deciding how to paginate
1609         the line.
1610
1611         * rendering/RenderBlockLineLayout.cpp:
1612         (WebCore::RenderBlock::computeBlockDirectionPositionsForLine):
1613         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
1614         (WebCore::RenderBlock::linkToEndLineIfNeeded):
1615         (WebCore::RenderBlock::checkFloatsInCleanLine):
1616         (WebCore::RenderBlock::determineStartPosition):
1617         (WebCore::RenderBlock::determineEndPosition):
1618         (WebCore::RenderBlock::matchedEndLine):
1619         Renamed blockLogicalHeight() to lineBottomWithLeading(). The value is the same.
1620
1621         * rendering/RootInlineBox.cpp:
1622         (WebCore::RootInlineBox::RootInlineBox):
1623         (WebCore::RootInlineBox::adjustPosition):
1624         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
1625         * rendering/RootInlineBox.h:
1626         (WebCore::RootInlineBox::lineTopWithLeading):
1627         (WebCore::RootInlineBox::lineBottomWithLeading):
1628         (WebCore::RootInlineBox::setLineTopBottomPositions):
1629         Instead of one member variable, blockLogicalHeight(), RootInlineBoxes now know both their top and
1630         bottom including leading. These values are obtainable using lineTopWithLeading() and lineBottomWithLeading().
1631         Add these two values to the setLineTopBottomPositions setter and remove setBlockLogicalHeight.
1632
1633         * rendering/svg/SVGRootInlineBox.cpp:
1634         (WebCore::SVGRootInlineBox::layoutRootBox):
1635         Renamed blockLogicalHeight() to lineBottomWithLeading(). The value is the same.
1636
1637 2011-08-29  Chris Marrin  <cmarrin@apple.com>
1638
1639         Rename GraphicsContext3DInternal to GraphicsContext3DPrivate and add a dummy version of this class for Mac
1640         https://bugs.webkit.org/show_bug.cgi?id=67172
1641
1642         Reviewed by Kenneth Russell.
1643
1644         * GNUmakefile.list.am:
1645         * platform/graphics/GraphicsContext3D.h:
1646         * platform/graphics/chromium/Extensions3DChromium.h:
1647         * platform/graphics/gtk/GraphicsContext3DGtk.cpp:
1648         (WebCore::GraphicsContext3D::create):
1649         (WebCore::GraphicsContext3D::GraphicsContext3D):
1650         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1651         (WebCore::GraphicsContext3D::makeContextCurrent):
1652         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
1653         * platform/graphics/gtk/GraphicsContext3DInternal.h: Removed.
1654         * platform/graphics/gtk/GraphicsContext3DPrivate.h: Copied from Source/WebCore/platform/graphics/gtk/GraphicsContext3DInternal.h.
1655         * platform/graphics/mac/GraphicsContext3DMac.mm:
1656         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1657         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1658         (WebCore::GraphicsContext3D::GraphicsContext3D):
1659         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1660         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1661         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1662         (WebCore::GraphicsContext3DPrivate::getViewportGLWidget):
1663         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1664         (WebCore::GraphicsContext3DPrivate::boundingRect):
1665         (WebCore::GraphicsContext3DPrivate::paint):
1666         (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebuffer):
1667         (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext):
1668         (WebCore::GraphicsContext3D::create):
1669         (WebCore::GraphicsContext3D::GraphicsContext3D):
1670         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1671         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
1672         (WebCore::GraphicsContext3D::platformLayer):
1673         (WebCore::GraphicsContext3D::makeContextCurrent):
1674         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
1675         (WebCore::GraphicsContext3D::reshape):
1676         (WebCore::GraphicsContext3D::activeTexture):
1677         (WebCore::GraphicsContext3D::attachShader):
1678         (WebCore::GraphicsContext3D::getAttachedShaders):
1679         (WebCore::GraphicsContext3D::bindAttribLocation):
1680         (WebCore::GraphicsContext3D::bindBuffer):
1681         (WebCore::GraphicsContext3D::bindFramebuffer):
1682         (WebCore::GraphicsContext3D::bindRenderbuffer):
1683         (WebCore::GraphicsContext3D::bindTexture):
1684         (WebCore::GraphicsContext3D::blendColor):
1685         (WebCore::GraphicsContext3D::blendEquation):
1686         (WebCore::GraphicsContext3D::blendEquationSeparate):
1687         (WebCore::GraphicsContext3D::blendFunc):
1688         (WebCore::GraphicsContext3D::blendFuncSeparate):
1689         (WebCore::GraphicsContext3D::bufferData):
1690         (WebCore::GraphicsContext3D::bufferSubData):
1691         (WebCore::GraphicsContext3D::checkFramebufferStatus):
1692         (WebCore::GraphicsContext3D::clearColor):
1693         (WebCore::GraphicsContext3D::clear):
1694         (WebCore::GraphicsContext3D::clearDepth):
1695         (WebCore::GraphicsContext3D::clearStencil):
1696         (WebCore::GraphicsContext3D::colorMask):
1697         (WebCore::GraphicsContext3D::compileShader):
1698         (WebCore::GraphicsContext3D::copyTexImage2D):
1699         (WebCore::GraphicsContext3D::copyTexSubImage2D):
1700         (WebCore::GraphicsContext3D::cullFace):
1701         (WebCore::GraphicsContext3D::depthFunc):
1702         (WebCore::GraphicsContext3D::depthMask):
1703         (WebCore::GraphicsContext3D::depthRange):
1704         (WebCore::GraphicsContext3D::detachShader):
1705         (WebCore::GraphicsContext3D::disable):
1706         (WebCore::GraphicsContext3D::disableVertexAttribArray):
1707         (WebCore::GraphicsContext3D::drawArrays):
1708         (WebCore::GraphicsContext3D::drawElements):
1709         (WebCore::GraphicsContext3D::enable):
1710         (WebCore::GraphicsContext3D::enableVertexAttribArray):
1711         (WebCore::GraphicsContext3D::finish):
1712         (WebCore::GraphicsContext3D::flush):
1713         (WebCore::GraphicsContext3D::framebufferRenderbuffer):
1714         (WebCore::GraphicsContext3D::framebufferTexture2D):
1715         (WebCore::GraphicsContext3D::frontFace):
1716         (WebCore::GraphicsContext3D::generateMipmap):
1717         (WebCore::GraphicsContext3D::getActiveAttrib):
1718         (WebCore::GraphicsContext3D::getActiveUniform):
1719         (WebCore::GraphicsContext3D::getAttribLocation):
1720         (WebCore::GraphicsContext3D::getError):
1721         (WebCore::GraphicsContext3D::getString):
1722         (WebCore::GraphicsContext3D::hint):
1723         (WebCore::GraphicsContext3D::isBuffer):
1724         (WebCore::GraphicsContext3D::isEnabled):
1725         (WebCore::GraphicsContext3D::isFramebuffer):
1726         (WebCore::GraphicsContext3D::isProgram):
1727         (WebCore::GraphicsContext3D::isRenderbuffer):
1728         (WebCore::GraphicsContext3D::isShader):
1729         (WebCore::GraphicsContext3D::isTexture):
1730         (WebCore::GraphicsContext3D::lineWidth):
1731         (WebCore::GraphicsContext3D::linkProgram):
1732         (WebCore::GraphicsContext3D::pixelStorei):
1733         (WebCore::GraphicsContext3D::polygonOffset):
1734         (WebCore::GraphicsContext3D::readPixels):
1735         (WebCore::GraphicsContext3D::releaseShaderCompiler):
1736         (WebCore::GraphicsContext3D::renderbufferStorage):
1737         (WebCore::GraphicsContext3D::sampleCoverage):
1738         (WebCore::GraphicsContext3D::scissor):
1739         (WebCore::GraphicsContext3D::shaderSource):
1740         (WebCore::GraphicsContext3D::stencilFunc):
1741         (WebCore::GraphicsContext3D::stencilFuncSeparate):
1742         (WebCore::GraphicsContext3D::stencilMask):
1743         (WebCore::GraphicsContext3D::stencilMaskSeparate):
1744         (WebCore::GraphicsContext3D::stencilOp):
1745         (WebCore::GraphicsContext3D::stencilOpSeparate):
1746         (WebCore::GraphicsContext3D::texParameterf):
1747         (WebCore::GraphicsContext3D::texParameteri):
1748         (WebCore::GraphicsContext3D::uniform1f):
1749         (WebCore::GraphicsContext3D::uniform1fv):
1750         (WebCore::GraphicsContext3D::uniform2f):
1751         (WebCore::GraphicsContext3D::uniform2fv):
1752         (WebCore::GraphicsContext3D::uniform3f):
1753         (WebCore::GraphicsContext3D::uniform3fv):
1754         (WebCore::GraphicsContext3D::uniform4f):
1755         (WebCore::GraphicsContext3D::uniform4fv):
1756         (WebCore::GraphicsContext3D::uniform1i):
1757         (WebCore::GraphicsContext3D::uniform1iv):
1758         (WebCore::GraphicsContext3D::uniform2i):
1759         (WebCore::GraphicsContext3D::uniform2iv):
1760         (WebCore::GraphicsContext3D::uniform3i):
1761         (WebCore::GraphicsContext3D::uniform3iv):
1762         (WebCore::GraphicsContext3D::uniform4i):
1763         (WebCore::GraphicsContext3D::uniform4iv):
1764         (WebCore::GraphicsContext3D::uniformMatrix2fv):
1765         (WebCore::GraphicsContext3D::uniformMatrix3fv):
1766         (WebCore::GraphicsContext3D::uniformMatrix4fv):
1767         (WebCore::GraphicsContext3D::useProgram):
1768         (WebCore::GraphicsContext3D::validateProgram):
1769         (WebCore::GraphicsContext3D::vertexAttrib1f):
1770         (WebCore::GraphicsContext3D::vertexAttrib1fv):
1771         (WebCore::GraphicsContext3D::vertexAttrib2f):
1772         (WebCore::GraphicsContext3D::vertexAttrib2fv):
1773         (WebCore::GraphicsContext3D::vertexAttrib3f):
1774         (WebCore::GraphicsContext3D::vertexAttrib3fv):
1775         (WebCore::GraphicsContext3D::vertexAttrib4f):
1776         (WebCore::GraphicsContext3D::vertexAttrib4fv):
1777         (WebCore::GraphicsContext3D::vertexAttribPointer):
1778         (WebCore::GraphicsContext3D::viewport):
1779         (WebCore::GraphicsContext3D::getBooleanv):
1780         (WebCore::GraphicsContext3D::getBufferParameteriv):
1781         (WebCore::GraphicsContext3D::getFloatv):
1782         (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
1783         (WebCore::GraphicsContext3D::getIntegerv):
1784         (WebCore::GraphicsContext3D::getProgramiv):
1785         (WebCore::GraphicsContext3D::getProgramInfoLog):
1786         (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
1787         (WebCore::GraphicsContext3D::getShaderiv):
1788         (WebCore::GraphicsContext3D::getShaderInfoLog):
1789         (WebCore::GraphicsContext3D::getShaderSource):
1790         (WebCore::GraphicsContext3D::getTexParameterfv):
1791         (WebCore::GraphicsContext3D::getTexParameteriv):
1792         (WebCore::GraphicsContext3D::getUniformfv):
1793         (WebCore::GraphicsContext3D::getUniformiv):
1794         (WebCore::GraphicsContext3D::getUniformLocation):
1795         (WebCore::GraphicsContext3D::getVertexAttribfv):
1796         (WebCore::GraphicsContext3D::getVertexAttribiv):
1797         (WebCore::GraphicsContext3D::getVertexAttribOffset):
1798         (WebCore::GraphicsContext3D::texImage2D):
1799         (WebCore::GraphicsContext3D::texSubImage2D):
1800         (WebCore::GraphicsContext3D::createBuffer):
1801         (WebCore::GraphicsContext3D::createFramebuffer):
1802         (WebCore::GraphicsContext3D::createProgram):
1803         (WebCore::GraphicsContext3D::createRenderbuffer):
1804         (WebCore::GraphicsContext3D::createShader):
1805         (WebCore::GraphicsContext3D::createTexture):
1806         (WebCore::GraphicsContext3D::deleteBuffer):
1807         (WebCore::GraphicsContext3D::deleteFramebuffer):
1808         (WebCore::GraphicsContext3D::deleteProgram):
1809         (WebCore::GraphicsContext3D::deleteRenderbuffer):
1810         (WebCore::GraphicsContext3D::deleteShader):
1811         (WebCore::GraphicsContext3D::deleteTexture):
1812
1813 2011-08-30  Tony Chang  <tony@chromium.org>
1814
1815         Remove webcore_bindings (including DerivedSources##.cpp) from the critical path
1816         https://bugs.webkit.org/show_bug.cgi?id=67168
1817
1818         Reviewed by Adam Barth.
1819
1820         webcore_bindings_sources generates various files (e.g., CSSPropertyNames,
1821         DerivedSources, HTMLNames, etc).  webcore_bindings depends on webcore_bindings_sources
1822         and compiles these files.  Previously, the other webcore libs (webcore_svg,
1823         webcore_html, webcore_remaining, etc) depended on webcore_bindings.  This changes the
1824         dependency on webocre_bindings_sources so the build can parallelize the compile of
1825         webcore_bindings and the other webcore_* libs.
1826
1827         No new tests, just changing the build dependencies.  Manually copy over the
1828         include dirs that we used to get from webcore_bindings' direct_dependent_settings.
1829
1830         * WebCore.gyp/WebCore.gyp:
1831
1832 2011-08-30  Kaustubh Atrawalkar  <kaustubh@motorola.com>
1833
1834         The unused ScrollView* argument can and should be removed from
1835         scrollRectIntoView.
1836         https://bugs.webkit.org/show_bug.cgi?id=67117
1837
1838         Reviewed by Darin Adler.
1839
1840         * loader/EmptyClients.h:
1841         (WebCore::EmptyChromeClient::scrollRectIntoView):
1842         * page/Chrome.cpp:
1843         (WebCore::Chrome::scrollRectIntoView):
1844         * page/ChromeClient.h:
1845         (WebCore::ChromeClient::scrollRectIntoView):
1846
1847 2011-08-30  Ben Wells  <benwells@chromium.org>
1848
1849         Update registerProtocolHandler scheme whitelist to match spec
1850         https://bugs.webkit.org/show_bug.cgi?id=67104
1851
1852         Reviewed by Darin Adler.
1853
1854         * page/Navigator.cpp:
1855         (WebCore::initProtocolHandlerWhitelist):
1856
1857 2011-08-30  Vsevolod Vlasov  <vsevik@chromium.org>
1858
1859         Web Inspector: Inspected page sometimes crashes in InspectorResourceAgent::didFailLoading
1860         https://bugs.webkit.org/show_bug.cgi?id=67193
1861
1862         Reviewed by Pavel Feldman.
1863
1864         * inspector/InspectorResourceAgent.cpp:
1865         (WebCore::InspectorResourceAgent::didFailLoading):
1866
1867 2011-08-30  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>
1868
1869         [Qt] Do not unconditionally use pkg-config in .pro files
1870         https://bugs.webkit.org/show_bug.cgi?id=67055
1871
1872         Reviewed by Andreas Kling.
1873
1874         Original patch from Rohan McGovern <rohan.mcgovern@nokia.com>
1875
1876         Using the first pkg-config in PATH is prone to errors when cross
1877         compiling inside the Qt repository (using Qt's build-system).
1878
1879         This patch protect calls for pkg-config with
1880         !contains(QT_CONFIG, no-pkg-config). no-pkg-config is added to
1881         QT_CONFIG by Qt's 'configure' when cross-compiling on systems
1882         without pkg-config.
1883
1884         The respective change in Qt's configure has been submited already.
1885
1886         No new tests as this is just a build change.
1887
1888         * features.pri: protect pkg-config calls
1889
1890 2011-08-30  Andreas Kling  <kling@webkit.org>
1891
1892         HTMLImageElement: Don't cache "ismap" and "usemap" attributes.
1893         https://bugs.webkit.org/show_bug.cgi?id=66784
1894
1895         Reviewed by Darin Adler.
1896
1897         * html/HTMLImageElement.h: Remove the "ismap" and "usemap" members,
1898         shrinking HTMLImageElement by 16 bytes (on 64-bit.)
1899         * html/HTMLImageElement.cpp:
1900         (WebCore::HTMLImageElement::HTMLImageElement):
1901         (WebCore::HTMLImageElement::parseMappedAttribute): Most of the logic
1902         for "ismap" and "usemap" moved into isServerMap().
1903         (WebCore::HTMLImageElement::isServerMap): Out-of-lined and implemented
1904         using fast*Attribute().
1905
1906 2011-08-30  Ryosuke Niwa  <rniwa@webkit.org>
1907
1908         lastChangeWasUserEdit continues to return true when innerText or textContent is modified
1909         https://bugs.webkit.org/show_bug.cgi?id=67183
1910
1911         Reviewed by Kent Tamura.
1912
1913         Fixed the bug by calling setLastChangeWasNotUserEdit in HTMLTextAreaElement::childrenChanged.
1914
1915         Also got rid of HTMLTextFormControlElement::subtreeHasChanged because it was a needless indirection.
1916
1917         * html/HTMLInputElement.cpp:
1918         (WebCore::HTMLInputElement::subtreeHasChanged): No longer calls HTMLTextFormControlElement::subtreeHasChanged.
1919         * html/HTMLTextAreaElement.cpp:
1920         (WebCore::HTMLTextAreaElement::childrenChanged): Calls setLastChangeWasNotUserEdit.
1921         (WebCore::HTMLTextAreaElement::subtreeHasChanged): No longer calls HTMLTextFormControlElement::subtreeHasChanged.
1922         * html/HTMLTextFormControlElement.cpp:
1923         (WebCore::HTMLTextFormControlElement::defaultEventHandler): Merged subtreeHasChanged.
1924         (WebCore::HTMLTextFormControlElement::setInnerTextValue): No longer set m_lastChangeWasUserEdit to false
1925         since this is now done when renderers are set dirty.
1926         * html/HTMLTextFormControlElement.h: Made subtreeHasChanged a pure virtual function.
1927
1928 2011-08-29  Yury Semikhatsky  <yurys@chromium.org>
1929
1930         Web Inspector: wrong script display name when there is a slash in its URL query parameters
1931         https://bugs.webkit.org/show_bug.cgi?id=67120
1932
1933         Fixed folder name computation in ScriptsPanel. Now search query is ignored
1934         when searching for the script folder name.
1935
1936         Reviewed by Pavel Feldman.
1937
1938         * inspector/front-end/ScriptsPanel.js:
1939         (WebInspector.ScriptsPanel.prototype._folderAndDisplayNameForScriptURL):
1940
1941 2011-08-29  Yury Semikhatsky  <yurys@chromium.org>
1942
1943         Return value of window.onerror has inverted semantics
1944         https://bugs.webkit.org/show_bug.cgi?id=67119
1945
1946         Error is now treated as handled only when window.onerror function returns true.
1947
1948         Reviewed by Darin Adler.
1949
1950         Test: fast/events/window-onerror13.html
1951
1952         * bindings/js/JSErrorHandler.cpp:
1953         (WebCore::JSErrorHandler::handleEvent):
1954         * bindings/v8/V8WindowErrorHandler.cpp:
1955         (WebCore::V8WindowErrorHandler::callListenerFunction):
1956         * bindings/v8/V8WorkerContextErrorHandler.cpp:
1957         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
1958
1959 2011-08-29  Ryosuke Niwa  <rniwa@webkit.org>
1960
1961         Touch Internals.cpp in an attempt to fix GTK+ build.
1962
1963         * testing/Internals.cpp:
1964
1965 2011-08-29  Ryosuke Niwa  <rniwa@webkit.org>
1966
1967         Move setInnerTextValue from RenderTextControl to HTMLTextFormControlElement
1968         https://bugs.webkit.org/show_bug.cgi?id=67152
1969
1970         Reviewed by Darin Adler.
1971
1972         Moved setInnerTextValue from RenderTextControl to HTMLTextFormControlElement.
1973
1974         Also moved m_lastChangeWasUserEdit from RenderTextControl to HTMLTextFormControlElement
1975         and related inline functions from RenderTextControl to HTMLTextFormControlElement.
1976         Because m_lastChangeWasUserEdit is no longer reset when RenderTextControl is recreated,
1977         added explicit calls to setLastChangeWasNotUserEdit in setValue functions of HTMLInputElement
1978         and HTMLTextAreaElement.
1979
1980         This patch also fixes the bug that lastChangeWasUserEdit() incorrectly returns false
1981         when input or textarea don't have renderer (e.g. invisible).
1982
1983         Unfortunately, there is no way to test this behavioral change from layout tests.
1984
1985         * WebCore.exp.in: Exports lastChangeWasUserEdit in HTMLTextFormControlElement instead of
1986         that of HTMLInputElement and HTMLTextAreaElement.
1987         * html/HTMLInputElement.cpp:
1988         (WebCore::HTMLInputElement::setValue): Explicitly calls setLastChangeWasNotUserEdit.
1989         * html/HTMLInputElement.h:
1990         * html/HTMLTextAreaElement.cpp:
1991         (WebCore::HTMLTextAreaElement::setValueCommon): Ditto.
1992         * html/HTMLTextAreaElement.h:
1993         * html/HTMLTextFormControlElement.cpp:
1994         (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
1995         (WebCore::HTMLTextFormControlElement::subtreeHasChanged): Sets m_lastChangeWasUserEdit true
1996         as it used to do via respondToChangeByUser.
1997         (WebCore::HTMLTextFormControlElement::lastChangeWasUserEdit): Moved from HTMLInputElement
1998         and HTMLTextAreaElement.
1999         (WebCore::HTMLTextFormControlElement::setInnerTextValue): Moved from RenderTextControl.
2000         * html/HTMLTextFormControlElement.h:
2001         (WebCore::HTMLTextFormControlElement::setLastChangeWasNotUserEdit): Added.
2002         * rendering/RenderTextControl.cpp:
2003         (WebCore::RenderTextControl::RenderTextControl): No longer initializes m_lastChangeWasUserEdit.
2004         * rendering/RenderTextControl.h:
2005         * rendering/RenderTextControlSingleLine.cpp:
2006         (WebCore::RenderTextControlSingleLine::updateFromElement): Calls setInnerTextValue.
2007         * rendering/RenderTextControlMultiLine.cpp:
2008         (WebCore::RenderTextControlMultiLine::updateFromElement): Ditto.
2009
2010 2011-08-25  Kent Tamura  <tkent@chromium.org>
2011
2012         REGRESSION(r88115): Disabling a file upload control causes an endless busyloop.
2013         https://bugs.webkit.org/show_bug.cgi?id=66659
2014
2015         Reviewed by Darin Adler.
2016
2017         Test: fast/forms/file/disabling-file-busy-loop.html
2018
2019         * rendering/RenderFileUploadControl.cpp:
2020         (WebCore::RenderFileUploadControl::updateFromElement):
2021         Don't call setDisabled() if the disabled status is not changed.
2022         setDisabled() causes styleRecalc(), and
2023         HTMLFormControlElement::styleRecalc() causes
2024         updateFromElement(). updateFromElement() should not call
2025         setDisabled() again.
2026
2027 2011-08-29  Daniel Bates  <dbates@webkit.org>
2028
2029         Add HAVE(VASPRINTF) macro to test for vasprintf() support
2030         https://bugs.webkit.org/show_bug.cgi?id=67156
2031
2032         Reviewed by Darin Adler.
2033
2034         * xml/parser/XMLDocumentParserLibxml2.cpp:
2035         (WebCore::XMLDocumentParser::error): Modified to use HAVE(VASPRINTF).
2036
2037 2011-08-29  Yuta Kitamura  <yutak@chromium.org>
2038
2039         WebSocket: Receive binary message as Blob
2040         https://bugs.webkit.org/show_bug.cgi?id=67115
2041
2042         Reviewed by Kent Tamura.
2043
2044         Make WebSocketChannel be able to receive WebSocket binary messages and deliver them via
2045         didReceiveBinaryData() callback of WebSocketChannelClient.
2046
2047         Tests: http/tests/websocket/tests/hybi/fragmented-binary-frames.html
2048                http/tests/websocket/tests/hybi/receive-blob.html
2049                http/tests/websocket/tests/hybi/workers/receive-blob.html
2050
2051         * bindings/js/JSMessageEventCustom.cpp:
2052         (WebCore::JSMessageEvent::data): Convert Blob to JSValue.
2053         * bindings/v8/custom/V8MessageEventCustom.cpp:
2054         (WebCore::V8MessageEvent::dataAccessorGetter): Convert Blob to v8::Value.
2055         * dom/MessageEvent.cpp:
2056         (WebCore::MessageEvent::MessageEvent):
2057         * dom/MessageEvent.h:
2058         Added DataTypeBlob and Blob-related functions.
2059         (WebCore::MessageEvent::create):
2060         (WebCore::MessageEvent::dataAsBlob):
2061         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2062         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
2063         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback):
2064         * websockets/ThreadableWebSocketChannelClientWrapper.h:
2065         * websockets/WebSocket.cpp:
2066         (WebCore::WebSocket::didReceiveBinaryData):
2067         If binaryType attribute is "blob", construct a Blob using BlobData filled with the given
2068         binary message.
2069         * websockets/WebSocket.h:
2070         * websockets/WebSocketChannel.cpp:
2071         (WebCore::WebSocketChannel::processFrame):
2072         Create continuousFrameData as OwnPtr<> rather than stack-allocated value so we can easily
2073         pass it to didReceiveBinaryData() callback.
2074         Save the content of a fragmented message even if it is a binary opcode.
2075         * websockets/WebSocketChannelClient.h:
2076         (WebCore::WebSocketChannelClient::didReceiveBinaryData):
2077         * websockets/WorkerThreadableWebSocketChannel.cpp:
2078         (WebCore::workerContextDidReceiveBinaryData):
2079         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
2080         Pass binaryData as PassOwnPtr<Vector<char> > to deliver the value efficiently (without
2081         copying the content) across threads.
2082         * websockets/WorkerThreadableWebSocketChannel.h:
2083
2084 2011-08-29  Ryosuke Niwa  <rniwa@webkit.org>
2085
2086         Add a test for lastChangeWasUserEdit in HTMLInputElement and HTMLTextAreaElement
2087         https://bugs.webkit.org/show_bug.cgi?id=67173
2088
2089         Reviewed by Darin Adler.
2090
2091         Exposed HTMLInputElement::lastChangeWasUserEdit and HTMLTextAreaElement::lastChangeWasUserEdit
2092         via internals.wasLastChangeUserEdit(Element*, ExceptionCode&). The first argument must be
2093         an input element or a textarea element lastChangeWasUserEdit is called upon.
2094
2095         Test: fast/forms/textfield-lastchange-was-useredit.html
2096
2097         * testing/Internals.cpp:
2098         (WebCore::Internals::wasLastChangeUserEdit):
2099         * testing/Internals.h:
2100         * testing/Internals.idl:
2101
2102 2011-08-29  Luke Macpherson   <macpherson@chromium.org>
2103
2104         Implement CSSPropertyWebkitColumns in CSSStyleApplyProperty.
2105         https://bugs.webkit.org/show_bug.cgi?id=67106
2106
2107         Reviewed by Darin Adler.
2108
2109         Tests:
2110         LayoutTests/fast/multicol/inherit-column-values.html
2111         LayoutTests/fast/multicol/initial-column-values.html
2112
2113         * css/CSSStyleApplyProperty.cpp:
2114         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2115         Initialize handler for CSSPropertyWebkitColumns.
2116         * css/CSSStyleSelector.cpp:
2117         (WebCore::CSSStyleSelector::applyProperty):
2118         Remove existing implementation for CSSPropertyWebkitColumns.
2119
2120 2011-08-29  Mark Hahnenberg  <mhahnenberg@apple.com>
2121
2122         Unzip initialization lists and constructors in JSCell hierarchy (3/7)
2123         https://bugs.webkit.org/show_bug.cgi?id=67064
2124
2125         Reviewed by Darin Adler.
2126
2127         No new tests.
2128
2129         Completed the third level of the refactoring to add finishCreation() 
2130         methods to all classes within the JSCell hierarchy with non-trivial 
2131         constructor bodies.
2132
2133         This primarily consists of pushing the calls to finishCreation() down 
2134         into the constructors of the subclasses of the second level of the hierarchy 
2135         as well as pulling the finishCreation() calls out into the class's corresponding
2136         create() method if it has one.  Doing both simultaneously allows us to 
2137         maintain the invariant that the finishCreation() method chain is called exactly 
2138         once during the creation of an object, since calling it any other number of 
2139         times (0, 2, or more) will cause an assertion failure.
2140
2141         * bindings/js/JSDOMWindowShell.cpp:
2142         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
2143         (WebCore::JSDOMWindowShell::finishCreation):
2144         * bindings/js/JSDOMWindowShell.h:
2145
2146 2011-08-29  John Bauman  <jbauman@chromium.org>
2147
2148         Speed up texImage from BGRA
2149         https://bugs.webkit.org/show_bug.cgi?id=66884
2150
2151         Reviewed by Kenneth Russell.
2152
2153         BGRA input is common coming from skia, so optimize BGRA->RGBA
2154         conversion and also avoid the pointless RGBA to RGBA conversion.
2155
2156         * platform/graphics/GraphicsContext3D.cpp:
2157         (WebCore::doUnpackingAndPacking):
2158
2159 2011-08-29  Matthew Delaney  <mdelaney@apple.com>
2160
2161         [CG] ImageBufferCG should handle IOSurface allocation failure gracefully
2162         https://bugs.webkit.org/show_bug.cgi?id=67099
2163
2164         Reviewed by Simon Fraser.
2165
2166         No new tests. Testing the "fallback to old path" behavior is not easily testable.
2167
2168         * platform/graphics/cg/ImageBufferCG.cpp: Rearranged backing store creation to fall back to
2169           old path if IOSurface creation path fails.
2170         (WebCore::ImageBuffer::ImageBuffer):
2171
2172 2011-08-29  Cary Clark  <caryclark@google.com>
2173
2174         Only enable font smoothing as requested (Skia on Mac)
2175         https://bugs.webkit.org/show_bug.cgi?id=67143
2176
2177         This adjusts LayoutTest pixel output to more closely
2178         match other platforms.
2179
2180         Reviewed by Kenneth Russell.
2181
2182         No new tests. This platform is not yet enabled.
2183
2184         * platform/graphics/skia/FontSkia.cpp:
2185         (WebCore::setupPaint):
2186         LCD text was always enabled to test the code path. With this change,
2187         it is only enabled when instructed by the font state.
2188
2189 2011-08-29  Julien Chaffraix  <jchaffraix@webkit.org>
2190
2191         Assertion failure in RenderLayer::computeRepaintRects when scrolling
2192         https://bugs.webkit.org/show_bug.cgi?id=67140
2193
2194         Reviewed by David Hyatt.
2195
2196         Test: fast/repaint/scroll-fixed-layer-with-no-visible-content.html
2197
2198         * rendering/RenderLayer.cpp:
2199         (WebCore::RenderLayer::computeRepaintRects): Fixed style after r93837.
2200
2201         (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Tweaked the code
2202         to bail early if our layer has no visible content. This avoids the ASSERT
2203         and also makes sense as we shouldn't repaint / update empty layers.
2204
2205 2011-08-29  Anna Cavender  <annacc@chromium.org>
2206
2207         Implement WebVTT Cue Text Parsing rules and DOM construction
2208         https://bugs.webkit.org/show_bug.cgi?id=64132
2209
2210         Reviewed by Adam Barth.
2211
2212         Tests in media/track, particularly track-webvtt-tc[022 - 028]*.
2213
2214         * CMakeLists.txt:
2215         * GNUmakefile.list.am:
2216         * WebCore.gypi:
2217         * WebCore.pro:
2218         * WebCore.xcodeproj/project.pbxproj:
2219         * html/TextTrackCue.cpp:
2220         * html/TextTrackCue.h:
2221         * platform/track/CueParser.cpp:
2222         * platform/track/CueParser.h:
2223         * platform/track/WebVTTParser.cpp:
2224         * platform/track/WebVTTParser.h:
2225         * platform/track/WebVTTToken.h: Added.
2226         * platform/track/WebVTTTokenizer.cpp: Added.
2227         * platform/track/WebVTTTokenizer.h: Added.
2228
2229 2011-08-29  Patrick Gansterer  <paroga@webkit.org>
2230
2231         Add parsing support for extended attributes on IDL constants
2232         https://bugs.webkit.org/show_bug.cgi?id=65046
2233
2234         Reviewed by Brent Fulgham.
2235
2236         With support for extended attributes on constants we can
2237         replace some preprocessor lines from the IDL files with
2238         the corresponding [Conditional=XXX] later.
2239         Using the preprocessor causes much pain on native windows.
2240
2241         CodeGenerator support will be added in separate patches.
2242
2243         * bindings/scripts/IDLParser.pm:
2244         * bindings/scripts/IDLStructure.pm:
2245
2246 2011-08-29  Ryosuke Niwa  <rniwa@webkit.org>
2247
2248         Cleanup: notifyFormStateChanged, formControlValueMatchesRenderer, and setFormControlValueMatchesRenderer
2249         https://bugs.webkit.org/show_bug.cgi?id=67141
2250
2251         Reviewed by Eric Seidel.
2252
2253         No new tests since this is a refactoring.
2254
2255         * dom/Element.h: Removed formControlValueMatchesRenderer and setFormControlValueMatchesRenderer.
2256         * html/HTMLInputElement.cpp: Removed notifyFormStateChanged.
2257         * html/HTMLInputElement.h:
2258         * html/HTMLTextAreaElement.cpp:
2259         (WebCore::HTMLTextAreaElement::updateValue): Calls notifyFormStateChanged; modifies m_wasModifiedByUser.
2260         (WebCore::HTMLTextAreaElement::setValueCommon): Calls notifyFormStateChanged; also renamed value to newValue
2261         to avoid the conflict with value().
2262         * html/HTMLTextAreaElement.h: Made m_wasModifiedByUser mutable.
2263         * html/HTMLTextFormControlElement.cpp:
2264         (WebCore::HTMLTextFormControlElement::notifyFormStateChanged): Extracted from notifyFormStateChanged in
2265         HTMLInputElement.cpp and HTMLTextAreaElement.cpp.
2266         * html/HTMLTextFormControlElement.h:
2267         * rendering/RenderTextControl.cpp:
2268         (WebCore::RenderTextControl::setInnerTextValue): Calls setFormControlValueMatchesRenderer.
2269
2270 2011-08-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2271
2272         Unreviewed, rolling out r93987, r93992, r93995, r93998, and
2273         r93999.
2274         http://trac.webkit.org/changeset/93987
2275         http://trac.webkit.org/changeset/93992
2276         http://trac.webkit.org/changeset/93995
2277         http://trac.webkit.org/changeset/93998
2278         http://trac.webkit.org/changeset/93999
2279         https://bugs.webkit.org/show_bug.cgi?id=67147
2280
2281         Many failing tests (Requested by ap on #webkit).
2282
2283         * WebCore.exp.in:
2284         * platform/mac/CookieJar.mm:
2285         (WebCore::cookies):
2286         (WebCore::cookieRequestHeaderFieldValue):
2287         (WebCore::setCookies):
2288         (WebCore::cookiesEnabled):
2289         (WebCore::getRawCookies):
2290         (WebCore::deleteCookie):
2291         * platform/network/CookieStorage.h:
2292         * platform/network/ResourceHandle.cpp:
2293         (WebCore::privateStorageSession):
2294         (WebCore::privateBrowsingStorageSessionIdentifierBase):
2295         (WebCore::ResourceHandle::setPrivateBrowsingEnabled):
2296         (WebCore::ResourceHandle::privateBrowsingStorageSession):
2297         (WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase):
2298         * platform/network/ResourceHandle.h:
2299         * platform/network/cf/CookieJarCFNet.cpp:
2300         (WebCore::setCookies):
2301         (WebCore::cookies):
2302         (WebCore::cookieRequestHeaderFieldValue):
2303         (WebCore::cookiesEnabled):
2304         (WebCore::getRawCookies):
2305         (WebCore::deleteCookie):
2306         (WebCore::getHostnamesWithCookies):
2307         (WebCore::deleteCookiesForHostname):
2308         (WebCore::deleteAllCookies):
2309         * platform/network/cf/CookieStorageCFNet.cpp:
2310         (WebCore::privateBrowsingCookieStorage):
2311         (WebCore::defaultSessionCookieStorage):
2312         (WebCore::defaultCookieStorage):
2313         (WebCore::currentCookieStorage):
2314         (WebCore::setCurrentCookieStorage):
2315         (WebCore::setCookieStoragePrivateBrowsingEnabled):
2316         (WebCore::startObservingCookieChanges):
2317         (WebCore::stopObservingCookieChanges):
2318         * platform/network/cf/CookieStorageCFNet.h:
2319         * platform/network/cf/ResourceHandleCFNet.cpp:
2320         (WebCore::makeFinalRequest):
2321         (WebCore::ResourceHandle::createPrivateBrowsingStorageSession):
2322         (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase):
2323         (WebCore::ResourceHandle::currentStorageSession):
2324         (WebCore::defaultCFURLStorageSession):
2325         (WebCore::ResourceHandle::setDefaultStorageSession):
2326         (WebCore::ResourceHandle::defaultStorageSession):
2327         * platform/network/mac/CookieStorageMac.mm:
2328         (WebCore::setCookieStoragePrivateBrowsingEnabled):
2329         * platform/network/mac/ResourceHandleMac.mm:
2330         (WebCore::shouldRelaxThirdPartyCookiePolicy):
2331         (WebCore::ResourceHandle::createPrivateBrowsingStorageSession):
2332
2333 2011-08-29  Nayan Kumar K  <nayankk@motorola.com>
2334
2335         As per HTML specification, default font style of dfn tag should be italic.
2336         https://bugs.webkit.org/show_bug.cgi?id=56670
2337
2338         Reviewed by Adam Barth.
2339
2340         Test: fast/css/dfn-default-font-style.html
2341
2342         * css/html.css:
2343         (i, cite, em, var, address, dfn):
2344
2345 2011-08-29  Patrick Gansterer  <paroga@webkit.org>
2346
2347         Consider Conditional attribute in CodeGeneratorJS' JSValueToNative and NativeToJSValue function
2348         https://bugs.webkit.org/show_bug.cgi?id=65040
2349
2350         Reviewed by Brent Fulgham.
2351
2352         JSValueToNative and NativeToJSValue add additional include statements
2353         to the implementation and need to handle the Conditional attribute from
2354         the IDL file. The Conditional attribute adds appropriate #if ENABLE()
2355         lines for the preprocessor around the include statements to remove
2356         some unneeded build dependencies.
2357
2358         * bindings/scripts/CodeGeneratorJS.pm:
2359
2360 2011-08-29  Nate Chapin  <japhet@chromium.org>
2361
2362         Plumb ResourceLoaderOptions out to CachedResourceLoader::requestResource().
2363         This will be needed in order for DocumentThreadableLoader to become a CachedResourceClient.
2364         https://bugs.webkit.org/show_bug.cgi?id=66018
2365
2366         Reviewed by Antti Koivisto.
2367
2368         No new tests, refactor only.
2369
2370         * loader/cache/CachedImage.cpp:
2371         (WebCore::CachedImage::load):
2372         * loader/cache/CachedResource.cpp:
2373         (WebCore::CachedResource::CachedResource):
2374         (WebCore::CachedResource::load):
2375         * loader/cache/CachedResource.h:
2376        (WebCore::CachedResource::load):
2377         (WebCore::CachedResource::setResourceLoaderOptions):
2378         (WebCore::CachedResource::sendResourceLoadCallbacks):
2379         * loader/cache/CachedResourceLoader.cpp:
2380         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
2381         (WebCore::CachedResourceLoader::requestResource):
2382         (WebCore::CachedResourceLoader::loadResource):
2383         * loader/cache/CachedResourceLoader.h:
2384         * loader/cache/CachedResourceRequest.cpp:
2385         (WebCore::CachedResourceRequest::load):
2386         * loader/cache/CachedResourceRequest.h:
2387
2388 2011-08-29  Chris Palmer  <palmer@google.com>
2389
2390         Fix failures when FFT size is changed.
2391         https://bugs.webkit.org/show_bug.cgi?id=66916
2392
2393         Reviewed by Kenneth Russell.
2394
2395         Test: webaudio/fft-sizing.html
2396
2397         * webaudio/RealtimeAnalyser.cpp:
2398         (WebCore::RealtimeAnalyser::setFftSize): Assert size sanity.
2399         (WebCore::RealtimeAnalyser::doFFTAnalysis): Iterate the correct number of times over magnitudeBuffer.
2400         * webaudio/RealtimeAnalyser.h: Put member fields in the correct order (Min before Max).
2401
2402 2011-08-29  Abhishek Arya  <inferno@chromium.org>
2403
2404         Crash in InlineBox::deleteLine due to accessing removed
2405         renderer.
2406         https://bugs.webkit.org/show_bug.cgi?id=66015
2407
2408         Reviewed by Simon Fraser.
2409
2410         Test: fast/block/line-layout/inline-box-wrapper-crash.html
2411
2412         * rendering/RenderBox.cpp:
2413         (WebCore::RenderBox::positionLineBox): Make sure that the
2414         previous inline box wrapper is destroyed properly, before
2415         setting a new one.
2416
2417 2011-08-29  Alexey Proskuryakov  <ap@apple.com>
2418
2419         Lion build fix.
2420
2421         * WebCore.exp.in: We have different definitions of CFURLStorageSessionRef on different versions
2422         of Mac OS X, and need separate exports.
2423
2424 2011-08-29  Tony Chang  <tony@chromium.org>
2425
2426         Implement -webkit-flex-pack for horizontal flexboxen
2427         https://bugs.webkit.org/show_bug.cgi?id=66898
2428
2429         Reviewed by Ojan Vafai.
2430
2431         Test: css3/flexbox/004.html
2432
2433         * rendering/RenderFlexibleBox.cpp:
2434         (WebCore::RenderFlexibleBox::layoutHorizontalBlock):
2435         (WebCore::hasPackingSpace):
2436         (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmHorizontal):
2437
2438 2011-08-29  Alexey Proskuryakov  <ap@apple.com>
2439
2440         Windows build fix.
2441
2442         * platform/network/cf/CookieJarCFNet.cpp:
2443         (WebCore::setCookies):
2444         (WebCore::cookies):
2445         (WebCore::cookieRequestHeaderFieldValue):
2446         (WebCore::cookiesEnabled):
2447         (WebCore::getRawCookies):
2448         (WebCore::deleteCookie):
2449         (WebCore::getHostnamesWithCookies):
2450         (WebCore::deleteCookiesForHostname):
2451         (WebCore::deleteAllCookies):
2452         Updated for new function name and signature: currentCFHTTPCookieStorage().
2453
2454 2011-08-29  Alexey Proskuryakov  <ap@apple.com>
2455
2456         Mac build fix.
2457
2458         * platform/network/cf/CookieStorageCFNet.cpp: Move Windows specific includes into PLATFORM(WIN).
2459
2460 2011-08-29  Andreas Kling  <kling@webkit.org>
2461
2462         Viewing a post on reddit.com wastes a lot of memory on event listeners.
2463         https://bugs.webkit.org/show_bug.cgi?id=67133
2464
2465         Reviewed by Darin Adler.
2466
2467         Specialize the HashMap used to store registered listeners on an EventTarget
2468         to have a minimum size of 32 (rather than the default 64.)
2469         It's very rare for pages to register listeners for so many different events
2470         and this cuts memory consumption in half for the common case.
2471
2472         As an example, for a typical post on the reddit.com front page,
2473         this reduces memory used by ~700kB on 64-bit.
2474
2475         * dom/EventTarget.h:
2476
2477 2011-08-29  Stephen White  <senorblanco@chromium.org>
2478
2479         Skia's accelerated canvas 2D implementation should use GrTexture, not DrawingBuffer
2480         https://bugs.webkit.org/show_bug.cgi?id=67050
2481
2482         Reviewed by Kenneth Russell.
2483
2484         Covered by existing tests.
2485
2486         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2487         (WebCore::Canvas2DLayerChromium::create):
2488         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
2489         (WebCore::Canvas2DLayerChromium::drawsContent):
2490         Construct Canvas2DLayerChromium with a GraphicsContext3D, not a
2491         DrawingBuffer.
2492         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
2493         Flush the GrContext and GraphicsContext3D on compositor update.
2494         * platform/graphics/chromium/Canvas2DLayerChromium.h:
2495         * platform/graphics/chromium/CanvasLayerChromium.cpp:
2496         (WebCore::CanvasLayerChromium::CanvasLayerChromium):
2497         * platform/graphics/chromium/CanvasLayerChromium.h:
2498         Put textureId() back on the base class (CanvasLayerChromium) and
2499         de-virtualize it.
2500         (WebCore::CanvasLayerChromium::textureId):
2501         (WebCore::CanvasLayerChromium::setTextureId):
2502         Move m_textureId from WebGLLayerChromium, since canvas2D now uses
2503         it too.  Provide getters and setters.
2504         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2505         (WebCore::DrawingBuffer::DrawingBuffer):
2506         (WebCore::DrawingBuffer::~DrawingBuffer):
2507         Remove all Canvas2D-related calls from DrawingBuffer.
2508         (WebCore::DrawingBuffer::publishToPlatformLayer):
2509         Remove GrContext::flush call, since it's now handled by the platform layer.
2510         (WebCore::DrawingBuffer::platformLayer):
2511         Return NULL for now (WebGL may rescussitate this later).
2512         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2513         Remove a useless #include.
2514         * platform/graphics/chromium/ImageBufferDataSkia.h:
2515         Add ownership of the Canvas2DLayerChromium.
2516         * platform/graphics/chromium/WebGLLayerChromium.cpp:
2517         (WebCore::WebGLLayerChromium::WebGLLayerChromium):
2518         * platform/graphics/chromium/WebGLLayerChromium.h:
2519         Remove all texture ID stuff (now on base class).
2520         * platform/graphics/gpu/DrawingBuffer.h:
2521         Remove Canvas2DLayerChromium and all Ganesh datatypes from
2522         DrawingBuffer, since it's no longer used by canvas2D.
2523         * platform/graphics/skia/ImageBufferSkia.cpp:
2524         (WebCore::ImageBuffer::ImageBuffer):
2525         On accelerated ImageBuffer creation, create a GrTexture instead of a
2526         DrawingBuffer.  If all is cool, create and set the SkGpuDevice here,
2527         and create a Canvas2DLayerChromium platform layer.
2528         (WebCore::ImageBuffer::platformLayer):
2529         * platform/graphics/skia/PlatformContextSkia.cpp:
2530         (WebCore::PlatformContextSkia::setGraphicsContext3D):
2531         * platform/graphics/skia/PlatformContextSkia.h:
2532         Remove all GrContext creation and DrawingBuffer "scraping" from 
2533         PlatformContextSkia::setGraphicsContext3D().  This is handled in
2534         the ImageBuffer constructor instead.
2535
2536 2011-08-26  Alexey Proskuryakov  <ap@apple.com>
2537
2538         DumpRenderTree should begin each test with an empty cookie store
2539         https://bugs.webkit.org/show_bug.cgi?id=63545
2540         <rdar://problem/5666907>
2541
2542         Reviewed by Darin Adler.
2543
2544         Use a clean CFURLStorageSession when this functionality is available.
2545
2546         * WebCore.exp.in: Added exports
2547
2548         * platform/mac/CookieJar.mm:
2549         (WebCore::cookies):
2550         (WebCore::cookieRequestHeaderFieldValue):
2551         (WebCore::setCookies):
2552         (WebCore::cookiesEnabled):
2553         (WebCore::getRawCookies):
2554         (WebCore::deleteCookie):
2555         Updated for privateBrowsingCookieStorage->currentCFHTTPCookieStorage change.
2556
2557         * platform/network/CookieStorage.h: Moved CFNetwork specific declarations to CookieStorageCFNet.h.
2558
2559         * platform/network/ResourceHandle.cpp: Moved CFNetwork specific code to ResourceHandleCFNet.cpp.
2560         This file contains cross platform functionality, and we no longer need to put code in it to
2561         share it between Mac and Windows.
2562
2563         * platform/network/ResourceHandle.h: Expose methods to manipulate default session on Mac, too.
2564
2565         * platform/network/cf/CookieStorageCFNet.cpp:
2566         (WebCore::cookieStorageOverride): Make it clear that this override is only for a Windows API.
2567         (WebCore::overrideCookieStorage): Ditto.
2568         (WebCore::currentCFHTTPCookieStorage): We no longer store a cookie storage in a static variable,
2569         unless it has been overridden on Windows. We can always get it from a session.
2570         (WebCore::setCookieStoragePrivateBrowsingEnabled): There is nothing to do here - we'll just
2571         use private session's storage. Note that Mac has a separate code path for OS versions that
2572         don't support sessions.
2573
2574         * platform/network/cf/CookieStorageCFNet.h: Changed exposed methods for more clarity.
2575
2576         * platform/network/cf/ResourceHandleCFNet.cpp:
2577         (WebCore::makeFinalRequest): Updated for currentCookieStorage->currentCFHTTPCookieStorage change.
2578         (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): Moved out of USE(CFNETWORK),
2579         as this function is also used with NSURLConnection when sessions are enabled.
2580         (WebCore::ResourceHandle::currentStorageSession): Ditto. Removed an #if since default session
2581         is now supported on Mac, too.
2582         (WebCore::defaultCFURLStorageSession): Moved out of USE(CFNETWORK).
2583         (WebCore::ResourceHandle::setDefaultStorageSession): Moved out of USE(CFNETWORK). No longer
2584         adopt the session, because nothing in method name says that it will steal a reference from
2585         the caller.
2586         (WebCore::ResourceHandle::defaultStorageSession): Moved out of USE(CFNETWORK).
2587         (WebCore::privateStorageSession): Moved from ResourceHandle.cpp.
2588         (WebCore::privateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp.
2589         (WebCore::ResourceHandle::setPrivateBrowsingEnabled): Moved from ResourceHandle.cpp.
2590         (WebCore::ResourceHandle::privateBrowsingStorageSession): Moved from ResourceHandle.cpp.
2591         (WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp.
2592         (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase): Moved from ResourceHandle.cpp.
2593
2594         * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled):
2595         We no longer store a reference to cookie storage in a static variable, so nothing to do here.
2596         On older OS versiosn, we still need to enable legacy private browsing mode.
2597
2598         * platform/network/mac/ResourceHandleMac.mm: (WebCore::shouldRelaxThirdPartyCookiePolicy):
2599         Updated to use the new currentCFHTTPCookieStorage function.
2600
2601 2011-08-22  David Levin  <levin@chromium.org>
2602
2603         postMessage raises INVALID_STATE_ERR instead of DATA_CLONE_ERR in many cases.
2604         https://bugs.webkit.org/show_bug.cgi?id=66713
2605
2606         Reviewed by Dmitry Titov.
2607
2608         See http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#posting-messages for postMessage
2609
2610         * bindings/js/JSMessagePortCustom.cpp:
2611         (WebCore::fillMessagePortArray):
2612         * bindings/v8/custom/V8MessagePortCustom.cpp:
2613         (WebCore::getMessagePortArray):
2614         * dom/MessagePort.cpp:
2615         (WebCore::MessagePort::postMessage):
2616         (WebCore::MessagePort::disentanglePorts):
2617
2618 2011-08-29  Tom Zakrajsek  <tomz@codeaurora.org>
2619
2620         canvas arc() missing line to start of arc if swing is zero
2621         https://bugs.webkit.org/show_bug.cgi?id=55696
2622
2623         Reviewed by Andreas Kling.
2624
2625         Test: fast/canvas/canvas-arc-zero-lineto.html
2626
2627         * html/canvas/CanvasRenderingContext2D.cpp:
2628         (WebCore::CanvasRenderingContext2D::arc):
2629
2630 2011-08-23  Chris Marrin  <cmarrin@apple.com>
2631
2632         [mac] requestAnimationFrame support for mac port
2633         https://bugs.webkit.org/show_bug.cgi?id=59146
2634
2635         Reviewed by Simon Fraser.
2636
2637         Enable REQUEST_ANIMATION_FRAME logic and add ScriptedAnimationController
2638         to build. Added JavaScript support for Mac, too.
2639
2640         * CodeGenerators.pri:
2641         * Configurations/FeatureDefines.xcconfig:
2642         * DerivedSources.make:
2643         * WebCore.exp.in:
2644         * WebCore.xcodeproj/project.pbxproj:
2645         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp: Added.
2646         (WebCore::JSRequestAnimationFrameCallback::handleEvent):
2647         * bindings/scripts/CodeGeneratorJS.pm:
2648         (AddIncludesForType):
2649         * dom/RequestAnimationFrameCallback.idl:
2650
2651 2011-08-29  Alexander Pavlov  <apavlov@chromium.org>
2652
2653         Web Inspector: <button hidden>..</button> has a different computed "display" value than "none"
2654         https://bugs.webkit.org/show_bug.cgi?id=67124
2655
2656         Attribute styles have a higher priority than user agent styles and thus should be rendered above them.
2657
2658         Reviewed by Yury Semikhatsky.
2659
2660         * inspector/front-end/StylesSidebarPane.js:
2661         (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules):
2662         (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules.get continue):
2663
2664 2011-08-25  Pavel Podivilov  <podivilov@chromium.org>
2665
2666         Web Inspector: rename sourceFile to (raw|ui)SourceCode in DebuggerPresentationModel.
2667         https://bugs.webkit.org/show_bug.cgi?id=66769
2668
2669         Reviewed by Pavel Feldman.
2670
2671         * inspector/front-end/DebuggerPresentationModel.js:
2672         (WebInspector.DebuggerPresentationModel):
2673         (WebInspector.DebuggerPresentationModel.prototype.uiSourceCode):
2674         (WebInspector.DebuggerPresentationModel.prototype._scriptLocationToUILocation.didCreateSourceMapping):
2675         (WebInspector.DebuggerPresentationModel.prototype._scriptLocationToUILocation):
2676         (WebInspector.DebuggerPresentationModel.prototype._uiLocationToScriptLocation.didCreateSourceMapping):
2677         (WebInspector.DebuggerPresentationModel.prototype._uiLocationToScriptLocation):
2678         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor.didGetLocation):
2679         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor):
2680         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
2681         (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping):
2682         (WebInspector.DebuggerPresentationModel.prototype._addScript):
2683         (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced):
2684         (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
2685         (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didEditScriptSource):
2686         (WebInspector.DebuggerPresentationModel.prototype.setScriptSource):
2687         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
2688         (WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles):
2689         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation):
2690         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage):
2691         (WebInspector.DebuggerPresentationModel.prototype._consoleCleared):
2692         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
2693         (WebInspector.DebuggerPresentationModel.prototype.breakpointsForSourceFileId):
2694         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
2695         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
2696         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
2697         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
2698         (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint):
2699         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
2700         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
2701         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
2702         (WebInspector.DebuggerPresentationModel.prototype._rawSourceCodeForScript):
2703         (WebInspector.DebuggerPresentationModel.prototype._scriptForRawSourceCode):
2704         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
2705         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
2706         (WebInspector.PresentationBreakpoint):
2707         (WebInspector.PresenationCallFrame.prototype.sourceLine.didGetUILocation):
2708         (WebInspector.PresenationCallFrame.prototype.sourceLine):
2709         (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent):
2710         (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent):
2711         (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent):
2712         * inspector/front-end/ScriptsPanel.js:
2713         (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
2714         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2715         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
2716         (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
2717         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
2718         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent):
2719         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName):
2720         * inspector/front-end/SourceFile.js:
2721         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
2722         (WebInspector.UILocation):
2723
2724 2011-08-29  Ilya Tikhonovsky  <loislo@chromium.org>
2725
2726         Web Inspector: cached permanent redirects don't show redirect code and text in Network panel.
2727         https://bugs.webkit.org/show_bug.cgi?id=67126
2728
2729         Reviewed by Yury Semikhatsky.
2730
2731         * inspector/InspectorResourceAgent.cpp:
2732         (WebCore::buildObjectForResourceResponse):
2733         * inspector/front-end/NetworkPanel.js:
2734         (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell):
2735
2736 2011-08-25  Pavel Podivilov  <podivilov@chromium.org>
2737
2738         Web Inspector: extract FormattedContentProvider from RawSourceCode.
2739         https://bugs.webkit.org/show_bug.cgi?id=66938
2740
2741         Reviewed by Pavel Feldman.
2742
2743         * inspector/front-end/SourceFile.js:
2744         (WebInspector.RawSourceCode.prototype._setContentProvider):
2745         (WebInspector.RawSourceCode.prototype._loadResourceContent):
2746         (WebInspector.RawSourceCode.prototype._loadScriptContent):
2747         (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent):
2748         (WebInspector.RawSourceCode.prototype._didRequestContent):
2749         (WebInspector.FormattedContentProvider):
2750         (WebInspector.FormattedContentProvider.prototype.requestContent.didRequestContent.didFormatContent):
2751         (WebInspector.FormattedContentProvider.prototype.requestContent):
2752
2753 2011-08-25  Pavel Podivilov  <podivilov@chromium.org>
2754
2755         Web Inspector: link UISourceCode to RawSourceCode.
2756         https://bugs.webkit.org/show_bug.cgi?id=66944
2757
2758         Reviewed by Pavel Feldman.
2759
2760         * inspector/front-end/UISourceCode.js:
2761         (WebInspector.UISourceCode):
2762         (WebInspector.UISourceCode.prototype.get rawSourceCode):
2763
2764 2011-08-25  Pavel Podivilov  <podivilov@chromium.org>
2765
2766         Web Inspector: remove RawSourceCode.setFormatted.
2767         https://bugs.webkit.org/show_bug.cgi?id=66947
2768
2769         Reviewed by Pavel Feldman.
2770
2771         * inspector/front-end/DebuggerPresentationModel.js:
2772         * inspector/front-end/SourceFile.js:
2773         (WebInspector.RawSourceCode):
2774
2775 2011-08-26  Pavel Podivilov  <podivilov@chromium.org>
2776
2777         Web Inspector: Debugger.setBreakpointByUrl should return error when setting breakpoint on the same location twice.
2778         https://bugs.webkit.org/show_bug.cgi?id=67030
2779
2780         Reviewed by Pavel Feldman.
2781
2782         Test: inspector/debugger/set-breakpoint.html
2783
2784         * inspector/InspectorDebuggerAgent.cpp:
2785         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2786
2787 2011-08-29  Matthew Delaney  <mdelaney@apple.com>
2788
2789         fast/canvas/shadow-offset-*.html fail on Leopard/Snow Leopard when removing the work around for <rdar://problem/5539388>.
2790         https://bugs.webkit.org/show_bug.cgi?id=67107
2791
2792         Reviewed by David Levin.
2793
2794         No new tests. Effectively reverting the change from https://bugs.webkit.org/show_bug.cgi?id=67052 for Leopard and SL
2795         because it caused test regressions on Leopard and SL, but not Lion.
2796
2797         * platform/graphics/cg/GraphicsContextCG.cpp:
2798         (WebCore::GraphicsContext::setPlatformShadow):
2799
2800 2011-08-29  Zoltan Herczeg  <zherczeg@webkit.org>
2801
2802         [Qt] Unreviewed minimal-build buildfix after r93937.
2803
2804         * platform/qt/RenderThemeQt.cpp:
2805         (WebCore::RenderThemeQt::paintInnerSpinButton):
2806         * platform/qt/RenderThemeQt.h:
2807
2808 2011-08-28  Keishi Hattori  <keishi@webkit.org>
2809
2810         Chromium Win: Setting square-button appearance reaches NOTREACHED
2811         https://bugs.webkit.org/show_bug.cgi?id=66918
2812
2813         Reviewed by Kent Tamura.
2814
2815         Test: fast/css/square-button-appearance.html
2816
2817         * rendering/RenderThemeChromiumWin.cpp:
2818         (WebCore::supportsFocus): Add case for SquareButtonPart.
2819         (WebCore::RenderThemeChromiumWin::supportsFocusRing): Add case for SquareButtonPart.
2820         (WebCore::RenderThemeChromiumWin::getThemeData): Add case for SquareButtonPart.
2821
2822 2011-08-28  Luke Macpherson   <macpherson@chromium.org>
2823
2824         Fix reference counting of values in CSSSelector.
2825         https://bugs.webkit.org/show_bug.cgi?id=66452
2826
2827         Reviewed by Darin Adler.
2828
2829         No new tests / no functionality changed.
2830
2831         Call deref when reassigning the value.
2832
2833         * css/CSSSelector.h:
2834         (WebCore::CSSSelector::setValue):
2835
2836 2011-08-28  Sam Weinig  <sam@webkit.org>
2837
2838         Add support for constructor syntax for Events
2839         https://bugs.webkit.org/show_bug.cgi?id=63878
2840
2841         Reviewed by Oliver Hunt.
2842
2843         Add basic support for Event constructors, starting with just supporting
2844         the constructor for the base Event class and just JSC support.  This lays
2845         the infrastructure for the other events as well.
2846
2847         Test: fast/events/event-constructors.html
2848
2849         * GNUmakefile.list.am:
2850         * UseJSC.cmake:
2851         * WebCore.gypi:
2852         * WebCore.pro:
2853         * WebCore.vcproj/WebCore.vcproj:
2854         * WebCore.xcodeproj/project.pbxproj:
2855         * bindings/js/JSBindingsAllInOne.cpp:
2856         Add files.
2857
2858         * bindings/generic/EventConstructors.h: Added.
2859         Add binding agnostic header that defines the Event initializers
2860         using a macro based DSL.
2861
2862         * bindings/js/JSEventConstructors.cpp: Added.
2863         (WebCore::convertValue):
2864         (WebCore::tryGetProperty):
2865         (WebCore::constructJSEventWithInitializer):
2866         Add JSC implementation of Event initializer DSL.
2867
2868         * dom/Event.cpp:
2869         (WebCore::EventInit::EventInit):
2870         (WebCore::Event::Event):
2871         * dom/Event.h:
2872         (WebCore::Event::create):
2873         Add Event initializer interface for base Event.
2874
2875         * dom/Event.idl:
2876         Mark Event as having a custom constructor function.
2877
2878 2011-08-27  Andreas Kling  <kling@webkit.org>
2879
2880         SQLiteStatement::getColumnText() could construct WTF::String result more efficiently.
2881         https://bugs.webkit.org/show_bug.cgi?id=67090
2882
2883         Reviewed by Darin Adler.
2884
2885         * platform/sql/SQLiteStatement.cpp:
2886         (WebCore::SQLiteStatement::getColumnText): Use sqlite3_column_bytes16()
2887         to get the length of the column text without looking for the null terminator.
2888
2889 2011-08-07  Robert Hogan  <robert@webkit.org>
2890
2891         The child div element with position:absolute will overlap with its parent div when a 'break' element is present in between
2892         https://bugs.webkit.org/show_bug.cgi?id=21934
2893
2894         Reviewed by David Hyatt.
2895
2896         Test: fast/block/positioning/absolute-appended-to-inline.html
2897
2898         Appending a positioned child node to an inline flow should dirty the lines in the flow, just as
2899         inserting a positioned child node does. Treating an appended and inserted node differently meant that updating the display type
2900         from 'none' to 'block' for the following markup would result in the div getting positioned correctly under
2901         the line block:
2902
2903             <div><a onMouseOver="mopen()">Hover</a><div style="display:none; position:absolute; background:#4682b4; height:10px; width:20px"><br></div></div>
2904
2905         but this would not happen with the following markup (the <br> is before the child div rather than after it):
2906
2907             <div><a onMouseOver="mopen()">Hover</a><br><div style="display:none; position:absolute; background:#4682b4; height:10px; width:20px"></div></div>
2908
2909         This problem is specific to cases where an object is appended to a line block whose last child is a <br>. When the line is relaid out after appending
2910         the positioned object the last line in the line block is always considered dirty unless it broke cleanly (ie. with a <br>, see RenderBlock::determineStartPosition),
2911         So in the second case above, the clean break and failing to dirty any lines in the block when appending the object means that the line block doesn't get relaid out
2912         to position the new positioned object relative to its containing line block.
2913
2914         So the change could special-case appending a node when the previous sibling isBR(), but it seems just as well to behave the same way as insertChildNode().
2915
2916         * rendering/RenderObjectChildList.cpp:
2917         (WebCore::RenderObjectChildList::appendChildNode):
2918             Call dirtyLinesFromChangedChild() if the child is positioned, just like insertChildNode().
2919
2920 2011-08-27  Anders Carlsson  <andersca@apple.com>
2921
2922         iChat: Receiving a message containing only a single-quote (') causes bubble to fail
2923         https://bugs.webkit.org/show_bug.cgi?id=67076
2924         <rdar://problem/10026089>
2925
2926         Reviewed by Dan Bernstein.
2927
2928         Test: fast/borders/border-fit-2.html
2929
2930         * rendering/RenderBlock.cpp:
2931         (WebCore::RenderBlock::borderFitAdjust):
2932         Make sure that the resulting rect isn't smaller than the border + padding.
2933
2934         (WebCore::RenderBlock::clearTruncation):
2935         Fix blatant coding style violations.
2936
2937 2011-08-27  Andreas Kling  <kling@webkit.org>
2938
2939         Shrink RenderLayer.
2940         https://bugs.webkit.org/show_bug.cgi?id=67089
2941
2942         Reviewed by Antonio Gomes.
2943
2944         * rendering/RenderLayer.cpp:
2945         (WebCore::RenderLayer::RenderLayer):
2946         * rendering/RenderLayer.h: Make m_inResizeMode a bitfield,
2947         shrinking RenderLayer by 8 bytes (on 64-bit.)
2948
2949 2011-08-27  Young Han Lee  <joybro@company100.net>
2950
2951         Reviewed by Dirk Schulze.
2952
2953         SVG animation fill="freeze" doesn't set baseVal to current animVal if animation stops before reaching the end
2954         https://bugs.webkit.org/show_bug.cgi?id=63553
2955
2956         calculateAnimationPercentAndRepeat() is returning 1, which means 100%, whenever
2957         elapsed >= m_intervalEnd, but this is wrong because m_intervalEnd can be in the middle
2958         of the animation duration. (e.g. begin="0s" end="2s" dur="3s")
2959
2960         This change makes the function return the animations's true progress instead of 100%
2961         when the animation ends.
2962
2963         Test: svg/animations/animate-end-attribute.html
2964
2965         * svg/animation/SVGSMILElement.cpp:
2966         (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
2967
2968 2011-08-27  Jarred Nicholls  <jarred@sencha.com>
2969
2970         [Qt] Need spin-button implementation
2971         https://bugs.webkit.org/show_bug.cgi?id=65896
2972
2973         Reviewed by Kenneth Rohde Christiansen.
2974
2975         * platform/qt/RenderThemeQt.cpp:
2976         (WebCore::RenderThemeQt::adjustInnerSpinButtonStyle):
2977         (WebCore::RenderThemeQt::paintInnerSpinButton):
2978         * platform/qt/RenderThemeQt.h:
2979
2980 2011-08-26  Xiaomei Ji  <xji@chromium.org>
2981
2982         Regression(91788): Bad cast in WebCore::blockWithNextLineBox
2983         https://bugs.webkit.org/show_bug.cgi?id=66090
2984
2985         Reviewed by Ryosuke Niwa.
2986
2987         This is more like (but not exactly) a revert of r91788.
2988         It does not search for previous or next root inline box in different
2989         render object, which completely eliminates the cause of this issue.
2990         And it removes createPositionAvoidingIgnoredNode(), changed its caller
2991         to use createLegacyEditingPosition(). createPositionAvoidingIgnoredNode
2992         is not correct when node is a replaced element whose caretMaxOffset
2993         could be greater than 1.
2994
2995         Tests: editing/selection/move-by-word-visually-crash-test-1.html
2996                editing/selection/move-by-word-visually-crash-test-2.html
2997                editing/selection/move-by-word-visually-crash-test-3.html
2998                editing/selection/move-by-word-visually-crash-test-4.html
2999
3000         * editing/htmlediting.cpp:
3001         * editing/htmlediting.h:
3002         * editing/visible_units.cpp:
3003         (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality):
3004         (WebCore::leftmostPositionInRTLBoxInLTRBlock):
3005         (WebCore::rightmostPositionInLTRBoxInRTLBlock):
3006         (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
3007         (WebCore::appendPositionAtLogicalEndOfLine):
3008         (WebCore::leftInlineBox):
3009         (WebCore::rightInlineBox):
3010
3011 2011-08-26  James Robinson  <jamesr@chromium.org>
3012
3013         [Chromium] Possible leak of LayerRendererChromium
3014         https://bugs.webkit.org/show_bug.cgi?id=66981
3015
3016         Reviewed by Kenneth Russell.
3017
3018         Fix a number of reference cycle leaks that prevent LayerRendererChromiums from being destroyed when a tab is
3019         closed.
3020
3021         Not possible to write a layout test where an entire WebView goes away.
3022
3023         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3024         (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium):
3025         * platform/graphics/chromium/LayerRendererChromium.cpp:
3026         (WebCore::LayerRendererChromium::clearRenderSurfacesOnCCLayerImplRecursive):
3027         (WebCore::LayerRendererChromium::clearRootCCLayerImpl):
3028         (WebCore::LayerRendererChromium::cleanupSharedObjects):
3029         * platform/graphics/chromium/LayerRendererChromium.h:
3030         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3031         (WebCore::CCLayerTreeHost::setRootLayer):
3032
3033 2011-08-26  Nate Chapin  <japhet@chromium.org>
3034
3035         Move allowCredentials from ThreadableLoaderOptions down
3036         to ResourceLoaderOptions. This allows us to remove
3037         getShouldUseCredentialStorage() from SubresourceLoaderClient
3038         and check allowCredentials in ResourceLoader.
3039         https://bugs.webkit.org/show_bug.cgi?id=65330
3040
3041         Reviewed by Alexey Proskuryakov.
3042
3043         No new tests, refractor only.
3044
3045         * loader/DocumentThreadableLoader.cpp:
3046         * loader/DocumentThreadableLoader.h:
3047         * loader/MainResourceLoader.cpp:
3048         * loader/NetscapePlugInStreamLoader.cpp:
3049         * loader/ResourceLoadScheduler.h:
3050         * loader/ResourceLoader.cpp:
3051         (WebCore::ResourceLoader::shouldUseCredentialStorage): Check
3052             m_options.allowCredentials instead of calling a client.
3053         * loader/ResourceLoaderOptions.h:
3054         * loader/SubresourceLoader.cpp:
3055         * loader/SubresourceLoader.h:
3056         * loader/SubresourceLoaderClient.h:
3057         * loader/ThreadableLoader.h:
3058         * loader/cache/CachedResourceRequest.cpp:
3059
3060 2011-08-26  Ojan Vafai  <ojan@chromium.org>
3061
3062         change the default preferred width of the flex() function to 0px per the new spec
3063         https://bugs.webkit.org/show_bug.cgi?id=67067
3064
3065         Reviewed by Tony Chang.
3066
3067         * css/CSSParser.cpp:
3068         (WebCore::CSSParser::parseFlex):
3069
3070 2011-08-26  Matthew Delaney  <mdelaney@apple.com>
3071
3072         Remove offset hack from GraphicsContextCG setShadow code
3073         https://bugs.webkit.org/show_bug.cgi?id=67052
3074
3075         Reviewed by Simon Fraser.
3076
3077         No new tests - current tests cover it.
3078
3079         * platform/graphics/cg/GraphicsContextCG.cpp:
3080         Removing the offset hack introduced in http://trac.webkit.org/changeset/28714
3081         for an issue with offsets in an old version of CoreGraphics that's long since been fixed.
3082
3083 2011-08-26  Alexey Proskuryakov  <ap@apple.com>
3084
3085         Get rid of frame life support timer
3086         https://bugs.webkit.org/show_bug.cgi?id=66874
3087
3088         Reviewed by Geoff Garen. V8 fixes courtesy of Dmitry Titov.
3089
3090         Test: fast/frames/detached-frame-property.html
3091
3092         * bindings/js/JSDOMWindowBase.cpp:
3093         * bindings/js/JSDOMWindowBase.h:
3094         * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld):
3095         * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::evaluate):
3096         * bindings/v8/V8Proxy.cpp:
3097         (WebCore::V8Proxy::runScript):
3098         (WebCore::V8Proxy::callFunction):
3099         (WebCore::V8Proxy::newInstance):
3100         * page/Frame.cpp:
3101         (WebCore::Frame::Frame):
3102         (WebCore::Frame::~Frame):
3103         (WebCore::Frame::pageDestroyed):
3104         * page/Frame.h:
3105         * page/Page.cpp: (WebCore::Page::~Page):
3106         Removed all code that dealt with the life support timer. Protect Frame inside runScript()
3107         and callFunction() for v8 bindings.
3108
3109         * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent):
3110         Replaced ref/deref calls on self with a RefPtr.
3111
3112 2011-08-26  Ned Holbrook  <nholbrook@apple.com>
3113
3114         RenderText::computePreferredLogicalWidths() should measure words with trailing spaces
3115         https://bugs.webkit.org/show_bug.cgi?id=66733
3116
3117         Reviewed by Dan Bernstein.
3118
3119         Test: fast/text/complex-preferred-logical-widths.html
3120
3121         * rendering/RenderText.cpp:
3122         (WebCore::RenderText::computePreferredLogicalWidths): Apply logic from RenderBlock::LineBreaker::nextLineBreak().
3123
3124 2011-08-26  Tony Chang  <tony@chromium.org>
3125
3126         Add CSS parsing for -webkit-flex-align
3127         https://bugs.webkit.org/show_bug.cgi?id=66726
3128
3129         Reviewed by Ojan Vafai.
3130
3131         * css/CSSComputedStyleDeclaration.cpp:
3132         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3133         * css/CSSParser.cpp:
3134         (WebCore::CSSParser::parseValue):
3135         * css/CSSPrimitiveValueMappings.h:
3136         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3137         (WebCore::CSSPrimitiveValue::operator EFlexAlign):
3138         * css/CSSPropertyNames.in:
3139         * css/CSSStyleApplyProperty.cpp:
3140         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3141         * css/CSSStyleSelector.cpp:
3142         (WebCore::CSSStyleSelector::applyProperty):
3143         * css/CSSValueKeywords.in:
3144         * rendering/style/RenderStyle.h:
3145         (WebCore::InheritedFlags::flexAlign):
3146         (WebCore::InheritedFlags::setFlexAlign):
3147         (WebCore::InheritedFlags::initialFlexAlign):
3148         * rendering/style/RenderStyleConstants.h:
3149         * rendering/style/StyleFlexibleBoxData.cpp:
3150         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
3151         (WebCore::StyleFlexibleBoxData::operator==):
3152         * rendering/style/StyleFlexibleBoxData.h:
3153
3154 2011-08-26  Nate Chapin  <japhet@chromium.org>
3155
3156         Fix http/tests/misc/willCacheResponse-delegate-callback.html
3157         after r93886. We're implicitly converting an enum to a bool.
3158
3159         Rubber-stamped by David Levin.
3160
3161         * loader/mac/ResourceLoaderMac.mm:
3162         (WebCore::ResourceLoader::willCacheResponse):
3163
3164 2011-08-26  Chris Rogers  <crogers@google.com>
3165
3166         Add MediaPlayer::audioSourceProvider() method for audio stream access by the Web Audio API.
3167         https://bugs.webkit.org/show_bug.cgi?id=66398
3168
3169         Reviewed by Eric Carlson.
3170
3171         * html/HTMLMediaElement.cpp:
3172         (WebCore::HTMLMediaElement::HTMLMediaElement):
3173         (WebCore::HTMLMediaElement::prepareForLoad):
3174         (WebCore::HTMLMediaElement::loadNextSourceChild):
3175         (WebCore::HTMLMediaElement::ensureMediaPlayer):
3176         (WebCore::HTMLMediaElement::createMediaPlayer):
3177             MediaPlayer creation has now been put into createMediaPlayer() instead of it being created
3178             separately in these various methods.  It has been made thread-safe for use with the Web Audio API
3179             in conjunction with an MediaElementAudioSourceNode.
3180         (WebCore::HTMLMediaElement::setAudioSourceNode):
3181         (WebCore::HTMLMediaElement::audioSourceProvider):
3182         * html/HTMLMediaElement.h:
3183         (WebCore::HTMLMediaElement::audioSourceNode):
3184             The HTMLMediaElement now keeps track of an optional MediaElementAudioSourceNode if
3185             the audio stream is being processed using the Web Audio API.
3186         
3187         * platform/graphics/MediaPlayer.cpp:
3188         (WebCore::MediaPlayer::audioSourceProvider):
3189         * platform/graphics/MediaPlayer.h:
3190         * platform/graphics/MediaPlayerPrivate.h:
3191         (WebCore::MediaPlayerPrivateInterface::audioSourceProvider):
3192             MediaPlayer now has an audioSourceProvider() method with a default "empty" implementation.
3193             audioSourceProvider() returns an AudioSourceProvider object which the Web Audio API's
3194             MediaElementAudioSourceNode uses (indirectly through an HTMLMediaElement method) to get the rendered audio stream.
3195
3196         * webaudio/AudioContext.cpp:
3197         (WebCore::AudioContext::createMediaElementSource):
3198         * webaudio/AudioContext.h:
3199         * webaudio/AudioContext.idl:
3200             AudioContext::createMediaElementSource() is now more careful to check that an HTMLMediaElement
3201             doesn't already have a MediaElementAudioSourceNode attached to it.
3202             
3203         * webaudio/MediaElementAudioSourceNode.cpp:
3204         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
3205         (WebCore::MediaElementAudioSourceNode::~MediaElementAudioSourceNode):
3206         (WebCore::MediaElementAudioSourceNode::process):
3207         (WebCore::MediaElementAudioSourceNode::lock):
3208         (WebCore::MediaElementAudioSourceNode::unlock):
3209         * webaudio/MediaElementAudioSourceNode.h:
3210             Implement thread-safe processing (replacing the old stub implementation).
3211
3212 2011-08-23  Stephen White  <senorblanco@chromium.org>
3213
3214         Assertion fires if canvas is resized while save() active
3215         https://bugs.webkit.org/show_bug.cgi?id=66710
3216
3217         Reviewed by Simon Fraser.
3218
3219         Test: fast/canvas/resize-while-save-active.html
3220
3221         * html/HTMLCanvasElement.cpp:
3222         (WebCore::HTMLCanvasElement::reset):
3223         Call CanvasRenderingContext2D::reset() before resizing the canvas,
3224         so that the GraphicsContext state stack can be unwound.
3225         * html/canvas/CanvasRenderingContext2D.cpp:
3226         (WebCore::CanvasRenderingContext2D::unwindStateStack):
3227         (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
3228         Refactor the state stack unwinding code from the destructor to 
3229         unwindStateStack() (new).
3230         (WebCore::CanvasRenderingContext2D::reset):
3231         Unwind the GraphicsContext state stack when the context is reset.
3232         * html/canvas/CanvasRenderingContext2D.h:
3233
3234 2011-08-26  Darin Adler  <darin@apple.com>
3235
3236         [Mac] Use the progress cursor instead of the wristwatch for CSS "wait" cursor
3237         https://bugs.webkit.org/show_bug.cgi?id=67049
3238
3239         Reviewed by Beth Dakin.
3240
3241         * platform/mac/CursorMac.mm:
3242         (WebCore::Cursor::ensurePlatformCursor): Use BusyButClickable cursor for wait
3243         as well as for Progress.
3244
3245 2011-08-26  Nate Chapin  <japhet@chromium.org>
3246
3247         Fix gtk build after r93886.
3248
3249         * platform/track/CueParser.cpp:
3250         (WebCore::CueParser::load):
3251
3252 2011-08-26  Raphael Kubo da Costa  <kubo@profusion.mobi>
3253
3254         [EFL] Update searchableIndexIntroduction() to match GTK+'s.
3255         https://bugs.webkit.org/show_bug.cgi?id=66885
3256
3257         Reviewed by Gustavo Noronha Silva.
3258
3259         Using this new string allows us to share the test expectations with
3260         other ports, and thus makes
3261         fast/replaced/table-percent-height-text-controls.html pass.
3262
3263         No new tests, as this is covered by an existing one.
3264
3265         * platform/efl/LocalizedStringsEfl.cpp:
3266         (WebCore::searchableIndexIntroduction):
3267
3268 2011-08-26  Raphael Kubo da Costa  <kubo@profusion.mobi>
3269
3270         [EFL] Do not log an error if a fallback cursor cannot be found.
3271         https://bugs.webkit.org/show_bug.cgi?id=67037
3272
3273         Reviewed by Gustavo Noronha Silva.
3274
3275         Ecore_X does not necessarily have to be used (DumpRenderTree does not
3276         use it, for example), so showing an error message here is bogus.
3277
3278         No new tests, as it just removes erroneous error messages from
3279         when running DRT with existing tests.
3280
3281         * platform/efl/WidgetEfl.cpp:
3282         (WebCore::Widget::applyFallbackCursor):
3283
3284 2011-08-26  Nate Chapin  <japhet@chromium.org>
3285
3286         Change a bunch of nondescript bools to
3287         descriptive enums in ResourceLoaderOptions and
3288         ThreadableLoaderOptions.
3289         https://bugs.webkit.org/show_bug.cgi?id=66984
3290
3291         Reviewed by David Levin.
3292
3293         No new tests, no functionality change intended.
3294
3295         * WebCore.exp.in:
3296         * fileapi/FileReaderLoader.cpp:
3297         * html/MediaDocument.cpp:
3298         * html/PluginDocument.cpp:
3299         * loader/CrossOriginAccessControl.cpp:
3300         * loader/CrossOriginAccessControl.h:
3301         * loader/CrossOriginPreflightResultCache.cpp:
3302         * loader/CrossOriginPreflightResultCache.h:
3303         * loader/DocumentThreadableLoader.cpp:
3304         * loader/FrameLoader.h:
3305         * loader/ImageLoader.cpp:
3306         * loader/MainResourceLoader.cpp:
3307         * loader/NetscapePlugInStreamLoader.cpp:
3308         * loader/ResourceLoadScheduler.h:
3309         * loader/ResourceLoader.cpp:
3310         * loader/ResourceLoader.h:
3311         * loader/ResourceLoaderOptions.h:
3312         * loader/ThreadableLoader.h:
3313         * loader/cache/CachedResource.cpp:
3314         * loader/cache/CachedResourceRequest.cpp:
3315         * loader/cf/ResourceLoaderCFNet.cpp:
3316         * loader/mac/ResourceLoaderMac.mm:
3317         * page/EventSource.cpp:
3318         * platform/network/ResourceHandle.h:
3319         * workers/WorkerScriptLoader.cpp:
3320         * xml/XMLHttpRequest.cpp:
3321
3322 2011-08-26  Andreas Kling  <kling@webkit.org>
3323
3324         HTMLMetaElement: Don't cache "http-equiv" and "content" attributes.
3325         https://bugs.webkit.org/show_bug.cgi?id=67040
3326
3327         Reviewed by Darin Adler.
3328
3329         * html/HTMLMetaElement.h: Remove m_equiv and m_content members,
3330         shrinking HTMLMetaElement by 16 bytes (on 64-bit.)
3331         * html/HTMLMetaElement.cpp:
3332         (WebCore::HTMLMetaElement::parseMappedAttribute):
3333         (WebCore::HTMLMetaElement::process): Implemented using fastGetAttribute().
3334
3335 2011-08-26  Pavel Feldman  <pfeldman@google.com>
3336
3337         Web Inspector: [REGRESSION] No way to expand hovered objects while debugging.
3338         https://bugs.webkit.org/show_bug.cgi?id=67039
3339
3340         Reviewed by Yury Semikhatsky.
3341
3342         * inspector/front-end/Popover.js:
3343         (WebInspector.Popover):
3344         (WebInspector.Popover.prototype.show):
3345         (WebInspector.PopoverHelper.prototype._mouseDown):
3346         (WebInspector.PopoverHelper.prototype._hidePopover):
3347         (WebInspector.PopoverHelper.prototype._mouseHover):
3348         (WebInspector.PopoverHelper.prototype._killHidePopoverTimer):
3349
3350 2011-08-26  Pavel Podivilov  <podivilov@chromium.org>
3351
3352         Unreviewed, rolling out r93870.
3353         http://trac.webkit.org/changeset/93870
3354         https://bugs.webkit.org/show_bug.cgi?id=65203
3355
3356         Broke i18n chromium tests
3357
3358         * platform/graphics/chromium/FontChromiumWin.cpp:
3359         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter):
3360         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init):
3361         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
3362         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
3363         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
3364         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter):
3365         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
3366         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc):
3367         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter):
3368         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter):
3369         (WebCore::drawGlyphsWin):
3370         (WebCore::Font::drawComplexText):
3371         * platform/graphics/chromium/UniscribeHelper.cpp:
3372         (WebCore::UniscribeHelper::draw):
3373         * platform/graphics/skia/PlatformContextSkia.cpp:
3374         (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed):
3375         * platform/graphics/skia/PlatformContextSkia.h:
3376         * platform/graphics/skia/SkiaFontWin.cpp:
3377         (WebCore::windowsCanHandleDrawTextShadow):
3378         (WebCore::windowsCanHandleTextDrawing):
3379         (WebCore::windowsCanHandleTextDrawingWithoutShadow):
3380         * platform/graphics/skia/SkiaFontWin.h:
3381
3382 2011-08-26  Alexei Svitkine  <asvitkine@chromium.org>
3383
3384         Chromium Mac: Use a custom pattern image for rubber banding overhang area
3385         https://bugs.webkit.org/show_bug.cgi?id=66707
3386
3387         Also roll Chromium revision to 98101, to include dependency: http://codereview.chromium.org/7714036/
3388
3389         Reviewed by Dimitri Glazkov.
3390
3391         No new tests since its just changing the Chromium-specific overhang pattern.
3392
3393         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3394         (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
3395         (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas):
3396
3397 2011-08-26  Eric Carlson  <eric.carlson@apple.com>
3398
3399         <video> playlist can not advance when playing in background tab
3400         https://bugs.webkit.org/show_bug.cgi?id=66978
3401
3402         Reviewed by Darin Adler.
3403
3404         No new tests added because it isn't possible to simulate a background tab in DRT.
3405
3406         * html/HTMLMediaElement.cpp:
3407         (WebCore::HTMLMediaElement::HTMLMediaElement): Set RequirePageConsentToLoadMedia restriction.
3408         (WebCore::HTMLMediaElement::loadInternal): Don't consider page->canStartMedia if it has ever
3409             allowed a file to load.
3410         * html/HTMLMediaElement.h:
3411         (WebCore::HTMLMediaElement::requirePageConsentToLoadMedia): New.
3412         (WebCore::HTMLMediaElement::removeBehaviorRestriction): New.
3413
3414 2011-08-26  Andreas Kling  <kling@webkit.org>
3415
3416         [Qt] Path::boundingRect() is unnecessarily slow.
3417         https://bugs.webkit.org/show_bug.cgi?id=66854
3418
3419         Reviewed by Benjamin Poulain.
3420
3421         * html/canvas/CanvasRenderingContext2D.cpp:
3422         (WebCore::CanvasRenderingContext2D::stroke): Remove Qt-specific optimization
3423         since calling Path::boundingRect() will now do exactly the same thing.
3424         * platform/graphics/qt/PathQt.cpp:
3425         (WebCore::Path::boundingRect): Return QPainterPath::controlPointRect() since
3426         that is much faster than computing the (precise) QPainterPath::boundingRect()
3427         and Path::boundingRect() is not expected to be 100% precise anyway.
3428
3429 2011-08-26  Gavin Peters  <gavinp@chromium.org>
3430
3431         add a state enumeration to track down cause of null CachedScript execution
3432         https://bugs.webkit.org/show_bug.cgi?id=66939
3433
3434         Reviewed by Alexey Proskuryakov.
3435
3436         Over in http://code.google.com/p/chromium/issues/detail?id=75604 I
3437         have a bug I cannot reproduce.  I added an earlier crash in
3438         https://bugs.webkit.org/show_bug.cgi?id=65563 , and we've since
3439         gotten many good stacks, all coming in through a failed request that
3440         eventually calls notifyFinished() on a ScriptElement with a NULL
3441         m_cachedScript.
3442
3443         I'd like to know how this got NULL.  This enumeration should let
3444         me find that in stack dumps from reproductions.
3445
3446         No new tests, as my goal here is to get telemetry on a bug that I cannot reproduce.
3447
3448         * dom/ScriptElement.cpp:
3449         (WebCore::ScriptElement::ScriptElement):