1. 26 May, 2017 40 commits
    • shend's avatar
      Replace "field_type_path" with "include_paths" in CSSProperties.json5. · e076f009
      shend authored
      In CSSProperties.json5, to deal with type_names that are defined in
      other files, we use the "field_type_path" parameter. For example, if we
      wanted to use "Length" as the type_name, we can specify
      "field_type_path" as "platform/Length" and the generator will
      automatically include "platform/Length.h". We would also deduce that
      the type_name is Length. However, this does not cater for type_names
      like "Vector<String>", where multiple files need to be included.
      
      This patch generalises "field_type_path" to "include_paths", which is
      simply a list of files containing definitions for the types in
      type_name. Since "include_paths" can contain multiple files, we can no
      longer deduce the type_name, so we have to explicitly specify the
      type_name.
      
      BUG=628043
      
      Review-Url: https://codereview.chromium.org/2904483003
      Cr-Commit-Position: refs/heads/master@{#474928}
      e076f009
    • estark's avatar
      Do not send repeated Expect-CT reports to the same host+port · 6952c722
      estark authored
      To avoid duplicate reports, this CL adds an ExpiringCache, keyed by
      request hostname+port, to not send repeated Expect-CT reports.
      
      As noted in a comment, it's possible that the same host+port could generate
      legitimately different Expect-CT reports and it could be useful for the server
      operator to receive both of them. However, this seems unlikely to happen in
      practice. In a future refactor in which we move the Expect-CT reporting code
      into //net, it would be easier to use more of the report contents as the cache
      key (so that meaningfully different reports would not share a cache key), but
      keying by host+port should suffice for now.
      
      BUG=679012
      
      Review-Url: https://codereview.chromium.org/2901183002
      Cr-Commit-Position: refs/heads/master@{#474927}
      6952c722
    • shend's avatar
      Make EImageRendering an enum class. · 35ced485
      shend authored
      This patch makes EImageRendering an enum class for better type safety.
      
      BUG=684966
      CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
      
      Review-Url: https://codereview.chromium.org/2899633002
      Cr-Commit-Position: refs/heads/master@{#474926}
      35ced485
    • meade's avatar
      Delete obsolete number and length classes from Typed OM · 42110b22
      meade authored
      This breaks most of our layout tests, since most things
      depend on numbers and lengths, but it's better to be in
      a single half state than have two half states hanging
      around.
      
      BUG=545318
      
      Review-Url: https://codereview.chromium.org/2867883003
      Cr-Commit-Position: refs/heads/master@{#474925}
      42110b22
    • shend's avatar
      Replace pointers in ComputedStyle::*DataEquivalent functions with refs. · ea2ef980
      shend authored
      Currently, there are a few *DataEquivalent functions in ComputedStyle
      that take a pointer. All these functions assume that the pointers are
      not null, so we can simply replace them with references.
      
      BUG=628043
      
      Review-Url: https://codereview.chromium.org/2905793002
      Cr-Commit-Position: refs/heads/master@{#474924}
      ea2ef980
    • shend's avatar
      Make RubyPosition an enum class. · ec8d1045
      shend authored
      This patch makes RubyPosition an enum class for better type safety.
      
      BUG=684966
      
      Review-Url: https://codereview.chromium.org/2897883002
      Cr-Commit-Position: refs/heads/master@{#474923}
      ec8d1045
    • ajo's avatar
      increase bucket size and break down video by http/https · 301b00f0
      ajo authored
      Effected existing histograms:
      Net.HttpContentLength.Http
      Net.HttpContentLength.Https
      Net.HttpContentLength.Video
      Net.HttpContentLength.Http.Video
      Net.HttpContentLength.Https.Video
      
      New Histograms:
      
      Net.HttpContentLength.Http.Direct
      Net.HttpContentLength.Http.ViaDRP
      Net.HttpContentLength.Http.BypassedDRP
      Net.HttpContentLength.Http.Other
      Net.HttpContentLength.Https.Direct
      Net.HttpContentLength.Https.ViaDRP
      Net.HttpContentLength.Https.BypassedDRP
      Net.HttpContentLength.Https.Other
      
      Net.HttpContentLength.Http.Direct.Video
      Net.HttpContentLength.Http.ViaDRP.Video
      Net.HttpContentLength.Http.BypassedDRP.Video
      Net.HttpContentLength.Http.Other.Video
      Net.HttpContentLength.Https.Direct.Video
      Net.HttpContentLength.Https.ViaDRP.Video
      Net.HttpContentLength.Https.BypassedDRP.Video
      Net.HttpContentLength.Https.Other.Video
      
      BUG=689659
      
      Review-Url: https://codereview.chromium.org/2888653003
      Cr-Commit-Position: refs/heads/master@{#474922}
      301b00f0
    • ccameron's avatar
      color: Add ColorCanvasExtensions runtime flag · b1e300b0
      ccameron authored
      These features being developed behind --enable-color-correct-rendering
      and --enable-experimental-canvas-features.
      
      We're turning on  --enable-color-correct-rendering for all layout tests,
      some of which also use --enable-experimental-canvas-features, but do
      not want to opt in to new canvas behaviors (at least yet).
      
      To avoid this, use the Blink feature flag ColorCanvasExtensions. While
      we're in the neighborhood, pull out the uses of the flag
      --enable-color-correct-rendering-default-mode and related code.
      
      BUG=724733
      
      Review-Url: https://codereview.chromium.org/2893243003
      Cr-Commit-Position: refs/heads/master@{#474921}
      b1e300b0
    • tbansal's avatar
      Expose transport RTT estimate from Network Quality Estimator (NQE) · 10cfdc03
      tbansal authored
      This will later be used to set proxy connection timeouts.
      
      BUG=704339
      
      Review-Url: https://codereview.chromium.org/2911473002
      Cr-Commit-Position: refs/heads/master@{#474920}
      10cfdc03
    • limasdf's avatar
      Provide a method to remove inserted style sheet · 0ffd86f3
      limasdf authored
      InsertStyleSheet() returns sequence id. And RemoveInsertedStyleSheet()
      removes the inserted style sheet with its id.
      
      TEST=webkit_unit_tests --gtest_fiter=StyleEngineTest.AnalyzedInject, WebDocumentTest.InsertAndRemoveStyleSheet
      BUG=608854
      
      Review-Url: https://codereview.chromium.org/2835183002
      Cr-Commit-Position: refs/heads/master@{#474919}
      0ffd86f3
    • Nate Fischer's avatar
      AW: add back-to-safety SafeBrowsing test · 79f092fc
      Nate Fischer authored
      This test ensures that back-to-safety navigates backward for the main
      frame case. This functionality was landed in crrev/474038.
      
      BUG=684710
      
      Change-Id: I2ff0223bdd6212d65afe6848894ce2d74cfae7ae
      Reviewed-on: https://chromium-review.googlesource.com/516508Reviewed-by: default avatarBo Liu <boliu@chromium.org>
      Commit-Queue: Nate Fischer <ntfschr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#474918}
      79f092fc
    • muyuanli's avatar
      restricts when context could be retrieved. · e38092a8
      muyuanli authored
      Add a timeout after user initiating voice interaction
      session. All context requests can only be done with
      pre-defined number of times during this time frame.
      
      BUG=b/62065175
      
      Review-Url: https://codereview.chromium.org/2898173006
      Cr-Commit-Position: refs/heads/master@{#474917}
      e38092a8
    • nhiroki's avatar
      Worklet: Add layout tests for module import statements on WorkletGlobalScope · 6cceae4b
      nhiroki authored
      BUG=627945
      
      Review-Url: https://codereview.chromium.org/2906013002
      Cr-Commit-Position: refs/heads/master@{#474916}
      6cceae4b
    • ymalik's avatar
      VR feedback reports should go directly to the Feedback activity · c99b85c6
      ymalik authored
      This CL has the following changes
      - Adds a showFeedback method to HelpAndFeedback which starts Feedback
        without the "Help" portion.
      - FeedbackCollector can be initialized to not take screenshots (screenshot
        makes less sense for the VR feedback usecase).
      - FeedbackCollector can set a CategoryTag to route the reports to a specific bucket.
      
      BUG=722972
      
      Review-Url: https://codereview.chromium.org/2897323002
      Cr-Commit-Position: refs/heads/master@{#474915}
      c99b85c6
    • rlanday's avatar
      Add TextMatchMarkerListImpl::SetTextMatchMarkersActive() · f04ef6cf
      rlanday authored
      Adding this helper method allows us to simplify the implementation of
      DocumentMarkerController::SetTextMatchMarkersActive(), which was previously
      depending on details of the implementation of TextMatchMarkerListImpl (whether
      or not it stores its markers in sorted order).
      
      BUG=707867
      
      Review-Url: https://codereview.chromium.org/2904973003
      Cr-Commit-Position: refs/heads/master@{#474914}
      f04ef6cf
    • Matt Giuca's avatar
      Fixed TestExpectations for 9 recently added Web Platform tests. · 560d2475
      Matt Giuca authored
      These had been automatically disabled on Mac 10.10, 10.11 and 10.12. But
      they are failing on ALL platforms, including Mac 10.9 which wasn't
      explicitly mentioned. Updated to just mention "Mac" without specific
      versions.
      
      TBR=mgiuca@chromium.org
      
      Bug: 726571
      Change-Id: Ia1c33e13181a5b75f9e20f81f203c2d473c67811
      Reviewed-on: https://chromium-review.googlesource.com/516863Reviewed-by: default avatarMatt Giuca <mgiuca@chromium.org>
      Commit-Queue: Matt Giuca <mgiuca@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#474913}
      560d2475
    • amaralp's avatar
      Tapping handle shouldn't select misspelled word · 915818ef
      amaralp authored
      After crrev.com/2721813002 tapping an insertion handle triggered a contextmenu event
      which led to bug 717337. This CL fixes this bug by keeping track that the insertion
      handle tap contextmenu event came from touch.
      
      BUG=717337
      
      Review-Url: https://codereview.chromium.org/2864833002
      Cr-Commit-Position: refs/heads/master@{#474912}
      915818ef
    • xiaochu's avatar
      Fix memory leak CrOSComponentInstallerTest.BPPPCompatibleCrOSComponent unittest · 44c957b8
      xiaochu authored
      Replace raw pointer with a stack variable.
      
      BUG=chromium:690521, chromium:726579
      TEST=passed trybots.
      
      Review-Url: https://codereview.chromium.org/2902373003
      Cr-Commit-Position: refs/heads/master@{#474911}
      44c957b8
    • rlanday's avatar
      Fix bug in DocumentMarkerController::ShowMarkers() · 0cab0229
      rlanday authored
      I accidentally introduced a bug in DocumentMarkerController::ShowMarkers() in
      https://codereview.chromium.org/2820633002 causing it to crash if we have a node
      with a DocumentMarkerList for at least one MarkerType but not all MarkerTypes
      (this is very common). I hadn't noticed it until just now because this is a
      method only used to assist with debugging. This CL fixes the bug.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2908593003
      Cr-Commit-Position: refs/heads/master@{#474910}
      0cab0229
    • yoichio's avatar
      Introduce SelectionPaintRange in LayoutSelection · e7eadd47
      yoichio authored
      SelectionPaintRange has members of |selection_start_|,|selection_end_,
       |selection_start_pos_| and |selection_end_pos_| which LayoutSelection
       had directly.
      
      BUG=708453
      TEST=No change in behavior
      
      Review-Url: https://codereview.chromium.org/2901263002
      Cr-Commit-Position: refs/heads/master@{#474909}
      e7eadd47
    • erg's avatar
      Ensure the services gpu tests run with ozone. · f3d24ad5
      erg authored
      When I moved mus_gpu_unittests into service_unittests, I didn't copy the
      ozone initialization into the new test runner.
      
      BUG=722546
      
      Review-Url: https://codereview.chromium.org/2907663003
      Cr-Commit-Position: refs/heads/master@{#474908}
      f3d24ad5
    • jaydasika's avatar
      cc : Store surface layer ids on LayerTreeHost and push them at commit · 10be211f
      jaydasika authored
      This CL stores surface layer ids on LayerTreeHost which is pushed onto
      LayerTreeImpl on commit and activation. These ids are used make the
      compositor frame metadata instead of LayerTreeImpl::surface_layers and
      so this patch also deletes LayerTreeImpl::surface_layers.
      
      This CL is required to stop pushing hidden subtrees at commit.
      (See comments in crrev.com/2846653002)
      
      BUG=595843
      CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
      
      Review-Url: https://codereview.chromium.org/2905533002
      Cr-Commit-Position: refs/heads/master@{#474907}
      10be211f
    • Johan Tibell's avatar
      Generalize OverlayUserPrefStore · 0595f762
      Johan Tibell authored
      Allows the overlay to be any PersistentPrefStore, thereby allowing us to
      use a PersistentPrefStoreClient to connect to a remote in-memory pref
      store in the Mojo pref service instead of using a local one.
      
      Bug: 719770
      Change-Id: I992c416503ab6f115cbf3d98d658bc0911c4c0c7
      Reviewed-on: https://chromium-review.googlesource.com/514842Reviewed-by: default avatarSam McNally <sammc@chromium.org>
      Reviewed-by: default avatarBernhard Bauer <bauerb@chromium.org>
      Commit-Queue: Johan Tibell <tibell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#474906}
      0595f762
    • Bryan Henry's avatar
      [Chromecast] Update CastApplication to use CommandLineInitUtil · 8a5eb976
      Bryan Henry authored
      Enables developers to apply command-line flags on user builds of Android
      by setting the Debug App setting appropriately in Developer Options.
      Matches the usage in ChromeApplication.
      
      /data/local/tmp/castshell-command-line on a public, user build of
      Android (7.1.2 NHG67N on Pixel) iff ADB is enabled and DEBUG_APP is set
      to "com.google.android.apps.mediashell".
      
      Bug: internal b/62042278
      Test: Verified that command-line flags were properly loaded from
      Change-Id: Iabb6ed29bee8812bd8a9eb9a9815ac8f68192187
      Reviewed-on: https://chromium-review.googlesource.com/516243Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
      Reviewed-by: default avatarLe-Chun Wu <lcwu@chromium.org>
      Commit-Queue: Bryan Henry <bryanhenry@google.com>
      Cr-Commit-Position: refs/heads/master@{#474905}
      8a5eb976
    • shend's avatar
      Make TextIndentLine an enum class. · 9649896c
      shend authored
      This patch makes TextIndentLine an enum class for better type safety.
      
      BUG=684966
      
      Review-Url: https://codereview.chromium.org/2905203002
      Cr-Commit-Position: refs/heads/master@{#474904}
      9649896c
    • bugsnash's avatar
      Removed use of RefPtr::Release where result is not used. · f2b5ef57
      bugsnash authored
      This patch
      - Removed use of RefPtr::Release where the result is not used. Replaced
        this with setting the RefPtr to nullptr.
      - Added WARN_UNUSED_RESULT to RefPtr::Release() to prevent it from
        being used in this way in future.
      
      BUG=494719
      
      Review-Url: https://codereview.chromium.org/2907543002
      Cr-Commit-Position: refs/heads/master@{#474903}
      f2b5ef57
    • mike's avatar
      Remove duplicate service wrkr "uncontrolled" test · 8712f4d7
      mike authored
      This test is identical to the version available in the Web Platform
      Tests project and may therefore be removed without impacting coverage.
      
      BUG=688116
      R=falken@chromium.org
      
      Review-Url: https://codereview.chromium.org/2897313003
      Cr-Commit-Position: refs/heads/master@{#474902}
      8712f4d7
    • shend's avatar
      Generate enum/getters/setters/mappings for text-security. · dd404929
      shend authored
      Currently, the text-security property is a 'storage_only' field,
      so it has no generated public getters/setters. This patch changes it to
      a 'keyword' field so that its getters/setters can be generated as well.
      We also generate the EWordBreak enum and use the generated
      CSSValueID <-> EWordBreak mappings.
      
      Diff of generated files:
      https://gist.github.com/darrnshn/2811407420cd06be91eca37e52c974d6/revisions
      
      BUG=628043
      
      Review-Url: https://codereview.chromium.org/2911583002
      Cr-Commit-Position: refs/heads/master@{#474901}
      dd404929
    • shend's avatar
      Make TextEmphasisPosition an enum class. · 78f5c551
      shend authored
      This patch makes TextEmphasisPosition an enum class for better type
      safety.
      
      BUG=684966
      CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
      
      Review-Url: https://codereview.chromium.org/2895883002
      Cr-Commit-Position: refs/heads/master@{#474900}
      78f5c551
    • rdevlin.cronin's avatar
      [Extensions Bindings] Update tabs tests to accept new error messages · 4ff9a598
      rdevlin.cronin authored
      Certain tabs API tests expect errors for passing invalid arguments.
      Update the tests to accept the errors from the native bindings system.
      
      BUG=653596
      TEST=ExtensionApiTabTest.TabAudible --native-crx-bindings=1,
           ExtensionApiTabTest.TabMove --native-crx-bindings=1
      
      Review-Url: https://codereview.chromium.org/2901403003
      Cr-Commit-Position: refs/heads/master@{#474899}
      4ff9a598
    • edcourtney's avatar
      [Notifications] Forward mouse wheel events. · dbe2894b
      edcourtney authored
      This fixes a regression where we can't scroll the message center when
      the mouse is over ARC notifications.
      
      BUG=726574
      
      Review-Url: https://codereview.chromium.org/2904933004
      Cr-Commit-Position: refs/heads/master@{#474898}
      dbe2894b
    • jiameng's avatar
      Create a new local context class. · b6460e24
      jiameng authored
      CSSParserLocalContext represents local context for each property.
      Currently it only has one boolean field (use_alias_parsing), but it
      will be later extended to contain other info, such as whether the
      property is a longhand of a shorthand.
      
      BUG=668012
      
      Review-Url: https://codereview.chromium.org/2901393002
      Cr-Commit-Position: refs/heads/master@{#474897}
      b6460e24
    • nainar's avatar
      Sort all fields in alphabetical order to make the diffs deterministic · 09743e50
      nainar authored
      Currently the jinja template generates the properties getters/setters
      in the order they appear in the group. This means changing groups will
      change the location of the getter/setter making the diff generated hard
      to read.
      See diff here for example: https://codereview.chromium.org/2889323002
      
      This CL sorts fields and subgroups deterministically in alphabetical
      order.
      
      Diff: https://gist.github.com/7b50d7f151021057eded58e5a405e724/revisions
      
      BUG=710938
      
      Review-Url: https://codereview.chromium.org/2905803002
      Cr-Commit-Position: refs/heads/master@{#474896}
      09743e50
    • bmcquade's avatar
      Provide WebContents::CreateParams to tab helpers. · 42b72063
      bmcquade authored
      With browser-side navigation enabled, navigations in new foreground tabs are
      considered to have started in the background. This is a change in behavior.
      This causes page load metrics to incorrectly consider these page loads to have
      started in the background, which skews all of Chrome's page load metrics
      (PageLoad.* in UMA).
      
      clamy explains:
      """
      the background/foreground issue seems to be due to the ordering of calls in
      chrome/browser/ui/browser_navigator.cc when we create a new tab.
      What happens is:
      - we first create a WebContents and ask it to navigate
      (https://cs.chromium.org/chromium/src/chrome/browser/ui/browser_navigator.cc?type=cs&l=557).
      This result in the creation of a NavigationHandle, so we fire DidStartNavigation.
      In the current architecture, we fire DidStartNavigation after receiving
       DidStartProvisionalLoad.
      - then we insert the WebContents in the tab strip
      (https://cs.chromium.org/chromium/src/chrome/browser/ui/browser_navigator.cc?type=cs&l=589).
      This fires WebContentsImpl::WasShown.
      """
      
      This patch implements Nasko's proposed fix to expose the WebContents
      CreateParams to interested WebContentsObservers, page load metrics's
      MetricsWebContentsObserver being the first consumer.
      
      We don't have the CreateParams in all places where a WebContents is passed to
      TabHelpers, so we wrap the CreateParams in a base::Optional<> and provide
      CreateParams in cases where they are available.
      
      BUG=725347
      
      Review-Url: https://codereview.chromium.org/2894973002
      Cr-Commit-Position: refs/heads/master@{#474895}
      42b72063
    • pauljensen's avatar
      [Cronet] Clean up tests · a669662d
      pauljensen authored
      Remove most of CronetTestFramework.  Cronet tests haven't passing options
      on the command line for a long time so remove the command-line-args
      abstraction layer.  Saves 250+ lines of code.
      
      BUG=547160
      
      CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester
      
      Review-Url: https://codereview.chromium.org/2892013002
      Cr-Commit-Position: refs/heads/master@{#474894}
      a669662d
    • shend's avatar
      Make TextDecorationSkip an enum class. · c08b94e9
      shend authored
      This patch makes TextDecorationSkip an enum class for better type
      safety.
      
      BUG=684966
      CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
      
      Review-Url: https://codereview.chromium.org/2910513003
      Cr-Commit-Position: refs/heads/master@{#474893}
      c08b94e9
    • tdresser's avatar
      Fix Event.Latency.EndToEnd.KeyPress units · ea3a8629
      tdresser authored
      BUG=None
      
      Review-Url: https://codereview.chromium.org/2901413002
      Cr-Commit-Position: refs/heads/master@{#474892}
      ea3a8629
    • Sam McNally's avatar
      Split ScopedPrefConnectionBuilder out from PrefStoreManagerImpl. · 5c8104cd
      Sam McNally authored
      Currently, pref service connections are queued until all pref store
      connections and the persistent pref store are ready. This is
      unnecessarily restrictive and complicates changes necessary to support
      sharing of default pref values. This CL changes the initialization of
      pref connections to be more incremental.
      
      Bug: 719770
      Change-Id: Ie94f037b3ec9262ac12c048a2f31be20e0a3291c
      Reviewed-on: https://chromium-review.googlesource.com/513644
      Commit-Queue: Sam McNally <sammc@chromium.org>
      Reviewed-by: default avatarJohan Tibell <tibell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#474891}
      5c8104cd
    • ryansturm's avatar
      If users clear history, the previews recency rule should be cleared · 4cd77228
      ryansturm authored
      When a user clears a chunk of history, the recency rule (previews aren't
      shown for ~5 minutes after an opt out). Should be reset if the chunk of
      history is longer than 5 minutes.
      
      BUG=722436
      
      Review-Url: https://codereview.chromium.org/2878363004
      Cr-Commit-Position: refs/heads/master@{#474890}
      4cd77228
    • wzang's avatar
      Multiple user pods implementation for new login screen · c1604bc8
      wzang authored
      The new login screen for multiple user pods involve creating small pods
      and place them on a scroll bar.
       
      The ‘small pod’ is implemented as an ‘add-on’ to the existing user pod
      template, instead of being a new prototype. Pods can easily transform
      itself among the ‘large’, ‘small’ and ‘extra small’ states, by toggling
      the visibility of corresponding parts.
       
      1) Pod placement works as follows:
      Upon receiving the user list from backend, create a new pod for each user
      (in rebuildPods()), append them to the pow row as children, and call
      initialize(). This part remains the same with the old implementation, and
      at this point there is no need to determine what size the pod should be
      shown.
      
      rebuildPods() calls placePods(). placePods() first determines the ‘main
      pod’ (the one displayed as the large pod), and append all other pods to a
      ‘small pods container’, because they should be displayed as small pods.
      This is done in appendPodsToParents().
      
      The actual placement process starts here:
      it’s done by: placeSinglePod_(), placePodsOnPodRow_(),
      placePodsOnContainer_() or placePodsOnScrollableContainer_().
      
      The placePods() function decides which one to call based on the number of
      users we have. There’re lots of details in the placement process but the
      general logic is simple, because we do not have to determine the best
      numbers of rows and columns and can just follow the spec instead.
      
      One special handling is: when scrollable container is shown it should
      occupy the full screen, and a gradient mask is applied to avoid blocking
      the header bar. The z-indexes should be well selected.
       
      2) User removal works as follows:
      A pod should always be switched to the main pod before being removed
      (except the trivial 2-user case). Therefore after removing it from its
      parent (the pod row), the main pod is set to null.
      
      We call placePods(), and the following works exactly the same with the 1)
      scenario. This is because placePods() will determine the main pod and re-
      append the pods to different parents if necessary.
       
      3) Window resizing works as follows:
      Once there is a window resizing event, call placePods() directly. The
      difference with the above two scenarios is that the main pod is not null
      when window resizing happens. Therefore, placePods() will skip the main
      pod selection and re-appending children process, and start the actual
      placement directly.
       
      4) Click event:
      The only click event on small pods is to trigger the switch between the
      small pod and the large pod. In the click event handler, we first find
      out if it’s for a small pod, and if it is, simply switch it with the main
      pod by switching the parents as well as positions / other relevant styles
      (handled by changeMainPod()).
      
      Please note:
      We do not call placePods() because it may result in reordering the pods.
      It’s OK that the pods are not in LRU order temporarily.
      
      BUG=718159
      
      Review-Url: https://codereview.chromium.org/2898283002
      Cr-Commit-Position: refs/heads/master@{#474889}
      c1604bc8