abe2332efe843fd7900a5c792ae8c5ad4cc1896c
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
2
3         [BlackBerry] Sync up PlatformMouseEvent
4         https://bugs.webkit.org/show_bug.cgi?id=82567
5
6         Reviewed by Rob Buis.
7
8         This patch is adding blackberry specific members to PlatformMouseEvent.
9         Also re-base PlatformMouseEventBlackBerry to adapt to the re-factor
10         of PlatformMouseEvent.
11
12         * platform/PlatformMouseEvent.h:
13         (PlatformMouseEvent): BlackBerry specific constructor.
14         (WebCore::PlatformMouseEvent::inputMethod): Input source of mouse event
15         for blackberry platform.
16         * platform/blackberry/PlatformMouseEventBlackBerry.cpp:
17         (WebCore::PlatformMouseEvent::PlatformMouseEvent): Re-base the constructor
18         to adapt the re-factor of PlatformMouseEvent.
19
20 2012-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
21
22         [BlackBerry] Turn on STORE_FONT_CUSTOM_PLATFORM_DATA in CachedFont.cpp
23         https://bugs.webkit.org/show_bug.cgi?id=82573
24
25         Reviewed by Rob Buis.
26
27         Tests: covered by existing tests.
28
29         * loader/cache/CachedFont.cpp:
30
31 2012-03-29  Adam Barth  <abarth@webkit.org>
32
33         [Chromium] Attempt to fix the component build
34         https://bugs.webkit.org/show_bug.cgi?id=82676
35
36         Reviewed by Dirk Pranke.
37
38         Now that we're implementing some of the WEBKIT_EXPORT symbols in
39         WebCore/platform/chromium/support, we need to tell the build system
40         that we want to actually export these symbols.
41
42         * WebCore.gyp/WebCore.gyp:
43
44 2012-03-29  Adam Barth  <abarth@webkit.org>
45
46         Unreviewed, rolling out r112572.
47         http://trac.webkit.org/changeset/112572
48         https://bugs.webkit.org/show_bug.cgi?id=82582
49
50         Does not compile in Windows component build
51
52         * WebCore.gyp/WebCore.gyp:
53         * WebCore.gypi:
54
55 2012-03-29  Adam Barth  <abarth@webkit.org>
56
57         Unreviewed, rolling out r112579.
58         http://trac.webkit.org/changeset/112579
59         https://bugs.webkit.org/show_bug.cgi?id=82657
60
61         Does not compile in Windows component build
62
63         * WebCore.gypi:
64
65 2012-03-29  Adam Barth  <abarth@webkit.org>
66
67         Unreviewed, rolling out r112611.
68         http://trac.webkit.org/changeset/112611
69         https://bugs.webkit.org/show_bug.cgi?id=82676
70
71         Does not compile in Windows component build
72
73         * WebCore.gyp/WebCore.gyp:
74
75 2012-03-29  Bear Travis  <betravis@adobe.com>
76
77         Update shape-inside/shape-outside CSS Exclusion properties
78         https://bugs.webkit.org/show_bug.cgi?id=82365
79
80         Reviewed by Ryosuke Niwa.
81
82         Updating CSS property names for wrap-shape-inside and wrap-shape-outside
83         to shape-inside and shape-outside, per the current exclusions spec.
84         Renaming some parsing functions in CSSParser for clarity.
85         No new functionality.
86
87         * css/CSSComputedStyleDeclaration.cpp:
88         (WebCore):
89         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
90         * css/CSSParser.cpp:
91         (WebCore::CSSParser::parseValue):
92         (WebCore::CSSParser::parseClipShape):
93         (WebCore::CSSParser::parseExclusionShapeRect):
94         (WebCore::CSSParser::parseExclusionShapeCircle):
95         (WebCore::CSSParser::parseExclusionShapeEllipse):
96         (WebCore::CSSParser::parseExclusionShapePolygon):
97         (WebCore::CSSParser::parseExclusionShape):
98         * css/CSSParser.h:
99         * css/CSSProperty.cpp:
100         (WebCore::CSSProperty::isInheritedProperty):
101         * css/CSSPropertyNames.in:
102         * css/CSSStyleSelector.cpp:
103         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
104
105 2012-03-29  Ryan Sleevi  <rsleevi@chromium.org>
106
107         [chromium] Update paths in GYP files
108         https://bugs.webkit.org/show_bug.cgi?id=82663
109
110         Reviewed by Adam Barth.
111
112         * WebCore.gypi:
113         Remove PluginDataGtk.cpp following r112401
114
115 2012-03-29  Abhishek Arya  <inferno@chromium.org>
116
117         Crash in GenericEventQueue::~GenericEventQueue.
118         https://bugs.webkit.org/show_bug.cgi?id=81976
119
120         Reviewed by Eric Carlson.
121
122         * dom/GenericEventQueue.cpp:
123         (WebCore::GenericEventQueue::create):
124         (WebCore):
125         (WebCore::GenericEventQueue::GenericEventQueue):
126         (WebCore::GenericEventQueue::enqueueEvent):
127         (WebCore::GenericEventQueue::timerFired):
128         * dom/GenericEventQueue.h:
129         (GenericEventQueue):
130         * html/HTMLMediaElement.cpp:
131         (WebCore::HTMLMediaElement::HTMLMediaElement):
132         (WebCore::HTMLMediaElement::scheduleEvent):
133         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
134         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
135         (WebCore::HTMLMediaElement::hasPendingActivity):
136         * html/HTMLMediaElement.h:
137         (HTMLMediaElement):
138
139 2012-03-29  Adam Barth  <abarth@webkit.org>
140
141         [Chromium] Attempt to fix the component build
142         https://bugs.webkit.org/show_bug.cgi?id=82676
143
144         Unreviewed.
145
146         Now that we're implementing some of the WEBKIT_EXPORT symbols in
147         WebCore/platform/chromium/support, we need to tell the build system
148         that we want to actually export these symbols.
149
150         * WebCore.gyp/WebCore.gyp:
151
152 2012-03-29  Nate Chapin  <japhet@chromium.org>
153
154         Simplify reporting a main resource error to DocumentLoader and
155         FrameLoader.
156         https://bugs.webkit.org/show_bug.cgi?id=82649
157
158         Reviewed by Adam Barth.
159
160         No new tests, no functionality change intended.
161
162         * loader/DocumentLoader.cpp:
163         (WebCore::DocumentLoader::mainReceivedError): Remove isComplete parameter,
164             since it was always true. Call FrameLoader::receivedMainResourceError,
165             instead of the other way around.
166         * loader/DocumentLoader.h:
167         * loader/FrameLoader.cpp:
168         (WebCore::FrameLoader::receivedMainResourceError): Remove isComplete parameter,
169             since it was always true. Merge in most of mainReceivedCompleteError().
170         * loader/FrameLoader.h:
171         * loader/MainResourceLoader.cpp:
172         (WebCore::MainResourceLoader::receivedError):
173         (WebCore::MainResourceLoader::didCancel):
174
175 2012-03-28  Jer Noble  <jer.noble@apple.com>
176
177         Heap-use-after-free in WebCore::InlineFlowBox::deleteLine due to fullscreen issues.
178         https://bugs.webkit.org/show_bug.cgi?id=82055
179
180         Reviewed by David Hyatt.
181
182         No new tests; fixes fuzz test crasher which is not reproducible in DRT or WKTR.
183
184         When a RenderFullScreen object is inserted between a child and parent renderer, make sure the
185         parent renderer deletes its line boxes by calling setNeedsLayoutAndPrefWidthsRecalc().  This
186         forces its InlineBox renderers to be removed from the line boxes and their parents in the correct
187         order, fixing a double-delete crash.
188
189         The same is true when unwrapping the RenderFullScreen object, and when creating and inserting
190         the full screen placeholder.
191
192         * rendering/RenderFullScreen.cpp:
193         (RenderFullScreen::wrapRenderer):
194         (RenderFullScreen::unwrapRenderer):
195         (RenderFullScreen::createPlaceholder):
196
197 2012-03-29  Benjamin Poulain  <bpoulain@apple.com>
198
199         Get rid of Geolocation::positionChangedInternal(), use positionChanged() directly
200         https://bugs.webkit.org/show_bug.cgi?id=82543
201
202         Reviewed by Andreas Kling.
203
204         After the change to client based geolocation, the method positionChangedInternal()
205         is called only by positionChanged(). This patch remove this extra indirection.
206
207         * Modules/geolocation/Geolocation.cpp:
208         (WebCore::Geolocation::positionChanged):
209         * Modules/geolocation/Geolocation.h:
210         (Geolocation):
211         * WebCore.order:
212
213 2012-03-29  Joseph Pecoraro  <pecoraro@apple.com>
214
215         InputType attribute changed functions should happen after the attribute change
216         https://bugs.webkit.org/show_bug.cgi?id=82644
217
218         Reviewed by Benjamin Poulain.
219
220         * html/HTMLInputElement.cpp:
221         (WebCore::HTMLInputElement::parseAttribute):
222
223 2012-03-29  Bear Travis  <betravis@adobe.com>
224
225         Update CSS Exclusion wrap-flow values left & right to start & end
226         https://bugs.webkit.org/show_bug.cgi?id=82366
227
228         http://dev.w3.org/csswg/css3-exclusions/
229         -webkit-wrap-flow now takes the values start and end rather than
230         left and right. Updating the code to reflect this. Functionality
231         is covered by existing tests.
232         
233         Reviewed by Andreas Kling.
234
235         * css/CSSParser.cpp:
236         (WebCore::isValidKeywordPropertyAndValue):
237         * css/CSSPrimitiveValueMappings.h:
238         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
239         (WebCore::CSSPrimitiveValue::operator WrapFlow):
240         * rendering/style/RenderStyleConstants.h:
241
242 2012-03-29  Dirk Pranke  <dpranke@chromium.org>
243
244         rollout r112484, r112545, r112574
245         https://bugs.webkit.org/show_bug.cgi?id=82662
246
247         Unreviewed, build fix.
248
249         this appears to be producing some questionable differences on
250         the apple mac bots, and possibly one test on chromium linux.
251
252         * css/mediaControls.css:
253         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
254         * css/mediaControlsChromium.css:
255         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
256         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
257         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
258         * html/shadow/MediaControlElements.cpp:
259         (RenderMediaVolumeSliderContainer):
260         (WebCore):
261         (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
262         (WebCore::RenderMediaVolumeSliderContainer::layout):
263         (WebCore::MediaControlVolumeSliderContainerElement::createRenderer):
264         * html/shadow/MediaControlElements.h:
265         (MediaControlVolumeSliderContainerElement):
266         * html/shadow/MediaControlRootElementChromium.cpp:
267         (WebCore::MediaControlRootElementChromium::create):
268
269 2012-03-29  Julien Chaffraix  <jchaffraix@webkit.org>
270
271         REGRESSION (r110065-r110080): Content drawing outside overflow: hidden at ynet.co.il
272         https://bugs.webkit.org/show_bug.cgi?id=82129
273
274         Reviewed by Ojan Vafai.
275
276         Tests: fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb-expected.html
277                fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb.html
278                fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl-expected.html
279                fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl.html
280                fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb-expected.html
281                fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb.html
282                fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl-expected.html
283                fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl.html
284
285         This is a regression from r110072. I wrongly thought we should call ensureLayer if we create our RenderOverflow.
286         However the current overflow code removes the before and start overflows (like in horizontal writing mode with ltr direction,
287         we never have a top or a left overflow). Because of that we would not get a RenderLayer as expected and the overflow clip rects
288         would be wrong on our RenderLayer children.
289
290         * rendering/RenderBox.cpp:
291         (WebCore::RenderBox::addLayoutOverflow):
292         Moved the ensureLayer() call after the check that we do have some overflow but before we remove the overflow in some directions.
293
294 2012-03-29  Adam Barth  <abarth@webkit.org>
295
296         [Chromium] Move ResourceHandle to WebCore/platform/network/chromium
297         https://bugs.webkit.org/show_bug.cgi?id=82657
298
299         Reviewed by James Robinson.
300
301         We finally arive at our destination. This patch actually moves
302         WebCore::ResourceHandle from Source/WebKit/chromium/src to
303         Source/WebCore/network/chromium, matching its location in other ports.
304         To make this happen, we also need to move WrappedResourceRequest and
305         WrappedResourceResponse.
306
307         This patch is the last patch from
308         https://github.com/abarth/webkit/compare/master...webcore-platform
309
310         * WebCore.gypi:
311         * platform/chromium/support/WrappedResourceRequest.h: Copied from Source/WebKit/chromium/src/WrappedResourceRequest.h.
312         * platform/chromium/support/WrappedResourceResponse.h: Copied from Source/WebKit/chromium/src/WrappedResourceResponse.h.
313         * platform/network/chromium/ResourceHandle.cpp: Copied from Source/WebKit/chromium/src/ResourceHandle.cpp.
314         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
315         (WebCore::ResourceHandleInternal::start):
316         (WebCore::ResourceHandle::loadResourceSynchronously):
317         (WebCore::ResourceHandle::cacheMetadata):
318         * platform/network/chromium/ResourceHandleInternal.h: Copied from Source/WebKit/chromium/src/ResourceHandleInternal.h.
319
320 2012-03-29  Patrick Gansterer  <paroga@webkit.org>
321
322         Build fix for WinCE after r112555.
323
324         * platform/text/wince/TextCodecWinCE.cpp:
325         (WebCore::LanguageManager::LanguageManager):
326
327 2012-03-29  Anders Carlsson  <andersca@apple.com>
328
329         Images that reload via media queries don't paint when device scale factor changes
330         https://bugs.webkit.org/show_bug.cgi?id=82648
331         <rdar://problem/11143637>
332
333         Reviewed by Beth Dakin.
334
335         Commit scale factor changes before dirty rect changes, since setting the scale factor
336         can lead to more rects being dirtied when using the tile cache.
337
338         * platform/graphics/ca/GraphicsLayerCA.cpp:
339         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
340
341 2012-03-29  Adam Barth  <abarth@webkit.org>
342
343         Move CPP files related to ResourceHandle to WebCore/platform
344         https://bugs.webkit.org/show_bug.cgi?id=82582
345
346         Reviewed by James Robinson.
347
348         This patch moves a number of files that implement parts of the platform
349         portion of the Chromium WebKit API from the WebKit layer to
350         WebCore/platform. These files are in the dependency cone of
351         ResourceHandle and have no dependencies on anything outside
352         WebCore/platform.
353
354         * WebCore.gyp/WebCore.gyp:
355         * WebCore.gypi:
356         * platform/chromium/support: Added.
357         * platform/chromium/support/WebData.cpp: Copied from Source/WebKit/chromium/src/WebData.cpp.
358         * platform/chromium/support/WebHTTPBody.cpp: Copied from Source/WebKit/chromium/src/WebHTTPBody.cpp.
359         * platform/chromium/support/WebHTTPLoadInfo.cpp: Copied from Source/WebKit/chromium/src/WebHTTPLoadInfo.cpp.
360         * platform/chromium/support/WebURL.cpp: Copied from Source/WebKit/chromium/src/WebURL.cpp.
361         * platform/chromium/support/WebURLError.cpp: Copied from Source/WebKit/chromium/src/WebURLError.cpp.
362         * platform/chromium/support/WebURLRequest.cpp: Copied from Source/WebKit/chromium/src/WebURLRequest.cpp.
363         * platform/chromium/support/WebURLRequestPrivate.h: Copied from Source/WebKit/chromium/src/WebURLRequestPrivate.h.
364         * platform/chromium/support/WebURLResponse.cpp: Copied from Source/WebKit/chromium/src/WebURLResponse.cpp.
365         * platform/chromium/support/WebURLResponsePrivate.h: Copied from Source/WebKit/chromium/src/WebURLResponsePrivate.h.
366
367 2012-03-29  Michal Mocny  <mmocny@google.com>
368
369         [chromium] Ensure framebuffer exists at the start of beginDrawingFrame.
370         https://bugs.webkit.org/show_bug.cgi?id=82569
371
372         Reviewed by James Robinson.
373
374         Updated LayerRendererChromiumTest unittests.
375
376         * platform/graphics/chromium/LayerRendererChromium.cpp:
377         (WebCore::LayerRendererChromium::setVisible):
378         (WebCore::LayerRendererChromium::beginDrawingFrame):
379         * platform/graphics/chromium/LayerRendererChromium.h:
380         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
381         (WebCore::CCSingleThreadProxy::compositeAndReadback):
382         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
383         (WebCore::CCThreadProxy::compositeAndReadback):
384         (WebCore::CCThreadProxy::requestReadbackOnImplThread):
385
386 2012-03-29  Ryosuke Niwa  <rniwa@webkit.org>
387
388         Add a compile assert for the size of RenderBlock
389         https://bugs.webkit.org/show_bug.cgi?id=82586
390
391         Reviewed by Tony Chang.
392         
393         Add compile asserts for the size of RenderBlock and RenderBlock::MarginValues.
394         We can't add asserts for FloatingObject and MarginInfo because they're private to RenderBlock.
395
396         * rendering/RenderBlock.cpp:
397         (SameSizeAsRenderBlock):
398         (WebCore):
399         (WebCore::RenderBlock::addOverflowFromFloats):
400         (WebCore::RenderBlock::repaintOverhangingFloats):
401         (WebCore::RenderBlock::paintFloats):
402         (WebCore::RenderBlock::insertFloatingObject):
403         (WebCore::RenderBlock::clearFloats):
404         (WebCore::RenderBlock::addOverhangingFloats):
405         (WebCore::RenderBlock::addIntrudingFloats):
406         (WebCore::RenderBlock::hitTestFloats):
407         (WebCore::RenderBlock::adjustForBorderFit):
408         * rendering/RenderBlock.h:
409         (WebCore::RenderBlock::FloatingObject::shouldPaint):
410         (WebCore::RenderBlock::FloatingObject::setShouldPaint):
411         (WebCore::RenderBlock::FloatingObject::isDescendant):
412         (WebCore::RenderBlock::FloatingObject::setIsDescendant):
413         (FloatingObject):
414         (RenderBlock):
415
416 2012-03-29  Gavin Barraclough  <barraclough@apple.com>
417
418         Template the Yarr::Interpreter on the character type
419         https://bugs.webkit.org/show_bug.cgi?id=82637
420
421         Reviewed by Sam Weinig.
422
423         We should be able to call to the interpreter after having already checked the character type,
424         without having to re-package the character pointer back up into a string!
425
426         * inspector/ContentSearchUtils.cpp:
427         (WebCore::ContentSearchUtils::findMagicComment):
428         * platform/text/RegularExpression.cpp:
429         (WebCore::RegularExpression::match):
430             - Don't pass length.
431
432 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
433
434         Unreviewed, rolling out r112553.
435         http://trac.webkit.org/changeset/112553
436         https://bugs.webkit.org/show_bug.cgi?id=82638
437
438         It made all tests crash on Qt WK2 (Requested by Ossy_away on
439         #webkit).
440
441         * Modules/geolocation/Geolocation.cpp:
442         (WebCore::Geolocation::stop):
443         (WebCore::Geolocation::lastPosition):
444         (WebCore::Geolocation::requestPermission):
445         (WebCore::Geolocation::startUpdating):
446         (WebCore::Geolocation::stopUpdating):
447         * Modules/geolocation/Geolocation.h:
448         (WebCore):
449         * Modules/geolocation/GeolocationController.cpp:
450         * Modules/geolocation/GeolocationController.h:
451         * WebCore.exp.in:
452         * page/GeolocationClient.h:
453         (WebCore):
454         (GeolocationClient):
455         * page/Page.cpp:
456         (WebCore::Page::Page):
457         (WebCore::Page::PageClients::PageClients):
458         * page/Page.h:
459         (WebCore):
460         (PageClients):
461         (Page):
462         (WebCore::Page::geolocationController):
463
464 2012-03-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
465
466         HashMap<>::add should return a more descriptive object
467         https://bugs.webkit.org/show_bug.cgi?id=71063
468
469         Reviewed by Ryosuke Niwa.
470
471         Update code to use AddResult instead of a pair. No new tests, just a refactoring.
472
473         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
474         (WebCore::SQLTransactionCoordinator::acquireLock):
475         * Modules/webdatabase/chromium/QuotaTracker.cpp:
476         (WebCore::QuotaTracker::updateDatabaseSize):
477         * bindings/js/DOMObjectHashTableMap.h:
478         (WebCore::DOMObjectHashTableMap::get):
479         * bindings/js/JSDOMBinding.cpp:
480         (WebCore::cacheDOMStructure):
481         * bindings/js/JSDOMBinding.h:
482         (WebCore::cacheWrapper):
483         * bindings/js/JSDOMGlobalObject.h:
484         (WebCore::getDOMConstructor):
485         * bindings/js/PageScriptDebugServer.cpp:
486         (WebCore::PageScriptDebugServer::addListener):
487         * bindings/js/ScriptDebugServer.cpp:
488         (WebCore::ScriptDebugServer::setBreakpoint):
489         * bindings/js/SerializedScriptValue.cpp:
490         (WebCore::CloneSerializer::startObjectInternal):
491         (WebCore::CloneSerializer::write):
492         * bindings/v8/NPV8Object.cpp:
493         (WebCore::npCreateV8ScriptObject):
494         * bridge/IdentifierRep.cpp:
495         (WebCore::IdentifierRep::get):
496         * bridge/NP_jsobject.cpp:
497         (ObjectMap::add):
498         * css/CSSComputedStyleDeclaration.cpp:
499         (WebCore::logUnimplementedPropertyID):
500         * css/CSSFontFaceSource.cpp:
501         (WebCore::CSSFontFaceSource::getFontData):
502         * css/CSSFontSelector.cpp:
503         (WebCore::CSSFontSelector::addFontFaceRule):
504         (WebCore::CSSFontSelector::getFontData):
505         * css/CSSSegmentedFontFace.cpp:
506         (WebCore::CSSSegmentedFontFace::getFontData):
507         * css/CSSStyleApplyProperty.cpp:
508         (WebCore::ApplyPropertyCounter::applyInheritValue):
509         (WebCore::ApplyPropertyCounter::applyValue):
510         * css/CSSStyleSelector.cpp:
511         (WebCore::CSSStyleSelector::appendAuthorStylesheets):
512         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
513         * css/CSSValuePool.cpp:
514         (WebCore::CSSValuePool::createIdentifierValue):
515         (WebCore::CSSValuePool::createColorValue):
516         (WebCore::CSSValuePool::createValue):
517         (WebCore::CSSValuePool::createFontFamilyValue):
518         (WebCore::CSSValuePool::createFontFaceValue):
519         * dom/CheckedRadioButtons.cpp:
520         (WebCore::RadioButtonGroup::add):
521         (WebCore::CheckedRadioButtons::addButton):
522         * dom/ChildListMutationScope.cpp:
523         (WebCore::ChildListMutationScope::MutationAccumulationRouter::incrementScopingLevel):
524         * dom/Document.cpp:
525         (WebCore::Document::windowNamedItems):
526         (WebCore::Document::documentNamedItems):
527         (WebCore::Document::getCSSCanvasElement):
528         (WebCore::Document::getItems):
529         * dom/DocumentEventQueue.cpp:
530         (WebCore::DocumentEventQueue::enqueueEvent):
531         (WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent):
532         (WebCore::DocumentEventQueue::pendingEventTimerFired):
533         * dom/DocumentOrderedMap.cpp:
534         (WebCore::DocumentOrderedMap::add):
535         * dom/EventListenerMap.cpp:
536         (WebCore::EventListenerMap::add):
537         * dom/Node.cpp:
538         (WebCore::Node::dumpStatistics):
539         (WebCore::Node::getElementsByTagName):
540         (WebCore::Node::getElementsByTagNameNS):
541         (WebCore::Node::getElementsByName):
542         (WebCore::Node::getElementsByClassName):
543         (WebCore::Node::collectMatchingObserversForMutation):
544         * dom/QualifiedName.cpp:
545         (WebCore::QualifiedName::init):
546         * dom/SpaceSplitString.cpp:
547         (WebCore::SpaceSplitStringData::create):
548         * dom/StyledElement.cpp:
549         (WebCore::StyledElement::updateAttributeStyle):
550         * html/HTMLCollection.cpp:
551         (WebCore::HTMLCollection::append):
552         * inspector/DOMPatchSupport.cpp:
553         (WebCore::DOMPatchSupport::diff):
554         * inspector/InspectorCSSAgent.cpp:
555         (WebCore::SelectorProfile::commitSelector):
556         * inspector/InspectorDOMAgent.cpp:
557         (WebCore::InspectorDOMAgent::performSearch):
558         * inspector/InspectorDebuggerAgent.cpp:
559         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
560         * inspector/InspectorValues.h:
561         (WebCore::InspectorObject::setValue):
562         (WebCore::InspectorObject::setObject):
563         (WebCore::InspectorObject::setArray):
564         * loader/appcache/ApplicationCacheGroup.cpp:
565         (WebCore::ApplicationCacheGroup::addEntry):
566         * loader/appcache/ApplicationCacheStorage.cpp:
567         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
568         * page/EventHandler.cpp:
569         (WebCore::EventHandler::handleTouchEvent):
570         * page/PageGroup.cpp:
571         (WebCore::PageGroup::pageGroup):
572         (WebCore::PageGroup::addVisitedLink):
573         (WebCore::PageGroup::addUserScriptToWorld):
574         (WebCore::PageGroup::addUserStyleSheetToWorld):
575         * page/SecurityPolicy.cpp:
576         (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
577         * page/TouchAdjustment.cpp:
578         (WebCore::TouchAdjustment::compileSubtargetList):
579         * platform/cf/BinaryPropertyList.cpp:
580         (WebCore::BinaryPropertyListPlan::writeInteger):
581         (WebCore::BinaryPropertyListPlan::writeString):
582         (WebCore::BinaryPropertyListPlan::writeIntegerArray):
583         * platform/graphics/blackberry/LayerTiler.cpp:
584         (WebCore::LayerTiler::addTileJob):
585         * platform/graphics/ca/GraphicsLayerCA.cpp:
586         (WebCore::GraphicsLayerCA::findOrMakeClone):
587         * platform/graphics/ca/mac/TileCache.mm:
588         (WebCore::TileCache::revalidateTiles):
589         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
590         (WebCore::LayerChangesFlusher::flushPendingLayerChangesSoon):
591         * platform/graphics/chromium/FontUtilsChromiumWin.cpp:
592         (WebCore::getDerivedFontData):
593         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
594         (WebCore::CCLayerAnimationController::startAnimationsWaitingForTargetAvailability):
595         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
596         (WebCore::initializeATSUStyle):
597         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
598         (WebCore::SimpleFontData::getCFStringAttributes):
599         * platform/graphics/mac/SimpleFontDataMac.mm:
600         (WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
601         * platform/graphics/wince/FontPlatformData.cpp:
602         (WebCore::FixedSizeFontData::create):
603         * platform/gtk/RenderThemeGtk3.cpp:
604         (WebCore::getStyleContext):
605         * platform/mac/ThreadCheck.mm:
606         (WebCoreReportThreadViolation):
607         * platform/network/HTTPHeaderMap.cpp:
608         (WebCore::HTTPHeaderMap::add):
609         * platform/network/HTTPHeaderMap.h:
610         (HTTPHeaderMap):
611         * platform/network/ResourceRequestBase.cpp:
612         (WebCore::ResourceRequestBase::addHTTPHeaderField):
613         * plugins/PluginDatabase.cpp:
614         (WebCore::PluginDatabase::add):
615         (WebCore::PluginDatabase::loadPersistentMetadataCache):
616         * plugins/win/PluginDatabaseWin.cpp:
617         (WebCore::PluginDatabase::getPluginPathsInDirectories):
618         * rendering/RenderBlock.cpp:
619         (WebCore::RenderBlock::addPercentHeightDescendant):
620         * rendering/RenderBlockLineLayout.cpp:
621         (WebCore::setLogicalWidthForTextRun):
622         * rendering/RenderNamedFlowThread.cpp:
623         (WebCore::RenderNamedFlowThread::addDependencyOnFlowThread):
624         * rendering/RenderRegion.cpp:
625         (WebCore::RenderRegion::setRenderBoxRegionInfo):
626         * rendering/svg/RenderSVGResourceGradient.cpp:
627         (WebCore::RenderSVGResourceGradient::applyResource):
628         * rendering/svg/RenderSVGResourcePattern.cpp:
629         (WebCore::RenderSVGResourcePattern::applyResource):
630         * storage/StorageMap.cpp:
631         (WebCore::StorageMap::setItem):
632         (WebCore::StorageMap::importItem):
633         * svg/SVGDocumentExtensions.cpp:
634         (WebCore::SVGDocumentExtensions::addPendingResource):
635         * xml/XMLHttpRequest.cpp:
636         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
637         * xml/XPathFunctions.cpp:
638         (WebCore::XPath::FunId::evaluate):
639         * xml/XPathPath.cpp:
640         (WebCore::XPath::LocationPath::evaluate):
641         * xml/XPathPredicate.cpp:
642         (WebCore::XPath::Union::evaluate):
643
644 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
645
646         Web Inspector: improve window selection accuracy in vertical overview of timeline panel
647         https://bugs.webkit.org/show_bug.cgi?id=82625
648
649         Reviewed by Vsevolod Vlasov.
650
651         * inspector/front-end/TimelineOverviewPane.js:
652         (WebInspector.TimelineVerticalOverview):
653         (WebInspector.TimelineVerticalOverview.prototype._renderBars): preserve actual padding used while rendering bars.
654         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes): account for outer and inter-bars padding when calculating bar offsets.
655
656 2012-03-29  Mark Pilgrim  <pilgrim@chromium.org>
657
658         GEOLOCATION should be implemented as Page Supplement
659         https://bugs.webkit.org/show_bug.cgi?id=82228
660
661         Reviewed by Adam Barth.
662
663         Geolocation now uses the Supplement interface instead of
664         keeping an instance variable on Page. This allows us to
665         remove all geolocation-related functions, variables, and
666         ifdefs out of Page and into Modules/geolocation/.
667
668         * Modules/geolocation/Geolocation.cpp:
669         (WebCore::Geolocation::stop):
670         (WebCore::Geolocation::lastPosition):
671         (WebCore::Geolocation::requestPermission):
672         (WebCore::Geolocation::startUpdating):
673         (WebCore::Geolocation::stopUpdating):
674         * Modules/geolocation/Geolocation.h:
675         (WebCore):
676         * Modules/geolocation/GeolocationController.cpp:
677         (WebCore::GeolocationController::supplementName):
678         (WebCore):
679         (WebCore::provideGeolocationTo):
680         * Modules/geolocation/GeolocationController.h:
681         (GeolocationController):
682         (WebCore::GeolocationController::from):
683         * WebCore.exp.in:
684         * page/GeolocationClient.h:
685         (WebCore):
686         (GeolocationClient):
687         * page/Page.cpp:
688         (WebCore::Page::Page):
689         (WebCore::Page::PageClients::PageClients):
690         * page/Page.h:
691         (WebCore):
692         (PageClients):
693         (Page):
694
695 2012-03-29  John Bates  <jbates@google.com>
696
697         Sync up WebKit TraceEvent.h with chromium trace_event.h
698         https://bugs.webkit.org/show_bug.cgi?id=82527
699
700         Reviewed by James Robinson.
701
702         * platform/chromium/TraceEvent.h:
703
704 2012-03-29  Pavel Feldman  <pfeldman@chromium.org>
705
706         Web Inspector: subtree disapears from <iframe> after loading
707         https://bugs.webkit.org/show_bug.cgi?id=76552
708
709         Reviewed by Yury Semikhatsky.
710
711         The problem was that content document subtree was not unbound upon iframe re-push.
712         Upon owner element refresh content document was not sent to the frontend
713         since backend assumed that front-end has already had the up-to-date version.
714
715         Test: inspector/elements/iframe-load-event.html
716
717         * inspector/InspectorDOMAgent.cpp:
718         (WebCore::InspectorDOMAgent::loadEventFired):
719
720 2012-03-29  Dana Jansens  <danakj@chromium.org>
721
722         [chromium] Remove unneeded code+fixmes from CCOcclusionTracker
723         https://bugs.webkit.org/show_bug.cgi?id=82380
724
725         Reviewed by Adrienne Walker.
726
727         The current occlusion was exposed on the occlusion tracker for the
728         transition over to culling 2.0 which has landed, so we can remove
729         it now. It still had one use in unit tests which is moved to a
730         test subclass.
731
732         Above test subclass already existed in the occlusion tracker tests,
733         so pulled it out to a common file CCOcclusionTrackerTestCommon.h
734         so that other unit tests can use it to get at occlusion internals.
735
736         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
737         (WebCore):
738         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
739
740 2012-03-29  Joseph Pecoraro  <pecoraro@apple.com>
741
742         <http://webkit.org/b/82558> Toggling <input type="range"> readonly or disabled state while active breaks all click events
743
744         Test: fast/forms/range/range-drag-when-toggled-disabled.html
745
746         Reviewed by Kent Tamura.
747
748         * html/shadow/SliderThumbElement.cpp:
749         (WebCore::SliderThumbElement::defaultEventHandler):
750         A slider can toggle its readonly or disabled state while in the middle
751         of dragging, in those cases we should cancel the drag and perform cleanup.
752
753 2012-03-29  Adam Klein  <adamk@chromium.org>
754
755         Factor out common post-insertion logic in ContainerNode
756         https://bugs.webkit.org/show_bug.cgi?id=82544
757
758         Reviewed by Ryosuke Niwa.
759
760         appendChild, insertBefore, and replaceChild all share a great deal of logic.
761         This patch factors out the "post-insertion" logic that deals with
762         notifying parents that their children changed and notifying children
763         that they've been added to the tree.
764
765         Besides reducing code duplication, this is in preparation for moving
766         this post-insertion notification later in the insertion process.
767
768         No new tests, no change in behavior.
769
770         * dom/ContainerNode.cpp:
771         (WebCore):
772         (WebCore::ContainerNode::insertBefore): Factor out shared logic, remove unnecessary "prev" variable.
773         (WebCore::ContainerNode::replaceChild): ditto.
774         (WebCore::ContainerNode::appendChild): ditto.
775         (WebCore::updateTreeAfterInsertion): New helper method encapsulating shared logic.
776
777 2012-03-29  Tony Chang  <tony@chromium.org>
778
779         Need to implement flex-line-pack
780         https://bugs.webkit.org/show_bug.cgi?id=70794
781
782         Reviewed by Ojan Vafai.
783
784         Tests: css3/flexbox/multiline-line-pack-horizontal-column.html
785                css3/flexbox/multiline-line-pack.html
786
787         * rendering/RenderFlexibleBox.cpp:
788         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
789         (WebCore::initialLinePackingOffset): Similar to initialPackingOffset.
790         (WebCore):
791         (WebCore::linePackingSpaceBetweenChildren): Similar to packingSpaceBetweenChildren.
792         (WebCore::RenderFlexibleBox::packFlexLines): Move lines based on flex-line-pack.
793             Note that we don't need to relayout on stretch because
794             alignChildren will do that for us (only auto size needs stretching).
795         (WebCore::RenderFlexibleBox::flipForWrapReverse): Pull out the initial
796             cross axis offset before calling packFlexLines because we can
797             move the the line contexts.
798         * rendering/RenderFlexibleBox.h:
799
800 2012-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
801
802         Web Inspector: SnippetsScriptMapping should process existing snippets on load.
803         https://bugs.webkit.org/show_bug.cgi?id=82619
804
805         Reviewed by Pavel Feldman.
806
807         SnippetsScriptMapping now loads existing snippets on creation.
808         Otherwise scripts panel shows snippets created during current session only.
809         Drive-by ScriptsNavigator closure compilation fix.
810
811         * inspector/front-end/SnippetsModel.js:
812         (WebInspector.SnippetsModel.prototype.set get snippets):
813         (WebInspector.SnippetsScriptMapping):
814         (WebInspector.SnippetsScriptMapping.prototype._handleSnippetAdded):
815         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
816
817 2012-03-29  Yury Semikhatsky  <yurys@chromium.org>
818
819         Web Inspector: check more likely condition first in HeapSnapshot._buildAggregates
820         https://bugs.webkit.org/show_bug.cgi?id=82621
821
822         Reviewed by Pavel Feldman.
823
824         * inspector/front-end/HeapSnapshot.js: selfSize === 0 is quite rare, moving this condition
825         to the first place saves 1 of 6 secs on the heap profiler perf test.
826         (WebInspector.HeapSnapshot.prototype._buildAggregates):
827         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes): root node is always the first
828         one and is the only one that doesn't have dominator, so we may start iterating nodes from
829         the second node and avoid additional check in the loop.
830
831 2012-03-29  Pavel Feldman  <pfeldman@chromium.org>
832
833         Web Inspector: "go to the previous panel" shortcut is painful to maintain
834         https://bugs.webkit.org/show_bug.cgi?id=82602
835
836         Reviewed by Vsevolod Vlasov.
837
838         Present go to previous panel shortcut "Cmd - Left" is painful to support since we have
839         more and more free flow editing capabilities (where Cmd - Left is handled by the editor).
840         Remaping it to Cmd - Option - [ (]) /  (Ctrl - Alt - [ (]) ).
841
842         Drive-by: de-capitalize captions from the settings panel.
843
844         * English.lproj/localizedStrings.js:
845         * inspector/front-end/ConsoleView.js:
846         (WebInspector.ConsoleView.prototype._registerShortcuts):
847         * inspector/front-end/InspectorView.js:
848         (WebInspector.InspectorView.prototype._keyDown):
849         * inspector/front-end/ScriptsPanel.js:
850         * inspector/front-end/TimelinePanel.js:
851         (WebInspector.TimelinePanel.prototype._registerShortcuts):
852         (WebInspector.TimelinePanel.prototype._contextMenu):
853         * inspector/front-end/inspector.js:
854         (WebInspector._registerShortcuts):
855
856 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
857
858         Unreviewed, rolling out r112531.
859         http://trac.webkit.org/changeset/112531
860         https://bugs.webkit.org/show_bug.cgi?id=82616
861
862         Broke timeline overview selection
863
864         * inspector/front-end/TimelineOverviewPane.js:
865         (WebInspector.TimelineOverviewWindow):
866
867 2012-03-28  Dirk Schulze  <krit@webkit.org>
868
869         Introduce CSSParserMode in all classes
870         https://bugs.webkit.org/show_bug.cgi?id=82335
871
872         Reviewed by Ryosuke Niwa.
873
874         Introduce the new CSSParserMode enum to more classes. SVG classes make use of SVGAttributeMode for CSS parsing already.
875         But SVGAttributeMode does not differ from CSSQuirksMode at the moment. This will change with a followup patch on bug 46112.
876
877         No new tests. No change of functionality. Everything gets covered by existing tests.
878
879         * css/CSSImportRule.cpp:
880         (WebCore::CSSImportRule::setCSSStyleSheet):
881         * css/CSSMediaRule.cpp:
882         (WebCore::CSSMediaRule::insertRule):
883         * css/CSSParser.cpp: Move private functions away from strict boolean and make use of CSSParserMode instead.
884         (WebCore):
885         (WebCore::parseColorValue):
886         (WebCore::parseSimpleLengthValue):
887         (WebCore::CSSParser::parseFontFaceValue):
888         (WebCore::CSSParser::parseValue):
889         (WebCore::CSSParser::parseColor):
890         (WebCore::CSSParser::createStyleRule):
891         (WebCore::CSSParser::createFontFaceRule):
892         (WebCore::CSSParser::createPageRule):
893         (WebCore::CSSParser::createKeyframeRule):
894         * css/CSSParser.h: Removed constructor with boolean argument. We just use the CSSParserMode enum now.
895         (CSSParser):
896         * css/CSSParserMode.h:
897         (strictToCSSParserMode): New helper function to convert boolean to CSSParserMode.
898         (isStrictParserMode): Helper function that returns true if argument is CSSStrictMode.
899         * css/CSSRule.h:
900         (WebCore::CSSRule::cssParserMode): Renamed useStrictParsing to cssParserMode since it returns CSSParserMode instead of a boolean now.
901         * css/CSSStyleSheet.cpp:
902         (WebCore::CSSStyleSheet::CSSStyleSheet):
903         (WebCore::CSSStyleSheet::insertRule):
904         (WebCore::CSSStyleSheet::parseString):
905         (WebCore::CSSStyleSheet::parseStringAtLine):
906         * css/CSSStyleSheet.h:
907         (CSSStyleSheet):
908         (WebCore::CSSStyleSheet::setCSSParserMode): Renamed setStrictParsing to setCSSParserMode since we set an enum now.
909         (WebCore::CSSStyleSheet::cssParserMode): Renamed useStrictParsing to cssParserMode since it returns CSSParserMode instead of a boolean now.
910         * css/MediaList.cpp:
911         (WebCore::MediaQuerySet::parse):
912         (WebCore::MediaQuerySet::add):
913         (WebCore::MediaQuerySet::remove):
914         * css/StylePropertySet.cpp:
915         (WebCore::StylePropertySet::StylePropertySet):
916         (WebCore::StylePropertySet::setProperty):
917         (WebCore::StylePropertySet::parseDeclaration):
918         * css/StylePropertySet.h: Use unsigned member variables to store the parser mode.  
919         (WebCore::StylePropertySet::create):
920         (WebCore::StylePropertySet::setCSSParserMode): Renamed setStrictParsing to setCSSParserMode since we get an enum now. This gets converted to unsigned internally.
921         (WebCore::StylePropertySet::cssParserMode): Renamed useStrictParsing to cssParserMode since it returns CSSParserMode instead of a boolean now.
922         (StylePropertySet):
923         * css/StyleSheet.h:
924         (StyleSheet):
925         * css/WebKitCSSKeyframesRule.cpp:
926         (WebCore::WebKitCSSKeyframesRule::insertRule):
927         * css/WebKitCSSMatrix.cpp:
928         (WebCore::WebKitCSSMatrix::setMatrixValue):
929         * dom/Document.cpp:
930         (WebCore::Document::webkitGetFlowByName):
931         (WebCore::Document::pageUserSheet):
932         (WebCore::Document::pageGroupUserSheets):
933         * dom/Element.cpp:
934         (WebCore::Element::webkitMatchesSelector):
935         * dom/ElementAttributeData.cpp:
936         (WebCore::ElementAttributeData::ensureInlineStyle):
937         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
938         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
939         * dom/Node.cpp:
940         (WebCore::Node::querySelector):
941         (WebCore::Node::querySelectorAll):
942         * dom/ProcessingInstruction.cpp:
943         (WebCore::ProcessingInstruction::parseStyleSheet):
944         * dom/StyleElement.cpp:
945         (WebCore::StyleElement::createSheet):
946         * html/HTMLElement.cpp:
947         (WebCore::StyledElement::copyNonAttributeProperties):
948         * html/HTMLLinkElement.cpp:
949         (WebCore::HTMLLinkElement::setCSSStyleSheet):
950         * html/canvas/CanvasRenderingContext2D.cpp:
951         (WebCore::CanvasRenderingContext2D::setFont):
952         * html/shadow/ContentSelectorQuery.cpp:
953         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
954         * inspector/InspectorStyleSheet.cpp:
955         (WebCore::InspectorStyleSheet::reparseStyleSheet):
956         * svg/SVGElementRareData.h:
957         (WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties):
958         * svg/SVGFontFaceElement.cpp:
959         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
960         * svg/SVGStyledElement.cpp:
961         (WebCore::SVGStyledElement::getPresentationAttribute):
962         * xml/XSLStyleSheet.h:
963         (XSLStyleSheet):
964         * xml/XSLStyleSheetLibxslt.cpp:
965         (WebCore::XSLStyleSheet::parseString):
966         * xml/XSLStyleSheetQt.cpp:
967         (WebCore::XSLStyleSheet::parseString):
968
969 2012-03-29  Sanghyun Park  <sh919.park@samsung.com>
970
971         Fix the error type in JSAudioBufferSourceNodeCustom to pass layout test.
972         https://bugs.webkit.org/show_bug.cgi?id=81639
973
974         Reviewed by Eric Carlson.
975
976         Test : LayoutTest/webaudio/audiobuffersource-channels.html
977
978         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
979
980 2012-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
981
982         Web Inspector: Existing UISourceCode should be loaded on scripts panel creation/reset.
983         https://bugs.webkit.org/show_bug.cgi?id=82614
984
985         Reviewed by Pavel Feldman.
986
987         UISourceCode are now loaded from DebuggerPresentationModel on scripts panel creation/reset.
988         This is needed to show snippets that are loaded before scripts panel creation and are not removed on navigation.
989
990         * inspector/front-end/ScriptsPanel.js:
991         (WebInspector.ScriptsPanel.prototype._handleUISourceCodeAdded):
992         (WebInspector.ScriptsPanel.prototype._loadUISourceCodes):
993         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
994         (WebInspector.ScriptsPanel.prototype._reset):
995         * inspector/front-end/SnippetsModel.js:
996         (WebInspector.SnippetsScriptMapping.prototype.uiSourceCodeList):
997
998 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
999
1000         Web Inspector: on a single click in Timeline overview, make a minimal selection centered around cursor
1001         https://bugs.webkit.org/show_bug.cgi?id=82616
1002
1003         Reviewed by Pavel Feldman.
1004
1005         * inspector/front-end/TimelineOverviewPane.js:
1006         (WebInspector.TimelineOverviewWindow): Explicitly handle single click on overview by creating a minimal window around cursor.
1007         (WebInspector.TimelineOverviewWindow.prototype._resizeWindowMinimum):
1008
1009 2012-03-29  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1010
1011         Unavailable pre-processor macro in non-Qt environments
1012         https://bugs.webkit.org/show_bug.cgi?id=82042
1013
1014         Reviewed by Simon Hausmann.
1015
1016         This patch removes the use of the macro QT_VERSION_CHECK() because, in
1017         non-Qt environments, the pre-processors raises an error. Instead of
1018         calling the macro to generate the version number, the version is
1019         expressed directly.
1020
1021         * platform/graphics/texmap/TextureMapperGL.cpp:
1022         (SharedGLData): remove pre-processor macro for Qt version check.
1023
1024 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
1025
1026         Web Inspector: event details popover in Timeline panel displays invalid time offset
1027         https://bugs.webkit.org/show_bug.cgi?id=82611
1028
1029         Reviewed by Pavel Feldman.
1030
1031         * inspector/front-end/TimelinePresentationModel.js:
1032         (WebInspector.TimelinePresentationModel.prototype.addRecord): use time in seconds, not raw model time for minimumRecordTime.
1033
1034 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
1035
1036         Web Inspector: use canvas to render bars in "vertical overview" mode
1037         https://bugs.webkit.org/show_bug.cgi?id=82606
1038
1039         Reviewed by Pavel Feldman.
1040
1041         * inspector/front-end/TimelineOverviewPane.js: Use canvas instead of DOM for rendering vertical overview bars.
1042         (WebInspector.TimelineVerticalOverview):
1043         (WebInspector.TimelineVerticalOverview.prototype.update):
1044         (WebInspector.TimelineVerticalOverview.prototype._renderBars):
1045         (WebInspector.TimelineVerticalOverview.prototype._renderBar):
1046         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes):
1047         * inspector/front-end/timelinePanel.css: Drop styles previously used for DOM-based vertical overview rendering.
1048         (.timeline-vertical-overview-bars):
1049
1050 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
1051
1052         Web Inspector: timeline overview window selection is not reset upon clear/record
1053         https://bugs.webkit.org/show_bug.cgi?id=82603
1054
1055         Reviewed by Pavel Feldman.
1056
1057         - TimelineOverviewPane.reset() -> _reset();
1058         - perform update() from reset();
1059         - perform reset() upon RecordsCleared event from the model.
1060
1061         * inspector/front-end/TimelineOverviewPane.js:
1062         (WebInspector.TimelineOverviewPane):
1063         (WebInspector.TimelineOverviewPane.prototype._reset):
1064         (WebInspector.TimelineVerticalOverview):
1065         (WebInspector.TimelineVerticalOverview.prototype.update):
1066         (WebInspector.TimelineVerticalOverview.prototype._renderBars):
1067         (WebInspector.TimelineVerticalOverview.prototype._renderBar):
1068         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes):
1069         * inspector/front-end/timelinePanel.css:
1070         (.timeline-vertical-overview-bars):
1071
1072 2012-03-29  Zalan Bujtas  <zbujtas@gmail.com>
1073
1074         Remove redundant updateViewportArguments() call when page is restored from page cache.
1075         https://bugs.webkit.org/show_bug.cgi?id=82500
1076
1077         Reviewed by Kenneth Rohde Christiansen.
1078
1079         Document::updateViewportArguments() is called twice, while restoring a page from page cache.
1080         First, it is called when the document is set on the mainframe and later, it is called
1081         when page cache finished the restoration. Since viewport arguments don't change between
1082         the 2 calls, it's safe to remove the second.
1083
1084         Manual test added. Viewport value updates heavily depend on UI process code.
1085
1086         * dom/Document.cpp:
1087         (WebCore::Document::documentDidResumeFromPageCache):
1088
1089 2012-03-29  Charles Wei  <charles.wei@torchmobile.com.cn>
1090
1091         [BlackBerry] Add Internal test support for blackberry porting.
1092         https://bugs.webkit.org/show_bug.cgi?id=82597
1093
1094         Reviewed by Rob Buis.
1095
1096         No new tests, just the build system enhancement for BlackBerry porting.
1097
1098         * UseJSC.cmake:
1099
1100 2012-03-28  Yury Semikhatsky  <yurys@chromium.org>
1101
1102         Web Inspector: switch heap profiler front-end to separate storage of nodes and edges
1103         https://bugs.webkit.org/show_bug.cgi?id=82453
1104
1105         When heap snapshot is completely loaded move nodes and containment edges
1106         into two separate arrays. This way we don't need _nodeIndex and _nodePosition
1107         maps to go from node offset inside the raw snapshot to its index and back, instead
1108         we may just divide node offset by the number of node fields to get node index. After
1109         the nodes and containment edges are separated original array (_nodes) is dropped.
1110         All front-end code was switched to the new representation.
1111
1112         Reviewed by Pavel Feldman.
1113
1114         * inspector/front-end/HeapSnapshot.js:
1115         (WebInspector.HeapSnapshotRetainerEdge):
1116         (WebInspector.HeapSnapshotRetainerEdge.prototype.clone):
1117         (WebInspector.HeapSnapshotRetainerEdge.prototype.set edgeIndex):
1118         (WebInspector.HeapSnapshotRetainerEdge.prototype.get _edge):
1119         (WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.hasNext):
1120         (WebInspector.HeapSnapshotNode.prototype.get edgesCount):
1121         (WebInspector.HeapSnapshotNode.prototype.get rawEdges):
1122         (WebInspector.HeapSnapshotNode.prototype.get retainers):
1123         (WebInspector.HeapSnapshotNode.prototype.get _nodes):
1124         (WebInspector.HeapSnapshotNode.prototype._firstEdgeIndex):
1125         (WebInspector.HeapSnapshotNode.prototype._afterLastEdgeIndex):
1126         (WebInspector.HeapSnapshotNode.prototype.get _nextNodeIndex):
1127         (WebInspector.HeapSnapshot.prototype._init):
1128         (WebInspector.HeapSnapshot.prototype._splitNodesAndContainmentEdges):
1129         (WebInspector.HeapSnapshot.prototype._createOnlyNodesArray):
1130         (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
1131         (WebInspector.HeapSnapshot.prototype._buildRetainers):
1132         (WebInspector.HeapSnapshot.prototype.dispose):
1133         (WebInspector.HeapSnapshot.prototype.get maxNodeId):
1134         (WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
1135         (WebInspector.HeapSnapshot.prototype._bfs):
1136         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
1137         (WebInspector.HeapSnapshot.prototype._getDominatedIndex):
1138         (WebInspector.HeapSnapshot.prototype._markInvisibleEdges):
1139         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
1140
1141 2012-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
1142
1143         [BlackBerry] Add m_targetType to WorkerScriptLoader
1144         https://bugs.webkit.org/show_bug.cgi?id=82574
1145
1146         Reviewed by Rob Buis.
1147
1148         Just as Chromium porting blackberry porting is using m_targetType also.
1149
1150         * workers/WorkerScriptLoader.h:
1151         (WorkerScriptLoader):
1152
1153 2012-03-29  Robin Cao  <robin.cao@torchmobile.com.cn>
1154
1155         [BlackBerry] Add an empty implementation of GraphicsContext3D::setErrorMessageCallback
1156         https://bugs.webkit.org/show_bug.cgi?id=82570
1157
1158         Reviewed by Rob Buis.
1159
1160         No new tests, no change in functionality.
1161
1162         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
1163         (WebCore::GraphicsContext3D::setErrorMessageCallback): Add an empty implementation.
1164         (WebCore):
1165
1166 2012-03-29  Robin Cao  <robin.cao@torchmobile.com.cn>
1167
1168         [BlackBerry] Clean up ImageBufferData
1169         https://bugs.webkit.org/show_bug.cgi?id=82444
1170
1171         Reviewed by Rob Buis.
1172
1173         No behavior changes, no new tests.
1174
1175         * platform/graphics/blackberry/skia/ImageBufferDataSkia.h:
1176         (ImageBufferData): Remove unused member variable m_buffer and change the type
1177         of m_platformLayer from LayerWebKitThread to CanvasLayerWebKitThread.
1178
1179 2012-03-28  Antti Koivisto  <antti@apple.com>
1180
1181         Split WebKitCSSKeyframeRule into internal and CSSOM types 
1182         https://bugs.webkit.org/show_bug.cgi?id=82490 
1183
1184         Reviewed by Andreas Kling.
1185
1186         WebKitCSSKeyframeRule is a CSSOM type and should not be used internally.
1187         
1188         - Add StyleKeyframe as the internal data structure for keyframes.
1189         - WebKitCSSKeyframeRule becomes a wrapper for StyleKeyframe.
1190         - Use StyleKeyframe internally so WebKitCSSKeyframeRules are created on CSSOM access only.
1191
1192         * css/CSSGrammar.y:
1193         
1194             Use StyleKeyframes instead of WebKitCSSKeyframeRules.
1195         
1196         * css/CSSMediaRule.h:
1197         (CSSMediaRule):
1198         (WebCore::CSSMediaRule::length):
1199         (WebCore::CSSMediaRule::item):
1200         
1201             Adapt to LiveCSSRuleList changes.
1202         
1203         * css/CSSParser.cpp:
1204         (WebCore::CSSParser::parseKeyframeRule):
1205         (WebCore::CSSParser::createKeyframe):
1206         * css/CSSParser.h:        
1207         (WebCore):
1208         (CSSParser):
1209         
1210             Construct StyleKeyframes.
1211         
1212         * css/CSSRuleList.h:
1213         (WebCore::LiveCSSRuleList::length):
1214         (WebCore::LiveCSSRuleList::item):
1215
1216             Make LiveCSSRuleList call rule item()/length() to avoid accessor duplication.
1217     
1218         * css/CSSStyleSelector.cpp:
1219         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1220         * css/CSSStyleSelector.h:
1221         (CSSStyleSelector):
1222         * css/WebKitCSSKeyframeRule.cpp:
1223         
1224             Use StyleKeyframe.
1225             Make 0% and 100% keyframes static.
1226         
1227         (WebCore):
1228         (WebCore::StyleKeyframe::setProperties):
1229         (WebCore::StyleKeyframe::parseKeyString):
1230         (WebCore::StyleKeyframe::cssText):
1231         (WebCore::WebKitCSSKeyframeRule::WebKitCSSKeyframeRule):
1232         (WebCore::WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule):
1233         (WebCore::WebKitCSSKeyframeRule::style):
1234         * css/WebKitCSSKeyframeRule.h:
1235         (WebCore):
1236         (WebCore::StyleKeyframe::create):
1237         (WebCore::StyleKeyframe::keyText):
1238         (WebCore::StyleKeyframe::setKeyText):
1239         (StyleKeyframe):
1240         (WebCore::StyleKeyframe::properties):
1241         (WebCore::StyleKeyframe::StyleKeyframe):
1242         (WebKitCSSKeyframeRule):
1243         (WebCore::WebKitCSSKeyframeRule::keyText):
1244         (WebCore::WebKitCSSKeyframeRule::setKeyText):
1245         (WebCore::WebKitCSSKeyframeRule::cssText):
1246         
1247             Split to internal and CSSOM wrapper type. The wrapper refs StyleKeyframe. 
1248         
1249         * css/WebKitCSSKeyframesRule.cpp:
1250         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
1251         (WebCore::WebKitCSSKeyframesRule::parserAppendKeyframe):
1252         (WebCore::WebKitCSSKeyframesRule::insertRule):
1253         (WebCore::WebKitCSSKeyframesRule::deleteRule):
1254         (WebCore::WebKitCSSKeyframesRule::findRule):
1255         (WebCore::WebKitCSSKeyframesRule::findKeyframeIndex):
1256         (WebCore::WebKitCSSKeyframesRule::cssText):
1257         (WebCore):
1258         (WebCore::WebKitCSSKeyframesRule::item):
1259         * css/WebKitCSSKeyframesRule.h:
1260         (WebCore):
1261         (WebCore::WebKitCSSKeyframesRule::keyframes):
1262         (WebKitCSSKeyframesRule):
1263         (WebCore::WebKitCSSKeyframesRule::length):
1264         
1265             Keep StyleKeyframes and the wrappers (WebKitCSSKeyframeRules) in separate vectors.
1266             Construct the wrapper vector and wrappers themselves on demand.
1267             Keep the vectors in sync during mutations.
1268         
1269         * css/WebKitCSSRegionRule.h:
1270         
1271             Adapt to LiveCSSRuleList changes.
1272
1273 2012-03-29  Zeno Albisser  <zeno@webkit.org>
1274
1275         Fieldset disabled attribute does not work.
1276         https://bugs.webkit.org/show_bug.cgi?id=58837
1277
1278         Make HTMLFormControlElements inherit the disabled state
1279         from HTMLFieldSetElement ancestors. Subordinates of the
1280         first HTMLLegendElement in a fieldset will never be disabled.
1281
1282         Patch by Zeno Albisser <zeno@webkit.org>
1283
1284         Test: fast/forms/fieldset-disabled.html
1285
1286         Reviewed by Kent Tamura.
1287
1288         * html/HTMLFieldSetElement.cpp:
1289         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
1290         (WebCore):
1291         (WebCore::HTMLFieldSetElement::legend):
1292         * html/HTMLFieldSetElement.h:
1293         (HTMLFieldSetElement):
1294         * html/HTMLFieldSetElement.idl:
1295         * html/HTMLFormControlElement.cpp:
1296         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1297         (WebCore::HTMLFormControlElement::updateFieldSetAndLegendAncestor):
1298         (WebCore):
1299         (WebCore::HTMLFormControlElement::parseAttribute):
1300         (WebCore::HTMLFormControlElement::disabledAttributeChanged):
1301         (WebCore::HTMLFormControlElement::removedFromTree):
1302         (WebCore::HTMLFormControlElement::disabled):
1303         * html/HTMLFormControlElement.h:
1304         (WebCore):
1305         (HTMLFormControlElement):
1306
1307 2012-03-29  Tommy Widenflycht  <tommyw@google.com>
1308
1309         MediaStream API: Adding two missing release() calls to PeerConnection00.cpp
1310         https://bugs.webkit.org/show_bug.cgi?id=82584
1311
1312         Reviewed by Adam Barth.
1313
1314         No changes that affects functionality.
1315
1316         * Modules/mediastream/PeerConnection00.cpp:
1317         (WebCore::PeerConnection00::createOffer):
1318         (WebCore::PeerConnection00::createAnswer):
1319
1320 2012-03-29  Ryosuke Niwa  <rniwa@webkit.org>
1321
1322         Pack bitfields in InlineBox for Windows
1323         https://bugs.webkit.org/show_bug.cgi?id=82578
1324
1325         Reviewed by Kent Tamura.
1326
1327         Unlike gcc and clang, MSVC pads each consecutive member variables of the same type in bitfields. e.g. if you have:
1328         sturct AB {
1329         unsigned m_1 : 31;
1330         bool m_2 : 1;
1331         }
1332         then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang only allocate
1333         sizeof(unsigned) * 1 for AB.
1334
1335         Fixed the bug by packing all bitfields in InlineBox into InlineBoxBitfields and always using either unsigned or int.
1336
1337         * rendering/EllipsisBox.cpp:
1338         (WebCore::EllipsisBox::paint):
1339         (WebCore::EllipsisBox::selectionRect):
1340         (WebCore::EllipsisBox::nodeAtPoint):
1341         * rendering/InlineBox.cpp:
1342         (WebCore):
1343         (SameSizeAsInlineBox):
1344         (WebCore::InlineBox::logicalHeight):
1345         (WebCore::InlineBox::baselinePosition): Moved from the header file since it's a virtual function.
1346         (WebCore::InlineBox::lineHeight): Ditto.
1347         (WebCore::InlineBox::deleteLine):
1348         (WebCore::InlineBox::extractLine):
1349         (WebCore::InlineBox::attachLine):
1350         (WebCore::InlineBox::nextOnLineExists):
1351         (WebCore::InlineBox::clearKnownToHaveNoOverflow):
1352         * rendering/InlineBox.h:
1353         (WebCore::InlineBox::InlineBox):
1354         (WebCore::InlineBox::isText):
1355         (WebCore::InlineBox::setIsText):
1356         (WebCore::InlineBox::hasVirtualLogicalHeight):
1357         (WebCore::InlineBox::setHasVirtualLogicalHeight):
1358         (WebCore::InlineBox::isHorizontal):
1359         (WebCore::InlineBox::setIsHorizontal):
1360         (WebCore::InlineBox::isConstructed):
1361         (WebCore::InlineBox::setConstructed):
1362         (WebCore::InlineBox::setExtracted):
1363         (WebCore::InlineBox::setFirstLineStyleBit):
1364         (WebCore::InlineBox::isFirstLineStyle):
1365         (InlineBox):
1366         (WebCore::InlineBox::bidiLevel):
1367         (WebCore::InlineBox::setBidiLevel):
1368         (WebCore::InlineBox::direction):
1369         (WebCore::InlineBox::isDirty):
1370         (WebCore::InlineBox::markDirty):
1371         (WebCore::InlineBox::expansion):
1372         (WebCore::InlineBox::verticalAlign):
1373         (WebCore::InlineBox::knownToHaveNoOverflow):
1374         (WebCore::InlineBox::dirOverride):
1375         (WebCore::InlineBox::setDirOverride):
1376         (InlineBoxBitfields):
1377         (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
1378         (WebCore::InlineBox::InlineBoxBitfields::bidiEmbeddingLevel):
1379         (WebCore::InlineBox::InlineBoxBitfields::setBidiEmbeddingLevel):
1380         (WebCore::InlineBox::InlineBoxBitfields::determinedIfNextOnLineExists):
1381         (WebCore::InlineBox::InlineBoxBitfields::setDeterminedIfNextOnLineExists):
1382         (WebCore::InlineBox::InlineBoxBitfields::nextOnLineExists):
1383         (WebCore::InlineBox::InlineBoxBitfields::setNextOnLineExists):
1384         (WebCore::InlineBox::InlineBoxBitfields::expansion):
1385         (WebCore::InlineBox::InlineBoxBitfields::setExpansion):
1386         (WebCore::InlineBox::endsWithBreak):
1387         (WebCore::InlineBox::setEndsWithBreak):
1388         (WebCore::InlineBox::hasEllipsisBox):
1389         (WebCore::InlineBox::hasSelectedChildren):
1390         (WebCore::InlineBox::setHasSelectedChildren):
1391         (WebCore::InlineBox::setHasEllipsisBox):
1392         (WebCore::InlineBox::hasHyphen):
1393         (WebCore::InlineBox::setHasHyphen):
1394         (WebCore::InlineBox::canHaveLeadingExpansion):
1395         (WebCore::InlineBox::setCanHaveLeadingExpansion):
1396         (WebCore::InlineBox::setExpansion):
1397         (WebCore::InlineBox::extracted):
1398         * rendering/InlineFlowBox.cpp:
1399         (WebCore::InlineFlowBox::addToLine):
1400         (WebCore::InlineFlowBox::removeChild):
1401         (WebCore::InlineFlowBox::extractLine):
1402         (WebCore::InlineFlowBox::attachLine):
1403         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
1404         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
1405         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1406         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
1407         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
1408         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
1409         (WebCore::InlineFlowBox::paintBoxDecorations):
1410         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
1411         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
1412         * rendering/InlineTextBox.cpp:
1413         (WebCore::InlineTextBox::destroy):
1414         (WebCore::InlineTextBox::logicalOverflowRect):
1415         (WebCore::InlineTextBox::setLogicalOverflowRect):
1416         (WebCore::InlineTextBox::baselinePosition):
1417         (WebCore::InlineTextBox::lineHeight):
1418         (WebCore::InlineTextBox::localSelectionRect):
1419         (WebCore::InlineTextBox::extractLine):
1420         (WebCore::InlineTextBox::attachLine):
1421         (WebCore::InlineTextBox::placeEllipsisBox):
1422         (WebCore::InlineTextBox::paint):
1423         (WebCore::InlineTextBox::paintDecoration):
1424         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
1425         (WebCore::InlineTextBox::paintCompositionUnderline):
1426         (WebCore::InlineTextBox::offsetForPosition):
1427         (WebCore::InlineTextBox::positionForOffset):
1428         (WebCore::InlineTextBox::constructTextRun):
1429         * rendering/InlineTextBox.h:
1430         (InlineTextBox):
1431         (WebCore::InlineTextBox::setExpansion):
1432         (WebCore::InlineTextBox::expansionBehavior):
1433         * rendering/RenderBlockLineLayout.cpp:
1434         (WebCore::RenderBlock::constructLine):
1435         * rendering/RenderTreeAsText.cpp:
1436         (WebCore::writeTextRun):
1437         * rendering/RootInlineBox.cpp:
1438         (WebCore::RootInlineBox::baselinePosition): Moved from the header file since it's a virtual function.
1439         (WebCore::RootInlineBox::lineHeight): Ditto.
1440         (WebCore::RootInlineBox::paint):
1441         (WebCore::RootInlineBox::ascentAndDescentForBox):
1442         (WebCore::RootInlineBox::verticalPositionForBox):
1443         * rendering/RootInlineBox.h:
1444         (RootInlineBox):
1445         * rendering/svg/SVGInlineTextBox.cpp:
1446         (WebCore::SVGInlineTextBox::constructTextRun):
1447         * rendering/svg/SVGRenderTreeAsText.cpp:
1448         (WebCore::writeSVGInlineTextBox):
1449
1450 2012-03-29  hayato@chromium.org  <hayato@chromium.org>
1451
1452         Let focus navigation be compliant with Shadow DOM spec.
1453         https://bugs.webkit.org/show_bug.cgi?id=78588
1454
1455         Reviewed by Dimitri Glazkov.
1456
1457         Re-landing r112500. Fixed an assertion failure on ReifiedTreeTraversal.
1458
1459         Sequential focus navigation now behaves exactly as specified in the Shadow DOM spec.
1460
1461         According to the Shadow DOM spec:
1462         The shadow DOM navigation order sequence is inserted into the document navigation order:
1463         1. immediately after the shadow host, if the shadow host is focusable; or
1464         2. in place of the shadow host as if the shadow host were assigned the value of auto for determining its position.
1465
1466         Prior to this patch, sequential focus navigation goes into Shadow DOM, but it is incomplete
1467         since insertion points, such as <content> elements or <shadow> elements, are not resolved at all.
1468         Now focus navigation can traverse shadow DOM subtrees in 'reified tree order', resolving lower boundaries transparently.
1469
1470         Implementation notes:
1471         Prior to this patch, sequential focus navigation does not go into Shadow DOM if a shadow host is non-focusable.
1472         Now focus navigation must go into Shadow DOM subtrees even if a show host is not focusable as described in 2).
1473         To support this behavior, this patch introduced adjustedTabIndex() locally in FocusController so that
1474         it does not skip a non-focusable shadow host in current focus scope.
1475         After finding a *pseudo* focusable element in current focus scope, it tries to resolve a focused element recursively,
1476         considering a nested focus scope inside of a shadow host or iframe.
1477         To traverse Shadow DOM subtrees, a FocusController makes use of ReifiedTreeTraversal APIs, which was introduced in r112055.
1478
1479         This change does not affect an existing behavior if a shadow dom is not involved.
1480
1481         Test: fast/dom/shadow/focus-navigation.html
1482
1483         * dom/Element.cpp:
1484         (WebCore::Element::focus):
1485         * dom/ReifiedTreeTraversal.cpp:
1486         (WebCore::ReifiedTreeTraversal::parentNodeWithoutCrossingUpperBoundary):
1487         * page/FocusController.cpp:
1488         (WebCore::isShadowHost):
1489         (WebCore):
1490         (WebCore::FocusScope::FocusScope):
1491         (WebCore::FocusScope::rootNode):
1492         (WebCore::FocusScope::owner):
1493         (WebCore::FocusScope::focusScopeOf):
1494         (WebCore::FocusScope::focusScopeOwnedByShadowHost):
1495         (WebCore::FocusScope::focusScopeOwnedByIFrame):
1496         (WebCore::hasCustomFocusLogic):
1497         (WebCore::isNonFocusableShadowHost):
1498         (WebCore::isFocusableShadowHost):
1499         (WebCore::adjustedTabIndex):
1500         (WebCore::shouldVisit):
1501         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
1502         (WebCore::FocusController::advanceFocusInDocumentOrder):
1503         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
1504         (WebCore::FocusController::findFocusableNodeRecursively):
1505         (WebCore::FocusController::findFocusableNode):
1506         (WebCore::FocusController::findNodeWithExactTabIndex):
1507         (WebCore::nextNodeWithGreaterTabIndex):
1508         (WebCore::previousNodeWithLowerTabIndex):
1509         (WebCore::FocusController::nextFocusableNode):
1510         (WebCore::FocusController::previousFocusableNode):
1511         * page/FocusController.h:
1512         (WebCore):
1513         (FocusScope):
1514         (FocusController):
1515
1516 2012-03-28  Kinuko Yasuda  <kinuko@chromium.org>
1517
1518         [chromium] Add isolated filesystem type and WebDragData::filesystem_id for drag-and-drop using File/DirectoryEntry.
1519         https://bugs.webkit.org/show_bug.cgi?id=76826
1520
1521         Add two helper methods for creating isolated filesystem to the
1522         PlatformSupport interface.
1523
1524         Reviewed by David Levin.
1525
1526         No new tests: tests will be added when app-facing code is added.
1527
1528         * platform/chromium/PlatformSupport.h:
1529         (PlatformSupport):
1530
1531 2012-03-29  Vineet Chaudhary  <rgf748@motorola.com>
1532
1533         Remove custom bindings form Internals.idl of attribute type Array.
1534         https://bugs.webkit.org/show_bug.cgi?id=82319
1535
1536         Reviewed by Kentaro Hara.
1537
1538         Remove custom bindings for Array type and replace Array type with sequence<String>.
1539
1540         No new tests. LayoutTests/fast/harness/user-preferred-language.html should pass
1541         even after these changes.
1542
1543         * Target.pri: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
1544         * UseJSC.cmake: Remove JSInternalsCustom.cpp.
1545         * UseV8.cmake: Remove V8InternalsCustom.cpp.
1546         * WebCore.gypi: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
1547         * WebCore.vcproj/WebCoreTestSupport.vcproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
1548         * WebCore.xcodeproj/project.pbxproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
1549         * bindings/js/JSDOMBinding.h:
1550         (WebCore):
1551         (WebCore::jsArray): Added new specialize function template for Strings.
1552         * bindings/scripts/CodeGeneratorJS.pm:
1553         (JSValueToNative): Add jsArray<String>() to deduce return type.
1554         (NativeToJSValue): Added check for type String.
1555         * bindings/scripts/CodeGeneratorV8.pm:
1556         (JSValueToNative): Add v8Array<String>() to deduce return type.
1557         (NativeToJSValue): Added check for type String.
1558         * bindings/scripts/test/JS/JSTestObj.cpp:
1559         (WebCore::setJSTestObjSequenceAttr): Modified results from run-binding-tests.
1560         * bindings/scripts/test/V8/V8TestObj.cpp: Modified results from run-binding-tests.
1561         (WebCore::TestObjInternal::sequenceAttrAttrSetter):
1562         * bindings/v8/V8Binding.h: Added new specialize function template for Strings.
1563         (WebCore):
1564         (WebCore::v8Array):
1565         (WebCore::toNativeArray):
1566         * testing/Internals.idl: Replace Array type with sequence<String>
1567         * testing/js/JSInternalsCustom.cpp: Removed.
1568         * testing/v8/V8InternalsCustom.cpp: Removed.
1569
1570 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1571
1572         Unreviewed, rolling out r112500.
1573         http://trac.webkit.org/changeset/112500
1574         https://bugs.webkit.org/show_bug.cgi?id=82576
1575
1576         assertion failed on fast/events/tab-test-not-visible-
1577         imagemap.html on gtk/qt (Requested by hayato on #webkit).
1578
1579         * dom/Element.cpp:
1580         (WebCore::Element::focus):
1581         * page/FocusController.cpp:
1582         (WebCore):
1583         (WebCore::shadowRoot):
1584         (WebCore::isTreeScopeOwner):
1585         (WebCore::FocusController::transferFocusToElementInShadowRoot):
1586         (WebCore::hasCustomFocusLogic):
1587         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocumentOrShadowRoot):
1588         (WebCore::FocusController::advanceFocusInDocumentOrder):
1589         (WebCore::ownerOfTreeScope):
1590         (WebCore::FocusController::findFocusableNodeAcrossTreeScope):
1591         (WebCore::FocusController::findFocusableNode):
1592         (WebCore::nextNodeWithExactTabIndex):
1593         (WebCore::previousNodeWithExactTabIndex):
1594         (WebCore::nextNodeWithGreaterTabIndex):
1595         (WebCore::previousNodeWithLowerTabIndex):
1596         (WebCore::FocusController::nextFocusableNode):
1597         (WebCore::FocusController::previousFocusableNode):
1598         * page/FocusController.h:
1599         (WebCore):
1600         (FocusController):
1601
1602 2012-03-28  Kent Tamura  <tkent@chromium.org>
1603
1604         Add TextFieldDecorationElement::decorate()
1605         https://bugs.webkit.org/show_bug.cgi?id=82572
1606
1607         Reviewed by Hajime Morita.
1608
1609         This change will be needed for Bug 82143.
1610         No new tests because of no behavior changes yet. This code change
1611         doesn't affect non-Chromium ports for now.
1612
1613         * dom/ShadowRoot.cpp:
1614         (WebCore::ShadowRoot::create):
1615         Remove unnecessary assertion. We should allow multiple UA shadow roots.
1616         * html/shadow/TextFieldDecorationElement.cpp:
1617         (WebCore::TextFieldDecorationElement::decorate):
1618         Added.
1619         This function adds another ShadowRoot, and it contains one flexible box container.
1620         The container contains existin ShadowRoot content and the decoration element.
1621         * html/shadow/TextFieldDecorationElement.h:
1622         (TextFieldDecorationElement): Add the declaration of decorate().
1623
1624 2012-03-28  Vineet Chaudhary  <rgf748@motorola.com>
1625
1626         Consider removal of removes jsNull()/v8::Null() from JSInternalsCustom.cpp/V8InternalsCustom.cpp
1627         https://bugs.webkit.org/show_bug.cgi?id=82442
1628
1629         Reviewed by Kentaro Hara.
1630
1631         No new tests. LayoutTests/fast/harness/user-preferred-language.html should pass
1632         even after these changes.
1633
1634         * testing/js/JSInternalsCustom.cpp: Remove jsNull() if Vector is empty.
1635         (WebCore::JSInternals::userPreferredLanguages):
1636         * testing/v8/V8InternalsCustom.cpp: Remove v8::Null() if Vector is empty.
1637         (WebCore::V8Internals::userPreferredLanguagesAccessorGetter):
1638
1639 2012-03-28  Hayato Ito  <hayato@chromium.org>
1640
1641         Let focus navigation be compliant with Shadow DOM spec.
1642         https://bugs.webkit.org/show_bug.cgi?id=78588
1643
1644         Reviewed by Dimitri Glazkov.
1645
1646         Sequential focus navigation now behaves exactly as specified in the Shadow DOM spec.
1647
1648         According to the Shadow DOM spec:
1649         The shadow DOM navigation order sequence is inserted into the document navigation order:
1650         1. immediately after the shadow host, if the shadow host is focusable; or
1651         2. in place of the shadow host as if the shadow host were assigned the value of auto for determining its position.
1652
1653         Prior to this patch, sequential focus navigation goes into Shadow DOM, but it is incomplete
1654         since insertion points, such as <content> elements or <shadow> elements, are not resolved at all.
1655         Now focus navigation can traverse shadow DOM subtrees in 'reified tree order', resolving lower boundaries transparently.
1656
1657         Implementation notes:
1658         Prior to this patch, sequential focus navigation does not go into Shadow DOM if a shadow host is non-focusable.
1659         Now focus navigation must go into Shadow DOM subtrees even if a show host is not focusable as described in 2).
1660         To support this behavior, this patch introduced adjustedTabIndex() locally in FocusController so that
1661         it does not skip a non-focusable shadow host in current focus scope.
1662         After finding a *pseudo* focusable element in current focus scope, it tries to resolve a focused element recursively,
1663         considering a nested focus scope inside of a shadow host or iframe.
1664         To traverse Shadow DOM subtrees, a FocusController makes use of ReifiedTreeTraversal APIs, which was introduced in r112055.
1665
1666         This change does not affect an existing behavior if a shadow dom is not involved.
1667
1668         Test: fast/dom/shadow/focus-navigation.html
1669
1670         * dom/Element.cpp:
1671         (WebCore::Element::focus):
1672         * page/FocusController.cpp:
1673         (WebCore::isShadowHost):
1674         (WebCore):
1675         (WebCore::FocusScope::FocusScope):
1676         (WebCore::FocusScope::rootNode):
1677         (WebCore::FocusScope::owner):
1678         (WebCore::FocusScope::focusScopeOf):
1679         (WebCore::FocusScope::focusScopeOwnedByShadowHost):
1680         (WebCore::FocusScope::focusScopeOwnedByIFrame):
1681         (WebCore::hasCustomFocusLogic):
1682         (WebCore::isNonFocusableShadowHost):
1683         (WebCore::isFocusableShadowHost):
1684         (WebCore::adjustedTabIndex):
1685         (WebCore::shouldVisit):
1686         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
1687         (WebCore::FocusController::advanceFocusInDocumentOrder):
1688         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
1689         (WebCore::FocusController::findFocusableNodeRecursively):
1690         (WebCore::FocusController::findFocusableNode):
1691         (WebCore::FocusController::findNodeWithExactTabIndex):
1692         (WebCore::nextNodeWithGreaterTabIndex):
1693         (WebCore::previousNodeWithLowerTabIndex):
1694         (WebCore::FocusController::nextFocusableNode):
1695         (WebCore::FocusController::previousFocusableNode):
1696         * page/FocusController.h:
1697         (WebCore):
1698         (FocusScope):
1699         (FocusController):
1700
1701 2012-03-28  Li Yin  <li.yin@intel.com>
1702
1703         [WebSocket]Browser must fail connection if Sec-WebSocket-Protocol mismatched.
1704         https://bugs.webkit.org/show_bug.cgi?id=82307
1705
1706         Reviewed by Kent Tamura.
1707
1708         From RFC6455: http://tools.ietf.org/html/rfc6455#section-4.1
1709         If the WebSocket openhanding respond included the mismatched
1710         Sec-WebSocket-Protocol header field, the client must fail the WebSocket Connection.
1711
1712         Test: http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header.html
1713
1714         * Modules/websockets/WebSocketHandshake.cpp:
1715         (WebCore::WebSocketHandshake::checkResponseHeaders):
1716
1717 2012-03-28  Jessie Berlin  <jberlin@apple.com>
1718
1719         Fix Windows build after r112482.
1720
1721         * platform/network/cf/FormDataStreamCFNet.cpp:
1722         (WebCore::formOpen):
1723         Do not attempt to use an OS X error code on Windows. Use the POSIX errno instead.
1724
1725 2012-03-28  Alexandru Chiculita  <achicu@adobe.com>
1726
1727         [CSS Filters] Avoid rebuilding FEFilters when RenderLayer is destroyed
1728         https://bugs.webkit.org/show_bug.cgi?id=82524
1729
1730         Reviewed by Dean Jackson.
1731
1732         RenderLayer::~RenderLayer is calling clearBacking which updated the m_filter with new filters,
1733         even though they were to be deleted a couple of lines below. This change avoids updating the filters,
1734         if we are in the "destroyed" state.
1735
1736         No new tests. This change has no visible results to HTML or JavaScript, so it cannot be tested without a debugger.
1737
1738         * rendering/RenderLayer.cpp:
1739         (WebCore::RenderLayer::~RenderLayer):
1740         (WebCore::RenderLayer::clearBacking):
1741         * rendering/RenderLayer.h:
1742         (RenderLayer):
1743
1744 2012-03-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1745
1746         Remove ScriptExecutionContext from NavigatorBattery.idl
1747         https://bugs.webkit.org/show_bug.cgi?id=82556
1748
1749         Reviewed by Adam Barth.
1750
1751         As Bug 73528 comment #71, NavigatorBattery.idl doesn't need to have ScriptExecutionContext.
1752         Document can be used instead of ScriptExecutionContext.
1753
1754         Tests: batterystatus/add-listener-from-callback.html
1755                batterystatus/basic-all-types-of-events.html
1756                batterystatus/basic-operation.html
1757                batterystatus/event-after-navigation.html
1758                batterystatus/multiple-frames.html
1759                batterystatus/updates.html
1760                batterystatus/window-property.html
1761
1762         * Modules/battery/BatteryManager.cpp:
1763         (WebCore::BatteryManager::create):
1764         (WebCore::BatteryManager::BatteryManager):
1765         * Modules/battery/BatteryManager.h:
1766         (BatteryManager):
1767         * Modules/battery/NavigatorBattery.cpp:
1768         (WebCore::NavigatorBattery::webkitBattery):
1769         * Modules/battery/NavigatorBattery.h:
1770         (NavigatorBattery):
1771         * Modules/battery/NavigatorBattery.idl:
1772
1773 2012-03-28  Jason Liu  <jason.liu@torchmobile.com.cn>
1774
1775         [BlackBerry]Missing cookies from HTTP response header in Network tab of Web Inspector.
1776         https://bugs.webkit.org/show_bug.cgi?id=82041
1777
1778         We shouldn't overwrite cookies of response if there are more than one
1779         header of Set-Cookie.
1780
1781         Reviewed by Rob Buis.
1782
1783         Test: http/tests/cookies/resources/setArraycookies.php
1784
1785         * platform/network/blackberry/NetworkJob.cpp:
1786         (WebCore::NetworkJob::handleNotifyHeaderReceived):
1787
1788 2012-03-28  Noel Gordon  <noel.gordon@gmail.com>
1789
1790         JPEGImageDecoder: Set frame alpha state before marking a frame complete
1791         https://bugs.webkit.org/show_bug.cgi?id=82428
1792
1793         Reviewed by Kenneth Russell.
1794
1795         r109779 changed JPEG alpha channel handling by marking a JPEG image frame
1796         as having no alpha _after_ setting the image status frame-complete, which
1797         prevents the application of image color profiles in some WebGL cases.
1798
1799         No new tests. The application of the color profile is not guaranteed for
1800         images used as textures in WebGL. Refer to http://wkb.ug/76498.
1801
1802         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1803         (WebCore::JPEGImageDecoder::jpegComplete): Set the image frame alpha state
1804         before marking the image frame status as frame-complete.
1805
1806 2012-03-28  Emil A Eklund  <eae@chromium.org>
1807
1808         Fix rounding in RenderInline::paintOutlineForLine
1809         https://bugs.webkit.org/show_bug.cgi?id=82540
1810
1811         Reviewed by Eric Seidel.
1812
1813         No new tests, no change in functionality.
1814
1815         * rendering/RenderInline.cpp:
1816         (WebCore::RenderInline::paintOutlineForLine):
1817         Change paintOutlineForLine to pixel snap the left and right edges of the
1818         lines instead of adding the offset to an already rounded number.
1819
1820 2012-03-28  David Grogan  <dgrogan@chromium.org>
1821
1822         IndexedDB: don't expose IDBDatabaseError to script
1823         https://bugs.webkit.org/show_bug.cgi?id=82280
1824
1825         It's not used anywhere and firefox doesn't expose it.
1826
1827         Reviewed by Tony Chang.
1828
1829         Test: storage/indexeddb/removed.html
1830
1831         * CMakeLists.txt:
1832         * DerivedSources.cpp:
1833         * DerivedSources.make:
1834         * DerivedSources.pri:
1835         * GNUmakefile.list.am:
1836         * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
1837         * Modules/indexeddb/IDBDatabaseError.idl: Removed.
1838         * Modules/indexeddb/WorkerContextIndexedDatabase.idl:
1839         * WebCore.gypi:
1840         * WebCore.vcproj/WebCore.vcproj:
1841         * WebCore.xcodeproj/project.pbxproj:
1842
1843 2012-03-28  Kenichi Ishibashi  <bashi@chromium.org>
1844
1845         Respects font fallback list during webfonts are loading
1846         https://bugs.webkit.org/show_bug.cgi?id=76684
1847
1848         Reviewed by Dimitri Glazkov.
1849
1850         For layout, use the rest of the fallback list while webfonts are loading.
1851         If the webfont is loading, it will be given an invalid Unicode Range so that
1852         font selection mechansim doesn't use the webfont for layout.
1853
1854         Test: http/tests/webfont/fallback-font-while-loading.html
1855
1856         * css/CSSSegmentedFontFace.cpp:
1857         (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading): Added.
1858         (WebCore):
1859         (WebCore::CSSSegmentedFontFace::getFontData):
1860
1861 2012-03-28  Mark Rowe  <mrowe@apple.com>
1862
1863         Update Localizable.strings.
1864
1865         * English.lproj/Localizable.strings:
1866
1867 2012-03-28  Victor Carbune  <vcarbune@adobe.com>
1868
1869         Removed particular rendering for the volume slider and used
1870         css positioning instead (simpler and less prone to errors when
1871         changes occur).
1872         https://bugs.webkit.org/show_bug.cgi?id=82150
1873
1874         Reviewed by Eric Carlson.
1875
1876         Test: media/video-controls-rendering-toggle-display-none.html
1877
1878         * css/mediaControls.css: Updated css to correctly render controls.
1879         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1880         * css/mediaControlsChromium.css: Updated css to correctly render controls.
1881         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): 
1882         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
1883         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
1884         * html/shadow/MediaControlElements.cpp: Removed particular renderer.
1885         (WebCore):
1886         * html/shadow/MediaControlElements.h: Removed particular renderer.
1887         (MediaControlVolumeSliderContainerElement):
1888         * html/shadow/MediaControlRootElementChromium.cpp:
1889         (WebCore::MediaControlRootElementChromium::create): Added an anonymous div container
1890         for the mute button and volume slider (to be displayed on top of each other)
1891
1892 2012-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1893
1894         Unreviewed, rolling out r110064.
1895         http://trac.webkit.org/changeset/110064
1896         https://bugs.webkit.org/show_bug.cgi?id=82537
1897
1898         The patch leaks the DOM when audio elements are used
1899         (Requested by sundiamonde on #webkit).
1900
1901         * bindings/js/JSNodeCustom.cpp:
1902         (WebCore::isReachableFromDOM):
1903
1904 2012-03-28  Alexey Proskuryakov  <ap@apple.com>
1905
1906         [Win] Some Blob tests crash in CFNetwork in advanceCurrentStream(FormStreamFields*)
1907         https://bugs.webkit.org/show_bug.cgi?id=82386
1908         <rdar://problem/11121501>
1909
1910         Reviewed by Brady Eidson.
1911
1912         Covered by existing tests.
1913
1914         * platform/network/cf/FormDataStreamCFNet.cpp:
1915         * platform/network/cf/FormDataStreamCFNet.h:
1916         Moved low level implementation from FormDataStreamMac, and exposed an additional function
1917         to implement Foundation-based API on top of this.
1918
1919         * platform/network/mac/FormDataStreamMac.h:
1920         * platform/network/mac/FormDataStreamMac.mm:
1921         Rely on toll-free bridging and implementation details to make this work without duplicating
1922         code.
1923         Note that httpBodyFromStream is confusing - I don't see how it can work when sending serialized
1924         requests across process boundary. We probably only get away with this because we don't attempt
1925         to send requests to UI process once they already have streams associated with them.
1926
1927         * WebCore.vcproj/WebCore.vcproj: Added missing platform/cf files.
1928
1929         * platform/cf/FileSystemCF.cpp: Fixed include style.
1930
1931         * platform/win/FileSystemWin.cpp: (WebCore::fileSystemRepresentation): Ifdef out a broken
1932         implementation.
1933
1934 2012-03-28  Adrienne Walker  <enne@google.com>
1935
1936         [chromium] Fix tiled layer assert for huge layers
1937         https://bugs.webkit.org/show_bug.cgi?id=82486
1938
1939         Reviewed by James Robinson.
1940
1941         Test: TiledLayerChromiumTest.hugeLayerUpdateCrash
1942
1943         TilingData::numTiles() is calculated as the product of two ints and so
1944         can potentially overflow, causing numTiles() to be incorrect. To avoid
1945         calling code accidentally falling into this trap, remove this function
1946         and all code that uses tile index from TilingData.  This requires
1947         fixing up a bunch of callers of TilingData and CCLayerTilingData.
1948
1949         Additionally, TilingData::numTiles() has long been a confusing
1950         function name in some contexts, so rename to bool hasEmptyBounds().
1951
1952         Also, remove TilingData::intersectDrawQuad because there are no
1953         clients of that function.
1954
1955         * platform/graphics/chromium/TiledLayerChromium.cpp:
1956         (WebCore::TiledLayerChromium::drawsContent):
1957         (WebCore::TiledLayerChromium::reserveTextures):
1958         (WebCore::TiledLayerChromium::prepareToUpdate):
1959         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
1960         (WebCore::TiledLayerChromium::needsIdlePaint):
1961         (WebCore::TiledLayerChromium::idlePaintRect):
1962         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
1963         (WebCore::CCLayerTilingData::tileRect):
1964         * platform/graphics/chromium/cc/CCLayerTilingData.h:
1965         (WebCore::CCLayerTilingData::hasEmptyBounds):
1966         (WebCore::CCLayerTilingData::tileBounds):
1967         (WebCore::CCLayerTilingData::isEmpty):
1968         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1969         (WebCore::CCTiledLayerImpl::bindContentsTexture):
1970         (WebCore::CCTiledLayerImpl::appendQuads):
1971         * platform/graphics/gpu/Texture.cpp:
1972         (WebCore::Texture::create):
1973         (WebCore::Texture::updateSubRect):
1974         * platform/graphics/gpu/TilingData.cpp:
1975         (WebCore::TilingData::tileBounds):
1976         (WebCore::TilingData::tileBoundsWithBorder):
1977         (WebCore::TilingData::tileBoundsNormalized):
1978         * platform/graphics/gpu/TilingData.h:
1979         (WebCore::TilingData::hasEmptyBounds):
1980         (TilingData):
1981         (WebCore::TilingData::assertTile):
1982
1983 2012-03-28  Emil A Eklund  <eae@chromium.org>
1984
1985         Change FilterOperations::getOutsets to use integers
1986         https://bugs.webkit.org/show_bug.cgi?id=82535
1987
1988         Reviewed by Eric Seidel.
1989
1990         FilterOperations::getOutsets calculates the outsets using integers and
1991         the values are guranteed to be set to full-pixel values. By changing the
1992         function signature we communicate this fact better and avoid unnecessary
1993         type conversions in some cases.
1994
1995         No new tests.
1996
1997         * platform/graphics/filters/FilterOperations.cpp:
1998         (WebCore::FilterOperations::getOutsets):
1999         * platform/graphics/filters/FilterOperations.h:
2000         (FilterOperations):
2001         * rendering/RenderBox.cpp:
2002         (WebCore::RenderBox::computeRectForRepaint):
2003         (WebCore::RenderBox::addVisualEffectOverflow):
2004         * rendering/RenderInline.cpp:
2005         (WebCore::RenderInline::computeRectForRepaint):
2006         * rendering/style/RenderStyle.h:
2007
2008 2012-03-28  Nate Chapin  <japhet@chromium.org>
2009
2010         Remove dispatchDidLoadMainResource callback, since no
2011         port implements it.
2012         https://bugs.webkit.org/show_bug.cgi?id=82539
2013
2014         Reviewed by Alexey Proskuryakov.
2015
2016         No new tests, just deleting dead code.
2017
2018         * loader/EmptyClients.h:
2019         (EmptyFrameLoaderClient):
2020         * loader/FrameLoader.cpp:
2021         (WebCore::FrameLoader::finishedLoading):
2022         (WebCore::FrameLoader::mainReceivedCompleteError):
2023         * loader/FrameLoaderClient.h:
2024         (FrameLoaderClient):
2025         * loader/MainResourceLoader.cpp:
2026         (WebCore::MainResourceLoader::receivedError):
2027         (WebCore::MainResourceLoader::didCancel):
2028
2029 2012-03-28  Enrica Casucci  <enrica@apple.com>
2030
2031         REGRESSION: editing/pasteboard/dataTransfer-setData-getData.html fails on Mac platforms.
2032         https://bugs.webkit.org/show_bug.cgi?id=82497
2033         <rdar://problem/11140334>
2034
2035         Reviewed by Brady Eidson.
2036         
2037         The revision causing this regression fixed the way data is written to the pasteboard for NSURLPboardType.
2038         This change fixes the way data is read from the pasteboard for the same pasteboard type.
2039
2040         No new tests. Fixes the existing one that fails.
2041
2042         * platform/mac/ClipboardMac.mm:
2043         (WebCore::absoluteURLsFromPasteboard):
2044         * platform/mac/PlatformPasteboardMac.mm:
2045         (WebCore::PlatformPasteboard::stringForType):
2046
2047 2012-03-28  Joe Thomas  <joethomas@motorola.com>
2048
2049         SL bot is hitting SHOULD NEVER BE REACHED in WebCore::valueForLength() on many tests
2050         https://bugs.webkit.org/show_bug.cgi?id=82390
2051
2052         Reviewed by Simon Fraser.
2053
2054         This is an attempt to fix the MAC SL/Lion Bot issue as this issue is not reproducible locally.
2055         The assertion happened when length type is Undefined in valueForLength() function but the assertion for Undefined length type
2056         in RenderBox::computeLogicalWidthInRegionUsing which calls the above said function did not get hit.
2057
2058         This patch passes Length structure as const reference to Length calculation functions which avoids the call to the copy-constructor.
2059         And it ensures that the Length structure is not getting modified during copy-construction. 
2060
2061         * css/LengthFunctions.cpp:
2062         (WebCore::minimumValueForLength):
2063         (WebCore::valueForLength):
2064         (WebCore::floatValueForLength):
2065         * css/LengthFunctions.h:
2066         (WebCore):
2067
2068 2012-03-28  Gavin Barraclough  <barraclough@apple.com>
2069
2070         Yarr: if we're not using the output array, don't populate it!
2071         https://bugs.webkit.org/show_bug.cgi?id=82519
2072
2073         Reviewed by Sam Weinig.
2074
2075         * ForwardingHeaders/runtime/MatchResult.h: Added.
2076         * ForwardingHeaders/yarr/YarrJIT.h: Added.
2077             - Added forwarding headers.
2078
2079 2012-03-23  David Hyatt  <hyatt@apple.com>
2080
2081         https://bugs.webkit.org/show_bug.cgi?id=81685
2082         
2083         [New Multicolumn] Add RenderMultiColumnFlowThread to hold the flow thread contents of a multi-column block.
2084         It derives from RenderFlowThread.
2085         
2086         Refactor RenderFlowThread to split out the stuff related to explicit naming into a subclass, RenderNamedFlowThread.
2087         This allows RenderFlowThread to be a simple base class that involves maintaining the regions themselves.
2088     
2089         Reviewed by Julien Chaffraix.
2090
2091         * CMakeLists.txt:
2092         * GNUmakefile.list.am:
2093         * Target.pri:
2094         * WebCore.gypi:
2095         * WebCore.vcproj/WebCore.vcproj:
2096         * WebCore.xcodeproj/project.pbxproj:
2097         * dom/Document.cpp:
2098         * dom/NodeRenderingContext.cpp:
2099         * dom/NodeRenderingContext.h:
2100         (WebCore):
2101         (WebCore::NodeRenderingContext::parentFlowRenderer):
2102         * dom/WebKitNamedFlow.cpp:
2103         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
2104         * dom/WebKitNamedFlow.h:
2105         (WebCore):
2106         (WebCore::WebKitNamedFlow::create):
2107         (WebKitNamedFlow):
2108         * rendering/RenderBlock.cpp:
2109         (WebCore::RenderBlock::collapseAnonymousBoxChild):
2110         * rendering/RenderFlowThread.cpp:
2111         (WebCore::RenderFlowThread::RenderFlowThread):
2112         (WebCore):
2113         (WebCore::RenderFlowThread::addRegionToThread):
2114         (WebCore::RenderFlowThread::removeRegionFromThread):
2115         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
2116         * rendering/RenderFlowThread.h:
2117         (WebCore):
2118         * rendering/RenderMultiColumnFlowThread.cpp: Added.
2119         (WebCore):
2120         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
2121         (WebCore::RenderMultiColumnFlowThread::renderName):
2122         * rendering/RenderMultiColumnFlowThread.h: Added.
2123         (WebCore):
2124         (RenderMultiColumnFlowThread):
2125         * rendering/RenderNamedFlowThread.cpp: Added.
2126         (WebCore):
2127         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
2128         (WebCore::RenderNamedFlowThread::renderName):
2129         (WebCore::RenderNamedFlowThread::nextRendererForNode):
2130         (WebCore::RenderNamedFlowThread::previousRendererForNode):
2131         (WebCore::RenderNamedFlowThread::addFlowChild):
2132         (WebCore::RenderNamedFlowThread::removeFlowChild):
2133         (WebCore::RenderNamedFlowThread::dependsOn):
2134         (WebCore::compareRenderRegions):
2135         (WebCore::RenderNamedFlowThread::addRegionToThread):
2136         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
2137         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
2138         (WebCore::RenderNamedFlowThread::addDependencyOnFlowThread):
2139         (WebCore::RenderNamedFlowThread::removeDependencyOnFlowThread):
2140         (WebCore::RenderNamedFlowThread::pushDependencies):
2141         (WebCore::RenderNamedFlowThread::ensureNamedFlow):
2142         * rendering/RenderNamedFlowThread.h: Added.
2143         (WebCore):
2144         (RenderNamedFlowThread):
2145         (WebCore::RenderNamedFlowThread::name):
2146         (WebCore::RenderNamedFlowThread::hasChildren):
2147         (WebCore::RenderNamedFlowThread::hasChild):
2148         (WebCore::RenderNamedFlowThread::isRenderNamedFlowThread):
2149         (WebCore::toRenderNamedFlowThread):
2150         * rendering/RenderObject.cpp:
2151         (WebCore::RenderObject::willBeDestroyed):
2152         * rendering/RenderObject.h:
2153         (WebCore::RenderObject::isRenderNamedFlowThread):
2154         * rendering/RenderObjectChildList.cpp:
2155         (WebCore::renderNamedFlowThreadContainer):
2156         (WebCore::RenderObjectChildList::removeChildNode):
2157         (WebCore::RenderObjectChildList::appendChildNode):
2158         (WebCore::RenderObjectChildList::insertChildNode):
2159         * rendering/RenderRegion.cpp:
2160         (WebCore::RenderRegion::RenderRegion):
2161         (WebCore::RenderRegion::attachRegion):
2162         * rendering/RenderRegion.h:
2163         (WebCore):
2164         (WebCore::RenderRegion::parentNamedFlowThread):
2165         (RenderRegion):
2166         * rendering/RenderTreeAsText.cpp:
2167         (WebCore::writeRenderNamedFlowThreads):
2168         (WebCore::writeLayers):
2169         * rendering/RenderView.cpp:
2170         (WebCore::RenderView::RenderView):
2171         (WebCore::RenderView::layout):
2172         (WebCore::RenderView::styleDidChange):
2173         (WebCore::RenderView::ensureRenderFlowThreadWithName):
2174         (WebCore::RenderView::layoutRenderNamedFlowThreads):
2175         * rendering/RenderView.h:
2176         (WebCore):
2177         (RenderView):
2178         (WebCore::RenderView::hasRenderNamedFlowThreads):
2179         (WebCore::RenderView::isRenderNamedFlowThreadOrderDirty):
2180         (WebCore::RenderView::setIsRenderNamedFlowThreadOrderDirty):
2181         (WebCore::RenderView::renderNamedFlowThreadList):
2182
2183 2012-03-28  Emil A Eklund  <eae@chromium.org>
2184
2185         Remove unnecessary rounding in RenderLayerBacking
2186         https://bugs.webkit.org/show_bug.cgi?id=82529
2187
2188         Reviewed by Eric Seidel.
2189
2190         Remove rounding that is no longer required now that borderBoxRect returns
2191         an IntRect.
2192         
2193         No new tests.
2194
2195         * rendering/RenderLayerBacking.cpp:
2196         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2197         (WebCore::RenderLayerBacking::startAnimation):
2198         (WebCore::RenderLayerBacking::startTransition):
2199
2200 2012-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2201
2202         Unreviewed, rolling out r112432.
2203         http://trac.webkit.org/changeset/112432
2204         https://bugs.webkit.org/show_bug.cgi?id=82536
2205
2206         Causes ccs3 layout test asserts (Requested by enne on
2207         #webkit).
2208
2209         * platform/graphics/chromium/TiledLayerChromium.cpp:
2210         (WebCore::TiledLayerChromium::drawsContent):
2211         (WebCore::TiledLayerChromium::reserveTextures):
2212         (WebCore::TiledLayerChromium::prepareToUpdate):
2213         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
2214         (WebCore::TiledLayerChromium::needsIdlePaint):
2215         (WebCore::TiledLayerChromium::idlePaintRect):
2216         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2217         (WebCore::CCLayerTilingData::tileRect):
2218         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2219         (WebCore::CCLayerTilingData::numTiles):
2220         (WebCore::CCLayerTilingData::tileBounds):
2221         (WebCore::CCLayerTilingData::isEmpty):
2222         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2223         (WebCore::CCTiledLayerImpl::bindContentsTexture):
2224         (WebCore::CCTiledLayerImpl::appendQuads):
2225         * platform/graphics/filters/FECustomFilter.cpp:
2226         (WebCore::FECustomFilter::platformApplySoftware):
2227         * platform/graphics/gpu/Texture.cpp:
2228         (WebCore::Texture::create):
2229         (WebCore::Texture::updateSubRect):
2230         * platform/graphics/gpu/TilingData.cpp:
2231         (WebCore::TilingData::tileBounds):
2232         (WebCore::TilingData::tileBoundsWithBorder):
2233         (WebCore::TilingData::tileBoundsNormalized):
2234         (WebCore::TilingData::intersectDrawQuad):
2235         (WebCore):
2236         * platform/graphics/gpu/TilingData.h:
2237         (WebCore::TilingData::numTiles):
2238         (WebCore::TilingData::tileIndex):
2239         (WebCore::TilingData::tileXIndex):
2240         (WebCore::TilingData::tileYIndex):
2241         (TilingData):
2242         (WebCore::TilingData::assertTile):
2243
2244 2012-03-27  Daniel Cheng  <dcheng@chromium.org>
2245
2246         [chromium] Merge ChromiumDataObject and DataTransferItemListChromium.
2247         https://bugs.webkit.org/show_bug.cgi?id=82407
2248
2249         Reviewed by Tony Chang.
2250
2251         Since ChromiumDataObject is just a very thin wrapper for DataTransferItemListChromium now,
2252         combine the two and remove a layer of indirection.
2253
2254         No functionality change, should be covered by existing tests.
2255
2256         * WebCore.gypi:
2257         * platform/chromium/ChromiumDataObject.cpp: Replacing DataTransferItemListChromium.
2258         (WebCore::ChromiumDataObject::createFromPasteboard):
2259         (WebCore::ChromiumDataObject::create):
2260         (WebCore::ChromiumDataObject::length):
2261         (WebCore):
2262         (WebCore::ChromiumDataObject::item):
2263         (WebCore::ChromiumDataObject::deleteItem):
2264         (WebCore::ChromiumDataObject::clearAll):
2265         (WebCore::ChromiumDataObject::add):
2266         (WebCore::ChromiumDataObject::clearData):
2267         (WebCore::ChromiumDataObject::clearAllExceptFiles):
2268         (WebCore::ChromiumDataObject::types):
2269         (WebCore::ChromiumDataObject::getData):
2270         (WebCore::ChromiumDataObject::setData):
2271         (WebCore::ChromiumDataObject::urlAndTitle):
2272         (WebCore::ChromiumDataObject::setURLAndTitle):
2273         (WebCore::ChromiumDataObject::htmlAndBaseURL):
2274         (WebCore::ChromiumDataObject::setHTMLAndBaseURL):
2275         (WebCore::ChromiumDataObject::containsFilenames):
2276         (WebCore::ChromiumDataObject::filenames):
2277         (WebCore::ChromiumDataObject::addFilename):
2278         (WebCore::ChromiumDataObject::addSharedBuffer):
2279         (WebCore::ChromiumDataObject::ChromiumDataObject):
2280         (WebCore::ChromiumDataObject::findStringItem):
2281         (WebCore::ChromiumDataObject::internalAddStringItem):
2282         (WebCore::ChromiumDataObject::internalAddFileItem):
2283         * platform/chromium/ChromiumDataObject.h:
2284         (WebCore):
2285         (ChromiumDataObject):
2286         * platform/chromium/ChromiumDataObjectItem.cpp: Renamed from Source/WebCore/platform/chromium/DataTransferItemChromium.cpp.
2287         (WebCore):
2288         (WebCore::ChromiumDataObjectItem::createFromString):
2289         (WebCore::ChromiumDataObjectItem::createFromFile):
2290         (WebCore::ChromiumDataObjectItem::createFromURL):
2291         (WebCore::ChromiumDataObjectItem::createFromHTML):
2292         (WebCore::ChromiumDataObjectItem::createFromSharedBuffer):
2293         (WebCore::ChromiumDataObjectItem::createFromPasteboard):
2294         (WebCore::ChromiumDataObjectItem::ChromiumDataObjectItem):
2295         (WebCore::ChromiumDataObjectItem::getAsString):
2296         (WebCore::ChromiumDataObjectItem::getAsFile):
2297         (WebCore::ChromiumDataObjectItem::internalGetAsString):
2298         (WebCore::ChromiumDataObjectItem::isFilename):
2299         * platform/chromium/ChromiumDataObjectItem.h: Renamed from Source/WebCore/platform/chromium/DataTransferItemChromium.h.
2300         (WebCore):
2301         (ChromiumDataObjectItem):
2302         (WebCore::ChromiumDataObjectItem::kind):
2303         (WebCore::ChromiumDataObjectItem::type):
2304         (WebCore::ChromiumDataObjectItem::sharedBuffer):
2305         (WebCore::ChromiumDataObjectItem::title):
2306         (WebCore::ChromiumDataObjectItem::baseURL):
2307         * platform/chromium/ClipboardChromium.cpp:
2308         (WebCore::ClipboardChromium::files):
2309         (WebCore::ClipboardChromium::hasData):
2310         (WebCore::ClipboardChromium::items):
2311         * platform/chromium/DataTransferItemListChromium.cpp: Removed.
2312         * platform/chromium/DataTransferItemListChromium.h: Removed.
2313
2314 2012-03-28  Nat Duca  <nduca@chromium.org>
2315
2316         [chromium] Scheduler should not tell FrameRateController to begin a frame when we dont swap
2317         https://bugs.webkit.org/show_bug.cgi?id=82516
2318
2319         Reviewed by James Robinson.
2320
2321         * platform/graphics/chromium/LayerRendererChromium.cpp:
2322         (WebCore::LayerRendererChromium::swapBuffers):
2323         * platform/graphics/chromium/LayerRendererChromium.h:
2324         (LayerRendererChromium):
2325         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2326         (WebCore::CCLayerTreeHostImpl::swapBuffers):
2327         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2328         (CCLayerTreeHostImpl):
2329         * platform/graphics/chromium/cc/CCScheduler.cpp:
2330         (WebCore::CCScheduler::processScheduledActions):
2331         * platform/graphics/chromium/cc/CCScheduler.h:
2332         (WebCore::CCScheduledActionDrawAndSwapResult::CCScheduledActionDrawAndSwapResult):
2333         (CCScheduledActionDrawAndSwapResult):
2334         (WebCore):
2335         (CCSchedulerClient):
2336         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2337         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
2338         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapIfPossible):
2339         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapForced):
2340         * platform/graphics/chromium/cc/CCThreadProxy.h:
2341         (CCThreadProxy):
2342
2343 2012-03-26  Eric Uhrhane  <ericu@chromium.org>
2344
2345         FileWriter has two race conditions
2346         https://bugs.webkit.org/show_bug.cgi?id=81861
2347
2348         Reviewed by David Levin.
2349
2350         Should make current tests less flaky.
2351
2352         * Modules/filesystem/FileWriter.h:
2353         * Modules/filesystem/FileWriter.cpp:
2354         Track the in-flight operation, whether it be an abort/write/truncate.
2355         Whether an abort comes back as didWrite, didTruncate, or didFail, handle
2356         it appropriately.  Before this fix, the Chromium implementation would
2357         assert in two cases:
2358
2359         If the user calls abort, then write, then abort before the backend
2360         catches up, we'd send both aborts to the backend, even though it hadn't
2361         received the write yet.  Chromium's backend asserts if there's an abort
2362         with no write in progress.  We now record that we've sent an abort and
2363         are waiting for the response.
2364
2365         If the user calls abort while a write/truncate is just finishing, on the
2366         Chromium worker implementation, the completion message could be
2367         thread-hopping back to WebCore at the
2368         WorkerAsyncFileWriterCallbacksBridge while the abort is thread-hopping
2369         in the other direction.  Again, this leads to an abort call to the
2370         backend with no write in progress, and an assert.  We're now robust to
2371         completions coming back when we're expecting an abort, and
2372         https://chromiumcodereview.appspot.com/9764018/ will make the backend
2373         robust to extra abort calls.
2374
2375 2012-03-27  Ryosuke Niwa  <rniwa@webkit.org>
2376
2377         Deleting a paragraph of text should not add elements for typing style
2378         https://bugs.webkit.org/show_bug.cgi?id=82401
2379
2380         Reviewed by Enrica Casucci.
2381
2382         This behavior was explicitly supported by DeleteSelectionCommand but it doesn't match TextEdit or Firefox.
2383         We're changing our behavior to match TextEdit and Firefox in this patch.
2384
2385         The behavior is tested by an existing test, which was renamed to deleting-text-rests-typing-style.html in this patch.
2386
2387         Test: editing/execCommand/deleting-text-rests-typing-style.html
2388
2389         * editing/DeleteSelectionCommand.cpp:
2390         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
2391
2392 2012-03-28  Michal Mocny  <mmocny@google.com>
2393
2394         [chromium] Add tracing events around CCLayerTreeHostImpl visibility.
2395         https://bugs.webkit.org/show_bug.cgi?id=82501
2396
2397         Reviewed by James Robinson.
2398
2399         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2400         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2401         (WebCore::CCLayerTreeHostImpl::setVisible):
2402
2403 2012-03-28  Florin Malita  <fmalita@google.com>
2404
2405         Incorrect foreignObject hit test results when overlapping other SVG elements
2406         https://bugs.webkit.org/show_bug.cgi?id=82059
2407
2408         Reviewed by Nikolas Zimmermann.
2409
2410         Test: svg/hittest/foreign-object-background.svg
2411
2412         Foreign content needs to be hit-tested atomically due to the (pseudo)
2413         stacking context established by FOs.
2414
2415         * rendering/svg/RenderSVGForeignObject.cpp:
2416         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
2417         Hit test all phases on FO HitTestForeground.
2418
2419 2012-03-26  Shawn Singh  <shawnsingh@chromium.org>
2420
2421         [chromium] layer->clipRect() is not initialized for layers that create a renderSurface.
2422         https://bugs.webkit.org/show_bug.cgi?id=74147
2423
2424         Reviewed by Adrienne Walker.
2425
2426         Added 3 additional unit tests; Modified existing unit tests and layout tests.
2427
2428         The layer's clipRect and usesLayerClipping information was not
2429         being initialized for layers that created a renderSurface. (It
2430         was, however, being initialized for the renderSurface itself.)
2431         This patch adds a unit test that reproduces that this is an error,
2432         other unit tests to tightly test the value of clipRect being
2433         initialized, and adds the logic to properly initialize the
2434         clipRect.
2435
2436         Before this patch, this bug was causing flashing on tab-switch on
2437         the apple iphone page. Even worse, with partial swap enabled, the
2438         layers would simply disappear, because the first frame the
2439         clipRect is uninitialized and the layer is not drawn, and the
2440         second frame onwards, the damage tracker correctly things nothing
2441         is damaged, so it doesn't draw that layer again until other damage
2442         causes it to be redrawn.
2443
2444         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2445         (WebCore::calculateDrawTransformsAndVisibilityInternal):
2446
2447 2012-03-28  Anders Carlsson  <andersca@apple.com>
2448
2449         "Sticky" or slow scrolling on some sites
2450         https://bugs.webkit.org/show_bug.cgi?id=82512
2451         <rdar://problem/11000372>
2452
2453         Reviewed by Andreas Kling.
2454
2455         When we're in the slow mode and have to update the scroll layer position on the main thread,
2456         get it from the scrolling thread so we'll be in sync with the scrolling tree when the main thread is busy.
2457
2458         * page/scrolling/ScrollingCoordinator.cpp:
2459         (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
2460         * page/scrolling/ScrollingCoordinator.h:
2461         (ScrollingCoordinator):
2462         * page/scrolling/ScrollingTree.cpp:
2463         (WebCore::ScrollingTree::mainFrameScrollPosition):
2464         (WebCore):
2465         (WebCore::ScrollingTree::updateMainFrameScrollPositionAndScrollLayerPosition):
2466         * page/scrolling/ScrollingTree.h:
2467
2468 2012-03-28  Adrienne Walker  <enne@google.com>
2469
2470         [chromium] Fix tiled layer assert for huge layers
2471         https://bugs.webkit.org/show_bug.cgi?id=82486
2472
2473         Reviewed by James Robinson.
2474
2475         Test: TiledLayerChromiumTest.hugeLayerUpdateCrash
2476
2477         TilingData::numTiles() is calculated as the product of two ints and so
2478         can potentially overflow, causing numTiles() to be incorrect. To avoid
2479         calling code accidentally falling into this trap, remove this function
2480         and all code that uses tile index from TilingData.  This requires
2481         fixing up a bunch of callers of TilingData and CCLayerTilingData.
2482
2483         Additionally, TilingData::numTiles() has long been a confusing
2484         function name in some contexts, so rename to bool hasEmptyBounds().
2485
2486         Also, remove TilingData::intersectDrawQuad because there are no
2487         clients of that function.
2488
2489         * platform/graphics/chromium/TiledLayerChromium.cpp:
2490         (WebCore::TiledLayerChromium::drawsContent):
2491         (WebCore::TiledLayerChromium::reserveTextures):
2492         (WebCore::TiledLayerChromium::prepareToUpdate):
2493         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
2494         (WebCore::TiledLayerChromium::needsIdlePaint):
2495         (WebCore::TiledLayerChromium::idlePaintRect):
2496         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2497         (WebCore::CCLayerTilingData::tileRect):
2498         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2499         (WebCore::CCLayerTilingData::hasEmptyBounds):
2500         (WebCore::CCLayerTilingData::tileBounds):
2501         (WebCore::CCLayerTilingData::isEmpty):
2502         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2503         (WebCore::CCTiledLayerImpl::bindContentsTexture):
2504         (WebCore::CCTiledLayerImpl::appendQuads):
2505         * platform/graphics/gpu/Texture.cpp:
2506         (WebCore::Texture::create):
2507         (WebCore::Texture::updateSubRect):
2508         * platform/graphics/gpu/TilingData.cpp:
2509         (WebCore::TilingData::tileBounds):
2510         (WebCore::TilingData::tileBoundsWithBorder):
2511         (WebCore::TilingData::tileBoundsNormalized):
2512         * platform/graphics/gpu/TilingData.h:
2513         (WebCore::TilingData::hasEmptyBounds):
2514         (TilingData):
2515         (WebCore::TilingData::assertTile):
2516
2517 2012-03-28  Peter Rybin  <peter.rybin@gmail.com>
2518
2519         Web Inspector: CodeGeneratorInspector.py: switch Runtime, Network and DOM domains to typed API
2520         https://bugs.webkit.org/show_bug.cgi?id=81558
2521
2522         Reviewed by Pavel Feldman.
2523
2524         Client code is switched to typed API (all InspectorObject and InspectorArray types are
2525         replaced with generated types from TypeBuilder according to Inspector.json).
2526
2527         Missing array of int specialization is added. Code generator now has a check against
2528         misspelled (non-existing) domain names.
2529
2530         * inspector/CodeGeneratorInspector.py:
2531         (Generator.go): check against misspelled domain names added.
2532         * inspector/InjectedScript.cpp:
2533         (WebCore::InjectedScript::evaluate):
2534         (WebCore::InjectedScript::callFunctionOn):
2535         (WebCore::InjectedScript::evaluateOnCallFrame):
2536         (WebCore::InjectedScript::getProperties):
2537         (WebCore::InjectedScript::wrapObject):
2538         (WebCore::InjectedScript::wrapNode):
2539         (WebCore::InjectedScript::wrapSerializedObject):
2540         (WebCore::InjectedScript::makeEvalCall):
2541         * inspector/InjectedScript.h:
2542         (InjectedScript):
2543         * inspector/InspectorDOMAgent.cpp:
2544         (WebCore::InspectorDOMAgent::getDocument):
2545         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
2546         (WebCore::InspectorDOMAgent::querySelectorAll):
2547         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
2548         (WebCore::InspectorDOMAgent::getEventListenersForNode):
2549         (WebCore::InspectorDOMAgent::getSearchResults):
2550         (WebCore::InspectorDOMAgent::resolveNode):
2551         (WebCore::InspectorDOMAgent::getAttributes):
2552         (WebCore::InspectorDOMAgent::buildObjectForNode):
2553         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
2554         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
2555         (WebCore::InspectorDOMAgent::loadEventFired):
2556         (WebCore::InspectorDOMAgent::didInsertDOMNode):
2557         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
2558         (WebCore::InspectorDOMAgent::pushNodeByPathToFrontend):
2559         * inspector/InspectorDOMAgent.h:
2560         (InspectorDOMAgent):
2561         * inspector/InspectorPageAgent.cpp:
2562         (WebCore::InspectorPageAgent::resourceTypeJson):
2563         (WebCore::InspectorPageAgent::cachedResourceTypeJson):
2564         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2565         * inspector/InspectorPageAgent.h:
2566         * inspector/InspectorResourceAgent.cpp:
2567         (WebCore::buildObjectForResourceRequest):
2568         (WebCore::buildObjectForResourceResponse):
2569         (WebCore::buildObjectForCachedResource):
2570         (WebCore::InspectorResourceAgent::willSendRequest):
2571         (WebCore::InspectorResourceAgent::didReceiveResponse):
2572         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
2573         (WebCore::InspectorResourceAgent::buildInitiatorObject):
2574         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
2575         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
2576         * inspector/InspectorResourceAgent.h:
2577         (InspectorResourceAgent):
2578         * inspector/InspectorRuntimeAgent.cpp:
2579         (WebCore::InspectorRuntimeAgent::evaluate):
2580         (WebCore::InspectorRuntimeAgent::callFunctionOn):
2581         (WebCore::InspectorRuntimeAgent::getProperties):
2582         * inspector/InspectorRuntimeAgent.h:
2583         (InspectorRuntimeAgent):
2584         * inspector/InspectorValues.h:
2585         (InspectorArray):
2586         (WebCore::InspectorArray::pushInt):
2587         (WebCore):
2588         * inspector/ScriptCallFrame.cpp:
2589         (WebCore::ScriptCallFrame::buildInspectorObject):
2590         * inspector/ScriptCallFrame.h:
2591         (ScriptCallFrame):
2592         * inspector/ScriptCallStack.cpp:
2593         (WebCore::ScriptCallStack::buildInspectorArray):
2594         * inspector/ScriptCallStack.h:
2595         (ScriptCallStack):
2596
2597 2012-03-28  Eric Seidel  <eric@webkit.org>
2598
2599         setNeedsLayout(true, false) is super confusing to read and should use an enum instead
2600         https://bugs.webkit.org/show_bug.cgi?id=82369
2601
2602         Reviewed by Julien Chaffraix.
2603
2604         I replaced all uses of the markParents bool with a MarkingBehavior
2605         enum (which has two values: MarkContainingBlockChain and MarkOnlyThis).
2606         I'm not sure the naming is perfect (as it's not clear to me if markParents is
2607         used to mean the same thing in these 3 functions), but hopefully this code is more
2608         clear.  I welcome further suggested adjustment from layout experts.
2609
2610         * page/FrameView.cpp:
2611         (WebCore::FrameView::scheduleRelayout):
2612         * rendering/RenderBlock.cpp:
2613         (WebCore::RenderBlock::layoutBlock):
2614         (WebCore::RenderBlock::adjustPositionedBlock):
2615         (WebCore::RenderBlock::layoutBlockChildren):
2616         (WebCore::RenderBlock::layoutBlockChild):
2617         (WebCore::RenderBlock::layoutPositionedObjects):
2618         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
2619         (WebCore::RenderBlock::removePositionedObjects):
2620         (WebCore::RenderBlock::insertFloatingObject):
2621         (WebCore::RenderBlock::positionNewFloats):
2622         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
2623         (WebCore::RenderBlock::adjustBlockChildForPagination):
2624         * rendering/RenderBlockLineLayout.cpp:
2625         (WebCore::RenderBlock::layoutRunsAndFloats):
2626         (WebCore::RenderBlock::layoutInlineChildren):
2627         (WebCore::RenderBlock::positionNewFloatOnLine):
2628         * rendering/RenderBox.cpp:
2629         (WebCore::RenderBox::positionLineBox):
2630         * rendering/RenderDeprecatedFlexibleBox.cpp:
2631         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2632         (WebCore::gatherFlexChildrenInfo):
2633         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2634         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2635         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2636         * rendering/RenderFlexibleBox.cpp:
2637         (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
2638         * rendering/RenderLayer.cpp:
2639         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2640         * rendering/RenderMedia.cpp:
2641         (WebCore::RenderMedia::layout):
2642         * rendering/RenderObject.cpp:
2643         (WebCore::RenderObject::setPreferredLogicalWidthsDirty):
2644         * rendering/RenderObject.h:
2645         (RenderObject):
2646         (WebCore::RenderObject::setNeedsLayout):
2647         (WebCore::RenderObject::setChildNeedsLayout):
2648         * rendering/RenderRubyRun.cpp:
2649         (WebCore::RenderRubyRun::layoutSpecialExcludedChild):
2650         * rendering/RenderTable.cpp:
2651         (WebCore::RenderTable::layout):
2652         * rendering/RenderTableRow.cpp:
2653         (WebCore::RenderTableRow::layout):
2654         * rendering/RenderTableSection.cpp:
2655         (WebCore::RenderTableSection::calcRowLogicalHeight):
2656         (WebCore::RenderTableSection::layoutRows):
2657         * rendering/RenderTextControl.cpp:
2658         (WebCore::RenderTextControl::layoutSpecialExcludedChild):
2659         * rendering/RenderTextControlSingleLine.cpp:
2660         (WebCore::RenderTextControlSingleLine::layout):
2661         * rendering/RenderView.cpp:
2662         (WebCore::RenderView::RenderView):
2663         (WebCore::RenderView::layout):
2664         * rendering/mathml/RenderMathMLRoot.cpp:
2665         (WebCore::RenderMathMLRoot::layout):
2666         * rendering/mathml/RenderMathMLRow.cpp:
2667         (WebCore::RenderMathMLRow::layout):
2668         * rendering/mathml/RenderMathMLSubSup.cpp:
2669         (WebCore::RenderMathMLSubSup::layout):
2670         * rendering/svg/SVGRenderSupport.cpp:
2671         (WebCore::SVGRenderSupport::layoutChildren):
2672
2673 2012-03-28  Joseph Pecoraro  <pecoraro@apple.com>
2674
2675         <http://webkit.org/b/82419> Web Inspector: Create -[DOMNode inspect] from IDL
2676
2677         Instead of manually creating the method in DOM.mm we can specify it in
2678         Node.idl and autogenerate part of the interface.
2679
2680         Reviewed by Timothy Hatcher.
2681
2682         * bindings/objc/DOM.mm:
2683         * bindings/objc/DOMPrivate.h:
2684         Move the call to InspectorController::inspect from here ...
2685
2686         * dom/Node.h:
2687         * dom/Node.idl: IDL only in an ObjC block.
2688         * dom/Node.cpp:
2689         (WebCore::Node::inspect):
2690         ... to here.
2691
2692         * WebCore.xcodeproj/project.pbxproj:
2693         Add the new generated file so we can Copy it in the build phase.
2694
2695 2012-03-28  Tommy Widenflycht  <tommyw@google.com>
2696
2697         [chromium] MediaStream API (JSEP): Introducing WebPeerConnection00Handler
2698         https://bugs.webkit.org/show_bug.cgi?id=82450
2699
2700         Reviewed by Adam Barth.
2701
2702         This change removes the default PeerConnection00Handler.cpp from the Chromium build.
2703
2704         A major overhaul of the existing layout tests is forthcoming.
2705
2706         * WebCore.gypi:
2707         * platform/mediastream/PeerConnection00Handler.h:
2708         (WebCore):
2709         (PeerConnection00Handler):
2710
2711 2012-03-28  Robert Hogan  <robert@webkit.org>
2712
2713         [REGRESSION] Web Inspector: column caption delimiters are misaligned in DataGrid
2714         https://bugs.webkit.org/show_bug.cgi?id=82193
2715
2716         Reviewed by Yury Semikhatsky.
2717
2718         Since r111742 column width in fixed layout tables is set to the width of the cell plus its left padding plus its right padding 
2719         plus half its left border plus half its right border in the collapsing border model. The layout of the panel
2720         headers in the inspector depended on pre-r111742 behaviour, so ended up misaligned with the content below. To cater for the 
2721         new method of calculating column width enforce a fixed width for the corner column by removing padding and borders (except collapsed
2722         borders from adjacent cells) and specify the expected width (15px) minus the expected width of the collapsed borders (1px).
2723
2724         * inspector/front-end/dataGrid.css:
2725         (.data-grid th.corner):
2726
2727 2012-03-28  Alexis Menard  <alexis.menard@openbossa.org>
2728
2729         Increase code sharing between CSSProperty and CSSPropertyLonghand.
2730         https://bugs.webkit.org/show_bug.cgi?id=82479
2731
2732         Reviewed by Antti Koivisto.
2733
2734         Use longhands declarations from CSSPropertyLonghand in CSSProperty to avoid
2735         code duplication.
2736
2737         No new tests : refactoring only, we shouldn't have any behavior difference.
2738
2739         * css/CSSProperty.cpp:
2740         (WebCore::resolveToPhysicalProperty):
2741         (WebCore::borderDirections):
2742         (WebCore):
2743         (WebCore::CSSProperty::resolveDirectionAwareProperty):
2744
2745 2012-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
2746
2747         Web Inspector: Implement snippets renaming in scripts navigator.
2748         https://bugs.webkit.org/show_bug.cgi?id=82477
2749
2750         Reviewed by Pavel Feldman.
2751
2752         Snippets renaming is implemented as editing of snippet name in scripts navigator.
2753
2754         * inspector/front-end/ScriptsNavigator.js:
2755         (WebInspector.ScriptsNavigator.prototype._handleRenameSnippet):
2756         (WebInspector.ScriptsNavigator.prototype._fileRenamed):
2757         (WebInspector.ScriptsNavigator.prototype.rename.commitHandler):
2758         (WebInspector.ScriptsNavigator.prototype.rename.cancelHandler):
2759         (WebInspector.ScriptsNavigator.prototype.rename.afterEditing):
2760         (WebInspector.BaseNavigatorTreeElement.prototype.set titleText):
2761         * inspector/front-end/scriptsPanel.css:
2762         (#scripts-navigator-tabbed-pane .navigator .base-navigator-tree-element-title.editing):
2763
2764 2012-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
2765
2766         Web Inspector: Add context menu for snippets control.
2767         https://bugs.webkit.org/show_bug.cgi?id=82475
2768
2769         Reviewed by Pavel Feldman.
2770
2771         This is a preliminary implementation of snippets control using context menu.
2772         We might want to add a more discoverable one before taking snippets out of experiments.
2773
2774         * English.lproj/localizedStrings.js:
2775         * inspector/front-end/ScriptsNavigator.js:
2776         (WebInspector.ScriptsNavigator.prototype._showScriptFoldersSettingChanged):
2777         (WebInspector.ScriptsNavigator.prototype._createSnippetsTree):
2778         (WebInspector.ScriptsNavigator.prototype._handleSnippetContextMenuEvent):
2779         (WebInspector.ScriptsNavigator.prototype._showSnippetContextMenu):
2780         (WebInspector.ScriptsNavigator.prototype._handleEvaluateSnippet):
2781         (WebInspector.ScriptsNavigator.prototype._handleRenameSnippet):
2782         (WebInspector.ScriptsNavigator.prototype._handleRemoveSnippet):
2783         (WebInspector.ScriptsNavigator.prototype._handleCreateSnippet):
2784         (WebInspector.NavigatorScriptTreeElement.prototype.get navigator):
2785         (WebInspector.NavigatorScriptTreeElement.prototype.onattach):
2786         (WebInspector.NavigatorScriptTreeElement.prototype.onenter):
2787         (WebInspector.NavigatorScriptTreeElement.prototype._handleContextMenuEvent):
2788
2789 2012-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
2790
2791         Web Inspector: ScriptsNavigator should save scroll position when switching tabs.
2792         https://bugs.webkit.org/show_bug.cgi?id=82472
2793
2794         Reviewed by Pavel Feldman.
2795
2796         WebInspector.View provides save/restore scroll position capabilities.
2797         This patch makes them used in ScriptsNavigator.
2798
2799         * inspector/front-end/ScriptsNavigator.js:
2800         (WebInspector.ScriptsNavigator):
2801         (WebInspector.ScriptsNavigator.prototype._createSnippetsTree):
2802         * inspector/front-end/scriptsPanel.css:
2803         (#scripts-navigator-tabbed-pane .tabbed-pane-content):
2804         (#scripts-navigator-tabbed-pane .navigator-container):
2805
2806 2012-03-28  Andrey Kosyakov  <caseq@chromium.org>
2807
2808         Web Inspector: only update Timeline overview when really needed
2809         https://bugs.webkit.org/show_bug.cgi?id=81909
2810
2811         Reviewed by Pavel Feldman.
2812
2813         Switch timeline overview to using raw records, thus removing dependency on instance members of
2814         TimelinePresentationModel. This requires moving record styles/categories to static getters.
2815
2816         * inspector/front-end/TimelineModel.js:
2817         (WebInspector.TimelineModel):
2818         (WebInspector.TimelineModel.startTime):
2819         (WebInspector.TimelineModel.endTime):
2820         (WebInspector.TimelineModel.duration):
2821         (WebInspector.TimelineModel.prototype._addRecord):
2822         (WebInspector.TimelineModel.prototype.reset):
2823         (WebInspector.TimelineModel.prototype.minimumRecordTime):
2824         (WebInspector.TimelineModel.prototype.maximumRecordTime):
2825         (WebInspector.TimelineModel.prototype._updateBoundaries):
2826         * inspector/front-end/TimelineOverviewPane.js:
2827         (WebInspector.TimelineOverviewPane):
2828         (WebInspector.TimelineOverviewPane.prototype._showTimelines):
2829         (WebInspector.TimelineOverviewPane.prototype._showMemoryGraph):
2830         (WebInspector.TimelineOverviewPane.prototype._setVerticalOverview):
2831         (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged):
2832         (WebInspector.TimelineOverviewPane.prototype._update):
2833         (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips.markPercentagesForRecord):
2834         (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips):
2835         (WebInspector.TimelineOverviewPane.prototype.windowStartTime):
2836         (WebInspector.TimelineOverviewPane.prototype.windowEndTime):
2837         (WebInspector.TimelineOverviewPane.prototype._onWindowChanged):
2838         (WebInspector.TimelineOverviewPane.prototype.setShowShortEvents):
2839         (WebInspector.TimelineOverviewPane.prototype._scheduleRefresh):
2840         (WebInspector.TimelineOverviewCalculator.prototype.computeBarGraphPercentages):
2841         (WebInspector.TimelineOverviewCalculator.prototype.setWindow):
2842         (WebInspector.TimelineOverviewCalculator.prototype.reset):
2843         (WebInspector.HeapGraph):
2844         (WebInspector.HeapGraph.prototype.update):
2845         (WebInspector.TimelineVerticalOverview):
2846         (WebInspector.TimelineVerticalOverview.prototype.reset):
2847         (WebInspector.TimelineVerticalOverview.prototype.update):
2848         (WebInspector.TimelineVerticalOverview.prototype.wasShown):
2849         (WebInspector.TimelineVerticalOverview.prototype.willHide):
2850         (WebInspector.TimelineVerticalOverview.prototype._aggregateFrameStatistics):
2851         (WebInspector.TimelineVerticalOverview.prototype._aggregateRecords):
2852         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes):
2853         (WebInspector.TimelineVerticalOverview.prototype._onRecordAdded):
2854         (WebInspector.TimelineAggregatedRecord):
2855         (WebInspector.TimelineAggregatedRecord.prototype._aggregateStatistics):
2856         * inspector/front-end/TimelinePanel.js:
2857         (WebInspector.TimelinePanel):
2858         (WebInspector.TimelinePanel.prototype._createStatusbarButtons):
2859         (WebInspector.TimelinePanel.prototype._toggleFilterButtonClicked):
2860         (WebInspector.TimelinePanel.prototype._resetPanel):
2861         (WebInspector.TimelinePanel.prototype._refresh):
2862         (WebInspector.TimelineCalculator):
2863         (WebInspector.TimelineCalculator.prototype.formatTime):
2864         * inspector/front-end/TimelinePresentationModel.js:
2865         (WebInspector.TimelinePresentationModel):
2866         (WebInspector.TimelinePresentationModel.categories):
2867         (WebInspector.TimelinePresentationModel.recordStyle):
2868         (WebInspector.TimelinePresentationModel.categoryForRecord):
2869         (WebInspector.TimelinePresentationModel.prototype.reset):
2870         (WebInspector.TimelinePresentationModel.prototype.addRecord):
2871         (WebInspector.TimelinePresentationModel.Record):
2872         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
2873
2874 2012-03-28  Arvid Nilsson  <anilsson@rim.com>
2875
2876         [BlackBerry] Plumb through GraphicsLayer::contentsOpaque() to LayerTiler
2877         https://bugs.webkit.org/show_bug.cgi?id=82457
2878
2879         Reviewed by Rob Buis.
2880
2881         The LayerTiler already knows not to turn on GL_BLEND for opaque layers.
2882         However, it only ever sets the opaque flag for image layers and color
2883         layers, never for content layers.
2884
2885         This was no big deal, because contentsOpaque() is currently false for
2886         all layers except the root layer, which we always drew using the
2887         BlackBerry::WebKit::BackingStore anyway.
2888
2889         When we start using RenderLayerBacking::m_usingTiledCacheLayer=true on
2890         the root layer in situations where the BackingStore is unavailable, we
2891         can speed up rendering of the root layer by honouring the opaque flag.
2892
2893         Fixed by plumbing through the GraphicsLayer::contentsOpaque() flag all
2894         the way to LayerTiler and on to Texture.
2895
2896         * platform/graphics/blackberry/LayerData.h:
2897         (WebCore::LayerData::LayerData):
2898         (WebCore::LayerData::isOpaque):
2899         (LayerData):
2900         * platform/graphics/blackberry/LayerTile.cpp:
2901         (WebCore::LayerTile::updateContents):
2902         * platform/graphics/blackberry/LayerTile.h:
2903         (LayerTile):
2904         * platform/graphics/blackberry/LayerTiler.cpp:
2905         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
2906         (WebCore::LayerTiler::performTileJob):
2907         * platform/graphics/blackberry/LayerTiler.h:
2908         (WebCore::LayerTiler::TextureJob::TextureJob):
2909         (WebCore::LayerTiler::TextureJob::updateContents):
2910         * platform/graphics/blackberry/LayerWebKitThread.h:
2911         (WebCore::LayerWebKitThread::setOpaque):
2912         * platform/graphics/blackberry/Texture.h:
2913         (Texture):
2914         * platform/graphics/blackberry/TextureCacheCompositingThread.cpp:
2915         (WebCore::TextureCacheCompositingThread::updateContents):
2916         * platform/graphics/blackberry/TextureCacheCompositingThread.h:
2917         (TextureCacheCompositingThread):
2918
2919 2012-03-28  Andrey Kosyakov  <caseq@chromium.org>
2920
2921         Web Inspector: nuke HeapGraph.setSize(), do it automagically on update
2922         https://bugs.webkit.org/show_bug.cgi?id=82471
2923
2924         Reviewed by Yury Semikhatsky.
2925
2926         * inspector/front-end/TimelineOverviewPane.js:
2927         (WebInspector.TimelineOverviewPane.prototype.update):
2928         (WebInspector.HeapGraph.prototype.update):
2929
2930 2012-03-28  Pavel Podivilov  <podivilov@chromium.org>
2931
2932         Web Inspector: dispatch console-message-added and console-messages-cleared events on UISourceCode.
2933         https://bugs.webkit.org/show_bug.cgi?id=82463
2934
2935         Reviewed by Vsevolod Vlasov.
2936
2937         Those events are related to specific UISourceCode. See bug 82224 for more details.
2938
2939         * inspector/front-end/DebuggerPresentationModel.js:
2940         (WebInspector.DebuggerPresentationModel):
2941         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessageToScript):
2942         (WebInspector.DebuggerPresentationModel.prototype._consoleCleared):
2943         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
2944         (WebInspector.UISourceCodeImpl):
2945         (WebInspector.UISourceCodeImpl.prototype.consoleMessages):
2946         (WebInspector.UISourceCodeImpl.prototype.consoleMessageAdded):
2947         (WebInspector.UISourceCodeImpl.prototype.consoleMessagesCleared):
2948         * inspector/front-end/JavaScriptSourceFrame.js:
2949         (WebInspector.JavaScriptSourceFrame):
2950         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
2951         (WebInspector.JavaScriptSourceFrame.prototype._consoleMessageAdded):
2952         (WebInspector.JavaScriptSourceFrame.prototype._consoleMessagesCleared):
2953         (WebInspector.JavaScriptSourceFrame.prototype._onTextViewerContentLoaded):
2954         * inspector/front-end/ScriptsPanel.js:
2955         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
2956         * inspector/front-end/UISourceCode.js:
2957         (WebInspector.UISourceCode.prototype.breakpoints):
2958         (WebInspector.UISourceCode.prototype.consoleMessages):
2959
2960 2012-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2961
2962         [GTK] Implement PlatformStrategies
2963         https://bugs.webkit.org/show_bug.cgi?id=82454
2964
2965         Reviewed by Xan Lopez.
2966
2967         * GNUmakefile.list.am: Remove PluginDataGtk.cpp. The same
2968         functionality is now implemented using platform strategies.
2969         * plugins/gtk/PluginDataGtk.cpp: Removed.
2970
2971 2012-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
2972
2973         Web Inspector: [Regression] TabIndex is not correctly restored after editing.
2974         https://bugs.webkit.org/show_bug.cgi?id=82464
2975
2976         Reviewed by Pavel Feldman.
2977
2978         This fixes incorrect usage of isNaN that returns false for null value.
2979         Drive-by javascript compilation fix.
2980
2981         * inspector/front-end/CompilerScriptMapping.js:
2982         (WebInspector.CompilerScriptMapping.prototype.addScript): compilation fix.
2983         * inspector/front-end/ResourceScriptMapping.js:
2984         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged): compilation fix.
2985         * inspector/front-end/SnippetsModel.js:
2986         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript): compilation fix.
2987         * inspector/front-end/UIUtils.js:
2988         (WebInspector.startEditing.cleanUpAfterEditing): incorrect usage of isNaN fix.
2989
2990 2012-03-28  Yi Shen  <yi.4.shen@nokia.com>
2991
2992         An extra line break is inserted when pasting into a font element.
2993         https://bugs.webkit.org/show_bug.cgi?id=71207
2994
2995         Reviewed by Ryosuke Niwa.
2996
2997         Fix an editing bug where inserting text into a font element would
2998         create an extra div element in the dom tree. The
2999         WebCore::positionAvoidingPrecedingNodes() tries to set the correct
3000         destination position by checking the next visible position, however,
3001         it causes the position moves into the child element in somecase.
3002         Instead, we should only check the position in parent after node.
3003
3004         Test: editing/inserting/insert-text-into-font.html
3005
3006         * editing/ReplaceSelectionCommand.cpp:
3007         (WebCore::positionAvoidingPrecedingNodes):
3008
3009 2012-03-28  Sergio Villar Senin  <svillar@igalia.com>
3010
3011         [Soup] DNS prefetching spams resolver, shoots self in the foot
3012         https://bugs.webkit.org/show_bug.cgi?id=41630
3013
3014         Reviewed by Martin Robinson.
3015
3016         Added generic DNSResolveQueue class to throttle DNS
3017         prefetches. It's an abstract refactoring of CFNET's
3018         DNSResolveQueue. Platform specific methods implemented for soup
3019         and CFNET backends.
3020
3021         No new tests required as we're just refactoring existing code to
3022         be used by two different ports.
3023
3024         * CMakeLists.txt: added new file.
3025         * GNUmakefile.list.am: ditto.
3026         * WebCore.vcproj/WebCore.vcproj: ditto.
3027         * WebCore.xcodeproj/project.pbxproj: ditto.
3028         * platform/network/DNSResolveQueue.cpp: Added.
3029         (WebCore):
3030         (WebCore::DNSResolveQueue::add): adds a new host to be prefetched.
3031         (WebCore::DNSResolveQueue::fired): by using a delay we coalesce
3032         several prefetch requests and try to resolve them all here.
3033         * platform/network/DNSResolveQueue.h: Added.
3034         (WebCore):
3035         (DNSResolveQueue): class that implements DNS prefetch
3036         throttling using a template pattern.
3037         (WebCore::DNSResolveQueue::shared):
3038         (WebCore::DNSResolveQueue::decrementRequestCount):
3039         * platform/network/cf/DNSCFNet.cpp:
3040         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
3041         (WebCore::DNSResolveQueue::platformResolve):
3042         * platform/network/soup/DNSSoup.cpp:
3043         (WebCore):
3044         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
3045         (WebCore::resolvedCallback):
3046         (WebCore::DNSResolveQueue::platformResolve):
3047         (WebCore::prefetchDNS):
3048
3049 2012-03-28  Eugene Girard  <girard@chromium.org>
3050
3051         window.scrollBy() scrolls incorrectly when zoomed in/out
3052         https://bugs.webkit.org/show_bug.cgi?id=45228
3053
3054         Reviewed by Simon Fraser.
3055
3056         scrollBy now uses layout (not CSS) units. (As scrollTo does.)
3057
3058         Test: fast/dom/zoom-scroll-page-test.html
3059
3060         * page/DOMWindow.cpp:
3061         (WebCore::DOMWindow::scrollBy):
3062
3063 2012-03-28  Stephen Chenney  <schenney@chromium.org>
3064
3065         Null dereference in SVGTextElement::animatedLocalTransform()
3066         https://bugs.webkit.org/show_bug.cgi?id=82375
3067
3068         Reviewed by Nikolas Zimmermann.
3069
3070         A poorly structured SVG file with a text element inside an
3071         animatedTransform element leaves the text element placed outside of
3072         the SVG root and it has no renderer(). Later attempts to use the
3073         renderer in animatedLocalTransform fail.
3074
3075         Test: svg/custom/get-text-element-transform-crash.html
3076
3077         * svg/SVGTextElement.cpp:
3078         (WebCore::SVGTextElement::animatedLocalTransform): Added a check for null renderer, and do not check
3079         for style transform if there is no renderer.
3080
3081 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
3082
3083         Enable animVal support for SVGAnimatedPreserveAspectRatio
3084         https://bugs.webkit.org/show_bug.cgi?id=82326
3085
3086         Reviewed by Zoltan Herczeg.
3087
3088         Enable animVal support for SVGAnimatedPreserveAspectRatio. Very simple now that everything is prepared.
3089         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedPreserveAspectRatioAnimator.
3090
3091         Modernize SVGPreserveAspectRatio, align parsing this object from String, with the other SVG DOM primitives,
3092         who supply a "void parse(const String&)" method, for this task.
3093
3094         Extended existing tests to cover this.
3095
3096         * svg/SVGAnimatedPreserveAspectRatio.cpp:
3097         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
3098         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::startAnimValAnimation):
3099         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::stopAnimValAnimation):
3100         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal):
3101         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::animValWillChange):
3102         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::animValDidChange):
3103         * svg/SVGAnimatedPreserveAspectRatio.h:
3104         (SVGAnimatedPreserveAspectRatioAnimator):
3105         * svg/SVGAnimatedType.cpp:
3106         (WebCore::SVGAnimatedType::valueAsString):
3107         (WebCore::SVGAnimatedType::setValueAsString):
3108         (WebCore::SVGAnimatedType::supportsAnimVal):
3109         * svg/SVGFEImageElement.cpp:
3110         (WebCore::SVGFEImageElement::parseAttribute):
3111         * svg/SVGFitToViewBox.cpp:
3112         (WebCore::SVGFitToViewBox::parseAttribute):
3113         * svg/SVGImageElement.cpp:
3114         (WebCore::SVGImageElement::parseAttribute):
3115         * svg/SVGPreserveAspectRatio.cpp:
3116         (WebCore::SVGPreserveAspectRatio::parse):
3117         (WebCore):
3118         * svg/SVGPreserveAspectRatio.h:
3119         (SVGPreserveAspectRatio):
3120         * svg/SVGViewSpec.cpp:
3121         (WebCore::SVGViewSpec::setPreserveAspectRatioString):
3122         (WebCore::SVGViewSpec::parseViewSpec):
3123
3124 2012-03-28  Pavel Feldman  <pfeldman@chromium.org>
3125
3126         Web Inspector: [v8] inspection of CanvasPixelArray is slow.
3127         https://bugs.webkit.org/show_bug.cgi?id=82455
3128
3129         Reviewed by Vsevolod Vlasov.
3130
3131         Added CanvasPixelArray to the list of classes that we consider
3132         arrays.
3133
3134         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
3135         (WebCore::V8InjectedScriptHost::typeCallback):
3136
3137 2012-03-28  Leandro Gracia Gil  <leandrogracia@chromium.org>
3138
3139         Selectively retrieve text content around a given position.
3140         https://bugs.webkit.org/show_bug.cgi?id=78361
3141
3142         Reviewed by Ryosuke Niwa.
3143
3144         Tests: a new layout test will be introduced once the required WebKit API code is ready.
3145
3146         Introduce the DOMTextContentWalker class to selectively retrieve content
3147         around a given VisiblePosition into a string in such a way that a text
3148         Range can be extracted later from a pair of the string's positions.
3149
3150         A new boolean called m_shouldStop is also introduced in the TextIterator to force
3151         it advancing under certain conditions. Although this is usually done by setting
3152         m_positionNode to zero, it can't be applied in this case since by doing so the
3153         iterator's range is lost.
3154
3155         * WebCore.gypi:
3156         * editing/SurroundingText.cpp: Added.
3157         (WebCore):
3158         (WebCore::SurroundingText::SurroundingText):
3159         (WebCore::SurroundingText::rangeFromContentOffsets):
3160         (WebCore::SurroundingText::content):
3161         (WebCore::SurroundingText::positionOffsetInContent):
3162         * editing/SurroundingText.h: Added.
3163         (WebCore):
3164         (SurroundingText):
3165         * editing/TextIterator.cpp:
3166         (WebCore::TextIterator::TextIterator):
3167         (WebCore::TextIterator::advance):
3168         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
3169         (WebCore::SimplifiedBackwardsTextIterator::advance):
3170         * editing/TextIterator.h:
3171         (WebCore::TextIterator::atEnd):
3172         (TextIterator):
3173         (WebCore::SimplifiedBackwardsTextIterator::atEnd):
3174         (SimplifiedBackwardsTextIterator):
3175         * html/HTMLFormControlElement.cpp:
3176         (WebCore::HTMLFormControlElement::enclosingFormControlElement):
3177         (WebCore):
3178         * html/HTMLFormControlElement.h:
3179         (HTMLFormControlElement):
3180
3181 2012-03-28  Alexis Menard  <alexis.menard@openbossa.org>
3182
3183         Speed up updates of existing CSS properties from JS.
3184         https://bugs.webkit.org/show_bug.cgi?id=82235
3185
3186         Reviewed by Andreas Kling.
3187
3188         Improve the way we handle updating an existing CSS property by replacing its value
3189         by the new one rather than removing the old value and then adding the new one. This
3190         speed up by 35% PerformanceTests/CSS/CSSPropertyUpdateValue.html.
3191
3192         No new tests : Updating existing tests that were relying on the order of the properties
3193         after modification. Each updated property is not appended to the list of properties of the
3194         style therefore the cssText value is slightly different. It matches Firefox behavior but not
3195         Opera.
3196
3197         * css/StylePropertySet.cpp:
3198         (WebCore::StylePropertySet::addParsedProperty):
3199
3200 2012-03-28  Leo Yang  <leo.yang@torchmobile.com.cn>
3201
3202         [BlackBerry] Remove PlatformMouseEvent::setClickCount for BlackBerry
3203         https://bugs.webkit.org/show_bug.cgi?id=82422
3204
3205         Reviewed by Rob Buis.
3206
3207         PlatformMouseEvent::setClickCount() is never used by BlackBerry.
3208         The declaration was added in PlatformMouseEvent.h internally for
3209         BlackBerry porting, but it has not been upstreamed yet.
3210
3211         * platform/blackberry/PlatformMouseEventBlackBerry.cpp:
3212
3213 2012-03-27  Antti Koivisto  <antti@apple.com>
3214
3215         Separate @import rules from other rules in CSSStyleSheet
3216         https://bugs.webkit.org/show_bug.cgi?id=82384 
3217
3218         Reviewed by Andreas Kling.
3219
3220         Import rules always come before all other rules (except @charset). They currently live 
3221         in the generic child rule vector. They can be moved to a vector of their own for stronger
3222         typing and more focused traversal. This will also make future refactoring easier.
3223         
3224         - @import rules go to m_importRules
3225         - the rest go to m_childRules
3226         
3227         * css/CSSStyleSelector.cpp:
3228         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3229         * css/CSSStyleSheet.cpp:
3230         (WebCore::CSSStyleSheet::parserAppendRule):
3231         (WebCore::CSSStyleSheet::length):
3232         (WebCore::CSSStyleSheet::item):
3233         (WebCore::CSSStyleSheet::clearRules):
3234         (WebCore::CSSStyleSheet::rules):
3235         (WebCore::CSSStyleSheet::insertRule):
3236         (WebCore::CSSStyleSheet::deleteRule):
3237         (WebCore::CSSStyleSheet::isLoading):
3238         (WebCore::CSSStyleSheet::addSubresourceStyleURLs):
3239         * css/CSSStyleSheet.h:
3240         (WebCore):
3241         (CSSStyleSheet):
3242         (WebCore::CSSStyleSheet::childRules):
3243         (WebCore::CSSStyleSheet::importRules):
3244
3245 2012-03-28  Pavel Feldman  <pfeldman@chromium.org>
3246
3247         Web Inspector: REGRESSION: Stack overflow on the page with > 100kloc
3248         https://bugs.webkit.org/show_bug.cgi?id=82436
3249
3250         Reviewed by Yury Semikhatsky.
3251
3252         This change migrates to manual splice implementation that uses additional
3253         information about the range being inserted to make it work faster / allocate
3254         less memory.
3255
3256         * inspector/front-end/TextEditorModel.js:
3257         (WebInspector.TextEditorModel.endsWithBracketRegex.):
3258
3259 2012-03-28  Pavel Podivilov  <podivilov@chromium.org>
3260
3261         Web Inspector: breakpoints are not shown in sidebar pane after reload.
3262         https://bugs.webkit.org/show_bug.cgi?id=82351
3263
3264         Reviewed by Pavel Feldman.
3265
3266         When UISourceCode is added to ScriptsPanel, it could already have breakpoints.
3267         We should iterate over existing breakpoints and add them to sidebar pane.
3268
3269         * inspector/front-end/ScriptsPanel.js:
3270         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
3271
3272 2012-03-28  Li Yin  <li.yin@intel.com>
3273
3274         [WebSocket]The Sec-WebSocket-Protocol must not appear more than once in an HTTP response
3275         https://bugs.webkit.org/show_bug.cgi?id=82432
3276
3277         Reviewed by Kent Tamura.
3278
3279         From RFC6455: http://tools.ietf.org/html/rfc6455#section-11.3.4
3280         The |Sec-WebSocket-Protocol| header field must not appear 
3281         more than once in an HTTP response.
3282
3283         Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header.html
3284
3285         * Modules/websockets/WebSocketHandshake.cpp:
3286         (WebCore::WebSocketHandshake::readHTTPHeaders):
3287
3288 2012-03-27  James Robinson  <jamesr@chromium.org>
3289
3290         [chromium] Transfer wheel fling via WebCompositorInputHandlerClient
3291         https://bugs.webkit.org/show_bug.cgi?id=81740
3292
3293         Reviewed by Adrienne Walker.
3294
3295         Adds the ability to construct an in-progress PlatformGestureAnimation.
3296
3297         * platform/ActivePlatformGestureAnimation.cpp:
3298         (WebCore::ActivePlatformGestureAnimation::create):
3299         (WebCore):
3300         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
3301         * platform/ActivePlatformGestureAnimation.h:
3302         (ActivePlatformGestureAnimation):
3303         * platform/TouchpadFlingPlatformGestureCurve.cpp:
3304         (WebCore::TouchpadFlingPlatformGestureCurve::create):
3305         (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve):
3306         * platform/TouchpadFlingPlatformGestureCurve.h:
3307         (TouchpadFlingPlatformGestureCurve):
3308
3309 2012-03-27  Nat Duca  <nduca@chromium.org>
3310
3311         [chromium] Route monotonic clock up from compositor
3312         https://bugs.webkit.org/show_bug.cgi?id=82154
3313
3314         Reviewed by James Robinson.
3315
3316         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3317         (WebCore::CCLayerTreeHost::updateAnimations):
3318         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3319         (CCLayerTreeHost):
3320         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3321         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
3322         (WebCore::CCThreadProxy::beginFrame):
3323         * platform/graphics/chromium/cc/CCThreadProxy.h:
3324         (WebCore::CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState):
3325         (BeginFrameAndCommitState):
3326
3327 2012-03-27  Robin Cao  <robin.cao@torchmobile.com.cn>
3328
3329         [BlackBerry] Upstream LayerAnimation.{cpp, h}
3330         https://bugs.webkit.org/show_bug.cgi?id=80123
3331
3332         Reviewed by Rob Buis.
3333
3334         Initial upstream, no new tests.
3335
3336         * platform/graphics/blackberry/LayerAnimation.cpp: Added.
3337         (WebCore):
3338         (WebCore::solveEpsilon):
3339         (WebCore::solveCubicBezierFunction):
3340         (WebCore::solveStepsFunction):
3341         (WebCore::timingFunctionForAnimationValue):
3342         (WebCore::progress):
3343         (WebCore::fetchIntervalEndpoints):
3344         (WebCore::LayerAnimation::apply):
3345         (WebCore::LayerAnimation::blendTransform):
3346         (WebCore::LayerAnimation::blendOpacity):
3347         (WebCore::LayerAnimation::validateTransformLists):
3348         * platform/graphics/blackberry/LayerAnimation.h: Added.
3349         (WebCore):
3350         (LayerAnimation):
3351         (WebCore::LayerAnimation::create):
3352         (WebCore::LayerAnimation::clone):
3353         (WebCore::LayerAnimation::~LayerAnimation):
3354         (WebCore::LayerAnimation::name):
3355         (WebCore::LayerAnimation::setStartTime):
3356         (WebCore::LayerAnimation::idFromAnimation):
3357         (WebCore::LayerAnimation::isEqualToAnimation):
3358         (WebCore::LayerAnimation::id):
3359         (WebCore::LayerAnimation::property):
3360         (WebCore::LayerAnimation::boxSize):
3361         (WebCore::LayerAnimation::timeOffset):
3362         (WebCore::LayerAnimation::startTime):
3363         (WebCore::LayerAnimation::valueCount):
3364         (WebCore::LayerAnimation::timingFunction):
3365         (WebCore::LayerAnimation::duration):
3366         (WebCore::LayerAnimation::iterationCount):
3367         (WebCore::LayerAnimation::direction):
3368         (WebCore::LayerAnimation::valueAt):
3369         (WebCore::LayerAnimation::LayerAnimation):
3370
3371 2012-03-27  Kenichi Ishibashi  <bashi@chromium.org>
3372
3373         [Chromium] Uninitialized access in SimpleFontDataSkia::platformInit
3374         https://bugs.webkit.org/show_bug.cgi?id=82411
3375
3376         Reviewed by Kent Tamura.
3377
3378         SimpleFontDataSkia::platformInit() could call widthForGlyph(), which
3379         accesses m_zeroWidthSpaceGlyph. This causes a valgrind memcheck error
3380         because m_zeroWidthSpaceGlyph isn't initialized at this point.
3381         Initialize m_zeroWidthSpaceGlyph with zero so that widthForGlyph() can
3382         return appropriate value(The value zero here means "unknown glyph").
3383
3384         No new tests. I manually confirmed this change fixes the valgrind
3385         memcheck error.
3386
3387         * platform/graphics/skia/SimpleFontDataSkia.cpp:
3388         (WebCore::SimpleFontData::platformInit):
3389
3390 2012-03-27  YoungTaeck Song  <youngtaeck.song@samsung.com>
3391
3392         [EFL][WK2] Add RunLoopEfl and WorkQueueEfl
3393         https://bugs.webkit.org/show_bug.cgi?id=62777
3394
3395         Reviewed by Hajime Morita.
3396
3397         Add initial version RunLoopEfl for WebKit2 Efl.
3398
3399         * platform/RunLoop.h:
3400         (TimerBase):
3401         (RunLoop):
3402         * platform/efl/RunLoopEfl.cpp:
3403         (WebCore::RunLoop::RunLoop):
3404         (WebCore::RunLoop::~RunLoop):
3405         (WebCore):
3406         (WebCore::RunLoop::run):
3407         (WebCore::RunLoop::stop):
3408         (WebCore::RunLoop::wakeUpEvent):
3409         (WebCore::RunLoop::wakeUp):
3410         (WebCore::RunLoop::TimerBase::TimerBase):
3411         (WebCore::RunLoop::TimerBase::~TimerBase):
3412         (WebCore::RunLoop::TimerBase::timerFired):
3413         (WebCore::RunLoop::TimerBase::start):
3414         (WebCore::RunLoop::TimerBase::stop):
3415         (WebCore::RunLoop::TimerBase::isActive):
3416
3417 2012-03-27  Benjamin Poulain  <bpoulain@apple.com>
3418
3419         Reinforce Geolocation to prevent accidental leak of the user position
3420         https://bugs.webkit.org/show_bug.cgi?id=82396
3421
3422         Reviewed by Adam Barth.
3423
3424         It is very important not to provide the position of the user to a page
3425         unless the user authorize it.
3426
3427         The code used to make it easy to cause such problems, because any part
3428         of the Geolocation object could invoke the success callback directly.
3429
3430         This patch add encapsulation for all the attributes of GeoNotifier,
3431         and add extra guards for the two callbacks.
3432
3433         In the case of the success callback, we do one extra check before sending
3434         the value to the bindings.
3435
3436         * Modules/geolocation/Geolocation.cpp:
3437         (WebCore::Geolocation::GeoNotifier::runSuccessCallback):
3438         (WebCore::Geolocation::GeoNotifier::runErrorCallback):
3439         (WebCore):
3440         (WebCore::Geolocation::GeoNotifier::stopTimer):
3441         (WebCore::Geolocation::GeoNotifier::timerFired):
3442         (WebCore::Geolocation::startRequest):
3443         (WebCore::Geolocation::sendError):
3444         (WebCore::Geolocation::sendPosition):
3445         (WebCore::Geolocation::stopTimer):
3446         (WebCore::Geolocation::extractNotifiersWithCachedPosition):
3447         (WebCore::Geolocation::startUpdating):
3448         * Modules/geolocation/Geolocation.h:
3449         (WebCore::Geolocation::isAllowed):
3450         (Geolocation):
3451         (GeoNotifier):
3452         (WebCore::Geolocation::GeoNotifier::options):
3453         (WebCore::Geolocation::GeoNotifier::useCachedPosition):
3454
3455 2012-03-27  Kausalya Madhusudhanan  <kmadhusu@chromium.org>
3456
3457         [Coverity] Address some uninitialized constructor values.
3458         https://bugs.webkit.org/show_bug.cgi?id=82376
3459
3460         Reviewed by James Robinson.
3461
3462         New tests are not required since I did not modify any code behavior.
3463
3464         * html/shadow/MediaControlRootElementChromium.cpp:
3465         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
3466         * inspector/InspectorIndexedDBAgent.h:
3467         (InspectorIndexedDBAgent):
3468         * inspector/InspectorTimelineAgent.cpp:
3469         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3470         * page/scrolling/ScrollingCoordinator.cpp:
3471         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
3472         * platform/ScrollAnimatorNone.cpp:
3473         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
3474         * platform/chromium/DataTransferItemChromium.cpp:
3475         (WebCore::DataTransferItemChromium::DataTransferItemChromium):
3476         * platform/graphics/skia/ImageBufferSkia.cpp:
3477         (WebCore::ImageBuffer::ImageBuffer):
3478         * storage/StorageTask.cpp:
3479         (WebCore::StorageTask::StorageTask):
3480
3481 2012-03-27  Alexis Menard  <alexis.menard@openbossa.org>
3482
3483         Simplify CSSPropertyBorderSpacing parsing.
3484         https://bugs.webkit.org/show_bug.cgi?id=82397
3485
3486         Reviewed by Benjamin Poulain.
3487
3488         Remove the local array of longhand properties as it doesn't really
3489         bring much in this simple parsing algorithm.
3490
3491         No new tests, no functionality change intended.
3492
3493         * css/CSSParser.cpp:
3494         (WebCore::CSSParser::parseValue):
3495
3496 2012-03-27  Anders Carlsson  <andersca@apple.com>
3497
3498         Fix race condition when initializing the scrolling thread
3499         https://bugs.webkit.org/show_bug.cgi?id=82398
3500         <rdar://problem/11002166>
3501
3502         Reviewed by Sam Weinig.
3503
3504         Lock m_initializeRunLoopConditionMutex when assigning m_threadIdentifier since we're
3505         asserting that it's not null in the scrolling thread.
3506
3507         * page/scrolling/ScrollingThread.cpp:
3508         (WebCore::ScrollingThread::createThreadIfNeeded):
3509
3510 2012-03-27  Luke Macpherson  <macpherson@chromium.org>
3511
3512         Add assertions to valueForLength() and RenderBox::computeLogicalWidthInRegionUsing() to help with debugging.
3513         https://bugs.webkit.org/show_bug.cgi?id=82393
3514
3515         Reviewed by Eric Seidel.
3516
3517         No new tests / adding assetions only.
3518
3519         * css/LengthFunctions.cpp:
3520         (WebCore::valueForLength):
3521         * rendering/RenderBox.cpp:
3522         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
3523
3524 2012-03-27  Tony Chang  <tony@chromium.org>
3525
3526         use the correct size when computing flex-pack space
3527         https://bugs.webkit.org/show_bug.cgi?id=82378
3528
3529         Reviewed by Ojan Vafai.
3530
3531         Fix 2 bugs:
3532         - We weren't properly updating available space before computing
3533           packing space. If a min/max is not hit, we still need to adjust
3534           the available free space.
3535         - For flex-pack:end, we need to put the overflow in the start edge.
3536
3537         New test cases in css3/flexbox/flex-pack.html
3538
3539         * rendering/RenderFlexibleBox.cpp:
3540         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
3541         (WebCore::initialPackingOffset):
3542
3543 2012-03-27  Dana Jansens  <danakj@chromium.org>
3544
3545         [chromium] Unknown transforms should be treated as non-axis aligned on main thread
3546         https://bugs.webkit.org/show_bug.cgi?id=82370
3547
3548         Reviewed by Adrienne Walker.
3549
3550         On main thread, animating transforms have "unknown" values as they are changing
3551         out of sync on the impl thread. So treat them as non-axis-aligned since they
3552         may be, when deciding to create a render surface.
3553
3554         In addition, since surfaces are cheap on main thread, create one for all layers
3555         with animating transforms and a drawing descendant, as this allows paint culling
3556         within the layer's subtree (the animated transform won't affect drawTransforms
3557         inside the subtree).
3558
3559         Also renamed the layerIsInAnimatingSubtreeFor* to animatingTransformTo*.
3560         The old name made me pause and think what it meant and I'm the one who
3561         created it. Hopefully this is more clear.
3562
3563         Unit test: CCLayerTreeHostCommonTest.verifyAnimationsForRenderSurfaceHierarchy
3564
3565         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3566         (WebCore::transformToParentIsKnown):
3567         (WebCore):
3568         (WebCore::subtreeShouldRenderToSeparateSurface):
3569         (WebCore::calculateDrawTransformsAndVisibilityInternal):
3570
3571 2012-03-27  Dirk Pranke  <dpranke@chromium.org>
3572
3573         Re-land r112277; reverting it doesn't seem to have fixed anything.
3574
3575         Unreviewed, build fix.
3576
3577         * svg/SVGUseElement.cpp:
3578         (WebCore::SVGUseElement::insertedIntoDocument):
3579         (WebCore::SVGUseElement::svgAttributeChanged):
3580         (WebCore::SVGUseElement::willRecalcStyle):
3581         (WebCore::SVGUseElement::finishParsingChildren):
3582         * xml/XMLErrors.cpp:
3583         (WebCore::XMLErrors::insertErrorMessageBlock):
3584
3585 2012-03-27  Dana Jansens  <danakj@chromium.org>
3586
3587         [chromium] Rename opaqueContentsRegion() to visibleContentOpaqueRegion()
3588         https://bugs.webkit.org/show_bug.cgi?id=81689
3589
3590         Reviewed by Adrienne Walker.
3591
3592         The return value from this function is a region of opaque pixels in the
3593         layer's content space that intersect with its visible rect. Rather than
3594         adding a comment to this effect, renaming the method to make it clear.
3595
3596         * platform/graphics/chromium/LayerChromium.h:
3597         (WebCore::LayerChromium::visibleContentOpaqueRegion):
3598         * platform/graphics/chromium/TiledLayerChromium.cpp:
3599         (WebCore::TiledLayerChromium::visibleContentOpaqueRegion):
3600         * platform/graphics/chromium/TiledLayerChromium.h:
3601         * platform/graphics/chromium/cc/CCLayerImpl.h:
3602         (WebCore::CCLayerImpl::visibleContentOpaqueRegion):
3603         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3604         (WebCore::computeOcclusionBehindLayer):
3605         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3606         (WebCore::CCTiledLayerImpl::visibleContentOpaqueRegion):
3607         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3608         (CCTiledLayerImpl):
3609
3610 2012-03-27  James Robinson  <jamesr@chromium.org>
3611
3612         Scrollable plugins not registered properly in ScrollingCoordinator
3613         https://bugs.webkit.org/show_bug.cgi?id=82163
3614
3615         Reviewed by Anders Carlsson.
3616
3617         Whenever a ScrollableArea is added or removed from a FrameView's ScrollableAreaSet, we have to recalculate the
3618         nonFastScrollableRegion. This can happen for certain types of plugins that are scrollable.
3619
3620         This also reverts 112142 which was a not quite right way to handle these plugins.
3621
3622         * page/FrameView.cpp:
3623         (WebCore::FrameView::addScrollableArea):
3624         (WebCore::FrameView::removeScrollableArea):
3625         * page/scrolling/ScrollingCoordinator.cpp:
3626         (WebCore::computeNonFastScrollableRegion):
3627         (WebCore::ScrollingCoordinator::frameViewScrollableAreasDidChange):
3628         (WebCore):
3629         * page/scrolling/ScrollingCoordinator.h:
3630         (ScrollingCoordinator):
3631         * plugins/PluginViewBase.h:
3632
3633 2012-03-27  Adam Klein  <adamk@chromium.org>
3634
3635         Hold a reference to refChild in insertBefore before calling collectChildrenAndRemoveFromOldParent
3636         https://bugs.webkit.org/show_bug.cgi?id=82377
3637
3638         Reviewed by Ryosuke Niwa.
3639
3640         This fixes a regression from r111925.
3641
3642         Test: fast/dom/insertBefore-refChild-crash.html
3643
3644         * dom/ContainerNode.cpp:
3645         (WebCore::ContainerNode::insertBefore): Move the 'next' RefPtr above the call to
3646         collectChildrenAndRemoveFromOldParent and rename refChildPreviousSibling
3647         to 'prev' (matching appendChild and replaceChild).
3648
3649 2012-03-27  Ryosuke Niwa  <rniwa@webkit.org>
3650
3651         cssText should not generate literal 'initial' in shorthand properties
3652         https://bugs.webkit.org/show_bug.cgi?id=82364
3653
3654         Reviewed by Antti Koivisto.
3655
3656         Fixed the bug by treating initial value as if the value is not set.
3657         While this is incorrect for properties that inherits by default,
3658         it's strictly better than generating unparsable value as we do today.
3659
3660         The proper fix is for CSSInitialValue::cssText to fetch the respective
3661         default value from what's currently in CSSStyleSelector code but that requires
3662         a considerable amount of refactoring and work.
3663
3664         * css/StylePropertySet.cpp:
3665         (WebCore::StylePropertySet::getShorthandValue):
3666         (WebCore::StylePropertySet::getCommonValue):
3667
3668 2012-03-26  Adam Klein  <adamk@chromium.org>
3669
3670         Always set V8 wrappers via V8DOMWrapper::setJSWrapperFor* instead of WeakReferenceMap::set()
3671         https://bugs.webkit.org/show_bug.cgi?id=82256
3672
3673         Reviewed by Adam Barth.
3674
3675         This moves leakRef() calls out of generated code, centralizing them in
3676         V8DOMWrapper implementation. Ideally, WeakReferenceMap::set would take
3677         PassRefPtrs, but that's tricky given that some WeakReferenceMap's KeyType is 'void'
3678         (which clearly can't be wrapped in a PassRefPtr).
3679
3680         Updated binding tests to reflect changes in CodeGeneratorV8.pm, no change in behavior.
3681
3682         Relanding r112207 with setJSWrapperForDOMSVGElementInstance defined
3683         out-of-line to avoid SVG header dependencies.
3684
3685         * bindings/scripts/CodeGeneratorV8.pm:
3686         (GenerateConstructorCallback): Use GetDomMapFunction instead of custom logic.
3687         (GenerateNamedConstructorCallback): ditto.
3688         (GenerateToV8Converters): Call V8DOMWrapper::setJSWrapper* method
3689         instead of directly accessing the wrapper maps and calling set.
3690         (GetDomMapFunction): Refactored to call new GetDomWrapperMapName function.
3691         (GetDomWrapperMapName): Helper pulled out of GetDomMapFunction.
3692         * bindings/scripts/test/V8/V8Float64Array.cpp:
3693         (WebCore::V8Float64Array::wrapSlow):
3694         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3695         (WebCore::V8TestActiveDOMObject::wrapSlow):
3696         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3697         (WebCore::V8TestCustomNamedGetter::wrapSlow):
3698         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3699         (WebCore::V8TestEventConstructor::wrapSlow):
3700         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3701         (WebCore::V8TestEventTarget::wrapSlow):
3702         * bindings/scripts/test/V8/V8TestInterface.cpp:
3703         (WebCore::V8TestInterface::wrapSlow):
3704         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3705         (WebCore::V8TestMediaQueryListListener::wrapSlow):
3706         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3707         (WebCore::V8TestNamedConstructor::wrapSlow):
3708         * bindings/scripts/test/V8/V8TestObj.cpp:
3709         (WebCore::V8TestObj::wrapSlow):
3710         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3711         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
3712         * bindings/v8/V8DOMWrapper.cpp: Moved setJSWrapperForDOMNode method to header to inline it.
3713         (WebCore::V8DOMWrapper::setJSWrapperForDOMSVGElementInstance): New helper method for SVGElementInstances.
3714         Not inline to avoid header dependency on SVGElementInstance.h.
3715         * bindings/v8/V8DOMWrapper.h:
3716         (V8DOMWrapper):
3717         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Made inline.
3718         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): ditto.
3719         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Refactored into two methods;
3720         this one handles non-active Nodes.
3721         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode): Pulled out of previouse
3722         DOMNode method, now handles only active Nodes.
3723
3724 2012-03-27  Levi Weintraub  <leviw@chromium.org>
3725
3726         Correct LayoutUnit usage in virtual function layoutBlock in RenderFlexibleBox
3727         https://bugs.webkit.org/show_bug.cgi?id=82344
3728
3729         Reviewed by Eric Seidel.
3730
3731         Correcting the signature of RenderFlexibleBox::layoutBlock to use a LayoutUnit
3732         for the page height, and avoiding assigning the renderer's size to an IntSize.
3733
3734         No new tests. No change in behavior.
3735
3736         * rendering/RenderFlexibleBox.cpp:
3737         (WebCore::RenderFlexibleBox::layoutBlock):
3738         * rendering/RenderFlexibleBox.h:
3739         (RenderFlexibleBox):
3740
3741 2012-03-27  Timothy Hatcher  <timothy@apple.com>
3742
3743         Make WebKit properly load a staged framework when soft linking.
3744
3745         https://webkit.org/b/82371
3746         rdar://problem/11125989
3747
3748         Reviewed by Dan Bernstein.
3749
3750         * platform/mac/SoftLinking.h: Replaced SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL with
3751         SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL and made it use the StagedFrameworks path
3752         if the first dlopen failed.
3753
3754 2012-03-26  Dirk Schulze  <krit@webkit.org>
3755
3756         Use enumeration for CSS parser mode
3757         https://bugs.webkit.org/show_bug.cgi?id=82056
3758
3759         Reviewed by Antti Koivisto.
3760
3761         Introduce a new CSSParserMode enum to differ between strict / quirks and SVG presentation
3762         attribute parsing modes.
3763         The followup patch will make use of the enum in all other classes.
3764         After that it will be easier possible to reuse the CSS parser in SVG as much as possible and
3765         introduce SVG specific functionality.
3766
3767         No new tests. No change on functionality yet. This is just a refactoring to use the enumeration.
3768
3769         * GNUmakefile.list.am: Added new file CSSParserMode.h with the new enum, which can be used by any caller of CSSParser, CSSStyleSheet and others.
3770         * Target.pri: Ditto.
3771         * WebCore.gypi: Ditto.
3772         * WebCore.vcproj/WebCore.vcproj: Ditto.
3773         * WebCore.xcodeproj/project.pbxproj: Ditto.
3774         * css/CSSGrammar.y: Make use of the new enumeration.
3775         * css/CSSParser.cpp: Replaced boolean by enumeration. No change of functionality at this point of time.
3776         (WebCore::CSSParser::inStrictMode): Helper function.
3777         (WebCore):
3778         (WebCore::CSSParser::inQuirksMode): Helper function.
3779         (WebCore::CSSParser::CSSParser):
3780         (WebCore::CSSParser::validUnit):
3781         (WebCore::CSSParser::checkForOrphanedUnits):
3782         (WebCore::CSSParser::parseValue):
3783         (WebCore::CSSParser::parseSizeParameter):
3784         (WebCore::CSSParser::parseBackgroundColor):
3785         (WebCore::CSSParser::parseFillPositionX):
3786         (WebCore::CSSParser::parseFillPositionY):
3787         (WebCore::CSSParser::parseFillPositionComponent):
3788         (WebCore::CSSParser::parseFillSize):
3789         (WebCore::CSSParser::parseAnimationDelay):
3790         (WebCore::CSSParser::parseAnimationDuration):
3791         (WebCore::CSSParser::parseAnimationIterationCount):
3792         (WebCore::CSSParser::parseTransformOriginShorthand):
3793         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
3794         (WebCore::CSSParser::parseAnimationTimingFunction):
3795         (WebCore::CSSParser::parseGridTrackList):
3796         (WebCore::CSSParser::parseDashboardRegions):
3797         (WebCore::CSSParser::parseShape):
3798         (WebCore::CSSParser::parseWrapShapeRect):
3799         (WebCore::CSSParser::parseWrapShapeCircle):
3800         (WebCore::CSSParser::parseWrapShapeEllipse):
3801         (WebCore::CSSParser::parseWrapShapePolygon):
3802         (WebCore::CSSParser::parseFont):
3803         (WebCore::CSSParser::parseFontWeight):
3804         (WebCore::CSSParser::parseColorParameters):
3805         (WebCore::CSSParser::parseHSLParameters):
3806         (WebCore::CSSParser::parseColorFromValue):
3807         (WebCore::CSSParser::parseShadow):
3808         (WebCore::CSSParser::parseReflect):
3809         (WebCore::CSSParser::parseFlex):
3810         (WebCore::CSSParser::parseBorderImageSlice):
3811         (WebCore::CSSParser::parseBorderImageQuad):
3812         (WebCore::CSSParser::parseBorderRadius):
3813         (WebCore::CSSParser::parseAspectRatio):
3814         (WebCore::CSSParser::parseLinearGradient):
3815         (WebCore::CSSParser::parseRadialGradient):
3816         (WebCore::CSSParser::parseGradientColorStops):
3817         (WebCore::CSSParser::parseTransform):
3818         (WebCore::CSSParser::parseCustomFilter):
3819         (WebCore::CSSParser::parseBuiltinFilterArguments):
3820         (WebCore::CSSParser::parseTransformOrigin):
3821         (WebCore::CSSParser::createStyleRule):
3822         (WebCore::CSSParser::createFontFaceRule):
3823         (WebCore::CSSParser::createPageRule):
3824         (WebCore::CSSParser::createKeyframeRule):
3825         * css/CSSParser.h:
3826         (CSSParser):
3827         * css/CSSParserMode.h: Added. New enumeration CSSParserMode.
3828         * css/SVGCSSParser.cpp: Use new SVGAttributeMode CSS parsing mode.
3829         (WebCore::CSSParser::parseSVGValue):
3830         (WebCore::CSSParser::parseSVGStrokeDasharray):
3831
3832 2012-03-27  Nate Chapin  <japhet@chromium.org>
3833
3834         Don't manually set an identifier for main resource
3835         loads in FrameLoader. ResourceLoader::willSendRequest()
3836         will set an identifier for the request if one isn't found,
3837         so this code appears to be unnecessary duplication.
3838         https://bugs.webkit.org/show_bug.cgi?id=82248
3839
3840         Reviewed by Adam Barth.
3841
3842         No new tests, no functionality change intended.
3843
3844         * loader/DocumentLoader.cpp:
3845         (WebCore::DocumentLoader::startLoadingMainResource): Mark navigation start
3846             here, since it's conceptually part of starting the main resource load.
3847         * loader/DocumentLoader.h:
3848         * loader/FrameLoader.cpp:
3849         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Remove duplicate identifier
3850             logic, and move navigation timing call to startLoadingMainResource, since
3851             it fits better logically there.
3852         * loader/ResourceLoader.h: No callers of setIdentifier() remain, so delete it.
3853
3854 2012-03-27  Dirk Pranke  <dpranke@chromium.org>
3855
3856         Unreviewed, rolling out r112277.
3857         http://trac.webkit.org/changeset/112277
3858         https://bugs.webkit.org/show_bug.cgi?id=81985
3859
3860         possibly causing crashes?
3861
3862         * svg/SVGUseElement.cpp:
3863         (WebCore::SVGUseElement::insertedIntoDocument):
3864         (WebCore::SVGUseElement::svgAttributeChanged):
3865         (WebCore::SVGUseElement::willRecalcStyle):
3866         (WebCore::SVGUseElement::finishParsingChildren):
3867         * xml/XMLErrors.cpp:
3868         (WebCore::XMLErrors::insertErrorMessageBlock):
3869
3870 2012-03-27  Joseph Pecoraro  <pecoraro@apple.com>
3871
3872         <http://webkit.org/b/82362> Web Inspector: Provide private -[DOMNode inspect]
3873
3874         Reviewed by Timothy Hatcher.
3875
3876         No new tests, this is only an ObjC SPI.
3877
3878         * bindings/objc/DOM.mm:
3879         * bindings/objc/DOMPrivate.h:
3880         (-[DOMNode inspect]):
3881         Call through to InspectorController inspect for the node.
3882
3883         * inspector/InspectorDOMAgent.cpp:
3884         (WebCore::InspectorDOMAgent::handleMousePress):
3885         (WebCore::InspectorDOMAgent::inspect):
3886         Whenever we inspect an element, clear the node search.
3887         The frontend already takes this approach.
3888
3889 2012-03-27  Joe Mason  <jmason@rim.com>
3890
3891         [BlackBerry] fix confusing destruction sequence in LayerCompositingThread
3892         https://bugs.webkit.org/show_bug.cgi?id=81706
3893
3894         Reviewed by Rob Buis.
3895
3896         LayerCompositingThread has a destructor that does a synchronous
3897         dispatch to the compositing thread and then does the actual cleanup
3898         from a helper function. This is confusing.It should be the
3899         opposite: the helper function dispatches to the compositing thread,
3900         which calls delete.
3901
3902         No new tests since the existing animation tests will exercise this
3903         code.
3904
3905         * platform/graphics/blackberry/LayerCompositingThread.cpp:
3906         (WebCore::LayerCompositingThread::destroyOnCompositingThread):
3907         (WebCore):
3908         (WebCore::LayerCompositingThread::~LayerCompositingThread):
3909         * platform/graphics/blackberry/LayerCompositingThread.h:
3910         (LayerCompositingThread):
3911         (WTF):
3912         (WTF::::deref):
3913
3914 2012-03-27  Alexey Proskuryakov  <ap@apple.com>
3915
3916         [Mac] Stop using NSMapTable in FormDataStreamMac.mm
3917         https://bugs.webkit.org/show_bug.cgi?id=82358
3918
3919         Reviewed by Darin Adler.
3920
3921         * platform/network/mac/FormDataStreamMac.mm: Use WTF::HashMap, as we always do. All accesses
3922         are protected with a mutex anyway.
3923
3924 2012-03-27  Joe Thomas  <joethomas@motorola.com>
3925
3926         Implement vw/vh/vmin (viewport sizes) from CSS3 Values and Units
3927         https://bugs.webkit.org/show_bug.cgi?id=27160
3928
3929         Reviewed by Antti Koivisto.
3930
3931         vw/vh/vmin are implemented as primitive length units. Added the parsing logic for these new units.
3932         New Length types such as ViewportRelativeWidth, ViewportRelativeHeight and ViewportRelativeMin are added for these length units
3933         and included the support for fetching the value of these relative units based on the current viewport size.
3934
3935         The specification related to this implementation is http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths.
3936
3937         Tests: css3/viewport-relative-lengths/css3-viewport-relative-lengths-getStyle.html
3938                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh-absolute.html
3939                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vh.html
3940                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin-absolute.html
3941                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vmin.html
3942                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw-absolute.html
3943                css3/viewport-relative-lengths/css3-viewport-relative-lengths-vw.html
3944
3945         * accessibility/gtk/WebKitAccessibleInterfaceText.cpp: Modified to support viewport relative Length types.
3946         (getAttributeSetForAccessibilityObject):
3947         * css/CSSComputedStyleDeclaration.cpp: Ditto.
3948         (WebCore::getPositionOffsetValue):
3949         (WebCore::getBorderRadiusCornerValues):
3950         (WebCore::getBorderRadiusCornerValue):
3951         (WebCore::getBorderRadiusShorthandValue):
3952         (WebCore::lineHeightFromStyle):
3953         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3954         * css/CSSGrammar.y: Added vw/vh/vmin support.
3955         * css/CSSParser.cpp: Parsing of relative units and creation of CSSPrimitiveValue.
3956         (WebCore::CSSParser::validUnit): Added vw/vh/vmin to the valid units.
3957         (WebCore::CSSParser::createPrimitiveNumericValue): Added vw/vh/vmin as valid primitive units.
3958         (WebCore::unitFromString):
3959         (WebCore::CSSParser::parseValidPrimitive): Creation of CSSPrimitiveValue for vw/vh/vmin.
3960         (WebCore::CSSParser::detectNumberToken): Parsing the vw/vh/vmin tokens.
3961         * css/CSSPrimitiveValue.cpp:
3962         (WebCore::isValidCSSUnitTypeForDoubleConversion): Added support for vw/vh/vmin.
3963         (WebCore::unitCategory): Ditto.
3964         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3965         (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Added support for vw/vh/vmin.
3966         (WebCore::CSSPrimitiveValue::customCssText): Ditto.
3967         (WebCore::CSSPrimitiveValue::viewportRelativeLength): Function to create the Length structure for the viewport-relative unit types.
3968         (WebCore):
3969         * css/CSSPrimitiveValue.h:
3970         (WebCore::CSSPrimitiveValue::isViewportRelativeLength): Checks whether the primitive value is ViewportRelative Lengths.
3971         (CSSPrimitiveValue):
3972         * css/CSSPrimitiveValue.idl: Added support for vw/vh/vmin.
3973         * css/CSSPrimitiveValueMappings.h:
3974         (WebCore::CSSPrimitiveValue::convertToLength): Ditto.
3975         * css/CSSStyleApplyProperty.cpp: Applying relative viewport length units to the specific CSS property.
3976         (WebCore::ApplyPropertyLength::applyValue):
3977         (WebCore::ApplyPropertyBorderRadius::applyValue):
3978         (WebCore::ApplyPropertyFontSize::applyValue):
3979         (WebCore::ApplyPropertyLineHeight::applyValue):
3980         (WebCore::ApplyPropertyVerticalAlign::applyValue):
3981         * css/CSSStyleSelector.cpp: Added support for viewport relative units.
3982         * css/LengthFunctions.cpp: Calcuation of length value based on the current viewport size.
3983         (WebCore::miminumValueForLength):
3984         (WebCore::valueForLength):
3985         (WebCore::floatValueForLength):
3986         * css/LengthFunctions.h: Added new RenderView argument.
3987         (WebCore):
3988         * dom/Document.cpp:
3989         (WebCore::Document::pageSizeAndMarginsInPixels): Modified to support viewport relative Length types.
3990         (WebCore::Document::viewportSize): New function to fetch the current viewport size.
3991         (WebCore):
3992         * dom/Document.h: Ditto.
3993         (Document):
3994         * html/HTMLAreaElement.cpp: Modified to support viewport relative Length types.
3995         (WebCore::HTMLAreaElement::getRegion):
3996         * platform/Length.h:
3997         (WebCore::Length::isViewportRelative): To check the Length is of type ViewportRelative.
3998         (WebCore::Length::viewportRelativeLength): To get the relative value.
3999         * rendering/RenderBR.cpp: Modified to support viewport relative Length types.
4000         (WebCore::RenderBR::lineHeight):
4001         * rendering/RenderBlock.cpp: Ditto.
4002         (WebCore::RenderBlock::textIndentOffset):
4003         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
4004         (WebCore::RenderBlock::lineHeight):
4005         * rendering/RenderBox.cpp: Ditto.
4006         (WebCore::RenderBox::reflectionOffset):
4007         (WebCore::RenderBox::paintBoxDecorations):
4008         (WebCore::RenderBox::clipRect):
4009         (WebCore::RenderBox::computeLogicalWidthInRegion):
4010         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
4011         (WebCore::RenderBox::computeInlineDirectionMargins):
4012         (WebCore::RenderBox::computeContentLogicalHeightUsing):
4013         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
4014         (WebCore::RenderBox::computeBlockDirectionMargins):
4015         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
4016         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
4017         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
4018         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
4019         * rendering/RenderBoxModelObject.cpp: Ditto.
4020         (WebCore::RenderBoxModelObject::relativePositionOffsetX):
4021         (WebCore::RenderBoxModelObject::relativePositionOffsetY):
4022         (WebCore::RenderBoxModelObject::paddingTop):
4023         (WebCore::RenderBoxModelObject::paddingBottom):
4024         (WebCore::RenderBoxModelObject::paddingLeft):
4025         (WebCore::RenderBoxModelObject::paddingRight):
4026         (WebCore::RenderBoxModelObject::paddingBefore):
4027         (WebCore::RenderBoxModelObject::paddingAfter):
4028         (WebCore::RenderBoxModelObject::paddingStart):
4029         (WebCore::RenderBoxModelObject::paddingEnd):
4030         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
4031         (WebCore::RenderBoxModelObject::calculateFillTileSize):
4032         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
4033         (WebCore::computeBorderImageSide):
4034         (WebCore::RenderBoxModelObject::paintNinePieceImage):
4035         (WebCore::RenderBoxModelObject::paintBorder):
4036         (WebCore::RenderBoxModelObject::paintBoxShadow):
4037         * rendering/RenderFlexibleBox.cpp: Ditto.
4038         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
4039         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
4040         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
4041         * rendering/RenderInline.cpp: Ditto.
4042         (WebCore::computeMargin):
4043         (WebCore::RenderInline::lineHeight):
4044         * rendering/RenderMenuList.cpp: Ditto.
4045         (WebCore::RenderMenuList::updateOptionsWidth):
4046         * rendering/RenderObject.cpp: Ditto.
4047         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
4048         * rendering/RenderReplaced.cpp: Ditto.
4049         (WebCore::RenderReplaced::paint):
4050         * rendering/RenderScrollbarPart.cpp: Ditto.
4051         (WebCore::calcScrollbarThicknessUsing):
4052         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
4053         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
4054</