Fix XSS auditor bypass when inline handlers contain comments.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-09-13  Tom Sepez  <tsepez@chromium.org>
2
3         Fix XSS auditor bypass when inline handlers contain comments.
4         https://bugs.webkit.org/show_bug.cgi?id=27895
5
6         Reviewed by Adam Barth.
7
8         Tests: http/tests/security/xssAuditor/property-escape-comment.html
9                http/tests/security/xssAuditor/property-escape-entity.html
10                http/tests/security/xssAuditor/property-escape-quote.html
11
12         * html/parser/XSSAuditor.cpp:
13         (WebCore::XSSAuditor::snippetForAttribute):
14
15 2011-09-13  Kentaro Hara  <haraken@google.com>
16
17         Implement a HashChangeEvent constructor for V8
18         https://bugs.webkit.org/show_bug.cgi?id=67969
19
20         Reviewed by Nate Chapin.
21
22         Test: fast/events/constructors/hash-change-event-constructor.html
23
24         * bindings/v8/custom/V8EventConstructors.cpp: Added the HashChangeEvent constructor.
25         * dom/HashChangeEvent.idl: Added a 'V8CustomConstructor' attribute.
26
27 2011-09-13  Jeremy Apthorp  <jeremya@google.com>
28
29         Fix crash when an iframe element is removed during a transition to
30         fullscreen.
31         https://bugs.webkit.org/show_bug.cgi?id=67960
32
33         Reviewed by Adam Barth.
34
35         Test: fullscreen/full-screen-remove-ancestor-during-transition.html
36
37         * dom/Document.cpp:
38         (WebCore::Document::~Document):
39         Clear the list of elements to which we need to send a fullscreenchange
40         event.
41
42 2011-09-13  David Hyatt  <hyatt@apple.com>
43
44         https://bugs.webkit.org/show_bug.cgi?id=68040
45         
46         Make sure border image sub-properties can be specified in any order.
47
48         Reviewed by Beth Dakin.
49
50         New tests in fast/borders.
51
52         * css/CSSParser.cpp:
53         (WebCore::BorderImageParseContext::BorderImageParseContext):
54         (WebCore::BorderImageParseContext::canAdvance):
55         (WebCore::BorderImageParseContext::setCanAdvance):
56         (WebCore::BorderImageParseContext::allowCommit):
57         (WebCore::BorderImageParseContext::allowImage):
58         (WebCore::BorderImageParseContext::allowImageSlice):
59         (WebCore::BorderImageParseContext::allowSlash):
60         (WebCore::BorderImageParseContext::requireWidth):
61         (WebCore::BorderImageParseContext::requireOutset):
62         (WebCore::BorderImageParseContext::commitImage):
63         (WebCore::BorderImageParseContext::commitImageSlice):
64         (WebCore::BorderImageParseContext::commitSlash):
65         (WebCore::BorderImageParseContext::commitBorderWidth):
66         (WebCore::BorderImageParseContext::commitBorderOutset):
67         (WebCore::BorderImageParseContext::commitRepeat):
68         (WebCore::CSSParser::parseBorderImage):
69         (WebCore::CSSParser::parseBorderImageRepeat):
70         (WebCore::CSSParser::parseBorderImageSlice):
71         (WebCore::CSSParser::parseBorderImageQuad):
72         * css/CSSParserValues.h:
73         (WebCore::CSSParserValueList::previous):
74
75 2011-09-13  Jeff Miller  <jeffm@apple.com>
76
77         WebCore::Cursor::ensurePlatformCursor() should always set a valid platform cursor on Windows
78         https://bugs.webkit.org/show_bug.cgi?id=68043
79         
80         Make sure we set a valid platform cursor in the Cursor::NoDrop case, and add a default
81         clause that uses the arrow cursor in case another cursor type is added in the future
82         and we forget to update ensurePlatformCursor().
83
84         Reviewed by Anders Carlsson.
85
86         * platform/win/CursorWin.cpp:
87         (WebCore::Cursor::ensurePlatformCursor): Always set a valid platform cursor.
88
89 2011-09-12  Jon Honeycutt  <jhoneycutt@apple.com>
90
91         MSAA: WebKit reports the document state as disabled
92         https://bugs.webkit.org/show_bug.cgi?id=67974
93         <rdar://problem/10095898>
94
95         Reviewed by Brian Weinstein.
96
97         Test: platform/win/accessibility/document-enabled-state.html
98
99         * accessibility/AccessibilityScrollView.h:
100         (WebCore::AccessibilityScrollView::isEnabled):
101         This object backs the AccessibleDocument on Windows - always return
102         true for its enabled state.
103
104 2011-08-11  Cris Neckar  <cdn@chromium.org>
105
106         Fixes several bugs when adding CounterNodes to a tree which can cause asymetrical relationships.
107         https://bugs.webkit.org/show_bug.cgi?id=65996
108
109         Reviewed by Eric Seidel.
110
111         Test: fast/css/counters/counter-reparent-table-children-crash.html
112
113         * rendering/CounterNode.cpp:
114         (WebCore::CounterNode::insertAfter):
115         * rendering/RenderCounter.cpp:
116         (WebCore::findPlaceForCounter):
117         (WebCore::makeCounterNode):
118
119 2011-09-13  Beth Dakin  <bdakin@apple.com>
120
121         Adding a comment I forgot to add before.
122
123         * rendering/RenderImage.cpp:
124         (WebCore::RenderImage::imageSizeForError):
125
126 2011-09-13  Antti Koivisto  <antti@apple.com>
127
128         Move identifier filter from CSSStyleSelector to SelectorChecker
129         https://bugs.webkit.org/show_bug.cgi?id=68025
130
131         Reviewed by Sam Weinig.
132
133         This is a more logical place for this code. It also makes CSSStyleSelector slightly less bloated. 
134         It will make it possible to use fastRejectSelector for querySelectorAll in the future.
135
136         * css/CSSStyleSelector.cpp:
137         (WebCore::loadViewSourceStyle):
138         (WebCore::CSSStyleSelector::matchRulesForList):
139         (WebCore::RuleData::RuleData):
140         * css/CSSStyleSelector.h:
141         (WebCore::CSSStyleSelector::pushParent):
142         (WebCore::CSSStyleSelector::popParent):
143         * css/SelectorChecker.cpp:
144         (WebCore::collectElementIdentifierHashes):
145         (WebCore::SelectorChecker::pushParentStackFrame):
146         (WebCore::SelectorChecker::popParentStackFrame):
147         (WebCore::SelectorChecker::pushParent):
148         (WebCore::SelectorChecker::popParent):
149         (WebCore::collectDescendantSelectorIdentifierHashes):
150         (WebCore::SelectorChecker::collectIdentifierHashes):
151         * css/SelectorChecker.h:
152         (WebCore::SelectorChecker::parentStackIsConsistent):
153         (WebCore::SelectorChecker::ParentStackFrame::ParentStackFrame):
154         (WebCore::SelectorChecker::fastRejectSelector):
155
156 2011-09-13  Kiyoto Tamura  <owenestea@gmail.com>
157
158         For compatibility, execCommand should support deprecated 'useCSS' alias for 'styleWithCSS'
159         https://bugs.webkit.org/show_bug.cgi?id=36683
160
161         Reviewed by Ryosuke Niwa.
162
163         In addition to supporting the deprecated 'useCSS', 'styleWithCSS' now accepts any argument other than
164         the boolean false or the case-insensitive string "false". This is per
165         http://aryeh.name/spec/editing/editing.html#the-stylewithcss-command
166
167         Tests: editing/execCommand/style-with-css.html
168                editing/execCommand/use-css.html
169
170         * editing/EditorCommand.cpp:
171         (WebCore::executeStyleWithCSS):
172         (WebCore::executeUseCSS):
173         (WebCore::createCommandMap):
174
175 2011-09-13  Anders Carlsson  <andersca@apple.com>
176
177         Disable C++ exceptions when building with clang
178         https://bugs.webkit.org/show_bug.cgi?id=68031
179         <rdar://problem/9556880>
180
181         Reviewed by Mark Rowe.
182
183         * Configurations/Base.xcconfig:
184
185 2011-09-13  Beth Dakin  <bdakin@apple.com>
186
187         https://bugs.webkit.org/show_bug.cgi?id=67885
188         Outline for the high-resolution broken image icon draws at 2x
189         -and corresponding-
190         <rdar://problem/10104637>
191
192         Reviewed by Dan Bernstein.
193
194         Scaled the image size to account for the deviceScaleFactor. 
195         * rendering/RenderImage.cpp:
196         (WebCore::RenderImage::imageSizeForError):
197
198 2011-09-13  Tim Horton  <timothy_horton@apple.com>
199
200         REGRESSION (64275): Shape pattern-image fill turns black
201         https://bugs.webkit.org/show_bug.cgi?id=51061
202         <rdar://problem/8504705>
203
204         Reviewed by Simon Fraser.
205
206         When destroying a resource, register clients who are losing their
207         resource as having pending resources, so they can be resolved in the case a
208         resource with that id is re-registered.
209
210         Test: svg/custom/pending-resource-after-removal.xhtml
211
212         * rendering/svg/SVGResourcesCache.cpp:
213         (WebCore::SVGResourcesCache::resourceDestroyed):
214         * svg/SVGStyledElement.h:
215         (WebCore::toSVGStyledElement): Added.
216
217 2011-09-13  Eric Seidel  <eric@webkit.org>
218
219         Remove ENABLE_SVG_FOREIGN_OBJECT as it is a required part of HTML5
220         https://bugs.webkit.org/show_bug.cgi?id=68018
221
222         Reviewed by Ryosuke Niwa.
223
224         * Configurations/FeatureDefines.xcconfig:
225         * DerivedSources.make:
226         * GNUmakefile.am:
227         * WebCore.exp.in:
228         * dom/DOMImplementation.cpp:
229         (WebCore::isSVG10Feature):
230         (WebCore::isSVG11Feature):
231         * dom/Text.cpp:
232         (WebCore::Text::createRenderer):
233         * features.pri:
234         * page/DOMWindow.idl:
235         * rendering/svg/RenderSVGForeignObject.cpp:
236         * rendering/svg/RenderSVGForeignObject.h:
237         * svg/SVGAnimateMotionElement.cpp:
238         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
239         * svg/SVGForeignObjectElement.cpp:
240         * svg/SVGForeignObjectElement.h:
241         * svg/SVGForeignObjectElement.idl:
242         * svg/SVGLocatable.cpp:
243         (WebCore::isViewportElement):
244         * svg/SVGSVGElement.cpp:
245         (WebCore::SVGSVGElement::isOutermostSVG):
246         * svg/SVGUseElement.cpp:
247         (WebCore::isDisallowedElement):
248         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
249         * svg/svgtags.in:
250
251 2011-09-13  Joseph Pecoraro  <joepeck@webkit.org>
252
253         CRASH under WebCore::ArchiveResourceCollection::addAllResources loading WebArchive
254         https://bugs.webkit.org/show_bug.cgi?id=67983
255
256         Reviewed by Darin Adler.
257
258         Null mimetypes are okay for subresources, but as previously discovered
259         in bug 41082 they were required for main resources. Here we ensure
260         that they are required for main resources, but we allow null mimetypes
261         for subresources.
262
263         To fix a crash for bad input we never add a null ArchiveResource to the
264         Archive's subresource collection. It is useless and causes crashes whenever
265         someone iterates the Archive's subresource collection.
266
267         Test: webarchive/loading/test-loading-archive-subresource-null-mimetype.html
268
269         * loader/archive/cf/LegacyWebArchive.cpp:
270         (WebCore::LegacyWebArchive::createResource):
271         Allow a null mimetype, just type check from the dictionary.
272
273         (WebCore::LegacyWebArchive::extract):
274         Require a mimetype for the main resource. Do not add null
275         subresources to the subresource list.
276
277 2011-09-13  Mihai Parparita  <mihaip@chromium.org>
278
279         [Chromium] Remove javascript_engine from WebCore.gyp
280         https://bugs.webkit.org/show_bug.cgi?id=68001
281
282         Reviewed by Tony Chang.
283
284         Remove javascript_engine GYP variable (similar to the removal done on
285         the Chromium side with http://crrev.com/100692)
286
287         * WebCore.gyp/WebCore.gyp:
288
289 2011-09-12  Ryosuke Niwa  <rniwa@webkit.org>
290
291         [CSS3 Backgrounds and Borders] Add unprefixed border-image shorthand.
292         https://bugs.webkit.org/show_bug.cgi?id=67970
293
294         Reviewed by David Hyatt.
295
296         Also update CSSStyleSelector.cpp to support border-image to suppress assertion in
297         fast/borders/border-image-omit-right-slice.html
298
299         * css/CSSStyleSelector.cpp:
300         (WebCore::CSSStyleSelector::applyProperty):
301         (WebCore::CSSStyleSelector::mapNinePieceImage):
302
303 2011-09-13  Xianzhu Wang  <wangxianzhu@chromium.org>
304
305         Reviewed by Darin Adler.
306
307         Webkit wraps between hyphen-minus and numeric characters 
308         https://bugs.webkit.org/show_bug.cgi?id=20677
309
310         Disallow wrapping between a hyphen-minus and a digit if the hyphen-minus
311         is not directly after a digit or a letter.
312
313         Test: fast/text/line-breaks-after-hyphen-before-number.html
314
315         * rendering/break_lines.cpp:
316         (WebCore::asciiLineBreakTable): Disabled line-breaking after '-' and before '.', '0'-'9'. Note: the change for '0'-'9' doesn't really matter because the case is handled hard-coded in shouldBreakAfter().
317         (WebCore::shouldBreakAfter): Changed line-breaking behavior after '-'.
318         (WebCore::nextBreakablePosition): Passes lastLastCh to shouldBreakAfter. 
319
320 2011-09-13  Erik Wright  <erikwright@chromium.org>
321
322         platform/graphics/gtk/FontGtk.cpp was renamed to platform/graphics/pango/FontPango.cpp . Reflect this change in WebCore.gypi to fix a Chromium build breakage.
323         https://bugs.webkit.org/show_bug.cgi?id=68000
324
325         Reviewed by Tony Gentilcore.
326
327         No change in functionality, thus no new tests.
328
329         * WebCore.gypi:
330
331 2011-09-10  Mikhail Naganov  <mnaganov@chromium.org>
332
333         Web Inspector: Profiler: Fix overlapping data in function names column.
334         https://bugs.webkit.org/show_bug.cgi?id=67896
335
336         Reviewed by Pavel Feldman.
337
338         * inspector/front-end/ProfileDataGridTree.js:
339         (WebInspector.ProfileDataGridNode.prototype.createCell):
340         * inspector/front-end/dataGrid.css:
341         (.data-grid table.data):
342         (.data-grid td):
343
344 2011-09-13  Sheriff Bot  <webkit.review.bot@gmail.com>
345
346         Unreviewed, rolling out r95025.
347         http://trac.webkit.org/changeset/95025
348         https://bugs.webkit.org/show_bug.cgi?id=68005
349
350         Test failed on Snow Leopard bots. (Requested by yutak_home on
351         #webkit).
352
353         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
354         (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
355         (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol):
356         (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol):
357         * websockets/ThreadableWebSocketChannelClientWrapper.h:
358
359 2011-09-13  Yuta Kitamura  <yutak@chromium.org>
360
361         ThreadableWebSocketChannelClientWrapper shouldn't have a String in it.
362         https://bugs.webkit.org/show_bug.cgi?id=67908
363
364         Reviewed by David Levin.
365
366         Replace a String member variable in ThreadableWebSocketChannelClientWrapper with Vector<UChar>.
367
368         No change in functionality, thus no new tests. WebSocket worker tests
369         (tests under http/tests/websocket/tests/{hixie76,hybi}/workers/) should keep passing.
370
371         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
372         (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
373         (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol):
374         Create a String from Vector<UChar>.
375         (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol):
376         Copy the content of the given String into Vector.
377         * websockets/ThreadableWebSocketChannelClientWrapper.h:
378
379 2011-09-13  Fumitoshi Ukai  <ukai@chromium.org>
380
381         Unreviewed, build fix.
382
383         CSSPropertyBorderImage was added in r94989, but not yet added in
384         WebCore::CSSStyleSelector::applyProperty
385
386         CSSStyleSelector.cpp:2481: warning: enumeration value 'CSSPropertyBorderImage' not handled in switch
387
388         * css/CSSStyleSelector.cpp:
389         (WebCore::CSSStyleSelector::applyProperty):
390
391 2011-09-12  Shinya Kawanaka  <shinyak@google.com>
392
393         Crashes in WebCore::InsertListCommand::unlistifyParagraph.
394         https://bugs.webkit.org/show_bug.cgi?id=67918
395
396         Reviewed by Ryosuke Niwa.
397
398         execCommand("InsertUnorderedList") was crashing if the parent node of the target is
399         a kind of list element and it is not contenteditable.
400         This patch checks the parent node is contenteditable.
401
402         Test: editing/execCommand/insert-list-in-noneditable-list-parent.html
403
404         * editing/htmlediting.cpp:
405         (WebCore::enclosingListChild): Checks the parent node is contenteditable.
406
407 2011-09-12  Sheriff Bot  <webkit.review.bot@gmail.com>
408
409         Unreviewed, rolling out r94975.
410         http://trac.webkit.org/changeset/94975
411         https://bugs.webkit.org/show_bug.cgi?id=67984
412
413         crash in PrerenderBrowserTest.PrerenderHTML5VideoJs (Requested
414         by ukai on #webkit).
415
416         * platform/graphics/chromium/CanvasLayerChromium.h:
417         (WebCore::CanvasLayerChromium::layerTypeAsString):
418         * platform/graphics/chromium/ContentLayerChromium.h:
419         (WebCore::ContentLayerChromium::layerTypeAsString):
420         * platform/graphics/chromium/ImageLayerChromium.h:
421         (WebCore::ImageLayerChromium::layerTypeAsString):
422         * platform/graphics/chromium/LayerChromium.cpp:
423         (WebCore::LayerChromium::layerTreeAsText):
424         (WebCore::writeIndent):
425         (WebCore::LayerChromium::dumpLayer):
426         (WebCore::LayerChromium::dumpLayerProperties):
427         * platform/graphics/chromium/LayerChromium.h:
428         (WebCore::LayerChromium::layerTypeAsString):
429         * platform/graphics/chromium/LayerRendererChromium.cpp:
430         (WebCore::LayerRendererChromium::textureMemoryReclaimLimit):
431         (WebCore::LayerRendererChromium::create):
432         (WebCore::LayerRendererChromium::LayerRendererChromium):
433         (WebCore::LayerRendererChromium::close):
434         (WebCore::LayerRendererChromium::releaseTextures):
435         (WebCore::LayerRendererChromium::drawLayers):
436         (WebCore::LayerRendererChromium::drawLayersInternal):
437         (WebCore::LayerRendererChromium::getOffscreenLayerTexture):
438         (WebCore::LayerRendererChromium::initializeSharedObjects):
439         (WebCore::LayerRendererChromium::cleanupSharedObjects):
440         (WebCore::LayerRendererChromium::layerTreeAsText):
441         (WebCore::LayerRendererChromium::dumpRenderSurfaces):
442         * platform/graphics/chromium/LayerRendererChromium.h:
443         (WebCore::LayerRendererChromium::owner):
444         (WebCore::LayerRendererChromium::rootLayer):
445         (WebCore::LayerRendererChromium::rootLayerImpl):
446         (WebCore::LayerRendererChromium::viewportSize):
447         (WebCore::LayerRendererChromium::contentsTextureManager):
448         * platform/graphics/chromium/ManagedTexture.cpp:
449         (WebCore::ManagedTexture::bindTexture):
450         (WebCore::ManagedTexture::framebufferTexture2D):
451         * platform/graphics/chromium/PluginLayerChromium.h:
452         (WebCore::PluginLayerChromium::layerTypeAsString):
453         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
454         (WebCore::RenderSurfaceChromium::name):
455         (WebCore::writeIndent):
456         (WebCore::RenderSurfaceChromium::dumpSurface):
457         * platform/graphics/chromium/RenderSurfaceChromium.h:
458         * platform/graphics/chromium/TextureManager.cpp:
459         (WebCore::TextureManager::deleteEvictedTextures):
460         (WebCore::TextureManager::removeTexture):
461         (WebCore::TextureManager::allocateTexture):
462         (WebCore::TextureManager::requestTexture):
463         * platform/graphics/chromium/TextureManager.h:
464         (WebCore::TextureManager::setAssociatedContextDebugOnly):
465         (WebCore::TextureManager::associatedContextDebugOnly):
466         * platform/graphics/chromium/TiledLayerChromium.cpp:
467         (WebCore::writeIndent):
468         (WebCore::TiledLayerChromium::dumpLayerProperties):
469         * platform/graphics/chromium/TiledLayerChromium.h:
470         * platform/graphics/chromium/VideoLayerChromium.h:
471         (WebCore::VideoLayerChromium::layerTypeAsString):
472         * platform/graphics/chromium/WebGLLayerChromium.h:
473         (WebCore::WebGLLayerChromium::layerTypeAsString):
474         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
475         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
476         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
477         * platform/graphics/chromium/cc/CCLayerImpl.h:
478         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
479         (WebCore::CCLayerTreeHost::initialize):
480         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
481         (WebCore::CCLayerTreeHost::commitTo):
482         (WebCore::CCLayerTreeHost::didRecreateGraphicsContext):
483         (WebCore::CCLayerTreeHost::setVisible):
484         (WebCore::CCLayerTreeHost::contentsTextureManager):
485         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
486         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
487         (WebCore::CCLayerTreeHostImpl::drawLayers):
488         (WebCore::CCLayerTreeHostImpl::setVisible):
489         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
490         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
491         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
492         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
493         * platform/graphics/chromium/cc/CCProxy.h:
494         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
495         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
496         (WebCore::CCSingleThreadProxy::stop):
497         (WebCore::CCSingleThreadProxy::contentsTextureManager):
498         (WebCore::CCSingleThreadProxy::recreateContextIfNeeded):
499         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
500         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
501         (WebCore::CCThreadProxy::initializeLayerRenderer):
502         (WebCore::CCThreadProxy::contentsTextureManager):
503         (WebCore::CCThreadProxy::initializeLayerRendererOnCCThread):
504         (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread):
505         * platform/graphics/chromium/cc/CCThreadProxy.h:
506         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
507         (WebCore::CCTiledLayerImpl::dumpLayerProperties):
508         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
509         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
510         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
511
512 2011-09-12  Joseph Pecoraro  <joepeck@webkit.org>
513
514         Possible ASSERT(!storageTracker) in Lazily Initialized StorageTracker
515         https://bugs.webkit.org/show_bug.cgi?id=67957
516
517         Reviewed by Darin Adler.
518
519         The storageTracker singleton may already have been created
520         through StorageTracker::tracker before initializeTracker
521         gets called. Update the ASSERT in this case to check that
522         there is no client for the tracker.
523
524         No test, this depends on how the port initializes the tracker.
525
526         * storage/StorageTracker.cpp:
527         (WebCore::StorageTracker::initializeTracker):
528
529 2011-09-12  Adam Klein  <adamk@chromium.org>
530
531         Fix out-of-bounds access in Gradient::sortStopsIfNecessary
532         https://bugs.webkit.org/show_bug.cgi?id=67958
533
534         Reviewed by Darin Adler.
535
536         Reported by Valgrind in http://crbug.com/77049.
537
538         The errant code was added as an optimization in r67804.
539         This patch reverts that one, as all parties agree that the optimization
540         doesn't seem worthwhile, and there clearly aren't any tests covering
541         the special case.
542
543         No new tests, as existing tests should cover the remaining call to
544         |std::stable_sort|.
545
546         * platform/graphics/Gradient.cpp:
547         (WebCore::Gradient::sortStopsIfNecessary):
548
549 2011-09-12  Jacky Jiang  <zhajiang@rim.com>
550
551         Setting document.title doesn't affect contents of title tag of XHTML documents
552         https://bugs.webkit.org/show_bug.cgi?id=57537
553
554         Reviewed by Alexey Proskuryakov.
555
556         Update the contents of the <title> tag of XHTML documents when setting
557         document.title.
558
559         Test: fast/dom/title-content-set-innerText-get.xhtml
560
561         * dom/Document.cpp:
562         (WebCore::Document::setTitle):
563
564 2011-09-12  Raphael Kubo da Costa  <kubo@profusion.mobi>
565
566         [EFL] Initialize m_unmodifiedText in PlatformKeyboardEventEfl.
567         https://bugs.webkit.org/show_bug.cgi?id=67038
568
569         Reviewed by Kenneth Rohde Christiansen.
570
571         Since most of the time it will return the same thing as text(), we
572         initialize it the same way we initialize m_text. The other case (what
573         would have been generated if no modifiers were pressed) should be
574         covered by this as well.
575
576         As this method is used when handling access keys, tests such as
577         fast/events/access-key-self-destruct.html should now pass.
578
579         No new tests, as this fixes a problem uncovered by the existing ones.
580
581         * platform/efl/PlatformKeyboardEventEfl.cpp:
582         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
583
584 2011-09-12  Hyowon Kim  <hw1008.kim@samsung.com>
585
586         Reviewed by Eric Seidel.
587
588         [EFL] Add GraphicsContext3DEfl for WebGL and accelerated compositing
589         https://bugs.webkit.org/show_bug.cgi?id=62709
590
591         Add GraphicsContext3D implementation for EFL port.
592         GraphicsContext3D delegates to GraphicsContext3DInternal.
593
594         * platform/graphics/efl/GraphicsContext3DEfl.cpp: Added.
595         (WebCore::GraphicsContext3D::create):
596         (WebCore::GraphicsContext3D::GraphicsContext3D):
597         (WebCore::GraphicsContext3D::~GraphicsContext3D):
598         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
599         (WebCore::GraphicsContext3D::platformLayer):
600         (WebCore::GraphicsContext3D::makeContextCurrent):
601         (WebCore::GraphicsContext3D::isGLES2Compliant):
602         (WebCore::GraphicsContext3D::activeTexture):
603         (WebCore::GraphicsContext3D::attachShader):
604         (WebCore::GraphicsContext3D::bindAttribLocation):
605         (WebCore::GraphicsContext3D::bindBuffer):
606         (WebCore::GraphicsContext3D::bindFramebuffer):
607         (WebCore::GraphicsContext3D::bindRenderbuffer):
608         (WebCore::GraphicsContext3D::bindTexture):
609         (WebCore::GraphicsContext3D::blendColor):
610         (WebCore::GraphicsContext3D::blendEquation):
611         (WebCore::GraphicsContext3D::blendEquationSeparate):
612         (WebCore::GraphicsContext3D::blendFunc):
613         (WebCore::GraphicsContext3D::blendFuncSeparate):
614         (WebCore::GraphicsContext3D::bufferData):
615         (WebCore::GraphicsContext3D::bufferSubData):
616         (WebCore::GraphicsContext3D::checkFramebufferStatus):
617         (WebCore::GraphicsContext3D::clear):
618         (WebCore::GraphicsContext3D::clearColor):
619         (WebCore::GraphicsContext3D::clearDepth):
620         (WebCore::GraphicsContext3D::clearStencil):
621         (WebCore::GraphicsContext3D::colorMask):
622         (WebCore::GraphicsContext3D::compileShader):
623         (WebCore::GraphicsContext3D::copyTexImage2D):
624         (WebCore::GraphicsContext3D::copyTexSubImage2D):
625         (WebCore::GraphicsContext3D::cullFace):
626         (WebCore::GraphicsContext3D::depthFunc):
627         (WebCore::GraphicsContext3D::depthMask):
628         (WebCore::GraphicsContext3D::depthRange):
629         (WebCore::GraphicsContext3D::detachShader):
630         (WebCore::GraphicsContext3D::disable):
631         (WebCore::GraphicsContext3D::disableVertexAttribArray):
632         (WebCore::GraphicsContext3D::drawArrays):
633         (WebCore::GraphicsContext3D::drawElements):
634         (WebCore::GraphicsContext3D::enable):
635         (WebCore::GraphicsContext3D::enableVertexAttribArray):
636         (WebCore::GraphicsContext3D::finish):
637         (WebCore::GraphicsContext3D::flush):
638         (WebCore::GraphicsContext3D::framebufferRenderbuffer):
639         (WebCore::GraphicsContext3D::framebufferTexture2D):
640         (WebCore::GraphicsContext3D::frontFace):
641         (WebCore::GraphicsContext3D::generateMipmap):
642         (WebCore::GraphicsContext3D::getActiveAttrib):
643         (WebCore::GraphicsContext3D::getActiveUniform):
644         (WebCore::GraphicsContext3D::getAttachedShaders):
645         (WebCore::GraphicsContext3D::getAttribLocation):
646         (WebCore::GraphicsContext3D::getBooleanv):
647         (WebCore::GraphicsContext3D::getBufferParameteriv):
648         (WebCore::GraphicsContext3D::getContextAttributes):
649         (WebCore::GraphicsContext3D::getError):
650         (WebCore::GraphicsContext3D::getFloatv):
651         (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
652         (WebCore::GraphicsContext3D::getIntegerv):
653         (WebCore::GraphicsContext3D::getProgramiv):
654         (WebCore::GraphicsContext3D::getProgramInfoLog):
655         (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
656         (WebCore::GraphicsContext3D::getShaderiv):
657         (WebCore::GraphicsContext3D::getShaderInfoLog):
658         (WebCore::GraphicsContext3D::getShaderSource):
659         (WebCore::GraphicsContext3D::getString):
660         (WebCore::GraphicsContext3D::getTexParameterfv):
661         (WebCore::GraphicsContext3D::getTexParameteriv):
662         (WebCore::GraphicsContext3D::getUniformfv):
663         (WebCore::GraphicsContext3D::getUniformiv):
664         (WebCore::GraphicsContext3D::getUniformLocation):
665         (WebCore::GraphicsContext3D::getVertexAttribfv):
666         (WebCore::GraphicsContext3D::getVertexAttribiv):
667         (WebCore::GraphicsContext3D::getVertexAttribOffset):
668         (WebCore::GraphicsContext3D::hint):
669         (WebCore::GraphicsContext3D::isBuffer):
670         (WebCore::GraphicsContext3D::isEnabled):
671         (WebCore::GraphicsContext3D::isFramebuffer):
672         (WebCore::GraphicsContext3D::isProgram):
673         (WebCore::GraphicsContext3D::isRenderbuffer):
674         (WebCore::GraphicsContext3D::isShader):
675         (WebCore::GraphicsContext3D::isTexture):
676         (WebCore::GraphicsContext3D::lineWidth):
677         (WebCore::GraphicsContext3D::linkProgram):
678         (WebCore::GraphicsContext3D::pixelStorei):
679         (WebCore::GraphicsContext3D::polygonOffset):
680         (WebCore::GraphicsContext3D::readPixels):
681         (WebCore::GraphicsContext3D::releaseShaderCompiler):
682         (WebCore::GraphicsContext3D::renderbufferStorage):
683         (WebCore::GraphicsContext3D::sampleCoverage):
684         (WebCore::GraphicsContext3D::scissor):
685         (WebCore::GraphicsContext3D::shaderSource):
686         (WebCore::GraphicsContext3D::stencilFunc):
687         (WebCore::GraphicsContext3D::stencilFuncSeparate):
688         (WebCore::GraphicsContext3D::stencilMask):
689         (WebCore::GraphicsContext3D::stencilMaskSeparate):
690         (WebCore::GraphicsContext3D::stencilOp):
691         (WebCore::GraphicsContext3D::stencilOpSeparate):
692         (WebCore::GraphicsContext3D::texImage2D):
693         (WebCore::GraphicsContext3D::texParameterf):
694         (WebCore::GraphicsContext3D::texParameteri):
695         (WebCore::GraphicsContext3D::texSubImage2D):
696         (WebCore::GraphicsContext3D::uniform1f):
697         (WebCore::GraphicsContext3D::uniform1fv):
698         (WebCore::GraphicsContext3D::uniform1i):
699         (WebCore::GraphicsContext3D::uniform1iv):
700         (WebCore::GraphicsContext3D::uniform2f):
701         (WebCore::GraphicsContext3D::uniform2fv):
702         (WebCore::GraphicsContext3D::uniform2i):
703         (WebCore::GraphicsContext3D::uniform2iv):
704         (WebCore::GraphicsContext3D::uniform3f):
705         (WebCore::GraphicsContext3D::uniform3fv):
706         (WebCore::GraphicsContext3D::uniform3i):
707         (WebCore::GraphicsContext3D::uniform3iv):
708         (WebCore::GraphicsContext3D::uniform4f):
709         (WebCore::GraphicsContext3D::uniform4fv):
710         (WebCore::GraphicsContext3D::uniform4i):
711         (WebCore::GraphicsContext3D::uniform4iv):
712         (WebCore::GraphicsContext3D::uniformMatrix2fv):
713         (WebCore::GraphicsContext3D::uniformMatrix3fv):
714         (WebCore::GraphicsContext3D::uniformMatrix4fv):
715         (WebCore::GraphicsContext3D::useProgram):
716         (WebCore::GraphicsContext3D::validateProgram):
717         (WebCore::GraphicsContext3D::vertexAttrib1f):
718         (WebCore::GraphicsContext3D::vertexAttrib1fv):
719         (WebCore::GraphicsContext3D::vertexAttrib2f):
720         (WebCore::GraphicsContext3D::vertexAttrib2fv):
721         (WebCore::GraphicsContext3D::vertexAttrib3f):
722         (WebCore::GraphicsContext3D::vertexAttrib3fv):
723         (WebCore::GraphicsContext3D::vertexAttrib4f):
724         (WebCore::GraphicsContext3D::vertexAttrib4fv):
725         (WebCore::GraphicsContext3D::vertexAttribPointer):
726         (WebCore::GraphicsContext3D::viewport):
727         (WebCore::GraphicsContext3D::reshape):
728         (WebCore::GraphicsContext3D::markContextChanged):
729         (WebCore::GraphicsContext3D::markLayerComposited):
730         (WebCore::GraphicsContext3D::layerComposited):
731         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
732         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
733         (WebCore::GraphicsContext3D::createBuffer):
734         (WebCore::GraphicsContext3D::createFramebuffer):
735         (WebCore::GraphicsContext3D::createProgram):
736         (WebCore::GraphicsContext3D::createRenderbuffer):
737         (WebCore::GraphicsContext3D::createShader):
738         (WebCore::GraphicsContext3D::createTexture):
739         (WebCore::GraphicsContext3D::deleteBuffer):
740         (WebCore::GraphicsContext3D::deleteFramebuffer):
741         (WebCore::GraphicsContext3D::deleteProgram):
742         (WebCore::GraphicsContext3D::deleteRenderbuffer):
743         (WebCore::GraphicsContext3D::deleteShader):
744         (WebCore::GraphicsContext3D::deleteTexture):
745         (WebCore::GraphicsContext3D::synthesizeGLError):
746         (WebCore::GraphicsContext3D::getExtensions):
747         (WebCore::GraphicsContext3D::getInternalFramebufferSize):
748         (WebCore::GraphicsContext3D::setContextLostCallback):
749         (WebCore::GraphicsContext3D::getImageData):
750
751 2011-09-12  Hyowon Kim  <hw1008.kim@samsung.com>
752
753         Reviewed by Eric Seidel.
754
755         [CMAKE] Remove platform/graphics/opengl/*OpenGL.cpp files in CMakeLists.txt
756         https://bugs.webkit.org/show_bug.cgi?id=62707
757
758         No change in fuctionality so no new tests.
759
760         Bug 62376 makes all ports use GraphicsContext3DOpenGL and
761         Extensions3DOpenGL when enabling WebGL.
762         However, some ports already have their own GC3D implementation.
763         In QT and chromium, for example, GC3D delegates to GC3DInternal.
764         So, it would be better to allow each port to decide whether or not
765         to include files in platform/graphics/opengl. 
766
767         * CMakeLists.txt:
768
769 2011-09-12  Dan Bernstein  <mitz@apple.com>
770
771         <rdar://problem/10054615> Floats in ruby text intrude into the base
772
773         Reviewed by Darin Adler.
774
775         Test: fast/ruby/float-overhang-from-ruby-text.html
776
777         * rendering/RenderRubyText.cpp:
778         (WebCore::RenderRubyText::avoidsFloats): Added. Returns true. This ensures that
779         RenderBlock::clearFloats() will not consider ruby text as having intruding floats.
780         * rendering/RenderRubyText.h:
781
782 2011-09-12  David Hyatt  <hyatt@apple.com>
783
784         https://bugs.webkit.org/show_bug.cgi?id=67970
785
786         Add unprefixed border-image property.
787
788         Reviewed by Beth Dakin.
789
790         * css/CSSComputedStyleDeclaration.cpp:
791         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
792         * css/CSSParser.cpp:
793         (WebCore::CSSParser::parseValue):
794         * css/CSSPropertyNames.in:
795
796 2011-09-12  Ryosuke Niwa  <rniwa@webkit.org>
797
798         REGRESSION: Moving up doesn't work in some cases
799         https://bugs.webkit.org/show_bug.cgi?id=67522
800
801         Reviewed by Eric Seidel.
802
803         The bug was caused by previousLinePosition's attempting to obtain the last root line box using
804         a position at minCaretOffset (which is, in practice, located at the beginning of wrapped lines).
805
806         Fix the bug by calling maxCaretOffset instead. Because isCandidate returns false at (br, 1),
807         use the positionBeforeNode for br elements.
808
809         Test: editing/selection/move-up-into-wrapped-line.html
810
811         * editing/visible_units.cpp:
812         (WebCore::previousLinePosition):
813
814 2011-09-12  David Levin  <levin@chromium.org>
815
816         Make the ThreadSafeRefCounted support in CrossThreadCopier work for T*.
817         https://bugs.webkit.org/show_bug.cgi?id=67947
818
819         Reviewed by Adam Barth.
820
821         The changes are tested by compiling and added compile asserts to do some verification as well.
822
823         * platform/CrossThreadCopier.cpp:
824         Added some compile asserts to verify various match and non-matches for CrossThreadCopier.
825         * platform/CrossThreadCopier.h:
826         Added a typedef to convert T* to T, just like the typedef's to remove RefPtr and PassRefPtr.
827         Added a compile assert to verify that only one of the typedef did anything.
828         (CrossThreadCopierBase<false, true, T>::copy): Remove "get" as it is unnecessary.
829         It shouldn't have been here (PassRefPtr and RefPtr easily and sometimes more efficiently
830         convert to PassRefPtr without get). Also, a raw pointer doesn't have a get() method.
831
832 2011-09-12  Chris Rogers  <crogers@google.com>
833
834         Address lifetime issues in OfflineAudioDestinationNode
835         https://bugs.webkit.org/show_bug.cgi?id=67949
836
837         Reviewed by Kenneth Russell.
838
839         No new tests.  This does not change JavaScript API.
840
841         * webaudio/OfflineAudioDestinationNode.cpp:
842         (WebCore::OfflineAudioDestinationNode::~OfflineAudioDestinationNode):
843         (WebCore::OfflineAudioDestinationNode::render):
844         (WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch):
845
846 2011-09-12  Jeff Timanus  <twiz@chromium.org>
847
848         [chromium]  Prevent a crash when tearing down an ImageBuffer that was not successfully initialized.
849         https://bugs.webkit.org/show_bug.cgi?id=67944
850
851         Reviewed by Stephen White.
852         
853         * platform/graphics/skia/ImageBufferSkia.cpp:
854         (WebCore::ImageBuffer::~ImageBuffer):
855
856 2011-09-12  Michael Saboff  <msaboff@apple.com>
857
858         Update RegExp and related classes to use 8 bit strings when available
859         https://bugs.webkit.org/show_bug.cgi?id=67337
860
861         Updated call to match to use UString& instead of UChar*.
862
863         Reviewed by Gavin Barraclough.
864
865         No new tests, Covered by existing tests.
866
867         * platform/text/RegularExpression.cpp:
868         (WebCore::RegularExpression::match):
869
870 2011-09-12  Beth Dakin  <bdakin@apple.com>
871
872         https://bugs.webkit.org/show_bug.cgi?id=67898
873         REGRESSION(r94900): fast/images/support-broken-image-delegate.html fails on Mac
874
875         Reviewed by Simon Fraser.
876
877         New function willPaintBrokenImage() returns true when there has been an error 
878         loading the image and the broken image icon will be used in its place. This is 
879         necessary since it is possible to have an error loading an image and to NOT use 
880         the broken image icon. 
881         * loader/cache/CachedImage.cpp:
882         (WebCore::CachedImage::willPaintBrokenImage):
883         * loader/cache/CachedImage.h:
884         * rendering/RenderImage.cpp:
885         (WebCore::RenderImage::imageSizeForError):
886
887 2011-09-12  James Robinson  <jamesr@chromium.org>
888
889         [chromium] Move contents texture manager from LayerRendererChromium to CCLayerTreeHost
890         https://bugs.webkit.org/show_bug.cgi?id=67440
891
892         Reviewed by Kenneth Russell.
893
894         This moves the contents TextureManager over to the CCLayerTreeHost, where it belongs, and adds in a commit path
895         to make sure that textures are deleted even if the page is not visible.  This move also removed the need for
896         LayerRendererChromium's CCLayerTreeHost pointer, so I removed that as well.  That meant moving the
897         layerTreeAsText() logic over to the CCLayerImpl side, which is where it really belonged anyway.
898
899         Covered by existing compositing/ tests and
900         platform/chromium/compositor/lost-compositor-context-with-rendersurface.html
901
902         * platform/graphics/chromium/LayerRendererChromium.cpp:
903         (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures):
904         (WebCore::LayerRendererChromium::drawLayers):
905         (WebCore::LayerRendererChromium::initializeSharedObjects):
906         (WebCore::LayerRendererChromium::cleanupSharedObjects):
907         * platform/graphics/chromium/LayerRendererChromium.h:
908         (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes):
909         * platform/graphics/chromium/TextureManager.cpp:
910         (WebCore::TextureManager::highLimitBytes):
911         (WebCore::TextureManager::reclaimLimitBytes):
912         (WebCore::TextureManager::lowLimitBytes):
913         * platform/graphics/chromium/TextureManager.h:
914         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
915         (WebCore::CCLayerTreeHost::initialize):
916         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
917         (WebCore::CCLayerTreeHost::deleteContentsTextures):
918         (WebCore::CCLayerTreeHost::commitTo):
919         (WebCore::CCLayerTreeHost::setVisible):
920         (WebCore::CCLayerTreeHost::contentsTextureManager):
921         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
922         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
923         (WebCore::CCLayerTreeHostImpl::setVisible):
924         * platform/graphics/chromium/cc/CCProxy.h:
925         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
926         (WebCore::CCSingleThreadProxy::setNeedsCommit):
927         (WebCore::CCSingleThreadProxy::stop):
928         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
929         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
930         (WebCore::CCThreadProxy::setNeedsCommit):
931         (WebCore::CCThreadProxy::setNeedsCommitOnCCThread):
932         (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread):
933         * platform/graphics/chromium/cc/CCThreadProxy.h:
934
935 2011-09-12  Chris Rogers  <crogers@google.com>
936
937         DelayNode delay buffer is not correctly wrapping around
938         https://bugs.webkit.org/show_bug.cgi?id=67872
939
940         Reviewed by Kenneth Russell.
941
942         Test: webaudio/delaynode.html
943
944         * webaudio/DelayDSPKernel.cpp:
945         (WebCore::DelayDSPKernel::process):
946
947 2011-09-12  Arko Saha  <arko@motorola.com>
948
949         Selectstart is not fired when selection was created by arrow keys.
950         https://bugs.webkit.org/show_bug.cgi?id=60430
951
952         Reviewed by Ryosuke Niwa.
953
954         Fire selectstart when a user starts extending the selection using arrow key.
955         Fixed by Arko Saha  <arko@motorola.com> and Kaustubh Atrawalkar  <kaustubh@motorola.com>
956
957         Tests: fast/events/selectstart-by-arrow-keys-prevent-default.html
958                fast/events/selectstart-by-arrow-keys.html
959
960         * editing/FrameSelection.cpp:
961         (WebCore::FrameSelection::modify):
962         (WebCore::FrameSelection::shouldChangeSelection):
963         (WebCore::FrameSelection::dispatchSelectStart):
964         * editing/FrameSelection.h:
965
966 2011-09-12  James Robinson  <jamesr@chromium.org>
967
968         [chromium] REGRESSION(94353): Compositor textures and resources leaked when tab closed that is not last tab in the process
969         https://bugs.webkit.org/show_bug.cgi?id=67816
970
971         Reviewed by Kenneth Russell.
972
973         We lack infrastructure to construct an automated test for this today. To test manually, open up a composited
974         page (like the poster circle), duplicate the tab many times, close all the duplicates, and verify that the
975         memory use returns to the single tab level.
976
977         * platform/graphics/chromium/LayerChromium.h:
978         * platform/graphics/chromium/TiledLayerChromium.cpp:
979         (WebCore::TiledLayerChromium::setLayerTreeHost):
980         * platform/graphics/chromium/VideoLayerChromium.cpp:
981         (WebCore::VideoLayerChromium::setLayerTreeHost):
982         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
983         (WebCore::CCLayerTreeHost::clearRenderSurfacesRecursive):
984         (WebCore::CCLayerTreeHost::setRootLayer):
985         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
986
987 2011-09-12  Kentaro Hara  <haraken@google.com>
988
989         Implement a HashChangeEvent constructor for JSC
990         https://bugs.webkit.org/show_bug.cgi?id=67924
991
992         Reviewed by Sam Weinig.
993
994         The spec for the HashChangeEvent constructor is here:
995         http://www.whatwg.org/specs/web-apps/current-work/#hashchangeevent
996
997         Test: fast/events/constructors/hash-change-event-constructor.html
998
999         * bindings/generic/EventConstructors.h: Added a definition for the HashChangeEvent constructor.
1000         * bindings/js/JSEventConstructors.cpp: Added #includes for HashChangeEvent.
1001         * dom/HashChangeEvent.h: Added a definition for HashChangeEventInit.
1002         (WebCore::HashChangeEventInit::HashChangeEventInit):
1003         (WebCore::HashChangeEvent::create):
1004         (WebCore::HashChangeEvent::HashChangeEvent):
1005         * dom/HashChangeEvent.idl: Makes HashChangeEvent constructible.
1006
1007 2011-09-12  Mike Reed  <reed@google.com>
1008
1009         [skia] remove dead code, no functionality change
1010         https://bugs.webkit.org/show_bug.cgi?id=67844
1011
1012         Reviewed by Kenneth Russell.
1013
1014         No new tests. just removing dead-code, existing tests apply
1015
1016         * platform/graphics/chromium/FontChromiumWin.cpp:
1017         (WebCore::Font::drawGlyphs):
1018
1019 2011-09-12  Pavel Feldman  <pfeldman@google.com>
1020
1021         Web Inspector: Runtime.callFunctionOn does not accept arguments that evaluate to false.
1022         https://bugs.webkit.org/show_bug.cgi?id=67934
1023
1024         Reviewed by Tony Gentilcore.
1025
1026         * inspector/InjectedScriptSource.js:
1027
1028 2011-09-12  Pavel Feldman  <pfeldman@google.com>
1029
1030         Web Inspector: event dividers do not update timeline boundaries.
1031         https://bugs.webkit.org/show_bug.cgi?id=67932
1032
1033         * inspector/front-end/NetworkPanel.js:
1034         (WebInspector.NetworkLogView.prototype._onLoadEventFired):
1035         (WebInspector.NetworkLogView.prototype._domContentLoadedEventFired):
1036         (WebInspector.NetworkLogView.prototype.refresh):
1037         (WebInspector.NetworkTimeCalculator.prototype.updateBoundariesForEventTime):
1038
1039 2011-09-12  Kentaro Hara  <haraken@google.com>
1040
1041         Implement a WebKitAnimationEvent constructor for V8
1042         https://bugs.webkit.org/show_bug.cgi?id=67922
1043
1044         Reviewed by Adam Barth.
1045
1046         Test: fast/events/constructors/webkit-animation-event-constructor.html
1047
1048         * bindings/v8/custom/V8EventConstructors.cpp: Added the WebKitAnimationEvent constructor.
1049         * dom/WebKitAnimationEvent.idl: Added a 'V8CustomConstructor' attribute.
1050
1051 2011-09-12  Andreas Kling  <kling@webkit.org>
1052
1053         Shrink CanvasGradient for builds without ENABLE(DASHBOARD_SUPPORT).
1054         https://bugs.webkit.org/show_bug.cgi?id=67916
1055
1056         Reviewed by Kenneth Rohde Christiansen.
1057
1058         * html/canvas/CanvasGradient.cpp:
1059         (WebCore::CanvasGradient::CanvasGradient):
1060         (WebCore::CanvasGradient::addColorStop):
1061         * html/canvas/CanvasGradient.h:
1062
1063 2011-09-12  Shinya Kawanaka  <shinyak@google.com>
1064
1065         Characters beyond U+10000 should be deleted by one pressing delete key.
1066         https://bugs.webkit.org/show_bug.cgi?id=40351
1067
1068         Reviewed by Kent Tamura.
1069
1070         If a character is the trail part of unicode surrogate pair, the lead part of it
1071         should also be deleted. Also, If in MacOSX, the deletion should honor Mac's behavior.
1072
1073         Test: editing/deleting/delete-surrogatepair.html
1074
1075         * rendering/RenderText.cpp:
1076         (WebCore::RenderText::previousOffsetForBackwardDeletion):
1077           Added if-macro to support chromium on mac, and added trail part check for unicode character.
1078
1079 2011-09-11  Kentaro Hara  <haraken@google.com>
1080
1081         Implement a ProgressEvent constructor for V8
1082         https://bugs.webkit.org/show_bug.cgi?id=67800
1083
1084         Reviewed by Sam Weinig.
1085
1086         Test: fast/events/constructors/progress-event-constructor.html
1087
1088         * bindings/js/JSDictionary.cpp:
1089         (WebCore::JSDictionary::convertValue): Replaced UnsignedLongLongMax with std::numeric_limits<unsigned long long>::max().
1090         * bindings/v8/OptionsObject.cpp:
1091         (WebCore::OptionsObject::getKeyValue): Returns an unsigned long long value corresponding to a given key. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long
1092         * bindings/v8/OptionsObject.h:
1093         * bindings/v8/custom/V8EventConstructors.cpp: Added the ProgressEvent constructor.
1094         * dom/ProgressEvent.idl: Added a 'V8CustomConstructor' attribute.
1095
1096 2011-09-11  Dimitri Glazkov  <dglazkov@chromium.org>
1097
1098         REGRESSION (r87351): toggling display of lots (thousands) of elements with display:none is very slow
1099         https://bugs.webkit.org/show_bug.cgi?id=67581
1100
1101         Reviewed by Darin Adler.
1102
1103         Test: perf/show-hide-table-rows.html
1104
1105         * dom/NodeRenderingContext.cpp:
1106         (WebCore::NodeRendererFactory::createRendererAndStyle): Moved style-creating code into createRendererIfNeeded, renamed
1107             to createRenderer.
1108         (WebCore::NodeRendererFactory::createRendererIfNeeded): Re-arrange code to avoid unnecessary creation of renderers.
1109
1110 2011-09-11  Jeremy Moskovich  <jeremy@chromium.org>
1111
1112         [Chromium] Change OOP Font loading code to use CGFont*() APIs.
1113         https://bugs.webkit.org/show_bug.cgi?id=66935
1114
1115         This change is necessary due a bug in ATSFontDeactivate() on 10.7.
1116         See crbug.com/93191 for details.
1117
1118         Reviewed by Eric Seidel.
1119
1120         No new tests - covered by existing tests.
1121
1122         * platform/chromium/PlatformBridge.h:
1123         * platform/graphics/chromium/CrossProcessFontLoading.h:
1124         * platform/graphics/chromium/CrossProcessFontLoading.mm:
1125         (WebCore::MemoryActivatedFont::create):
1126         (WebCore::MemoryActivatedFont::MemoryActivatedFont):
1127         (WebCore::MemoryActivatedFont::~MemoryActivatedFont):
1128
1129 2011-09-09  Oliver Hunt  <oliver@apple.com>
1130
1131         Remove support for anonymous storage from jsobjects
1132         https://bugs.webkit.org/show_bug.cgi?id=67881
1133
1134         Reviewed by Sam Weinig.
1135
1136         Remove all use of anonymous slots, this required modifying
1137         bindings generation to add member variables for cached attributes,
1138         and override visitChildren with the necessary logic to mark those
1139         new members.
1140
1141         I added bindings generation tests for these values.
1142
1143         * bindings/js/JSAudioConstructor.h:
1144         (WebCore::JSAudioConstructor::createStructure):
1145         * bindings/js/JSDOMBinding.h:
1146         (WebCore::DOMConstructorObject::createStructure):
1147         * bindings/js/JSDOMGlobalObject.h:
1148         (WebCore::JSDOMGlobalObject::createStructure):
1149         * bindings/js/JSDOMWindowBase.h:
1150         (WebCore::JSDOMWindowBase::createStructure):
1151         * bindings/js/JSDOMWindowShell.h:
1152         (WebCore::JSDOMWindowShell::createStructure):
1153         * bindings/js/JSDOMWrapper.h:
1154         (WebCore::JSDOMWrapper::createStructure):
1155         * bindings/js/JSImageConstructor.h:
1156         (WebCore::JSImageConstructor::createStructure):
1157         * bindings/js/JSMessageEventCustom.cpp:
1158         (WebCore::JSMessageEvent::data):
1159         (WebCore::JSMessageEvent::initMessageEvent):
1160         * bindings/js/JSOptionConstructor.h:
1161         (WebCore::JSOptionConstructor::createStructure):
1162         * bindings/js/JSWorkerContextBase.h:
1163         (WebCore::JSWorkerContextBase::createStructure):
1164         * bindings/scripts/CodeGeneratorJS.pm:
1165         (GenerateHeader):
1166         (GenerateImplementation):
1167         (GenerateConstructorDeclaration):
1168         * bindings/scripts/test/JS/JSTestInterface.cpp:
1169         (WebCore::JSTestInterfaceConstructor::createStructure):
1170         * bindings/scripts/test/JS/JSTestInterface.h:
1171         (WebCore::JSTestInterface::createStructure):
1172         (WebCore::JSTestInterfacePrototype::createStructure):
1173         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1174         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
1175         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1176         (WebCore::JSTestMediaQueryListListener::createStructure):
1177         (WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
1178         * bindings/scripts/test/JS/JSTestObj.cpp:
1179         (WebCore::JSTestObjConstructor::createStructure):
1180         (WebCore::jsTestObjCachedAttribute1):
1181         (WebCore::jsTestObjCachedAttribute2):
1182         (WebCore::JSTestObj::visitChildren):
1183         * bindings/scripts/test/JS/JSTestObj.h:
1184         (WebCore::JSTestObj::createStructure):
1185         (WebCore::JSTestObjPrototype::createStructure):
1186         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1187         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
1188         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1189         (WebCore::JSTestSerializedScriptValueInterface::createStructure):
1190         (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
1191         * bindings/scripts/test/TestObj.idl:
1192         * bindings/scripts/test/V8/V8TestObj.cpp:
1193         (WebCore::TestObjInternal::cachedAttribute1AttrGetter):
1194         (WebCore::TestObjInternal::cachedAttribute2AttrGetter):
1195         * bridge/c/CRuntimeObject.h:
1196         (JSC::Bindings::CRuntimeObject::createStructure):
1197         * bridge/c/c_instance.cpp:
1198         (JSC::Bindings::CRuntimeMethod::createStructure):
1199         * bridge/jni/jsc/JavaInstanceJSC.cpp:
1200         (JavaRuntimeMethod::createStructure):
1201         * bridge/jni/jsc/JavaRuntimeObject.h:
1202         (JSC::Bindings::JavaRuntimeObject::createStructure):
1203         * bridge/objc/ObjCRuntimeObject.h:
1204         (JSC::Bindings::ObjCRuntimeObject::createStructure):
1205         * bridge/objc/objc_instance.mm:
1206         (ObjCRuntimeMethod::createStructure):
1207         * bridge/objc/objc_runtime.h:
1208         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
1209         * bridge/runtime_array.h:
1210         (JSC::RuntimeArray::createStructure):
1211         * bridge/runtime_method.h:
1212         (JSC::RuntimeMethod::createStructure):
1213         * bridge/runtime_object.h:
1214         (JSC::Bindings::RuntimeObject::createStructure):
1215
1216 2011-09-01  Filip Pizlo  <fpizlo@apple.com>
1217
1218         The executable allocator makes it difficult to free individual
1219         chunks of executable memory
1220         https://bugs.webkit.org/show_bug.cgi?id=66363
1221
1222         Reviewed by Oliver Hunt.
1223         
1224         Introduced a best-fit, balanced-tree based allocator. The allocator
1225         required a balanced tree that does not allocate memory and that
1226         permits the removal of individual nodes directly (as opposed to by
1227         key); neither AVLTree nor WebCore's PODRedBlackTree supported this.
1228         Changed all references to executable code to use a reference counted
1229         handle.
1230
1231         No new layout tests because behavior is not changed.  New API unit
1232         tests:
1233         Tests/WTF/RedBlackTree.cpp
1234         Tests/WTF/MetaAllocator.cpp
1235
1236         * ForwardingHeaders/wtf/MetaAllocatorHandle.h: Added.
1237
1238 2011-09-10  Sam Weinig  <sam@webkit.org>
1239
1240         Add isInterruptedExecutionException and isTerminatedExecutionException predicates
1241         https://bugs.webkit.org/show_bug.cgi?id=67892
1242
1243         Reviewed by Andy "First Time Reviewer" Estes.
1244
1245         * bindings/js/JSDOMBinding.cpp:
1246         (WebCore::reportException):
1247         * bindings/js/JSEventListener.cpp:
1248         (WebCore::JSEventListener::handleEvent):
1249         * bindings/js/WorkerScriptController.cpp:
1250         (WebCore::WorkerScriptController::evaluate):
1251         Use the new predicates instead of probing the ClassInfo directly.
1252
1253 2011-09-10  Kevin Ollivier  <kevino@theolliviers.com>
1254
1255         [wx] Unreviewed build fix. MSW build fixes.
1256
1257         * config.h:
1258
1259 2011-09-09  David Hyatt  <hyatt@apple.com>
1260
1261         https://bugs.webkit.org/show_bug.cgi?id=67861
1262         
1263         Implement border-image-outset (and the mask equivalents).
1264
1265         Reviewed by Beth Dakin.
1266
1267         Added new tests in fast/borders and fast/reflections.
1268
1269         * css/CSSBorderImageValue.cpp:
1270         (WebCore::CSSBorderImageValue::CSSBorderImageValue):
1271         (WebCore::CSSBorderImageValue::cssText):
1272         * css/CSSBorderImageValue.h:
1273         (WebCore::CSSBorderImageValue::create):
1274         Add m_outset field to CSSBorderImageValue and teach it how to dump the field as
1275         part of cssText().
1276
1277         * css/CSSComputedStyleDeclaration.cpp:
1278         (WebCore::valueForNinePieceImageQuad):
1279         (WebCore::valueForNinePieceImage):
1280         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1281         Add support for border-image-outset and -webkit-mask-box-image-outset. Refactor
1282         the code so that border-image-width and border-image-outset use a common
1283         function.
1284
1285         * css/CSSParser.cpp:
1286         (WebCore::CSSParser::parseValue):
1287         (WebCore::BorderImageParseContext::BorderImageParseContext):
1288         (WebCore::BorderImageParseContext::allowOutset):
1289         (WebCore::BorderImageParseContext::commitSlash):
1290         (WebCore::BorderImageParseContext::commitBorderWidth):
1291         (WebCore::BorderImageParseContext::commitBorderOutset):
1292         (WebCore::BorderImageParseContext::commitRepeat):
1293         (WebCore::BorderImageParseContext::commitBorderImage):
1294         (WebCore::CSSParser::parseBorderImage):
1295         Teach the border image parsing code about outsets. This code will soon be
1296         replaced by true shorthand parsing code, but for now keep it working and add
1297         outset support to it.
1298
1299         (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext):
1300         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
1301         (WebCore::CSSParser::parseBorderImageQuad):
1302         (WebCore::CSSParser::parseBorderImageWidth):
1303         (WebCore::CSSParser::parseBorderImageOutset):
1304         * css/CSSParser.h:
1305         Refactor the border-image-width code so that it can be shared by border-image-outset, since
1306         they are extremely similar.
1307
1308         * css/CSSPropertyNames.in:
1309         Add the new properties.
1310
1311         * css/CSSStyleSelector.cpp:
1312         (WebCore::CSSStyleSelector::applyProperty):
1313         (WebCore::CSSStyleSelector::mapNinePieceImage):
1314         (WebCore::CSSStyleSelector::mapNinePieceImageQuad):
1315         (WebCore::CSSStyleSelector::loadPendingImages):
1316         * css/CSSStyleSelector.h:
1317         Refactor the code so that width/outset share common mapping functions. Add support for outset.
1318
1319         * rendering/InlineFlowBox.cpp:
1320         (WebCore::InlineFlowBox::addToLine):
1321         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
1322         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
1323         (WebCore::InlineFlowBox::computeOverflow):
1324         Add new functions for computing the visual overflow caused by border outsets. Fix bugs in
1325         the shadow overflow code as well.
1326
1327         (WebCore::clipRectForNinePieceImageStrip):
1328         (WebCore::InlineFlowBox::paintBoxDecorations):
1329         (WebCore::InlineFlowBox::paintMask):
1330         * rendering/InlineFlowBox.h:
1331         Make sure the clip rect pushed when painting one piece of a split inline strip is expanded to
1332         include the border and mask outsets. Always include the block direction expansion, and conditionally
1333         include the inline direction expansion based off includeLogicalLeftEdge()/includeLogicalRightEdge().
1334         clipRectForNinePieceImageStrip is a common function shared by masks and border images that does this
1335         work.
1336
1337         * rendering/RenderBlock.cpp:
1338         (WebCore::RenderBlock::computeOverflow):
1339         * rendering/RenderBox.cpp:
1340         (WebCore::RenderBox::maskClipRect):
1341         (WebCore::RenderBox::addBoxShadowAndBorderOverflow):
1342         * rendering/RenderBox.h:
1343         Rename addShadowOverflow to addBoxShadowAndBorderOverflow. Have it compute both shadow and border image
1344         outset overflow. Fix bugs with shadow overflow computation.
1345
1346         * rendering/RenderBoxModelObject.cpp:
1347         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1348         Change painting to apply the outsets to inflate the border image drawing area.
1349
1350         * rendering/RenderEmbeddedObject.cpp:
1351         (WebCore::RenderEmbeddedObject::layout):
1352         * rendering/RenderIFrame.cpp:
1353         (WebCore::RenderIFrame::layout):
1354         Patched to call the renamed addBoxShadowAndBorderOverflow function instead of addShadowOverflow.
1355
1356         * rendering/RenderLayer.cpp:
1357         (WebCore::RenderLayer::calculateRects):
1358         Patched to no longer apply box-shadow to overflow clip areas when inflating the intersection area for the
1359         layer bounds. Instead we generically apply all visual overflow so that border image outsets will also be
1360         included. This fixes https://bugs.webkit.org/show_bug.cgi?id=37467.
1361
1362         * rendering/RenderReplaced.cpp:
1363         (WebCore::RenderReplaced::layout):
1364         Patched to call the renamed addBoxShadowAndBorderOverflow function instead of addShadowOverflow.
1365
1366         * rendering/style/NinePieceImage.cpp:
1367         (WebCore::NinePieceImage::operator==):
1368         * rendering/style/NinePieceImage.h:
1369         (WebCore::NinePieceImage::NinePieceImage):
1370         (WebCore::NinePieceImage::outset):
1371         (WebCore::NinePieceImage::setOutset):
1372         (WebCore::NinePieceImage::computeOutset):
1373         (WebCore::NinePieceImage::copyOutsetFrom):
1374         Add the outset field to NinePieceImage along with some helpers for manipulating outsets.
1375
1376         * rendering/style/RenderStyle.cpp:
1377         (WebCore::RenderStyle::getImageOutsets):
1378         (WebCore::RenderStyle::getImageHorizontalOutsets):
1379         (WebCore::RenderStyle::getImageVerticalOutsets):
1380         * rendering/style/RenderStyle.h:
1381         (WebCore::InheritedFlags::hasBorderImageOutsets):
1382         (WebCore::InheritedFlags::getBorderImageOutsets):
1383         (WebCore::InheritedFlags::getBorderImageHorizontalOutsets):
1384         (WebCore::InheritedFlags::getBorderImageVerticalOutsets):
1385         (WebCore::InheritedFlags::getBorderImageInlineDirectionOutsets):
1386         (WebCore::InheritedFlags::getBorderImageBlockDirectionOutsets):
1387         (WebCore::InheritedFlags::getImageInlineDirectionOutsets):
1388         (WebCore::InheritedFlags::getImageBlockDirectionOutsets):
1389         Helpers for outset computation used by painting and overflow functions.
1390
1391 2011-09-10  Dan Bernstein  <mitz@apple.com>
1392
1393         Actually prevent unnecessary casts to MediaControls*.
1394
1395         Reviewed by Oliver Hunt.
1396
1397         * html/shadow/MediaControls.h:
1398
1399 2011-09-10  Ryosuke Niwa  <rniwa@webkit.org>
1400
1401         Remove printf added by r94900.
1402
1403         * rendering/RenderLayer.cpp:
1404         (WebCore::RenderLayer::drawPlatformResizerImage):
1405
1406 2011-09-09  Chris Marrin  <cmarrin@apple.com>
1407
1408         requestAnimationFrame doesn't throttle on Mac
1409         https://bugs.webkit.org/show_bug.cgi?id=67171
1410
1411         Reviewed by Simon Fraser.
1412
1413         Changed requestAnimationFrame to use a Timer in ScriptedAnimationController
1414         on Mac, rather than runLoopObservers. The Timer is throttled to fire no
1415         faster than every 15ms. It is behind a WTF_USE_REQUEST_ANIMATION_FRAME_TIMER
1416         flag and can be used by any implementation, but currently it is only enabled
1417         by PLATFORM(MAC).
1418
1419         * dom/ScriptedAnimationController.cpp:
1420         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
1421         (WebCore::ScriptedAnimationController::resume):
1422         (WebCore::ScriptedAnimationController::registerCallback):
1423         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
1424         (WebCore::ScriptedAnimationController::scheduleAnimation):
1425         (WebCore::ScriptedAnimationController::animationTimerFired):
1426         * dom/ScriptedAnimationController.h:
1427         * loader/EmptyClients.h:
1428         * page/Chrome.cpp:
1429         (WebCore::Chrome::scheduleAnimation):
1430         * page/ChromeClient.h:
1431
1432 2011-09-10  Jarred Nicholls  <jarred@sencha.com>
1433
1434         [Qt] QWebSettings::setUserStyleSheetUrl() does not work with windows paths that contain drive letters
1435         https://bugs.webkit.org/show_bug.cgi?id=34884
1436         
1437         KURL::path() alone does not handle removing the leading slash from a windows file path.
1438         Using QUrl::toLocalFile() will turn file:///C:/path into C:/path appropriately.
1439
1440         Reviewed by Andreas Kling.
1441
1442         * platform/qt/KURLQt.cpp:
1443         (WebCore::KURL::fileSystemPath):
1444
1445 2011-09-10  Ken Buchanan <kenrb@chromium.org>
1446
1447         Crash due to bad data in SVGDocumentExtensions m_pendingResources
1448         https://bugs.webkit.org/show_bug.cgi?id=67488
1449
1450         Reviewed by Nikolas Zimmermann.
1451
1452         Resolving a crash condition caused by the deletion of
1453         elements while pending resource entries for those elements are still
1454         recorded.
1455
1456         * rendering/svg/RenderSVGResourceContainer.cpp:
1457         (WebCore::RenderSVGResourceContainer::registerResource)
1458         * svg/SVGDocumentExtensions.h:
1459         (WebCore::SVGDocumentExtensions::isElementInPendingResources)
1460         * svg/SVGDocumentExtensions.cpp:
1461         (WebCore::SVGDocumentExtensions::addPendingResource)
1462         (WebCore::SVGDocumentExtensions::isElementInPendingResources)
1463         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources)
1464         * svg/SVGStyledElement.h:
1465         (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible)
1466         * svg/SVGStyledElement.cpp:
1467         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded)
1468         (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible)
1469         * svg/SVGUseElement.cpp:
1470         (WebCore::SVGUseElement::svgAttributeChanged)
1471
1472 2011-09-10  Adam Barth  <abarth@webkit.org>
1473
1474         Remove DocumentWriter::deprecatedFrameEncoding()
1475         https://bugs.webkit.org/show_bug.cgi?id=67882
1476
1477         Reviewed by Eric Seidel.
1478
1479         Three years ago, in http://trac.webkit.org/changeset/39026, Alexey
1480         Proskuryakov added ContentDispositionEncodingFallbackArray to work
1481         around a web site compatibility issue with a non-ASCII file name
1482         becoming garbled when received in the Content-Disposition header.
1483
1484         Since that time, there has been copious discussion of this topic among
1485         browser vendors, in the IETF, and in the broader web community.  For
1486         example, here is a Stack Overflow thread about this topic:
1487
1488         http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http
1489
1490         Eric Lawrence has written a blog post that summarizes IE's perspective
1491         on this issue:
1492
1493         http://blogs.msdn.com/b/ieinternals/archive/2010/06/07/content-disposition-attachment-and-international-unicode-characters.aspx
1494
1495         The current consensus is that browsers should implement RFC 6266,
1496         which is a new RFC that updates the definition of the
1497         Content-Disposition header.  Chrome and Firefox have both implemented
1498         RFC 6266 and have encountered only one issue, which was then fixed by
1499         the web site operator.  IE has also implemented RFC 6266, but I don't
1500         have detailed information about their compatibility experience.
1501
1502         This patch add explicit PLATFORM #ifdefs around the quirky
1503         implementation previously used in Apple's Mac and Windows ports.  This
1504         code is already only used on Apple's ports, so this patch introduces no
1505         functional changes.  It does, however, discourage other ports from
1506         adopting this quirk.  IMHO, Apple should remove this quirk as soon as
1507         compatibility allows and converge behavior with the other major browser
1508         vendors.
1509
1510         See bug for manual test (the bug manifests in Safari download UI).
1511
1512         * loader/DocumentWriter.cpp:
1513         * loader/DocumentWriter.h:
1514         * loader/FrameLoader.cpp:
1515         (WebCore::FrameLoader::addExtraFieldsToRequest):
1516         * platform/network/ResourceRequestBase.cpp:
1517         (WebCore::ResourceRequestBase::adopt):
1518         (WebCore::ResourceRequestBase::copyData):
1519         * platform/network/ResourceRequestBase.h:
1520
1521 2011-09-09  Beth Dakin  <bdakin@apple.com>
1522
1523         Attempted Leopard build fix.
1524
1525         * rendering/RenderImage.cpp:
1526         (WebCore::RenderImage::paintReplaced):
1527         * rendering/RenderLayer.cpp:
1528         (WebCore::RenderLayer::drawPlatformResizerImage):
1529
1530 2011-09-09  Beth Dakin  <bdakin@apple.com>
1531
1532         Fix for https://bugs.webkit.org/show_bug.cgi?id=67819
1533         Use high resolution platform images when the deviceScaleFactor > 1
1534         -and corresponding-
1535         <rdar://problem/10003098>
1536
1537         Reviewed by Darin Adler.
1538
1539         Add all of the new high resolution images. I also removed some tiffs from the 
1540         project and replaced them with png equivalents (that are already checked into 
1541         WebCore anyway). Since the high resolution images are pngs, it makes sense to use 
1542         pngs for all of the images that load through Image::loadPlatformResource()
1543         * WebCore.xcodeproj/project.pbxproj:
1544         * platform/graphics/mac/ImageMac.mm:
1545         (WebCore::Image::loadPlatformResource):
1546
1547         Load the @2x resource for deviceScaleFactors >= 2.
1548         * editing/DeleteButtonController.cpp:
1549         (WebCore::DeleteButtonController::createDeletionUI):
1550
1551         CachedImage::brokenImage() is no longer a static helper function, but a real 
1552         member function. It also now loads the @2x resource for deviceScaleFactors >= 2 
1553         and takes a parameter for the deviceScaleFactor. When CachedImage::image() returns 
1554         the brokenImage(), it just returns the 1x version. brokenImage() has to be called 
1555         directly to reliably return the deviceScaleFactor-appropriate resource.
1556         * loader/cache/CachedImage.cpp:
1557         (WebCore::CachedImage::brokenImage):
1558         (WebCore::CachedImage::image):
1559         * loader/cache/CachedImage.h:
1560         * rendering/RenderLayer.cpp:
1561         (WebCore::RenderLayer::drawPlatformResizerImage):
1562         (WebCore::RenderLayer::paintResizer):
1563         * rendering/RenderLayer.h:
1564
1565         New static function to retrieve the deviceScaleFactor for callers that do not have 
1566         direct access to a Page.
1567         * page/Page.cpp:
1568         (WebCore::Page::deviceScaleFactor):
1569         * page/Page.h:
1570
1571         Call CachedImage::brokenImage() for the broken-image image at an accurate 
1572         resolution.
1573         * rendering/RenderImage.cpp:
1574         (WebCore::RenderImage::imageSizeForError):
1575         (WebCore::RenderImage::paintReplaced):
1576
1577 2011-09-09  Erik Arvidsson  <arv@chromium.org>
1578
1579         Move Element.contains to Node
1580         https://bugs.webkit.org/show_bug.cgi?id=67651
1581
1582         Reviewed by Darin Adler.
1583
1584         This moves the contains method from Element to Node as in the DOM4 working draft: 
1585         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains
1586
1587         This also special cases Document contains to make it O(1) instead of O(depth).
1588
1589         Tests: fast/dom/Node/contains-method.html
1590                perf/document-contains.html
1591
1592         * bindings/objc/PublicDOMInterfaces.h: Move contains from DOMElement to DOMNode.
1593         * dom/Element.idl:
1594         * dom/Node.cpp:
1595         (WebCore::Node::contains): Added document special case.
1596         * dom/Node.idl:
1597         * editing/DeleteSelectionCommand.cpp:
1598         (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check.
1599
1600 2011-09-09  Tim Horton  <timothy_horton@apple.com>
1601
1602         Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow
1603         https://bugs.webkit.org/show_bug.cgi?id=67543
1604         <rdar://problem/10070536>
1605
1606         Reviewed by Darin Adler.
1607
1608         Generalize (begin|end)TransparencyLayer, which now forward
1609         through to (begin|end)PlatformTransparencyLayer, so that
1610         isInTransparencyLayer can exist on every platform.
1611
1612         Make use of isInTransparencyLayer in FontMac to disable
1613         "simple" shadow drawing when the text is being rendered
1614         into a transparency layer.
1615
1616         Test: svg/custom/simple-text-double-shadow.svg
1617
1618         * platform/graphics/GraphicsContext.cpp:
1619         (WebCore::GraphicsContext::GraphicsContext):
1620         (WebCore::GraphicsContext::~GraphicsContext):
1621         (WebCore::GraphicsContext::beginTransparencyLayer):
1622         (WebCore::GraphicsContext::endTransparencyLayer):
1623         (WebCore::GraphicsContext::isInTransparencyLayer):
1624         * platform/graphics/GraphicsContext.h:
1625         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1626         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1627         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1628         (WebCore::GraphicsContext::supportsTransparencyLayers):
1629         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1630         * platform/graphics/cg/GraphicsContextCG.cpp:
1631         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1632         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1633         (WebCore::GraphicsContext::supportsTransparencyLayers):
1634         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
1635         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1636         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
1637         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1638         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1639         (WebCore::GraphicsContext::supportsTransparencyLayers):
1640         * platform/graphics/mac/FontMac.mm:
1641         (WebCore::Font::drawGlyphs):
1642         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
1643         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1644         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1645         (WebCore::GraphicsContext::supportsTransparencyLayers):
1646         * platform/graphics/qt/GraphicsContextQt.cpp:
1647         (WebCore::GraphicsContext::isInTransparencyLayer):
1648         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1649         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1650         (WebCore::GraphicsContext::supportsTransparencyLayers):
1651         * platform/graphics/skia/GraphicsContextSkia.cpp:
1652         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1653         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1654         (WebCore::GraphicsContext::supportsTransparencyLayers):
1655         * platform/graphics/win/FontCGWin.cpp:
1656         (WebCore::drawGDIGlyphs):
1657         * platform/graphics/win/GraphicsContextCGWin.cpp:
1658         (WebCore::GraphicsContext::releaseWindowsContext):
1659         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1660         (WebCore::GraphicsContext::releaseWindowsContext):
1661         * platform/graphics/win/GraphicsContextWin.cpp:
1662         (WebCore::GraphicsContext::getWindowsContext):
1663         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1664         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1665         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1666         (WebCore::GraphicsContext::supportsTransparencyLayers):
1667         * platform/graphics/wx/GraphicsContextWx.cpp:
1668         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1669         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1670         (WebCore::GraphicsContext::supportsTransparencyLayers):
1671         * platform/win/ScrollbarThemeWin.cpp:
1672         * plugins/win/PluginViewWin.cpp:
1673         * rendering/RenderThemeWin.cpp:
1674
1675 2011-09-09  Julien Chaffraix  <jchaffraix@webkit.org>
1676
1677         [V8] V8WebKitPoint::constructorCallback leaks
1678         https://bugs.webkit.org/show_bug.cgi?id=67865
1679
1680         Reviewed by Adam Barth.
1681
1682         Covered by fast/js/instanceof-XMLHttpRequest.html under Valgrind.
1683
1684         * bindings/v8/custom/V8WebKitPointConstructor.cpp:
1685         (WebCore::V8WebKitPoint::constructorCallback): Changed the code
1686         to use a RefPtr (per our usual style). Also use toV8 that will
1687         take care of properly wrapping the object.
1688
1689 2011-09-09  Chris Rogers  <crogers@google.com>
1690
1691         HRTFDatabaseLoader should not call WTF::waitForThreadCompletion() more than once
1692         https://bugs.webkit.org/show_bug.cgi?id=67866
1693
1694         Reviewed by David Levin.
1695
1696         No new tests since this is difficult to test.
1697         This is designed to fix existing webaudio layout test failures.
1698
1699         * platform/audio/HRTFDatabaseLoader.cpp:
1700         (WebCore::HRTFDatabaseLoader::HRTFDatabaseLoader):
1701         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
1702         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
1703         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
1704         * platform/audio/HRTFDatabaseLoader.h:
1705
1706 2011-09-09  Jessie Berlin  <jberlin@apple.com>
1707
1708         Cookies are not available after turning off Private Browsing after the last window has been
1709         closed.
1710         https://bugs.webkit.org/show_bug.cgi?id=67874
1711
1712         Reviewed by Darin Adler.
1713
1714         The private browsing storage session is a global setting that is being incorrectly set on a
1715         per-page basis (see http://webkit.org/b/67870).
1716
1717         In this case, the global value was getting out of sync with the per-page setting:
1718         1. The global value was getting set to true when setPrivateBrowsingEnabled(true) was called.
1719         2. All Pages were then closed, destroying their Settings objects.
1720         3. When a new Page was created, a new Settings object was created and its
1721            m_privateBrowsingEnabled value was getting set to false.
1722         4. The WebPage settings were then applied to the new Settings object, resulting in
1723            setPrivateBrowsingEnabled(false) to be called.
1724         5. An if (m_privateBrowsingEnabled == privateBrowsingEnabled) early return prevented the
1725            global value for the storage session from being destroyed.
1726
1727         * page/Settings.cpp:
1728         (WebCore::Settings::setPrivateBrowsingEnabled):
1729         Move the early return to be after setting the global private browsing values, and add a
1730         clearer comment + FIXME.
1731
1732 2011-09-09  Kentaro Hara  <haraken@google.com>
1733
1734         Generate a WebKitCSSMatrix constructor of V8 using the IDL 'Constructor' extended attribute
1735         https://bugs.webkit.org/show_bug.cgi?id=67458
1736
1737         Reviewed by Adam Barth.
1738
1739         Added a 'CallWithNullValue' extended attribute.
1740         If a parameter is optional and missing, 'CallWithDefaultValue'
1741         handles it as a string "undefined". On the other hand,
1742         'CallWithNullValue' handles it as a null string
1743         (Note: not a string "null", but a null string).
1744
1745         Tests: fast/dom/Window/custom-constructors.html
1746                transforms/svg-vs-css.xhtml
1747                transforms/cssmatrix-2d-interface.xhtml
1748                transforms/cssmatrix-3d-interface.xhtmlGenerate a WebKitCSSMatrix constructor
1749
1750         * WebCore.gypi: Removed V8WebKitCSSMatrixConstructor.cpp.
1751         * WebCore.pro: Removed V8WebKitCSSMatrixConstructor.cpp.
1752         * bindings/scripts/CodeGeneratorV8.pm:
1753         (GenerateParametersCheck): If the 'CallWithNullValue' extended attribute is set, we call MAYBE_MISSING_PARAMETER() with MissingIsEmpty mode to obtain a maybe missing parameter. Otherwise, we call MAYBE_MISSING_PARAMETER() with MissingIsUndefined mode.
1754         (RequiresCustomSignature):
1755         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated test results.
1756         (WebCore::V8TestInterface::constructorCallback):
1757         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto.
1758         (WebCore::TestMediaQueryListListenerInternal::methodCallback):
1759         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
1760         (WebCore::TestObjInternal::voidMethodWithArgsCallback):
1761         (WebCore::TestObjInternal::intMethodWithArgsCallback):
1762         (WebCore::TestObjInternal::objMethodWithArgsCallback):
1763         (WebCore::TestObjInternal::methodThatRequiresAllArgsCallback):
1764         (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback):
1765         (WebCore::TestObjInternal::optionsObjectCallback):
1766         (WebCore::TestObjInternal::customArgsAndExceptionCallback):
1767         (WebCore::TestObjInternal::withDynamicFrameAndArgCallback):
1768         (WebCore::TestObjInternal::withDynamicFrameAndOptionalArgCallback):
1769         (WebCore::TestObjInternal::withDynamicFrameAndUserGestureCallback):
1770         (WebCore::TestObjInternal::withDynamicFrameAndUserGestureASADCallback):
1771         (WebCore::TestObjInternal::methodWithOptionalArgCallback):
1772         (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback):
1773         (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
1774         (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback):
1775         (WebCore::TestObjInternal::overloadedMethod1Callback):
1776         (WebCore::TestObjInternal::overloadedMethod2Callback):
1777         (WebCore::TestObjInternal::overloadedMethod3Callback):
1778         (WebCore::TestObjInternal::overloadedMethod4Callback):
1779         (WebCore::TestObjInternal::classMethodWithOptionalCallback):
1780         (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback):
1781         (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback):
1782         * bindings/v8/V8Binding.h:
1783         (WebCore::V8ParameterBase::prepareBase): The fact that V8ParameterBase does not have any object means that we do not need to prepare anything, i.e. we should just return true in this case.
1784         (WebCore::::prepare): If V8ParameterBase does not have any object, then we set a null string.
1785         * bindings/v8/custom/V8BindingMacros.h: MAYBE_MISSING_PARAMETER() returns the parameter of a given index if the parameter exists. If the parameter does not exist and MissingIsUndefined is set, this macro returns an object that represents undefined. If the parameter does not exist and MissingIsEmpty is set, this macro returns an empty object.
1786         * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: Removed.
1787         * css/WebKitCSSMatrix.idl: Added the 'Constructor' extended attribute.
1788
1789 2011-09-09  Geoffrey Garen  <ggaren@apple.com>
1790
1791         Reviewed by Dan Bernstein.
1792
1793         Removed ENABLE(SINGLE_THREADED) support, since it is always false
1794         https://bugs.webkit.org/show_bug.cgi?id=67862
1795
1796         Next step toward making the baseline platform assumption that threads exist.
1797
1798         * WebCore.pri:
1799         * features.pri: 
1800         * platform/sql/SQLiteDatabase.cpp:
1801         (WebCore::SQLiteDatabase::interrupt): Removed now-dead code.
1802
1803 2011-09-09  Fady Samuel  <fsamuel@chromium.org>
1804
1805         Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp}
1806         https://bugs.webkit.org/show_bug.cgi?id=67250
1807
1808         Reviewed by Simon Fraser.
1809
1810         No new tests because there's no change in functionality.
1811
1812         * WebCore.exp.in:
1813         * css/CSSStyleSelector.cpp:
1814         (WebCore::CSSStyleSelector::styleForDocument):
1815         * dom/Element.cpp:
1816         (WebCore::Element::getClientRects):
1817         (WebCore::Element::getBoundingClientRect):
1818         * dom/Range.cpp:
1819         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale):
1820         * loader/HistoryController.cpp:
1821         (WebCore::HistoryController::restoreScrollPositionAndViewState):
1822         * page/Frame.cpp:
1823         (WebCore::Frame::Frame):
1824         (WebCore::Frame::pageScaleFactor):
1825         * page/Frame.h:
1826         * page/Page.cpp:
1827         (WebCore::Page::Page):
1828         (WebCore::Page::setPageScaleFactor):
1829         * page/Page.h:
1830         (WebCore::Page::pageScaleFactor):
1831         * rendering/RenderLayerCompositor.cpp:
1832         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
1833         (WebCore::RenderLayerCompositor::pageScaleFactor):
1834         * rendering/RenderView.cpp:
1835         (WebCore::RenderView::paintBoxDecorations):
1836
1837 2011-09-09  Dominic Mazzoni  <dmazzoni@google.com>
1838
1839         AX: Images within anchors causes crash
1840         https://bugs.webkit.org/show_bug.cgi?id=44149
1841
1842         Reviewed by Chris Fleizach.
1843
1844         Fixes the way parent RenderObject of an AccessibilityRenderObject
1845         is computed in the presence of adjacent continuations.
1846
1847         Test: accessibility/div-within-anchors-causes-crash.html
1848
1849         * accessibility/AccessibilityRenderObject.cpp:
1850         (WebCore::AccessibilityRenderObject::renderParentObject):
1851
1852 2011-09-09  Kulanthaivel Palanichamy  <kulanthaivel@codeaurora.org>
1853
1854         CSS rules not being applied when a hidden field is inserted between an input[type=checkbox] and a label
1855         https://bugs.webkit.org/show_bug.cgi?id=66887
1856
1857         Reviewed by David Hyatt.
1858
1859         Test: fast/css/adjacent-sibling-selector.html
1860
1861         This patch addresses the problem of elements not getting their style recomputed
1862         when they are affected by direct adjacent sibling rules and one of their sibling in
1863         their corresponding rules is modified dynamically.
1864
1865         * css/CSSStyleSelector.cpp:
1866         (WebCore::CSSStyleSelector::canShareStyleWithElement):
1867         (WebCore::parentStylePreventsSharing):
1868         * css/SelectorChecker.cpp:
1869         (WebCore::SelectorChecker::checkSelector):
1870         * dom/Element.cpp:
1871         (WebCore::Element::recalcStyle):
1872         (WebCore::checkForSiblingStyleChanges):
1873         * rendering/style/RenderStyle.cpp:
1874         (WebCore::RenderStyle::RenderStyle):
1875         * rendering/style/RenderStyle.h:
1876         (WebCore::InheritedFlags::affectedByDirectAdjacentRules):
1877         (WebCore::InheritedFlags::setAffectedByDirectAdjacentRules):
1878
1879 2011-09-09  Rafael Antognolli  <antognolli@profusion.mobi>
1880
1881         Make the EFL port use the correct rendering file.
1882         https://bugs.webkit.org/show_bug.cgi?id=66323
1883
1884         Reviewed by Martin Robinson.
1885
1886         When compiling with Pango support, the EFL port should use
1887         FontPango.cpp instead of FontEfl.cpp (which is just full of stubs).
1888
1889         No new functionality so no new tests.
1890
1891         * CMakeListsEfl.txt:
1892
1893 2011-09-09  Chris Rogers  <crogers@google.com>
1894
1895         AudioBufferSourceNode must validate AudioBuffer in .buffer attribute setter
1896         https://bugs.webkit.org/show_bug.cgi?id=67749
1897
1898         Reviewed by Kenneth Russell.
1899
1900         Test: webaudio/audiobuffersource-channels.html
1901
1902         * WebCore.gypi:
1903         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
1904         (WebCore::JSAudioBufferSourceNode::setBuffer):
1905         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: Copied from Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp.
1906         (WebCore::V8AudioBufferSourceNode::bufferAccessorSetter):
1907         * webaudio/AudioBufferSourceNode.cpp:
1908         (WebCore::AudioBufferSourceNode::setBuffer):
1909         * webaudio/AudioBufferSourceNode.h:
1910         * webaudio/AudioBufferSourceNode.idl:
1911
1912 2011-09-09  Dan Bernstein  <mitz@apple.com>
1913
1914         RenderBlock::addOverhangingFloats() takes superfluous parameters
1915         https://bugs.webkit.org/show_bug.cgi?id=67863
1916
1917         Reviewed by Dave Hyatt.
1918
1919         No new tests, because behavior is unchanged.
1920
1921         * rendering/RenderBlock.cpp:
1922         (WebCore::RenderBlock::layoutBlock):
1923         (WebCore::RenderBlock::layoutBlockChild):
1924         (WebCore::RenderBlock::addOverhangingFloats): Removed the logical{Left, Top}Offset parameters,
1925         since they were always the inverse of the logical{Left, Top}() of the child parameter.
1926         * rendering/RenderBlock.h:
1927
1928 2011-09-09  Rafael Antognolli  <antognolli@profusion.mobi>
1929
1930         Add replacement functions for gdk ones.
1931         https://bugs.webkit.org/show_bug.cgi?id=66323
1932
1933         Reviewed by Martin Robinson.
1934
1935         This will allow the EFL port to don't depend on gdk anymore.
1936
1937         No new functionality so no new tests.
1938
1939         * CMakeListsEfl.txt:
1940         * platform/graphics/cairo/CairoUtilities.cpp:
1941         (WebCore::appendRegionToCairoContext):
1942         * platform/graphics/cairo/CairoUtilities.h:
1943         * platform/graphics/pango/FontPango.cpp:
1944         (WebCore::drawGlyphsShadow):
1945         (WebCore::Font::drawComplexText):
1946         * platform/graphics/pango/PangoUtilities.cpp: Added.
1947         (WebCore::getLineClipRegionFromLayoutIter):
1948         (WebCore::getClipRegionFromPangoLayoutLine):
1949         * platform/graphics/pango/PangoUtilities.h: Added.
1950
1951 2011-09-09  Mark Hahnenberg  <mhahnenberg@apple.com>
1952
1953         Unzip initialization lists and constructors in JSCell hierarchy (5/7)
1954         https://bugs.webkit.org/show_bug.cgi?id=67420
1955
1956         Reviewed by Geoffrey Garen.
1957
1958         No new tests.
1959
1960         Completed the fifth level of the refactoring to add finishCreation() 
1961         methods to all classes within the JSCell hierarchy with non-trivial 
1962         constructor bodies.
1963
1964         This primarily consists of pushing the calls to finishCreation() down 
1965         into the constructors of the subclasses of the second level of the hierarchy 
1966         as well as pulling the finishCreation() calls out into the class's corresponding
1967         create() method if it has one.  Doing both simultaneously allows us to 
1968         maintain the invariant that the finishCreation() method chain is called exactly 
1969         once during the creation of an object, since calling it any other number of 
1970         times (0, 2, or more) will cause an assertion failure.
1971
1972         * WebCore.exp.in:
1973         * bindings/js/JSDOMBinding.h:
1974         (WebCore::DOMConstructorObject::DOMConstructorObject):
1975         * bindings/js/JSDOMGlobalObject.cpp:
1976         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
1977         (WebCore::JSDOMGlobalObject::finishCreation):
1978         * bindings/js/JSDOMGlobalObject.h:
1979         * bindings/js/JSDOMWindowShell.cpp:
1980         * bindings/js/JSDOMWindowShell.h:
1981         (WebCore::JSDOMWindowShell::create):
1982         * bindings/js/JSDOMWrapper.h:
1983         (WebCore::JSDOMWrapper::JSDOMWrapper):
1984         * bindings/scripts/CodeGeneratorJS.pm:
1985         (GenerateImplementation):
1986         * bindings/scripts/test/JS/JSTestInterface.cpp:
1987         (WebCore::JSTestInterface::JSTestInterface):
1988         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1989         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
1990         * bindings/scripts/test/JS/JSTestObj.cpp:
1991         (WebCore::JSTestObj::JSTestObj):
1992         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1993         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
1994         * bridge/c/CRuntimeObject.cpp:
1995         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
1996         (JSC::Bindings::CRuntimeObject::finishCreation):
1997         * bridge/c/CRuntimeObject.h:
1998         * bridge/jni/jsc/JavaRuntimeObject.cpp:
1999         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
2000         (JSC::Bindings::JavaRuntimeObject::finishCreation):
2001         * bridge/jni/jsc/JavaRuntimeObject.h:
2002         * bridge/objc/ObjCRuntimeObject.h:
2003         * bridge/objc/ObjCRuntimeObject.mm:
2004         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
2005         (JSC::Bindings::ObjCRuntimeObject::finishCreation):
2006         * bridge/objc/objc_runtime.h:
2007         (JSC::Bindings::ObjcFallbackObjectImp::create):
2008         * bridge/objc/objc_runtime.mm:
2009         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2010         * bridge/qt/qt_instance.cpp:
2011         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
2012         * bridge/qt/qt_pixmapruntime.cpp:
2013         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
2014         * bridge/qt/qt_runtime.cpp:
2015         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
2016         (JSC::Bindings::QtRuntimeMethod::finishCreation):
2017         * bridge/qt/qt_runtime.h:
2018         * bridge/runtime_array.cpp:
2019         (JSC::RuntimeArray::RuntimeArray):
2020         * bridge/runtime_array.h:
2021         (JSC::RuntimeArray::create):
2022         * bridge/runtime_method.cpp:
2023         (JSC::RuntimeMethod::RuntimeMethod):
2024         (JSC::RuntimeMethod::finishCreation):
2025         * bridge/runtime_method.h:
2026         * bridge/runtime_object.cpp:
2027         (JSC::Bindings::RuntimeObject::RuntimeObject):
2028         * bridge/runtime_object.h:
2029         (JSC::Bindings::RuntimeObject::create):
2030
2031 2011-09-09  Rafael Antognolli  <antognolli@profusion.mobi>
2032
2033         Rename FontGtk.cpp to FontPango.cpp
2034         https://bugs.webkit.org/show_bug.cgi?id=66323
2035
2036         Reviewed by Martin Robinson.
2037
2038         This file will be used by the EFL port too, and since it's not GTK
2039         specific anymore, rename it to something better.
2040
2041         No new functionality so no new tests.
2042
2043         * GNUmakefile.list.am:
2044         * platform/graphics/pango/FontPango.cpp: Renamed from Source/WebCore/platform/graphics/gtk/FontGtk.cpp.
2045
2046 2011-09-09  Adam Klein  <adamk@chromium.org>
2047
2048         Initialize ExceptionCode in Element::removeAttribute
2049         https://bugs.webkit.org/show_bug.cgi?id=67820
2050
2051         Reviewed by Darin Adler.
2052
2053         Silences valgrind warning reported in http://crbug.com/76490.
2054
2055         No new tests since this would only very occasionally be flaky,
2056         and in the codepath in the valgrind report, the ec is ignored anyway.
2057
2058         * dom/Element.cpp:
2059         (WebCore::Element::removeAttribute): Initialize ec to 0.
2060
2061 2011-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2062
2063         [Qt] Remove common.pri
2064         https://bugs.webkit.org/show_bug.cgi?id=67814
2065
2066         Reviewed by Andreas Kling.
2067
2068         No new tests, no change in functionality.
2069
2070         * CodeGenerators.pri:
2071         * WebCore.pri:
2072
2073 2011-09-09  Dominic Mazzoni  <dmazzoni@google.com>
2074
2075         Assert being hit in AccessibilityRenderObject::addChildren()
2076         https://bugs.webkit.org/show_bug.cgi?id=61805
2077
2078         Reviewed by Chris Fleizach.
2079
2080         Fix nextSibling and previousSibling to handle adjacent continuations
2081         properly, otherwise nodes end up appearing in the accessibility
2082         tree twice (or a debug assertion could be raised).
2083
2084         Test: accessibility/adjacent-continuations-cause-assertion-failure.html
2085
2086         * accessibility/AccessibilityRenderObject.cpp:
2087         (WebCore::AccessibilityRenderObject::previousSibling):
2088         (WebCore::AccessibilityRenderObject::nextSibling):
2089
2090 2011-09-08  Kentaro Hara  <haraken@google.com>
2091
2092         Implement a WebKitAnimationEvent constructor.
2093         https://bugs.webkit.org/show_bug.cgi?id=67825
2094
2095         Reviewed by Sam Weinig.
2096
2097         There is no spec for the WebKitAnimationEvent constructor
2098         since it is WebKit-specific. However, based on the current
2099         IDL of initWebKitAnimationEvent(), the constructor IDL
2100         should be as follows.
2101
2102         [Constructor(DOMString type, optional WebKitAnimationEventInit eventInitDict)]
2103         interface WebKitAnimationEvent : Event {
2104             ...;
2105         }
2106
2107         dictionary WebKitAnimationEventInit : EventInit {
2108             DOMString animationName;
2109             double elapsedTime;
2110         }
2111
2112         Test: fast/events/constructors/webkit-animation-event-constructor.html
2113
2114         * bindings/generic/EventConstructors.h: Added a definition for the WebKitAnimationEvent constructor.
2115         * bindings/js/JSEventConstructors.cpp: Added #includes for WebKitAnimationEvent.
2116         * dom/WebKitAnimationEvent.cpp:
2117         (WebCore::WebKitAnimationEventInit::WebKitAnimationEventInit):
2118         (WebCore::WebKitAnimationEvent::WebKitAnimationEvent):
2119         * dom/WebKitAnimationEvent.h: Added a definition for WebKitAnimationEventInit.
2120         (WebCore::WebKitAnimationEvent::create):
2121         * dom/WebKitAnimationEvent.idl: Makes WebKitAnimationEvent constructible.
2122
2123 2011-09-08  Abhishek Arya  <inferno@chromium.org>
2124
2125         :before content rendering issues with list markers and run-ins.
2126         https://bugs.webkit.org/show_bug.cgi?id=67735
2127
2128         1) Remove the isAnonymous checks for run-in detection since the
2129         run-in can belong to a node.
2130         2) When the parent has block children, then the list marker will
2131         be enclosed in an anonymous block. In that case, for going to the
2132         next list marker, we need to traverse one level up. We don't need
2133         this check when searching for generated run-in (loop 2), since we
2134         know parent will have inline children, so the list marker wont be
2135         enclosed in an anonymous block.
2136
2137         Reviewed by Dave Hyatt.
2138
2139         Tests: fast/lists/list-marker-before-content-table.html
2140                fast/runin/runin-generated-before-content.html
2141
2142         * rendering/RenderObjectChildList.cpp:
2143         (WebCore::RenderObjectChildList::beforePseudoElementRenderer):
2144
2145 2011-09-09  Pavel Podivilov  <podivilov@chromium.org>
2146
2147         Web Inspector: introduce JavaScriptSourceFrame class.
2148         https://bugs.webkit.org/show_bug.cgi?id=67838
2149
2150         SourceFrame should not deal with JavaScript debugging since it is a base class for all source frame implementations.
2151
2152         Reviewed by Pavel Feldman.
2153
2154         * WebCore.gypi:
2155         * WebCore.vcproj/WebCore.vcproj:
2156         * inspector/front-end/JavaScriptSourceFrame.js: Added.
2157         (WebInspector.JavaScriptSourceFrame):
2158         (WebInspector.SourceFrameDelegateForScriptsPanel): moved from ScriptsPanel.js
2159         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent):
2160         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggingSupported):
2161         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint):
2162         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint):
2163         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint):
2164         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint):
2165         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine):
2166         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource):
2167         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource):
2168         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSourceIsBeingEdited):
2169         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggerPaused):
2170         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame):
2171         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.releaseEvaluationResult):
2172         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName):
2173         * inspector/front-end/ScriptsPanel.js:
2174         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2175         * inspector/front-end/WebKit.qrc:
2176         * inspector/front-end/inspector.html:
2177
2178 2011-09-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2179
2180         Unreviewed, rolling out r94845.
2181         http://trac.webkit.org/changeset/94845
2182         https://bugs.webkit.org/show_bug.cgi?id=67839
2183
2184         This patch kicked Qt-SL bots, but we don't need this
2185         modification. (Requested by ossy_ on #webkit).
2186
2187         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2188         * platform/mac/WebVideoFullscreenController.mm:
2189         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2190
2191 2011-09-09  Csaba Osztrogon√°c  <ossy@webkit.org>
2192
2193         [Qt][Mac]REGRESSION(r94774): Build is broken
2194         https://bugs.webkit.org/show_bug.cgi?id=67799
2195
2196         It seems these files didn't rebuilt because of a
2197         dependency bug. Touch them to trigger a rebuild.
2198
2199         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2200         * platform/mac/WebVideoFullscreenController.mm:
2201         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2202
2203 2011-09-09  Alexander Pavlov  <apavlov@chromium.org>
2204
2205         Unreviewed, Chromium valgrind build fix.
2206
2207         Web Inspector: [Chromium] Valgrind signals use of uninitialized field in InspectorStyleSheetForInlineStyle
2208         https://bugs.webkit.org/show_bug.cgi?id=67837
2209
2210         * inspector/InspectorStyleSheet.cpp:
2211         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
2212
2213 2011-09-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2214
2215         Unreviewed, rolling out r94536.
2216         http://trac.webkit.org/changeset/94536
2217         https://bugs.webkit.org/show_bug.cgi?id=67836
2218
2219         breaks absoluteLocation() of RelatedMouseEvent (Requested by
2220         jknotten on #webkit).
2221
2222         * dom/MouseRelatedEvent.cpp:
2223         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
2224
2225 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
2226
2227         Web Inspector: live edit both for JS and CSS is not discoverable.
2228         https://bugs.webkit.org/show_bug.cgi?id=65962
2229
2230         Add the "Edit" button to SourceFrame, so that resources/scripts can be edited both in the
2231         Resources and the Scripts panels. The button is grayed out if the resource/script is not editable.
2232
2233         Reviewed by Yury Semikhatsky.
2234
2235         * inspector/front-end/Images/statusbarButtonGlyphs.png:
2236         * inspector/front-end/ResourceView.js:
2237         (WebInspector.EditableResourceSourceFrame.prototype.canEditSource):
2238         * inspector/front-end/ScriptsPanel.js:
2239         (WebInspector.ScriptsPanel.prototype.get statusBarItems):
2240         (WebInspector.ScriptsPanel.prototype.set visibleView):
2241         * inspector/front-end/SourceFrame.js:
2242         (WebInspector.SourceFrame):
2243         (WebInspector.SourceFrame.prototype.get statusBarItems):
2244         (WebInspector.SourceFrame.prototype._initializeTextViewer):
2245         (WebInspector.SourceFrame.prototype._editButtonClicked):
2246         (WebInspector.SourceFrame.prototype.canEditSource):
2247         (WebInspector.SourceFrame.prototype.startEditing):
2248         (WebInspector.SourceFrame.prototype.commitEditing):
2249         (WebInspector.SourceFrame.prototype._setReadOnly):
2250         (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick):
2251         * inspector/front-end/TextViewer.js:
2252         (WebInspector.TextEditorMainPanel.prototype.set readOnly):
2253         (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing):
2254         * inspector/front-end/inspector.css:
2255         (button.edit-source-status-bar-item .glyph):
2256         (button.edit-source-status-bar-item.toggled-on .glyph):
2257
2258 2011-09-09  Shinya Kawanaka  <shinyak@google.com>
2259
2260         Crashes in WebCore::AppendNodeCommand::create().
2261         https://bugs.webkit.org/show_bug.cgi?id=67767
2262
2263         Reviewed by Darin Adler.
2264
2265         In CompositeEditCommand::closeParagraphUnderNewElement(), lastNode could be a non Element node.
2266         The current code assumes lastNode is an Element node. This patch checks it.
2267
2268         Test: editing/execCommand/ident-crashes-topnode-is-text.html
2269
2270         * editing/CompositeEditCommand.cpp:
2271         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): Added an element node check.
2272
2273 2011-09-09  Shinya Kawanaka  <shinyak@google.com>
2274
2275         Crashes in WebCore::ApplyStyleCommand.doApply()
2276         https://bugs.webkit.org/show_bug.cgi?id=67765
2277
2278         Reviewed by Ryosuke Niwa.
2279
2280         WebCore::enclosingBlock may return null, but ApplyStyleCommand::applyBlockStyle did not check it. This patch make it to be checked.
2281
2282         Test: editing/style/remove-format-without-enclosing-block.html
2283
2284         * editing/ApplyStyleCommand.cpp:
2285         (WebCore::ApplyStyleCommand::applyBlockStyle): Added null check.
2286
2287 2011-09-09  James Simonsen  <simonjam@chromium.org>
2288
2289         [Chromium] Fix leak of Skia stream with custom CSS fonts
2290         https://bugs.webkit.org/show_bug.cgi?id=67815
2291
2292         Reviewed by Adam Barth.
2293
2294         Test: fast/css/font-face-opentype.html under valgrind
2295
2296         * platform/graphics/mac/FontCustomPlatformData.cpp:
2297         (WebCore::createFontCustomPlatformData):
2298         * platform/graphics/skia/FontCustomPlatformData.cpp:
2299         (WebCore::createFontCustomPlatformData):
2300
2301 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
2302
2303         Push more code from HTMLInputElement::setValue to TextFieldInputType::setValue
2304         https://bugs.webkit.org/show_bug.cgi?id=67742
2305
2306         Reviewed by Darin Adler.
2307
2308         Moved more code in HTMLInputElement::setValue to TextFieldInputType::setValue, and merged
2309         InputType::valueChanged into InputType::setValue. Also introduced
2310         InputType::dispatchChangeEventInResponseToSetValue to be overridden by TextFieldInputType.
2311
2312         * html/BaseButtonInputType.cpp:
2313         (WebCore::BaseButtonInputType::setValue):
2314         * html/BaseButtonInputType.h:
2315         * html/BaseCheckableInputType.cpp:
2316         (WebCore::BaseCheckableInputType::setValue):
2317         * html/BaseCheckableInputType.h:
2318         * html/ColorInputType.cpp:
2319         * html/ColorInputType.h:
2320         * html/FileInputType.cpp:
2321         (WebCore::FileInputType::setValue):
2322         * html/FileInputType.h:
2323         * html/HTMLInputElement.cpp:
2324         (WebCore::HTMLInputElement::setValue):
2325         * html/HTMLInputElement.h:
2326         (WebCore::HTMLInputElement::cacheSelectionInResponseToSetValue):
2327         * html/HiddenInputType.cpp:
2328         (WebCore::HiddenInputType::setValue):
2329         * html/HiddenInputType.h:
2330         * html/InputType.cpp:
2331         (WebCore::InputType::setValue):
2332         (WebCore::InputType::dispatchChangeEventInResponseToSetValue):
2333         * html/InputType.h:
2334         * html/RangeInputType.cpp:
2335         (WebCore::RangeInputType::setValue):
2336         * html/RangeInputType.h:
2337         * html/TextFieldInputType.cpp:
2338         (WebCore::TextFieldInputType::setValue):
2339         (WebCore::TextFieldInputType::dispatchChangeEventInResponseToSetValue):
2340         * html/TextFieldInputType.h:
2341
2342 2011-09-08  Annie Sullivan  <sullivan@chromium.org>
2343
2344         Crashes in WebCore::InsertNodeBeforeCommand constructor.
2345         https://bugs.webkit.org/show_bug.cgi?id=67763
2346
2347         Reviewed by Ryosuke Niwa.
2348
2349         Changes editableRootForPosition() to use the position's containerNode instead of deprecatedNode so that
2350         positions which are before or after a given node cannot return that node as the editable root.
2351
2352         Test: editing/inserting/insert-paragraph-selection-outside-contenteditable.html
2353
2354         * editing/htmlediting.cpp:
2355         (WebCore::editableRootForPosition): use containerNode instead of deprecatedNode.
2356
2357 2011-09-08  James Weatherall  <wez@chromium.org>
2358
2359         Release the reference to the HTMLPlugInElement's script object, when the element is removed from the document.  This breaks a cyclical reference that would otherwise cause the element to be retained until the document is torn down.
2360         https://bugs.webkit.org/show_bug.cgi?id=66181
2361
2362         Reviewed by Anders Carlsson.
2363
2364         No new tests - no functional change.
2365
2366         * html/HTMLPlugInElement.cpp:
2367         (WebCore::HTMLPlugInElement::removedFromDocument):
2368         * html/HTMLPlugInElement.h:
2369
2370 2011-09-08  Daniel Bates  <dbates@webkit.org>
2371
2372         XSS filter bypass via non-standard URL encoding
2373         https://bugs.webkit.org/show_bug.cgi?id=66588
2374
2375         Reviewed by Adam Barth.
2376
2377         Tests: http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair.html
2378                http/tests/security/xssAuditor/script-tag-with-16bit-unicode.html
2379                http/tests/security/xssAuditor/script-tag-with-16bit-unicode2.html
2380                http/tests/security/xssAuditor/script-tag-with-16bit-unicode3.html
2381                http/tests/security/xssAuditor/script-tag-with-16bit-unicode4.html
2382                http/tests/security/xssAuditor/script-tag-with-16bit-unicode5.html
2383                http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode.html
2384                http/tests/security/xssAuditor/window-open-without-url-should-not-assert.html
2385
2386         Implement support for decoding non-standard 16-bit Unicode escape sequences of
2387         the form %u26C4 as described in <http://www.w3.org/International/iri-edit/draft-duerst-iri.html#anchor29>.
2388
2389         See also <http://en.wikipedia.org/wiki/Percent-encoding#Non-standard_implementations>.
2390
2391         * GNUmakefile.list.am: Added DecodeEscapeSequences.h.
2392         * WebCore.gypi: Ditto.
2393         * WebCore.pro: Ditto.
2394         * WebCore.vcproj/WebCore.vcproj: Ditto.
2395         * WebCore.xcodeproj/project.pbxproj: Ditto.
2396         * html/parser/XSSAuditor.cpp:
2397         (WebCore::decode16BitUnicodeEscapeSequences): Added.
2398         (WebCore::decodeStandardURLEscapeSequences): Added.
2399         (WebCore::fullyDecodeString): Modified to call decode16BitUnicodeEscapeSequences().
2400         (WebCore::XSSAuditor::init): Modified to return early when the URL of the document
2401         is the empty string. This can happen when opening a new browser window or calling
2402         window.open("").
2403         * platform/KURL.cpp:
2404         (WebCore::decodeURLEscapeSequences): Abstracted code into template-function decodeEscapeSequences().
2405         This function just calls decodeEscapeSequences<URLEscapeSequence>().
2406         * platform/text/DecodeEscapeSequences.h: Added.
2407         (WebCore::Unicode16BitEscapeSequence::findInString):
2408         (WebCore::Unicode16BitEscapeSequence::matchStringPrefix):
2409         (WebCore::Unicode16BitEscapeSequence::decodeRun):
2410         (WebCore::URLEscapeSequence::findInString):
2411         (WebCore::URLEscapeSequence::matchStringPrefix):
2412         (WebCore::URLEscapeSequence::decodeRun):
2413         (WebCore::decodeEscapeSequences):
2414
2415 2011-09-08  Adam Barth  <abarth@webkit.org>
2416
2417         DocumentWriter::deprecatedFrameEncoding doesn't need to refert to Settings
2418         https://bugs.webkit.org/show_bug.cgi?id=67812
2419
2420         Reviewed by Eric Seidel.
2421
2422         The one caller of this function does this work already.
2423
2424         * loader/DocumentWriter.cpp:
2425         (WebCore::DocumentWriter::deprecatedFrameEncoding):
2426
2427 2011-09-08  Adam Klein  <adamk@chromium.org>
2428
2429         Always zero-out m_sortedTextBoxesPosition to avoid uninitialized read in TextIterator
2430         https://bugs.webkit.org/show_bug.cgi?id=67810
2431
2432         Reviewed by Tony Chang.
2433
2434         Reported as a valgrind failure in http://crbug.com/84777.
2435
2436         No possible change in behavior, so no tests. The unitialized read
2437         could never have an impact:
2438
2439            if (m_sortedTextBoxesPosition + 1 < m_sortedTextBoxes.size()) ...
2440
2441         Since m_sortedTextBoxes.size() will be zero here if
2442         m_sortedTextBoxesPosition is uninitialized, and they're both unsigned,
2443         so no possible value of m_sortedTextBoxesPosition could be < 0.
2444
2445         * editing/TextIterator.cpp:
2446         (WebCore::TextIterator::TextIterator):
2447
2448 2011-09-08  Tony Chang  <tony@chromium.org>
2449
2450         Cleanup of switch statements with default cases
2451         https://bugs.webkit.org/show_bug.cgi?id=67808
2452
2453         Reviewed by Adam Barth.
2454
2455         No new tests, just a small refactoring.
2456
2457         * page/WebKitAnimation.cpp:
2458         (WebCore::WebKitAnimation::fillMode):
2459         * platform/audio/Distance.cpp:
2460         (WebCore::DistanceEffect::gain):
2461
2462 2011-09-08  Eric Seidel  <eric@webkit.org>
2463
2464         [BiDi] Add support for the BDI element
2465         https://bugs.webkit.org/show_bug.cgi?id=50913
2466
2467         Reviewed by Ryosuke Niwa.
2468
2469         This patch is ridiculously trivial now that we have unicode-bidi: isolate support in WebKit.
2470
2471         Test: css3/bdi-element.html
2472
2473         * css/html.css:
2474         (bdi):
2475
2476 2011-09-08  David Levin  <levin@chromium.org>
2477
2478         [chromium] KURL::copy doesn't produce something usable on another thread.
2479         https://bugs.webkit.org/show_bug.cgi?id=67809
2480
2481         Reviewed by Adam Barth.
2482
2483         No new functionality exposed so no new test. This was caught by testing code: the thread
2484         sanitizer run in Chromium (http://code.google.com/p/chromium/issues/detail?id=93708).
2485
2486         * platform/KURLGoogle.cpp:
2487         (WebCore::KURLGooglePrivate::copyTo): Clear out the invalid String so that it will
2488         not be used on another thread.
2489
2490 2011-09-08  Alexey Proskuryakov  <ap@apple.com>
2491
2492         REGRESSION (r66874): Missing RefPtr in ScriptController
2493         https://bugs.webkit.org/show_bug.cgi?id=67748
2494
2495         Reviewed by Adam Barth.
2496
2497         * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript):
2498
2499 2011-09-08  Adam Barth  <abarth@webkit.org>
2500
2501         Second attempt to fix Chromium build.
2502
2503         * dom/Document.h:
2504
2505 2011-09-08  Oliver Hunt  <oliver@apple.com>
2506
2507         Use bump allocator for initial property storage
2508         https://bugs.webkit.org/show_bug.cgi?id=67494
2509
2510         Reviewed by Geoffrey Garen.
2511
2512         Add a forwarding header.
2513
2514         * ForwardingHeaders/runtime/StorageBarrier.h: Added.
2515
2516 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
2517
2518         Unreviewed, rolling out r94809.
2519         http://trac.webkit.org/changeset/94809
2520         https://bugs.webkit.org/show_bug.cgi?id=67718
2521
2522         commit _still_ premature, despite CQ eagerness
2523
2524         * html/HTMLAttributeNames.in:
2525         * html/HTMLStyleElement.cpp:
2526         * html/HTMLStyleElement.h:
2527         * html/HTMLStyleElement.idl:
2528
2529 2011-09-08  Sam Weinig  <sam@webkit.org>
2530
2531         Remove the Completion object from JSC, I have never liked it
2532         https://bugs.webkit.org/show_bug.cgi?id=67755
2533
2534         Reviewed by Gavin Barraclough.
2535
2536         * bindings/js/JSDOMBinding.cpp:
2537         (WebCore::reportException):
2538         * bindings/js/JSEventListener.cpp:
2539         (WebCore::JSEventListener::handleEvent):
2540         * bindings/js/JSInjectedScriptManager.cpp:
2541         (WebCore::InjectedScriptManager::createInjectedScript):
2542         * bindings/js/JSMainThreadExecState.h:
2543         (WebCore::JSMainThreadExecState::evaluate):
2544         * bindings/js/ScriptController.cpp:
2545         (WebCore::ScriptController::evaluateInWorld):
2546         * bindings/js/WorkerScriptController.cpp:
2547         (WebCore::WorkerScriptController::evaluate):
2548         * bindings/objc/WebScriptObject.mm:
2549         (-[WebScriptObject evaluateWebScript:]):
2550         * bridge/NP_jsobject.cpp:
2551         (_NPN_Evaluate):
2552         * bridge/jni/jni_jsobject.mm:
2553         (JavaJSObject::eval):
2554
2555 2011-09-08  Adam Barth  <abarth@webkit.org>
2556
2557         Inline DocumentWriter::encoding() into it's only caller: deprecatedFrameEncoding()
2558         https://bugs.webkit.org/show_bug.cgi?id=67807
2559
2560         Reviewed by Eric Seidel.
2561
2562         This function is super nutty.  We don't want any more folks to call it
2563         thinking that it does something sane.
2564
2565         * loader/DocumentWriter.cpp:
2566         (WebCore::DocumentWriter::deprecatedFrameEncoding):
2567         * loader/DocumentWriter.h:
2568
2569 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
2570
2571         <style scoped>: Add 'scoped' attribute
2572         https://bugs.webkit.org/show_bug.cgi?id=67718
2573
2574         Add 'scoped' attribute to IDL and attribute list,
2575         implement and test setting/resetting of the attribute.
2576
2577         Reviewed by Dimitri Glazkov.
2578
2579         Test: fast/css/style-scoped/basic-attribute.html
2580
2581         * html/HTMLAttributeNames.in:
2582         * html/HTMLStyleElement.cpp:
2583         (WebCore::HTMLStyleElement::scoped):
2584         (WebCore::HTMLStyleElement::setScoped):
2585         (WebCore::HTMLStyleElement::scopingElement):
2586         * html/HTMLStyleElement.h:
2587         * html/HTMLStyleElement.idl:
2588
2589 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2590
2591         Unreviewed, rolling out r94781.
2592         http://trac.webkit.org/changeset/94781
2593         https://bugs.webkit.org/show_bug.cgi?id=67806
2594
2595         Broke Objective-C binding on Mac (Requested by rniwa on
2596         #webkit).
2597
2598         * dom/Element.idl:
2599         * dom/Node.cpp:
2600         (WebCore::Node::contains):
2601         * dom/Node.idl:
2602         * editing/DeleteSelectionCommand.cpp:
2603         (WebCore::DeleteSelectionCommand::mergeParagraphs):
2604
2605 2011-09-08  Eric Seidel  <eric@webkit.org>
2606
2607         Remove DocumentWriter::setDecoder as a grep of WebKit shows no callers
2608         https://bugs.webkit.org/show_bug.cgi?id=67803
2609
2610         Reviewed by Adam Barth.
2611
2612         Smells like dead code.
2613
2614         * loader/DocumentWriter.cpp:
2615         * loader/DocumentWriter.h:
2616
2617 2011-09-08  Shinya Kawanaka  <shinyak@google.com>
2618
2619         Crashes in WebCore::ReplaceSelectionCommand::doApply
2620         https://bugs.webkit.org/show_bug.cgi?id=67762
2621
2622         Reviewed by Ryosuke Niwa.
2623
2624         WebCore::enclosingBlock may return null, but its return value was not checked. This patch checks it.
2625
2626         Tests: editing/inserting/insert-without-enclosing-block.html
2627
2628         * editing/ReplaceSelectionCommand.cpp:
2629         (WebCore::ReplaceSelectionCommand::doApply): Added null check.
2630
2631 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2632
2633         Unreviewed, rolling out r94784.
2634         http://trac.webkit.org/changeset/94784
2635         https://bugs.webkit.org/show_bug.cgi?id=67796
2636
2637         Commit was premature (Requested by rolandsteiner on #webkit).
2638
2639         * html/HTMLAttributeNames.in:
2640         * html/HTMLStyleElement.cpp:
2641         * html/HTMLStyleElement.h:
2642         * html/HTMLStyleElement.idl:
2643
2644 2011-09-08  W. James MacLean  <wjmaclean@chromium.org>
2645
2646         [chromium] Add backend compositor support for rescaling (zooming) textures during zoom animation.
2647         https://bugs.webkit.org/show_bug.cgi?id=66472
2648
2649         This patch contains plumbing from Internals to WebViewImpl that can be removed
2650         at a later time when the zoom animator code is complete.
2651
2652         Reviewed by James Robinson.
2653
2654         Test: platform/chromium/compositing/zoom-animator-scale-test.html
2655
2656         * page/Settings.cpp:
2657         (WebCore::Settings::Settings):
2658         * page/Settings.h:
2659         (WebCore::Settings::setZoomAnimatorScale):
2660         (WebCore::Settings::zoomAnimatorScale):
2661         * platform/graphics/chromium/LayerRendererChromium.cpp:
2662         (WebCore::LayerRendererChromium::LayerRendererChromium):
2663         (WebCore::LayerRendererChromium::drawLayersInternal):
2664         * platform/graphics/chromium/LayerRendererChromium.h:
2665         (WebCore::LayerRendererChromium::setZoomAnimatorScale):
2666         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2667         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2668         (WebCore::CCLayerTreeHost::commitTo):
2669         (WebCore::CCLayerTreeHost::setZoomAnimatorScale):
2670         (WebCore::CCLayerTreeHost::updateLayers):
2671         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2672         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2673         (WebCore::CCLayerTreeHostImpl::setZoomAnimatorScale):
2674         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2675         * testing/Internals.cpp:
2676         (WebCore::Internals::setZoomAnimatorScale):
2677         * testing/Internals.h:
2678         * testing/Internals.idl:
2679
2680 2011-09-08  Eric Carlson  <eric.carlson@apple.com>
2681
2682         HTMLMediaElement is missing initialTime attribute
2683         https://bugs.webkit.org/show_bug.cgi?id=67791
2684
2685         Reviewed by Darin Adler.
2686
2687         Test: media/media-initialTime.html
2688
2689         * html/HTMLMediaElement.cpp:
2690         (WebCore::HTMLMediaElement::initialTime):
2691         * html/HTMLMediaElement.h:
2692         * html/HTMLMediaElement.idl:
2693         * platform/graphics/MediaPlayer.cpp:
2694         (WebCore::MediaPlayer::initialTime):
2695         * platform/graphics/MediaPlayer.h:
2696         * platform/graphics/MediaPlayerPrivate.h:
2697         (WebCore::MediaPlayerPrivateInterface::initialTime):
2698
2699 2011-09-03  Robert Hogan  <robert@webkit.org>
2700
2701         Elements with position:absolute don't move to correct position after images load
2702         https://bugs.webkit.org/show_bug.cgi?id=54611
2703
2704         Reviewed by Simon Fraser.
2705
2706         Test: fast/block/positioning/absolute-layout-after-image-load.html
2707
2708         In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, 
2709         this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires 
2710         the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. 
2711         There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. 
2712
2713         Note: Although the issue is encountered only on first load without a fragment identifier, it 
2714         happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so 
2715         because scrolling to the fragment always happens before the image has loaded, rendering the page 
2716         and clearing the initial dirty bits in the positioned element's renderer. When the image finally 
2717         loads in this scenario, the positioned element is otherwise clean and relies on the above code to get 
2718         re-rendered.
2719
2720         Note: This was originally landed in r94755 but positioned-float-layout-after-image-load.html exposed
2721               an ASSERT bug, unrelated to this change, and was rolled out. That issue is tracked separately
2722               in bug 67759.
2723
2724         * rendering/RenderBlock.cpp:
2725         (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when 
2726                                                          deciding whether to mark children for layout
2727
2728 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
2729
2730         <style scoped>: Add 'scoped' attribute
2731         https://bugs.webkit.org/show_bug.cgi?id=67718
2732
2733         Add 'scoped' attribute to IDL and attribute list,
2734         implement and test setting/resetting of the attribute.
2735
2736         Reviewed by Dimitri Glazkov.
2737
2738         Test: fast/css/style-scoped/basic-attribute.html
2739
2740         * html/HTMLAttributeNames.in:
2741         * html/HTMLStyleElement.cpp:
2742         (WebCore::HTMLStyleElement::scoped):
2743         (WebCore::HTMLStyleElement::setScoped):
2744         (WebCore::HTMLStyleElement::scopingElement):
2745         * html/HTMLStyleElement.h:
2746         * html/HTMLStyleElement.idl:
2747
2748 2011-09-08  Erik Arvidsson  <arv@chromium.org>
2749
2750         Move Element.contains to Node
2751         https://bugs.webkit.org/show_bug.cgi?id=67651
2752
2753         Reviewed by Darin Adler.
2754
2755         This moves the contains method from Element to Node as in the DOM4 working draft: 
2756         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains
2757
2758         This also special cases Document contains to make it O(1) instead of O(depth).
2759
2760         Tests: fast/dom/Node/contains-method.html
2761                perf/document-contains.html
2762
2763         * dom/Element.idl:
2764         * dom/Node.cpp:
2765         (WebCore::Node::contains): Added document special case.
2766         * dom/Node.idl:
2767         * editing/DeleteSelectionCommand.cpp:
2768         (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check.
2769
2770 2011-09-08  Chris Rogers  <crogers@google.com>
2771
2772         Check AudioContext createChannelMerger() for thread safety
2773         https://bugs.webkit.org/show_bug.cgi?id=67247
2774
2775         Reviewed by Kenneth Russell.
2776
2777         Test: webaudio/audiochannelmerger-stereo.html
2778
2779         * webaudio/AudioChannelMerger.cpp:
2780         (WebCore::AudioChannelMerger::process):
2781         (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput):
2782         * webaudio/AudioChannelMerger.h:
2783
2784 2011-09-08  Ned Holbrook  <nholbrook@apple.com>
2785
2786         Refactor hyphen measurement
2787         https://bugs.webkit.org/show_bug.cgi?id=67728
2788
2789         Reviewed by Darin Adler.
2790
2791         No new tests, purely refactoring.
2792
2793         * rendering/RenderBlockLineLayout.cpp:
2794         (WebCore::measureHyphenWidth): Added.
2795         (WebCore::setLogicalWidthForTextRun): Use measureHyphenWidth().
2796         (WebCore::tryHyphenating): Ditto.
2797         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Ditto.
2798
2799 2011-09-08  Julien Chaffraix  <jchaffraix@webkit.org>
2800
2801         Remove LayoutStateDisabler instances from RenderLayer
2802         https://bugs.webkit.org/show_bug.cgi?id=66896
2803
2804         Reviewed by Simon Fraser.
2805
2806         As part of r93614, scrollTo does not call updateLayerPositions anymore.
2807         This means that we don't need to disable LayoutState from the scrolling code
2808         in RenderLayer.
2809
2810         This change is covered by the existing tests.
2811
2812         * rendering/RenderLayer.cpp:
2813         (WebCore::RenderLayer::updateLayerPositions): Updated the comment
2814         that was not accurate anymore. Also explained what is wrong with
2815         LayoutState vs RenderLayer now. Note that the ASSERT is still
2816         valid and will not trigger as the remaining calls to updateLayerPositions
2817         are done *outside* layout() where LayoutState is not set (thus disabled).
2818
2819         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed
2820         2 LayoutStateDisabler surrounding scrollToOffset.
2821
2822 2011-09-08  Julien Chaffraix  <jchaffraix@webkit.org>
2823
2824         Factor out the code to get the first non-null RenderTableSection in RenderTable
2825         https://bugs.webkit.org/show_bug.cgi?id=66972
2826
2827         Reviewed by Darin Adler.
2828
2829         Refactoring only, covered by existing tests.
2830
2831         * accessibility/AccessibilityTable.cpp:
2832         (WebCore::AccessibilityTable::addChildren):
2833         (WebCore::AccessibilityTable::cellForColumnAndRow):
2834         * accessibility/AccessibilityTableCell.cpp:
2835         (WebCore::AccessibilityTableCell::rowIndexRange):
2836         Updated those for the signature change in sectionBelow. Also added
2837         a FIXME where topSection should be used instead of iterating
2838         over the section (and likely missing some corner cases).
2839
2840         * rendering/FixedTableLayout.cpp:
2841         (WebCore::FixedTableLayout::calcWidthArray):
2842         * rendering/RenderTable.cpp:
2843         (WebCore::RenderTable::calcBorderStart):
2844         (WebCore::RenderTable::calcBorderEnd):
2845         (WebCore::RenderTable::outerBorderBefore):
2846         (WebCore::RenderTable::sectionAbove):
2847         (WebCore::RenderTable::sectionBelow):
2848         (WebCore::RenderTable::firstLineBoxBaseline):
2849         Updated all those functions to use the newly added functions. Also changed
2850         the variable names to match the functions.
2851
2852         (WebCore::RenderTable::layout):
2853         (WebCore::RenderTable::topNonEmptySection): Newly added function
2854         that returns the top non null section of the table that has at least a
2855         row.
2856
2857         (WebCore::RenderTable::cellAbove):
2858         (WebCore::RenderTable::cellBelow):
2859         Update the signature of those 2 functions to take an enum as it makes the
2860         rest of the code more readable.
2861
2862         * rendering/RenderTable.h:
2863         (WebCore::RenderTable::topSection): Newly added function to return
2864         the top non null section in the table.
2865
2866 2011-04-19  Eric Seidel  <eric@webkit.org>
2867
2868         Reviewed by Ryosuke Niwa.
2869
2870         [BiDi] [CSS3] MASTER: Add support for the unicode-bidi:isolate CSS property
2871         https://bugs.webkit.org/show_bug.cgi?id=50912
2872
2873         This patch adds support for CSS3 unicode-bidi: isolate property, under the -webkit- vendor prefix.
2874         Parsing support was added in a previous patch, this wires up the RenderStyle values
2875         to code changes in the BidiResolver.
2876
2877         The effect of this patch is that it makes it possible to "isolate" runs of text
2878         so that their RTL-ness or LTR-ness does not bleed out into the rest of your text
2879         and effect layout.  This is important because many unicode characters (like parenthesis, ':', '-', etc.)
2880         do not have intrinsic directionality and are affected by whatever characters come before/after.
2881         If you have usernames which include RTL text, if you inject those usernames in your page
2882         you might end up with nearby characters moving!
2883         (like 'RTL USERNAME - my awesome site' as a title, could end up as
2884         'my awesome site - USERNAME RTL' when correct would be 'USERNAME RTL - my awesome site'.)
2885         This patch makes it possible to wrap sections of text in isolated spans, so that
2886         they correctly order all their RTL/LTR contents, but also correctly participate in the
2887         larger RTL/LTR ordering without affecting nearby characters.
2888
2889         Because much of this code is old and rarely touched, I've included extra background
2890         information in hopes of expanding my set of potential reviewers:
2891
2892         WebKit uses the standard "Unicode Bidi Algorithm" henceforth known as the UBA.
2893         The UBA is defined at http://unicode.org/reports/tr9/ for those not faint of heart.
2894
2895         Text layout is done per-block (<div>, <p>, etc), and begins with a string of text
2896         (which in our case comes from the rendering tree) and a specified width.
2897         First:  Text is measured and wrapped into lines.
2898         Second: The UBA is run over the lines of text.
2899         Third:  WebKit builds InlineBoxes (its linebox tree) and eventually render the text.
2900
2901         This patch modifies our UBA to ignore all text content inside "isolated" inlines (treating them as neutral characters)
2902         and then adds another step after running the UBA, where we run the UBA recursively on any
2903         previously identified "isolated" content.
2904
2905         The result of the UBA is an ordered list of "runs" of text with the RTL runs
2906         correctly RTL and the LTR runs LTR.
2907
2908         The UBA does three things:
2909         1.  It assigns a "class" to each character in a text stream (like neutral, strongly-RTL, strongly-LTR, etc.)
2910         2.  Divides the text stream up into "runs" of characters of the same directionality (all RTL, all LTR).
2911         3.  Re-orders those runs.
2912
2913         The UBA in WebKit is implemented by BidiResolver<T> in BidiResolver.h
2914
2915         The InlineBidiResolver (BidiResolver specialization which knows about the rendering tree)
2916         walks along its InlineIterators, looking at each character and running the
2917         Unicode Bidi Algorithm (UBA).  It walks through the rendering tree subtree under
2918         a block, using a (poorly named) bidiNext function which returns the next inline object.
2919         Each inline object (or text character there-in) has a corresponding meaning in the UBA
2920         such as a "strong RTL" character or a "neutral" character.  The UBA reads these sequence
2921         of characters, and figures out what direction (RTL or LTR) to assign to any neutral
2922         characters it encounters, based on surrounding characters.
2923
2924         As the InlineBidiResolver is walking the rendering tree, the InlineIterator::advance()
2925         function calls bidiNext(), which in turn can call notifyObserverEnteredObject/notifyObserverWillExitObject
2926         notifying InlineBidiResolver that it is entering or exiting an "isolated"
2927         span, at which point it will either start or stop ignoring the stream of characters
2928         from the InlineIterator.  When the InlineBidiResolver is ignoring the stream of
2929         characters, instead of creating separate BidiRuns at each RTL/LTR boundary
2930         as it normally would, it instead creates one "fake" run for the entire
2931         isolated span.  These fake runs participate in the normal UBA run ordering process,
2932         but after the main UBA, a second pass is made where we examine
2933         the list of isolatedRuns() and run the UBA on each of them, replacing the fake
2934         run we previously inserted, with the resulting list of runs from that inner UBA run.
2935         The way it "ignores" characters is by treating them all as neutral when inside an isolate.
2936         Thus all the characters end up grouped in a single run, but their directionality (as a group)
2937         is correctly affected by any surrounding strong characters.
2938
2939         If you understood that last paragraph, than the rest of the change is just plumbing.
2940
2941         I added a huge number of FIXMEs to this code, because this code has a variety of
2942         design choices (or lack there of) which make some of this very difficult.
2943
2944         For example the bidiNext iterator function has two sets of mutually exclusive
2945         parameters and can be used optionally with or without an observer.  Prior to this
2946         change there was only ever one object which cared about observing a walk over inlines
2947         and that was InlineBidiResolver.  This patch (regretfully) templatizes bidiNext
2948         to support a new Observer type.  The correct fix would be to rip bidiNext into
2949         multiple functions and rip need for observation out of InlineBidiResolver.
2950         Unfortunately I've tried both in separate bugs and failed.  This code is very very
2951         old and very poorly understood.  We're slowly moving forward, this is another tiny step.
2952
2953         This is my fourth iteration of this patch (I'm happy to do more!), but I believe
2954         it's a good compromise between fixing all of the design gotcha's of our bidi
2955         system and doing the minimum amount to add this killer CSS feature.
2956
2957         I ran the PLT.  (It averaged 0.2% faster with this change, but I attribute that to noise).
2958
2959         Test: css3/unicode-bidi-isolate-basic.html and css3/unicode-bidi-isolate-aharon.html
2960
2961         * platform/text/BidiResolver.h:
2962         (WebCore::BidiCharacterRun::setNext):
2963          - Needed by the new replaceRunWithRuns function.
2964         (WebCore::BidiResolver::BidiResolver):
2965         (WebCore::BidiResolver::~BidiResolver):
2966         (WebCore::BidiResolver::enterIsolate):
2967         (WebCore::BidiResolver::exitIsolate):
2968         (WebCore::BidiResolver::inIsolate):
2969         (WebCore::BidiResolver::isolatedRuns):
2970          - Used to track isolated spans of text as they're encoutered.
2971            They're stuffed away here to be processed recursively
2972            after the main UBA has done its thang.
2973         (WebCore::::appendRun):
2974         (WebCore::::embed):
2975         (WebCore::::commitExplicitEmbedding):
2976         (WebCore::::createBidiRunsForLine):
2977         * platform/text/BidiRunList.h:
2978         (WebCore::::replaceRunWithRuns):
2979          - This effectively takes all the runs from one runlist and adds them to
2980            this one, replacing the fake run we inserted during a previous pass of the UBA.
2981          - This RunList now owns the runs, so we call clear() on the other RunList
2982            so that we don't end up double-freeing the runs.
2983         (WebCore::::clear):
2984          - This allows us to "take" runs from another run list and then clear it.
2985         * rendering/BidiRun.h:
2986         (WebCore::BidiRun::object):
2987         * rendering/InlineIterator.h:
2988         (WebCore::InlineIterator::object):
2989         (WebCore::InlineIterator::offset):
2990         (WebCore::notifyObserverEnteredObject): Mostly just renaming and adding a FIXME about plaintext.
2991         (WebCore::notifyObserverWillExitObject): Mostly just renaming.
2992         (WebCore::addPlaceholderRunForIsolatedInline):
2993         (WebCore::isIsolatedInline):
2994         (WebCore::InlineBidiResolver::appendRun):
2995         * rendering/RenderBlockLineLayout.cpp:
2996         (WebCore::statusWithDirection):
2997         (WebCore::constructBidiRuns):
2998          - This is the heavy-lifting of this change.  This function
2999            runs the UBA recursively on all the previously identified isolated spans.
3000          - If we encounter more isolated spans in our run, we just add them to the
3001            main list an keep going.  Because the runs are linked lists and we have
3002            direct pointers to our placeholder objects, we don't care what order
3003            we process the placeholders in, so long as when we're done, they're all processed.
3004         (WebCore::RenderBlock::layoutInlineChildren):
3005
3006 2011-09-08  Kentaro Hara  <haraken@google.com>
3007
3008         Implement a ProgressEvent constructor for JSC
3009         https://bugs.webkit.org/show_bug.cgi?id=67537
3010
3011         Reviewed by Sam Weinig.
3012
3013         The spec for the ProgressEvent constructor is here:
3014         http://www.w3.org/TR/progress-events/#interface-progressevent
3015
3016         Test: fast/events/constructors/progress-event-constructor.html
3017
3018         * bindings/generic/EventConstructors.h: Added a definition for the ProgressEvent constructor.
3019         * bindings/js/JSDictionary.cpp:
3020         (WebCore::JSDictionary::convertValue): Converts an ECMA-262 Number into an IDL unsigned long long value. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long
3021         * bindings/js/JSEventConstructors.cpp: Added #includes for ProgressEvent.
3022         * dom/ProgressEvent.cpp:
3023         (WebCore::ProgressEventInit::ProgressEventInit):
3024         (WebCore::ProgressEvent::ProgressEvent):
3025         * dom/ProgressEvent.h: Added a definition for ProgressEventInit.
3026         (WebCore::ProgressEvent::create):
3027         * dom/ProgressEvent.idl: Makes ProgressEvent constructible.
3028
3029 2011-09-08  Ryosuke Niwa  <rniwa@webkit.org>
3030
3031         Make bindings tests quiet after r94701.
3032
3033         * bindings/scripts/test/JS/JSTestInterface.cpp:
3034         * bindings/scripts/test/JS/JSTestInterface.h:
3035         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
3036         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3037         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3038         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
3039         * bindings/scripts/test/JS/JSTestObj.cpp:
3040         * bindings/scripts/test/JS/JSTestObj.h:
3041         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
3042         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3043         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3044         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
3045
3046 2011-09-07  Pavel Podivilov  <podivilov@chromium.org>
3047
3048         Web Inspector: get rid of RawSourceCode.createSourceMappingIfNeeded.
3049         https://bugs.webkit.org/show_bug.cgi?id=67717
3050
3051         Listen to SourceMappingUpdated event instead of using createSourceMappingIfNeeded.
3052
3053         Reviewed by Yury Semikhatsky.
3054
3055         * inspector/front-end/DebuggerPresentationModel.js:
3056         (WebInspector.DebuggerPresentationModel):
3057         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor):
3058         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
3059         (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping):
3060         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
3061         (WebInspector.DebuggerPresentationModel.prototype._restoreConsoleMessages):
3062         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
3063         (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded):
3064         (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage):
3065         (WebInspector.DebuggerPresentationModel.prototype._consoleCleared):
3066         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
3067         (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode):
3068         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
3069         (WebInspector.PresentationCallFrame.prototype.sourceLine.sourceMappingUpdated):
3070         (WebInspector.PresentationCallFrame.prototype.sourceLine):
3071         * inspector/front-end/SourceFile.js:
3072
3073 2011-09-06  Pavel Podivilov  <podivilov@chromium.org>
3074
3075         Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode.
3076         https://bugs.webkit.org/show_bug.cgi?id=67647
3077
3078         1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything.
3079         2) Add RawSourceCode unit tests.
3080         3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now).
3081
3082         Reviewed by Yury Semikhatsky.
3083
3084         Test: inspector/debugger/raw-source-code.html
3085
3086         * inspector/front-end/DebuggerPresentationModel.js:
3087         (WebInspector.DebuggerPresentationModel):
3088         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
3089         (WebInspector.DebuggerPresentationModel.prototype._addScript):
3090         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
3091         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
3092         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
3093         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
3094         * inspector/front-end/ScriptsPanel.js:
3095         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
3096         * inspector/front-end/SourceFile.js:
3097         (WebInspector.RawSourceCode):
3098         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
3099         (WebInspector.RawSourceCode.prototype.setFormatted):
3100         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
3101         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
3102
3103 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
3104
3105         Web Inspector: [REGRESSION] Clear console shortcut Ctrl + L broken
3106         https://bugs.webkit.org/show_bug.cgi?id=67711
3107
3108         Reviewed by Yury Semikhatsky.
3109
3110         * inspector/front-end/ConsoleView.js:
3111         (WebInspector.ConsoleView.prototype._consoleCleared):
3112         (WebInspector.ConsoleView.prototype._registerShortcuts):
3113         (WebInspector.ConsoleView.prototype._promptKeyDown):
3114
3115 2011-09-08  Andras Becsi  <andras.becsi@nokia.com>
3116
3117         [Qt] Build fails with strict compiler
3118         https://bugs.webkit.org/show_bug.cgi?id=67778
3119
3120         Reviewed by Csaba Osztrogon√°c.
3121
3122         No new tests needed.
3123
3124         * platform/graphics/TiledBackingStore.cpp:
3125         (WebCore::TiledBackingStore::resizeEdgeTiles): Remove unused contentsRect variable
3126         which's usage was removed in r94681 to fix the build with [-Werror=unused-but-set-variable].
3127
3128 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3129
3130         Unreviewed, rolling out r94695.
3131         http://trac.webkit.org/changeset/94695
3132         https://bugs.webkit.org/show_bug.cgi?id=67776
3133
3134         Hitting an assertion on Snow Leopard, Qt, GTK (Requested by
3135         Zoltan on #webkit).
3136
3137         * rendering/RenderBlock.cpp:
3138         (WebCore::RenderBlock::positionedFloatsNeedRelayout):
3139         (WebCore::RenderBlock::layoutPositionedObjects):
3140
3141 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
3142
3143         Unreviewed, strip trailing whitespace in the Web Inspector frontend (*.js and *.css).
3144
3145         * inspector/front-end/ApplicationCacheItemsView.js:
3146         * inspector/front-end/AuditResultView.js:
3147         * inspector/front-end/BinarySearch.js:
3148         * inspector/front-end/CSSStyleModel.js:
3149         * inspector/front-end/ConsoleMessage.js:
3150         * inspector/front-end/ConsoleModel.js:
3151         * inspector/front-end/ConsoleView.js:
3152         * inspector/front-end/CookieItemsView.js:
3153         * inspector/front-end/CookieParser.js:
3154         * inspector/front-end/DOMAgent.js:
3155         * inspector/front-end/DOMStorage.js:
3156         * inspector/front-end/DOMStorageItemsView.js:
3157         * inspector/front-end/DataGrid.js:
3158         * inspector/front-end/Database.js:
3159         * inspector/front-end/DatabaseQueryView.js:
3160         * inspector/front-end/DetailedHeapshotGridNodes.js:
3161         * inspector/front-end/DetailedHeapshotView.js:
3162         * inspector/front-end/ElementsTreeOutline.js:
3163         * inspector/front-end/EmptyView.js:
3164         * inspector/front-end/EventListenersSidebarPane.js:
3165         * inspector/front-end/ExtensionCommon.js:
3166         * inspector/front-end/GoToLineDialog.js:
3167         * inspector/front-end/HeapSnapshot.js:
3168         * inspector/front-end/HeapSnapshotProxy.js:
3169         * inspector/front-end/HeapSnapshotWorkerDispatcher.js:
3170         * inspector/front-end/ImageView.js:
3171         * inspector/front-end/InjectedFakeWorker.js:
3172         * inspector/front-end/InspectorFrontendHostStub.js:
3173         * inspector/front-end/MetricsSidebarPane.js:
3174         * inspector/front-end/NetworkManager.js:
3175         * inspector/front-end/NetworkPanel.js:
3176         * inspector/front-end/ObjectPropertiesSection.js:
3177         * inspector/front-end/PartialQuickSort.js:
3178         * inspector/front-end/ProfileView.js:
3179         * inspector/front-end/ProfilesPanel.js:
3180         * inspector/front-end/RemoteObject.js:
3181         * inspector/front-end/Resource.js:
3182         * inspector/front-end/ResourceCategory.js:
3183         * inspector/front-end/ResourceHTMLView.js:
3184         * inspector/front-end/ResourceHeadersView.js:
3185         * inspector/front-end/ResourceJSONView.js:
3186         * inspector/front-end/ResourceTimingView.js:
3187         * inspector/front-end/ResourceTreeModel.js:
3188         * inspector/front-end/ResourceView.js:
3189         * inspector/front-end/ResourcesPanel.js:
3190         * inspector/front-end/SearchController.js:
3191         * inspector/front-end/SettingsScreen.js:
3192         * inspector/front-end/ShortcutsScreen.js:
3193         * inspector/front-end/SourceCSSTokenizer.js:
3194         * inspector/front-end/SourceHTMLTokenizer.js:
3195         * inspector/front-end/SourceJavaScriptTokenizer.js:
3196         * inspector/front-end/StatusBarButton.js:
3197         * inspector/front-end/TextEditorModel.js:
3198         * inspector/front-end/TimelineGrid.js:
3199         * inspector/front-end/View.js:
3200         * inspector/front-end/heapProfiler.css:
3201         * inspector/front-end/inspector.css:
3202         * inspector/front-end/inspector.js:
3203         * inspector/front-end/inspectorSyntaxHighlight.css:
3204         * inspector/front-end/networkPanel.css:
3205         * inspector/front-end/treeoutline.js:
3206         * inspector/front-end/utilities.js:
3207
3208 2011-09-07  Andrey Kosyakov  <caseq@chromium.org>
3209
3210         Web Inspector: trying to scroll mouse wheel when in TextViewer's gutter pane causes EventException::DISPATCH_REQUEST_ERR
3211         https://bugs.webkit.org/show_bug.cgi?id=67715
3212
3213         Reviewed by Yury Semikhatsky.
3214
3215         - avoid exception on attempt to dispatch an event that is being dispatched by cloning the event.
3216
3217         * inspector/front-end/TextViewer.js:
3218         (WebInspector.TextViewer.forwardWheelEvent):
3219         (WebInspector.TextViewer):
3220
3221 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
3222
3223         Unreviewed, rolling out r94674 and r94689.
3224         http://trac.webkit.org/changeset/94674
3225         http://trac.webkit.org/changeset/94689
3226         https://bugs.webkit.org/show_bug.cgi?id=67754
3227
3228         Broke inspector/debugger/script-formatter.html (Requested by
3229         rniwa on #webkit).
3230
3231         * inspector/front-end/DebuggerPresentationModel.js:
3232         (WebInspector.DebuggerPresentationModel):
3233         (WebInspector.DebuggerPresentationModel.prototype.addSourceMappingListener):
3234         (WebInspector.DebuggerPresentationModel.prototype.removeSourceMappingListener):
3235         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
3236         (WebInspector.DebuggerPresentationModel.prototype._addScript):
3237         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
3238         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
3239         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
3240         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
3241         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
3242         * inspector/front-end/ScriptsPanel.js:
3243         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
3244         * inspector/front-end/SourceFile.js:
3245         (WebInspector.RawSourceCode):
3246         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
3247         (WebInspector.RawSourceCode.prototype.get rawSourceCode):
3248         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
3249         (WebInspector.RawSourceCode.prototype.requestContent):
3250         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
3251
3252 2011-09-07  Julien Chaffraix  <jchaffraix@webkit.org>
3253
3254         offsetFromRoot optimization is disabled after r93837
3255         https://bugs.webkit.org/show_bug.cgi?id=67677
3256
3257         Reviewed by Simon Fraser.
3258
3259         Unfortunately not covered by any test as it does not change updateLayerPosition complexity (it is still O(n^2)
3260         because of clippedOverflowRectForRepaint). However it is a noticeable slowdown on some use cases but we don't
3261         have a good test harness to cover such slowdown.
3262
3263         * rendering/RenderLayer.cpp:
3264         (WebCore::RenderLayer::updateLayerPositions): Pass offsetFromRoot as not doing so means that we miss
3265         the optimization altogether.
3266
3267         (WebCore::RenderLayer::computeRepaintRects):
3268         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
3269         * rendering/RenderLayer.h:
3270         Renamed |cachedOffset| to |offsetFromRoot| to be consistent with our latest renaming.
3271
3272 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
3273
3274         Windows build fix after r94737.
3275
3276         * rendering/RenderBlock.cpp:
3277         (WebCore::RenderBlock::adjustRectForColumns):
3278
3279 2011-09-07  Dan Bernstein  <mitz@apple.com>
3280
3281         Removed hyphenation function implementations for an usupported build configuration.
3282
3283         Reviewed by Sam Weinig.
3284
3285         * platform/text/cf/HyphenationCF.cpp:
3286
3287 2011-09-07  David Hyatt  <hyatt@apple.com>
3288
3289         https://bugs.webkit.org/show_bug.cgi?id=67739
3290
3291         adjustRectForColumns is O(# of columns) when it can be O(1). Fix the slow performance of this
3292         function by removing the loop and just computing the start and end column for a repaint rect
3293         and uniting everything in between.
3294
3295         Reviewed by Dan Bernstein.
3296
3297         * rendering/RenderBlock.cpp:
3298         (WebCore::RenderBlock::adjustRectForColumns):
3299
3300 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
3301
3302         Unreviewed, rolling out r94714 and r94723.
3303         http://trac.webkit.org/changeset/94714
3304         http://trac.webkit.org/changeset/94723
3305         https://bugs.webkit.org/show_bug.cgi?id=67746
3306
3307         breaks gtk-linux tests with assertion failure (Requested by
3308         thorton on #webkit).
3309
3310         * platform/graphics/GraphicsContext.cpp:
3311         (WebCore::GraphicsContext::GraphicsContext):
3312         (WebCore::GraphicsContext::~GraphicsContext):
3313         * platform/graphics/GraphicsContext.h:
3314         (WebCore::GraphicsContext::inTransparencyLayer):
3315         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3316         (WebCore::GraphicsContext::beginTransparencyLayer):
3317         (WebCore::GraphicsContext::endTransparencyLayer):
3318         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3319         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
3320         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
3321         * platform/graphics/cg/GraphicsContextCG.cpp:
3322         (WebCore::GraphicsContext::beginTransparencyLayer):
3323         (WebCore::GraphicsContext::endTransparencyLayer):
3324         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
3325         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3326         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
3327         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
3328         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
3329         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3330         (WebCore::GraphicsContext::beginTransparencyLayer):
3331         (WebCore::GraphicsContext::endTransparencyLayer):
3332         * platform/graphics/mac/FontMac.mm:
3333         (WebCore::Font::drawGlyphs):
3334         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3335         (WebCore::GraphicsContext::beginTransparencyLayer):
3336         (WebCore::GraphicsContext::endTransparencyLayer):
3337         * platform/graphics/qt/GraphicsContextQt.cpp:
3338         (WebCore::GraphicsContext::inTransparencyLayer):
3339         (WebCore::GraphicsContext::beginTransparencyLayer):
3340         (WebCore::GraphicsContext::endTransparencyLayer):
3341         * platform/graphics/skia/GraphicsContextSkia.cpp:
3342         (WebCore::GraphicsContext::beginTransparencyLayer):
3343         (WebCore::GraphicsContext::endTransparencyLayer):
3344         * platform/graphics/win/FontCGWin.cpp:
3345         (WebCore::drawGDIGlyphs):
3346         * platform/graphics/win/GraphicsContextCGWin.cpp:
3347         (WebCore::GraphicsContext::releaseWindowsContext):
3348         * platform/graphics/win/GraphicsContextCairoWin.cpp:
3349         (WebCore::GraphicsContext::releaseWindowsContext):
3350         * platform/graphics/win/GraphicsContextWin.cpp:
3351         (WebCore::GraphicsContext::inTransparencyLayer):
3352         (WebCore::GraphicsContext::getWindowsContext):
3353         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3354         (WebCore::GraphicsContext::beginTransparencyLayer):
3355         (WebCore::GraphicsContext::endTransparencyLayer):
3356         * platform/graphics/wx/GraphicsContextWx.cpp:
3357         (WebCore::GraphicsContext::beginTransparencyLayer):
3358         (WebCore::GraphicsContext::endTransparencyLayer):
3359         * platform/win/ScrollbarThemeWin.cpp:
3360         (WebCore::ScrollbarThemeWin::paintTrackPiece):
3361         (WebCore::ScrollbarThemeWin::paintButton):
3362         (WebCore::ScrollbarThemeWin::paintThumb):
3363         * plugins/win/PluginViewWin.cpp:
3364         (WebCore::PluginView::paint):
3365         * rendering/RenderThemeWin.cpp:
3366         (WebCore::drawControl):
3367
3368 2011-09-07  Chris Fleizach  <cfleizach@apple.com>
3369
3370         Changes to aria-hidden don't change VO navigation
3371         https://bugs.webkit.org/show_bug.cgi?id=67722
3372
3373         Reviewed by Darin Adler.
3374
3375         When altering aria-hidden, WebCore needs to update the children caches of 
3376         affected elements. However, for elements that were children, but ignored, their
3377         caches did not get updated, and stale information would be propagated.
3378
3379         The fix is to always clearChildren() when a parent is asking for children. This 
3380         ensures information is always up to date when the parent itself is asking for new data.
3381
3382         Test: accessibility/aria-hidden-updates-alldescendants.html
3383
3384         * accessibility/AccessibilityObject.h:
3385         * accessibility/AccessibilityRenderObject.cpp:
3386         (WebCore::AccessibilityRenderObject::ariaIsHidden):
3387         (WebCore::AccessibilityRenderObject::childrenChanged):
3388         (WebCore::AccessibilityRenderObject::addChildren):
3389
3390 2011-09-07  Tim Horton  <timothy_horton@apple.com>
3391
3392         Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow
3393         https://bugs.webkit.org/show_bug.cgi?id=67543
3394         <rdar://problem/10070536>
3395
3396         Reviewed by Simon Fraser.
3397
3398         Generalize (begin|end)TransparencyLayer, which now forward
3399         through to (begin|end)PlatformTransparencyLayer, so that
3400         isInTransparencyLayer can exist on every platform.
3401
3402         Make use of isInTransparencyLayer in FontMac to disable
3403         "simple" shadow drawing when the text is being rendered
3404         into a transparency layer.
3405
3406         Test: svg/custom/simple-text-double-shadow.svg
3407
3408         * platform/graphics/GraphicsContext.cpp:
3409         (WebCore::GraphicsContext::GraphicsContext):
3410         (WebCore::GraphicsContext::~GraphicsContext):
3411         (WebCore::GraphicsContext::beginTransparencyLayer):
3412         (WebCore::GraphicsContext::endTransparencyLayer):
3413         (WebCore::GraphicsContext::isInTransparencyLayer):
3414         * platform/graphics/GraphicsContext.h:
3415         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3416         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
3417         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
3418         (WebCore::GraphicsContext::supportsTransparencyLayers):
3419         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3420         * platform/graphics/cg/GraphicsContextCG.cpp:
3421         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
3422         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
3423         (WebCore::GraphicsContext::supportsTransparencyLayers):
3424         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
3425         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3426         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3427         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
3428         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
3429         (WebCore::GraphicsContext::supportsTransparencyLayers):
3430         * platform/graphics/mac/FontMac.mm:
3431         (WebCore::Font::drawGlyphs):
3432         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3433         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
3434         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
3435         (WebCore::GraphicsContext::supportsTransparencyLayers):
3436         * platform/graphics/qt/GraphicsContextQt.cpp:
3437         (WebCore::GraphicsContext::isInTransparencyLayer):
3438         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
3439         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
3440         (WebCore::GraphicsContext::supportsTransparencyLayers):
3441         * platform/graphics/skia/GraphicsContextSkia.cpp:
3442         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
3443         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
3444         (WebCore::GraphicsContext::supportsTransparencyLayers):
3445         * platform/graphics/win/FontCGWin.cpp:
3446         (WebCore::drawGDIGlyphs):
3447         * platform/graphics/win/GraphicsContextCGWin.cpp:
3448         (WebCore::GraphicsContext::releaseWindowsContext):
3449         * platform/graphics/win/GraphicsContextCairoWin.cpp:
3450         (WebCore::GraphicsContext::releaseWindowsContext):
3451         * platform/graphics/win/GraphicsContextWin.cpp:
3452         (WebCore::GraphicsContext::getWindowsContext):
3453         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3454         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
3455         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
3456         (WebCore::GraphicsContext::supportsTransparencyLayers):
3457         * platform/graphics/wx/GraphicsContextWx.cpp:
3458         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
3459         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
3460         (WebCore::GraphicsContext::supportsTransparencyLayers):
3461         * platform/win/ScrollbarThemeWin.cpp:
3462         * plugins/win/PluginViewWin.cpp:
3463         * rendering/RenderThemeWin.cpp:
3464
3465 2011-09-07  Dan Bernstein  <mitz@apple.com>
3466
3467         <rdar://problem/8881922> Support the hyphenate-limit-lines property
3468         https://bugs.webkit.org/show_bug.cgi?id=67730
3469
3470         Reviewed by Dave Hyatt.
3471
3472         Tests: fast/css/parsing-hyphenate-limit-lines.html
3473                fast/text/hyphenate-limit-lines.html
3474
3475         * css/CSSComputedStyleDeclaration.cpp:
3476         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added hyphenate-limit-lines.
3477         * css/CSSParser.cpp:
3478         (WebCore::CSSParser::parseValue): Ditto. Valid values are non-negative integers and the keyword
3479         "no-limit".
3480         * css/CSSPropertyNames.in: Added -webkit-hyphenate-limit-lines.
3481         * css/CSSStyleSelector.cpp:
3482         (WebCore::CSSStyleSelector::applyProperty): Added hyphenate-limit-lines.
3483         * css/CSSValueKeywords.in: Added the "no-limit" value keyword.
3484         * rendering/RenderBlock.h:
3485         * rendering/RenderBlockLineLayout.cpp:
3486         (WebCore::RenderBlock::layoutRunsAndFloats): Count the number of consecutive hyphenated lines
3487         before the start line and pass it to layoutRunsAndFloatsInRange().
3488         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Keep track of the number of consecutive
3489         hyphenated lines before the current line and pass it to LineBreaker::nextLineBreak().
3490         (WebCore::tryHyphenating): Added parameters for the number of consecutive hyphenated lines before
3491         the current line and the limit on consecutive hyphenated lines, and an early return if the limit
3492         has been reached.
3493         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Added a parameter for the number of consecutive
3494         hyphenated lines before the current line, which is passed through to tryHyphenating, along with
3495         the value of hyphenate-limit-lines.
3496         * rendering/RootInlineBox.cpp:
3497         (WebCore::RootInlineBox::isHyphenated): Added. Returns true if the line was hyphenated.
3498         * rendering/RootInlineBox.h:
3499         * rendering/style/RenderStyle.h:
3500         (WebCore::InheritedFlags::hyphenationLimitLines): Added this getter.
3501         (WebCore::InheritedFlags::setHyphenationLimitLines): Added this setter.
3502         (WebCore::InheritedFlags::initialHyphenationLimitLines): Added. The initial value is -1,
3503         corresponding to "no-limit".
3504         * rendering/style/StyleRareInheritedData.cpp:
3505         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Initialize new member variable.
3506         (WebCore::StyleRareInheritedData::operator==): Compare new member variable.
3507         * rendering/style/StyleRareInheritedData.h:
3508
3509 2011-09-02  Ojan Vafai  <ojan@chromium.org>
3510
3511         split overrideSize into overrideHeight and overrideWidth
3512         https://bugs.webkit.org/show_bug.cgi?id=67550
3513
3514         Reviewed by Sam Weinig.
3515
3516         All uses of overrideSize only set one of the width or the height.
3517         This change removes a bool from RenderObject and removes some
3518         flexbox specific logic from RenderBox.
3519
3520         The only downside is that we have two global maps where we used
3521         to have one.
3522
3523         No functional changes so existing tests are sufficient.
3524
3525         * rendering/RenderBox.cpp:
3526         (WebCore::RenderBox::hasOverrideHeight):
3527         (WebCore::RenderBox::hasOverrideWidth):
3528         (WebCore::RenderBox::setOverrideHeight):
3529         (WebCore::RenderBox::setOverrideWidth):
3530         (WebCore::RenderBox::clearOverrideSize):
3531         (WebCore::RenderBox::overrideWidth):
3532         (WebCore::RenderBox::overrideHeight):
3533         (WebCore::RenderBox::computeLogicalWidth):
3534         (WebCore::RenderBox::computeLogicalHeight):
3535         (WebCore::RenderBox::computePercentageLogicalHeight):
3536         * rendering/RenderBox.h:
3537         * rendering/RenderDeprecatedFlexibleBox.cpp:
3538         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3539         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3540         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
3541         * rendering/RenderFlexibleBox.cpp:
3542         (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenHorizontal):
3543         * rendering/RenderObject.cpp:
3544         (WebCore::RenderObject::RenderObject):
3545         * rendering/RenderObject.h:
3546         * rendering/RenderTableCell.cpp:
3547         (WebCore::RenderTableCell::setOverrideHeightFromRowHeight):
3548         * rendering/RenderTableCell.h:
3549         * rendering/RenderTableSection.cpp:
3550         (WebCore::RenderTableSection::calcRowLogicalHeight):
3551         (WebCore::RenderTableSection::layoutRows):
3552
3553 2011-09-07  Alexei Svitkine  <asvitkine@chromium.org>
3554
3555         Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path.
3556         https://bugs.webkit.org/show_bug.cgi?id=67511
3557
3558         Reviewed by Dimitri Glazkov.
3559
3560         Tests: platform/chromium-mac/rubberbanding/overhang-e.html
3561                platform/chromium-mac/rubberbanding/overhang-n.html
3562                platform/chromium-mac/rubberbanding/overhang-ne.html
3563                platform/chromium-mac/rubberbanding/overhang-nw.html
3564                platform/chromium-mac/rubberbanding/overhang-s.html
3565                platform/chromium-mac/rubberbanding/overhang-se.html
3566                platform/chromium-mac/rubberbanding/overhang-sw.html
3567                platform/chromium-mac/rubberbanding/overhang-w.html
3568
3569         * WebCore.exp.in:
3570         * platform/ScrollableArea.h:
3571         * testing/Internals.cpp:
3572         (WebCore::Internals::setScrollViewPosition):
3573         * testing/Internals.h:
3574         * testing/Internals.idl:
3575
3576 2011-09-07  David Reveman  <reveman@chromium.org>
3577
3578         [Chromium] Render surface anti-aliasing.
3579         https://bugs.webkit.org/show_bug.cgi?id=66437
3580
3581         Reviewed by James Robinson.
3582
3583         Add CCLayerQuad class and CCLayerQuad::Edge subclass to allow
3584         edge computations to be shared between tiled layers and render
3585         surfaces. Move isCCW utility function to FloatQuad class and
3586         add to2dTransform method to TransformationMatrix class. Add
3587         necessary anti-aliasing shaders for render surfaces and use them
3588         to avoid aliased edges.
3589
3590         Tests: compositing/reflections/nested-reflection-transformed.html (existing)
3591
3592         * WebCore.gypi:
3593         * platform/graphics/FloatQuad.cpp:
3594         (WebCore::FloatQuad::isCounterclockwise):
3595         * platform/graphics/FloatQuad.h:
3596         * platform/graphics/chromium/LayerChromium.cpp:
3597         (WebCore::LayerChromium::drawTexturedQuad):
3598         * platform/graphics/chromium/LayerChromium.h:
3599         * platform/graphics/chromium/LayerRendererChromium.cpp:
3600         (WebCore::LayerRendererChromium::LayerRendererChromium):
3601         (WebCore::LayerRendererChromium::headsUpDisplayProgram):
3602         (WebCore::LayerRendererChromium::renderSurfaceProgram):
3603         (WebCore::LayerRendererChromium::renderSurfaceProgramAA):
3604         (WebCore::LayerRendererChromium::renderSurfaceMaskProgram):
3605         (WebCore::LayerRendererChromium::renderSurfaceMaskProgramAA):
3606         (WebCore::LayerRendererChromium::tilerProgramSwizzle):
3607         (WebCore::LayerRendererChromium::canvasLayerProgram):
3608         (WebCore::LayerRendererChromium::pluginLayerProgram):
3609         (WebCore::LayerRendererChromium::videoLayerRGBAProgram):
3610         (WebCore::LayerRendererChromium::videoLayerYUVProgram):
3611         (WebCore::LayerRendererChromium::cleanupSharedObjects):
3612         * platform/graphics/chromium/LayerRendererChromium.h:
3613         (WebCore::LayerRendererChromium::sharedGeometryQuad):
3614         * platform/graphics/chromium/ShaderChromium.cpp:
3615         (WebCore::VertexShaderQuad::VertexShaderQuad):
3616         (WebCore::VertexShaderQuad::init):
3617         (WebCore::VertexShaderQuad::getShaderString):
3618         (WebCore::FragmentShaderRGBATexAlphaAA::FragmentShaderRGBATexAlphaAA):
3619         (WebCore::FragmentShaderRGBATexAlphaAA::init):
3620         (WebCore::FragmentShaderRGBATexAlphaAA::getShaderString):
3621         (WebCore::FragmentTexClampAlphaAABinding::FragmentTexClampAlphaAABinding):
3622         (WebCore::FragmentTexClampAlphaAABinding::init):
3623         (WebCore::FragmentShaderRGBATexClampAlphaAA::getShaderString):
3624         (WebCore::FragmentShaderRGBATexClampSwizzleAlphaAA::getShaderString):
3625         (WebCore::FragmentShaderRGBATexAlphaMaskAA::FragmentShaderRGBATexAlphaMaskAA):
3626         (WebCore::FragmentShaderRGBATexAlphaMaskAA::init):
3627         (WebCore::FragmentShaderRGBATexAlphaMaskAA::getShaderString):
3628         * platform/graphics/chromium/ShaderChromium.h:
3629         (WebCore::VertexShaderQuad::matrixLocation):
3630         (WebCore::VertexShaderQuad::pointLocation):
3631         (WebCore::FragmentShaderRGBATexAlphaAA::alphaLocation):
3632         (WebCore::FragmentShaderRGBATexAlphaAA::samplerLocation):
3633         (WebCore::FragmentShaderRGBATexAlphaAA::edgeLocation):
3634         (WebCore::FragmentShaderRGBATexAlphaMaskAA::alphaLocation):
3635         (WebCore::FragmentShaderRGBATexAlphaMaskAA::samplerLocation):
3636         (WebCore::FragmentShaderRGBATexAlphaMaskAA::maskSamplerLocation):
3637         (WebCore::FragmentShaderRGBATexAlphaMaskAA::edgeLocation):
3638         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
3639         (WebCore::CCCanvasLayerImpl::draw):
3640         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
3641         (WebCore::CCHeadsUpDisplay::draw):
3642         * platform/graphics/chromium/cc/CCLayerQuad.cpp: Added.
3643         (WebCore::CCLayerQuad::Edge::Edge):
3644         (WebCore::CCLayerQuad::CCLayerQuad):
3645         (WebCore::CCLayerQuad::floatQuad):
3646         (WebCore::CCLayerQuad::toFloatArray):
3647         * platform/graphics/chromium/cc/CCLayerQuad.h: Added.
3648         (WebCore::CCLayerQuad::Edge::Edge):
3649         (WebCore::CCLayerQuad::Edge::x):
3650         (WebCore::CCLayerQuad::Edge::y):
3651         (WebCore::CCLayerQuad::Edge::z):
3652         (WebCore::CCLayerQuad::Edge::setX):
3653         (WebCore::CCLayerQuad::Edge::setY):
3654         (WebCore::CCLayerQuad::Edge::setZ):
3655         (WebCore::CCLayerQuad::Edge::set):
3656         (WebCore::CCLayerQuad::Edge::moveX):
3657         (WebCore::CCLayerQuad::Edge::moveY):
3658         (WebCore::CCLayerQuad::Edge::moveZ):
3659         (WebCore::CCLayerQuad::Edge::move):
3660         (WebCore::CCLayerQuad::Edge::scaleX):
3661         (WebCore::CCLayerQuad::Edge::scaleY):
3662         (WebCore::CCLayerQuad::Edge::scaleZ):
3663         (WebCore::CCLayerQuad::Edge::scale):
3664         (WebCore::CCLayerQuad::Edge::intersect):
3665         (WebCore::CCLayerQuad::CCLayerQuad):
3666         (WebCore::CCLayerQuad::left):
3667         (WebCore::CCLayerQuad::top):
3668         (WebCore::CCLayerQuad::right):
3669         (WebCore::CCLayerQuad::bottom):
3670         (WebCore::CCLayerQuad::inflateX):
3671         (WebCore::CCLayerQuad::inflateY):
3672         (WebCore::CCLayerQuad::inflate):
3673         (WebCore::CCLayerQuad::inflateAntiAliasingDistance):
3674         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
3675         (WebCore::CCPluginLayerImpl::draw):
3676         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3677         (WebCore::CCRenderSurface::draw):
3678         (WebCore::CCRenderSurface::drawLayer):
3679         (WebCore::CCRenderSurface::drawSurface):
3680         * platform/graphics/chromium/cc/CCRenderSurface.h:
3681         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3682         (WebCore::CCTiledLayerImpl::draw):
3683         (WebCore::CCTiledLayerImpl::drawTiles):
3684         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3685         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3686         (WebCore::CCVideoLayerImpl::drawYUV):
3687         (WebCore::CCVideoLayerImpl::drawRGBA):
3688         * platform/graphics/transforms/TransformationMatrix.cpp:
3689         (WebCore::TransformationMatrix::to2dTransform):
3690         * platform/graphics/transforms/TransformationMatrix.h:
3691
3692 2011-09-06  Oliver Hunt  <oliver@apple.com>
3693
3694         Remove JSObjectWithGlobalObject
3695         https://bugs.webkit.org/show_bug.cgi?id=67689
3696
3697         Reviewed by Geoff Garen.
3698
3699         Remove use of anonymous storage and JSObjectWithGlobalObject for
3700         accessing a JSObject's global object now that they're available
3701         on the object's structure.
3702
3703         * bindings/js/JSDOMWindowShell.cpp:
3704         (WebCore::JSDOMWindowShell::setWindow):
3705         * bindings/js/JSDOMWrapper.h:
3706         (WebCore::JSDOMWrapper::globalObject):
3707         (WebCore::JSDOMWrapper::JSDOMWrapper):
3708         * bindings/js/WorkerScriptController.cpp:
3709         (WebCore::WorkerScriptController::initScript):
3710         * bindings/scripts/CodeGeneratorJS.pm:
3711         (GenerateHeader):
3712         (GenerateImplementation):
3713         * bridge/objc/objc_runtime.h:
3714         * bridge/objc/objc_runtime.mm:
3715         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
3716         (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
3717         * bridge/runtime_object.cpp:
3718         (JSC::Bindings::RuntimeObject::RuntimeObject):
3719         (JSC::Bindings::RuntimeObject::finishCreation):
3720         * bridge/runtime_object.h:
3721
3722 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
3723
3724         Mac build fix after r94694.
3725
3726         * WebCore.xcodeproj/project.pbxproj:
3727
3728 2011-09-07  Tim Horton  <timothy_horton@apple.com>
3729
3730         FELighting is using width instead of height to determine skip for parallel(n>2) case
3731         https://bugs.webkit.org/show_bug.cgi?id=67719
3732         <rdar://problem/10086178>
3733
3734         Reviewed by Dirk Schulze.
3735
3736         No new tests, because the bug only exhibits under conditions which are currently
3737         impossible by default (using more than 2 cores) on some platforms.
3738
3739         * platform/graphics/filters/FELighting.cpp:
3740         (WebCore::FELighting::platformApplyGeneric):
3741
3742 2011-09-07  W. James MacLean  <wjmaclean@chromium.org>
3743
3744         Eliminate motion jitter in animated, blurred SVG image
3745         https://bugs.webkit.org/show_bug.cgi?id=67503
3746
3747         Fixes filter shear-free transform applied to SVG images.
3748
3749         In applyResource() the shearFreeAbsoluteTransform is applied to the drawing region,
3750         which is based on the object bounding box (which doesn't move). For a rotation
3751         around the centre of the box, this should really just be the identity matrix,
3752         since the BB should neither change size nor location. So really, we're just interested
3753         in the scale change of the BB here, and not in moving it.
3754
3755         This impacts how slices are extracted, and affects the {x|y}Mid and {x|y}Max extractions
3756         for vertical and horizontal slices, so the test verifies these.
3757
3758         Reviewed by Dirk Schulze.
3759
3760         Test: svg/W3C-SVG-1.1-SE/filters-image-05-f.svg
3761
3762         * rendering/svg/RenderSVGResourceFilter.cpp:
3763         (WebCore::RenderSVGResourceFilter::applyResource):
3764
3765 2011-09-03  Robert Hogan  <robert@webkit.org>
3766
3767         Elements with position:absolute don't move to correct position after images load
3768         https://bugs.webkit.org/show_bug.cgi?id=54611
3769
3770         Reviewed by Simon Fraser.
3771
3772         Test: fast/block/positioning/absolute-layout-after-image-load.html
3773               fast/block/positioning/positioned-float-layout-after-image-load.html
3774
3775         In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, 
3776         this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires 
3777         the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. 
3778         There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. Do the same
3779         for positioned floats in RenderBlock::positionedFloatsNeedRelayout(), although currently layoutPositionedObjects()
3780         takes care of it this at least ensures no regression in future.
3781
3782         Note: Although the issue is encountered only on first load without a fragment identifier, it 
3783         happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so 
3784         because scrolling to the fragment always happens before the image has loaded, rendering the page 
3785         and clearing the initial dirty bits in the positioned element's renderer. When the image finally 
3786         loads in this scenario, the positioned element is otherwise clean and relies on the above code to get 
3787         re-rendered.
3788
3789         * rendering/RenderBlock.cpp:
3790         (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when 
3791                                                          deciding whether to mark children for layout
3792         (WebCore::RenderBlock::positionedFloatsNeedRelayout): ditto
3793
3794 2011-09-07  Anna Cavender  <annacc@chromium.org>
3795
3796         Moving platform/track to html/track to avoid layering violation.
3797         https://bugs.webkit.org/show_bug.cgi?id=67680
3798
3799         Reviewed by Adam Barth.
3800
3801         No new tests. No new functionality.
3802
3803         * CMakeLists.txt:
3804         * GNUmakefile.am:
3805         * GNUmakefile.list.am:
3806         * WebCore.gyp/WebCore.gyp:
3807         * WebCore.gypi:
3808         * WebCore.pri:
3809         * WebCore.pro:
3810         * html/track/CueParser.cpp: Renamed from Source/WebCore/platform/track/CueParser.cpp.
3811         * html/track/CueParser.h: Renamed from Source/WebCore/platform/track/CueParser.h.
3812         * html/track/CueParserPrivate.h: Renamed from Source/WebCore/platform/track/CueParserPrivate.h.
3813         * html/track/WebVTTParser.cpp: Renamed from Source/WebCore/platform/track/WebVTTParser.cpp.
3814         * html/track/WebVTTParser.h: Renamed from Source/WebCore/platform/track/WebVTTParser.h.
3815         * html/track/WebVTTToken.h: Renamed from Source/WebCore/platform/track/WebVTTToken.h.
3816         * html/track/WebVTTTokenizer.cpp: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.cpp.
3817         * html/track/WebVTTTokenizer.h: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.h.
3818
3819 2011-09-07  David Hyatt  <hyatt@apple.com>
3820
3821         https://bugs.webkit.org/show_bug.cgi?id=67286
3822
3823         REGRESSION: css2.1/t090204-display-change-01-b-ao.html fails after r94084.
3824
3825         Make sure that the trailing floats line box explicitly sets the line top with leading and line bottom with
3826         leading to just be the block height.
3827
3828         Reviewed by Dan Bernstein.
3829
3830         * rendering/RenderBlockLineLayout.cpp:
3831         (WebCore::RenderBlock::linkToEndLineIfNeeded):
3832
3833 2011-09-06  Abhishek Arya  <inferno@chromium.org>
3834
3835         Null owningRenderer crash in RenderScrollbar::updateScrollbarParts.
3836         https://bugs.webkit.org/show_bug.cgi?id=67669
3837
3838         Reviewed by James Robinson.
3839
3840         Owning renderer can be cleared for custom scrollbars in clearOwningRenderer()
3841         call. We need a null check in updateScrollbarParts, so that we do not crash.
3842
3843         No tests since issue seen in crash reports only and I donot know a way to
3844         reproduce.
3845
3846         * rendering/RenderScrollbar.cpp:
3847         (WebCore::RenderScrollbar::updateScrollbarParts):
3848
3849 2011-09-05  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3850
3851         [Qt][WK2] Make TiledDrawingArea request tiles only in the direction the viewport is panned to.
3852         https://bugs.webkit.org/show_bug.cgi?id=67606
3853
3854         Reviewed by Noam Rosenthal.
3855
3856         TiledBackingStore previously used different values for horizontal and vertial multiplication
3857         to calculate the cover area.
3858         This patch replaces this mechanism, used to give a bigger panning range to vertical panning,
3859         with the possibility to use the motion vector of the viewport to request tiles ahead instead.
3860         This allows economies on rendering resources as tiles won't be rendered beside the trajectory
3861         of the viewport.
3862
3863         * platform/graphics/TiledBackingStore.cpp:
3864         (WebCore::TiledBackingStore::TiledBackingStore):
3865         (WebCore::TiledBackingStore::setKeepAndCoverAreaMultipliers):
3866         (WebCore::TiledBackingStore::setCoverAreaFocusVector):
3867         (WebCore::TiledBackingStore::createTiles):
3868         (WebCore::TiledBackingStore::calculateKeepRect):
3869         (WebCore::TiledBackingStore::calculateCoverRect):
3870         * platform/graphics/TiledBackingStore.h:
3871         (WebCore::TiledBackingStore::getKeepAndCoverAreaMultipliers):
3872
3873 2011-09-01  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3874
3875         [Qt] TiledBackingStore: Import the resizeEdgeTiles logic from TiledDrawindAreaProxy.
3876         https://bugs.webkit.org/show_bug.cgi?id=67416
3877
3878         Reviewed by Kenneth Rohde Christiansen.
3879
3880         Original code by Antti Koivisto.
3881         With the current code, when the page is layouted during load, edge tiles will
3882         get removed instead of continuing to show their front buffer while the tile
3883         is being rendered for the new size.
3884
3885         * platform/graphics/Tile.h:
3886         * platform/graphics/TiledBackingStore.cpp:
3887         (WebCore::TiledBackingStore::createTiles):
3888         (WebCore::TiledBackingStore::resizeEdgeTiles):
3889         * platform/graphics/TiledBackingStore.h:
3890         * platform/graphics/qt/TileQt.cpp:
3891         (WebCore::TileQt::resize):
3892         * platform/graphics/qt/TileQt.h:
3893
3894 2011-09-07  Tim Horton  <timothy_horton@apple.com>
3895
3896         Don't round-trip through TransformationMatrix in SVGImageBufferTools::clearAffineTransform2DRotation
3897         https://bugs.webkit.org/show_bug.cgi?id=67242
3898         <rdar://problem/10069770>
3899
3900         Reviewed by Dirk Schulze.
3901
3902         No new tests, minor performance improvement.
3903
3904         * platform/graphics/transforms/AffineTransform.cpp:
3905         (WebCore::AffineTransform::blend):
3906         (WebCore::AffineTransform::decompose):
3907         (WebCore::AffineTransform::recompose):
3908         * platform/graphics/transforms/AffineTransform.h:
3909         * rendering/svg/SVGImageBufferTools.cpp:
3910         (WebCore::SVGImageBufferTools::clear2DRotation):
3911
3912 2011-09-06  Pavel Podivilov  <podivilov@chromium.org>
3913
3914         Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode.
3915         https://bugs.webkit.org/show_bug.cgi?id=67647
3916
3917         1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything.
3918         2) Add RawSourceCode unit tests.
3919         3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now).
3920
3921         Reviewed by Yury Semikhatsky.
3922
3923         Test: inspector/debugger/raw-source-code.html
3924
3925         * inspector/front-end/DebuggerPresentationModel.js:
3926         (WebInspector.DebuggerPresentationModel):
3927         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
3928         (WebInspector.DebuggerPresentationModel.prototype._addScript):
3929         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
3930         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
3931         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
3932         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
3933         * inspector/front-end/ScriptsPanel.js:
3934         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
3935         * inspector/front-end/SourceFile.js:
3936         (WebInspector.RawSourceCode):
3937         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
3938         (WebInspector.RawSourceCode.prototype.setFormatted):
3939         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
3940         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
3941
3942 2011-09-07  Alexander Pavlov  <apavlov@chromium.org>
3943
3944         Web Inspector: Implement circular tabbing through the Styles sidebar pane contents
3945         https://bugs.webkit.org/show_bug.cgi?id=67127
3946
3947         Reviewed by Yury Semikhatsky.
3948
3949         * inspector/front-end/Section.js:
3950         (WebInspector.Section.prototype.get firstSibling):
3951         (WebInspector.Section.prototype.get lastSibling):
3952         * inspector/front-end/StylesSidebarPane.js:
3953         (WebInspector.StylePropertiesSection.prototype.nextEditableSibling):
3954         (WebInspector.StylePropertiesSection.prototype.previousEditableSibling):
3955         (WebInspector.StylePropertiesSection.prototype.startEditingSelector):
3956         (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector):
3957         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback):
3958         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
3959         (WebInspector.StylePropertyTreeElement.prototype):
3960         (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection):
3961
3962 2011-09-02  Andrey Kosyakov  <caseq@chromium.org>
3963
3964         Web Inspector: [Extensions API] expose console API
3965         https://bugs.webkit.org/show_bug.cgi?id=67506
3966
3967         Reviewed by Pavel Feldman.
3968
3969         Test: inspector/extensions/extensions-console.html
3970
3971         * inspector/front-end/ConsoleMessage.js:
3972         (WebInspector.ConsoleMessage.prototype.get text):
3973         (WebInspector.ConsoleMessage.prototype.get parameters):
3974         * inspector/front-end/ExtensionAPI.js:
3975         (WebInspector.injectedExtensionAPI.InspectorExtensionAPI):
3976         (WebInspector.injectedExtensionAPI):
3977         (WebInspector.injectedExtensionAPI.Console.prototype.getMessages):
3978         (WebInspector.injectedExtensionAPI.Console.prototype.addMessage):
3979         (WebInspector.injectedExtensionAPI.Console.prototype.get MessageLevel):
3980         (WebInspector.injectedExtensionAPI.Network.dispatchRequestEvent):
3981         (WebInspector.injectedExtensionAPI.Network):
3982         (WebInspector.injectedExtensionAPI.AuditCategoryImpl.dispatchAuditEvent):
3983         (WebInspector.injectedExtensionAPI.AuditCategoryImpl):
3984         (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceEvent):
3985         (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceContentEvent):
3986         (WebInspector.injectedExtensionAPI.InspectedWindow):
3987         * inspector/front-end/ExtensionCommon.js:
3988         (WebInspector.commonExtensionSymbols):
3989         * inspector/front-end/ExtensionServer.js:
3990         (WebInspector.ExtensionServer):
3991         (WebInspector.ExtensionServer.prototype._notifyConsoleMessageAdded):
3992         (WebInspector.ExtensionServer.prototype._onGetConsoleMessages):
3993         (WebInspector.ExtensionServer.prototype._onAddConsoleMessage):
3994         (WebInspector.ExtensionServer.prototype._makeConsoleMessage):
3995         (WebInspector.ExtensionServer.prototype._makeConsoleMessage.convertParameter):
3996         (WebInspector.ExtensionServer.prototype._dispatchCallback):
3997         (WebInspector.ExtensionServer.prototype.initExtensions):
3998
3999 2011-09-05  Andrey Kosyakov  <caseq@chromium.org>
4000
4001         Web Inspector: disable popover when a mouse button is pressed
4002         https://bugs.webkit.org/show_bug.cgi?id=67610
4003
4004         Reviewed by Pavel Feldman.
4005
4006         - disable popover when a mouse button is pressed
4007         - disable popover in a SourceFrame when the source is being edited
4008
4009         * inspector/front-end/Popover.js:
4010         (WebInspector.PopoverHelper):
4011         (WebInspector.PopoverHelper.prototype._mouseUp):
4012         (WebInspector.PopoverHelper.prototype._mouseDown):
4013         (WebInspector.PopoverHelper.prototype._handleMouseAction):
4014         * inspector/front-end/SourceFrame.js:
4015         (WebInspector.SourceFrame.prototype._onHidePopover):
4016         (WebInspector.SourceFrame.prototype.doubleClick):
4017
4018 2011-09-07  Antti Koivisto  <antti@apple.com>
4019
4020         https://bugs.webkit.org/show_bug.cgi?id=67634
4021         De-virtualize styleForRenderer()
4022
4023         Reviewed by Sam Weinig.
4024         
4025         This has performance and c